/* ============ Tokens ============ */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-alt: #f3f2ef;
  --surface: #ffffff;
  --ink: #111110;
  --ink-2: #52514e;
  --ink-3: #8a8984;
  --line: #e2e1dc;
  --grid: #ecebe7;
  --accent: #2a78d6;        /* Q / ours */
  --accent-soft: #2a78d61f;
  --violet: #6250d6;
  --part1: #2f5f9e;         /* Part 1 / Part 2: the colours of the videos (s2_shades.py P1COL, P2COL) */
  --green: #2e7d32;
  --cost: #eb6834;          /* frame cost */
  --cost-soft: #eb683426;
  --base: #b9b8b2;          /* baselines */
  --base-neg: #d8d7d1;
  --phase-1: #2a78d6; --phase-2: #1f9a4c; --phase-3: #8e3fb0; --phase-4: #c99a00;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 8px 24px rgb(0 0 0 / .06);
  --serif: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* ============ Base ============ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); }
h1, h2, h3 { margin: 0; font-weight: 400; }
h2 { font: 600 clamp(1.8rem, 4vw, 2.6rem)/1.15 var(--serif); letter-spacing: -.025em; }
h2 em, h1 em { font-style: italic; }
h3 { font: 600 1.05rem/1.3 var(--sans); }
.sub { font: 600 1.6rem/1.2 var(--serif); margin: 3rem 0 1rem; }
.lead { color: var(--ink-2); font-size: 1.125rem; margin: .5rem 0 2rem; max-width: 40em; }
.lead.small { font-size: 1rem; margin-bottom: 1.5rem; }
.mt { margin-top: 5rem; }
.mt-s { margin-top: 1.5rem; }
.mt-m { margin-top: 3rem; }
.note { color: var(--ink-3); font-size: .85rem; margin: .75rem 0 0; }
.caption { text-align: center; color: var(--ink-2); margin: 1rem 0 0; font-size: 1.05rem; }
.spectra { font-weight: 700; letter-spacing: .04em; }
.q { font-family: var(--mono); font-size: .92em; color: var(--accent); white-space: nowrap; }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 1160px; }
.block { padding: 6rem 0; }
.block.alt { background: var(--bg-alt); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: .5rem 1rem; }

