:root {
  color-scheme: light;
  --ink: #101418;
  --paper: #f4f1e9;
  --white: #ffffff;
  --blue: #1d55d5;
  --blue-soft: #dce6ff;
  --amber: #e49a38;
  --mint: #99d6bd;
  --red: #e2645a;
  --line: rgba(16, 20, 24, 0.16);
  --muted: #697178;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--white);
  padding: 0.75rem 1rem;
}

.skip-link:focus {
  top: 1rem;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  min-height: 68px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  padding: 0 4vw;
  color: var(--white);
  background: rgba(8, 13, 18, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-weight: 750;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: var(--amber);
  font-family: Georgia, serif;
  font-size: 1.2rem;
}

nav {
  display: flex;
  gap: 1.6rem;
}

nav a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 0.9rem;
}

nav a:hover,
nav a:focus-visible {
  color: var(--white);
}

.system-state {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.84rem;
}

.system-state i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 5px rgba(153, 214, 189, 0.16);
}

.hero {
  position: relative;
  min-height: min(82vh, 790px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #081018;
  color: var(--white);
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center;
}

.hero-shade {
  background: linear-gradient(90deg, rgba(5, 10, 15, 0.96) 0%, rgba(5, 10, 15, 0.68) 36%, rgba(5, 10, 15, 0.06) 70%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(700px, 90vw);
  margin: 0 0 7vh 7vw;
}

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

.eyebrow.dark {
  color: var(--blue);
}

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

h1 {
  max-width: 660px;
  margin-bottom: 1.2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 6.2rem;
  line-height: 0.94;
  font-weight: 500;
}

h2 {
  margin-bottom: 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.8rem;
  line-height: 1.04;
  font-weight: 500;
}

.hero-copy {
  max-width: 590px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.32);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 750;
}

.button.primary {
  border-color: var(--amber);
  background: var(--amber);
  color: #15110a;
}

.button.secondary {
  background: rgba(8, 13, 18, 0.35);
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1.7rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
}

.hero-metrics strong {
  margin-right: 0.35rem;
  color: var(--white);
  font-size: 1.15rem;
}

.band {
  padding: 7rem max(5vw, calc((100vw - 1280px) / 2));
}

.section-heading {
  margin-bottom: 3rem;
}

.section-heading.narrow {
  max-width: 780px;
}

.section-heading.split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 4rem;
  align-items: end;
}

.section-heading.split > p,
.section-heading.narrow > p:last-child {
  color: var(--muted);
}

.manifesto {
  background: var(--white);
}

.domain-map {
  background: #edf2fb;
}

.domain-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.5rem;
  border: 1px solid var(--line);
  background: var(--white);
}

.domain-meta span {
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem 1.25rem;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.domain-meta span:last-child {
  border-right: 0;
}

.domain-meta strong {
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 1.6rem;
}

.frontier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.frontier-card {
  min-height: 310px;
  padding: 1.5rem;
  background: var(--white);
}

.frontier-score {
  display: block;
  color: var(--blue);
  font-family: Georgia, serif;
  font-size: 3.4rem;
  line-height: 1;
}

.frontier-card h3 {
  min-height: 58px;
  margin: 2rem 0 0.75rem;
}

.frontier-card > p:not(.output-kicker) {
  color: var(--muted);
  font-size: 0.88rem;
}

.signal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.25rem;
}

