/*
 * Nuggit design system. Served as a static, versioned asset (CSP style-src 'self'); pages carry no inline styles.
 * Motif: the faceted nugget. Large surfaces get two chamfered corners (top left, bottom right) and a gold edge
 * that catches light from the top left. Gold marks value and action; everything else stays in the blue-grey ground.
 * Sections: fonts, tokens, base, shell, page head, components, video cards, video list, auth pages, content pages
 * (detail, submit, status, search), small screens, motion.
 */

/* ---------- Fonts (SIL OFL, self-hosted, latin subset) ---------- */

@font-face {
  font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/barlow-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/barlow-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/barlow-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Chakra Petch"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/chakra-petch-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Chakra Petch"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/chakra-petch-latin-700-normal.woff2") format("woff2");
}

/* Registered so the gold edge can fade between states instead of jumping. */
@property --edge-hi {
  syntax: "<color>";
  inherits: false;
  initial-value: rgba(255, 211, 107, 0.72);
}
@property --edge-lo {
  syntax: "<color>";
  inherits: false;
  initial-value: rgba(59, 67, 87, 0.75);
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: dark;

  /* Ground: the brand blue-grey and its layers, from the deepest well to the highest surface. */
  --bg: #14171f;
  --bg-deep: #0e1117;
  --surface-1: #1a1e28;
  --surface-2: #212634;
  --surface-3: #282e3e;
  --line: #2c3242;
  --line-strong: #3b4357;
  --line-hover: #56607a;
  /* Boundaries of form controls: at least 3:1 against every surface they sit on (#14171f to #1f2431), WCAG 1.4.11. */
  --line-field: #6b7590;
  --line-field-hover: #8e98ae;

  /* Text (all at least WCAG AA on every surface above). */
  --text: #eee9dd;
  --text-2: #c9c3b4;
  --muted: #949db0;

  /* Gold, light to dark, as in the icon facets. */
  --gold-1: #ffd36b;
  --gold-2: #f2b33d;
  --gold-3: #e8a732;
  --gold-4: #c98a1e;
  --gold-hot: #ffe08f;
  --ink: #14171f;

  /* Signals */
  --ok: #8fd3a8;
  --info: #9fc3ea;
  --bad: #ff8a7a;
  --neutral: #a7aebd;

  /* Gradients */
  --gold-fill: linear-gradient(160deg, #ffd36b 0%, #f2b33d 52%, #e8a732 100%);
  --gold-fill-hot: linear-gradient(160deg, #ffe08f 0%, #ffc552 52%, #f2b33d 100%);
  --gold-rule: linear-gradient(90deg, transparent, rgba(242, 179, 61, 0.5) 18%, rgba(255, 211, 107, 0.85) 50%, rgba(242, 179, 61, 0.5) 82%, transparent);
  --surface-fill: linear-gradient(180deg, #1e2331 0%, #191d27 100%);
  --well-fill: linear-gradient(180deg, #0c0f14 0%, #10131a 100%);

  /* Facets: chamfer size for large surfaces, small labels and the icon tile. */
  --cut-lg: 20px;
  --cut-md: 12px;
  --cut-sm: 6px;

  /* Radii: controls get a soft corner, pills only for counts. Surfaces use chamfers instead of radii. */
  --r-sm: 6px;
  --r-md: 10px;

  /* Spacing (4 px grid) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;

  /* Depth: filters for chamfered surfaces (box-shadow would be clipped), box shadows for everything else. */
  --lift-1: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45)) drop-shadow(0 10px 22px rgba(3, 5, 9, 0.38));
  --lift-2: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5)) drop-shadow(0 22px 38px rgba(3, 5, 9, 0.55));
  --shadow-control: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-well: inset 0 2px 5px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(0, 0, 0, 0.2);
  --shadow-float: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 18px 40px rgba(3, 5, 9, 0.6), 0 2px 6px rgba(0, 0, 0, 0.5);

  /* Type: Chakra Petch for display and controls, Barlow for running text. Scale about 1.25 from 17 px. */
  --font-display: "Chakra Petch", "Barlow", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-xs: 0.8125rem;   /* 13 */
  --fs-sm: 0.9375rem;   /* 15 */
  --fs-md: 1.0625rem;   /* 17 */
  --fs-lg: 1.25rem;     /* 20 */
  --fs-xl: 1.625rem;    /* 26 */
  --fs-2xl: 2.125rem;   /* 34 */
  --fs-3xl: 2.75rem;    /* 44 */

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --page-wide: 1320px;
  --page-text: 820px;
  --gutter: 16px;
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (min-width: 1000px) {
  html { scroll-padding-top: 140px; }
}
@media (min-width: 1180px) {
  html { scroll-padding-top: 88px; }
}

body {
  margin: 0;
  min-height: 100vh;
  isolation: isolate;
  color: var(--text);
  font: 400 var(--fs-md) / 1.55 var(--font-body);
  font-kerning: normal;
  background:
    radial-gradient(1100px 460px at 50% -200px, rgba(242, 179, 61, 0.11) 0%, rgba(242, 179, 61, 0.05) 45%, rgba(242, 179, 61, 0.015) 75%, transparent 100%),
    radial-gradient(900px 640px at 105% -10%, rgba(96, 120, 170, 0.09), transparent 62%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Fine grain over the ground only (sits below content), from a local SVG asset. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("/assets/ui/grain.svg") repeat;
  opacity: 0.2;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
  text-wrap: balance;
}
h1 { font-size: clamp(var(--fs-2xl), 1.5rem + 1.8vw, var(--fs-3xl)); line-height: 1.08; letter-spacing: -0.005em; margin: 0; }
h2 { font-size: var(--fs-xl); line-height: 1.2; margin: var(--s-7) 0 var(--s-3); }
h3 { font-size: var(--fs-md); line-height: 1.3; margin: 0 0 var(--s-1); }
p { margin: 0 0 var(--s-3); }

a { color: var(--gold-1); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--gold-hot); }

:focus-visible { outline: 2px solid var(--gold-1); outline-offset: 2px; }

img { max-width: 100%; }

::selection { background: rgba(242, 179, 61, 0.35); color: var(--text); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 100;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-sm);
  background: var(--gold-fill);
  color: var(--ink);
  font: 600 var(--fs-sm) / 1.4 var(--font-display);
  text-decoration: none;
}
.skip:focus { top: var(--s-2); color: var(--ink); outline-color: var(--text); }

/* Shared chamfer: two cut corners. Each element sets --cut; the inner layer sits 1 px inside, so its cut shrinks by
   sqrt(2) - 2 px to keep the gold edge equally thick along the diagonals. */
.vcard-frame, .card, .panel, .auth-panel, .empty, .notice, .chip, .verdict, .vcard-frame::before, .card::before, .panel::before, .auth-panel::before, .empty::before, .notice::before {
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.vcard-frame::before, .card::before, .panel::before, .auth-panel::before, .empty::before, .notice::before {
  --cut: var(--cut-in);
}

/* ---------- Shell ---------- */

.topbar {
  position: relative;
  z-index: 20;
  background: rgba(20, 23, 31, 0.96);
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--gold-rule);
  opacity: 0.55;
}
.topbar-inner {
  max-width: var(--page-wide);
  margin: 0 auto;
  padding: var(--s-3) var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr minmax(380px, 540px) auto;
  grid-template-areas: "brand nav seek out";
  align-items: center;
  gap: var(--s-3) var(--s-5);
}

.brand { grid-area: brand; }
.lockup { display: inline-flex; align-items: center; gap: 0.32em; text-decoration: none; color: var(--gold-1); line-height: 1; }
.lockup img { height: 1.15em; width: auto; display: block; }
.wordmark { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.01em; }
.topbar .lockup { font-size: 1.5rem; padding: var(--s-1) 0; }
.topbar .lockup:hover { color: var(--gold-hot); }

.mainnav { grid-area: nav; }
.mainnav ul { display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; list-style: none; }
.mainnav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s-3);
  border-radius: var(--r-sm);
  color: var(--text-2);
  font: 600 var(--fs-sm) / 1 var(--font-display);
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}
.mainnav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.mainnav a[aria-current="page"] { color: var(--gold-1); }
/* The current page carries a small gold facet bar, cut like the nugget edges. */
.mainnav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: var(--s-3); right: var(--s-3); bottom: 4px;
  height: 3px;
  background: var(--gold-fill);
  clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%);
}

.signout { grid-area: out; margin: 0; }
.signout button {
  min-height: 44px;
  padding: 0 var(--s-3);
  border: 1px solid transparent;
  background: none;
  box-shadow: none;
  color: var(--muted);
  font: 600 var(--fs-sm) / 1 var(--font-display);
}
.signout button:hover { color: var(--text); border-color: var(--line); background: rgba(255, 255, 255, 0.03); }

/* Search with category, one instrument in the bar. */
.seek {
  grid-area: seek;
  display: flex;
  align-items: stretch;
  min-height: 46px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background:
    var(--well-fill) padding-box,
    linear-gradient(160deg, #c9a75a, var(--line-field) 40%, var(--line-field) 70%, #9c8452) border-box;
  box-shadow: var(--shadow-well);
  transition: background 0.2s, box-shadow 0.2s;
}
.seek:focus-within {
  background:
    var(--well-fill) padding-box,
    linear-gradient(160deg, var(--gold-1), rgba(201, 138, 30, 0.7) 45%, rgba(242, 179, 61, 0.6)) border-box;
  box-shadow: var(--shadow-well), 0 0 0 3px rgba(242, 179, 61, 0.16);
}
.seek-icon { flex: none; align-self: center; margin-left: var(--s-3); color: var(--muted); }
.seek input[type="search"] {
  flex: 1;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 var(--s-3);
  color: var(--text);
}
.seek input[type="search"]:focus, .seek input[type="search"]:focus-visible { outline: none; }
.seek select {
  flex: 0 0 auto;
  width: 13.5rem;
  max-width: 42%;
  min-height: 0;
  border: 0;
  border-left: 1px solid var(--line-field);
  border-radius: 0;
  box-shadow: none;
  background-color: transparent;
  padding: 0 32px 0 var(--s-3);
  background-position: right 12px center;
  color: var(--text-2);
  font-size: var(--fs-sm);
  text-overflow: ellipsis;
}
.seek select:focus-visible { outline: 2px solid var(--gold-1); outline-offset: -3px; border-radius: 4px; }
.seek-go {
  flex: none;
  margin: 4px;
  min-height: 0;
  padding: 0 var(--s-4);
  border-radius: 7px;
}
.seek-go svg { display: none; }

@media (min-width: 1000px) {
  .topbar { position: sticky; top: 0; }
}

@media (max-width: 1179px) {
  .topbar-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand seek out" "nav nav nav";
    row-gap: var(--s-2);
  }
  .mainnav { margin: 0 calc(var(--s-3) * -1); }
}