/* ============ Nav ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 16px; height: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; letter-spacing: .08em; color: var(--ink); text-decoration: none; font-size: .9rem; }
.spectrum-dot { width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(135deg, var(--violet), var(--accent)); }
.nav nav { display: flex; gap: 1.25rem; overflow-x: auto; scrollbar-width: none; }
.nav nav a { color: var(--ink-2); text-decoration: none; font-size: .875rem; white-space: nowrap; }
.nav nav a:hover, .nav nav a.on { color: var(--ink); }
.scroll-progress { height: 2px; }
.scroll-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--violet), var(--accent)); }
@media (max-width: 720px) { .nav nav { gap: .9rem; } .brand { display: none; } }

/* ============ Hero ============ */
.hero { padding: 5.5rem 0 3.5rem; text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; color: var(--ink-3); margin: 0 0 1rem; }
.hero h1 { font: 600 clamp(2.8rem, 8.5vw, 5.5rem)/1 var(--serif); letter-spacing: -.035em; }
.hero h1 .grad {
  display: inline-block; padding: 0 .06em .08em 0;
  /* cyan -> blue -> violet -> magenta, from the "a" to the "e" of the earlier, wider ramp */
  background: linear-gradient(90deg, #0ad5f6 0%, #0bc7fb 19%, #4478ff 52%, #8e34fd 85%, #a520fd 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 3px rgb(0 0 0 / .28));
}
.subtitle { font-size: clamp(1.4rem, 3.6vw, 2.1rem); font-weight: 500; line-height: 1.25; color: var(--ink); margin: 1rem auto 1.5rem; max-width: 34em; }
.authors { font-size: 1rem; margin: 0 0 1.75rem; }
.links { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1.1rem;
  border-radius: 999px; background: var(--ink); color: var(--bg); text-decoration: none;
  font-weight: 500; font-size: .92rem; transition: transform .15s, opacity .15s;
}
.btn:hover { transform: translateY(-1px); opacity: .9; }
.spectrum-bar {
  height: 6px; max-width: 360px; margin: 3rem auto 2rem; border-radius: 3px;
  background: linear-gradient(90deg, #0ad5f6 0%, #0bc7fb 19%, #4478ff 52%, #8e34fd 85%, #a520fd 100%);
  opacity: .85;
}
.tldr { font: 500 clamp(1.15rem, 2.5vw, 1.45rem)/1.45 var(--serif); max-width: 30em; margin: 0 auto; }
.tldr b { font-weight: 700; }
.tldr .spectra { letter-spacing: .02em; }
.tldr .qi { white-space: nowrap; font-style: italic; color: #1f6bff; }   /* the Q colour of the hero video (q_phone_side_by_side.py Q_COLOR) */
.hero .wrap { max-width: 1120px; }
.tldr { max-width: none; }
.tldr-2 { display: inline-block; margin-top: .35rem; font-size: .92em; font-weight: 400; color: var(--ink-2); }
@media (min-width: 1000px) { .tldr-2 { white-space: nowrap; } }

/* ============ Media slots ============ */
.media { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); aspect-ratio: 16 / 9; }
.media.frame { box-shadow: var(--shadow); border: 1px solid var(--line); }
.media video, .media img.poster { width: 100%; height: 100%; display: block; object-fit: contain; }
.media .ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .4rem; padding: 1rem; text-align: center; color: var(--ink-3);
  background:
    repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--ink) 4%, transparent) 10px 11px),
    var(--surface);
  border: 1.5px dashed var(--line); border-radius: inherit;
}
.media .ph.has-poster { background: none; border: 0; }
.media .ph.has-poster::before { content: ''; position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 55%, transparent); }
.media .ph > * { position: relative; }
.media .ph i { font-size: 1.6rem; opacity: .7; }
.media .ph .ph-label { font-weight: 600; color: var(--ink-2); font-size: .9rem; }
.media .ph code { font: .72rem var(--mono); color: var(--ink-3); word-break: break-all; }
.media .ctrl {
  position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: rgb(0 0 0 / .55); color: #fff; cursor: pointer; opacity: 0; transition: opacity .2s;
}
.media:hover .ctrl, .media .ctrl:focus-visible { opacity: 1; }

