:root {
  color-scheme: dark;
  --ink: #f4efe6;
  --muted: #b9b1a4;
  --soft: #867e73;
  --line: rgba(244, 239, 230, 0.13);
  --panel: rgba(22, 25, 25, 0.82);
  --panel-strong: rgba(31, 35, 35, 0.94);
  --bg: #0c0f0f;
  --copper: #d69f64;
  --green: #8fca9b;
  --blue: #82a8d7;
  --gold: #e4c36b;
  --danger: #dc7c6c;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(214, 159, 100, 0.16), transparent 32rem),
    linear-gradient(180deg, #0c0f0f 0%, #121717 38%, #0c0f0f 100%);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
p { color: var(--muted); line-height: 1.7; }

.shell { width: min(1440px, 100%); margin: 0 auto; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: rgba(12, 15, 15, 0.84);
  backdrop-filter: blur(18px);
}

.brand { display: inline-flex; align-items: center; gap: 0.75rem; min-width: 13rem; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(214, 159, 100, 0.42);
  background: linear-gradient(135deg, rgba(214, 159, 100, 0.28), rgba(143, 202, 155, 0.12));
  border-radius: 0.65rem;
  font-family: "Source Serif 4", serif;
  font-size: 1.35rem;
  font-weight: 700;
}
.brand strong,
.brand small { display: block; }
.brand small { color: var(--soft); font-size: 0.72rem; margin-top: 0.1rem; }

.nav { display: flex; align-items: center; justify-content: center; gap: 0.2rem; flex-wrap: wrap; }
.nav a {
  color: var(--muted);
  font-size: 0.88rem;
  padding: 0.65rem 0.8rem;
  border-radius: 999px;
}
.nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.07); }
.contact-pill {
  border: 1px solid rgba(214, 159, 100, 0.45);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.72rem 1rem;
  font-size: 0.84rem;
  background: rgba(214, 159, 100, 0.1);
  white-space: nowrap;
}

