/* ==========================================================================
   GTA 6 Missions — one stylesheet, no framework. Mobile first; breakpoints at
   720px, 860px and 1024px. Dark theme with a per-chapter accent colour.
   ========================================================================== */

/* ---------- Self-hosted fonts (SIL OFL — see assets/fonts/LICENSE-*.txt) ---------- */
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff2") format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --bg: #0a0812;
  --bg-raised: #13101d;
  --bg-overlay: #1a1527;
  --bg-inset: #0e0b17;
  --line: #272038;
  --line-strong: #3a2f52;
  --text: #f4f1fb;
  --text-muted: #b8b0cc;
  --text-faint: #948bad;
  --pink: #ff2d78;
  --pink-soft: #ff8fb0;
  --amber: #fbbf24;
  --accent: var(--pink);
  --accent-soft: var(--pink-soft);
  --accent-ink: #2a0012;
  --grad: linear-gradient(120deg, #ff2d78, #ff8a3d 55%, #ffd166);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .5);
  --font-display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1200px;
  --header-h: 64px;
}
[data-accent="1"] { --accent: #22d3ee; --accent-soft: #8eeaf8; --accent-ink: #04262e; }
[data-accent="2"] { --accent: #fbbf24; --accent-soft: #fde08a; --accent-ink: #2a1d00; }
[data-accent="3"] { --accent: #f472b6; --accent-soft: #fbb6d9; --accent-ink: #33091f; }
[data-accent="4"] { --accent: #a78bfa; --accent-soft: #d2c4fd; --accent-ink: #1a0f3d; }
[data-accent="5"] { --accent: #fb7185; --accent-soft: #fdb4bf; --accent-ink: #33070f; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: dark; scrollbar-color: var(--line-strong) var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 85% -8%, rgba(255, 45, 120, .16), transparent 65%),
    radial-gradient(900px 480px at -10% 12%, rgba(34, 211, 238, .09), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
  -webkit-tap-highlight-color: rgba(255, 255, 255, .07);
}
a, button, summary { touch-action: manipulation; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: calc(var(--header-h) + 20px); }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; letter-spacing: .005em; margin: 0 0 .4em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 1.7rem + 2.6vw, 3.9rem); }
h2 { font-size: clamp(1.75rem, 1.4rem + 1.1vw, 2.4rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
li { margin: 0; }
button { font-family: inherit; }

a { color: var(--accent-soft); text-decoration: none; }
a:hover { color: var(--text); }
p a, dd a, .footnote a, .link-list a, .section__head p a, .lead a, .reward-list a {
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-color: color-mix(in srgb, var(--accent) 50%, transparent);
  text-underline-offset: 3px;
}
p a:hover, dd a:hover, .footnote a:hover, .link-list a:hover, .section__head p a:hover, .lead a:hover, .reward-list a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Utilities ---------- */
.js-only { display: none; }
.js .js-only { display: block; }
.muted { color: var(--text-muted); }
.footnote { font-size: 14px; color: var(--text-faint); margin-top: 14px; }
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -.125em; }
.dot { margin: 0 6px; color: var(--text-faint); }
.skip-link { position: absolute; left: 12px; top: -64px; z-index: 1000; padding: 10px 16px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; color: var(--accent-ink); }

.eyebrow { font-size: 13px; text-transform: uppercase; letter-spacing: .14em; font-weight: 600; color: var(--accent-soft); margin: 0 0 12px; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.lead { font-size: 1.12rem; color: var(--text-muted); max-width: 70ch; margin: 12px 0 0; }
@media (min-width: 720px) { .lead { font-size: 1.2rem; } }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg-overlay); color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none; transition: transform .15s ease, border-color .15s ease, filter .15s ease; }
.btn:hover { border-color: var(--accent); color: var(--text); text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--grad); border-color: transparent; color: #1a0010; }
.btn--primary:hover { filter: brightness(1.06); }

.tag { display: inline-flex; align-items: center; padding: 1px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.6; color: var(--text-muted); background: var(--bg-overlay); border: 1px solid var(--line-strong); vertical-align: middle; white-space: nowrap; }
.tag--char { color: var(--accent-soft); border-color: var(--line-strong); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.tag--opt { color: #fde08a; border-color: rgba(251, 191, 36, .5); }
.tag--warn { color: #fdb4bf; border-color: rgba(251, 113, 133, .55); }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 14px 0 0; }

.section { margin-top: 52px; }
.section--prose { max-width: 72ch; }
.section--prose p { color: var(--text-muted); }
.section__intro { color: var(--text-muted); margin-top: -4px; }
.section__head h2 { margin-bottom: 6px; }
.section__head p { color: var(--text-muted); margin-bottom: 0; max-width: 70ch; }
.section h3 { margin-top: 24px; }
.section h3 a { color: var(--text); text-decoration: none; }
.section h3 a:hover { color: var(--accent-soft); }

.notice { margin: 22px 0 0; padding: 16px 18px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); border-left: 4px solid var(--accent); background: var(--bg-raised); }
.notice p { color: var(--text-muted); margin-bottom: .6em; }
.notice p:last-child { margin-bottom: 0; }
.notice strong { color: var(--text); }
.notice--spoiler { border-left-color: var(--amber); }

/* ---------- Layout ---------- */
.layout { max-width: var(--wrap); margin: 0 auto; padding: 24px 20px 72px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
/* Below the two-column breakpoint the chapter switcher follows the article; the jump menu above the article covers navigation. */
.layout__side { order: 2; }
@media (min-width: 1024px) {
  .layout { grid-template-columns: 272px minmax(0, 1fr); gap: 52px; padding-top: 32px; align-items: start; }
  .layout__side { order: 0; position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); max-height: calc(100dvh - var(--header-h) - 48px); overflow-y: auto; overscroll-behavior: contain; }
  .layout--single { grid-template-columns: minmax(0, 1fr); }
}
.layout--single { max-width: 1040px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; overflow-x: clip; background: rgba(10, 8, 18, .84); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: .02em; line-height: 1; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__six { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand__sep { width: 4px; height: 4px; border-radius: 50%; background: var(--pink-soft); margin: 0 9px; align-self: center; }
.brand__name { color: var(--text-muted); font-weight: 600; }

.nav-toggle { display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg-overlay); color: var(--text); font: 600 14px var(--font-body); cursor: pointer; }
.site-nav { display: none; }
/* Seven entries need about 870px beside the logo; below that the menu folds into the button. */
@media (min-width: 900px) { .nav-toggle { display: none; } .site-nav { display: block; } }
.nav-open .site-nav { display: block; position: absolute; left: 0; right: 0; top: var(--header-h); background: var(--bg-raised); border-bottom: 1px solid var(--line-strong); box-shadow: var(--shadow); padding: 8px 20px 16px; max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; scrollbar-width: thin; }
.site-nav__list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
@media (min-width: 900px) { .site-nav__list { flex-direction: row; gap: 4px; } }
.site-nav__list > li > a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--text-muted); font-weight: 600; font-size: 15px; text-decoration: none; }
.site-nav__list > li > a:hover, .site-nav__list > li > a[aria-current] { color: var(--text); background: var(--bg-overlay); }
.site-nav__list > li > a[aria-current] { box-shadow: inset 0 -2px 0 var(--accent); }
.menu { list-style: none; display: flex; flex-direction: column; gap: 2px; padding: 4px 0 0 14px; }
.menu a { display: flex; flex-direction: column; padding: 8px 14px; border-radius: 8px; color: var(--text-muted); font-size: 14px; text-decoration: none; }
.menu a:hover { background: var(--bg-overlay); color: var(--text); }
.menu__kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-soft); }
@media (min-width: 900px) {
  .has-menu { position: relative; }
  .menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 290px; padding: 8px; background: var(--bg-raised); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .15s ease, transform .15s ease, visibility .15s; }
  .menu { max-height: calc(100vh - var(--header-h) - 32px); max-height: calc(100dvh - var(--header-h) - 32px); overflow-y: auto; }
  .has-menu:hover .menu, .has-menu:focus-within .menu { opacity: 1; visibility: visible; transform: none; }
  /* Menus near the right edge open leftwards so a hidden one cannot widen the page. */
  .site-nav__list > li:nth-last-child(-n + 2) .menu { left: auto; right: 0; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-inset); }
.footer-grid { max-width: var(--wrap); margin: 0 auto; padding: 48px 20px 32px; display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
@media (min-width: 1120px) { .footer-grid { grid-template-columns: 1.5fr 1.2fr 1fr 1fr .8fr; } .footer-brand { grid-column: auto; } }
.footer-brand__text { color: var(--text-muted); font-size: 14px; margin: 14px 0 0; max-width: 36ch; }
.footer-col__title { font-size: 12.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); margin: 0 0 10px; font-weight: 600; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; }
.footer-col a { color: var(--text-muted); text-decoration: none; }
.footer-col a:hover { color: var(--text); }
.footer-legal { max-width: var(--wrap); margin: 0 auto; padding: 18px 20px 32px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.6; color: var(--text-faint); }

/* ---------- Breadcrumbs, page head, facts, TOC ---------- */
.crumbs { font-size: 13.5px; margin-bottom: 18px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; }
.crumbs li { display: flex; align-items: center; max-width: 100%; white-space: nowrap; }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--text-faint); }
.crumbs a, .crumbs span { overflow: hidden; text-overflow: ellipsis; }
.crumbs a { color: var(--text-faint); text-decoration: none; padding: 10px 8px; margin: -10px -8px; }
.crumbs a:hover { color: var(--accent-soft); }
.crumbs span { color: var(--text-muted); }