/* ============ Method ============ */
.oc { display: grid; grid-template-columns: 2fr 3fr; gap: 3rem; align-items: center; margin-top: 2.5rem;
      background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.oc-graph { width: 100%; max-width: 420px; margin: 0 auto; display: block; background: #fff; border-radius: 10px; }
.oc-edges line { stroke: var(--base); stroke-width: 2; }
.oc-edges line.key { stroke: var(--violet); stroke-width: 3.5; }
.oc-edge-lbl { fill: var(--violet); font-size: 11px; font-weight: 600; }
.oc-node circle { fill: var(--surface); stroke: var(--ink-3); stroke-width: 1.5; }
.oc-node.m circle, .oc-node.r circle { stroke: var(--violet); stroke-width: 2; }
.oc-node text { text-anchor: middle; fill: var(--ink); font-size: 11px; font-weight: 600; }
.oc-node text.ex { fill: var(--ink-3); font-weight: 400; font-style: italic; }
.oc-points { padding-right: 1rem; }
.oc-points h3 { margin-bottom: .6rem; }
.oc-points ul { margin: 0; padding-left: 1.4rem; color: var(--ink-2); font-size: .95rem; }
.oc-points li { margin: .45rem 0; }
.oc-points b { color: var(--ink); }
@media (max-width: 720px) { .oc { grid-template-columns: 1fr; } }
.two-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.card p { margin: .5rem 0 0; color: var(--ink-2); font-size: .95rem; }
.card .tag { display: inline-block; font: 600 .7rem var(--sans); letter-spacing: .1em; text-transform: uppercase; margin-bottom: .5rem; }
.card.part1 { border-top: 3px solid var(--part1); } .card.part1 .tag { color: var(--part1); }
.card.part2 { border-top: 3px solid var(--green); } .card.part2 .tag { color: var(--green); }
.two-cards.cards-top { margin: 0 0 2rem; }
@media (max-width: 720px) { .two-cards { grid-template-columns: 1fr; } }

.chapters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.chapters button {
  flex: 1 1 180px; text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  border-radius: 10px; padding: .65rem .9rem; font: 500 .88rem var(--sans); cursor: pointer; position: relative; overflow: hidden;
}
.chapters button b { color: var(--violet); margin-right: .35rem; }
.chapters button::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: var(--fill, 0%); background: var(--violet); }
.chapters button.on { color: var(--ink); border-color: var(--violet); }

/* ============ Segmented / chips ============ */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; color: var(--ink-2); padding: .4rem .95rem; border-radius: 999px; font: 500 .88rem var(--sans); cursor: pointer; }
.seg button.on { background: var(--ink); color: var(--bg); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chips button {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px;
  padding: .35rem .8rem; font: 500 .82rem var(--sans); cursor: pointer;
}
.chips button.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.row-ctrl { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
select {
  font: 500 .88rem var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: .45rem 1rem;
}

/* ============ Trace explorer ============ */
#trace-tabs { margin-bottom: 1.5rem; }
.trace { display: grid; grid-template-columns: 5fr 7fr; gap: 1.5rem; align-items: start; }
@media (max-width: 820px) { .trace { grid-template-columns: 1fr; } }
.trace-media .media { aspect-ratio: 1 / 1; }
.keyframes { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: .5rem; }
.keyframes button {
  border: 2px solid transparent; padding: 0; border-radius: 8px; overflow: hidden; cursor: pointer; background: none;
  position: relative; opacity: .55; transition: opacity .2s, border-color .2s;
}
.keyframes button.on { opacity: 1; border-color: var(--cost); }
.keyframes img { width: 100%; display: block; aspect-ratio: 1; object-fit: cover; }
.keyframes .n {
  position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 4px;
  background: var(--surface); color: var(--ink); font: 700 .7rem/20px var(--sans); text-align: center;
}
.trace-plot { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1rem .75rem; }
.trace-readout { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: .5rem; }
.trace-readout div { display: flex; flex-direction: column; }
.trace-readout .lbl { font-size: .72rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.trace-readout span:last-child { font: 500 1.05rem var(--mono); }
.trace-readout .big span:last-child { font: 600 2rem/1 var(--serif); color: var(--accent); }
#trace-svg { width: 100%; height: auto; display: block; overflow: visible; }
.scrub { display: flex; align-items: center; gap: .75rem; margin-top: .5rem; }
.play { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); cursor: pointer; }
input[type=range] { flex: 1; width: 100%; accent-color: var(--accent); }

/* svg chart text */
svg text { font-family: var(--sans); fill: var(--ink-3); font-size: 11px; }
svg .axis { stroke: var(--line); }
svg .gridl { stroke: var(--grid); }

/* ============ Deviation dial ============ */
#dev-tasks { margin-bottom: 1.5rem; }
.dial { display: grid; grid-template-columns: 5fr 7fr; gap: 1.5rem; align-items: stretch; }
.dial-chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; display: flex; align-items: center; }
.dial-chart #dev-svg { margin-top: 0; }
.note.center { text-align: center; }
@media (max-width: 820px) { .dial { grid-template-columns: 1fr; } }
.dial-ctrl { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.dial-q { display: flex; align-items: baseline; gap: .6rem; }
.dial-q .lbl { font: italic 600 1.4rem var(--serif); color: var(--ink-2); }
#dev-q { font: 600 4rem/1 var(--serif); color: var(--accent); transition: color .2s; }
.qbar { height: 8px; border-radius: 4px; background: var(--grid); margin: .75rem 0 1.25rem; overflow: hidden; }
.qbar span { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .35s cubic-bezier(.2, .8, .2, 1); }
.dial-label { font-size: .9rem; color: var(--ink-2); }
.ticks { display: flex; justify-content: space-between; font: .75rem var(--mono); color: var(--ink-3); margin-top: .2rem; }
#dev-svg { width: 100%; margin-top: 1rem; display: block; }

/* ============ Human bars ============ */
.bars { display: flex; flex-direction: column; gap: .55rem; }
.bar-row { display: grid; grid-template-columns: 170px 1fr; align-items: center; gap: .75rem; }
.bar-row .name { font-size: .9rem; color: var(--ink-2); text-align: right; }
.bar-row.ours .name { color: var(--ink); font-weight: 600; }
.bar-track { position: relative; height: 26px; }
.bar-track .zero { position: absolute; top: -3px; bottom: -3px; left: 50%; width: 1px; background: var(--ink-3); }
.bar-fill {
  position: absolute; top: 0; bottom: 0; background: var(--base); transition: left .45s cubic-bezier(.2, .8, .2, 1), width .45s cubic-bezier(.2, .8, .2, 1);
}
.bar-fill.pos { border-radius: 0 4px 4px 0; }
.bar-fill.neg { border-radius: 4px 0 0 4px; background: var(--base-neg); }
.bar-row.ours .bar-fill { background: var(--accent); }
.bar-val { position: absolute; top: 50%; transform: translateY(-50%); font: 500 .8rem var(--mono); color: var(--ink); white-space: nowrap; transition: left .45s cubic-bezier(.2, .8, .2, 1); }
.bar-row.na .bar-val { color: var(--ink-3); }
.bar-row:hover .bar-fill { filter: brightness(1.08); }
@media (max-width: 560px) { .bar-row { grid-template-columns: 96px 1fr; } .bar-row .name { font-size: .78rem; } }
.table-view { margin-top: 1rem; font-size: .85rem; color: var(--ink-2); }
.table-view summary { cursor: pointer; color: var(--ink-3); }
.table-view table { border-collapse: collapse; margin-top: .75rem; width: 100%; font-variant-numeric: tabular-nums; }
.table-view th, .table-view td { padding: .35rem .5rem; border-bottom: 1px solid var(--line); text-align: right; }
.table-view th:first-child, .table-view td:first-child { text-align: left; }
.table-wrap { overflow-x: auto; }

/* ============ Real robot ============ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }
.vcard { margin: 0; }
.vcard figcaption { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .6rem .2rem 0; font-weight: 500; flex-wrap: wrap; }
.qbadge { font: 500 .82rem var(--mono); color: var(--accent); background: var(--accent-soft); padding: .2rem .6rem; border-radius: 999px; }
.qbadge.empty { color: var(--ink-3); background: var(--grid); }

.selection { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 720px) { .selection { grid-template-columns: 1fr; } }
.sel-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.sel-card h3 { margin-bottom: .75rem; }
.sel-row { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: .75rem; margin: .45rem 0; font-size: .88rem; color: var(--ink-2); }
.sel-row.ours { color: var(--ink); font-weight: 600; }
.dots { display: flex; gap: 5px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--base); display: block; transform: scale(.4); opacity: 0; transition: transform .35s, opacity .35s; }
.dots i.ok { background: var(--base); }
.sel-row.ours .dots i { border-color: var(--accent); }
.sel-row.ours .dots i.ok { background: var(--accent); }
.dots.in i { transform: scale(1); opacity: 1; }
.sel-row .frac { font: 500 .9rem var(--mono); }

.fig { margin: 0 auto 2rem; max-width: 560px; }
.fig img { width: 100%; display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; }
.fig figcaption { color: var(--ink-3); font-size: .85rem; margin-top: .6rem; text-align: center; }

/* ============ Wall ============ */
.toggle { display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; color: var(--ink-2); cursor: pointer; }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.wall .vcard { animation: pop .35s both; }
.wall .vcard figcaption { font-size: .88rem; }
.wall .vcard .meta { color: var(--ink-3); font-weight: 400; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }

/* ============ BibTeX / footer ============ */
.bib { position: relative; margin-top: 1.25rem; }
.bib pre {
  margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; overflow-x: auto; font: .85rem/1.6 var(--mono); color: var(--ink);
}
.copy {
  position: absolute; top: .75rem; right: .75rem; border: 1px solid var(--line); background: var(--bg);
  color: var(--ink-2); border-radius: 8px; padding: .3rem .7rem; font: 500 .8rem var(--sans); cursor: pointer;
}
.foot { border-top: 1px solid var(--line); padding: 2rem 0 3rem; font-size: .85rem; color: var(--ink-3); }
.foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.foot p { margin: 0; }
.top-link { color: var(--ink-2); text-decoration: none; }

/* ============ Reveal ============ */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s, transform .7s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============ Small screens ============ */
@media (max-width: 560px) {
  .sel-row { grid-template-columns: 1fr auto; row-gap: .3rem; }
  .sel-row .dots { grid-column: 1 / -1; grid-row: 2; }
  .dots { gap: 4px; }
  .dots i { width: 12px; height: 12px; }
  .bar-row.na .bar-val { font-size: .7rem; }
  .trace-readout { grid-template-columns: repeat(2, 1fr); }
}
.selection > *, .grid-2 > *, .trace > *, .dial > * { min-width: 0; }
.simhw-lbl { font-weight: 600; color: var(--ink-2); margin: 0 0 .5rem; text-align: center; }

/* demo-selection section */
.steps { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: none; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; position: relative; }
.steps .n { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center;
            background: var(--ink); color: var(--bg); font: 600 .85rem var(--sans); margin-bottom: .6rem; }
.steps h3 { margin-bottom: .35rem; }
.steps p { margin: 0; color: var(--ink-2); font-size: .93rem; }
.sel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: center; }
.sel-grid .fig { margin: 0; max-width: none; }
.sel-grid .fig figcaption { text-align: left; }
.sel-res .selection { grid-template-columns: 1fr; }
.sel-head { color: var(--ink-2); margin: 0 0 .75rem; }
@media (max-width: 820px) { .steps, .sel-grid { grid-template-columns: 1fr; } }

/* Q / cost plots under the sim-hardware clips, one under each half of the video */
.tplots { display: grid; grid-template-columns: 1fr 1fr; gap: 0 9%; padding: .6rem 4% 0; }
.tplots svg { width: 100%; height: auto; display: block; overflow: visible; }
.tplots svg text { font-size: 12px; }
.tplots svg text.tp-lbl { font-size: 13px; fill: var(--ink-2); }
#why { padding-top: 1rem; }   /* the hero video sits right under the tagline */

/* touch screens have no hover: keep the play/pause button visible there */
@media (hover: none) { .media .ctrl { opacity: .85; } }

/* one human-rated rollout per task under the agreement chart */
.rated { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.5rem; --per: 4; }
.rated-item { flex: 0 0 calc((100% - (var(--per) - 1) * .75rem) / var(--per)); }   /* a partial last row stays centred */
.rated-item { margin: 0; }
.rated-item .media { aspect-ratio: 848 / 480; border: 1px solid var(--line); border-radius: 10px; }
.rated-item .media .ctrl { display: none; }
.rated-item figcaption { display: flex; flex-direction: column; align-items: center; gap: .1rem; margin-top: .4rem;
                         font-size: .74rem; color: var(--ink-3); text-align: center; line-height: 1.3; }
.rated-item figcaption b { color: var(--ink-2); font-size: .8rem; }
.rated-item .rq { color: #1f6bff; font-weight: 600; }
.rated.single .rated-item { flex-basis: min(400px, 100%); }
.rated.single figcaption { font-size: 1.15rem; gap: .2rem; margin-top: .7rem; }
.rated.single figcaption b { display: none; }   /* the dropdown already names the task */
.rated.single figcaption span:not(.rq) { font-size: 1.15rem; color: var(--ink-2); font-weight: 600; }
.rated.single .rq { font-size: 1.3rem; }
@media (max-width: 900px) { .rated { --per: 3; } }
@media (max-width: 520px) { .rated { --per: 2; } }
.lead.one-line { max-width: none; }
@media (min-width: 900px) { .lead.one-line { white-space: nowrap; } }

/* hero buttons that have no link yet */
.btn.soon { cursor: default; }
.btn.soon:hover { transform: none; opacity: 1; }
.btn.soon small { font-weight: 400; opacity: .7; font-size: .8em; }

.media video { cursor: pointer; }
