:root {
  color-scheme: light;
  --theme-light: 4 82% 43%;
  --theme-light-highlight: 4 86% 55%;
  --theme-dark: 4 86% 55%;
  --theme-dark-highlight: 4 92% 66%;
  --bg: hsl(42 24% 97%);
  --surface: hsl(0 0% 100%);
  --surface-strong: hsl(40 16% 93%);
  --surface-warm: hsl(45 32% 94%);
  --ink: hsl(210 20% 12%);
  --muted: hsl(210 10% 37%);
  --line: hsl(210 12% 84%);
  --line-strong: hsl(210 12% 65%);
  --night: hsl(210 18% 13%);
  --night-2: hsl(210 17% 20%);
  --on-dark: hsl(40 20% 98%);
  --on-dark-muted: hsl(40 10% 79%);
  --primary: hsl(var(--theme-light));
  --primary-strong: hsl(4 74% 32%);
  --primary-soft: hsl(4 70% 94%);
  --accent: hsl(43 92% 58%);
  --content-width: 1180px;
  --article-width: 860px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
  letter-spacing: 0;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, hsl(4 70% 95%), transparent 28rem),
    linear-gradient(180deg, var(--bg), hsl(42 20% 99%) 26rem);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img,
picture,
svg,
iframe { display: block; max-width: 100%; }
img { height: auto; }

button,
input,
select,
textarea { color: inherit; font: inherit; letter-spacing: 0; }
button { cursor: pointer; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary-strong); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
blockquote { margin-top: 0; }

h1,
h2,
h3 {
  max-width: 100%;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
h1 { margin-bottom: 1rem; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.02; }
h2 { margin-bottom: .85rem; font-size: clamp(1.55rem, 2.5vw, 2.15rem); }
h3 { margin-bottom: .65rem; font-size: 1.18rem; line-height: 1.25; }

::selection { background: var(--primary); color: hsl(0 0% 100%); }

.skip-link {
  position: fixed;
  z-index: 100;
  top: .75rem;
  left: .75rem;
  padding: .65rem .9rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--night);
  color: var(--on-dark);
  font-weight: 800;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 20px;
  padding: 0 max(16px, calc((100% - var(--content-width)) / 2));
  border-bottom: 1px solid hsl(210 12% 78%);
  background: hsl(42 20% 99% / .96);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand__mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 8px;
  background: var(--night);
  color: var(--accent);
  font-size: .82rem;
  font-weight: 950;
  line-height: 1;
}
.brand > span:last-child { display: grid; min-width: 0; line-height: 1.2; }
.brand strong { color: var(--ink); font-size: 1rem; white-space: nowrap; }
.brand small {
  margin-top: .2rem;
  max-width: 62ch;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 760;
  white-space: nowrap;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
}
.menu-button:hover,
.menu-button[aria-expanded="true"] { border-color: var(--primary); background: var(--surface-strong); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  margin-left: auto;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 780;
}
.site-nav a,
.locale-link {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 780;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a { display: inline-flex; align-items: center; }
.site-nav a:hover,
.site-nav a[aria-current="page"],
.locale-link:hover { background: var(--night); color: var(--on-dark); }
.locale-link { border: 0; font-size: .82rem; }

.page-shell,
.site-main { width: 100%; min-height: 100vh; margin: 0; padding: 0; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .98fr) minmax(340px, 1.02fr);
  gap: 28px;
  align-items: stretch;
  padding: 34px max(16px, calc((100% - var(--content-width)) / 2)) 30px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(135deg, var(--night), var(--night-2) 58%, hsl(4 58% 24%));
  color: var(--on-dark);
}
.hero > div:first-child { display: grid; align-content: center; gap: 18px; min-width: 0; padding-block: 10px; }
.hero__eyebrow,
.eyebrow,
.section-label,
.status-label {
  width: fit-content;
  margin-bottom: 0;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.hero__eyebrow {
  padding: 5px 10px;
  border: 1px solid hsl(0 0% 100% / .22);
  border-radius: 999px;
  background: hsl(0 0% 100% / .08);
  color: var(--on-dark-muted);
}
.hero h1 { max-width: 15ch; margin: 0; color: var(--on-dark); font-size: clamp(2.45rem, 5vw, 5.2rem); line-height: .98; }
.hero__summary,
.page-intro { max-width: 68ch; margin-bottom: 0; color: var(--on-dark-muted); font-size: 1.08rem; }
.hero__actions,
.hero-actions,
.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 0; }

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 850;
  text-align: center;
}
.button:hover { border-color: var(--primary-strong); color: var(--primary-strong); }
.button--primary,
.button-primary { border-color: var(--primary); background: var(--primary); color: hsl(0 0% 100%); }
.button--primary:hover,
.button-primary:hover { border-color: var(--accent); background: var(--accent); color: hsl(28 100% 5%); }
.hero .button:not(.button--primary):not(.button-primary) { border-color: hsl(0 0% 100% / .38); background: transparent; color: var(--on-dark); }
.hero .button:not(.button--primary):not(.button-primary):hover { background: hsl(0 0% 100% / .1); color: var(--accent); }