@media (max-width: 719px) {
  .topbar-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand out" "seek seek" "nav nav";
    padding-top: var(--s-2);
    padding-bottom: var(--s-1);
    gap: var(--s-2);
  }
  .topbar .lockup { font-size: 1.35rem; }
  .seek-icon { display: none; }
  .seek select { max-width: 40%; padding-right: 28px; background-position: right 10px center; }
  .seek-go { width: 44px; margin: 3px; padding: 0; }
  .seek-go span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .seek-go svg { display: block; }
  .mainnav { margin: 0 -8px; }
  .mainnav ul { gap: 0; }
  .mainnav a { padding: 0 9px; font-size: 0.9rem; }
  .mainnav a[aria-current="page"]::after { left: 9px; right: 9px; }
}

main {
  max-width: var(--page-wide);
  margin: 0 auto;
  padding: var(--s-6) var(--gutter) var(--s-8);
  counter-reset: picked;
}
main.text { max-width: calc(var(--page-text) + 2 * var(--gutter)); }
main.text > h1 { margin-bottom: var(--s-3); }

/* ---------- Page head ---------- */

.pagehead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4) var(--s-6);
  margin-bottom: var(--s-6);
}
.pagehead-text { max-width: 60ch; }
.pagehead-text p { margin: var(--s-2) 0 0; color: var(--muted); }

/* Readout: a row of counters, set like the display of a measuring instrument. */
.readout {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(14, 17, 23, 0.6);
  box-shadow: var(--shadow-well);
  overflow: hidden;
}
.readout li { display: flex; }
.readout li + li { border-left: 1px solid var(--line); }
.readout a, .readout span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4em;
  min-height: 44px;
  padding: 0.6rem var(--s-4);
  color: var(--text-2);
  font-size: var(--fs-sm);
  text-decoration: none;
  line-height: 1.3;
}
.readout a:hover { color: var(--text); background: rgba(255, 255, 255, 0.035); }
.readout a:focus-visible { outline-offset: -3px; }
.readout strong {
  font: 600 var(--fs-lg) / 1 var(--font-display);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.readout .is-gold strong { color: var(--gold-1); }
.readout .is-bad strong { color: var(--bad); }

@media (max-width: 719px) {
  .pagehead { margin-bottom: var(--s-5); }
  .readout { width: 100%; }
  .readout li { flex: 1 1 50%; }
  .readout li + li { border-left: 0; }
  .readout li:nth-child(even) { border-left: 1px solid var(--line); }
  .readout li:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .readout a, .readout span { width: 100%; padding: 0.55rem var(--s-3); }
}

/* ---------- Components ---------- */

/* Buttons */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: 0 var(--s-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: linear-gradient(180deg, #272d3c 0%, #1f2431 100%);
  box-shadow: var(--shadow-control);
  color: var(--text);
  font: 600 var(--fs-sm) / 1.1 var(--font-display);
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
button:hover, .btn:hover { color: var(--text); border-color: var(--line-hover); background: linear-gradient(180deg, #2d3445 0%, #242a39 100%); }
button:active, .btn:active { transform: translateY(1px); }

button.primary, .btn.primary {
  color: var(--ink);
  border-color: rgba(201, 138, 30, 0.9);
  background: var(--gold-fill);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 -1px 0 rgba(120, 70, 0, 0.25) inset, 0 6px 18px rgba(242, 179, 61, 0.16);
}
button.primary:hover, .btn.primary:hover { color: var(--ink); border-color: var(--gold-3); background: var(--gold-fill-hot); }
button.primary:focus-visible, .btn.primary:focus-visible { outline-color: var(--text); }

button.ghost, .btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
button.ghost:hover, .btn.ghost:hover { background: rgba(255, 255, 255, 0.04); border-color: var(--line); color: var(--text); }

button.danger { color: var(--bad); }

/* Fields */
input[type="text"], input[type="search"], input[type="email"], input[type="password"], select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line-field);
  border-radius: var(--r-sm);
  background-color: var(--bg-deep);
  box-shadow: var(--shadow-well);
  color: var(--text);
  font: 400 var(--fs-md) / 1.3 var(--font-body);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: var(--muted); opacity: 1; }
input[type="text"]:hover, input[type="search"]:hover, input[type="email"]:hover, input[type="password"]:hover, select:hover { border-color: var(--line-field-hover); }
input[type="text"]:focus, input[type="search"]:focus, input[type="email"]:focus, input[type="password"]:focus, select:focus {
  outline: none;
  border-color: var(--gold-2);
  box-shadow: var(--shadow-well), 0 0 0 3px rgba(242, 179, 61, 0.22);
}
select {
  appearance: none;
  padding-right: 38px;
  background-image: url("/assets/ui/chevron.svg");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  cursor: pointer;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--gold-2); }

label { display: block; margin: var(--s-4) 0 var(--s-1); color: var(--text-2); font-weight: 500; }

/* Chips: categories. Small chamfered tags, not focusable (so the clip cannot cut a focus ring). */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chip {
  --cut: var(--cut-sm);
  padding: 5px 10px 5px 11px;
  background: var(--surface-3);
  color: var(--text-2);
  font: 500 var(--fs-xs) / 1.2 var(--font-body);
  letter-spacing: 0.01em;
}

/* Badges: states and signals, inline in text rows. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text-2);
  font: 600 var(--fs-xs) / 1.4 var(--font-display);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; transform: rotate(45deg); background: currentColor; flex: none; }
.badge.ok, .badge.state-read { color: var(--ok); }
.badge.warn, .badge.state-inbox { color: var(--gold-1); }
.badge.bad { color: var(--bad); }
.badge.state-deferred { color: var(--info); }
.badge.state-archived { color: var(--neutral); }

/* Panels: generic chamfered surfaces with a quieter edge than video cards. */
.card, .panel, .empty, .notice {
  --cut: var(--cut-md);
  --cut-in: calc(var(--cut-md) - 0.59px);
  position: relative;
  isolation: isolate;
  background: linear-gradient(150deg, rgba(255, 211, 107, 0.34), rgba(59, 67, 87, 0.75) 35%, rgba(59, 67, 87, 0.6) 75%, rgba(242, 179, 61, 0.22));
}
.card::before, .panel::before, .empty::before, .notice::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  background: var(--surface-fill);
}
.card { padding: var(--s-4) var(--s-5); margin: var(--s-3) 0; }
.panel { padding: var(--s-5); }

.notice { padding: var(--s-3) var(--s-5) var(--s-3) calc(var(--s-5) + 4px); margin: var(--s-4) 0; }
.notice::after {
  content: "";
  position: absolute;
  left: 1px; top: var(--cut); bottom: 1px;
  width: 3px;
  background: var(--gold-fill);
}
.notice.bad { background: linear-gradient(150deg, rgba(255, 138, 122, 0.5), rgba(59, 67, 87, 0.75) 40%, rgba(59, 67, 87, 0.6)); }
.notice.bad::after { background: var(--bad); }
.notice p:last-child { margin-bottom: 0; }

/* Empty states: an invitation, with the nugget mark as a quiet watermark. */
.empty {
  --cut: var(--cut-lg);
  --cut-in: calc(var(--cut-lg) - 0.59px);
  display: grid;
  justify-items: center;
  gap: var(--s-3);
  padding: var(--s-7) var(--s-5);
  text-align: center;
}
.empty img { width: 72px; height: auto; opacity: 0.55; filter: saturate(0.85); }
.empty h2 { margin: var(--s-2) 0 0; font-size: var(--fs-lg); }
.empty p { margin: 0; color: var(--muted); max-width: 46ch; }
.empty .btn { margin-top: var(--s-2); }

.meta, .muted { color: var(--muted); font-size: var(--fs-sm); }

.pager { margin: var(--s-6) 0 0; display: flex; justify-content: center; }
.pager .btn { min-width: 160px; }

/* ---------- Video cards ---------- */

.vgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: var(--s-6) var(--s-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.vcard {
  --cut: var(--cut-lg);
  display: flex;
  filter: var(--lift-1);
  transition: filter 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.vcard:hover, .vcard:focus-within { filter: var(--lift-2); transform: translateY(-3px); }

.vcard-frame {
  --cut-in: calc(var(--cut-lg) - 0.59px);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  width: 100%;
  background: linear-gradient(145deg, var(--edge-hi) 0%, rgba(201, 138, 30, 0.28) 26%, var(--edge-lo) 52%, rgba(59, 67, 87, 0.55) 82%, rgba(255, 211, 107, 0.32) 100%);
  transition: --edge-hi 0.3s var(--ease-out), --edge-lo 0.3s var(--ease-out);
}
.vcard-frame::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  background: var(--surface-fill);
}
.vcard:hover .vcard-frame, .vcard:focus-within .vcard-frame {
  --edge-hi: rgba(255, 224, 143, 1);
  --edge-lo: rgba(201, 138, 30, 0.55);
}
/* Selected for the bulk restore: the edge stays lit. */
.vcard:has(.pick input:checked) .vcard-frame {
  --edge-hi: rgba(255, 224, 143, 1);
  --edge-lo: rgba(242, 179, 61, 0.75);
}

/* "Lohnt sich" is the find of the day: a fully lit edge and a faint gold light rising from the bottom of the card;
   "Lesen reicht" stays in the quiet default. */
.vcard:has(.verdict-full) .vcard-frame {
  --edge-hi: rgba(255, 224, 143, 1);
  --edge-lo: rgba(201, 138, 30, 0.6);
}
.vcard:has(.verdict-full) .vcard-frame::before {
  background:
    radial-gradient(90% 55% at 15% 100%, rgba(242, 179, 61, 0.1), transparent 70%),
    var(--surface-fill);
}
.vcard:has(.verdict-full):hover .vcard-frame, .vcard:has(.verdict-full):focus-within .vcard-frame {
  --edge-lo: rgba(242, 179, 61, 0.85);
}

/* Lead card: the first inbox entry spans the whole row, a framed thumbnail on the left (like the detail hero),
   text on the right, lit from behind by a blurred copy of its own thumbnail. Below 900 px it is an ordinary card.
   The thumbnail keeps 16:9 and sits centred, so a tall text column never uncovers the letterbox bars of the source. */
.vcard-glow { display: none; }
@media (min-width: 900px) {
  .vcard.is-lead { grid-column: 1 / -1; }
  .is-lead .vcard-frame { flex-direction: row; align-items: center; padding: var(--s-5) 0 var(--s-5) var(--s-5); }
  .is-lead .vmedia {
    --cut: var(--cut-md);
    flex: 0 0 48%;
    margin: 0;
    background: linear-gradient(145deg, rgba(255, 224, 143, 0.95), rgba(201, 138, 30, 0.45) 30%, rgba(59, 67, 87, 0.8) 60%, rgba(255, 211, 107, 0.5));
    clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  }
  .is-lead .vmedia img {
    --cut: calc(var(--cut-md) - 0.59px);
    position: absolute;
    inset: 1px;
    width: calc(100% - 2px);
    height: calc(100% - 2px);
    clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  }
  .is-lead .vmedia::after { inset: 1px; background: linear-gradient(180deg, rgba(14, 17, 23, 0) 60%, rgba(14, 17, 23, 0.55) 100%); }
  .is-lead .vmedia.ph {
    background:
      radial-gradient(60% 80% at 50% 45%, rgba(242, 179, 61, 0.14), transparent 70%),
      linear-gradient(135deg, #1b202b 0%, #12151c 100%);
  }
  .is-lead .vmedia.ph img { position: static; width: 22%; height: auto; clip-path: none; }
  .is-lead .vbody { align-self: stretch; justify-content: center; padding: var(--s-4) var(--s-6) var(--s-4) var(--s-6); gap: var(--s-4); }
  .is-lead .vtitle { font-size: clamp(1.5rem, 1rem + 0.9vw, 2rem); line-height: 1.15; }
  .is-lead .vcore { font-size: var(--fs-md); -webkit-line-clamp: 5; line-clamp: 5; max-width: 62ch; }
  .is-lead .vactions { margin-top: var(--s-1); max-width: 32rem; }
  .vcard-glow {
    display: block;
    position: absolute;
    inset: 1px;
    z-index: -1;
    width: calc(100% - 2px);
    height: calc(100% - 2px);
    max-width: none;
    object-fit: cover;
    filter: blur(60px) saturate(1.3);
    opacity: 0.26;
    pointer-events: none;
    clip-path: polygon(var(--cut-in) 0, 100% 0, 100% calc(100% - var(--cut-in)), calc(100% - var(--cut-in)) 100%, 0 100%, 0 var(--cut-in));
  }
  /* A shade over the glow on the text side keeps the copy calm and its contrast intact. */
  .is-lead .vcard-frame::after {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    pointer-events: none;
    clip-path: polygon(var(--cut-in) 0, 100% 0, 100% calc(100% - var(--cut-in)), calc(100% - var(--cut-in)) 100%, 0 100%, 0 var(--cut-in));
    background:
      radial-gradient(60% 90% at 0% 0%, rgba(242, 179, 61, 0.1), transparent 60%),
      linear-gradient(90deg, rgba(20, 23, 31, 0.15) 0%, rgba(20, 23, 31, 0.55) 55%, rgba(20, 23, 31, 0.7) 100%);
  }
}

/* Media: 16:9 thumbnail, cut on the top left like the frame, 1 px inside the edge. */
.vmedia {
  --cut: calc(var(--cut-lg) - 0.59px);
  position: relative;
  margin: 1px 1px 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--well-fill);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut));
}
.vmedia img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.vcard:hover .vmedia img { transform: scale(1.04); }
/* Shade towards the seam so the overlays stay legible, plus the gold seam line itself. */
.vmedia::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255, 211, 107, 0.7) 30%, rgba(242, 179, 61, 0.45) 75%, transparent) bottom / 100% 1px no-repeat,
    linear-gradient(180deg, rgba(14, 17, 23, 0) 52%, rgba(14, 17, 23, 0.62) 100%);
}