.page-head h1 { margin-bottom: 12px; }
.page-head__meta { font-size: 13.5px; color: var(--text-faint); margin: 14px 0 0; }
.meta-row { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 20px 0 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-raised); }
.meta-row div { display: flex; align-items: baseline; gap: 8px; }
.meta-row dt { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); }
.meta-row dd { margin: 0; font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.meta-row dd a { color: var(--text); text-decoration: none; padding: 8px 12px; margin: -8px -12px; }
.meta-row .muted { font-family: var(--font-body); font-size: 13px; font-weight: 500; }
.meta-row__wide { flex-basis: 100%; }
.meta-row__wide dd { font-family: var(--font-body); font-size: 15px; font-weight: 500; color: var(--text-muted); }

.facts { display: grid; grid-template-columns: minmax(0, 1fr); margin: 22px 0 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-raised); overflow: hidden; }
@media (min-width: 720px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.facts div { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 13px; color: var(--text-faint); padding-top: 2px; }
.facts dd { margin: 0; font-size: 15px; }
@media (min-width: 720px) {
  .facts div:nth-last-child(-n+2) { border-bottom: 0; }
  .facts div:nth-child(2n) { border-left: 1px solid var(--line); }
}

.toc { margin: 26px 0 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-raised); }
.toc summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 18px; cursor: pointer; list-style: none; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); font-weight: 600; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: ""; flex: none; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--accent-soft); border-bottom: 2px solid var(--accent-soft); transform: rotate(45deg) translateY(-2px); transition: transform .15s ease; }
.toc[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.toc ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 8px; padding: 0 18px 14px; }
.toc a { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--text-muted); background: var(--bg-overlay); text-decoration: none; }
.toc a:hover, .toc a[aria-current] { color: var(--text); background: var(--bg-overlay); background: color-mix(in srgb, var(--accent) 24%, transparent); }

