:root {
  color-scheme: light;
  --paper: #f6efe1;
  --paper-raised: #fffbf2;
  --sand: #ece1cb;
  --sea-900: #0e2f28;
  --sea-700: #14453a;
  --sea-500: #2e6b5a;
  --ink-muted: #4f6259;
  --terra-600: #a8431f;
  --terra-700: #8f3717;
  --terra-400: #cf6a3d;
  --terra-tint: #f7e0d3;
  --olive-700: #49521d;
  --gold-100: #f3e2b8;
  --gold-400: #d9a62e;
  --line: rgba(20, 69, 58, 0.16);
  --shadow-card: 0 1px 2px rgba(14, 47, 40, 0.06), 0 4px 16px rgba(14, 47, 40, 0.08);
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--sea-700);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
}

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

a {
  color: var(--terra-600);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--terra-700);
}

:focus-visible {
  outline: 3px solid var(--terra-600);
  outline-offset: 3px;
}

h1,
h2 {
  color: var(--sea-900);
  font-family: var(--font-display);
  letter-spacing: -0.015em;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 1.2rem + 2.6vw, 3rem);
  line-height: 1.12;
}

h2 {
  margin: 2.75rem 0 0.8rem;
  font-size: clamp(1.45rem, 1.12rem + 1vw, 1.85rem);
  line-height: 1.25;
}

h3 {
  margin: 1.5rem 0 0.5rem;
  color: var(--sea-900);
  font-size: 1.1rem;
  line-height: 1.35;
}

p,
ul,
ol {
  margin-top: 0;
}

.shell {
  width: min(100% - 2rem, 70rem);
  margin-inline: auto;
}

.prose {
  max-width: 72ch;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--sea-900);
  color: var(--paper);
  transform: translateY(-160%);
  transition: transform 0.16s ease-out;
}

.skip-link:focus {
  color: var(--paper);
  transform: translateY(0);
}

.site-header {
  background: var(--paper);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 5.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--sea-700);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.72rem;
  background: var(--sea-700);
  overflow: hidden;
}

.brand-mark::before {
  position: absolute;
  width: 1.22rem;
  height: 0.78rem;
  border: 2px solid var(--gold-100);
  border-radius: 48% 52% 44% 56%;
  background: var(--paper);
  content: "";
  transform: rotate(-8deg);
}

.brand-mark::after {
  position: absolute;
  right: 0.56rem;
  bottom: 0.72rem;
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: var(--gold-400);
  content: "";
}

.brand-copy strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.15;
}

.brand-copy small {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  color: var(--sea-700);
  font-weight: 650;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--sand);
}

.tile-strip {
  height: 0.45rem;
  background: repeating-linear-gradient(90deg, var(--sea-700) 0 24px, var(--terra-400) 24px 48px, var(--gold-400) 48px 72px, var(--sand) 72px 96px);
}

.eyebrow,
.meta-line,
.badge,
.queue-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 0.8rem;
  color: var(--terra-700);
}

.lead {
  max-width: 62ch;
  color: var(--ink-muted);
  font-size: 1.07rem;
}

.home-hero {
  display: grid;
  align-items: center;
  gap: 2rem;
  padding-block: clamp(3rem, 7vw, 6.5rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1.25rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 750;
  text-decoration: none;
  transition: color 0.16s ease-out, background-color 0.16s ease-out, border-color 0.16s ease-out, transform 0.16s ease-out;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--terra-600);
  color: #fff;
}

.btn-primary:hover {
  background: var(--terra-700);
  color: #fff;
}

.btn-secondary {
  border-color: var(--sea-700);
  color: var(--sea-700);
}

.btn-secondary:hover {
  background: var(--sea-700);
  color: var(--paper);
}

.hero-art {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background-color: var(--paper-raised);
  box-shadow: var(--shadow-card);
}

.hero-art img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-art figcaption {
  padding: 0.75rem 1rem;
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.section {
  padding-block: 3.5rem;
}

.section-sand {
  border-block: 1px solid var(--line);
  background: rgba(236, 225, 203, 0.55);
}

.evidence-legend,
.card-grid,
.quick-grid {
  display: grid;
  gap: 1rem;
}

.legend-item,
.card,
.callout,
.queue-panel,
.quick-item {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--paper-raised);
  box-shadow: var(--shadow-card);
}

.legend-item,
.quick-item {
  padding: 1rem;
}

.legend-item p,
.quick-item p {
  margin: 0.7rem 0 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.25rem 0.62rem;
  border-radius: 999px;
}

.badge-official {
  background: var(--sea-700);
  color: var(--paper);
}

.badge-report {
  background: var(--gold-100);
  color: var(--olive-700);
}

.badge-unknown {
  border: 1px dashed rgba(20, 69, 58, 0.45);
  background: var(--paper-raised);
  color: var(--ink-muted);
}

.badge-version {
  background: var(--terra-tint);
  color: var(--terra-700);
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1.4rem;
  transition: transform 0.16s ease-out, box-shadow 0.16s ease-out;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(14, 47, 40, 0.08), 0 10px 24px rgba(14, 47, 40, 0.1);
}

.card h3 {
  margin-top: 1rem;
}

