/* ==========================================================================
   Stash
   1. Tokens & base        6. Detail view          11. Articles page
   2. Header & nav         7. Graveyard            12. Article page
   3. Home: wordmark       8. Section bars         13. Shared list rows
   4. Home: slider         9. Cards                14. Video controls
   5. Index list          10. Catalog window       15. Footer
   ========================================================================== */

/* 1. Tokens & base ———————————————————————————————————————————————————————— */
:root {
  /* --u scales small type on wide screens: 1px up to 1024, growing to 1.5px by ~1675 */
  --u: clamp(1px, calc(0.212px + 0.0769vw), 1.5px);
  --hh: calc(43 * var(--u));            /* header height; sticky bars sit under it */
  --pad: 20px;
  --col: 246px;
  --bg: #fff;
  --fg: #000;
  --muted: #8a8a8a;
  --line: #000;
  --blue: #0000ff;                       /* hover fill for commands and links */
  --red: #ff1a1a;                        /* search highlight */
  --wash: #f1f1f1;                       /* media placeholder */
  --ease: cubic-bezier(.7, 0, .2, 1);
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Space Mono", monospace;
  --t: calc(12 * var(--u));              /* the one UI type size */
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body { background: var(--bg); color: var(--fg); font: 400 calc(16 * var(--u))/1.2 var(--sans); }
a { color: inherit; text-decoration: none; }
mark { background: var(--red); color: #fff; }
.empty { padding: 40px 0; color: var(--muted); }
.empty a { text-decoration: underline; }
/* Visually hidden but read by screen readers and crawlers */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 2. Header & nav ———————————————————————————————————————————————————————— */
.site-head { position: fixed; inset: 0 0 auto; z-index: 10; height: var(--hh); display: grid; grid-template-columns: var(--col) 1fr 1fr auto;
  align-items: center; padding: 0 var(--pad); font-size: var(--t); background: var(--bg); }
.site-head > a:hover { opacity: .5; }
.nav { display: flex; gap: clamp(18px, 2vw, 36px); justify-self: end; }
.nav a { position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav a:hover::after,
[data-page="articles"] .nav a[data-nav="articles"]::after,
[data-page="index"] .nav a[data-nav="index"]::after { transform: scaleX(1); }

/* 3. Home: wordmark ——————————————————————————————————————————————————————— */
.hero { padding: 64px var(--pad) 24px; }
.mark { width: 100%; height: auto; display: block; overflow: visible; }
.mark-l { fill: var(--fg); transform-box: fill-box; transform-origin: 50% 100%; }
.js .mark-l { clip-path: inset(100% 0 0 0); }
.mark-rain { position: fixed; top: 0; left: 0; z-index: 9; pointer-events: none; } /* sized in js/mark.js */

/* 4. Home: slider —————————————————————————————————————————————————————————— */
.feat-wrap { padding: 8px var(--pad) 72px; }
.feat { border-top: 1px solid var(--line); }
.feat-top { display: flex; justify-content: space-between; align-items: flex-end; padding: 12px 0 10px; border-bottom: 1px solid var(--line);
  font-size: var(--t); line-height: 1.35; }
.feat-ctl { display: flex; align-items: center; gap: 14px; font-family: var(--mono); }
.feat-btn { font: inherit; background: none; border: 0; color: var(--fg); cursor: pointer; padding: 2px 0; }
.feat-btn:hover:not(:disabled) { background: var(--blue); color: #fff; }
.feat-btn:disabled { color: var(--muted); cursor: default; }
.feat-pos { color: var(--muted); min-width: 56px; text-align: center; }
.feat-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * clamp(20px, 2vw, 40px)) / 2.25); gap: clamp(20px, 2vw, 40px);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 24px 6px 10px 0; scrollbar-width: none; }
.feat-track::-webkit-scrollbar { display: none; }
.detail-mode .feat-wrap { display: none; }

/* 5. Index list ——————————————————————————————————————————————————————————— */
.dir { padding: 0 var(--pad) 120px; }
[data-page="index"] .dir { padding-top: calc(var(--hh) + 28px); }
.table { margin-top: 16px; font-size: var(--t); }
.thead, .row { display: grid; grid-template-columns: 52px minmax(150px, 1.1fr) minmax(120px, .8fr) minmax(0, 2.4fr) minmax(130px, .9fr) 20px; gap: 16px; align-items: center; }
.grouped .thead, .grouped .row { grid-template-columns: 52px minmax(150px, 1.1fr) minmax(0, 2.4fr) minmax(130px, .9fr) 20px; }
.grouped .c-cat { display: none; }
.thead { border-bottom: 1px solid var(--line); padding: 0 0 8px; }
.th { font: inherit; color: var(--muted); background: none; border: 0; text-align: left; padding: 0; cursor: pointer; }
.th.on { color: var(--fg); }
.th[data-order="asc"]::after { content: " ▲"; font-size: calc(8 * var(--u)); }
.th[data-order="desc"]::after { content: " ▼"; font-size: calc(8 * var(--u)); }
span.th { cursor: default; }

.group { display: flex; align-items: flex-start; padding: 28px 0 8px; border-bottom: 3px double var(--line); }
.group:first-child { padding-top: 20px; }
.group h2 { font-weight: 400; font-size: var(--t); line-height: 1.35; }
.group sup, .feat-h sup { font-size: .75em; color: var(--muted); margin-left: 3px; }

.tr { position: relative; border-bottom: 1px dotted var(--line); animation: in .5s var(--ease) both; animation-delay: var(--d); }
@keyframes in { from { opacity: 0; transform: translateY(6px); } }
.row { width: 100%; font: inherit; color: inherit; background: none; border: 0; text-align: left; padding: 9px 0 8px; cursor: pointer; position: relative; isolation: isolate; }
/* Hover: a black bar opens from the middle of the row */
.row::before { content: ""; position: absolute; inset: -1px -8px; background: var(--fg); z-index: -1; clip-path: inset(50% 0 50% 0); transition: clip-path .35s var(--ease); }
.row > span { transition: color .2s, transform .35s var(--ease); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row:hover::before, .is-cursor .row::before, .is-open .row::before { clip-path: inset(0 0 0 0); }
.row:hover, .is-cursor .row, .is-open .row { color: var(--bg); }
.row:hover > span:not(.c-x), .is-cursor .row > span:not(.c-x) { transform: translateX(8px); }
.c-n, .c-dom { font-family: var(--mono); font-size: var(--t); }
.row .c-n, .row .c-cat { color: var(--muted); }
.row:hover .c-n, .is-open .c-n, .is-cursor .c-n { color: inherit; }
.row:hover .c-cat, .is-open .c-cat, .is-cursor .c-cat { color: #999; }
.c-x { position: relative; width: 10px; height: 10px; justify-self: end; }
.c-x::before, .c-x::after { content: ""; position: absolute; left: 0; top: 4.5px; width: 10px; height: 1px; background: currentColor; transition: transform .35s var(--ease); }
.c-x::after { transform: rotate(90deg); }
.is-open .c-x::after { transform: rotate(0); }

/* 6. Detail view ——————————————————————————————————————————————————————————— */
.detail-mode .hero, .detail-mode .sec-bar, .detail-mode .thead { display: none; }
.detail-mode .dir { padding-top: var(--hh); }
.d-sticky { position: sticky; top: var(--hh); z-index: 6; background: var(--bg); }
.d-path { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: var(--t); line-height: 1.35;
  padding: 9px 0 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); }
.d-crumbs { display: flex; align-items: baseline; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; }
.d-crumbs button, .d-crumbs a { font: inherit; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; }
.d-crumbs button:hover, .d-crumbs a:hover { color: var(--fg); text-decoration: underline; }
.d-crumbs i { font-style: normal; color: var(--muted); }
.d-crumbs span { overflow: hidden; text-overflow: ellipsis; }
.d-caret { display: inline-block; width: 7px; height: 12px; background: var(--fg); transform: translateY(2px); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.d-count { color: var(--muted); white-space: nowrap; }

.d-head { border-bottom: 1px solid var(--line); background: var(--bg); }
.d-head.tr { border-bottom-style: solid; }
.d-head .row, .grouped .d-head .row { grid-template-columns: 52px minmax(150px, 1.1fr) minmax(120px, .8fr) minmax(0, 2.4fr) minmax(130px, .9fr) 64px;
  cursor: default; color: var(--fg); }
.d-head .row::before { display: none; }
.d-head .row > span, .d-head .row:hover > span:not(.c-x) { transform: none; }
.d-head .row:hover .c-cat { color: var(--muted); }
.grouped .d-head .c-cat { display: block; }
.d-head .c-n { color: var(--fg); }
.d-head .c-n::before { content: "▶ "; font-size: calc(8 * var(--u)); vertical-align: 1px; }
.d-head .c-cat { color: var(--muted); }
.d-head h1.c-name { font: inherit; }
.d-link { justify-self: start; padding: 1px 0; }
.d-link:hover { background: var(--blue); color: #fff; }
.c-back { font: var(--t) var(--mono); color: inherit; background: none; border: 0; cursor: pointer; justify-self: end; white-space: nowrap; }
.c-back span { display: inline-block; transition: transform .3s var(--ease); }
.c-back:hover span { transform: translateX(-4px); }

.d-body { display: flex; flex-direction: column; gap: 32px; padding: 28px 0 40px; border-bottom: 1px solid var(--line); }
/* Record card under the preview */
.d-card { font: var(--t)/1.5 var(--mono); display: grid; grid-template-columns: auto 1fr;
  grid-template-areas: "rec rec" "cmd nav"; gap: 22px 40px; align-items: start; border-top: 1px solid var(--line); }
.d-rec { grid-area: rec; display: grid; grid-template-columns: minmax(90px, 10%) 1fr; }
.d-rec dt, .d-rec dd { padding: 7px 0; border-bottom: 1px dotted var(--line); }
.d-rec dt { text-transform: uppercase; font-size: calc(10 * var(--u)); color: var(--muted); padding-right: 24px; line-height: 1.8; }
.d-lbl { display: block; font-size: calc(10 * var(--u)); text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.d-rec dd.d-notes { line-height: 1.5; }
.d-rec dd.d-notes { padding-right: max(0px, calc(100% - 64ch)); } /* line runs full width, text keeps a reading measure */
.d-cmd { grid-area: cmd; align-self: flex-start; text-transform: uppercase; font-size: calc(11 * var(--u)); padding: 6px 0; }
.d-cmd:hover { background: var(--blue); color: #fff; }
.d-nav { grid-area: nav; display: flex; justify-content: flex-end; gap: 24px; }
.d-nav a, .d-nav button { font: calc(11 * var(--u)) var(--mono); background: none; border: 0; color: var(--fg); cursor: pointer; padding: 2px 0; text-align: left; }
.d-nav a:hover, .d-nav button:hover { background: var(--blue); color: #fff; }

/* 7. Graveyard ————————————————————————————————————————————————————————————— */
.tr.is-dead .row .c-name, .tr.is-dead .row .c-desc { color: var(--muted); }
.tr.is-dead .row .c-dom { text-decoration: line-through; color: var(--muted); }
.tr.is-dead .row:hover .c-name, .tr.is-dead .row:hover .c-desc, .tr.is-dead .row:hover .c-dom { color: var(--bg); }
.rip { font: normal calc(9 * var(--u)) var(--mono); letter-spacing: .04em; margin-left: 6px; vertical-align: 1px; }
.d-shot.d-grave { background: #000; color: #fff; display: flex; align-items: center; justify-content: center; }
.d-skull { font-size: calc(32 * var(--u)); line-height: 1; }

/* 8. Section bars (The Stash, Articles, The archive) ——————————————————————— */
.sec-bar { position: sticky; top: var(--hh); z-index: 5; background: var(--bg); display: flex; justify-content: space-between; align-items: center; gap: 24px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0 9px; font-size: var(--t); line-height: 1.35; }
.feat-h { font-weight: 400; font-size: inherit; }
.feat-h a:hover { background: var(--blue); color: #fff; }
.sec-tools { display: flex; align-items: center; gap: clamp(20px, 2.4vw, 44px); }
.dds { display: flex; gap: 28px; }
.dd { position: relative; }
.dd-btn { font: inherit; color: var(--fg); background: none; border: 0; padding: 0; display: flex; align-items: baseline; gap: 6px; cursor: pointer; }
.dd-label { color: var(--muted); }
.dd-val { flex: 1; text-align: left; }
.dd-caret { width: 7px; height: 7px; border-right: 1px solid; border-bottom: 1px solid; transform: translateY(-2px) rotate(45deg); transition: transform .3s var(--ease); }
.dd.open .dd-caret { transform: translateY(1px) rotate(225deg); }
.dd-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 100%; width: max-content; list-style: none; background: var(--fg); color: var(--bg);
  padding: 6px 0; z-index: 20; clip-path: inset(0 0 100% 0); pointer-events: none; transition: clip-path .35s var(--ease); }
.dd.open .dd-menu { clip-path: inset(0 0 0 0); pointer-events: auto; }
.dd-menu li { display: flex; align-items: baseline; gap: 6px; padding: 6px 14px; font-size: calc(13 * var(--u)); cursor: pointer; outline: 0;
  transition: padding .25s var(--ease), opacity .2s; }
.dd-menu li sup { font: calc(9 * var(--u)) var(--mono); opacity: .5; }
.dd-menu li[aria-selected="true"]::before { content: "●"; font-size: calc(6 * var(--u)); align-self: center; margin-left: -9px; }
.dd-menu:hover li { opacity: .45; }
.dd-menu li:hover, .dd-menu li:focus { opacity: 1; padding-left: 20px; }
.search { display: flex; align-items: baseline; gap: 8px; min-width: clamp(160px, 14vw, 260px); }
.search input { font: inherit; border: 0; outline: 0; background: none; color: var(--fg); width: 100%; }
.search input::placeholder { color: var(--muted); }

/* 9. Cards (slider, articles grid, "you might also like") ——————————————————— */
.card { scroll-snap-align: start; display: flex; flex-direction: column; gap: clamp(12px, 1.1vw, 20px); color: inherit; }
.card-media { margin: 0; aspect-ratio: 3/2; overflow: hidden; background: var(--wash); }
.card-media video, .card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.card:hover .card-media video, .card:hover .card-media img { transform: scale(1.03); }
.card-meta { font: calc(10 * var(--u)) var(--mono); text-transform: uppercase; letter-spacing: .02em; color: var(--muted); display: flex; gap: 10px; }
.card-meta b { font-weight: 400; color: var(--fg); }
.card-meta i { font-style: normal; }
.card h3 { font: 400 clamp(18px, 1.7vw, 34px)/1.25 var(--mono); letter-spacing: -.03em; }
.card p { font-size: clamp(14px, 1vw, 19px); line-height: 1.45; color: var(--muted); max-width: 52ch; }
.card-cta { font: calc(11 * var(--u)) var(--mono); text-transform: uppercase; align-self: flex-start; padding: 2px 0; }
.card:hover .card-cta { background: var(--blue); color: #fff; }

/* 10. Catalog window (site screenshots framed like an old Mac window) ——————— */
.d-win { margin: 0 4px 0 0; border: 1px solid var(--fg); box-shadow: 4px 4px 0 var(--fg); background: var(--bg); }
.d-bar { display: flex; align-items: center; gap: 10px; height: 22px; padding: 0 8px; border-bottom: 1px solid var(--fg);
  background: repeating-linear-gradient(to bottom, var(--fg) 0 1px, transparent 1px 3px) center/100% 13px no-repeat; }
.d-bar span { background: var(--bg); padding: 0 10px; margin: 0 auto; font: calc(11 * var(--u)) var(--mono); }
.d-box { width: 11px; height: 11px; border: 1px solid var(--fg); background: var(--bg); flex: 0 0 auto; }
.d-shot { display: block; aspect-ratio: 16/10; overflow: hidden; position: relative; cursor: url("/assets/cursor-arrow.svg") 0 0, pointer;
  background: repeating-conic-gradient(#000 0 25%, #fff 0 50%) 0 0/2px 2px; }
.d-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; opacity: 0; filter: grayscale(1) contrast(1.08); transition: opacity .6s, filter .5s; }
.d-shot.ready img { opacity: 1; }
.d-win:hover .d-shot img { filter: none; }
.d-shot:not(.ready):not(.d-grave)::after { content: "Loading preview…"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: var(--bg); border: 1px solid var(--fg); padding: 8px 14px; font: calc(11 * var(--u)) var(--mono); }
.d-shot.noshot::after { content: "No preview on file"; }

/* 11. Articles page ———————————————————————————————————————————————————————— */
.mag { padding: calc(var(--hh) + 28px) var(--pad) 120px; }
.mag-bar { margin-bottom: clamp(28px, 3vw, 56px); }
.mag-lead { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 64px); align-items: end; }
.mag-media { margin: 0; aspect-ratio: 16/10; overflow: hidden; background: var(--wash); }
.mag-media video, .mag-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.mag-lead:hover .mag-media video, .mag-lead:hover .mag-media img { transform: scale(1.025); }
.mag-lead-txt { display: flex; flex-direction: column; gap: clamp(12px, 1.2vw, 22px); padding-bottom: 4px; }
.mag-lead h2 { font: 400 clamp(28px, 3.3vw, 68px)/1.04 var(--mono); letter-spacing: -.045em; }
.mag-lead p { font-size: clamp(15px, 1.15vw, 22px); line-height: 1.4; color: var(--muted); max-width: 36ch; }
.mag-lead:hover .card-cta { background: var(--blue); color: #fff; }
.mag-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 48px); margin-top: clamp(56px, 6vw, 120px);
  padding-top: clamp(20px, 2vw, 32px); border-top: 1px solid var(--line); }
.mag-grid .card h3 { font-size: clamp(17px, 1.4vw, 28px); }
.mag-archive { margin-top: clamp(72px, 8vw, 160px); }
.mag-archive .sec-bar { position: static; }
.list-row.mag-row { grid-template-columns: 52px minmax(0, 2.6fr) minmax(120px, .9fr) minmax(140px, .9fr) 20px; }

/* 12. Article page ————————————————————————————————————————————————————————— */
.art { padding-top: var(--hh); }
.art > .d-path { position: sticky; top: var(--hh); z-index: 6; }
.art-grid { display: grid; grid-template-columns: clamp(200px, 17vw, 340px) minmax(0, 1fr); gap: 0 clamp(40px, 4vw, 96px); padding-top: 40px; max-width: 1800px; margin: 0 auto; }
.art-main { min-width: 0; }
.art-main > * { max-width: 1400px; }
.art-rail { position: sticky; top: 100px; align-self: start; display: flex; flex-direction: column; gap: 14px; font: calc(11 * var(--u)) var(--mono); }
.art-rec { font: var(--t)/1.5 var(--mono); border-top: 1px solid var(--line); margin-bottom: 6px; }
.art-rec dd { overflow-wrap: anywhere; }
.art-rail .d-cmd { padding: 2px 0; }
.art-head { padding: 0 0 32px; }
.art-head h1 { font: 400 clamp(26px, 2.9vw, 64px)/1.08 var(--mono); letter-spacing: -.04em; max-width: 22ch; }
.art-dek { margin-top: 18px; font-size: clamp(17px, 1.3vw, 21px); line-height: 1.4; color: var(--muted); max-width: 48ch; }
.art-media { margin: 0 0 56px; max-width: min(100%, 1400px); }
/* Tall (portrait/square) media: cropped to 4:5 and kept to the reading column */
.art-media.is-tall .art-media-in { display: block; width: min(100%, calc(38 * clamp(17px, calc(12px + 0.4vw), 22px))); }
.art-media.is-tall video, .art-media.is-tall img { width: 100%; aspect-ratio: 4 / 5; max-height: 72vh; object-fit: cover; }
.art-media-in { display: block; background: var(--wash); cursor: url("/assets/cursor-arrow.svg") 0 0, pointer; }
.art-media video, .art-media img { width: 100%; height: auto; max-height: 80vh; object-fit: cover; display: block; }
.art-media figcaption { margin-top: 8px; font: calc(10 * var(--u)) var(--mono); text-transform: uppercase; letter-spacing: .02em; color: var(--muted); }
.art-media figcaption a:hover { background: var(--blue); color: #fff; }
.art-embed { aspect-ratio: 16/9; background: #000; }
.art-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.art-inline { margin: 2em 0 2.2em; }
.art-win { margin: 2.2em 4px 2.4em 0; }
.art-win .d-shot img { opacity: 1; }
.art-body { max-width: 38em; font-size: clamp(17px, calc(12px + 0.4vw), 22px); line-height: 1.6; }
.art-body p { margin: 0 0 1.1em; }
.art-body h2 { font: calc(11 * var(--u)) var(--mono); text-transform: uppercase; letter-spacing: .04em; margin: 2.6em 0 1.1em; padding-top: 10px; border-top: 1px solid var(--line); }
.art-body strong { font-weight: 600; }
.art-body a { text-decoration: underline; text-underline-offset: 3px; }
.art-body a:hover { background: var(--blue); color: #fff; text-decoration: none; }
.art-body .art-win a { text-decoration: none; }
.art-body .art-win a:hover { background: none; }
.art-body ul { list-style: none; margin: 0 0 1.1em; border-top: 1px dotted var(--line); }
.art-body li { padding: .55em 0 .55em 1.4em; border-bottom: 1px dotted var(--line); position: relative; }
.art-body li::before { content: "→"; position: absolute; left: 0; top: .75em; font-family: var(--mono); font-size: .8em; }
.art-sign { margin-top: 2.2em; padding-top: 12px; border-top: 1px solid var(--line); font: calc(11 * var(--u)) var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.read-bar { position: fixed; top: var(--hh); left: 0; right: 0; height: 2px; background: var(--blue); z-index: 12; transform: scaleX(0); transform-origin: left; pointer-events: none; }
.art-answer { max-width: 38em; margin: 0 0 2.4em; padding: 14px 0 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.art-answer p { font-size: clamp(16px, calc(11px + 0.4vw), 21px); line-height: 1.5; }
.art-facts { max-width: 38em; margin-top: 40px; }
.art-facts .d-lbl { margin-bottom: 8px; }
.art-facts .d-rec { grid-template-columns: minmax(120px, auto) 1fr; }
.art-load { color: var(--muted); font: calc(11 * var(--u)) var(--mono); }
.art-foot { font: calc(11 * var(--u)) var(--mono); max-width: calc(38 * clamp(17px, calc(12px + 0.4vw), 22px)); margin-top: 56px; padding-top: 14px;
  border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.art-foot .d-nav { justify-content: space-between; }
.art-miss { padding: 120px 0; }
/* You might also like */
.also { margin-top: clamp(72px, 7vw, 140px); border-top: 1px solid var(--line); padding-top: 12px; }
.also-h { font-weight: 400; font-size: var(--t); margin-bottom: clamp(20px, 2vw, 32px); }
.also-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2vw, 40px); }
.also-cards .card h3 { font-size: clamp(16px, 1.25vw, 24px); }
.also-list { margin-top: clamp(48px, 5vw, 88px); }
.also-sub { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 10px; border-bottom: 1px solid var(--line);
  font: calc(11 * var(--u)) var(--mono); text-transform: uppercase; letter-spacing: .02em; }
.also-sub span { color: var(--muted); }
.also-sub a:hover { background: var(--blue); color: #fff; }

/* 13. Shared list rows (archive, "from the stash") ————————————————————————— */
.list-row { display: grid; grid-template-columns: 52px minmax(140px, 1fr) minmax(0, 2.2fr) minmax(120px, .9fr) 20px; gap: 16px; align-items: center;
  padding: 9px 0 8px; border-bottom: 1px solid var(--line); font-size: var(--t); position: relative; isolation: isolate; transition: color .2s; }
.list-row::before { content: ""; position: absolute; inset: -1px -8px; background: var(--fg); z-index: -1; clip-path: inset(50% 0 50% 0); transition: clip-path .35s var(--ease); }
.list-row:hover { color: var(--bg); }
.list-row:hover::before { clip-path: inset(0 0 0 0); }
.list-row .c-n { color: var(--muted); }
.list-row:hover .c-n { color: inherit; }
.list-row > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-go { justify-self: end; font-family: var(--mono); }

/* 14. Video controls ——————————————————————————————————————————————————————— */
.vid-toggle { position: absolute; right: 10px; bottom: 10px; z-index: 2; width: 28px; height: 28px; display: grid; place-items: center;
  background: rgba(0, 0, 0, .72); color: #fff; border: 1px solid rgba(255, 255, 255, .35); padding: 0; cursor: pointer; transition: background .2s; }
.vid-toggle svg { width: 10px; height: 10px; fill: currentColor; }
.vid-toggle:hover { background: var(--blue); border-color: var(--blue); }
.vid-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.media-src { position: absolute; left: 10px; bottom: 10px; z-index: 2; height: 28px; min-width: 28px; display: flex; align-items: center; gap: 8px;
  padding: 0 8px; background: rgba(0, 0, 0, .72); color: #fff; border: 1px solid rgba(255, 255, 255, .35); cursor: pointer; transition: background .2s;
  font: calc(10 * var(--u)) var(--mono); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; max-width: calc(100% - 58px); }
.media-src svg { width: 10px; height: 10px; flex: none; }
.media-src span { display: none; overflow: hidden; text-overflow: ellipsis; }
.media-src:hover, .media-src:focus-visible { background: var(--blue); border-color: var(--blue); }
.media-src:hover span, .media-src:focus-visible span { display: block; }
.media-src:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* 15. Footer ——————————————————————————————————————————————————————————————— */
.site-foot { margin-top: clamp(96px, 10vw, 200px); padding: 0 var(--pad) 28px; font-size: var(--t); line-height: 1.5; }
.detail-mode .site-foot { margin-top: 64px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 80px); border-top: 1px solid var(--line); padding-top: 12px; }
.foot-h { font-weight: 400; font-size: inherit; color: var(--muted); margin-bottom: 10px; }
.foot-about p, .foot-credits p { max-width: 52ch; margin-bottom: .9em; }
.foot-about a { text-decoration: underline; text-underline-offset: 3px; }
.foot-links { display: flex; flex-direction: column; gap: 4px; }
.site-foot a:hover { background: var(--blue); color: #fff; text-decoration: none; }
.foot-base { display: flex; justify-content: space-between; gap: 16px; margin-top: clamp(48px, 5vw, 96px); padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); }

/* Responsive ——————————————————————————————————————————————————————————————— */
@media (max-width: 900px) {
  .feat-track { grid-auto-columns: 78%; }
  .mag-lead { grid-template-columns: 1fr; }
  .mag-grid, .also-cards { grid-template-columns: 1fr 1fr; }
  .list-row, .list-row.mag-row { grid-template-columns: 36px 1fr 16px; }
  .list-row .m-desc, .list-row .c-dom { display: none; }
  /* Article on mobile: title, hero media, record, then the body */
  .art-grid { display: flex; flex-direction: column; }
  .art-main { display: contents; }
  .art-head { order: 1; }
  .art-media { order: 2; margin-bottom: 24px; }
  .art-answer { order: 3; }
  .art-rail { order: 4; position: static; align-self: stretch; margin-bottom: 36px; }
  .art-rail .d-cmd { display: none; }
  .art-body { order: 5; }
  .art-facts { order: 5; }
  .art-foot { order: 6; }
  .also { order: 7; }
}
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  :root { --col: 1fr; }
  .site-head { grid-template-columns: 1fr auto; }
  .site-head .hide-sm { display: none; }
  .feat-track { grid-auto-columns: 88%; gap: 14px; }
  .sec-bar { flex-wrap: wrap; row-gap: 10px; }
  /* Filters on phones: Category + Sort share a row, Search gets its own full-width row */
  .sec-tools { width: 100%; flex-wrap: wrap; row-gap: 12px; column-gap: 0; }
  .dds { width: 100%; gap: 20px; }
  .dd { flex: 1; min-width: 0; }
  .dd-btn { width: 100%; white-space: nowrap; }
  .dd-val { overflow: hidden; text-overflow: ellipsis; }
  .dd-caret { margin-right: 2px; }
  .dd + .dd .dd-menu { left: auto; right: 0; }
  .search { width: 100%; min-width: 0; flex: none; padding-top: 10px; border-top: 1px dotted var(--line); }
  /* Index on phones: no numbers, name + description stacked, one type size */
  .thead, .row, .grouped .thead, .grouped .row { grid-template-columns: 1fr 16px; gap: 10px; }
  .thead .c-n, .thead .c-cat, .thead .c-desc, .thead .c-dom, .row .c-n, .row .c-cat, .row .c-dom { display: none; }
  .row { grid-template-areas: "name x" "desc ."; row-gap: 3px; font-size: var(--t); }
  .row .c-name { grid-area: name; }
  .row .c-x { grid-area: x; }
  .row .c-desc { grid-area: desc; white-space: normal; color: var(--muted); }
  .row:hover > span:not(.c-x), .is-cursor .row > span:not(.c-x) { transform: none; }
  .d-head .row, .grouped .d-head .row { grid-template-columns: 1fr auto; }
  .d-head .c-n, .d-head .c-cat, .grouped .d-head .c-cat, .d-head .c-dom, .d-head .c-desc { display: none; }
  .list-row, .list-row.mag-row { grid-template-columns: 1fr 16px; }
  .list-row .c-n { display: none; }
  .d-card { grid-template-columns: 1fr; grid-template-areas: "rec" "cmd" "nav"; }
  .d-nav { justify-content: space-between; }
}
@media (max-width: 600px) { .mag-grid, .also-cards { grid-template-columns: 1fr; } }
.art-facts h2.d-lbl { font-weight: 400; }
.art-sign span { color: var(--muted); margin-right: 6px; }
.foot-door:hover { background: none !important; color: var(--muted) !important; cursor: default; }

/* 16. Back office ————————————————————————————————————————————————————————— */
.bo { padding: var(--hh) var(--pad) 80px; font-size: var(--t); min-height: 80vh; }
.bo.bo-loading { opacity: .4; pointer-events: none; transition: opacity .2s; }
.bo-top { position: sticky; top: var(--hh); z-index: 6; background: var(--bg); }
.bo-ctl { display: flex; align-items: center; gap: 14px; font-family: var(--mono); }
.bo-ctl button { font: inherit; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px 4px; }
.bo-ctl button:hover { background: var(--blue); color: #fff; }
.bo-ctl button.on { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }
.bo-live { color: var(--fg); display: inline-flex; align-items: center; gap: 6px; }
.bo-live b { width: 6px; height: 6px; background: var(--blue); animation: blink 1s steps(1) infinite; }
.bo-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.bo-kpis > div { padding: 18px 16px 16px 0; display: flex; flex-direction: column; gap: 8px; border-right: 1px dotted var(--line); }
.bo-kpis > div + div { padding-left: 16px; }
.bo-kpis > div:last-child { border-right: 0; }
.bo-kpis b { font: 400 clamp(28px, 3vw, 56px)/1 var(--mono); letter-spacing: -.04em; }
.bo-small { grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 0; }
.bo-small b { font-size: clamp(22px, 2vw, 36px); }
.bo-delta { font: calc(10 * var(--u)) var(--mono); color: var(--muted); }
.bo-delta.up { color: var(--blue); }
.bo-delta.down { color: var(--red); }
.bo-trend { display: flex; align-items: flex-end; gap: 2px; height: 90px; padding: 14px 0 0; border-bottom: 1px solid var(--line); }
.bo-trend span { flex: 1; height: var(--h); background: var(--fg); min-width: 2px; }
.bo-trend span:hover { background: var(--blue); }
.bo-sec { margin-top: 56px; }
.bo-sec .sec-bar { position: static; }
.bo-note { color: var(--muted); }
.bo-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.bo-table { margin-top: 4px; }
.bo-row { display: grid; grid-template-columns: var(--cols); gap: 16px; align-items: center; padding: 8px 0 7px; border-bottom: 1px dotted var(--line); }
.bo-row > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bo-row > span:first-child { font-family: var(--mono); }
.bo-head { color: var(--muted); border-bottom: 1px solid var(--line); }
.bo-head > span:first-child { font-family: inherit; }
.bo-row a:hover { background: var(--blue); color: #fff; }
.bo-bar { display: block; height: 6px; width: var(--w); background: var(--blue); }
.bo-miss { font-weight: 400; color: var(--red); }
.bo-gate { max-width: 520px; padding: 18vh 0 0; display: flex; flex-direction: column; gap: 16px; }
.bo-gate h1 { font: 400 clamp(32px, 4vw, 64px)/1 var(--mono); letter-spacing: -.04em; }
.bo-gate p { font-size: calc(14 * var(--u)); line-height: 1.5; color: var(--muted); }
.bo-signin { align-self: flex-start; font: calc(12 * var(--u)) var(--mono); text-transform: uppercase; background: none; border: 0; padding: 4px 0; cursor: pointer; }
.bo-signin:hover { background: var(--blue); color: #fff; }
.bo-err { color: var(--red) !important; font-family: var(--mono); font-size: var(--t) !important; }
@media (max-width: 900px) {
  .bo-kpis { grid-template-columns: repeat(3, 1fr); }
  .bo-kpis > div:nth-child(3) { border-right: 0; }
  .bo-cols { grid-template-columns: 1fr; }
  .bo-ctl { gap: 8px; }
}

/* Consent bar (EU/UK) */
.consent { position: fixed; left: var(--pad); right: var(--pad); bottom: 14px; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  background: var(--bg); border: 1px solid var(--line); box-shadow: 4px 4px 0 var(--fg); padding: 12px 16px; font-size: var(--t); line-height: 1.45;
  animation: consent-in .5s var(--ease) both; }
@keyframes consent-in { from { transform: translateY(20px); opacity: 0; } }
.consent a { text-decoration: underline; text-underline-offset: 3px; }
.consent-btns { display: flex; gap: 16px; flex: 0 0 auto; }
.consent button { font: calc(11 * var(--u)) var(--mono); text-transform: uppercase; background: none; border: 0; color: var(--fg); cursor: pointer; padding: 3px 2px; }
.consent button:hover, .consent button:focus-visible { background: var(--blue); color: #fff; outline: 0; }
@media (max-width: 600px) { .consent { flex-direction: column; align-items: flex-start; gap: 10px; } }

/* Card button: the consent-bar treatment (border + hard shadow) used for "Visit" on articles */
.btn-card { align-self: flex-start; display: inline-block; font: calc(11 * var(--u)) var(--mono); text-transform: uppercase; letter-spacing: .02em;
  background: var(--bg); color: var(--fg); border: 1px solid var(--line); box-shadow: 4px 4px 0 var(--fg); padding: 10px 14px 9px;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s, color .15s; }
.btn-card:hover, .mag-lead:hover .btn-card { background: var(--blue); color: #fff; border-color: var(--fg); }
.btn-card:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--fg); }
.btn-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.art-rail .btn-card { margin: 4px 0 6px; }
.art-foot .btn-card { margin-bottom: 8px; }
@media (max-width: 900px) { .art-rail .btn-card { display: none; } }

/* Article headline typing (js/article.js). Hidden until the script takes over; the fallback
   animation shows it anyway if the script never runs. */
.js .art-head h1:not(.typed) { animation: h-show 0s 1.5s both; visibility: hidden; }
@keyframes h-show { to { visibility: visible; } }
.h-caret { width: .5em; height: .82em; margin-left: .08em; transform: translateY(.08em); }
