/* 00-tokens.css */
@layer reset, tokens, base, layout, components, utilities, pages;
/* 00-tokens.css - GTA 6 ARENA design tokens, "Night Drive" (docs/V3-UX-DIRECTION.md 13.2). One theme, no light rules.
   One breakpoint: 900px (phone below, desktop from it). Page CSS reads these tokens and never hard-codes a colour, font
   or size a token covers. */

@layer tokens {
  :root {
    color-scheme: dark;
    --bg: #0a0a0c;                 /* page */
    --s1: #141417;                 /* surfaces: cards, buttons, keys */
    --s2: #1d1d22;
    --s3: #2a2a31;
    --tx: #f5f3f0;                 /* text */
    --mu: #bcb7b0;                 /* quiet text */
    --tx2: #dcd7d0;                /* answer text on --s1 */
    --ac: #ff7a45;                 /* accent: active link, focus ring, ticked box, link in answer cards */
    --ac2: #ff4f7b;
    --acg: linear-gradient(90deg, #ff8a3d, #ff4f7b);   /* main button, progress bar, ticked box, section rule, note edge */
    --on-ac: #1a0b06;              /* text on the accent */
    --warm: #ffb18f;               /* the "Time-limited" tag */
    --line: #1f1f24;               /* hairlines */
    --line2: #24242a;
    --disp: "Big Shoulders Display", Impact, "Arial Narrow Bold", "Arial Narrow", "Roboto Condensed", sans-serif;
    --body: Inter, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --pad: 16px;                   /* side padding of .wrap */
    --max: 1200px;                 /* content width */
    --top-h: 60px;                 /* top bar height */
    --bbar-h: 76px;                /* bottom bar height incl. padding; body pads by it */
    --r1: 8px;                     /* keys */
    --r2: 12px;                    /* tiles */
    --r3: 14px;                    /* cards */
    --chrome-top: 0px;             /* fixed bar above the page (scroll padding): none on phones */
  }
  @media (min-width: 900px) {
    :root { --pad: 32px; --top-h: 68px; --bbar-h: 0px; --chrome-top: var(--top-h); }
  }

}

/* 01-base.css */
@layer reset, tokens, base, layout, components, utilities, pages;
/* 01-base.css - reset and document defaults, "Night Drive" (docs/V3-UX-DIRECTION.md 13.2 and section 8).
   Element selectors plus the page text parts every page uses: .wrap, .disp, .skip, the focus ring.
   Section 8 rules here: nothing scrolls sideways (html/body overflow-x: clip), long words wrap, no ellipsis,
   no text under 13px. */

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  img, picture, video, canvas, svg, iframe { display: block; max-width: 100%; }
  img, video { height: auto; }
  input, button, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
  button { cursor: pointer; background: none; border: 0; padding: 0; }
  ul[class], ol[class] { list-style: none; padding: 0; }
  table { border-collapse: collapse; }
  fieldset { border: 0; padding: 0; min-width: 0; }
  legend { padding: 0; }
  summary { cursor: pointer; }
  [hidden]:not([hidden="until-found"]) { display: none !important; }
  dialog:not([open]) { display: none; }
}