.card p {
  color: var(--ink-muted);
}

.card-link {
  margin-top: auto;
  font-weight: 750;
}

.queue-panel,
.callout {
  padding: 1.35rem;
}

.queue-list,
.unknown-list,
.test-list {
  display: grid;
  gap: 0.75rem;
  padding: 0;
  list-style: none;
}

.queue-list li,
.unknown-list li,
.test-list li {
  position: relative;
  padding-left: 1.7rem;
}

.queue-list li::before,
.unknown-list li::before {
  position: absolute;
  top: 0.1rem;
  left: 0;
  color: var(--terra-600);
  content: "◇";
  font-weight: 800;
}

.test-list li::before {
  position: absolute;
  top: 0.08rem;
  left: 0;
  color: var(--sea-700);
  content: "□";
  font-family: var(--font-mono);
  font-weight: 800;
}

.page-hero {
  padding-block: 3.25rem 2rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  list-style: none;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.breadcrumb li + li::before {
  margin-right: 0.4rem;
  color: rgba(79, 98, 89, 0.65);
  content: "/";
}

.meta-line {
  margin-bottom: 1rem;
  color: var(--ink-muted);
}

.wave-rule {
  height: 1.2rem;
  margin-block: 2.5rem;
  background:
    radial-gradient(circle at 50% 100%, transparent 56%, var(--sea-500) 58% 66%, transparent 68%) 0 0 / 2.5rem 1.1rem repeat-x;
  opacity: 0.55;
}

.quick-answer {
  margin-block: 1.5rem 2.25rem;
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--terra-600);
  border-radius: 0.75rem;
  background: var(--paper-raised);
}

.quick-answer h2 {
  margin-top: 0;
}

.quick-answer ul {
  display: grid;
  gap: 0.85rem;
  padding: 0;
  list-style: none;
}

.quick-answer li {
  display: grid;
  align-items: start;
  gap: 0.65rem;
}

.toc {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(236, 225, 203, 0.5);
}

.toc h2 {
  margin-top: 0;
  font-family: var(--font-body);
  font-size: 1rem;
}

.toc ol {
  columns: 1;
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--paper-raised);
}

table {
  width: 100%;
  min-width: 41rem;
  border-collapse: collapse;
}

caption {
  padding: 1rem;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

th,
td {
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--sea-900);
  font-size: 0.9rem;
}

td:last-child,
th:last-child {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.achievement-name {
  font-family: var(--font-mono);
  font-weight: 750;
}

.achievement-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.achievement-icon {
  width: 3.5rem;
  height: 3.5rem;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
}

.footnote {
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.evidence-block {
  margin-block: 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 0.75rem;
  background: var(--paper-raised);
}

.evidence-block.report {
  border-left-color: var(--gold-400);
}

.evidence-block.unknown {
  border-left-color: var(--ink-muted);
  border-top-style: dashed;
  border-right-style: dashed;
  border-bottom-style: dashed;
}

.evidence-block.version {
  border-left-color: var(--terra-600);
  background: var(--terra-tint);
}

.source-list {
  padding-left: 1.5rem;
}

.source-list li {
  margin-bottom: 0.85rem;
}

.site-footer {
  margin-top: 4rem;
  background: var(--sea-900);
  color: var(--paper);
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
  padding-block: 2.75rem;
}

.site-footer a {
  color: var(--gold-100);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.footer-meta {
  color: rgba(246, 239, 225, 0.82);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.not-found {
  display: grid;
  min-height: 58vh;
  place-items: center;
  padding-block: 4rem;
}

.not-found-panel {
  max-width: 38rem;
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper-raised);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.consent-banner {
  position: fixed;
  z-index: 1000;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  display: grid;
  gap: 1rem;
  width: min(calc(100% - 2rem), 52rem);
  margin-inline: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper-raised);
  box-shadow: var(--shadow-card);
}

.consent-copy h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.consent-copy p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.consent-button,
.consent-preferences-button {
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--sea-700);
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.consent-button-primary {
  color: var(--paper-raised);
  background: var(--sea-700);
}

.consent-button-secondary,
.consent-preferences-button {
  color: var(--sea-700);
  background: transparent;
}

.consent-button:focus-visible,
.consent-preferences-button:focus-visible {
  outline: 3px solid var(--gold-400);
  outline-offset: 3px;
}

@media (min-width: 40rem) {
  .shell {
    width: min(100% - 3rem, 70rem);
  }

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

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

  .quick-answer li {
    grid-template-columns: max-content 1fr;
  }

  .toc ol {
    columns: 2;
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr;
  }

  .footer-meta {
    grid-column: 1 / -1;
  }

  .consent-banner {
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
    padding: 1.15rem 1.25rem;
  }
}

@media (min-width: 56.25rem) {
  .shell {
    width: min(100% - 5rem, 70rem);
  }

  .home-hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(22rem, 0.92fr);
  }

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

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

@media (max-width: 39.99rem) {
  .header-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
    padding-block: 1rem;
  }

  .site-nav {
    width: 100%;
  }

  .site-nav a {
    flex: 1;
    justify-content: center;
  }

  .brand-copy strong {
    font-size: 0.95rem;
  }

  .hero-art {
    min-height: 16rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