.section { padding: clamp(4rem, 7vw, 7rem) clamp(1rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.hero {
  min-height: calc(100vh - 4.75rem);
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(22rem, 0.82fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}
.eyebrow {
  margin: 0 0 1rem;
  color: var(--copper);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  letter-spacing: 0;
}
h1,
h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 650;
}
h1 {
  max-width: 13ch;
  font-size: clamp(4.3rem, 10vw, 9.6rem);
  line-height: 0.88;
}
h2 { font-size: clamp(2.4rem, 5.8vw, 5.6rem); line-height: 0.95; max-width: 12ch; }
h3 { font-size: clamp(1.4rem, 2vw, 2rem); line-height: 1.15; }
h4 { font-size: 1.05rem; }
.lead { max-width: 45rem; font-size: clamp(1.05rem, 1.8vw, 1.35rem); }

.hero-actions,
.footer,
.panel-top,
.metric-row,
.signal-grid {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.1rem;
  border-radius: 0.75rem;
  font-weight: 800;
  font-size: 0.9rem;
}
.button.primary { background: var(--ink); color: #111; }
.button.secondary { border: 1px solid var(--line); color: var(--ink); background: rgba(255, 255, 255, 0.05); }

.signal-grid { margin-top: 2rem; align-items: stretch; }
.signal-grid div {
  min-width: 9rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  border-radius: 0.9rem;
}
.signal-grid strong,
.signal-grid span,
.metric-row strong,
.metric-row span { display: block; }
.signal-grid strong,
.metric-row strong { font-size: 1.25rem; }
.signal-grid span,
.metric-row span { color: var(--soft); font-size: 0.78rem; margin-top: 0.25rem; }

.command-file,
.panel,
.agent-card,
.module-grid article,
.funding-board article,
.build-grid article,
.duty-grid article,
.handoff-panel,
.priority-roadmap article,
.kanban article {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.command-file {
  padding: clamp(1rem, 3vw, 1.5rem);
  border-radius: 1.25rem;
}
.file-head {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.file-head span,
.score-card span,
.room-stack span,
.label,
.agent-card > span,
.side-rail span {
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.11em;
}
.file-head strong { display: block; margin-top: 0.3rem; font-size: 1.55rem; line-height: 1.15; }
.score-card {
  margin: 1rem 0;
  padding: 1.2rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(143, 202, 155, 0.18), rgba(130, 168, 215, 0.1));
  border: 1px solid rgba(143, 202, 155, 0.3);
}
.score-card strong { display: block; font-size: 5rem; line-height: 0.9; color: var(--green); }
.score-card small { color: var(--muted); }
.room-stack { display: grid; gap: 0.85rem; }
.room-stack article {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.035);
}
.room-stack p { margin: 0.35rem 0 0; font-size: 0.88rem; }

.section-title {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section-title p:not(.eyebrow) { max-width: 54rem; margin: 0; font-size: 1rem; }
.section-title.split {
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.72fr);
  align-items: end;
}

.workspace-layout {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: 1rem;
}
.side-rail {
  position: sticky;
  top: 6rem;
  align-self: start;
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.035);
}
.side-rail span { margin-bottom: 0.45rem; }
.side-rail a {
  padding: 0.72rem 0.75rem;
  border-radius: 0.7rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.side-rail a:hover { background: rgba(255, 255, 255, 0.07); color: var(--ink); }
.workspace-main { display: grid; gap: 1rem; }
.panel {
  border-radius: 1.1rem;
  padding: clamp(1rem, 2.5vw, 1.5rem);
}
.panel.large { background: linear-gradient(135deg, rgba(214, 159, 100, 0.12), rgba(255, 255, 255, 0.035)); }
.panel-top { justify-content: space-between; margin-bottom: 1rem; }
.status {
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 800;
}
.status.live { color: #102018; background: var(--green); border-color: var(--green); }
.metric-row {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.metric-row div {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.035);
}

.table { display: grid; border: 1px solid var(--line); border-radius: 0.9rem; overflow: hidden; }
.row { display: grid; grid-template-columns: 0.75fr 1.15fr 1.15fr; }
.row span { padding: 0.9rem; color: var(--muted); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); font-size: 0.88rem; }
.row span:first-child { color: var(--ink); font-weight: 800; }
.row.head span { color: var(--soft); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; background: rgba(255, 255, 255, 0.045); }
.row:last-child span { border-bottom: 0; }
.row span:last-child { border-right: 0; }

.kanban {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.kanban article,
.module-grid article,
.funding-board article,
.build-grid article,
.duty-grid article,
.handoff-panel,
.priority-roadmap article,
.agent-card {
  border-radius: 1rem;
  padding: 1.2rem;
}
.kanban p { font-size: 0.9rem; margin-bottom: 0; }

.timeline { display: grid; gap: 0.75rem; }
.timeline div {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.9rem;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.timeline strong { color: var(--gold); }
.timeline span { color: var(--muted); line-height: 1.55; }

.vault-grid,
.module-grid,
.funding-board,
.build-grid,
.duty-grid,
.handoff-stack,
.priority-roadmap,
.agent-grid {
  display: grid;
  gap: 1rem;
}
.vault-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.vault-grid div {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
}
.vault-grid strong,
.vault-grid span { display: block; }
.vault-grid span { color: var(--muted); font-size: 0.88rem; line-height: 1.55; margin-top: 0.45rem; }

.module-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.module-grid article { min-height: 15rem; background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025)); }
.module-grid article > span {
  color: var(--copper);
  font-family: "Source Serif 4", serif;
  font-size: 2.35rem;
  line-height: 1;
}
.module-grid h3 { margin-top: 1.2rem; font-size: 1.2rem; }
.module-grid p { margin-bottom: 0; font-size: 0.9rem; }

.agent-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.agent-card.wide { grid-column: span 4; }
.agent-card h3 { margin-top: 0.8rem; }
.agent-card ul {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.agent-card li {
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 0.55rem;
  font-size: 0.88rem;
}

.funding-board { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.funding-board article:nth-child(2) { border-color: rgba(143, 202, 155, 0.35); }
.funding-board article:nth-child(3) { border-color: rgba(130, 168, 215, 0.35); }
.funding-board p,
.build-grid p { margin-bottom: 0; font-size: 0.9rem; }

.build-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.build-grid article { background: rgba(255, 255, 255, 0.038); }
.duty-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.duty-grid article {
  min-height: 18rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
}
.duty-grid article > span {
  color: var(--blue);
  font-family: "Source Serif 4", serif;
  font-size: 2rem;
  line-height: 1;
}
.duty-grid h3 {
  margin-top: 1rem;
  font-size: 1.08rem;
}
.duty-grid p,
.handoff-panel p,
.priority-roadmap p {
  margin-bottom: 0;
  font-size: 0.9rem;
}
.handoff-stack {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
}
.handoff-panel {
  background: linear-gradient(135deg, rgba(130, 168, 215, 0.1), rgba(255, 255, 255, 0.035));
}
.priority-roadmap {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
}
.priority-roadmap article {
  background: rgba(255, 255, 255, 0.038);
  border-color: rgba(214, 159, 100, 0.22);
}

.footer {
  justify-content: space-between;
  padding: 2rem clamp(1rem, 4vw, 3rem);
  color: var(--muted);
}
.footer strong,
.footer span,
.footer a { display: block; }
.footer strong { color: var(--ink); }
.footer div:last-child { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer a { color: var(--copper); }

@media (max-width: 1100px) {
  .hero,
  .section-title.split,
  .workspace-layout { grid-template-columns: 1fr; }
  .side-rail { position: static; display: flex; flex-wrap: wrap; }
  .metric-row,
  .module-grid,
  .funding-board,
  .agent-grid,
  .build-grid,
  .duty-grid,
  .handoff-stack,
  .priority-roadmap,
  .vault-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-card.wide { grid-column: span 2; }
}

@media (max-width: 720px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .nav { justify-content: flex-start; }
  h1 { font-size: clamp(3.4rem, 18vw, 5rem); }
  .metric-row,
  .module-grid,
  .funding-board,
  .agent-grid,
  .build-grid,
  .duty-grid,
  .handoff-stack,
  .priority-roadmap,
  .vault-grid,
  .kanban { grid-template-columns: 1fr; }
  .agent-card.wide { grid-column: auto; }
  .row { grid-template-columns: 1fr; }
  .row span { border-right: 0; }
  .timeline div { grid-template-columns: 1fr; gap: 0.35rem; }
  .footer { align-items: flex-start; }
}
