:root {
  color-scheme: light;
  --paper: #f7f4ee;
  --surface: #fffdf8;
  --ink: #17232a;
  --muted: #56646b;
  --line: #d8d0c3;
  --green: #2e5d50;
  --green-soft: #e7f0ec;
  --gold: #9d6232;
  --gold-soft: #f7eadc;
  --blue: #475a83;
  --blue-soft: #e8ebf5;
  --red: #8f3e35;
  --red-soft: #f4e3df;
  --shadow: 0 20px 60px rgba(28, 35, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.hero,
main {
  width: calc(100% - 40px);
  max-width: 1240px;
  margin: 0 auto;
}

.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 18px;
}

.brand {
  font-size: 15px;
  font-weight: 850;
  padding: 8px 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.nav-links a,
.link-list a,
.proof-card a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.72);
}

.nav-links a {
  padding: 8px 12px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  padding: 42px 0 18px;
}

.hero-grid > *,
.split > *,
.proof-grid > *,
.status-grid > *,
.media-grid > * {
  max-width: 100%;
  min-width: 0;
}

.hero-copy,
.proof-card,
.diagram-panel,
.media-card,
.boundary-table,
.links-section .link-list,
.status-grid article {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  min-height: 430px;
  flex-direction: column;
  justify-content: center;
  padding: 36px;
  border-radius: 8px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 14ch;
  margin-bottom: 18px;
  font-size: 68px;
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: 0;
}

.dek,
.section-heading p,
.proof-card p,
.diagram-panel figcaption {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.dek {
  max-width: 36rem;
  margin-bottom: 24px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 850;
}

.badge.good {
  background: var(--green-soft);
  color: var(--green);
}

.badge.caution {
  background: var(--gold-soft);
  color: var(--gold);
}

.badge.blocked {
  background: var(--red-soft);
  color: var(--red);
}

.section {
  padding: 54px 0;
}

.primary-diagram-section {
  padding-top: 26px;
}

.section.compact {
  padding-top: 32px;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 22px;
}

.status-grid,
.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.status-grid article {
  min-height: 118px;
  padding: 20px;
  border-radius: 8px;
}

.status-grid span,
.media-card span,
.card-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-grid strong {
  display: block;
  font-size: 22px;
  line-height: 1.15;
}

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

.proof-card {
  display: flex;
  min-height: 290px;
  flex-direction: column;
  padding: 24px;
  border-radius: 8px;
}

.proof-card p {
  margin-bottom: 24px;
}

.proof-card a {
  width: fit-content;
  margin-top: auto;
  padding: 9px 12px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 850;
}

.diagram-panel {
  overflow: hidden;
  border-radius: 8px;
}

.diagram-panel img {
  width: 100%;
  background: var(--paper);
}

.diagram-panel figcaption {
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 14px 18px 18px;
}

.primary-diagram img {
  min-height: 340px;
  object-fit: contain;
}

.module-section {
  display: grid;
  gap: 18px;
}

.module-section .section-heading {
  max-width: 760px;
}

.module-section .diagram-panel img {
  min-height: 560px;
  object-fit: contain;
}

.zoom-link {
  position: relative;
  display: block;
  overflow: hidden;
  color: inherit;
}

.zoom-link img {
  transition: transform 180ms ease, filter 180ms ease;
}

.zoom-link:hover img {
  transform: scale(1.01);
  filter: saturate(1.02);
}

.zoom-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  border: 1px solid rgba(23, 35, 42, 0.2);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 253, 248, 0.9);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.module-legend,
.evidence-shell,
.evidence-panel,
.summary-card,
.source-strip {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.module-legend {
  grid-column: 1 / -1;
  padding: 18px;
  border-radius: 8px;
}

.legend-heading {
  margin-bottom: 14px;
}

.legend-heading h3 {
  margin-bottom: 0;
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.legend-grid article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: rgba(247, 244, 238, 0.5);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.legend-grid span {
  display: block;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.legend-grid strong {
  color: var(--ink);
  line-height: 1.18;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 16px;
}

.media-card {
  overflow: hidden;
  border-radius: 8px;
}

.media-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}

.media-card.context-wide {
  grid-column: span 7;
}

.media-card.tall {
  grid-column: span 5;
  grid-row: span 2;
}

.media-card.tall img {
  aspect-ratio: 7 / 11;
}

.media-card.proof-surface {
  grid-column: span 6;
}

.media-card.readiness-proof {
  grid-column: span 12;
}

.media-card.proof-surface img,
.media-card.readiness-proof img {
  aspect-ratio: 16 / 8.4;
  object-fit: contain;
  background: #10161a;
}

.media-card.readiness-proof {
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(250px, 0.32fr);
}

.media-card.readiness-proof .zoom-link img {
  height: 100%;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}

.media-card div {
  padding: 16px;
}

.media-card strong {
  display: block;
  line-height: 1.25;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  padding: 26px;
}

.lightbox:target {
  display: grid;
  place-items: center;
}

.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 35, 42, 0.74);
  backdrop-filter: blur(3px);
}