/* ---------- Hero ---------- */
.hero { display: grid; gap: 28px; padding-top: 16px; }
@media (min-width: 960px) { .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; padding: 40px 0 24px; } }
.hero h1 { font-size: clamp(2.4rem, 1.5rem + 4.4vw, 4.5rem); }
.hero .lead { font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero__art { position: relative; aspect-ratio: 4 / 3; border-radius: 24px; overflow: hidden; border: 1px solid var(--line-strong); box-shadow: var(--shadow); background: #160a2f; }
.hero__art svg { display: block; width: 100%; height: 100%; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 30px 0 0; }
@media (min-width: 480px) { .stats { grid-template-columns: repeat(3, auto); justify-content: start; gap: 16px 40px; } }
.stats div { display: flex; flex-direction: column; }
.stats dt { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); order: 2; }
.stats dd { margin: 0; font-family: var(--font-display); font-size: 2.3rem; font-weight: 700; line-height: 1.1; order: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Chapter and guide cards ---------- */
.chapter-cards { list-style: none; display: grid; gap: 14px; margin-top: 22px; }
@media (min-width: 640px) { .chapter-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chapter-card { position: relative; display: flex; flex-direction: column; height: 100%; padding: 22px 24px 20px; border-radius: var(--radius); background: var(--bg-raised); border: 1px solid var(--line); border-top: 3px solid var(--accent); color: var(--text); text-decoration: none; overflow: hidden; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.chapter-card:hover { transform: translateY(-3px); border-color: var(--line-strong); border-top-color: var(--accent); box-shadow: var(--shadow); color: var(--text); text-decoration: none; }
.chapter-card__art { position: absolute; top: -48px; right: -54px; width: 200px; height: 200px; pointer-events: none; -webkit-mask-image: linear-gradient(to left, #000 50%, transparent); mask-image: linear-gradient(to left, #000 50%, transparent); }
.chapter-card__eyebrow { font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-soft); font-weight: 600; }
.chapter-card__name { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; line-height: 1.05; margin: 4px 0 6px; max-width: 78%; }
.chapter-card__location { color: var(--accent-soft); font-size: 13.5px; line-height: 1.4; margin-bottom: 8px; max-width: 78%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chapter-card__summary { color: var(--text-muted); font-size: 15px; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.chapter-card__meta { font-size: 13px; color: var(--text-faint); margin-top: auto; }
.chapter-card__cta { margin-top: 12px; font-weight: 600; font-size: 14.5px; color: var(--accent-soft); }

.guide-cards { display: grid; gap: 14px; margin-top: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .guide-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .guide-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.guide-card { display: flex; flex-direction: column; padding: 20px 22px; border-radius: var(--radius); background: var(--bg-raised); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.guide-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--text); text-decoration: none; }
.guide-card__kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent-soft); font-weight: 600; }
.guide-card__title { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; line-height: 1.1; margin: 4px 0 6px; }
.guide-card__text { color: var(--text-muted); font-size: 14.5px; margin-bottom: 14px; }
.guide-card__more { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--accent-soft); }

/* ---------- Chapter switcher (sidebar) ---------- */
.cnav { font-size: 14px; }
.cnav__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 10px; margin-bottom: 8px; }
.cnav__title { margin: 0; font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.cnav__reset { display: none; border: 0; background: none; padding: 0; color: var(--text-faint); font-size: 12.5px; text-decoration: underline; cursor: pointer; }
.js .cnav__reset:not([hidden]) { display: inline; }
.cnav__reset:hover { color: var(--text); }
.cnav__list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.cnav__link { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--text-muted); font-weight: 600; }
.cnav__link:hover { background: var(--bg-overlay); color: var(--text); text-decoration: none; }
.cnav__num { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--accent); min-width: 1.4em; }
.cnav__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cnav__count { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text-faint); background: var(--bg-inset); border-radius: 999px; padding: 1px 8px; }
.cnav__chapter.is-active > .cnav__link { color: var(--text); background: var(--bg-overlay); }
.cnav__chapter.is-active > .cnav__link .cnav__count { color: var(--accent-ink); background: var(--accent); }
.cnav__missions { list-style: none; margin: 4px 0 8px 22px; border-left: 2px solid var(--line-strong); border-left-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.cnav__item { display: flex; align-items: center; }
.cnav__mission { flex: 1; min-width: 0; display: flex; gap: 8px; align-items: baseline; padding: 6px 8px 6px 12px; border-radius: 8px; color: var(--text-muted); font-weight: 500; }
.cnav__mission:hover { color: var(--text); background: var(--bg-overlay); text-decoration: none; }
.cnav__mission[aria-current="page"] { color: var(--text); background: var(--bg-overlay); background: color-mix(in srgb, var(--accent) 15%, transparent); font-weight: 600; }
.cnav__mnum { flex: none; width: 1.5em; font-size: 12px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.cnav__mname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.done-btn { display: none; flex: none; width: 28px; height: 28px; margin-right: 8px; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--text-faint); cursor: pointer; transition: background .12s ease, border-color .12s ease, color .12s ease; }
.js .done-btn { display: inline-flex; }
.done-btn:hover { border-color: var(--accent); color: var(--text); }
.done-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.done-btn .icon { width: 14px; height: 14px; }
.cnav__item:has(.done-btn[aria-pressed="true"]) .cnav__mname,
.mission-row:has(.done-btn[aria-pressed="true"]) .mission-row__name { text-decoration: line-through; text-decoration-color: var(--accent); opacity: .7; }

/* ---------- Mission jump menu (narrow screens only) ---------- */
.jump { position: relative; margin-bottom: 20px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--bg-raised); }
@media (min-width: 1024px) { .jump { display: none; } }
.jump summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; font-weight: 600; color: var(--text); }
.jump summary::-webkit-details-marker { display: none; }
.jump summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--accent-soft); border-bottom: 2px solid var(--accent-soft); transform: rotate(45deg) translateY(-2px); transition: transform .15s ease; }
.jump[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.jump__count { margin-left: auto; font-weight: 500; color: var(--text-faint); font-size: 13px; white-space: nowrap; }
.jump__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jump__list { list-style: none; max-height: 60vh; overflow-y: auto; scrollbar-width: thin; padding: 4px 6px 8px; border-top: 1px solid var(--line); }
.jump__list a { display: flex; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 8px; color: var(--text-muted); text-decoration: none; }
.jump__list a:hover { background: var(--bg-overlay); color: var(--text); }
.jump__num { color: var(--accent-soft); font-size: 12px; width: 1.8em; flex: none; font-variant-numeric: tabular-nums; }

/* ---------- Mission list, steps, tips, rewards ---------- */
.mission-list { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.mission-row { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-raised); transition: border-color .15s ease; }
.mission-row:hover { border-color: var(--line-strong); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.mission-row__link { flex: 1; min-width: 0; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 14px 14px 14px 16px; color: var(--text); text-decoration: none; }
.mission-row__num { font-family: var(--font-display); font-size: 1.65rem; font-weight: 700; color: var(--accent); line-height: 1; padding-top: 3px; font-variant-numeric: tabular-nums; }
.mission-row__body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mission-row__name { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; line-height: 1.15; }
.mission-row__meta { font-size: 12.5px; color: var(--accent-soft); }
.mission-row__summary { font-size: 14.5px; color: var(--text-muted); }
.mission-row .done-btn { margin-right: 12px; }

.steps { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; padding: 14px 16px 14px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-raised); }
.steps li:hover { border-color: var(--line-strong); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.steps__num { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--bg-overlay); background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-soft); font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }
.steps p, .tips p, .rewards p, .method p, .numbered-list p { margin: 0; }

.tips { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.tips li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; padding: 12px 16px; border-left: 4px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--bg-raised); }
.tips .icon { width: 20px; height: 20px; color: var(--accent-soft); margin-top: 3px; }

.rewards { list-style: none; margin-top: 14px; display: grid; gap: 8px; }
.rewards li { padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), var(--bg-raised); }

.complete-box { display: none; align-items: center; gap: 14px; margin-top: 34px; padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); }
.js .complete-box { display: flex; }
.complete-box .done-btn { width: 34px; height: 34px; margin: 0; }
.complete-box p { margin: 0; font-size: 14.5px; color: var(--text-muted); }