.signal-list span {
  padding: 0.35rem 0.5rem;
  background: var(--blue-soft);
  color: #17366e;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.domain-next {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 1px;
  margin-top: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.domain-next > div {
  min-height: 260px;
  padding: 1.5rem;
  background: var(--white);
}

.domain-next ol {
  margin: 0;
  padding-left: 1.4rem;
}

.domain-next li {
  margin: 0.8rem 0;
}

.domain-audit {
  border-top: 4px solid var(--amber);
}

.audit-lock {
  display: inline-flex;
  margin-top: 1rem;
  padding: 0.45rem 0.65rem;
  background: #fff1d9;
  color: #6e4306;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
}

.pipeline li {
  min-height: 122px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.15rem;
  background: var(--paper);
  font-weight: 750;
}

.pipeline span {
  color: var(--blue);
  font-family: Georgia, serif;
  font-size: 1.55rem;
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.agent-card {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--white);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.agent-index {
  color: var(--blue);
  font-family: Georgia, serif;
  font-size: 2rem;
}

.agent-card h3 {
  margin: auto 0 0.5rem;
  font-size: 1.2rem;
}

.agent-role,
.agent-description {
  color: var(--muted);
  font-size: 0.88rem;
}

.agent-domain-role {
  margin: 0.8rem 0 0;
  padding-left: 0.75rem;
  border-left: 3px solid var(--amber);
  color: var(--ink);
  font-size: 0.82rem;
}

.agent-output {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

.dark-band {
  background: #111820;
  color: var(--white);
}

.section-heading.light > p {
  color: rgba(255, 255, 255, 0.62);
}

.venue-toolbar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.filter {
  min-height: 40px;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.filter.active,
.filter:hover,
.filter:focus-visible {
  border-color: var(--amber);
  background: var(--amber);
  color: #15110a;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  text-align: left;
}

th,
td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  vertical-align: top;
}

th {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
  text-transform: uppercase;
}

td {
  font-size: 0.86rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}

.status.open::before,
.status.open_future_cycle::before {
  background: var(--mint);
}

.source-link {
  color: #9dbbff;
}

.workbench {
  background: #e9edf3;
}

.workbench-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 500px;
  border: 1px solid var(--line);
  background: var(--white);
}

.workbench-controls {
  border-right: 1px solid var(--line);
  background: #f5f6f8;
}

.workbench-tab {
  width: 100%;
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.workbench-tab span {
  font-family: Georgia, serif;
  color: var(--blue);
}

.workbench-tab.active {
  background: var(--white);
  color: var(--ink);
  box-shadow: inset 4px 0 var(--blue);
}

.workbench-output {
  padding: 2rem;
}

.output-kicker {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.fit-row {
  display: grid;
  grid-template-columns: 90px 1fr 42px;
  gap: 1rem;
  align-items: center;
  margin: 0.8rem 0;
}

.fit-track {
  height: 8px;
  overflow: hidden;
  background: #e4e8ec;
}

.fit-track i {
  display: block;
  height: 100%;
  background: var(--blue);
}

.warning {
  margin-top: 1.5rem;
  padding: 1rem;
  border-left: 4px solid var(--red);
  background: #fff4f2;
}

.compact-list {
  padding-left: 1.2rem;
}

.compact-list li {
  margin: 0.45rem 0;
}

.opportunity {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.opportunity:last-child {
  border-bottom: 0;
}

.gates {
  background: var(--paper);
}

.gate-list {
  border-top: 1px solid var(--line);
}

.gate-row {
  display: grid;
  grid-template-columns: 80px minmax(180px, 0.6fr) minmax(240px, 1.4fr);
  gap: 2rem;
  align-items: center;
  min-height: 92px;
  border-bottom: 1px solid var(--line);
}

.gate-row span {
  color: var(--blue);
  font-family: Georgia, serif;
  font-size: 1.45rem;
}

.gate-row strong {
  font-size: 1rem;
}

.gate-row p {
  margin: 0;
  color: var(--muted);
}

footer {
  min-height: 190px;
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  align-items: flex-end;
  padding: 3rem max(5vw, calc((100vw - 1280px) / 2));
  background: #0b1117;
  color: var(--white);
}

footer strong {
  font-family: Georgia, serif;
  font-size: 2rem;
}

footer p {
  max-width: 620px;
  margin: 0.5rem 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr auto;
    padding: 0 1rem;
  }

  nav {
    display: none;
  }

  .hero {
    min-height: 740px;
  }

  .hero-image {
    object-position: 64% center;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(5, 10, 15, 0.98) 0%, rgba(5, 10, 15, 0.7) 52%, rgba(5, 10, 15, 0.1) 100%);
  }

  .hero-content {
    margin: 0 1.25rem 3rem;
  }

  h1 {
    font-size: 4.6rem;
  }

  h2 {
    font-size: 3rem;
  }

  .band {
    padding: 5rem 1.25rem;
  }

  .section-heading.split,
  .workbench-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .pipeline,
  .agent-grid,
  .domain-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .frontier-grid,
  .domain-next {
    grid-template-columns: 1fr;
  }

  .domain-meta span:nth-child(2) {
    border-right: 0;
  }

  .workbench-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workbench-tab {
    min-height: 82px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }

  .workbench-tab.active {
    box-shadow: inset 0 4px var(--blue);
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 580px) {
  h1 {
    font-size: 3.3rem;
  }

  h2 {
    font-size: 2.45rem;
  }

  .system-state {
    font-size: 0;
  }

  .system-state i {
    margin-right: 0.4rem;
  }

  .pipeline,
  .agent-grid,
  .domain-meta {
    grid-template-columns: 1fr;
  }

  .domain-meta span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .domain-meta span:last-child {
    border-bottom: 0;
  }

  .agent-card {
    min-height: 250px;
  }

  .venue-toolbar {
    overflow-x: auto;
    padding-bottom: 0.4rem;
  }

  .workbench-controls {
    grid-template-columns: 1fr;
  }

  .workbench-tab {
    min-height: 56px;
    flex-direction: row;
    align-items: center;
  }

  .fit-row {
    grid-template-columns: 68px 1fr 34px;
    gap: 0.55rem;
  }

  .gate-row {
    grid-template-columns: 52px 1fr;
    gap: 1rem;
    padding: 1.2rem 0;
  }

  .gate-row p {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