.lightbox figure {
  position: relative;
  z-index: 1;
  width: min(96vw, 1500px);
  max-height: 92vh;
  margin: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.36);
}

.lightbox img {
  width: 100%;
  max-height: calc(92vh - 88px);
  object-fit: contain;
  background: var(--paper);
}

.lightbox figcaption {
  border-top: 1px solid var(--line);
  padding: 14px 18px 18px;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.35;
}

.close-link {
  position: sticky;
  top: 12px;
  left: calc(100% - 92px);
  z-index: 2;
  display: inline-flex;
  margin: 12px 12px -46px auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(255, 253, 248, 0.94);
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

.boundary-section {
  padding-bottom: 28px;
}

.boundary-table {
  overflow: hidden;
  border-radius: 8px;
}

.boundary-table div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.boundary-table div:last-child {
  border-bottom: 0;
}

.boundary-table span {
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
}

.boundary-table strong {
  line-height: 1.35;
}

.links-section {
  padding-bottom: 76px;
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px;
  border-radius: 8px;
}

.link-list a {
  padding: 9px 12px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 850;
}

.evidence-body {
  background: var(--paper);
}

.evidence-shell {
  width: calc(100% - 40px);
  max-width: 1040px;
  margin: 34px auto 76px;
  border-radius: 8px;
  overflow: hidden;
}

.evidence-header {
  padding: 34px;
  border-bottom: 1px solid var(--line);
}

.back-link,
.source-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 850;
}

.back-link {
  margin-bottom: 22px;
}

.evidence-header h1 {
  max-width: 16ch;
  font-size: 54px;
}

.evidence-layout {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 22px;
  padding: 28px;
}

.summary-card,
.evidence-panel,
.source-strip {
  box-shadow: none;
  border-radius: 8px;
}

.summary-card {
  padding: 22px;
  background: var(--green-soft);
}

.summary-card p {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.45;
}

.evidence-panel {
  padding: 22px;
}

.evidence-panel h2 {
  margin-bottom: 16px;
  font-size: 28px;
}

.evidence-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.evidence-list li,
.kv-grid article,
.mini-table div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: rgba(247, 244, 238, 0.46);
}

.evidence-list strong,
.kv-grid strong,
.mini-table strong {
  display: block;
  margin-bottom: 4px;
  line-height: 1.2;
}

.evidence-list span,
.kv-grid span,
.mini-table span {
  color: var(--muted);
  line-height: 1.35;
}

.boundary-note {
  margin-top: 16px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 14px;
  background: var(--gold-soft);
  color: var(--ink);
  font-weight: 750;
  line-height: 1.35;
}

.kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mini-table {
  display: grid;
  gap: 8px;
}

.mini-table div {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 12px;
}

.source-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 18px 28px 28px;
  border-width: 1px 0 0;
  border-radius: 0;
  box-shadow: none;
}

.source-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .hero,
  main {
    width: calc(100% - 28px);
    max-width: 760px;
  }

  .hero-grid,
  .module-section {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: auto;
  }

  h1 {
    max-width: 13ch;
    font-size: 48px;
  }

  .status-grid,
  .proof-grid,
  .legend-grid,
  .evidence-layout {
    grid-template-columns: 1fr 1fr;
  }

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

  .media-card.context-wide,
  .media-card.proof-surface,
  .media-card.readiness-proof {
    grid-column: span 2;
  }

  .media-card.tall {
    grid-column: span 1;
  }

  .media-card.readiness-proof {
    grid-template-columns: 1fr;
  }

  .media-card.readiness-proof .zoom-link img {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .nav-links a {
    text-align: center;
  }

  .nav-links a:last-child {
    grid-column: 1 / -1;
  }

  .hero-grid {
    padding-top: 24px;
  }

  .hero-copy,
  .proof-card {
    padding: 22px;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 28px;
  }

  .dek,
  .section-heading p,
  .proof-card p,
  .diagram-panel figcaption {
    font-size: 16px;
  }

  .status-grid,
  .proof-grid,
  .media-grid,
  .legend-grid,
  .evidence-layout,
  .kv-grid {
    grid-template-columns: 1fr;
  }

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

  .media-card.context-wide,
  .media-card.proof-surface,
  .media-card.readiness-proof,
  .media-card.tall {
    grid-column: auto;
  }

  .media-card.tall {
    grid-row: auto;
  }

  .media-card.tall img {
    aspect-ratio: 16 / 10;
  }

  .primary-diagram img,
  .module-section .diagram-panel img {
    min-height: 260px;
  }

  .zoom-hint {
    right: 10px;
    bottom: 10px;
    padding: 6px 8px;
  }

  .lightbox {
    padding: 12px;
  }

  .boundary-table div {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .evidence-shell {
    width: calc(100% - 28px);
    margin-top: 20px;
  }

  .evidence-header,
  .evidence-layout {
    padding: 22px;
  }

  .evidence-header h1 {
    font-size: 38px;
  }

  .mini-table div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