@layer base {
  html { background: var(--bg); color: var(--tx); overflow-x: clip; scroll-padding-top: calc(var(--chrome-top) + 12px); accent-color: var(--ac); }
  body {
    min-height: 100vh; min-height: 100dvh; overflow-x: clip;
    background: var(--bg); color: var(--tx);
    font: 400 16px/1.55 var(--body);
    padding-bottom: var(--bbar-h);
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
  }
  /* Long words and addresses wrap; nothing is cut off with "...". */
  p, li, dd, dt, h1, h2, h3, h4, h5, h6, figcaption, caption, td, th, summary, blockquote { overflow-wrap: anywhere; }
  a, b, span, small, label, button { overflow-wrap: break-word; }
  * { text-overflow: clip; }

  h1, h2, h3, h4, h5, h6 { color: var(--tx); text-wrap: balance; }
  h1, h2 { font-family: var(--disp); font-weight: 800; text-transform: uppercase; letter-spacing: .01em; line-height: .95; }
  h3, h4, h5, h6 { font-family: var(--body); font-weight: 700; line-height: 1.3; }
  h3 { font-size: 18px; }
  h4, h5, h6 { font-size: 16px; }
  p, li, dd, figcaption, blockquote { text-wrap: pretty; }
  strong, b { font-weight: 700; }
  small { font-size: 13px; }
  sub, sup { font-size: 13px; }
  hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
  code, kbd, samp, pre { font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace; font-size: max(13px, .9em); }
  pre { overflow-x: auto; padding: 16px; border-radius: var(--r2); background: var(--s1); }
  mark { background: rgb(255 122 69 / .25); color: inherit; border-radius: 2px; }

  a { color: inherit; text-underline-offset: .2em; text-decoration-color: var(--ac); }
  a:hover { text-decoration-thickness: 2px; }
  a:not([href]) { text-decoration: none; }

  ul:not([class]), ol:not([class]) { padding-left: 1.35em; }
  li::marker { color: var(--mu); }
  table { width: 100%; font-variant-numeric: tabular-nums; }
  th { text-align: left; font-weight: 600; }
  caption { text-align: left; }

  input:not([type="checkbox"], [type="radio"], [type="range"]), select, textarea {
    min-height: 44px; width: 100%; padding: 10px 14px; border: 1px solid #4a4a52; border-radius: var(--r2);
    background: var(--s2); color: var(--tx); font-size: 16px; line-height: 1.3;
  }
  textarea { min-height: 8rem; resize: vertical; }
  input::placeholder, textarea::placeholder { color: #a9a49d; opacity: 1; }
  input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
  input[type="checkbox"], input[type="radio"] { width: 24px; height: 24px; flex: none; margin: 0; cursor: pointer; }
  label { cursor: pointer; }
  :disabled { cursor: not-allowed; }

  /* Focus: a 2px accent ring with a 2px gap on every control. */
  :focus { outline: none; }
  :focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
  main:focus, [tabindex="-1"]:focus { outline: none; }
  ::selection { background: rgb(255 79 123 / .4); color: var(--tx); }
  ::backdrop { background: rgb(10 10 12 / .74); }

  /* Page text parts (13.3). */
  .wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
  .disp { font-family: var(--disp); font-weight: 800; text-transform: uppercase; letter-spacing: .01em; line-height: .95; }
  .skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--tx); color: var(--bg); padding: 10px 14px; border-radius: var(--r1); font-weight: 600; }
  .skip:focus { left: 8px; }

  /* Icons from the inline sprite: sized here, coloured by currentColor. */
  svg.i { width: 20px; height: 20px; max-width: none; flex: none; display: inline-block; vertical-align: -.25em; }
  .sprite { display: none; }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  }
  @media (forced-colors: active) {
    :focus-visible { outline-color: Highlight; }
  }
}