/* Placeholder without a thumbnail: the mark in a faceted well, in the brand colors. */
.vmedia.ph {
  display: grid;
  place-items: center;
  background:
    radial-gradient(60% 80% at 50% 45%, rgba(242, 179, 61, 0.14), transparent 70%),
    linear-gradient(135deg, #1b202b 0%, #12151c 100%);
}
.vmedia.ph img { width: 26%; height: auto; opacity: 0.6; object-fit: contain; }
.vcard:hover .vmedia.ph img { transform: none; }

.vdur {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  padding: 4px 7px 3px;
  border-radius: 4px;
  background: rgba(10, 12, 17, 0.84);
  color: var(--text);
  font: 600 var(--fs-xs) / 1.2 var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

/* Verdict: the hallmark stamped on the specimen. */
.verdict {
  --cut: var(--cut-sm);
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 4px 9px;
  font: 600 var(--fs-xs) / 1.2 var(--font-display);
  letter-spacing: 0.02em;
}
.verdict svg { flex: none; }
.verdict-full { background: var(--gold-fill); color: var(--ink); }
.verdict-sections { background: rgba(10, 12, 17, 0.86); color: var(--gold-1); box-shadow: inset 0 0 0 1px rgba(255, 211, 107, 0.55); }
.verdict-skip { background: rgba(10, 12, 17, 0.86); color: var(--neutral); }

.vbody {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  flex: 1;
  padding: var(--s-4) 18px 18px;
}

.vmeta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.3;
}
.vchannel { color: var(--text-2); font-weight: 500; overflow-wrap: anywhere; }
.vscore { color: var(--gold-1); font: 600 var(--fs-xs) / 1.3 var(--font-display); font-variant-numeric: tabular-nums; }
.vyt {
  position: relative;
  z-index: 2;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 2px;
  color: var(--muted);
  font-size: var(--fs-xs);
  text-decoration: none;
}
.vyt:hover { color: var(--gold-1); }

.vtitle { margin: 0; font-size: 1.1875rem; line-height: 1.25; letter-spacing: 0.003em; }
.vtitle a {
  color: var(--text);
  text-decoration: none;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  overflow-wrap: anywhere;
}
/* The title link covers the whole card; controls inside sit above it. */
.vtitle a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.vtitle a:focus-visible { outline: none; }
.vtitle a:focus-visible::after { outline: 2px solid var(--gold-1); outline-offset: -4px; }
.vcard:hover .vtitle a { color: #fff6e0; }

.vcore {
  margin: 0;
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}
.vsnippet {
  margin: 0;
  padding-left: var(--s-3);
  border-left: 2px solid var(--gold-4);
  color: var(--muted);
  font-size: var(--fs-sm);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
/* Position of the matching section; above the card's stretched link like the YouTube link. */
.vsnippet-at {
  position: relative;
  z-index: 2;
  color: var(--gold-1);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}
.vsnippet-at:hover { text-decoration: underline; }
.vnote { margin: 0; color: var(--muted); font-size: var(--fs-xs); }

.vactions {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: var(--s-1);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-2);
}
.vactions form { margin: 0; display: flex; }
.vactions button { width: 100%; padding: 0 var(--s-2); }
.vactions.restore { grid-template-columns: minmax(0, 1fr) auto; }
.vactions.restore:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }

/* Selection for the bulk restore, counted by CSS for the dock below. */
.pick {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin: 0;
  min-height: 44px;
  padding: 0 var(--s-3);
  border: 1px solid var(--line-field);
  border-radius: var(--r-sm);
  color: var(--text-2);
  font: 600 var(--fs-sm) / 1 var(--font-display);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}
.pick input { width: 18px; height: 18px; margin: 0; }
.pick:hover { border-color: var(--line-field-hover); color: var(--text); }
.pick:has(input:checked) { border-color: var(--gold-3); color: var(--gold-1); background: rgba(242, 179, 61, 0.08); }
.pick:has(input:focus-visible) { outline: 2px solid var(--gold-1); outline-offset: 2px; }
.pick input:focus-visible { outline: none; }
.pick input:checked { counter-increment: picked; }

/* ---------- Video list (sieve) ---------- */

.sieve {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--s-4) var(--s-5);
  margin-bottom: var(--s-5);
}
.sieve fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.sieve legend, .sieve-field > span {
  display: block;
  margin: 0 0 var(--s-2);
  padding: 0;
  color: var(--muted);
  font: 600 var(--fs-xs) / 1.2 var(--font-display);
  letter-spacing: 0.02em;
}
.sieve-field { margin: 0; flex: 1 1 220px; max-width: 360px; font-weight: 400; }
.sieve-actions { display: flex; gap: var(--s-2); }

