:root {
  --bg: #111310;
  --panel: #1a1e18;
  --panel-2: #20261f;
  --ink: #f5f1df;
  --muted: #a9b2a3;
  --line: #343c31;
  --green: #55d27f;
  --amber: #f0c45a;
  --cyan: #67d6c4;
  --red: #ef705b;
  --shadow: rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  background:
    linear-gradient(90deg, rgba(245, 241, 223, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(245, 241, 223, 0.035) 1px, transparent 1px),
    radial-gradient(circle at top left, rgba(85, 210, 127, 0.12), transparent 34rem),
    var(--bg);
  background-size: 28px 28px, 28px 28px, auto;
}

a,
button {
  color: inherit;
}

.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(17, 19, 16, 0.92);
  padding: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--green);
  background: #173322;
  color: var(--green);
  box-shadow: 0 0 22px rgba(85, 210, 127, 0.2);
  font-weight: 800;
}

.brand small,
.operator small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

nav {
  display: grid;
  gap: 8px;
}

nav button {
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  min-height: 40px;
  padding: 0 12px;
  cursor: pointer;
  color: var(--muted);
  border-radius: 6px;
}

nav button:hover,
nav button.active {
  color: var(--ink);
  border-color: var(--line);
  background: var(--panel);
}

.operator {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.pulse {
  width: 12px;
  height: 12px;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(85, 210, 127, 0.12), 0 0 18px rgba(85, 210, 127, 0.8);
}

main {
  padding: clamp(20px, 4vw, 52px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 26px;
  align-items: end;
  margin-bottom: 34px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.3rem, 5vw, 5.2rem);
  line-height: 0.96;
}

h2,
h3,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}

h3 {
  margin-bottom: 12px;
}

p {
  color: var(--muted);
  line-height: 1.58;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
  box-shadow: 0 18px 50px var(--shadow);
}

.status-strip span {
  padding: 12px 14px;
  background: var(--panel);
  color: var(--muted);
}

.status-strip b {
  color: var(--ink);
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(85, 210, 127, 0.55);
  color: var(--green);
  background: rgba(85, 210, 127, 0.08);
  border-radius: 6px;
  white-space: nowrap;
}

.badge.muted {
  border-color: var(--line);
  color: var(--muted);
  background: var(--panel);
}

.board,
.project-grid,
.crew,
.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.board article,
.project-grid article,
.limit-card,
.journal article,
.docs-list article,
.timeline article,
.agent-card,
.mission,
.callout {
  border: 1px solid var(--line);
  background: rgba(26, 30, 24, 0.9);
  box-shadow: 0 16px 44px var(--shadow);
}

.board article {
  min-height: 360px;
  padding: 18px;
}

.ticket {
  border-left: 4px solid var(--cyan);
  padding: 14px;
  margin-bottom: 12px;
  background: var(--panel-2);
}

.ticket.hot {
  border-color: var(--amber);
}

.ticket.done {
  border-color: var(--green);
}

.ticket p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.timeline,
.journal,
.docs-list {
  display: grid;
  gap: 14px;
}

.timeline article,
.journal article,
.docs-list article {
  padding: 20px;
}

.timeline span,
.journal time,
code {
  color: var(--cyan);
  font-size: 0.86rem;
}

.project-grid article {
  padding: 20px;
  min-height: 210px;
}

.progress {
  display: block;
  height: 8px;
  margin-bottom: 22px;
  background: linear-gradient(90deg, var(--green) var(--value), #394036 var(--value));
}

.crew {
  grid-template-columns: minmax(260px, 0.75fr) minmax(280px, 1.25fr);
}

.status-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.limit-card {
  padding: 22px;
}

.limit-card.wide {
  grid-column: span 2;
}

.limit-card dl {
  display: grid;
  gap: 1px;
  margin: 22px 0 0;
  background: var(--line);
  border: 1px solid var(--line);
}

.limit-card dl div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  background: var(--panel-2);
}

.limit-card dt {
  color: var(--muted);
}

.limit-card dd {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.ring {
  --track: #394036;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: conic-gradient(var(--green) var(--value), var(--track) var(--value));
  position: relative;
}

.ring::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: var(--panel);
}

.ring span {
  position: relative;
  z-index: 1;
  font-size: 2rem;
  font-weight: 900;
}

.plain-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.agent-card,
.mission {
  padding: 24px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  background: var(--green);
  color: #0d170f;
  font-size: 2rem;
  font-weight: 900;
}

.office {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(#273024 0 0) 0 390px / 100% 170px no-repeat,
    linear-gradient(90deg, rgba(245, 241, 223, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(245, 241, 223, 0.05) 1px, transparent 1px),
    #171b15;
  background-size: auto, 34px 34px, 34px 34px;
}

.wall {
  position: absolute;
  inset: 0 0 auto;
  height: 250px;
  border-bottom: 6px solid #2f3a2c;
}

.screen {
  position: absolute;
  display: grid;
  place-items: center;
  width: 160px;
  height: 88px;
  border: 4px solid #111310;
  background: #07120c;
  color: var(--green);
  box-shadow: inset 0 0 20px rgba(85, 210, 127, 0.2);
  font-weight: 900;
}

.s1 { left: 8%; top: 54px; }
.s2 { left: 41%; top: 34px; color: var(--amber); }
.s3 { right: 9%; top: 66px; color: var(--cyan); }

.desk {
  position: absolute;
  width: 240px;
  height: 150px;
  bottom: 72px;
}

.desk-one { left: 22%; }
.desk-two { right: 18%; opacity: 0.68; }

.desk::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  height: 34px;
  background: #8a6843;
  border: 4px solid #17100b;
}

.monitor {
  position: absolute;
  left: 70px;
  top: 18px;
  width: 86px;
  height: 56px;
  background: #07120c;
  border: 4px solid #111310;
  box-shadow: inset 0 0 18px rgba(85, 210, 127, 0.25);
}

.keyboard {
  position: absolute;
  left: 82px;
  top: 84px;
  width: 70px;
  height: 14px;
  background: #111310;
}

.agent-pixel {
  position: absolute;
  left: 14px;
  top: 38px;
  width: 44px;
  height: 44px;
  background: var(--amber);
  box-shadow: 0 44px 0 #345c43, 16px 14px 0 #111310, 34px 14px 0 #111310;
}

.agent-pixel.active {
  animation: bob 1.6s infinite steps(2, end);
}

.desk b {
  position: absolute;
  left: 18px;
  bottom: 0;
}

.ticker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #10120f;
  color: var(--amber);
  font-weight: 800;
}

@keyframes bob {
  50% { transform: translateY(-8px); }
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .topbar,
  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .status-strip,
  .board,
  .project-grid,
  .crew,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .limit-card.wide {
    grid-column: auto;
  }

  .office {
    min-height: 520px;
  }
}