/* Print: dark ink on white, no frame. */
@media print {
  @layer base {
    :root { --bg: #fff; --s1: #fff; --s2: #f4f4f4; --s3: #ddd; --tx: #000; --mu: #333; --tx2: #111; --line: #bbb; --line2: #bbb; }
    html, body { background: #fff !important; color: #000; font-size: 11pt; padding: 0; }
    h1, h2, h3 { break-after: avoid; }
  }
}

/* 02-layout.css */
@layer reset, tokens, base, layout, components, utilities, pages;
/* 02-layout.css - the frame, "Night Drive" (docs/V3-UX-DIRECTION.md 13.3; shapes and values from the chosen mockup,
   docs/design/v3-options/b/assets/site.css): top bar, menu, search field, bottom bar, footer, breadcrumb, section
   heading, one-line answer, "Also in", credit line, main button, pager. One breakpoint: 900px.
   Below 900px the top bar scrolls away with the page (bars over 12% of the screen, section 8); from 900px it sticks. */

@layer layout {
  main { display: block; }

  /* ---------- top bar ---------- */
  .top { position: relative; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
  .top .wrap { display: flex; align-items: center; gap: 8px; height: var(--top-h); }
  .brand { font-family: var(--disp); font-weight: 900; font-size: 26px; line-height: 1; letter-spacing: .02em; text-transform: uppercase; text-decoration: none; white-space: nowrap; margin-right: auto; display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--tx); }
  .brand i { width: 10px; height: 10px; border-radius: 50%; background: var(--acg); display: inline-block; flex: none; }
  .tbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 22px; background: var(--s2); color: var(--tx); font: 600 15px/1 var(--body); cursor: pointer; text-decoration: none; white-space: nowrap; }
  .tbtn:hover { background: var(--s3); }
  .tbtn svg { width: 18px; height: 18px; flex: none; }
  /* Phones narrower than 380 px: the name and both buttons still fit on one line. */
  @media (max-width: 379px) { .brand { font-size: 23px; gap: 6px; } .tbtn { gap: 6px; padding: 0 11px; } }
  @media (max-width: 339px) { .top .wrap { gap: 4px; } .brand { font-size: 20px; } .tbtn { padding: 0 8px; font-size: 14px; } }
  .links, .tsearch { display: none; }

  /* ---------- bottom bar (phone) ---------- */
  .bbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); background: #0e0e11; border-top: 1px solid var(--line2); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .bbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; text-decoration: none; color: var(--mu); font: 500 13px/1 var(--body); border-radius: var(--r2); }
  .bbar svg { width: 22px; height: 22px; }
  .bbar a[aria-current] { color: var(--tx); }
  .bbar a[aria-current] svg { color: var(--ac); }

  /* ---------- menu: full screen on a phone, a 440px panel on the right from 900px ---------- */
  .menu { position: fixed; inset: 0; z-index: 50; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; }
  .menu[hidden] { display: none; }
  .menu-head { position: sticky; top: 0; background: var(--bg); border-bottom: 1px solid var(--line); z-index: 2; }
  .menu-head .wrap { display: flex; align-items: center; height: var(--top-h); }
  .menu-body { padding-top: 16px; padding-bottom: 40px; }
  .menu h2 { font: 600 15px/1.3 var(--body); text-transform: none; letter-spacing: 0; color: var(--mu); margin: 24px 0 10px; }
  .mmain { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 6px; }
  .mmain a { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px; border-radius: var(--r2); background: var(--s1); text-decoration: none; }
  .mmain img { width: 48px; height: 48px; border-radius: var(--r1); object-fit: cover; flex: none; }
  .mmain b { font: 800 21px/1 var(--disp); text-transform: uppercase; letter-spacing: .01em; display: block; }
  .mmain small { display: block; color: var(--mu); font-size: 13px; line-height: 1.3; margin-top: 3px; }
  .mmain a[aria-current] b { color: var(--ac); }
  .menu .more { grid-template-columns: 1fr; }
  .mfoot { list-style: none; margin: 0; padding: 0; } /* follows the More list straight on: that list already ends with a line */
  .mfoot a { display: flex; align-items: center; justify-content: space-between; min-height: 50px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 500; }
  .mfoot a::after { content: "\203A"; color: var(--mu); font-size: 22px; margin-left: 6px; }
  .mfoot a[aria-current], .menu .more a[aria-current] { color: var(--ac); }
  .menu .spoilset { margin-top: 24px; }
  .menu .m-offline { margin-top: 16px; }

  /* ---------- search field (menu, home, search page) ---------- */
  .search { display: flex; align-items: center; background: var(--tx); border-radius: 28px; padding: 4px 4px 4px 18px; min-height: 52px; }
  .search svg { width: 20px; height: 20px; color: #3a3a40; flex: none; }
  .search input { flex: 1; min-width: 0; min-height: 44px; width: auto; border: 0; border-radius: 0; background: transparent; font: 400 16px var(--body); color: #111; padding: 0 10px; height: 44px; }
  .search input::placeholder { color: #5b5b62; }
  .search input:focus { outline: none; box-shadow: none; }
  .search:focus-within { box-shadow: 0 0 0 3px var(--ac); }
  .btn-main { border: 0; border-radius: 24px; background: var(--acg); color: var(--on-ac); font: 700 16px/1 var(--body); min-height: 44px; padding: 0 20px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
  .btn-main:hover { filter: brightness(1.06); }

  /* ---------- plain link list (menu "More topics", home "More topics") ---------- */
  .more { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .more a { display: flex; align-items: center; justify-content: space-between; min-height: 50px; border-bottom: 1px solid #222228; text-decoration: none; font-weight: 500; font-size: 16px; line-height: 1.25; padding: 4px 0; }
  .more a::after { content: "\203A"; color: var(--mu); font-size: 22px; margin-left: 6px; }

  /* ---------- breadcrumb ---------- */
  .crumbs { max-width: var(--max); margin: 0 auto; padding: 4px var(--pad) 0; font-size: 14px; color: var(--mu); }
  .crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; }
  .crumbs li { display: inline-flex; align-items: center; min-width: 0; }
  .crumbs li + li::before { content: "\203A"; margin: 0 8px; color: var(--mu); }
  .crumbs a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; color: var(--tx); text-decoration: none; }
  /* Phones: a long last crumb wraps as text after its separator instead of dropping to a line of its own. */
  @media (max-width: 899px) { .crumbs ol { display: block; } .crumbs li { display: inline; } }
  .crumbs a:hover { text-decoration: underline; text-decoration-color: var(--ac); }
  .crumbs [aria-current] { color: var(--mu); }

  /* ---------- sections and page text ---------- */
  .sec { margin-top: 48px; }
  .sec-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
  .sec-h h2 { font-size: 34px; }
  .rule { width: 40px; height: 3px; background: var(--acg); border-radius: 2px; margin-bottom: 12px; }
  .lede { font-size: 19px; line-height: 1.45; margin-top: 14px; max-width: 46ch; }
  .also { margin-top: 10px; color: var(--mu); font-size: 15px; }
  .also a { color: var(--tx); font-weight: 600; text-decoration-color: var(--ac); text-underline-offset: 4px; display: inline-block; padding: 10px 4px; }
  .credit { font-size: 13px; color: var(--mu); }
  .hero-credit { text-align: right; margin-top: 2px; }

  /* ---------- pager (detail pages) ---------- */
  .pager { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 40px; }
  .pager a { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 64px; padding: 12px 16px; border-radius: var(--r3); background: var(--s1); text-decoration: none; }
  .pager a:hover { background: var(--s2); }
  .pager small { color: var(--mu); font-size: 13px; }
  .pager b { font-size: 16px; font-weight: 600; line-height: 1.3; }
  .pager .pg-next { text-align: right; }

  /* ---------- footer ---------- */
  .foot { margin-top: 56px; border-top: 1px solid var(--line); padding: 24px 0 32px; color: var(--mu); font-size: 14px; }
  .foot .brand { font-size: 22px; color: var(--tx); margin-bottom: 8px; min-height: 44px; display: inline-flex; }
  .flinks { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 0 18px; }
  .flinks a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; color: var(--tx); text-decoration: none; font-size: 15px; }
  .flinks a:hover { text-decoration: underline; text-decoration-color: var(--ac); }
  .flinks.svc { padding-top: 8px; border-top: 1px solid var(--line); }
  .flinks.svc a { color: var(--mu); }
  .disc { margin-top: 8px; font-size: 14px; }
  .foot .credit { display: block; margin-top: 4px; }

  /* ---------- desktop ---------- */
  @media (min-width: 900px) {
    .top { position: sticky; top: 0; }
    .top .wrap { gap: 4px; }
    .brand { font-size: 30px; margin-right: 20px; }
    .links { display: flex; gap: 2px; margin: 0 auto 0 0; list-style: none; padding: 0; }
    .links a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; text-decoration: none; font-weight: 500; font-size: 15px; color: #e4e0da; border-bottom: 2px solid transparent; }
    .links a:hover { color: #fff; }
    .links a[aria-current] { color: #fff; border-bottom-color: var(--ac); }
    .tsearch { display: flex; align-items: center; background: var(--s2); border-radius: 22px; padding: 0 14px; height: 44px; width: 240px; margin-right: 8px; }
    .tsearch svg { width: 18px; height: 18px; color: var(--mu); flex: none; }
    .tsearch input { flex: 1; min-width: 0; min-height: 40px; width: auto; background: transparent; border: 0; border-radius: 0; color: var(--tx); font: 400 15px var(--body); padding: 0 8px; height: 40px; }
    .tsearch input::placeholder { color: #a9a49d; }
    .tsearch input:focus { outline: none; box-shadow: none; }
    .tsearch:focus-within { box-shadow: 0 0 0 2px var(--ac); }
    .t-search { display: none; }
    .bbar { display: none; }
    .menu { left: auto; width: 440px; border-left: 1px solid var(--line2); box-shadow: -40px 0 80px rgb(0 0 0 / .6); }
    .menu .wrap { padding: 0 24px; }
    .sec { margin-top: 72px; }
    .sec-h h2 { font-size: 48px; }
    .lede { font-size: 22px; }
    .more { grid-template-columns: repeat(5, 1fr); gap: 0 24px; }
    .menu .more { grid-template-columns: 1fr; }
    .pager { grid-template-columns: 1fr 1fr; }
    .pager .pg-next { grid-column: 2; }
    .crumbs { padding-top: 8px; }
  }
}

/* 03-blocks.css */
@layer reset, tokens, base, layout, components, utilities, pages;
/* The ten building blocks of V3 "Night Drive" (docs/V3-UX-DIRECTION.md 7 and 13.4), from the mockup
   docs/design/v3-options/b/assets/site.css. Phone first; one breakpoint at 900px. Tokens only (13.2). */

@layer components {
  /* ---------- 1 picture tile ---------- */
  .nine { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .tile { position: relative; display: block; aspect-ratio: 1 / .92; border-radius: var(--r2); overflow: hidden; text-decoration: none; background: var(--s2); color: var(--tx); }
  .tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
  .tile::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(to top, color-mix(in srgb, var(--bg) 92%, transparent), transparent); }
  .tile span { position: absolute; left: 10px; right: 8px; bottom: 8px; z-index: 1; font: 800 20px/1 var(--disp); text-transform: uppercase; letter-spacing: .01em; overflow-wrap: anywhere; }
  .tile:hover img { transform: scale(1.04); }

  /* ---------- 2 list row, plain links ---------- */
  .list { list-style: none; margin: 0; padding: 0; }
  .list > li { border-bottom: 1px solid var(--line); }
  .item { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 0; text-decoration: none; color: var(--tx); }
  .item::after { content: "\203A"; color: var(--mu); font-size: 22px; line-height: 1; flex: none; }
  .item-pic { width: 64px; height: 48px; border-radius: var(--r1); object-fit: cover; flex: none; background: var(--s2); overflow: hidden; }
  span.item-pic { display: grid; place-items: center; }
  span.item-pic svg { width: 100%; height: 100%; }
  .item-tx { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  .item-name { display: block; font-size: 17px; font-weight: 600; line-height: 1.3; }
  .item-line { display: block; margin-top: 2px; color: var(--mu); font-size: 15px; line-height: 1.4; }
  .item:hover .item-name { text-decoration: underline; text-decoration-color: var(--ac); text-underline-offset: 4px; }
  .more { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .more a { display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding: 4px 0; border-bottom: 1px solid var(--line2); color: var(--tx); text-decoration: none; font-size: 16px; font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; }
  .more a::after { content: "\203A"; color: var(--mu); font-size: 22px; margin-left: 6px; }
  .more.one, .see .more { grid-template-columns: minmax(0, 1fr); }
  .see-one { margin-top: 32px; }
  .none { color: var(--mu); padding: 12px 0; }
  span.item::after { content: none; }                       /* a row without a link (sources.html) */
  .item-date { color: var(--mu); }
  .row-line { display: block; color: var(--mu); font-size: 15px; font-weight: 400; line-height: 1.4; }
  ul.list.codes > li { display: block; border: 0; }          /* a list of code rows (cheats) */
  .lede + .ask, .also + .ask { margin-top: 20px; }
  .list-more { margin-top: 12px; }
  .sec-lede { max-width: 60ch; margin: -6px 0 14px; color: var(--mu); font-size: 15px; }
  .sec-more { margin-top: 8px; }
  .sec-more a, .browse-all { display: inline-flex; align-items: center; min-height: 44px; color: var(--ac); font-weight: 600; text-decoration: none; }

  /* status badge and line (Rumor, False) */
  .badge { flex: none; display: inline-block; padding: 6px 10px; border-radius: 999px; background: var(--s2); color: var(--tx); font: 700 13px/1 var(--body); }
  .badge.b-rumor { color: var(--warm); }
  .badge.b-false { background: var(--s3); }
  .status { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-top: 12px; color: var(--tx2); font-size: 15px; }
  .status b { padding: 6px 10px; border-radius: 999px; background: var(--s2); color: var(--tx); font-size: 13px; line-height: 1; }
  .status.b-rumor b { color: var(--warm); }
  .status.b-false b { background: var(--s3); }

  /* ---------- 3 answer card ---------- */
  .ask { display: grid; gap: 12px; }
  .qa { background: var(--s1); border-radius: var(--r3); padding: 18px 18px 16px; overflow-wrap: anywhere; }
  .qa h3 { font: 700 18px/1.3 var(--body); margin: 0 0 6px; }
  .qa p { color: var(--tx2); font-size: 16px; }
  .qa a { display: inline-flex; align-items: center; min-height: 44px; margin-top: 2px; color: var(--ac); font-weight: 600; text-decoration: none; }

  /* ---------- 4 code row ---------- */
  .grp { font-size: 26px; margin: 28px 0 8px; color: var(--tx); }
  .thead { display: none; }
  .cheat { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; margin-bottom: 8px; padding: 16px; border-radius: var(--r3); background: var(--s1); }
  .cheat h3, .cheat h4 { align-self: center; margin: 0; font: 800 25px/1 var(--disp); text-transform: uppercase; letter-spacing: .01em; overflow-wrap: anywhere; }
  .cheat .copy { grid-column: 2; grid-row: 1; }
  .cheat .does, .cheat .nocode, .cheat .unl, .cheat .seq { grid-column: 1 / -1; }
  .cheat .does { font-size: 16px; }
  .cheat .unl { color: var(--mu); font-size: 15px; }
  .cheat .seq { margin-top: 6px; }
  .nocode { color: var(--mu); font-size: 15px; font-style: italic; }
  .seq { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
  .seq li { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px 5px 7px; border-radius: var(--r1); background: var(--s3); font-size: 14px; font-weight: 500; line-height: 1.2; }
  .seq li b { color: var(--ac); font-size: 16px; font-weight: 700; }
  .copy { min-height: 44px; min-width: 76px; padding: 0 16px; border: 0; border-radius: 22px; background: var(--s3); color: var(--tx); font: 600 15px/1 var(--body); cursor: pointer; }
  .copy:hover { filter: brightness(1.25); }
  .copy.done { background: var(--tx); color: var(--bg); }

  /* ---------- 5 check row ---------- */
  .prog { margin-top: 18px; padding: 14px 0 12px; border-bottom: 1px solid var(--line); background: var(--bg); }
  .prog-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; font-size: 15px; }
  .prog-row b { font-size: 17px; }
  .prog-row span { color: var(--mu); font-size: 14px; }
  .bar { height: 8px; margin-top: 8px; border-radius: 4px; background: var(--s3); overflow: hidden; }
  .bar i { display: block; width: 0; height: 100%; border-radius: 4px; background: var(--acg); transition: width .3s; }
  .chap { margin-top: 36px; }
  .chap-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 6px; }
  .chap-h h2 { font-size: 34px; }
  .chap-h span { color: var(--mu); font-size: 14px; }
  .rows { list-style: none; margin: 0; padding: 0; }
  .row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-height: 60px; padding: 6px 0; border-bottom: 1px solid var(--line); }
  .tick { appearance: none; -webkit-appearance: none; display: grid; place-items: center; flex: none; width: 44px; height: 44px; margin: 0; border: 2px solid color-mix(in srgb, var(--mu) 45%, transparent); border-radius: 10px; background: var(--s2); cursor: pointer; }
  .tick::after { content: ""; width: 14px; height: 8px; border: solid var(--on-ac); border-width: 0 0 3px 3px; transform: rotate(-45deg) translate(1px, -2px); opacity: 0; }
  .tick:checked { border-color: transparent; background: var(--acg); }
  .tick:checked::after { opacity: 1; }
  .nm { flex: 1 1 10em; min-width: 0; color: var(--tx); font-size: 17px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
  a.nm { display: flex; align-items: center; min-height: 44px; text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 4px; }
  a.nm:hover { text-decoration-color: var(--ac); }
  .tick:checked + .nm { color: var(--mu); text-decoration: line-through; text-decoration-color: var(--mu); }
  .tag { font-size: 14px; color: var(--mu); white-space: nowrap; }
  .tag.tl { color: var(--warm); }
  .hid .nm { color: var(--mu); font-style: italic; }
  .hid .show { order: 1; }
  .hid .tag { order: 2; }
  .hid .nm + .tag { margin-left: 56px; }
  .show, .step button, .opts summary, .opts button, .bm { min-height: 44px; padding: 0 16px; border: 0; border-radius: 22px; background: var(--s3); color: var(--tx); font: 600 15px/1 var(--body); cursor: pointer; }
  .show { flex: none; }
  .step { display: inline-flex; align-items: center; gap: 6px; }
  .step button { width: 44px; padding: 0; font-size: 20px; }
  .step output { min-width: 2.5ch; text-align: center; font-weight: 600; }
  .step input { width: 64px; min-height: 44px; padding: 0 6px; border: 1px solid var(--line2); border-radius: var(--r1); background: var(--s1); color: var(--tx); font: 600 16px/1 var(--body); text-align: center; }
  .step input:focus { outline: 2px solid var(--ac); outline-offset: 1px; }
  .need { font-size: 14px; color: var(--mu); }
  .opts { margin-top: 32px; }
  .opts summary { display: inline-flex; align-items: center; background: var(--s2); list-style: none; }
  .opts summary::-webkit-details-marker { display: none; }
  .opts > div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
  /* parts the client core adds at run time (13.11): done row, the endings question, the armed Reset */
  .row.is-done .nm { color: var(--mu); }
  .confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 100%; }
  .confirm-q { color: var(--mu); font-size: 15px; }
  .confirm-yes { background: var(--acg); color: var(--on-ac); }
  [data-action=reset][data-armed] { outline: 2px solid var(--ac); outline-offset: 2px; color: var(--ac); }

  /* ---------- 6 facts table, comparison ---------- */
  .facts { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 16px; }
  .facts caption { caption-side: top; padding-bottom: 8px; text-align: left; font-weight: 700; }
  .facts th, .facts td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
  .facts th[scope=row] { width: 40%; color: var(--mu); font-weight: 500; }
  .facts td ul { margin: 0; padding-left: 18px; }
  .facts a { color: var(--tx); text-decoration-color: var(--ac); text-underline-offset: 3px; }
  .tablewrap { max-width: 100%; margin-top: 8px; overflow-x: auto; overscroll-behavior-x: contain; }
  .tablewrap > .facts { margin-top: 0; }
  .cmp thead th { padding-top: 0; border-bottom: 2px solid var(--line2); color: var(--tx); font-weight: 700; white-space: nowrap; }
  .cmp th[scope=row] { width: auto; min-width: 8em; }
  .cmp td { min-width: 8em; overflow-wrap: normal; }
  /* A table of up to three columns fits a phone screen: its cells wrap instead of the table scrolling sideways. */
  @media (max-width: 599px) {
    .cmp:not(:has(tr > :nth-child(4))) :is(td, th) { min-width: 0; white-space: normal; overflow-wrap: break-word; }
    .cmp:not(:has(tr > :nth-child(4))) th[scope=row] { width: 30%; }
    /* Four columns still fit when the cells wrap and the type is one step smaller; five or more scroll in their frame. */
    .cmp:has(tr > :nth-child(4)):not(:has(tr > :nth-child(5))) { font-size: 14px; }
    .cmp:has(tr > :nth-child(4)):not(:has(tr > :nth-child(5))) :is(td, th) { min-width: 0; white-space: normal; overflow-wrap: break-word; padding-right: 8px; }
  }

  /* ---------- 7 steps ---------- */
  .steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: s; }
  .steps li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r3); background: var(--s1); counter-increment: s; }
  .steps li::before { content: counter(s); flex: none; width: 24px; color: var(--ac); font: 900 40px/1 var(--disp); text-align: center; }
  .steps li > span { min-width: 0; overflow-wrap: anywhere; }
  .steps b { display: block; font-size: 17px; }
  .steps b + span { color: var(--mu); font-size: 15px; }

  /* ---------- 8 note ---------- */
  .warn { position: relative; margin-top: 22px; padding: 16px 18px; border-radius: var(--r3); background: var(--s1); overflow: hidden; overflow-wrap: anywhere; }
  .warn::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--acg); }
  .warn b { display: block; margin-bottom: 4px; font-size: 18px; }
  .warn p, .warn li { color: var(--tx2); }

  /* ---------- 9 find field and chips ---------- */
  .find { margin-top: 16px; }
  .find input { width: 100%; min-height: 48px; padding: 0 18px; border: 1px solid var(--line2); border-radius: 24px; background: var(--s1); color: var(--tx); font: 400 16px var(--body); }
  .find input::placeholder { color: var(--mu); }
  .find input:focus { outline: 2px solid var(--ac); outline-offset: 1px; }
  .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
  .chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line2); border-radius: 22px; background: var(--s1); color: var(--tx); font: 600 15px/1.2 var(--body); cursor: pointer; }
  .chip[aria-pressed=true] { border-color: var(--tx); background: var(--tx); color: var(--bg); }
  .find-n { margin-top: 10px; color: var(--mu); font-size: 14px; }
  .find-n:empty { display: none; }
  .jumps { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 12px; }
  .jumps a { display: inline-flex; align-items: center; min-height: 44px; color: var(--tx); font-weight: 600; text-decoration-color: var(--mu); text-underline-offset: 4px; }

  /* ---------- 10 picture: header band, figure, gallery ---------- */
  .phead { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 210px; overflow: hidden; }
  .phead > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }  /* people sit in the upper third; an image with its own focal point sets it inline */
  .phead::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 35%, transparent 75%); }
  .phead .wrap { position: relative; z-index: 1; width: 100%; padding-top: 80px; padding-bottom: 10px; }
  .phead h1 { font-size: clamp(36px, 13vw, 56px); overflow-wrap: anywhere; }
  .phead h1.long { font-size: clamp(30px, 9vw, 44px); }
  .phead.noimg { min-height: 0; }
  .phead.compact { min-height: 150px; }
  .phead.compact .wrap { padding-top: 48px; }
  .phead.noimg::after { content: none; }
  .phead.noimg .wrap { padding-top: 24px; }
  .fig { margin: 24px 0 0; }
  .fig img { width: 100%; height: auto; border-radius: var(--r3); }
  .fig figcaption { margin-top: 6px; }
  .gal { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .gal img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r2); }
  .gal + .credit { margin-top: 6px; }

  /* ---------- small parts: bookmark, spoiler setting, sources, prose, misc ---------- */
  .bm { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; background: var(--s2); }
  .bm[aria-pressed=true] { background: var(--tx); color: var(--bg); }
  .spoilset { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 16px; padding: 10px 12px 10px 16px; border-radius: var(--r3); background: var(--s1); }
  .spoilset > span { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
  .spoilset label { color: var(--tx2); font-size: 15px; }
  .spoilset select { min-height: 44px; max-width: 100%; padding: 0 12px; border: 1px solid var(--line2); border-radius: 22px; background: var(--s2); color: var(--tx); font: 500 15px var(--body); }
  .switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 6px 0 4px; border: 0; border-radius: 22px; background: transparent; color: var(--tx); font: 600 15px/1.2 var(--body); text-align: left; cursor: pointer; }
  .switch i { position: relative; flex: none; width: 44px; height: 26px; border-radius: 13px; background: var(--s3); transition: background .2s; }
  .switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--tx); transition: transform .2s; }
  .switch[aria-checked=true] i { background: var(--ac); }
  .switch[aria-checked=true] i::after { transform: translateX(18px); }
  .sources { margin-top: 32px; border-top: 1px solid var(--line); }
  .sources > summary { display: flex; align-items: center; min-height: 48px; font-weight: 600; cursor: pointer; list-style: none; }
  .sources > summary::-webkit-details-marker { display: none; }
  .sources > summary::after { content: "+"; margin-left: 10px; color: var(--mu); font-size: 20px; }
  .sources[open] > summary::after { content: "\2212"; }
  .sources ol { margin: 0 0 16px; padding-left: 22px; color: var(--tx2); font-size: 15px; }
  .sources li { margin: 8px 0; overflow-wrap: anywhere; }
  .sources a { color: var(--tx); text-underline-offset: 3px; }
  .src__meta { display: block; color: var(--mu); font-size: 13px; }
  .prose { max-width: 68ch; color: var(--tx2); font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
  .prose > * + * { margin-top: 12px; }
  .prose h2, .prose h3, .prose h4 { margin-top: 24px; color: var(--tx); font: 700 20px/1.3 var(--body); }
  .prose ul, .prose ol { margin-bottom: 0; padding-left: 22px; }
  .prose li + li { margin-top: 6px; }
  .prose strong, .prose b { color: var(--tx); }
  .prose a { color: var(--tx); text-decoration-color: var(--ac); text-underline-offset: 3px; }
  .prose code { padding: 1px 5px; border-radius: 6px; background: var(--s2); font-size: 15px; }
  .elink { color: var(--tx); text-decoration-color: var(--ac); text-underline-offset: 3px; }
  .elink .badge { margin-left: 6px; padding: 3px 7px; vertical-align: 2px; }
  .spoiler { margin-top: 12px; padding: 0 16px; border-radius: var(--r3); background: var(--s1); }
  .spoiler > summary { display: flex; align-items: center; min-height: 48px; font-weight: 600; cursor: pointer; }
  .spoiler > div { padding-bottom: 12px; }
  .redact { padding: 0 4px; border-radius: 4px; background: var(--s3); color: var(--tx2); }
  /* A hidden word is a tap control: 44 px tall to the finger, the grey box stays the size of the text. */
  .redact:not(.is-revealed) { padding-block: 14px; background-clip: content-box; }
  .empty { padding: 16px 0; color: var(--mu); }
  .empty button { margin-top: 8px; }
  .yt { margin-top: 16px; }
  .yt__play { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--r3); background: var(--s2); color: var(--tx); overflow: hidden; cursor: pointer; aspect-ratio: 16 / 9; }
  .yt__poster img { width: 100%; height: 100%; object-fit: cover; }
  .yt__play > svg { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; transform: translate(-50%, -50%); }
  .yt__cap { margin-top: 6px; color: var(--mu); font-size: 14px; }
  .yt__cap a { color: var(--tx); }
  .yt iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: var(--r3); }
  .photo { margin: 16px 0 0; }
  .photo img { width: 100%; height: auto; border-radius: var(--r3); }
  .photo figcaption { margin-top: 6px; color: var(--mu); font-size: 13px; }

  /* ---------- desktop ---------- */
  @media (min-width: 900px) {
    .nine { gap: 14px; margin-top: 8px; }
    .tile { aspect-ratio: 16 / 7.4; border-radius: var(--r3); }
    .tile span { left: 20px; bottom: 16px; font-size: 34px; }
    .list:not(.one) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
    .more { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 24px; }
    .more.one, .see .more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ask { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
    .qa { padding: 22px; }
    .grp { font-size: 30px; margin-top: 36px; }
    .thead { display: grid; grid-template-columns: 240px minmax(0, 1fr) 260px 90px; gap: 20px; margin-top: 28px; padding: 0 20px 8px; color: var(--mu); font-size: 14px; font-weight: 600; }
    .cheat { grid-template-columns: 240px minmax(0, 1fr) 260px 90px; gap: 4px 20px; align-items: center; margin-bottom: 6px; padding: 18px 20px; }
    .cheat h3, .cheat h4 { grid-column: 1; grid-row: 1; font-size: 26px; }
    .cheat .does { grid-column: 1; grid-row: 2; color: var(--tx2); font-size: 15px; }
    .cheat .seq, .cheat .nocode { grid-column: 2; grid-row: 1 / 3; margin: 0; }
    .cheat .unl { grid-column: 3; grid-row: 1 / 3; }
    .cheat .copy { grid-column: 4; grid-row: 1 / 3; }
    .prog { position: sticky; top: var(--top-h); z-index: 10; }
    .rows.two { columns: 2; column-gap: 40px; }
    .rows.two .row { break-inside: avoid; }
    .steps { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
    .phead { min-height: clamp(380px, 25vw, 500px); }  /* a wider screen shows a taller band, so a wide crop keeps the faces */
    .phead::after { background: linear-gradient(to top, var(--bg) 0%, color-mix(in srgb, var(--bg) 50%, transparent) 40%, transparent 75%); }
    .phead .wrap { padding-top: 140px; }
    .phead h1 { font-size: clamp(56px, 8vw, 104px); }
    .phead h1.long { font-size: clamp(48px, 5.6vw, 76px); }
    .phead.noimg { min-height: 0; }
    .phead.noimg .wrap { padding-top: 40px; }
    .phead.compact { min-height: clamp(280px, 19vw, 380px); }
    .phead.compact .wrap { padding-top: 90px; }
    .gal { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  }
}

/* 04-utilities.css */
@layer reset, tokens, base, layout, components, utilities, pages;
/* 04-utilities.css - single-purpose helpers (they win over components: later layer) and the print rules of the frame. */

@layer utilities {
  .vh {
    position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important;
    overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important;
  }
  .num { font-variant-numeric: tabular-nums; }
  .is-hidden { display: none !important; }
  html:not(.js) .js-only, html.js .no-js-only { display: none !important; }

  /* Frame guards: the menu's own list shapes win over the block styles of the same class names (components layer). */
  .menu .more { grid-template-columns: 1fr; }
}

/* Print: no frame, nothing covered gets uncovered. */
@media print {
  @layer utilities {
    .top, .menu, .bbar, .foot, .skip, .crumbs, .pager, .tsearch, .btn-main, .copy, .show, details.opts { display: none !important; }
    [data-sealed-slot]:empty::before { content: "Spoiler hidden"; font-weight: 700; }
    .redact:not(.is-revealed) { background: none !important; color: #000 !important; border: 1px solid #000; }
    a[href^="http"]::after { content: none !important; }
  }
}