.teaser-list { list-style: none; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.teaser-list a { display: block; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--bg-raised); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.teaser-list a:hover { border-color: var(--line-strong); }

/* ---------- FAQ ---------- */
.faq { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.faq__item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-raised); }
.faq__item[open] { border-color: var(--line-strong); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; cursor: pointer; list-style: none; font-weight: 600; color: var(--text); }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__q { min-width: 0; }
.faq__icon { flex: none; position: relative; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; left: 50%; top: 50%; background: var(--accent-soft); transform: translate(-50%, -50%); }
.faq__icon::before { width: 10px; height: 2px; }
.faq__icon::after { width: 2px; height: 10px; transition: transform .15s ease; }
.faq__item[open] .faq__icon::after { transform: translate(-50%, -50%) scaleY(0); }
.faq__a { padding: 0 16px 16px; color: var(--text-muted); }
.faq__a p:last-child { margin-bottom: 0; }

/* ---------- Sources, tables, lists ---------- */
.sources { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 14px; }
.sources a { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; color: var(--text-muted); background: var(--bg-raised); border: 1px solid var(--line); text-decoration: none; }
.sources a:hover { color: var(--text); border-color: var(--line-strong); }

.table-wrap { margin-top: 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-raised); }
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-table th, .data-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); background: var(--bg-inset); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--bg-overlay); }
.data-table .num { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-faint); }
.data-table td:first-child { color: var(--accent); font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.data-table a { color: var(--text); text-decoration: none; font-weight: 600; }
.data-table a:hover { color: var(--accent-soft); text-decoration: underline; }
.data-table--missions { min-width: 520px; }
@media (max-width: 719px) {
  /* A stacked table shows chapter and name on one line, then the counts as labelled figures beneath. */
  .data-table--stack thead, .data-table--stack td:nth-child(5) { display: none; }
  .data-table--stack tbody { display: block; }
  .data-table--stack tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 14px; align-items: start; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .data-table--stack tr:last-child { border-bottom: 0; }
  .data-table--stack td { display: block; padding: 0; border: 0; }
  .data-table--stack td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .data-table--stack td:nth-child(2) { grid-column: 2; grid-row: 1; }
  .data-table--stack td:nth-child(3) { grid-column: 1; grid-row: 2; }
  .data-table--stack td:nth-child(4) { grid-column: 2; grid-row: 2; }
  .data-table--stack td:nth-child(2) a { display: inline-block; padding: 8px 0; }
  .data-table--stack td[data-label]::before { content: attr(data-label) " "; font-family: var(--font-body); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); }

  .data-table--missions, .data-table--codex { min-width: 0; }
  .data-table .hide-sm { display: none; }
  .data-table--codex th, .data-table--codex td { padding: 10px; }
}

.chip-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg-raised); color: var(--text-muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.chip-nav a:hover { color: var(--text); border-color: var(--accent); }
.chip-nav span { font-size: 12px; font-weight: 600; color: var(--accent-soft); background: var(--bg-overlay); background: color-mix(in srgb, var(--accent) 16%, transparent); border-radius: 999px; padding: 0 8px; }

.missable-list { list-style: none; margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.missable-list li { padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-raised); }
.missable-list__name { display: block; font-weight: 600; color: var(--text); }
.missable-list p { margin: 2px 0 0; font-size: 14.5px; color: var(--text-muted); }

.character-list { display: grid; grid-template-columns: minmax(0, 1fr); margin: 16px 0 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-raised); overflow: hidden; }
@media (min-width: 720px) { .character-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.character-list div { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.character-list dt { font-weight: 600; color: var(--text); }
.character-list dd { margin: 0; font-size: 14.5px; color: var(--text-muted); }

.link-list { list-style: none; margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.link-list a { font-weight: 600; color: var(--text); }
.numbered-list { margin: 16px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.numbered-list li::marker { color: var(--accent); font-weight: 700; }

.method-list { list-style: none; margin-top: 18px; display: grid; gap: 12px; counter-reset: method; }
@media (min-width: 860px) { .method-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.method { counter-increment: method; position: relative; padding: 18px 20px 16px 66px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised); }
.method::before { content: counter(method, decimal-leading-zero); position: absolute; left: 18px; top: 17px; font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--accent); line-height: 1; }
.method h3 { margin: 4px 0 6px; font-size: 1.6rem; }
.method p { color: var(--text-muted); font-size: 15px; }
.method .tag { display: inline-flex; margin-bottom: 6px; max-width: 100%; white-space: normal; text-align: left; }
.reward-list { list-style: none; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.reward-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 16px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-raised); }
.reward-list a { display: flex; align-items: center; align-self: stretch; min-height: 48px; color: var(--text); text-decoration: none; }
.reward-list a:hover { color: var(--accent-soft); text-decoration: underline; }
.reward-list span { font-size: 14px; color: var(--text-faint); text-align: right; }

/* ---------- Characters page ---------- */
.character-grid { list-style: none; margin-top: 28px; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .character-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.character-card { padding: 18px 20px; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); background: var(--bg-raised); }
.character-card__name { font-size: 1.75rem; margin-bottom: 8px; }
.character-card dl { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.character-card dt { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); }
.character-card dt a { color: var(--accent-soft); text-decoration: none; padding: 8px 0; }
.character-card dt a:hover { text-decoration: underline; }
.character-card dd { margin: 0; font-size: 14.5px; color: var(--text-muted); }

/* ---------- Pager, 404 ---------- */
.pager { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 40px; }
@media (min-width: 720px) { .pager { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pager__link { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; min-height: 92px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-raised); color: var(--text); text-decoration: none; }
.pager__link--next { text-align: right; }
.pager__link:hover { border-color: var(--line-strong); border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); color: var(--text); }
.pager__label { font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-soft); font-weight: 600; }
.pager__title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1.15; }
.pager__sub { font-size: 13px; color: var(--text-faint); }
.pager__link--empty { border-style: dashed; }

.notfound { padding: 40px 0; }
.notfound .link-list { margin-top: 26px; }

/* ==========================================================================
   Progress tracker, compendium and map
   ========================================================================== */

/* ---------- Shared: progress bars, filter chips ---------- */
.bar { display: inline-grid; grid-template-columns: minmax(72px, 1fr) auto; align-items: center; gap: 10px; min-width: 150px; }
.bar__track { display: block; height: 8px; border-radius: 999px; background: var(--bg-inset); overflow: hidden; }
.bar__fill { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .3s ease; }
.bar__label { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text-muted); white-space: nowrap; }