/* Segmented control from native radios. */
.seg-options { display: flex; flex-wrap: wrap; padding: 3px; gap: 2px; border-radius: var(--r-md); background: var(--bg-deep); box-shadow: var(--shadow-well); border: 1px solid var(--line-field); }
.seg-options label {
  position: relative;
  margin: 0;
  display: inline-flex;
  cursor: pointer;
}
.seg-options input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-options span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 var(--s-3);
  border-radius: 7px;
  color: var(--text-2);
  font: 600 var(--fs-sm) / 1 var(--font-display);
  transition: background 0.15s, color 0.15s;
}
.seg-options label:hover span { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.seg-options input:checked + span { color: var(--ink); background: var(--gold-fill); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset; }
.seg-options input:focus-visible + span { outline: 2px solid var(--gold-1); outline-offset: 2px; }

.resultline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s-2) var(--s-4);
  margin: 0 0 var(--s-5);
  color: var(--muted);
  font-size: var(--fs-sm);
}
.resultline strong { color: var(--text); font: 600 var(--fs-md) / 1 var(--font-display); font-variant-numeric: tabular-nums; }
.resultline q { color: var(--text-2); }

/* Dock for the bulk restore. Without a selection it is a quiet hint at the end of the list (in the flow, covering
   nothing, its button muted); once a card is picked it floats at the bottom with the count and a gold button. */
.dock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--s-2) var(--s-4);
  width: fit-content;
  max-width: 100%;
  margin: var(--s-6) auto 0;
  padding: 6px 6px 6px var(--s-5);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(14, 17, 23, 0.55);
}
.dock-text { margin: 0; color: var(--muted); font: 600 var(--fs-sm) / 1.3 var(--font-display); }
.dock-count { display: none; color: var(--text-2); white-space: nowrap; }
.dock-count::before { content: counter(picked); color: var(--gold-1); margin-right: 0.35em; font-variant-numeric: tabular-nums; }
.dock button { white-space: normal; }
.dock button.primary {
  color: var(--text-2);
  border-color: var(--line-strong);
  background: linear-gradient(180deg, #232837 0%, #1d212d 100%);
  box-shadow: var(--shadow-control);
}
.dock button.primary:hover { color: var(--text); border-color: var(--line-hover); background: linear-gradient(180deg, #2a3040 0%, #222736 100%); }
.dock button.primary:focus-visible { outline-color: var(--gold-1); }

main:has(.pick input:checked) .dock {
  position: sticky;
  bottom: calc(var(--s-3) + env(safe-area-inset-bottom));
  z-index: 10;
  border-color: transparent;
  background:
    linear-gradient(180deg, #232837, #1b1f2a) padding-box,
    linear-gradient(150deg, rgba(255, 211, 107, 0.7), rgba(59, 67, 87, 0.9) 45%, rgba(242, 179, 61, 0.4)) border-box;
  box-shadow: var(--shadow-float);
}
main:has(.pick input:checked) .dock-idle { display: none; }
main:has(.pick input:checked) .dock-count { display: inline; }
main:has(.pick input:checked) .dock button.primary {
  color: var(--ink);
  border-color: rgba(201, 138, 30, 0.9);
  background: var(--gold-fill);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 -1px 0 rgba(120, 70, 0, 0.25) inset, 0 6px 18px rgba(242, 179, 61, 0.16);
}
main:has(.pick input:checked) .dock button.primary:hover { background: var(--gold-fill-hot); border-color: var(--gold-3); }
main:has(.pick input:checked) .dock button.primary:focus-visible { outline-color: var(--text); }

@media (max-width: 480px) {
  .dock { width: 100%; padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4); justify-content: space-between; }
  .dock-text { flex: 1 1 6rem; }
  /* The button keeps its label on one line and moves to its own row when the count does not fit beside it. */
  .dock button { flex: 1 0 auto; white-space: nowrap; }
}

/* ---------- Auth pages (login, consent, messages) ---------- */

body.auth {
  background:
    radial-gradient(900px 600px at 50% 110%, rgba(96, 120, 170, 0.1), transparent 70%),
    var(--bg);
}
/* Full-width scene that centres the stage and clips the oversized facet drawing (no sideways scrolling). */
.auth-scene {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--s-7) var(--gutter);
  overflow: clip;
}
.auth-stage { width: 100%; max-width: 420px; }
.auth-hero {
  --icon: 148px;
  --facets: 860px;
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  margin-bottom: var(--s-6);
}
/* The nugget facets drawn large behind the hero, the play facet centred on the icon, plus the light around it. */
.auth-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: calc(var(--icon) / 2 - var(--facets) * 0.4414);
  width: var(--facets);
  height: calc(var(--facets) * 0.8829);
  transform: translateX(-50%);
  pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(242, 179, 61, 0.15) 0%, rgba(242, 179, 61, 0.07) 40%, rgba(242, 179, 61, 0.02) 70%, transparent 100%),
    url("/assets/ui/facets.svg") no-repeat center / contain;
}

/* The icon tile: rounded like the app icon, with a gold edge lit from the top left and a light pool below. */
.auth-icon {
  position: relative;
  width: var(--icon);
  height: var(--icon);
  padding: 1.5px;
  border-radius: calc(var(--icon) * 0.2344);
  background: linear-gradient(155deg, #fff0c4 0%, var(--gold-2) 22%, rgba(59, 67, 87, 0.9) 55%, rgba(201, 138, 30, 0.9) 100%);
  box-shadow: 0 34px 70px rgba(242, 179, 61, 0.16), 0 14px 30px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.5);
}
.auth-icon img { display: block; width: 100%; height: 100%; border-radius: calc(var(--icon) * 0.2344 - 1.5px); }
.auth-icon::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -44px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(242, 179, 61, 0.32), transparent);
}
/* One moment on arrival: a glint runs once across the tile. */
.auth-glint {
  position: absolute;
  inset: 1.5px;
  border-radius: calc(var(--icon) * 0.2344 - 1.5px);
  overflow: hidden;
  pointer-events: none;
}
.auth-glint::before {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  width: 40%;
  left: -60%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 240, 196, 0.32), transparent);
  animation: glint 1.6s var(--ease-out) 0.35s 1 both;
}
@keyframes glint {
  from { left: -60%; }
  to { left: 130%; }
}

.auth-name {
  margin: var(--s-6) 0 0;
  font: 700 3.5rem / 1 var(--font-display);
  letter-spacing: 0.01em;
  color: var(--gold-1);
  background: linear-gradient(175deg, #fff0c4 10%, var(--gold-1) 40%, var(--gold-3) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-claim { margin: var(--s-2) 0 0; color: var(--text-2); font-size: var(--fs-md); }

.auth-panel {
  --cut: var(--cut-lg);
  --cut-in: calc(var(--cut-lg) - 0.59px);
  position: relative;
  isolation: isolate;
  padding: var(--s-5) var(--s-5) var(--s-6);
  background: linear-gradient(150deg, rgba(255, 224, 143, 0.85) 0%, rgba(201, 138, 30, 0.35) 22%, rgba(59, 67, 87, 0.85) 50%, rgba(59, 67, 87, 0.6) 80%, rgba(255, 211, 107, 0.4) 100%);
  filter: drop-shadow(0 24px 40px rgba(3, 5, 9, 0.55)) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}
.auth-panel::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  background: linear-gradient(180deg, #1f2433 0%, #181c26 100%);
}
.auth-panel h1 { font-size: var(--fs-xl); margin: 0 0 var(--s-2); }
.auth-panel form { margin-top: var(--s-2); }
.auth-panel label { margin-top: var(--s-4); }
.auth-panel .primary { width: 100%; margin-top: var(--s-5); min-height: 50px; font-size: var(--fs-md); }
.auth-panel .hint { color: var(--muted); font-size: var(--fs-sm); }
.auth-panel .error {
  margin: var(--s-3) 0;
  padding: var(--s-2) var(--s-3);
  border-left: 3px solid var(--bad);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: rgba(255, 138, 122, 0.1);
  color: var(--text);
}
.auth-panel dl { margin: var(--s-4) 0; display: grid; gap: var(--s-3); }
.auth-panel dt { color: var(--muted); font: 600 var(--fs-xs) / 1.3 var(--font-display); letter-spacing: 0.02em; }
.auth-panel dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.auth-panel dd ul { margin: var(--s-1) 0 0; padding-left: 1.1rem; }
.auth-panel dd li { margin: 2px 0; }
.auth-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); margin-top: var(--s-5); }
.auth-actions .primary { margin-top: 0; min-height: 50px; }
.auth-actions button { min-height: 50px; }

@media (max-width: 480px) {
  .auth-scene { place-items: start center; padding-top: var(--s-6); }
  .auth-hero { --icon: 112px; --facets: 620px; }
  .auth-name { font-size: 2.75rem; margin-top: var(--s-5); }
  .auth-hero { margin-bottom: var(--s-5); }
  .auth-panel { padding: var(--s-5) var(--s-4) var(--s-5); }
}

/* ---------- Content pages: shared bits ---------- */

.actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.actions form { margin: 0; }

/* Small label above a block, in the display face (no uppercase tracking, it stays a quiet caption). */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin: 0 0 var(--s-2);
  color: var(--muted);
  font: 600 var(--fs-sm) / 1.3 var(--font-display);
  letter-spacing: 0.02em;
}
.eyebrow svg { flex: none; }
.num { font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Timestamp link: a small gold-edged tag that jumps to the moment on YouTube. */
.t {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 1px 7px;
  border: 1px solid rgba(242, 179, 61, 0.32);
  border-radius: 4px;
  background: rgba(242, 179, 61, 0.06);
  color: var(--gold-1);
  font: 600 var(--fs-xs) / 1.2 var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: baseline;
  transition: background-color 0.15s, border-color 0.15s;
}
a.t:hover { color: var(--gold-hot); border-color: rgba(255, 211, 107, 0.7); background: rgba(242, 179, 61, 0.14); }
span.t { color: var(--text-2); border-color: var(--line); background: none; }
.range { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); white-space: nowrap; }

