:root {
  color-scheme: dark;
  --background: #12100f;
  --panel: #1c1816;
  --surface: #251e1a;
  --border: #493a30;
  --text: #f6eee5;
  --muted: #c8b9ae;
  --accent: #ffb85f;
  --soft-accent: #f9d4a1;
  --ember: #ffad96;
  --layout-max: 90rem;
  --layout-padding: 1rem;
  --layout-gap: 1.5rem;
  --header-height: 4.375rem;
  font-family: system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 5.75rem; }
body { margin: 0; color: var(--text); background: var(--background); line-height: 1.65; }
main, article, header, section, div { min-width: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .21em; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--soft-accent); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 500; line-height: 1.12; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.75rem); }
h3 { line-height: 1.3; }
code, kbd { font-family: ui-monospace, Menlo, monospace; font-size: .94em; }
code { color: var(--soft-accent); overflow-wrap: anywhere; }

.container {
  width: min(calc(100% - var(--layout-padding) * 2), var(--layout-max));
  margin-inline: auto;
}
.skip-link { position: fixed; left: 1rem; top: 1rem; z-index: 15; translate: 0 -200%; background: var(--accent); color: #1b1107; padding: .6rem .9rem; }
.skip-link:focus { translate: 0; }
.site-header { position: sticky; top: 0; z-index: 5; background: var(--background); border-bottom: 1px solid var(--border); }
.nav-shell { min-height: var(--header-height); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .65rem; padding-block: .65rem; }
.brand { display: inline-flex; gap: .65rem; align-items: center; color: var(--text); text-decoration: none; line-height: 1.22; }
.brand img { width: 2.5rem; height: 2.5rem; }
.brand strong { display: block; font-size: .96rem; }
.brand small { color: var(--muted); font-size: .74rem; }
.site-nav { display: flex; align-items: center; flex-wrap: wrap; gap: .2rem; }
.site-nav > a:not(.button) { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .875rem; font-weight: 650; text-decoration: none; padding: .45rem .65rem; }
.site-nav > a:hover, .site-nav > a[aria-current] { color: var(--text); }
.site-nav > a[aria-current] { box-shadow: inset 0 -2px var(--accent); }
.button, .menu-toggle { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 44px; padding: .6rem .9rem; border: 1px solid transparent; border-radius: .3rem; text-decoration: none; font-size: .875rem; font-weight: 740; line-height: 1.3; }
.menu-toggle { display: none; }
.primary { background: var(--accent); color: #211308; }
.primary:hover { background: #ffd196; }
.secondary, .menu-toggle { background: var(--panel); border-color: var(--border); color: var(--text); }
.secondary:hover, .menu-toggle:hover { border-color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: .65rem; }

.hero {
  background: radial-gradient(ellipse at 78% 32%, #2c2119, transparent 65%), var(--background);
  border-bottom: 1px solid var(--border);
}
.hero-grid { display: grid; gap: 1.6rem; padding-block: 2.25rem; }
.hero-copy { align-self: center; }
.kicker { color: var(--soft-accent); font-size: .72rem; text-transform: uppercase; font-weight: 720; letter-spacing: .13em; }
.hero h1 { font-size: clamp(3rem, 9vw, 7rem); letter-spacing: -.06em; line-height: .97; max-width: 11ch; margin: .65rem 0 1rem; }
.hero h1 em { font-weight: inherit; color: var(--accent); }
.hero-lead { max-width: 42ch; color: var(--text); font-size: clamp(1.03rem, 2.15vw, 1.27rem); margin-bottom: 1.4rem; }
.hero-meta { color: var(--muted); font-size: .83rem; margin-top: 1.15rem; }
.hero-meta a { color: inherit; }
.first-round { border: 1px solid var(--border); border-radius: .4rem; background: var(--panel); overflow: hidden; box-shadow: 0 1.2rem 3rem #0005; }
.first-round img { width: 100%; }
.first-round figcaption { padding: .4rem .9rem; color: var(--muted); font-size: .72rem; border-bottom: 1px solid var(--border); }
.first-round-copy { padding: 1rem 1.15rem 1.1rem; }
.first-round h2 { font-size: 1.45rem; }
.first-round ol { margin: .55rem 0 0; padding-left: 1.25rem; color: var(--muted); font-size: .9rem; }
.first-round li { padding-left: .2rem; }
.first-round li::marker { color: var(--accent); font-weight: 700; }
.home-section { padding-block: clamp(2.1rem, 5vw, 4.2rem); }
.section-heading { display: flex; gap: .8rem 2rem; align-items: baseline; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1.25rem; }
.section-heading p { color: var(--muted); font-size: .9rem; }
.route-grid, .prep-grid { display: grid; gap: 1rem; }
.route-card, .prep-panel { padding: 1.25rem; border: 1px solid var(--border); border-radius: .3rem; background: var(--panel); }
.route-card { display: flex; flex-direction: column; align-items: start; text-decoration: none; color: var(--text); }
.route-card:hover { border-color: var(--accent); background: var(--surface); }
.route-card h3, .prep-panel h3 { margin-block: .45rem; font-size: 1.2rem; }
.route-card p, .prep-panel p { color: var(--muted); font-size: .93rem; margin-bottom: 1rem; }
.route-link { color: var(--accent); margin-top: auto; font-size: .9rem; font-weight: 680; }
.event-label { color: var(--ember); }
.preparation { border-block: 1px solid var(--border); background: #171311; }
.text-link { font-weight: 650; }
.source-strip { display: flex; justify-content: space-between; gap: .6rem 2rem; flex-wrap: wrap; padding-block: 1.4rem; font-size: .86rem; color: var(--muted); }

.article-shell { padding-block: clamp(1.75rem, 5vw, 3.5rem); }
.article-center { width: min(100%, 58rem); margin-inline: auto; }
.empty-rail { display: none; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .55rem; font-size: .8rem; color: var(--muted); margin-bottom: 1.35rem; }
.article-title h1 { font-size: clamp(2.4rem, 6vw, 4.25rem); letter-spacing: -.045em; overflow-wrap: anywhere; }
.article-title p { margin-top: .85rem; font-size: 1.06rem; max-width: 65ch; color: var(--muted); }
.article-title .review-date { color: var(--soft-accent); font-size: .78rem; }
.contents { margin-block: 1.6rem; padding: .8rem 1rem; border: 1px solid var(--border); border-radius: .35rem; }
.contents h2 { font: 700 .86rem/1.6 system-ui, sans-serif; }
.contents ul { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; list-style: none; margin: .35rem 0 0; padding: 0; font-size: .86rem; }
.prose { margin-top: 1.65rem; }
.prose h2 { margin-top: 2.2rem; margin-bottom: .75rem; font-size: clamp(1.55rem, 3vw, 2.15rem); }
.prose h3 { margin-top: 1.5rem; margin-bottom: .65rem; }
.prose > p, .prose > ol, .prose > ul { max-width: 76ch; }
.prose > p + p { margin-top: .8rem; }
.prose li + li { margin-top: .65rem; }
.prose ol, .prose ul { padding-left: 1.35rem; }
.answer, .note { background: var(--panel); border: 1px solid var(--border); padding: 1rem 1.15rem; border-radius: .3rem; }
.answer { border-left: 3px solid var(--accent); }
.note { margin-block: 1.2rem; color: var(--muted); }
.table-wrap { overflow-x: auto; margin-block: 1rem; border: 1px solid var(--border); border-radius: .3rem; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th, td { padding: .75rem .8rem; vertical-align: top; border-bottom: 1px solid var(--border); }
thead th { background: var(--surface); }
tr:last-child td, tr:last-child th[scope=row] { border-bottom: 0; }
.codes-grid { display: grid; gap: .75rem; margin-block: 1rem; }
.code-card { display: grid; gap: .3rem .8rem; background: var(--panel); border: 1px solid var(--border); border-radius: .35rem; padding: .9rem 1rem; }
.code-card h3 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.code-card p { margin: 0; }
.code-status { color: var(--muted); font-size: .85rem; }
.copy-button { justify-self: start; margin-top: .25rem; }
.copy-result { min-height: 1.65rem; margin-block: .75rem; color: var(--soft-accent); }
.article-sources, .article-related { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.article-sources h2 { font-size: 1.5rem; }
.article-sources ul { padding-left: 1.15rem; }
.article-related { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; }
.site-footer { background: var(--panel); border-top: 1px solid var(--border); }
.footer-grid { display: grid; gap: 1.4rem; padding-block: 2rem; }
.footer-grid p { margin-top: .65rem; color: var(--muted); max-width: 32ch; font-size: .84rem; }
.footer-grid nav h2 { font: 700 .82rem/1.6 system-ui, sans-serif; margin-bottom: .45rem; }
.footer-grid nav a { display: block; min-height: 32px; padding-block: .15rem; color: var(--muted); font-size: .87rem; }
.analytics-settings { margin-block: 1rem; }

@media (min-width: 37.5rem) {
  :root { --layout-padding: 1.5rem; }
  .route-grid, .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .prep-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .code-card { grid-template-columns: 1fr auto; }
  .code-card .copy-button { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
}
@media (min-width: 54rem) {
  .hero-grid { grid-template-columns: 1.04fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; padding-block: clamp(2.5rem, 5vw, 4.6rem); }
  .nav-play { margin-left: .55rem; }
}
@media (min-width: 80rem) {
  .article-shell { display: grid; grid-template-columns: 12.5rem minmax(0, 1fr) 17rem; column-gap: var(--layout-gap); align-items: start; }
  .article-center { grid-column: 2; width: 100%; }
  .empty-rail { display: block; }
}
@media (max-width: 53.999rem) {
  .site-nav { flex-basis: 100%; }
  html[data-interactive] .menu-toggle { display: inline-flex; }
  html[data-interactive] .site-nav:not(.is-open) { display: none; }
  .site-nav.is-open { display: grid; align-items: stretch; padding-bottom: .5rem; }
  .site-nav.is-open [aria-current] { box-shadow: inset 2px 0 var(--accent); }
}