.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg-raised); color: var(--text-muted); font: 500 14px var(--font-body); cursor: pointer; }
.chip span { font-size: 12px; color: var(--text-faint); }
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.chip[aria-pressed="true"] span { color: var(--accent-ink); opacity: .8; }

.search-box { width: 100%; min-height: 48px; padding: 10px 16px 10px 46px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--bg-raised) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23948bad' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5'/%3E%3Cpath d='M12.8 12.8l4 4'/%3E%3C/svg%3E") no-repeat 14px center / 20px; color: var(--text); font: 500 16px var(--font-body); }
.search-box::placeholder { color: var(--text-faint); }
.search-box:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.search-label { display: block; margin-bottom: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); font-weight: 600; }

/* ---------- Progress tracker ---------- */
/* Without JavaScript the tracker is a read-only checklist: hide the controls that would do nothing. */
html:not(.js) .pr-overview, html:not(.js) .pr-toolbar, html:not(.js) .pr-hint, html:not(.js) .pr-transfer, html:not(.js) .pr-check, html:not(.js) .pr-counter, html:not(.js) .pr-reveal, html:not(.js) .track, html:not(.js) .bar, html:not(.js) .done-btn, html:not(.js) .complete-box { display: none; }
.pr-overview { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 26px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised); }
@media (min-width: 860px) { .pr-overview { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 40px; } }
.pr-total { display: flex; align-items: center; gap: 18px; margin: 0; }
.ring { width: 124px; height: 124px; flex: none; }
.ring__track { fill: none; stroke: var(--bg-inset); stroke-width: 10; }
.ring__fill { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: 326.73; transform: rotate(-90deg); transform-origin: 60px 60px; transition: stroke-dashoffset .35s ease; }
.pr-total__value { display: flex; flex-direction: column; }
.pr-total__value strong { font-family: var(--font-display); font-size: 3.4rem; font-weight: 700; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pr-total__value span { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); }
.pr-stats { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0; }
.pr-stat { display: grid; grid-template-columns: minmax(110px, auto) minmax(0, 1fr); align-items: center; gap: 8px 14px; width: 100%; min-height: 44px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-overlay); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.pr-stat:hover { border-color: var(--accent); }
.pr-stat .bar { min-width: 0; }
.pr-stat__name { font-weight: 600; font-size: 14.5px; }
.pr-stat.is-complete .pr-stat__name::after { content: " ✓"; color: var(--accent-soft); }

.pr-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; margin-top: 22px; }
.pr-chapter { display: flex; flex-direction: column; gap: 6px; min-width: 0; max-width: 100%; font-size: 14px; color: var(--text-muted); }
.pr-chapter select, .map-group--row select { min-width: 0; max-width: 100%; min-height: 44px; padding: 8px 38px 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background-color: var(--bg-raised); color: var(--text); font: 600 15px var(--font-body); cursor: pointer; }
.pr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.btn--file { position: relative; overflow: hidden; cursor: pointer; }
.pr-hint { font-size: 14px; color: var(--text-faint); margin-top: 10px; }

.tabs { margin-top: 26px; }
.tabs__bar { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs__bar::-webkit-scrollbar { display: none; }
.tabs__tab { flex: none; min-height: 44px; padding: 10px 16px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--text-muted); font: 600 15px var(--font-body); cursor: pointer; white-space: nowrap; }
.tabs__tab:hover { color: var(--text); }
.tabs__tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tabs__tab:focus-visible { outline-offset: -3px; }
.pr-panels { margin-top: 4px; }

.pr-chapter { margin-top: 24px; padding: 18px 16px; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); background: var(--bg-raised); }
.pr-chapter__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.pr-chapter__head h2 { margin: 0; font-size: 1.7rem; }
.pr-chapter__head h2 a { color: var(--text); text-decoration: none; }
.pr-chapter__head h2 a:hover { color: var(--accent-soft); }
.pr-chapter__meta { margin: 6px 0 0; font-size: 14px; color: var(--text-faint); }
.pr-chapter__meta a { color: var(--accent-soft); }
.pr-sub { margin: 20px 0 6px; font-size: 1.25rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }

.pr-list { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
@media (min-width: 860px) { .pr-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; } .pr-list--goals { grid-template-columns: minmax(0, 1fr); } }
.pr-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 4px 12px; padding: 8px 10px; border-radius: var(--radius-sm); transition: background .12s ease; }
.pr-row:hover { background: var(--bg-overlay); }
.pr-check { position: relative; appearance: none; -webkit-appearance: none; flex: none; display: inline-grid; place-content: center; width: 40px; height: 40px; margin: -6px 0 -6px -8px; border: 0; background: none; cursor: pointer; }
.pr-check::before { content: ""; grid-area: 1 / 1; width: 24px; height: 24px; border: 2px solid var(--line-strong); border-radius: 7px; background: var(--bg-inset); transition: background .12s ease, border-color .12s ease; }
.pr-check::after { content: ""; grid-area: 1 / 1; width: 12px; height: 12px; transform: scale(0); transition: transform .12s ease; background: var(--accent-ink); clip-path: polygon(14% 44%, 0 62%, 50% 100%, 100% 16%, 82% 2%, 48% 64%); }
.pr-check:checked::before { background: var(--accent); border-color: var(--accent); }
.pr-check:checked::after { transform: scale(1); }
.pr-check:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 0; border-radius: 10px; }
.pr-row__body { display: block; min-width: 0; cursor: pointer; }
.pr-row__name { display: block; font-weight: 600; color: var(--text); line-height: 1.35; padding: 1px 0; }
.pr-row__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pr-row__desc { display: block; margin-top: 2px; font-size: 14px; color: var(--text-muted); }
.pr-row__how { display: block; margin-top: 2px; font-size: 13.5px; color: var(--text-faint); }
.pr-row__link { grid-column: 3; align-self: center; display: inline-flex; align-items: center; min-height: 40px; padding: 4px 0; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.pr-row--empty { color: var(--text-faint); font-size: 14.5px; }
.pr-row:has(.pr-check:checked) .pr-row__name { text-decoration: line-through; text-decoration-color: var(--accent); opacity: .7; }
.pr-counter { display: inline-flex; align-items: center; gap: 6px; margin-top: 1px; padding: 2px 6px 2px 2px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--bg-inset); }
.pr-number { width: 60px; min-height: 36px; border: 0; background: none; color: var(--text); font: 600 16px var(--font-body); text-align: right; }
.pr-counter__goal { padding-right: 4px; font-weight: 600; color: var(--text-faint); }
@media (max-width: 719px) {
  .pr-row { grid-template-columns: auto minmax(0, 1fr); }
  .pr-row__link { grid-column: 2; justify-self: start; min-height: 40px; margin-top: -4px; }
}
.pr-chapter.is-spoiler .pr-list, .pr-chapter.is-spoiler .pr-sub, .pr-chapter.is-spoiler .pr-chapter__meta, .pr-chapter.is-spoiler .bar { filter: blur(7px); opacity: .55; pointer-events: none; user-select: none; }
.pr-reveal { margin-top: 14px; }