/* Section heading with a gold facet in front and an optional count pill. */
.sechead { display: flex; align-items: center; gap: var(--s-3); margin: 0 0 var(--s-4); font-size: var(--fs-xl); }
.sechead::before {
  content: "";
  flex: none;
  width: 11px;
  height: 11px;
  background: var(--gold-fill);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.sechead-count {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font: 600 var(--fs-xs) / 1 var(--font-display);
  font-variant-numeric: tabular-nums;
}

/* Disclosure groups (statements, mentions, reprocess): custom chevron, full-width target. */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.sgroup > summary, .mgroup > summary, .reprocess > summary {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 48px;
  color: var(--text);
  font: 600 var(--fs-md) / 1.25 var(--font-display);
  border-radius: var(--r-sm);
}
.sgroup > summary::after, .mgroup > summary::after, .reprocess > summary::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin: 0 6px 4px auto;
  border-right: 1.75px solid var(--muted);
  border-bottom: 1.75px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease-out);
}
details[open] > summary::after { transform: rotate(-135deg); margin-bottom: -2px; }
.sgroup > summary:hover::after, .mgroup > summary:hover::after { border-color: var(--text); }
.sgroup-count { color: var(--muted); font: 600 var(--fs-sm) / 1 var(--font-display); font-variant-numeric: tabular-nums; }

/* Shared chamfered surfaces of the content pages (same technique as the cards: gradient edge, inner layer 1 px in). */
.vhero-in, .vplate, .thesis, .vis, .voice, .srow, .subres, .vhero-in::before, .vplate::before, .thesis::before, .vis::before, .voice::before, .srow::before, .subres::before, .vhero-glow, .vhero-frame, .vhero-frame img, .srow-media, .subres-media, .monogram {
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.vplate, .thesis, .vis, .voice, .srow, .subres {
  --cut: var(--cut-md);
  --cut-in: calc(var(--cut-md) - 0.59px);
  position: relative;
  isolation: isolate;
  background: linear-gradient(150deg, rgba(255, 211, 107, 0.3), rgba(59, 67, 87, 0.75) 35%, rgba(59, 67, 87, 0.55) 75%, rgba(242, 179, 61, 0.18));
}
.vhero-in::before, .vplate::before, .thesis::before, .vis::before, .voice::before, .srow::before, .subres::before, .vhero-glow {
  --cut: var(--cut-in);
}
.vplate::before, .thesis::before, .vis::before, .voice::before, .srow::before, .subres::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  background: var(--surface-fill);
}

/* ---------- Video detail ---------- */

/* Jumps to a section keep clear of the sticky top bar through scroll-padding-top on html (see Base). */

/* Hero: large thumbnail on the left, facts, verdict and actions on the right, the thumbnail glowing behind. */
.vhero { margin: 0 0 var(--s-5); filter: var(--lift-2); }
.vhero-in {
  --cut: var(--cut-lg);
  --cut-in: calc(var(--cut-lg) - 0.59px);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  align-items: start;
  gap: var(--s-6);
  padding: var(--s-5);
  background: linear-gradient(150deg, rgba(255, 224, 143, 0.9) 0%, rgba(201, 138, 30, 0.38) 20%, rgba(59, 67, 87, 0.85) 46%, rgba(59, 67, 87, 0.6) 80%, rgba(255, 211, 107, 0.45) 100%);
}
.vhero-in::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -2;
  background: linear-gradient(180deg, #1e2331 0%, #171a23 100%);
}
/* The same thumbnail, blurred into ambient colour light; a shade on top keeps the text side calm. */
.vhero-glow {
  position: absolute;
  inset: 1px;
  z-index: -1;
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  max-width: none;
  object-fit: cover;
  filter: blur(56px) saturate(1.35);
  opacity: 0.34;
  pointer-events: none;
}
.vhero-in::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(70% 90% at 0% 0%, rgba(242, 179, 61, 0.09), transparent 60%),
    linear-gradient(100deg, rgba(20, 23, 31, 0.1) 0%, rgba(20, 23, 31, 0.55) 55%, rgba(20, 23, 31, 0.72) 100%);
}

.vhero-media { position: relative; align-self: center; }
.vhero-shot {
  position: relative;
  display: block;
  color: var(--ink);
  text-decoration: none;
  filter: drop-shadow(0 18px 30px rgba(3, 5, 9, 0.55)) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
  border-radius: 2px;
}
.vhero-shot:focus-visible { outline-offset: 4px; }
.vhero-frame {
  --cut: var(--cut-md);
  display: block;
  padding: 1px;
  background: linear-gradient(145deg, rgba(255, 224, 143, 0.95), rgba(201, 138, 30, 0.45) 30%, rgba(59, 67, 87, 0.8) 60%, rgba(255, 211, 107, 0.5));
}
.vhero-frame img {
  --cut: calc(var(--cut-md) - 0.59px);
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out), filter 0.3s;
}
.vhero-frame.ph {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(60% 80% at 50% 45%, rgba(242, 179, 61, 0.14), transparent 70%),
    linear-gradient(135deg, #1b202b 0%, #12151c 100%);
}
.vhero-frame.ph img { width: 22%; aspect-ratio: auto; opacity: 0.6; clip-path: none; }
/* Play facet: a chamfered gold tile, the brand's play cut-out turned into a control. */
.vhero-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  padding-left: 4px;
  transform: translate(-50%, -50%);
  background: var(--gold-fill);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  opacity: 0.94;
  transition: transform 0.25s var(--ease-out), opacity 0.2s;
}
.vhero-shot:hover .vhero-play, .vhero-shot:focus-visible .vhero-play { transform: translate(-50%, -50%) scale(1.08); opacity: 1; background: var(--gold-fill-hot); }
.vhero-shot:hover .vhero-frame img { filter: brightness(1.06); }
.vhero-shot .vdur { right: 12px; bottom: 12px; font-size: var(--fs-sm); }

.vhero-body { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; padding-top: var(--s-1); }
.vhero-body .eyebrow { margin: 0; color: var(--text-2); font-size: var(--fs-md); flex-wrap: wrap; gap: 0 var(--s-2); }
.vhero-body .eyebrow a { display: inline-flex; align-items: center; min-height: 44px; margin: -11px 0; color: var(--text-2); text-decoration: none; }
.vhero-body .eyebrow a:hover { color: var(--gold-1); text-decoration: underline; }
.vhero-body .eyebrow span { color: var(--muted); font-weight: 600; }
.vhero h1 {
  font-size: clamp(1.75rem, 1.15rem + 1.5vw, 2.5rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
/* Type steps for long titles (class set by the server from the title length). */
.vhero.is-title-long h1 { font-size: clamp(1.4375rem, 1.05rem + 0.95vw, 1.9375rem); line-height: 1.16; }
.vhero.is-title-xlong h1 { font-size: clamp(1.25rem, 1rem + 0.6vw, 1.5625rem); line-height: 1.22; text-wrap: pretty; }
/* With a long title the text column grows taller than the thumbnail: the thumbnail stays at the top and, where the
   top bar is sticky, travels along while the column scrolls. */
.vhero.is-title-long .vhero-media, .vhero.is-title-xlong .vhero-media { align-self: start; }
@media (min-width: 1000px) {
  .vhero.is-title-long .vhero-media, .vhero.is-title-xlong .vhero-media { position: sticky; top: 100px; }
}
.vhero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); color: var(--muted); font-size: var(--fs-sm); }
.vhero-meta .vyt { margin-left: 0; color: var(--text-2); }
.vhero-meta .vyt:hover { color: var(--gold-1); }