.hero-media {
  position: relative;
  min-width: 0;
  min-height: 310px;
  margin: 0;
  overflow: hidden;
  border: 1px solid hsl(0 0% 100% / .22);
  border-radius: 12px;
  background: var(--night-2);
}
.hero-media::after {
  position: absolute;
  right: 14px;
  bottom: 14px;
  border: 1px solid hsl(0 0% 100% / .3);
  border-radius: 999px;
  padding: 5px 10px;
  background: hsl(210 20% 10% / .76);
  color: var(--on-dark);
  content: "evidence-first guide hub";
  font-size: .82rem;
  font-weight: 850;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media figcaption { position: absolute; right: 0; bottom: 0; left: 0; padding: 8px 12px; background: hsl(210 20% 10% / .78); color: var(--on-dark-muted); font-size: .75rem; }
.hero-intel { display: grid; gap: 12px; }
.hero-intel .fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hero-intel .fact-card { min-height: 0; padding: 13px; border-color: hsl(0 0% 100% / .16); background: hsl(0 0% 100% / .08); }
.hero-intel .fact-card strong { margin-bottom: 5px; color: var(--on-dark-muted); font-size: .78rem; }
.hero-intel .fact-card span:first-of-type { color: var(--on-dark); font-weight: 900; }
.hero-intel .fact-card span:last-of-type { margin-top: 4px; color: var(--on-dark-muted); font-size: .88rem; }
.hero-routing { display: grid; gap: 8px; padding: 13px; border: 1px solid hsl(0 0% 100% / .16); border-radius: 8px; background: hsl(0 0% 100% / .08); }
.hero-routing strong { color: var(--accent); }
.routing-links { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.routing-links a { color: var(--on-dark); font-weight: 800; }
.routing-links a:hover { color: var(--accent); }
.hero .source-status { border-color: hsl(0 0% 100% / .16); background: hsl(0 0% 100% / .08); }
.hero .source-status strong { color: var(--accent); }
.hero .source-status p { color: var(--on-dark-muted); }

.section,
.card-section { width: min(calc(100% - 32px), var(--content-width)); margin-inline: auto; padding-block: 38px; }
.section__header { max-width: 760px; margin-bottom: 18px; }
.section__header h2 { margin: 0; color: var(--ink); }
.section__header p { margin: 8px 0 0; max-width: 72ch; color: var(--muted); }

.fact-grid,
.guide-grid,
.card-grid { display: grid; gap: 16px; }
.fact-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.fact-archive { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.guide-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.fact-card,
.guide-card,
.callout,
.source-status,
.code-status,
.guide-section,
.content-sidebar > nav,
.content-sidebar > section { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.fact-card,
.guide-card,
.guide-section { padding: 16px; }
.fact-card { min-height: 128px; }
.fact-card strong,
.fact-card span { display: block; }
.fact-card strong { margin-bottom: 5px; color: var(--ink); font-size: 1.3rem; }
.fact-card span,
.guide-card p,
.guide-section p { color: var(--muted); }
.guide-card { display: grid; min-height: 210px; gap: 12px; align-content: start; transition: border-color .16s, transform .16s, background .16s; }
.guide-card:hover { border-color: var(--primary-strong); background: hsl(42 26% 98%); transform: translateY(-2px); }
.guide-card h3 { margin: 0; color: var(--ink); }
.guide-card p { margin: 0; }
.guide-card > :last-child { margin-top: auto; }
.card-status { width: fit-content; margin: 0; color: var(--primary-strong) !important; font-size: .78rem; font-weight: 850; }
.card-link { width: fit-content; color: var(--primary-strong); font-weight: 900; }
.callout,
.source-status,
.code-status { padding: 16px; }
.callout p:last-child,
.source-status p:last-child,
.code-status p:last-child { margin-bottom: 0; }
.callout { border-color: var(--line-strong); background: var(--surface-warm); }
.source-status,
.code-status { background: var(--surface-strong); }
.source-status strong,
.code-status strong { color: var(--primary-strong); }
.source-status p,
.code-status p { color: var(--muted); }

.check-list,
.source-list { display: grid; gap: 10px; margin: 0; padding-left: 1.25rem; color: var(--ink); }
.source-list { padding-left: 0; list-style: none; }
.source-list li { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.source-list a,
.article-body a:not(.button) { color: var(--primary-strong); font-weight: 850; }

.table-scroll { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; -webkit-overflow-scrolling: touch; }
table { width: 100%; min-width: 620px; border-collapse: collapse; background: var(--surface); }
th,
td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--night); color: var(--on-dark); font-size: .88rem; }
td { color: var(--ink); }
tr:last-child td,
tr:last-child th { border-bottom: 0; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.article-body { display: grid; max-width: var(--article-width); gap: 22px; }
.article-body > section { display: grid; gap: 8px; }
.article-body h2 { margin: 0; }
.article-body h3 { margin: 8px 0 0; }
.article-body p,
.article-body li { color: var(--ink); }
.article-body p { margin-bottom: 0; }
.article-body ul,
.article-body ol { padding-left: 1.25rem; }
.content-sidebar { position: sticky; top: 88px; display: grid; gap: 12px; }
.content-sidebar > nav,
.content-sidebar > section { padding: 14px 16px; }
.content-sidebar h2,
.content-sidebar h3 { margin: 0 0 10px; color: var(--ink); font-size: 1rem; }
.content-sidebar ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.content-sidebar a { color: var(--muted); font-size: .9rem; font-weight: 700; }
.content-sidebar a:hover { color: var(--primary-strong); }

.compact-grid .guide-card,
.media-grid .guide-card { min-height: 230px; }
.link-list { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: auto 0 0; padding: 0; list-style: none; }
.link-list a { color: var(--primary-strong); font-weight: 850; }
.screenshot-band { display: grid; grid-template-columns: minmax(320px, 1.15fr) minmax(0, .85fr); gap: 28px; align-items: center; }
.evidence-figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.evidence-figure img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.evidence-figure figcaption { padding: 10px 12px; color: var(--muted); font-size: .8rem; }
.faq-list { display: grid; border-top: 1px solid var(--line); }
.faq-list details { padding: 16px 2px; border-bottom: 1px solid var(--line); }
.faq-list summary { color: var(--ink); font-size: 1.05rem; font-weight: 850; cursor: pointer; }
.faq-list p { max-width: 76ch; margin: 10px 0 0; color: var(--muted); }
.faq-list a { color: var(--primary-strong); font-weight: 850; }

.site-footer { margin-top: 42px; border-top: 1px solid var(--line); background: var(--night); }
.site-footer__inner { display: flex; width: min(calc(100% - 32px), var(--content-width)); justify-content: space-between; gap: 20px; margin-inline: auto; padding-block: 28px; color: var(--on-dark-muted); font-size: .9rem; }
.site-footer p { max-width: 60ch; margin: 0; }
.site-footer strong { color: var(--on-dark); }
.footer-nav,
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 16px; align-content: start; justify-content: flex-end; }
.footer-nav a,
.footer-links a { color: var(--on-dark-muted); font-size: .82rem; }
.footer-nav a:hover,
.footer-links a:hover { color: var(--accent); }

.hero--text {
  display: block;
  width: min(calc(100% - 32px), var(--content-width));
  margin-inline: auto;
  padding: 38px 0 10px;
  background: transparent;
  color: var(--ink);
}
.hero--text > div {
  width: min(100%, var(--article-width));
  margin-inline: 0;
  padding: 0;
}
.hero--text > div:first-child { display: grid; gap: 12px; align-content: start; }
.hero--text .hero__eyebrow {
  border-color: var(--line);
  background: var(--primary-soft);
  color: var(--primary-strong);
}
.hero--text h1 { max-width: 18ch; color: var(--ink); font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.02; }
.hero--text .hero__summary { color: var(--muted); }

.legal-page > section {
  display: grid;
  width: min(100%, var(--article-width));
  gap: 8px;
  margin: 28px 0 0;
}

.legal-page > section h2 { margin: 0; }
.legal-page > section p { margin: 0; color: var(--ink); }

@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(280px, .72fr); }
}

@media (max-width: 920px) {
  .site-header { min-height: auto; flex-wrap: wrap; padding-block: 14px; }
  .menu-button { display: inline-flex; }
  .site-nav { width: 100%; justify-content: flex-start; margin-left: 0; overflow-x: auto; padding-bottom: 3px; }
  .hero,
  .article-layout,
  .screenshot-band { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; font-size: 2.7rem; }
  .hero-media { min-height: 230px; }
  .content-sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 759px) {
  .site-header { position: relative; }
  .brand small { max-width: calc(100vw - 90px); overflow: hidden; text-overflow: ellipsis; }
  .site-nav { display: none; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
  .site-nav[data-open="true"],
  .site-nav.is-open { display: flex; }
  .site-nav a { flex: 1 1 calc(50% - 4px); justify-content: center; }
  .locale-link { flex: 1 1 100%; justify-content: flex-start; padding-left: 0; }
  .section,
  .site-footer__inner { width: min(calc(100% - 22px), var(--content-width)); }
  .section { padding-block: 28px; }
  .button { width: 100%; }
  .content-sidebar { grid-template-columns: 1fr; }
  .site-footer__inner { flex-direction: column; }
  .footer-nav,
  .footer-links { justify-content: flex-start; }
}

@media (max-width: 440px) {
  .brand__mark { width: 38px; height: 38px; flex-basis: 38px; }
  .brand strong { font-size: .88rem; }
  .brand small { font-size: .68rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