.pr-menu { position: relative; }
.pr-menu > summary { list-style: none; cursor: pointer; }
.pr-menu > summary::-webkit-details-marker { display: none; }
.pr-menu__list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: flex; flex-direction: column; min-width: 232px; padding: 6px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--bg-raised); box-shadow: var(--shadow); }
.pr-menu__list button { min-height: 44px; padding: 8px 12px; border: 0; border-radius: 8px; background: none; color: var(--text); font: 500 14.5px var(--font-body); text-align: left; cursor: pointer; }
.pr-menu__list button:hover { background: var(--bg-overlay); }
.pr-transfer { margin-top: 34px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-raised); }
.pr-transfer > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 600; }
.pr-transfer p { margin: 8px 0; font-size: 14.5px; color: var(--text-muted); }
.pr-paste { display: block; margin: 12px 0 10px; font-size: 14px; color: var(--text-muted); }
.pr-textarea { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--bg-inset); color: var(--text); font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
.pr-toast { position: fixed; left: 50%; bottom: 20px; z-index: 200; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14.5px; opacity: 0; pointer-events: none; transform: translate(-50%, 20px); transition: opacity .2s ease, transform .2s ease; }
.pr-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Tick box on entry pages */
.track { display: inline-flex; width: fit-content; align-items: center; gap: 10px; margin: 18px 0 0; padding: 2px 16px 2px 4px; border: 1px dashed var(--line-strong); border-radius: 999px; font-weight: 600; font-size: 15px; }
.track .pr-check { margin: 0; }
.track label { cursor: pointer; padding: 6px 0; }

/* ---------- Compendium ---------- */
.cd-search { display: block; margin-top: 24px; }
.cd-results { list-style: none; margin-top: 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--bg-raised); box-shadow: var(--shadow); overflow: hidden; }
.cd-results a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.cd-results li:last-child a { border-bottom: 0; }
.cd-results a:hover { background: var(--bg-overlay); }
.cd-results__name { font-weight: 600; }
.cd-results__kind { align-self: center; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-soft); }
.cd-results__blurb { grid-column: 1 / -1; font-size: 14px; color: var(--text-muted); }
.cd-results__empty { margin: 0; padding: 12px 16px; font-size: 14px; color: var(--text-faint); }

.cd-index { list-style: none; margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@media (min-width: 860px) { .cd-index { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; } }
.cd-index__item { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-raised); }
.cd-index__name { display: inline-block; min-width: 40px; padding: 9px 0; font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; line-height: 1.15; color: var(--text); text-decoration: none; }
.cd-index__name:hover { color: var(--accent-soft); text-decoration: underline; }
.cd-index__blurb { margin: 4px 0 0; font-size: 14px; color: var(--text-muted); }

.filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.filter__search { flex: 1 1 240px; min-width: 0; }
.filter__search .search-box { min-height: 44px; padding-top: 8px; padding-bottom: 8px; }
.filter__count { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--text-faint); }
.filter__empty { margin-top: 12px; font-size: 14.5px; color: var(--text-muted); }

.section--tight { margin-top: 34px; }
.data-table__main strong { display: block; }
.data-table__sub { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--text-faint); }
.data-table--codex { min-width: 660px; }
.data-table--codex td { font-size: 14.5px; }
.data-table--codex td:first-child { font-family: var(--font-body); font-size: inherit; font-weight: 400; color: var(--text); }
.data-table--codex td:first-child strong { font-weight: 600; }
@media (max-width: 719px) {
  .data-table--codex { min-width: 0; }
  .data-table--codex th, .data-table--codex td { padding: 10px; }
}

.region-cards { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 16px; }
@media (min-width: 640px) { .region-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .region-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.region-cards > li { display: grid; }
.region-card { display: flex; flex-direction: column; padding: 16px 18px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); background: var(--bg-raised); color: var(--text); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.region-card:hover { border-color: var(--line-strong); transform: translateY(-2px); color: var(--text); text-decoration: none; }
.region-card__name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.region-card__meta { margin-top: 4px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-soft); font-weight: 600; }
.region-card__summary { margin-top: 6px; font-size: 14px; color: var(--text-muted); }

.spoiler { margin-top: 14px; padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--bg-raised); }
.spoiler > summary { cursor: pointer; font-weight: 600; color: var(--accent-soft); }
.spoiler p { margin: 8px 0 0; color: var(--text-muted); }