/* Verdict plate: the hallmark of the page. "Lohnt sich" is solid gold light, the others quieter. */
.vplate { margin-top: var(--s-2); padding: var(--s-4) var(--s-4) var(--s-4) var(--s-5); }
.vplate::before { background: linear-gradient(180deg, rgba(14, 17, 23, 0.82), rgba(14, 17, 23, 0.7)); }
.vplate-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin: 0 0 var(--s-2); }
.vplate-head strong { font: 600 var(--fs-lg) / 1.2 var(--font-display); color: var(--text); }
.vplate .verdict { position: static; font-size: var(--fs-sm); padding: 6px 12px 5px 11px; }
.vplate-reason { margin: 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.5; }
.vplate-full {
  background: linear-gradient(150deg, #fff0c4 0%, var(--gold-2) 30%, rgba(201, 138, 30, 0.6) 65%, var(--gold-1) 100%);
}
.vplate-full::before { background: radial-gradient(120% 160% at 0% 0%, rgba(242, 179, 61, 0.24), transparent 60%), linear-gradient(180deg, #1d1d1c, #17181b); }
.vplate-full .vplate-head strong { color: var(--gold-1); }
.vplate-sections { background: linear-gradient(150deg, rgba(255, 211, 107, 0.75), rgba(59, 67, 87, 0.8) 45%, rgba(242, 179, 61, 0.35)); }
.vplate-skip { background: linear-gradient(150deg, rgba(167, 174, 189, 0.55), rgba(59, 67, 87, 0.8) 45%, rgba(59, 67, 87, 0.5)); }

.vhero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); padding-top: var(--s-2); }
.vhero-actions form { margin: 0; }
/* Defer: the choice and its button joined into one control. */
.defer { display: flex; }
.defer select { width: auto; min-width: 12.5rem; min-height: 44px; padding-top: 0; padding-bottom: 0; border-radius: var(--r-sm) 0 0 var(--r-sm); font-size: var(--fs-sm); }
.defer button { border-radius: 0 var(--r-sm) var(--r-sm) 0; margin-left: -1px; }
.defer select:focus { position: relative; z-index: 1; }

/* Timeline */
.tl { margin-bottom: var(--s-7); }
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2) var(--s-5); }
.tl-head h2 { margin: 0; font-size: var(--fs-lg); }
.tl-legend { display: flex; flex-wrap: wrap; gap: 4px var(--s-4); margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: var(--fs-xs); }
.tl-legend li { display: inline-flex; align-items: center; gap: 7px; }
.tl-legend li::before { content: ""; flex: none; }
.lg-sec::before { width: 18px; height: 10px; border-radius: 2px; background: rgba(242, 179, 61, 0.28); box-shadow: inset 0 0 0 1px rgba(255, 211, 107, 0.8); }
.lg-mk::before { width: 9px; height: 9px; background: var(--gold-1); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.lg-flag::before { width: 14px; height: 4px; border-radius: 1px; background: var(--bad); }
.lg-rest::before { width: 18px; height: 8px; border-radius: 2px; background: repeating-linear-gradient(135deg, rgba(148, 157, 176, 0.35) 0 2px, transparent 2px 5px); }

.tl-svg { display: block; margin: var(--s-4) 0 var(--s-3); overflow: visible; }
.tl-svg a { cursor: pointer; }
.tl-grid { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 2 4; }
.tl-track { fill: var(--bg-deep); stroke: var(--line-strong); stroke-width: 1; }
.tl-rest { fill: rgba(148, 157, 176, 0.18); }
.tl-sec { fill: rgba(242, 179, 61, 0.2); stroke: rgba(255, 211, 107, 0.78); stroke-width: 1; transition: fill 0.15s; }
.tl-svg a:hover .tl-sec { fill: rgba(242, 179, 61, 0.38); }
.tl-flag { fill: var(--bad); opacity: 0.85; }
.tl-svg a:hover .tl-flag { opacity: 1; }
.tl-hit { fill: transparent; }
.tl-mk polygon { fill: var(--gold-1); stroke: var(--bg); stroke-width: 2; transition: transform 0.15s var(--ease-out), fill 0.15s; }
.tl-svg a:hover .tl-mk polygon { fill: var(--gold-hot); transform: scale(1.3); }
.tl-tick { fill: var(--muted); font: 600 12px var(--font-display); font-variant-numeric: tabular-nums; }

.tl-lists { display: grid; gap: var(--s-5) var(--s-6); margin-top: var(--s-4); }
.tl-lists:has(> :nth-child(2)) { grid-template-columns: minmax(0, 1fr); }
.tl-lists h3 { margin: 0 0 var(--s-3); color: var(--text-2); font-size: var(--fs-sm); letter-spacing: 0.02em; }
.sections { display: grid; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.sections li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: var(--s-3);
  padding: 10px 14px;
  border-left: 2px solid var(--gold-2);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: linear-gradient(90deg, rgba(242, 179, 61, 0.09), rgba(242, 179, 61, 0.02));
  color: var(--text-2);
  font-size: var(--fs-sm);
  line-height: 1.45;
}
.moments { margin: 0; padding: 0; list-style: none; columns: 2 19rem; column-gap: var(--s-6); }
.moments li {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  break-inside: avoid;
  color: var(--text-2);
  font-size: var(--fs-sm);
  line-height: 1.4;
}
.moments .t { flex: none; min-width: 3.6rem; justify-content: center; }

@media (min-width: 1000px) {
  .tl-lists:has(> :nth-child(2)) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
  .tl-lists:has(> :nth-child(2)) .moments { columns: 1; }
}

/* Content: reading column plus a fact sheet on wide screens. */
.vlayout { display: grid; gap: var(--s-7); }
.vmain, .vwide { min-width: 0; }
.vmain > section + section, .vwide > section + section { margin-top: var(--s-7); }
.vside { display: grid; gap: var(--s-5); align-content: start; min-width: 0; }
/* DOM order is main, wide, side (good for small screens); wide screens put the side next to main and wide below both. */
@media (min-width: 1100px) {
  .vlayout { grid-template-columns: minmax(0, 1fr) 23.5rem; grid-template-areas: "main side" "wide wide"; column-gap: var(--s-7); align-items: start; }
  .vmain { grid-area: main; }
  .vside { grid-area: side; }
  .vwide { grid-area: wide; }
  .voice { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: var(--s-5); align-items: start; }
  .voice .eyebrow { margin: 4px 0 0; }
}

/* Core message: the one thing to remember, set large on a gold rule. */
.coreplate {
  position: relative;
  padding: var(--s-2) 0 var(--s-2) var(--s-5);
}
.coreplate::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--gold-1), var(--gold-4) 70%, rgba(201, 138, 30, 0));
}
.coreplate .eyebrow { color: var(--gold-1); }
.coreplate-text {
  margin: 0;
  max-width: 62ch;
  color: var(--text);
  font: 500 clamp(1.1875rem, 1.05rem + 0.4vw, 1.375rem) / 1.5 var(--font-body);
  text-wrap: pretty;
}
.coreplate-answer { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--line); max-width: 66ch; }
.coreplate-answer p:last-child { margin: 0; color: var(--text-2); }

/* Theses: numbered specimens with outlined numerals. */
.theses { display: grid; gap: var(--s-4); margin: 0; padding: 0; list-style: none; }
.thesis { padding: var(--s-5) var(--s-5) var(--s-4); }
.thesis-no {
  position: absolute;
  top: 14px;
  right: 18px;
  font: 700 2.5rem / 1 var(--font-display);
  font-variant-numeric: tabular-nums;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 211, 107, 0.45);
}
.thesis h3 { margin: 0 0 var(--s-2); padding-right: 4rem; font-size: var(--fs-lg); line-height: 1.3; }
.thesis p { margin: 0; color: var(--text-2); }

/* Footer row of a thesis or statement: kind, speaker, evidence scale, timestamp. */
.sfoot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); }
.sfoot .t { margin-left: auto; }
.who { color: var(--text-2); }

