/* CGN // Fallout 76: Appalachian field guide */
:root {
  --bg: #12171c;
  --bg-2: #161d23;
  --panel: #1a2229;
  --panel-2: #202a33;
  --line: #2b3742;
  --line-2: #3b4a57;
  --text: #ebe6d9;
  --text-2: #bdb7a8;
  --muted: #938e82;
  --yellow: #f0bf3a;
  --yellow-dim: #9c7a20;
  --blue: #79b2e4;
  --blue-deep: #1f4b75;
  --green: #72dd90;
  --paper: #e9dec3;
  --paper-ink: #2b251a;
  --danger: #e57a66;
  --radius: 6px;
  --shell: 1180px;
  --font-head: 'Oswald', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --font-body: 'IBM Plex Sans', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', Consolas, 'Courier New', monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }

/* Scrollbars: dark track on the page background, Vault-Tec gold thumb. Chromium and Safari draw it with
   ::-webkit-scrollbar (which allows the hover state); the standard properties are used only where that
   pseudo-element doesn't exist (Firefox), because Chromium ignores ::-webkit-scrollbar once they are set. */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); border-left: 1px solid var(--line); }
::-webkit-scrollbar-track:horizontal { border-left: 0; border-top: 1px solid var(--line); }
::-webkit-scrollbar-thumb { min-height: 40px; min-width: 40px; background: var(--yellow-dim); border: 2px solid var(--bg); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active { background: var(--yellow); }
::-webkit-scrollbar-corner { background: var(--bg); }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: var(--yellow-dim) var(--bg); }
}
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.03rem/1.62 var(--font-body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: #a9d0f3; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; color: #f6f1e4; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 700; }
h2 { font-size: clamp(1.45rem, 2.3vw, 1.85rem); }
h3 { font-size: 1.22rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: .3em; }
strong { color: #f6f1e4; font-weight: 600; }
small { font-size: .88rem; }
.shell { width: min(100% - 40px, var(--shell)); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; background: var(--yellow); color: #111; font-weight: 700; border-radius: var(--radius); text-decoration: none; }
.skip:focus { top: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(18, 23, 28, .96); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 22px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex: none; }
.brand .crest { width: 38px; height: 38px; }
.brand strong { display: block; font-family: var(--font-head); font-size: 1.2rem; letter-spacing: .03em; text-transform: uppercase; line-height: 1.1; }
.brand small { display: block; color: var(--muted); font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }
.nav { display: flex; flex-wrap: wrap; gap: 2px; margin-left: auto; }
.nav a { color: var(--text-2); text-decoration: none; padding: 8px 11px; border-radius: var(--radius); font-weight: 500; font-size: .96rem; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a[aria-current="page"] { color: var(--yellow); box-shadow: inset 0 -2px 0 var(--yellow); border-radius: 0; }
.menu-btn { display: none; margin-left: auto; min-height: 44px; padding: 0 16px; background: var(--panel); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius); font: 600 .95rem var(--font-body); cursor: pointer; }

/* ---------- page top ---------- */
.hero { position: relative; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #151c22, var(--bg)) ; overflow: hidden; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: 32px; align-items: start; padding: 34px 0 30px; }
.eyebrow { display: inline-block; margin: 0 0 10px; font: 500 .8rem/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); }
.lede { font-size: 1.12rem; color: var(--text-2); max-width: 37.2em; }  /* em, not ch: the box must not change when the web font replaces the fallback */
.page-top { position: relative; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #151c22, var(--bg)); overflow: hidden; }
.page-top .shell { position: relative; padding: 28px 0 22px; }
.page-top h1 { margin-bottom: .3em; }
.page-top .lede { margin-bottom: .7em; }
.page-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; color: var(--muted); font-size: .9rem; }
.stamp { display: inline-block; padding: 3px 9px; border: 2px solid var(--paper); color: var(--paper); font: 600 .8rem/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; transform: rotate(-1.5deg); border-radius: 3px; }

.quick-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius); font-weight: 600; text-decoration: none; border: 1px solid var(--line-2); color: var(--text); background: var(--panel); }
.btn:hover { background: var(--panel-2); color: var(--text); border-color: var(--yellow-dim); }
.btn.primary { background: var(--yellow); color: #17130a; border-color: var(--yellow); }
.btn.primary:hover { background: #ffd35e; color: #17130a; }

.hero-solo { grid-template-columns: minmax(0, 620px); padding: 44px 0 40px; }

/* high-resolution key art: a framed band above the heading. The whole composition stays visible (no fade, no overlay);
   object-position comes from the page (--pos-d desktop, --pos-m phones). */
.band-wrap { width: min(100% - 40px, var(--shell)); margin-inline: auto; padding-top: 22px; }
.art-band { aspect-ratio: 3.6 / 1; overflow: hidden; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel); }
.art-band picture { display: block; width: 100%; height: 100%; }
.art-band img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos-d, 50% 50%); }
.hero.has-band .art-band { aspect-ratio: 3.3 / 1; }
.hero.has-band .hero-solo { padding-top: 26px; }
.page-top.has-band .shell { padding-top: 20px; }
@media (max-width: 1000px) {
  .art-band, .hero.has-band .art-band { aspect-ratio: 2.6 / 1; }
}
@media (max-width: 640px) {
  .band-wrap { padding-top: 16px; }
  .art-band, .hero.has-band .art-band { aspect-ratio: 2 / 1; }
  .art-band img { object-position: var(--pos-m, 50% 50%); }
  .hero.has-band .hero-solo { padding-top: 20px; }
}
/* 1.9:1 masters (page headers, 404): a taller band so the composition keeps its height. Phones show nearly the whole picture. */
.band-tall .art-band { aspect-ratio: 2.8 / 1; }
@media (max-width: 1000px) { .band-tall .art-band { aspect-ratio: 2.4 / 1; } }
@media (max-width: 640px) { .band-tall .art-band { aspect-ratio: 1.9 / 1; } }
.status-band { background: #0f1418; border-bottom: 1px solid var(--line); }
.status-band .status-panel { border: 0; border-radius: 0; box-shadow: none; background: none; padding: 14px 0 12px; }
.status-band .readout { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 22px; }
.status-band .readout div { display: block; border-top: 0; border-left: 1px dashed var(--line-2); padding: 2px 0 2px 16px; }
.status-band .readout div:first-child { border-left: 0; padding-left: 0; }
.status-band .readout dt { margin-bottom: 2px; }
.status-band .readout-title { display: none; }
.shot { margin: 0 0 18px; }
.shot img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.shot figcaption { margin-top: 6px; color: var(--muted); font-size: .84rem; }
.shot .credit { white-space: nowrap; }

/* ---------- status readout ---------- */
.status-panel { background: #0f1418; border: 1px solid var(--line-2); border-top: 3px solid var(--green); border-radius: var(--radius); padding: 16px 18px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.readout-title { font: 500 .82rem/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--green); margin: 0 0 10px; }
.readout { margin: 0; }
.readout div { display: grid; grid-template-columns: 116px 1fr; gap: 12px; padding: 8px 0; border-top: 1px dashed var(--line-2); }
.readout div:first-child { border-top: 0; }
.readout dt { font: 500 .8rem/1.5 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.readout dd { margin: 0; font-weight: 600; color: var(--text); }
.readout dd span { display: block; font-weight: 400; color: var(--text-2); font-size: .9rem; }
.checked { margin: 10px 0 0; color: var(--muted); font-size: .86rem; }

/* ---------- sections ---------- */
.section { padding: 34px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; margin-bottom: 16px; }
.section-head h2 { margin: 0; position: relative; padding-left: 16px; }
.section-head h2::before { content: ''; position: absolute; left: 0; top: .18em; bottom: .18em; width: 5px; background: var(--yellow); border-radius: 2px; }
.section-head p { margin: 0; color: var(--muted); font-size: .92rem; }
.prose { max-width: 76ch; }
.prose h2 { margin-top: 1.3em; }
.prose h3 { margin-top: 1.2em; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
.split-lead { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 30px; }
.split > *, .split-lead > * { min-width: 0; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }

/* destinations: compact rows */
.dest-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 26px; margin: 0; padding: 0; list-style: none; }
.dest-grid li { margin: 0; border-top: 1px solid var(--line); }
.dest-grid a { display: block; padding: 12px 0; text-decoration: none; color: var(--text-2); }
.dest-grid a strong { display: block; color: var(--text); font-family: var(--font-head); font-size: 1.12rem; font-weight: 600; letter-spacing: .02em; }
.dest-grid a:hover strong { color: var(--yellow); }
.dest-grid a span { font-size: .94rem; }

/* lists */
.plain-list { list-style: none; padding: 0; margin: 0 0 1em; }
.plain-list > li { padding: 10px 0; border-top: 1px solid var(--line); margin: 0; }
.plain-list > li:first-child { border-top: 0; padding-top: 0; }
.dash-list { padding-left: 1.1em; }
.dash-list li { padding-left: 2px; }
.fact-list { margin: 0; }
.fact-list div { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); }
.fact-list div:first-child { border-top: 0; }
.fact-list dt { font-weight: 600; color: var(--text); }
.fact-list dd { margin: 0; color: var(--text-2); }

/* events */
.event-list { list-style: none; margin: 0 0 8px; padding: 0; }
.ev { display: grid; grid-template-columns: 138px minmax(0, 1fr) auto; gap: 4px 14px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); margin: 0; }
.ev:first-child { border-top: 0; }
.ev time { font: 500 .88rem/1.5 var(--font-mono); color: var(--text-2); }
.ev-title { font-weight: 600; }
.ev-note { grid-column: 2 / -1; color: var(--text-2); font-size: .92rem; }
.ev-state { font: 500 .78rem/1.4 var(--font-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ev.is-now .ev-state { color: var(--green); }
.ev.is-now .ev-state::before { content: 'On now'; }
.ev.is-next .ev-state::before { content: 'Next'; }
.ev.is-past { display: none; }
.event-list.compact .ev { grid-template-columns: 132px minmax(0, 1fr) auto; }
.month { font-size: 1.05rem; color: var(--text-2); margin: 18px 0 4px; font-family: var(--font-mono); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }

/* news */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { padding: 10px 0; border-top: 1px solid var(--line); margin: 0; }
.news-list li:first-child { border-top: 0; padding-top: 0; }
.news-list time { display: block; font: 500 .82rem/1.4 var(--font-mono); color: var(--muted); }
.news-list a { font-weight: 600; text-decoration: none; }
.news-list a:hover { text-decoration: underline; }
.news-list p { margin: 3px 0 0; color: var(--text-2); font-size: .92rem; }
.feed-status { color: var(--muted); font-size: .88rem; margin: 8px 0 0; }

/* tags, labels */
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font: 500 .76rem/1.6 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--text-2); vertical-align: 2px; white-space: nowrap; }
.tag-official { border-color: #3f6f9d; color: var(--blue); }
.tag-community { border-color: #7a5a2a; color: #e3b064; }
.tag-cgn { border-color: var(--line-2); color: var(--text-2); }
.tag-test { border-color: #7b6a2a; color: var(--yellow); }
.tag-live { border-color: #2f6a44; color: var(--green); }
.label-key { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 16px; padding: 10px 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); font-size: .9rem; color: var(--text-2); }

/* note boxes */
.note { margin: 0 0 16px; padding: 12px 16px; background: var(--bg-2); border: 1px solid var(--line); border-left: 4px solid var(--blue-deep); border-radius: var(--radius); }
.note.warn { border-left-color: var(--yellow-dim); }
.note.test { border-left-color: var(--yellow); }
.note p:last-child { margin-bottom: 0; }
.paper { background: var(--paper); color: var(--paper-ink); border-radius: var(--radius); padding: 16px 18px; }
.paper h3, .paper strong { color: #1d180f; }
.paper a { color: #1f4b75; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.data-table caption { text-align: left; padding: 10px 14px; color: var(--muted); font-size: .88rem; caption-side: bottom; border-top: 1px solid var(--line); }
.data-table th, .data-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.data-table thead th { border-top: 0; background: var(--panel); font: 600 .82rem/1.35 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.data-table tbody th { font-weight: 600; color: var(--text); }
.data-table td { color: var(--text-2); }
.data-table tbody tr:hover { background: rgba(255,255,255,.015); }
.num { font-family: var(--font-mono); white-space: nowrap; }

/* folds (details) */
.fold { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin: 0 0 10px; }
.fold > summary { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 44px 10px 16px; cursor: pointer; list-style: none; position: relative; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--muted); line-height: 1; }
.fold[open] > summary::after { content: '\2212'; }
.fold > summary:hover { background: var(--panel-2); }
.fold > summary h3 { margin: 0; font-size: 1.12rem; }
.fold > summary .sum-note { color: var(--text-2); font-size: .92rem; }
.fold-body { padding: 4px 16px 14px; border-top: 1px solid var(--line); }
.fold-body > :first-child { margin-top: 12px; }
.sum-stack { display: flex; flex-direction: column; min-width: 0; }

/* builds */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.filter-bar button { min-height: 40px; padding: 0 14px; background: var(--panel); color: var(--text-2); border: 1px solid var(--line-2); border-radius: 999px; font: 500 .92rem var(--font-body); cursor: pointer; }
.filter-bar button[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: #17130a; font-weight: 600; }
.build-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.pros-cons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 8px 0 10px; }
.pros-cons h4 { font: 600 .8rem/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; margin: 0 0 4px; }
.pros-cons .pros h4 { color: var(--green); }
.pros-cons .cons h4 { color: var(--danger); }
.pros-cons ul { margin: 0; padding-left: 1.1em; font-size: .95rem; }

/* toc */
.toc { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.toc li { margin: 0; }
.toc a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: .9rem; text-decoration: none; color: var(--text-2); background: rgba(26,34,41,.7); }
.toc a:hover { color: var(--text); border-color: var(--yellow-dim); }

/* footer */
.site-footer { margin-top: 20px; border-top: 1px solid var(--line); background: #0f1317; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 26px; padding: 30px 0 20px; }
.footer-name { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.footer-name .crest { width: 30px; height: 30px; }
.footer-brand p { color: var(--text-2); font-size: .94rem; }
.site-footer h2 { font: 500 .8rem/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.site-footer nav a { display: block; padding: 4px 0; color: var(--text-2); text-decoration: none; font-size: .95rem; }
.site-footer nav a:hover { color: var(--text); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 14px 0 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; }

/* 404 */
.lost { padding: 60px 0; }
.lost.has-band { padding-top: 0; border-bottom: 1px solid var(--line); }
.lost.has-band > .shell { padding-top: 26px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .nav a { padding: 8px 8px; font-size: .93rem; }
}
@media (max-width: 1000px) {
  .menu-btn { display: inline-flex; align-items: center; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; padding: 8px 20px 14px; background: #12171c; border-bottom: 1px solid var(--line-2); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 6px; min-height: 44px; font-size: 1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--yellow); padding-left: 12px; }
  .hero-grid { grid-template-columns: 1fr; gap: 22px; }
  .split, .split-lead { grid-template-columns: 1fr; gap: 26px; }
  .cols-3 { grid-template-columns: 1fr; gap: 16px; }
  .dest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .status-band .readout { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 22px; }
  .status-band .readout div:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .shell { width: min(100% - 32px, var(--shell)); }
  .header-row { min-height: 58px; }
  .hero-grid { padding: 22px 0 22px; }
  .page-top .shell { padding: 22px 0 18px; }
  .section { padding: 26px 0; }
  .dest-grid { grid-template-columns: 1fr; }
  .readout div { grid-template-columns: 1fr; gap: 2px; }
  .fact-list div { grid-template-columns: 1fr; gap: 2px; }
  .ev, .event-list.compact .ev { grid-template-columns: 1fr auto; }
  .ev time { grid-column: 1 / -1; }
  .ev-note { grid-column: 1 / -1; }
  .pros-cons { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  /* stacked tables */
  .table-wrap.stack { border: 0; overflow: visible; }
  .stack .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stack .data-table, .stack .data-table tbody, .stack .data-table tr, .stack .data-table th, .stack .data-table td { display: block; width: 100%; }
  .stack .data-table tr { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 8px; padding: 4px 0; background: var(--panel); }
  .stack .data-table th, .stack .data-table td { border-top: 0; padding: 3px 12px; }
  .stack .data-table tbody th { font-size: 1.05rem; padding-top: 8px; }
  .stack .data-table td[data-label]::before { content: attr(data-label); display: block; font: 500 .76rem/1.4 var(--font-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
  .stack .data-table caption { border-top: 0; padding: 4px 2px; }
}
@media (max-width: 640px) {
  .status-band .readout { grid-template-columns: 1fr; }
  .status-band .readout div { border-left: 0; padding-left: 0; border-top: 1px dashed var(--line-2); padding: 8px 0; }
  .status-band .readout div:first-child { border-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