/* ---------- Map ---------- */
.map-app { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 22px; }
/* The stage is sized to the map's own proportions so almost no empty water shows beside it. */
@media (min-width: 1024px) { .map-app { grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 18px; align-items: stretch; } }
.map-stage { position: relative; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: linear-gradient(#06111d, #0a1e30); }
.map-canvas { height: 58vh; min-height: 340px; max-height: 640px; }
@media (min-width: 1024px) { .map-canvas { height: min(78vh, 840px); max-height: none; } }
.map-canvas:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: -2px; }
.basemap { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.basemap:active { cursor: grabbing; }
/* Its box sets the proportions of the framed view, so the SVG simply fills it. */
.basemap--static { touch-action: auto; cursor: auto; }
.basemap__glow { filter: blur(7px); }
.basemap__borders path { fill: none; stroke: #4a3d6a; stroke-width: 1.6; stroke-dasharray: 7 7; }
.basemap__label { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: .13em; fill: rgba(244, 241, 251, .55); text-anchor: middle; pointer-events: none; transition: opacity .2s ease; }
.basemap__water-labels text { font-family: var(--font-display); font-size: 16px; letter-spacing: .4em; fill: rgba(142, 234, 248, .25); text-anchor: middle; pointer-events: none; }
.basemap.is-zoomed .basemap__label { opacity: 0; }
.marker { cursor: pointer; color: #f4f1fb; }
.marker__hit { fill: transparent; }
.marker__dot { stroke: #0a0812; stroke-width: 2.5; transition: fill .15s ease; }
.marker__ring { fill: none; stroke: currentColor; stroke-width: 1.6; opacity: 0; transition: opacity .15s ease; }
.marker:hover .marker__ring, .marker:focus-visible .marker__ring { opacity: .8; }
.marker.is-selected .marker__ring { opacity: 1; stroke-width: 2.4; }
.marker.is-selected .marker__dot { stroke: #fff; }
.marker.is-visited .marker__dot { fill: #5d5672; stroke: #2a2438; }
.marker.is-hidden { display: none; }
.basemap--static .marker__dot { stroke-width: 3; }
.marker.is-dim .marker__dot { opacity: .28; }
.marker.is-dim .marker__hit { pointer-events: none; }
.basemap--static .marker:hover .marker__dot { stroke: #fff; }

.map-controls { position: absolute; top: 12px; right: 12px; left: 12px; z-index: 4; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; pointer-events: none; }
.js .map-controls { display: flex; }
.map-controls button { min-width: 44px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: rgba(19, 16, 29, .93); color: var(--text); font: 600 14px/1 var(--font-body); cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); pointer-events: auto; }
.map-controls button:hover { border-color: var(--accent); color: var(--accent-soft); }
.map-count { position: absolute; left: 12px; bottom: 10px; z-index: 3; margin: 0; padding: 5px 12px; border-radius: 999px; background: rgba(19, 16, 29, .92); font-size: 12.5px; color: var(--text-muted); pointer-events: none; }
.map-popup { position: absolute; z-index: 6; top: 66px; right: 12px; width: min(296px, calc(100% - 24px)); padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: rgba(19, 16, 29, .97); box-shadow: var(--shadow); }
.map-popup .eyebrow { margin-bottom: 4px; }
.map-popup__title { margin-bottom: 6px; padding-right: 28px; font-size: 1.7rem; }
.map-popup__desc { font-size: 14.5px; color: var(--text-muted); }
.map-popup__meta { margin-bottom: 6px; font-size: 13px; color: var(--text-faint); }
.map-popup__missions { font-size: 14px; color: var(--text-muted); }
.map-popup__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.map-popup__actions .btn { min-height: 44px; padding: 9px 14px; font-size: 14px; }
.map-popup__actions .btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-soft); }
.map-popup__close { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--text-muted); font: 400 26px/1 var(--font-body); cursor: pointer; }

.map-panel { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised); }
@media (min-width: 1024px) { .map-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; align-items: start; column-gap: 20px; } .map-panel > * { grid-column: 1 / -1; } .map-panel > fieldset:nth-of-type(1), .map-panel > .map-group--row, .map-panel > .map-check, .map-panel > fieldset:nth-of-type(2) { grid-column: auto; } }
.map-panel fieldset { min-width: 0; margin: 16px 0 0; padding: 0; border: 0; }
.map-panel legend { padding: 0; margin-bottom: 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); font-weight: 600; }
.map-search .search-box { min-height: 44px; padding-top: 8px; padding-bottom: 8px; padding-left: 14px; }
.map-results { list-style: none; margin-top: 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.map-results__item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); text-align: left; cursor: pointer; }
.map-results li:last-child .map-results__item { border-bottom: 0; }
.map-results__item:hover { background: var(--bg-overlay); }
.map-results__name { font-weight: 600; }
.map-results__region { font-size: 12.5px; color: var(--text-faint); }
.map-results__empty { padding: 10px 12px; font-size: 14px; color: var(--text-faint); }
.map-check { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 2px; font-size: 14.5px; color: var(--text); cursor: pointer; }
.map-check input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.map-check__box { flex: none; display: grid; place-content: center; width: 20px; height: 20px; border: 2px solid var(--line-strong); border-radius: 6px; background: var(--bg-inset); transition: background .12s ease, border-color .12s ease; }
.map-check__box::after { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--dot); opacity: 0; transition: opacity .12s ease; }
.map-check input:checked + .map-check__box { border-color: var(--dot); background: color-mix(in srgb, var(--dot) 18%, var(--bg-inset)); }
.map-check input:checked + .map-check__box::after { opacity: 1; }
.map-check input:focus-visible + .map-check__box { outline: 2px solid var(--accent-soft); outline-offset: 3px; }
.map-check__count { margin-left: auto; font-size: 12.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.map-group--row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; min-height: 44px; font-size: 14.5px; white-space: nowrap; }
.map-switch input { flex: none; width: 22px; height: 22px; accent-color: var(--accent); cursor: pointer; }
.map-jumps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.map-jumps button { min-height: 40px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg-overlay); color: var(--text-muted); font: 500 13.5px var(--font-body); cursor: pointer; }
.map-jumps button:hover { color: var(--text); border-color: var(--accent); }
.map-jumps button span { margin-left: 6px; font-size: 12px; color: var(--text-faint); }
.map-hint { margin: 16px 0 0; font-size: 13px; color: var(--text-faint); }
.map-swatch { display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; background: var(--dot); vertical-align: -1px; }