/* Statement kinds: each a hue and a shape, so they stay apart without relying on colour alone. */
.kind-fact { --tone: #9fc3ea; --shape: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.kind-opinion { --tone: #d3b8f3; --shape: circle(50%); }
.kind-prediction { --tone: #7fd4cc; --shape: polygon(0 100%, 50% 0, 100% 100%); }
.kind-rec { --tone: #b9da8f; --shape: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.kind { display: inline-flex; align-items: center; gap: 7px; color: var(--tone); font: 600 var(--fs-xs) / 1.2 var(--font-display); letter-spacing: 0.02em; }
.kind::before, .sgroup-mark { content: ""; flex: none; width: 9px; height: 9px; background: var(--tone); clip-path: var(--shape); }

/* Evidence: three slanted bars, filled from the left. */
.ev { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); }
.ev-scale { display: inline-flex; gap: 2px; }
.ev-scale span { width: 11px; height: 7px; background: var(--line-strong); clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%); }
.ev-1 .ev-scale span:nth-child(-n + 1), .ev-2 .ev-scale span:nth-child(-n + 2), .ev-3 .ev-scale span { background: var(--gold-2); }
.ev-0 { color: var(--muted); }

/* Statements grouped by kind. */
.sgroup { border-top: 1px solid var(--line); }
.sgroup:last-child { border-bottom: 1px solid var(--line); }
.sgroup-mark { width: 11px; height: 11px; }
.stmts { margin: 0 0 var(--s-4); padding: 0; list-style: none; columns: 2 21rem; column-gap: var(--s-6); }
.stmts li { break-inside: avoid; margin-bottom: var(--s-3); padding: var(--s-1) 0 var(--s-1) var(--s-4); border-left: 2px solid color-mix(in srgb, var(--tone) 45%, transparent); }
.stmts p { margin: 0; color: var(--text); font-size: 1rem; line-height: 1.5; }
.stmts .basis { margin-top: 4px; color: var(--muted); font-size: var(--fs-sm); }
.stmts .sfoot { margin-top: 6px; padding-top: 0; border-top: 0; }

/* Visual content: tiles with a line icon per kind. */
.visuals { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.vis { padding: var(--s-4); }
.vis::before { background: linear-gradient(180deg, #1c202b, #181b24); }
.vis-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-bottom: var(--s-2); }
.vis-kind { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--text); font: 600 var(--fs-sm) / 1.2 var(--font-display); }
.vis-kind svg { color: var(--gold-2); }
.vis p { margin: 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.5; overflow-wrap: anywhere; }

/* Read-aloud summary: a calmer, cooler plate. */
.voice { padding: var(--s-5); background: linear-gradient(150deg, rgba(159, 195, 234, 0.55), rgba(59, 67, 87, 0.75) 40%, rgba(59, 67, 87, 0.5)); }
.voice::before { background: radial-gradient(90% 120% at 0% 0%, rgba(159, 195, 234, 0.1), transparent 60%), var(--surface-fill); }
.voice .eyebrow { color: var(--info); }
.voice p { margin: 0; max-width: 76ch; color: var(--text); font-size: 1.125rem; line-height: 1.6; }
.vmain .notice .eyebrow { margin-bottom: var(--s-1); }

/* Fact sheet column */
.sidecard h2 { display: flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-3); font-size: var(--fs-lg); }
.sidecard h3 { margin: var(--s-4) 0 var(--s-2); color: var(--text-2); font-size: var(--fs-sm); }
.sidecard.plain { padding-top: var(--s-4); border-top: 1px solid var(--line); }
.facts { display: grid; gap: var(--s-3); margin: 0; }
.facts dt { color: var(--muted); font: 600 var(--fs-xs) / 1.3 var(--font-display); letter-spacing: 0.02em; }
.facts dd { margin: 2px 0 0; color: var(--text); overflow-wrap: anywhere; }
.facts.compact dd { color: var(--text-2); font-size: var(--fs-sm); }

.speakers { display: grid; gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.speakers li { display: flex; align-items: flex-start; gap: var(--s-3); }
.speakers small { display: block; color: var(--muted); font-size: var(--fs-sm); line-height: 1.35; }
.monogram {
  --cut: var(--cut-sm);
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: linear-gradient(150deg, #2e3446, #222737);
  color: var(--gold-1);
  font: 700 var(--fs-sm) / 1 var(--font-display);
}

/* Weak spots and promotion: quiet warnings, red for weak claims, blue-grey for advertising. */
.flags ul { display: grid; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.flag {
  --tone: var(--bad);
  position: relative;
  padding: 10px 14px 12px 36px;
  border: 1px solid color-mix(in srgb, var(--tone) 30%, transparent);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--tone) 7%, transparent);
  font-size: var(--fs-sm);
}
.flag.promo { --tone: var(--neutral); }
.flag::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 15px;
  width: 12px;
  height: 11px;
  background: var(--tone);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.flag.promo::before { width: 11px; height: 11px; top: 15px; clip-path: polygon(0 30%, 55% 0, 100% 45%, 45% 100%, 0 70%); }
.flag p { margin: 0; color: var(--text-2); line-height: 1.45; }
.flag .flag-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px var(--s-2); margin-bottom: 4px; }
.flag-head strong { color: var(--tone); font: 600 var(--fs-sm) / 1.3 var(--font-display); }

.mgroup { border-top: 1px solid var(--line); }
.mgroup > summary { font-size: var(--fs-sm); min-height: 44px; gap: var(--s-2); }
.mentions { margin: 0 0 var(--s-3); padding: 0; list-style: none; }
.mentions li { padding: 7px 0; }
.mentions li + li { border-top: 1px dashed var(--line); }
.mname { display: block; color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.mctx { display: block; color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
.mctx .t { margin-left: 2px; }

.reprocess { margin-top: var(--s-3); border-top: 1px solid var(--line); }
.reprocess > summary { color: var(--text-2); font-size: var(--fs-sm); }
.reprocess form { margin: 0 0 var(--s-2); }
button.danger { border-color: rgba(255, 138, 122, 0.45); }
button.danger:hover { color: var(--bad); border-color: var(--bad); }

/* ---------- Submit ---------- */

.submit-layout { display: grid; gap: var(--s-6); align-items: start; }
@media (min-width: 1000px) {
  .submit-layout { grid-template-columns: minmax(0, 1fr) 21rem; gap: var(--s-7); }
}
.submit-form { padding: var(--s-6); }
.urllabel { margin: 0 0 var(--s-2); color: var(--text); font: 600 var(--fs-lg) / 1.3 var(--font-display); }
.urlwell {
  display: flex;
  align-items: center;
  min-height: 66px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background:
    var(--well-fill) padding-box,
    linear-gradient(160deg, #d6ae58, var(--line-field) 40%, var(--line-field) 70%, #a48852) border-box;
  box-shadow: var(--shadow-well);
  transition: background 0.2s, box-shadow 0.2s;
}
.urlwell:focus-within {
  background:
    var(--well-fill) padding-box,
    linear-gradient(160deg, var(--gold-1), rgba(201, 138, 30, 0.75) 45%, rgba(242, 179, 61, 0.65)) border-box;
  box-shadow: var(--shadow-well), 0 0 0 4px rgba(242, 179, 61, 0.16);
}
.urlwell-icon { flex: none; display: grid; place-items: center; margin-left: var(--s-4); color: var(--gold-2); }
.urlwell input[type="text"] {
  flex: 1;
  min-width: 0;
  min-height: 64px;
  padding: 0 var(--s-4) 0 var(--s-3);
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  box-shadow: none;
  font-size: var(--fs-lg);
}
.urlwell input[type="text"]:focus { outline: none; box-shadow: none; }

/* Option groups: segmented switches made of cards, each a real radio button. */
.optgroup { margin: var(--s-6) 0 0; padding: 0; border: 0; min-width: 0; }
.optgroup legend { padding: 0; margin: 0 0 2px; color: var(--text); font: 600 var(--fs-lg) / 1.3 var(--font-display); }
.optlead { margin: 0 0 var(--s-3); color: var(--muted); font-size: var(--fs-sm); }
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
@media (min-width: 760px) {
  .opts-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.opt { position: relative; display: flex; margin: 0; font-weight: 400; cursor: pointer; }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.opt-face {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-height: 100%;
  padding: 14px 16px 14px;
  border: 1px solid var(--line-field);
  border-radius: 8px;
  background: linear-gradient(180deg, #1f2431 0%, #1a1e28 100%) padding-box;
  box-shadow: var(--shadow-control);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
/* Selection mark: an empty facet, gold when chosen. */
.opt-face::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--line-field-hover);
  transform: rotate(45deg);
  transition: background 0.15s, border-color 0.15s;
}
.opt:hover .opt-face { border-color: var(--line-field-hover); }
.opt input:checked + .opt-face {
  border-color: transparent;
  background:
    linear-gradient(180deg, #2a2a26 0%, #1f2029 100%) padding-box,
    linear-gradient(150deg, var(--gold-1), rgba(201, 138, 30, 0.6) 50%, rgba(242, 179, 61, 0.85)) border-box;
  box-shadow: 0 0 0 1px rgba(242, 179, 61, 0.12), 0 8px 22px rgba(242, 179, 61, 0.1), var(--shadow-control);
}
.opt input:checked + .opt-face::after { border-color: var(--gold-1); background: var(--gold-fill); box-shadow: 0 0 10px rgba(242, 179, 61, 0.5); }
.opt input:focus-visible + .opt-face { outline: 2px solid var(--gold-1); outline-offset: 2px; }
.opt-title { padding-right: 22px; color: var(--text); font: 600 var(--fs-md) / 1.2 var(--font-display); }
.opt-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s-3); margin-top: auto; padding-top: 4px; }
.opt input:checked + .opt-face .opt-title { color: var(--gold-1); }
.opt-cost { padding: 2px 7px; border-radius: 4px; font: 600 var(--fs-xs) / 1.3 var(--font-display); letter-spacing: 0.02em; white-space: nowrap; }
.opt-cost.save { color: var(--gold-1); background: rgba(242, 179, 61, 0.1); box-shadow: inset 0 0 0 1px rgba(242, 179, 61, 0.38); }
.opt-cost.more { color: var(--text-2); background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line-strong); }
.opt-hint { color: var(--muted); font-size: var(--fs-sm); line-height: 1.4; }
.opt-default { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font: 600 var(--fs-xs) / 1.2 var(--font-display); letter-spacing: 0.02em; }
.opt-default::before { content: ""; width: 6px; height: 6px; background: var(--gold-3); transform: rotate(45deg); }

.submit-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.submit-go { min-height: 56px; min-width: 13rem; padding: 0 var(--s-6); font-size: var(--fs-md); }

/* Live summary of the choice (CSS :has, no script). */
.subsum { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(14, 17, 23, 0.6); box-shadow: var(--shadow-well); overflow: hidden; }
.ss-cell { display: flex; flex-direction: column; gap: 3px; padding: 9px var(--s-4); }
.ss-cell + .ss-cell { border-left: 1px solid var(--line); }
.ss-cell small { color: var(--muted); font: 600 var(--fs-xs) / 1.2 var(--font-display); letter-spacing: 0.02em; }
.ss-cell b { display: none; color: var(--text); font: 600 var(--fs-sm) / 1.2 var(--font-display); }
.ss-cost b { color: var(--gold-1); }
.submit-form:has(input[name="source"][value="video"]:checked) [data-when="source-video"],
.submit-form:has(input[name="source"][value="transcript"]:checked) [data-when="source-transcript"],
.submit-form:has(input[name="effort"][value="standard"]:checked) [data-when="effort-standard"],
.submit-form:has(input[name="effort"][value="high"]:checked) [data-when="effort-high"],
.submit-form:has(input[name="mode"][value="auto"]:checked) [data-when="mode-auto"],
.submit-form:has(input[name="mode"][value="batch"]:checked) [data-when="mode-batch"],
.submit-form:has(input[name="mode"][value="flex"]:checked) [data-when="mode-flex"],
.submit-form:has(input[name="mode"][value="direct"]:checked) [data-when="mode-direct"] {
  display: block;
}

/* Result of a submission: the specimen that just went in. */
.subres { display: grid; grid-template-columns: 15rem minmax(0, 1fr); align-items: start; gap: var(--s-5); margin-bottom: var(--s-5); padding: var(--s-4); }
.subres-media { --cut: var(--cut-sm); aspect-ratio: 16 / 9; overflow: hidden; background: var(--well-fill); }
.subres-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.subres-media.ph { display: grid; place-items: center; }
.subres-media.ph img { width: 30%; height: auto; opacity: 0.6; }
.subres-body h2 { margin: 0 0 var(--s-2); font-size: var(--fs-lg); line-height: 1.25; overflow-wrap: anywhere; }
.subres-body .eyebrow { color: var(--gold-1); margin-bottom: var(--s-1); }
.subres-msg { margin: var(--s-2) 0 0; color: var(--text-2); font-size: var(--fs-sm); }

/* How it continues: three numbered facets joined by a line. */
.submit-aside h2 { margin: var(--s-2) 0 var(--s-5); font-size: var(--fs-lg); }
.flow { margin: 0 0 var(--s-5); padding: 0; list-style: none; counter-reset: flow; }
.flow li { position: relative; display: grid; gap: 2px; padding: 0 0 var(--s-5) 52px; counter-increment: flow; }
.flow li::before {
  content: counter(flow);
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: linear-gradient(150deg, #2c3243, #1f2330);
  color: var(--gold-1);
  font: 700 var(--fs-md) / 1 var(--font-display);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.flow li::after { content: ""; position: absolute; left: 16px; top: 38px; bottom: 6px; width: 1px; background: linear-gradient(180deg, rgba(242, 179, 61, 0.5), var(--line)); }
.flow li:last-child { padding-bottom: 0; }
.flow li:last-child::after { display: none; }
.flow strong { color: var(--text); font: 600 var(--fs-md) / 1.3 var(--font-display); }
.flow span { color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }

/* ---------- Status ---------- */

.tabs ul { display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 3px; list-style: none; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-deep); box-shadow: var(--shadow-well); }
.tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 var(--s-4);
  border-radius: 7px;
  color: var(--text-2);
  font: 600 var(--fs-sm) / 1 var(--font-display);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.tabs a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.tabs a[aria-current="page"] { color: var(--ink); background: var(--gold-fill); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset; }
.tabs a[aria-current="page"]:focus-visible { outline-color: var(--text); }

.slist { display: grid; gap: var(--s-4); margin: 0; padding: 0; list-style: none; }
.srow { display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); align-items: start; gap: var(--s-5); padding: var(--s-4); }
.srow.s-failed { background: linear-gradient(150deg, rgba(255, 138, 122, 0.6), rgba(59, 67, 87, 0.75) 40%, rgba(59, 67, 87, 0.55)); }
.srow.s-queued, .srow.s-running, .srow.s-batch_pending, .srow.s-finalizing {
  background: linear-gradient(150deg, rgba(255, 224, 143, 0.85), rgba(201, 138, 30, 0.4) 25%, rgba(59, 67, 87, 0.8) 50%, rgba(242, 179, 61, 0.3));
}
.srow-media { --cut: var(--cut-sm); aspect-ratio: 16 / 9; overflow: hidden; background: var(--well-fill); }
.srow-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.srow-media.ph { display: grid; place-items: center; }
.srow-media.ph img { width: 26%; height: auto; opacity: 0.6; }
.s-succeeded .srow-media img { filter: saturate(0.9); }
.srow-body { min-width: 0; display: grid; gap: var(--s-2); }
.srow-title { margin: 0; font-size: var(--fs-lg); line-height: 1.25; overflow-wrap: anywhere; }
.srow-title a { color: var(--text); text-decoration: none; }
.srow-title a:hover { color: var(--gold-1); text-decoration: underline; }

/* Pipeline steps: four slanted bars, filled up to the current state. */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: var(--s-1) 0; padding: 0; list-style: none; max-width: 36rem; }
.step { position: relative; padding-top: 12px; color: var(--muted); font: 600 var(--fs-xs) / 1.25 var(--font-display); letter-spacing: 0.01em; }
.step::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--line-strong); clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%); }
.step.done { color: var(--text-2); }
.step.done::before { background: var(--gold-4); }
.step.now { color: var(--gold-1); }
.step.now::before { background: var(--gold-fill); box-shadow: 0 0 12px rgba(242, 179, 61, 0.6); }
.s-succeeded .step.done::before { background: var(--ok); opacity: 0.75; }
.s-succeeded .step:last-child { color: var(--ok); }
.step.bad { color: var(--bad); }
.step.bad::before { background: var(--bad); }

