:root {
  color-scheme: dark;
  --background: #0d1017;
  --surface: #171c26;
  --surface-raised: #202736;
  --text: #f8f6f1;
  --muted: #aeb7c7;
  --border: #343d50;
  --accent: #62d8e8;
  --accent-dark: #123f49;
  --ink: #11131a;
  --measure: 72ch;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  min-width: 280px;
  margin: 0;
  background:
    radial-gradient(circle at 8% -10%, rgba(98, 216, 232, 0.13), transparent 28rem),
    var(--background);
  color: var(--text);
  font-size: 17px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 900;
}

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

.site-header,
.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  transform: rotate(-3deg);
  border-radius: 10px;
  background: var(--accent);
  color: var(--ink);
  font-size: 22px;
  font-weight: 950;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-header nav a {
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.site-header nav a:hover {
  background: var(--surface-raised);
}

.site-header .app-link,
.primary-cta,
.article-cta > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 18px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 950;
  line-height: 1.2;
  text-decoration: none;
}

.hub-shell,
.article-shell {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.hub-hero {
  display: grid;
  justify-items: start;
  min-height: 460px;
  padding: clamp(72px, 12vw, 140px) 0 80px;
  align-content: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  line-height: 1.4;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  text-wrap: balance;
}

h1 {
  max-width: 18ch;
  font-size: clamp(2.45rem, 8vw, 5.4rem);
  letter-spacing: -0.045em;
}

h2 {
  margin-top: 2.6em;
  font-size: clamp(1.55rem, 4vw, 2.2rem);
  letter-spacing: -0.025em;
}

h3 {
  margin-top: 2em;
  font-size: 1.25rem;
}

.dek {
  max-width: 62ch;
  margin: 22px 0 28px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2.5vw, 1.3rem);
  line-height: 1.55;
}

.guide-grid,
.editorial-standards {
  padding: 28px 0 88px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2,
.editorial-standards > h2 {
  margin-top: 0;
}

.guide-card {
  display: grid;
  gap: 14px;
  max-width: 860px;
  padding: clamp(24px, 5vw, 40px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.25);
}

.guide-card h2,
.guide-card p {
  margin: 0;
}

.guide-card h2 {
  font-size: clamp(1.45rem, 4vw, 2rem);
}

.guide-card h2 a {
  color: var(--text);
}

.guide-card > p:not(.eyebrow, .card-meta) {
  max-width: var(--measure);
  color: var(--muted);
}

.card-meta,
.article-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.standards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.standards-grid p {
  margin: 0;
  padding: 22px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
}

.source-status-table {
  max-width: 100%;
  margin-top: 28px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.source-status-table table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.5;
}

.source-status-table th,
.source-status-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.source-status-table thead th {
  background: var(--surface-raised);
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.source-status-table tbody th {
  min-width: 180px;
  color: var(--text);
}

.source-status-table tbody td:nth-child(2) {
  min-width: 190px;
  color: var(--accent);
}

.source-status-table tr:last-child > * {
  border-bottom: 0;
}

.source-status-table tr[data-source-state="conditional"] td:nth-child(2) {
  color: #ffd166;
}

.source-status-table tr[data-source-state="inactive"] td:nth-child(2) {
  color: #ff9c9c;
}

.article-shell {
  max-width: 880px;
  padding: 28px 0 90px;
}

.breadcrumbs {
  display: flex;
  gap: 10px;
  overflow: hidden;
  margin: 8px 0 44px;
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.breadcrumbs [aria-current="page"] {
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.article-header h1 {
  max-width: 20ch;
  font-size: clamp(2.25rem, 7vw, 4.5rem);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 22px;
}

.topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.topics span {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
}

.article-body {
  max-width: var(--measure);
  padding-top: 24px;
}

.article-body p,
.article-body li {
  color: #e3e2de;
}

.article-body strong {
  color: var(--text);
}

.article-body ul,
.article-body ol {
  padding-left: 1.4em;
}

.article-body li + li {
  margin-top: 0.42em;
}

.sources,
.article-cta {
  max-width: var(--measure);
  margin-top: 54px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.sources h2 {
  margin-top: 0;
  font-size: 1.45rem;
}

.sources ul {
  margin-bottom: 0;
  padding-left: 1.3em;
}

.article-cta {
  border-color: var(--accent);
  background: var(--accent-dark);
}

.article-cta p:first-child {
  margin-top: 0;
  font-size: 1.15rem;
}

.article-cta > a {
  margin-top: 8px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .site-header {
    align-items: flex-start;
    padding: 14px 0;
  }

  .site-header nav {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .site-header nav > a:first-child {
    text-align: center;
  }

  .brand strong {
    max-width: 9ch;
    line-height: 1.1;
  }

  .hub-hero {
    min-height: 390px;
    padding-top: 58px;
  }

  .standards-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }
}

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

@media print {
  :root {
    color-scheme: light;
  }

  body {
    background: #fff;
    color: #111;
  }

  .site-header,
  .site-footer,
  .article-cta,
  .skip-link {
    display: none;
  }

  .article-body p,
  .article-body li,
  .dek,
  .article-meta {
    color: #222;
  }
}