.map-static { max-width: min(540px, 100%); margin-top: 22px; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: linear-gradient(#06111d, #0a1e30); }
.map-static__actions { margin-top: 14px; }
.place-list { display: grid; gap: 10px; margin-top: 14px; }
.place { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-raised); }
.place:target { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.place__name { margin-bottom: 4px; font-size: 1.45rem; }
.place__name a { color: var(--text); text-decoration: none; }
.place__name a:hover { color: var(--accent-soft); }
.place__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 13px; }
.place__desc, .place__where, .place__missions { margin-bottom: 4px; font-size: 15px; color: var(--text-muted); }
.place__links { margin: 6px 0 0; font-size: 14px; }

@media (max-width: 1023px) {
  .map-popup { top: auto; bottom: 10px; left: 10px; right: 10px; width: auto; max-height: 62%; overflow-y: auto; }
  .map-jumps button { min-height: 44px; }
}
@media (max-width: 479px) {
  .pr-stat { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .pr-menu__list { right: auto; left: 0; }
  .cd-results a { grid-template-columns: minmax(0, 1fr); }
  .cd-results__kind { justify-self: start; }
}

/* ---------- Restructured sections: mission tracker, in-order list, missables, guides ---------- */
/* Tracker table on /missions/ */
.data-table--missions .col-done { width: 48px; }
.data-table--missions td:first-child { font-family: var(--font-body); }
.pr-check--cell { margin: -8px 0 -8px -12px; }
.data-table tr:has(.pr-check:checked) a[href*="/missions/"] { text-decoration: line-through; text-decoration-color: var(--accent); opacity: .7; }
.data-table td.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.2rem; font-weight: 700; letter-spacing: .12em; color: var(--accent-soft); white-space: nowrap; }

/* Numbered story order on /missions/in-order/ */
.order-list { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; margin-top: 14px; }
@media (min-width: 860px) { .order-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; } }
.order-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 4px 12px 4px 6px; border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--bg-raised); }
.order-row:hover { background: var(--bg-overlay); }
.order-row__num { flex: none; width: 36px; text-align: right; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.order-row__name { flex: 1 1 160px; display: inline-flex; align-items: center; min-height: 40px; padding: 4px 0; color: var(--text); font-weight: 600; }
.order-row.is-optional .order-row__name { color: var(--text-muted); }
.order-row.is-ponr { border-color: rgba(251, 191, 36, .45); }

/* Callout on chapter hubs; the point-of-no-return notice on checklists */
.callout { margin-top: 14px; padding: 18px 20px; border: 1px solid var(--line-strong); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); background: var(--bg-raised); }
.callout p { color: var(--text-muted); }
.callout__title { margin-bottom: 6px; font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; line-height: 1.15; }
.callout__title a { color: var(--text); text-decoration: none; }
.callout__title a:hover { color: var(--accent-soft); text-decoration: underline; }
.callout .teaser-list { margin-top: 10px; }
.notice--ponr { border-left-color: var(--amber); }
.notice--ponr strong a { display: inline-block; padding: 10px 0; margin: -10px 0; }
.teaser-list--two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
@media (min-width: 640px) { .teaser-list--two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pr-row:target { background: var(--bg-overlay); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }

/* Cash gates on /guides/cash-requirements/ */
.gate-list { display: grid; gap: 12px; margin-top: 16px; }
@media (min-width: 860px) { .gate-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gate { padding: 18px 20px 16px; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); background: var(--bg-raised); }
.gate__amount { margin: 0; font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; line-height: 1; color: var(--accent-soft); }
.gate h3 { margin: 8px 0 6px; font-size: 1.5rem; }
.gate h3 a { color: var(--text); text-decoration: none; }
.gate h3 a:hover { color: var(--accent-soft); text-decoration: underline; }
.gate__meta { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 8px; font-size: 14px; color: var(--text-muted); }
.gate__detail { margin: 0; font-size: 14.5px; color: var(--text-muted); }
.goal-list { list-style: none; display: grid; gap: 10px; margin-top: 14px; }
.goal-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-raised); }
.goal-list__amount { grid-row: 1 / span 3; align-self: start; font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; line-height: 1.1; color: var(--accent-soft); white-space: nowrap; }
.goal-list__name { font-weight: 600; }
.goal-list a { margin-left: 8px; font-size: 14px; }
.goal-list p { margin: 2px 0 0; font-size: 14.5px; color: var(--text-muted); }
@media (max-width: 479px) { .goal-list li { grid-template-columns: minmax(0, 1fr); } .goal-list__amount { grid-row: auto; } }

/* Choices */
.choice-list { list-style: none; display: grid; gap: 10px; margin-top: 16px; }
@media (min-width: 860px) { .choice-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.choice-card { padding: 16px 18px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); background: var(--bg-raised); }
.choice-card__kicker { margin: 0 0 4px; font-size: 13px; color: var(--text-faint); }
.choice-card__kicker a { color: var(--accent-soft); }
.choice-card__question { margin: 0; font-size: 1.45rem; line-height: 1.2; }
.choice-card__question a { display: inline-block; padding: 7px 0; color: var(--text); text-decoration: none; }
.choice-card__question a:hover { color: var(--accent-soft); text-decoration: underline; }
.choice-card__blurb { margin: 6px 0 0; font-size: 14.5px; color: var(--text-muted); }

/* News */
.news-list { list-style: none; display: grid; gap: 10px; margin-top: 20px; }
.news-item { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-raised); }
.news-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 13.5px; color: var(--text-faint); }
.news-item__title { margin: 0 0 4px; font-size: 1.6rem; }
.news-item__title a { color: var(--text); text-decoration: none; }
.news-item__title a:hover { color: var(--accent-soft); text-decoration: underline; }
.news-item__summary { margin: 0; font-size: 15px; color: var(--text-muted); }
.news-article { margin-top: 20px; }

/* ---------- Touch and narrow screens ---------- */
/* Phones and tablets get hit areas of roughly 44px. Inline links inside running text keep
   their natural size, as the guidelines exempt them. */
@media (max-width: 1023px), (pointer: coarse) {
  .brand { min-height: 44px; }
  .nav-toggle { padding: 13px 18px; }
  .site-nav__list > li > a { padding: 11px 14px; }
  .menu a { padding: 10px 14px; }
  .jump__list a { padding: 10px; }
  .cnav__link { padding-top: 10px; padding-bottom: 10px; }
  .cnav__mission { padding: 10px 8px 10px 12px; }
  .cnav__reset { display: inline-flex; align-items: center; min-height: 40px; padding: 10px 0; }
  .done-btn { width: 40px; height: 40px; margin-right: 6px; }
  .done-btn .icon { width: 18px; height: 18px; }
  .mission-row .done-btn { margin-right: 10px; }
  .complete-box .done-btn { width: 44px; height: 44px; }
  .toc a { padding: 9px 14px; }
  .chip-nav a { padding-top: 9px; padding-bottom: 9px; }
  .sources a { padding: 9px 14px; }
  .link-list a { display: inline-block; padding: 8px 0; }
  .footer-col ul { gap: 0; }
  .footer-col a { display: block; padding: 9px 0; }
  @media (min-width: 600px) { .footer-col a { padding: 9px 0; } }
}
@media (max-width: 719px) {
  /* The tick button floats over the row's top-right corner, so the summary keeps the full width. */
  .mission-row { position: relative; }
  .mission-row__link { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 12px 12px 12px 14px; }
  .mission-row__name { padding-right: 46px; }
  .mission-row .done-btn { position: absolute; top: 7px; right: 7px; margin: 0; background: var(--bg-raised); }
}
@media (max-width: 479px) {
  /* Label above value, so values get the full width instead of a narrow second column. */
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
/* A tapped card keeps its :hover state on touch screens until something else is tapped. */
@media (hover: none) {
  .chapter-card:hover, .guide-card:hover, .btn:hover { transform: none; }
}
/* Notched phones in landscape: keep content clear of the rounded corners (viewport-fit=cover). */
.header-inner, .layout, .footer-grid, .footer-legal, .nav-open .site-nav {
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .layout__side, .jump, .toc, .complete-box, .chip-nav, .pager, .hero__art, .done-btn { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000; }
  .layout { display: block; padding: 0; }
}