.srow-facts { display: flex; flex-wrap: wrap; gap: 4px var(--s-5); margin: 0; font-size: var(--fs-sm); }
.srow-facts div { display: flex; gap: 6px; }
.srow-facts dt { color: var(--muted); }
.srow-facts dd { margin: 0; color: var(--text-2); }
.srow-msg { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.srow-error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: var(--s-1);
  padding: 10px 10px 10px 14px;
  border: 1px solid rgba(255, 138, 122, 0.32);
  border-radius: var(--r-sm);
  background: rgba(255, 138, 122, 0.07);
}
.srow-error p { margin: 0; flex: 1 1 18rem; color: var(--text-2); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.srow-error strong { color: var(--bad); font-family: var(--font-display); }
.srow-error form { margin: 0; }

/* ---------- Search page ---------- */

.bigseek {
  display: flex;
  align-items: stretch;
  min-height: 62px;
  margin: 0 0 var(--s-6);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background:
    var(--well-fill) padding-box,
    linear-gradient(160deg, #d6ae58, var(--line-field) 40%, var(--line-field) 70%, #a48852) border-box;
  box-shadow: var(--shadow-well), 0 18px 40px rgba(3, 5, 9, 0.35);
}
.bigseek:focus-within {
  background:
    var(--well-fill) padding-box,
    linear-gradient(160deg, var(--gold-1), rgba(201, 138, 30, 0.75) 45%, rgba(242, 179, 61, 0.65)) border-box;
  box-shadow: var(--shadow-well), 0 0 0 4px rgba(242, 179, 61, 0.16);
}
.bigseek-icon { flex: none; align-self: center; margin-left: var(--s-4); color: var(--gold-2); }
.bigseek input[type="search"] { flex: 1; min-width: 0; min-height: 0; padding: 0 var(--s-3); border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: var(--fs-lg); }
.bigseek input[type="search"]:focus { outline: none; box-shadow: none; }
.bigseek select { flex: 0 0 auto; width: 16rem; max-width: 40%; min-height: 0; padding: 0 36px 0 var(--s-4); border: 0; border-left: 1px solid var(--line-field); border-radius: 0; background-color: transparent; box-shadow: none; color: var(--text-2); }
.bigseek select:focus { box-shadow: none; }
.bigseek select:focus-visible { outline: 2px solid var(--gold-1); outline-offset: -3px; border-radius: 4px; }
.bigseek button { flex: none; margin: 6px; min-height: 0; padding: 0 var(--s-5); border-radius: 7px; font-size: var(--fs-md); }

/* Errors (404 and service errors) as an empty state with a red edge. */
.empty.is-error { background: linear-gradient(150deg, rgba(255, 138, 122, 0.55), rgba(59, 67, 87, 0.75) 40%, rgba(59, 67, 87, 0.6)); }
.empty.is-error h1 { margin: var(--s-2) 0 0; font-size: var(--fs-xl); }

/* ---------- Content pages: small screens ---------- */

@media (max-width: 899px) {
  .vhero-in { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); padding: var(--s-3) var(--s-3) var(--s-4); }
  .vhero-in::after { background: linear-gradient(180deg, rgba(20, 23, 31, 0.1) 0%, rgba(20, 23, 31, 0.6) 40%, rgba(20, 23, 31, 0.75) 100%); }
  .vhero-body { padding: 0 var(--s-2); }
}

@media (max-width: 719px) {
  .vhero { margin-bottom: var(--s-4); }
  .vhero-play { width: 56px; height: 56px; }
  .vhero-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .vhero-actions > form:first-child { grid-column: 1 / -1; }
  .vhero-actions > form button { width: 100%; }
  .vhero-actions .defer { grid-column: 1 / -1; }
  .defer select { flex: 1; min-width: 0; }
  .defer button { width: auto !important; }
  .vplate { padding: var(--s-3) var(--s-4); }
  .tl { padding: var(--s-4); }
  .tl-svg { margin-bottom: var(--s-2); }
  .moments { columns: 1; }
  .thesis { padding: var(--s-4); }
  .thesis-no { font-size: 2rem; top: 12px; right: 14px; }
  .thesis h3 { padding-right: 3rem; font-size: 1.125rem; }
  .sections li { grid-template-columns: minmax(0, 1fr); gap: var(--s-1); }
  .range { justify-self: start; }
  .sfoot .t { margin-left: 0; }
  .voice { padding: var(--s-4); }
  .voice p { font-size: var(--fs-md); }

  .submit-form { padding: var(--s-4); }
  .urlwell input[type="text"] { font-size: var(--fs-md); min-height: 58px; }
  .urlwell { min-height: 60px; }
  .opt-face { padding: 12px 12px 12px 14px; }
  .opt-face::after { top: 14px; right: 12px; width: 10px; height: 10px; }
  .submit-bar { flex-direction: column; align-items: stretch; }
  .subsum { display: grid; grid-template-columns: 1fr 1fr; }
  .ss-cell + .ss-cell { border-left: 0; }
  .ss-cell:nth-child(even) { border-left: 1px solid var(--line); }
  .ss-cell:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .submit-go { width: 100%; }
  .subres { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }

  .tabs { width: 100%; }
  .tabs ul { flex-wrap: nowrap; }
  .tabs li { flex: 1 1 auto; display: flex; }
  .tabs a { flex: 1; justify-content: center; padding: 0 10px; }
  /* Status rows: thumbnail beside title and steps, the details below over the full width. */
  .srow { grid-template-columns: 6.75rem minmax(0, 1fr); gap: var(--s-2) var(--s-3); padding: var(--s-3); }
  .srow-body { display: contents; }
  .srow-media { grid-row: span 3; align-self: start; }
  .srow-body > * { grid-column: 2; }
  .srow-body > .srow-facts, .srow-body > .srow-msg, .srow-body > .srow-error { grid-column: 1 / -1; }
  .srow-title { font-size: var(--fs-md); }
  .step { padding-top: 9px; }
  .step span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .srow-facts { flex-direction: column; }
  .srow-error button { width: 100%; }
  .srow-error form { flex: 1 1 100%; }

  .bigseek { flex-wrap: wrap; }
  .bigseek-icon { display: none; }
  .bigseek input[type="search"] { flex: 1 1 100%; min-height: 54px; padding: 0 var(--s-4); }
  .bigseek select { flex: 1 1 0; min-width: 0; max-width: none; width: auto; min-height: 48px; border-left: 0; border-top: 1px solid var(--line-field); }
  .bigseek button { margin: 0; border-radius: 0 0 9px 0; min-height: 48px; }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .vcard:hover, .vcard:focus-within { transform: none; }
  .vcard:hover .vmedia img { transform: none; }
  .auth-glint { display: none; }
  .vhero-shot:hover .vhero-play, .vhero-shot:focus-visible .vhero-play { transform: translate(-50%, -50%); }
  .tl-svg a:hover .tl-mk polygon { transform: none; }
}
