/* Report page. Ported from mock/report-kstate.html; tokens, .tc, .eyebrow, .btn, .notice and the header come from base.css. */
.report { display: grid; gap: 3.5rem; padding-block: 1.5rem 4rem; }
.report > * { min-width: 0; }
.col { max-width: 40rem; }
.srcnote { font-size: .8rem; color: var(--dim); margin: 0; }
.mode { font: 600 .62rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.report .notice { max-width: 40rem; }

/* Header outline button (Layout headerStart) */
.menubtn { display: grid; place-content: center; gap: 4px; margin-right: .25rem; width: 44px; height: 44px; }
.menubtn span { display: block; width: 18px; height: 2px; border-radius: 1px; background: var(--text); }

/* Masthead: the video's thumbnail under the Side Car gradient (always dark, so text colors are fixed) */
.mast { display: grid; gap: 1rem; padding: clamp(1.5rem, 5vw, 3rem); border-radius: 14px; position: relative; overflow: hidden; color: #f7f2f1; isolation: isolate;
  background: linear-gradient(135deg, rgba(32,33,36,.94) 0%, rgba(45,26,58,.9) 50%, rgba(58,21,48,.86) 100%), var(--hero) center/cover no-repeat, #202124; }
.mast .eyebrow { color: #ff6234; }
.mast h1 { font-size: clamp(2rem, 5vw, 2.625rem); }
.meta { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .85rem; color: #babcc2; }
.meta a { color: #ff5f79; }
.dek { font-size: 1.15rem; line-height: 1.55; max-width: 40rem; margin: 0; color: #f7f2f1; }
.covers { display: flex; gap: .45rem; flex-wrap: wrap; }
.covers a { font: 600 .78rem/1 var(--body); color: #f7f2f1; text-decoration: none; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); padding: .5em .75em; border-radius: 999px; }
.covers a b { color: #ff6234; font-variant-numeric: tabular-nums; margin-right: .3em; }
.covers a:hover { border-color: #ff6234; color: #f7f2f1; }

/* Headline outlier score (DECISIONS #36). The masthead is always dark, so the tier colors are the dark palette's. */
.score { --tier: #f7f2f1; display: grid; gap: .35rem; margin: 0; }
.score-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .75rem; margin: 0; }
.score-k { flex-basis: 100%; font: 600 .7rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: #babcc2; }
.score-n { font: 700 clamp(2.4rem, 7vw, 3.25rem)/1 var(--head); color: var(--tier); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.score-tier { font: 600 .8rem/1 var(--body); color: #f7f2f1; padding: .45em .75em; border-radius: 999px; border: 1px solid var(--tier); background: rgba(255,255,255,.06); }
.score-line { margin: 0; font-size: .9rem; line-height: 1.5; color: #babcc2; max-width: 44rem; overflow-wrap: anywhere; }
.score.none { font-size: .9rem; color: #8a8c92; }
.score-src { margin: 0; font: 600 .62rem/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: #8a8c92; } /* DECISIONS #37: ours, not YouTube's */
.score.t-breakout { --tier: #ff6234; }
.score.t-overperformer { --tier: #ff5f79; }
.score.t-above_typical { --tier: #45d6a0; }
.score.t-typical { --tier: #f7f2f1; }
.score.t-below_typical { --tier: #babcc2; }
.score.t-early { --tier: #ab4ff6; }

/* Owner bar and CTA */
.ownerbar { display: grid; gap: .6rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.2rem; max-width: 52rem; margin-top: -2rem; }
.ob-row { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; }
.ob-label { font: 600 .72rem/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.seg button { font: 600 .82rem/1 var(--body); padding: .65em 1.1em; border: 0; background: transparent; color: var(--text); cursor: pointer; min-height: 36px; }
.seg button[aria-pressed="true"] { background: var(--purple-strong); color: #fff; }
.seg button:focus-visible { outline-offset: -2px; }
.seg button:disabled { color: var(--dim); cursor: not-allowed; text-decoration: line-through; text-decoration-thickness: 1px; }
.ownerbar .hint { margin: 0; }
.ownerbar [hidden] { display: none; }
.cta { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; justify-content: space-between; background: linear-gradient(135deg, var(--tint-p), var(--tint-o)); border: 1px solid color-mix(in srgb, var(--purple) 45%, transparent); border-radius: 12px; padding: 1rem 1.25rem; max-width: 52rem; }

/* Key moments */
.scrub { display: grid; gap: .7rem; }
.hl { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: .5rem; }
.hl li { display: flex; gap: .6rem; align-items: baseline; background: var(--surface); border-radius: 8px; padding: .6rem .75rem; font-size: .92rem; line-height: 1.35; }
.moments { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .55rem 1.5rem; }
.moments li { display: flex; gap: .6rem; align-items: baseline; font-size: .95rem; line-height: 1.4; }
.bar { display: flex; gap: 3px; height: 2.4rem; }
.bar .ch2 { min-width: 1.6rem; border: 0; border-radius: 6px; cursor: pointer; background: var(--surface2); color: var(--muted); display: flex; align-items: center; justify-content: center; font: 600 .72rem/1 var(--mono); padding: 0; }
.bar .ch2:nth-child(odd) { background: var(--tint-p); }
.bar .ch2:hover { outline: 2px solid var(--purple); }
.bar .ch2.on { background: var(--purple-strong); color: #fff; }
.chlist { display: grid; gap: .4rem; }
.chrow { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.chrow.open { border-color: var(--purple); }
.chhead { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: .2rem .9rem; align-items: baseline; text-align: left; padding: .7rem .9rem; border: 0; background: none; color: var(--text); cursor: pointer; font: inherit; min-height: 44px; }
.chhead .rng { font: 600 .74rem/1 var(--mono); color: var(--orange-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chhead .ttl { font-weight: 600; min-width: 0; }
.chhead .cnt { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.chhead .cnt::after { content: " ▸"; color: var(--purple); }
.chrow.open .chhead .cnt::after { content: " ▾"; }
.chbody { padding: 0 .9rem .9rem; display: grid; gap: .8rem; }
.chbody[hidden] { display: none; }
.zoom { position: relative; height: 1.6rem; margin: .6rem 0 .9rem; border-radius: 6px; background: var(--surface2); }
.zoom .zp { position: absolute; top: .25rem; bottom: .25rem; width: 3px; margin-left: -1.5px; border-radius: 2px; }
.zoom .zp.moment { background: var(--orange); top: -.25rem; bottom: -.25rem; }
.zoom .zp.onscreen { background: var(--purple); }
.zoom .zp::after { content: ""; position: absolute; inset: -.3rem -6px; } /* a wider hover/tap target than the 3px pin */
.zoom .zp:hover { box-shadow: 0 0 0 2px var(--text); }
.zoom .zl, .zoom .zr { position: absolute; top: 100%; font: .62rem/1.6 var(--mono); color: var(--dim); }
.zoom .zl { left: 0; } .zoom .zr { right: 0; }
.chbody .moments { grid-template-columns: 1fr; }
.mk { font: 600 .6rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.mk.moment { color: var(--orange-ink); } .mk.onscreen { color: var(--purple-ink); }

/* How it's told */
.told { display: grid; gap: 1.4rem; }
.told h3 { font-size: 1.15rem; margin-bottom: .7rem; }
.told .section-head p b { color: var(--text); }
.told-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1.5rem 2.5rem; }
.arc, .pp, .dev { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.arc li { display: grid; grid-template-columns: auto 1fr; gap: .15rem .7rem; align-items: baseline; padding-top: .65rem; position: relative; font-size: .92rem; }
.arc li b { font-family: var(--head); }
.arc li > span:last-child { grid-column: 2; color: var(--muted); line-height: 1.45; }
.arc .beat { position: absolute; top: 0; height: 4px; left: 0; right: 0; border-radius: 2px; background: var(--surface2); }
.arc .beat::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--l); width: var(--w); border-radius: 2px; background: linear-gradient(90deg, var(--orange), var(--purple)); }
.pp li { display: grid; grid-template-columns: 1fr; gap: .2rem; background: var(--surface); border-radius: 8px; padding: .6rem .75rem; font-size: .9rem; line-height: 1.4; }
.pp li > div { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.pp .arrow { color: var(--dim); padding-left: .3rem; }
.dev { grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: .6rem; }
.dev li { display: grid; gap: .3rem; align-content: start; background: var(--surface); border-radius: 8px; padding: .7rem .8rem; font-size: .9rem; }
.dev li b { font-family: var(--head); }
.dev li > span { color: var(--muted); line-height: 1.4; }
.dev .hits { display: flex; gap: .35rem; flex-wrap: wrap; }

/* Section heads */
.section-head { display: grid; gap: .45rem; max-width: 40rem; }
.section-head h2 { font-size: 2rem; }
.section-head p { margin: 0; color: var(--muted); }
.onscreen, .references, .explainer { display: grid; gap: 1.3rem; }

/* Article */
article { display: grid; gap: 1.1rem; }
article h2 { font-size: 1.5rem; margin-top: 1rem; }
article h2::before { content: ""; display: block; width: 2.2rem; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--orange), var(--purple)); margin-bottom: .7rem; }
article ul, article ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .4rem; }
article li::marker { color: var(--purple); }
.cite { color: inherit; text-decoration: none; border-bottom: 2px solid color-mix(in srgb, var(--purple) 55%, transparent); }
.cite:hover { color: inherit; border-bottom-color: var(--orange); }
.cite sup { font: 600 .64rem/1 var(--mono); color: var(--orange-ink); margin-left: .2em; }
@media (pointer: coarse) {
  .cite sup { display: inline-block; min-width: 24px; min-height: 24px; line-height: 24px; text-align: center; vertical-align: super; }
}
figure.inline { margin: .4rem 0; display: grid; gap: .45rem; }
figure.inline a { text-decoration: none; color: inherit; display: block; border-radius: var(--radius); }
figure.inline figcaption { font-size: .82rem; color: var(--muted); }

/* Capture cards: a still from that part of the video, veiled 80 % black, with the extracted text on top */
.screen { aspect-ratio: 16 / 9; max-width: 100%; color: var(--screen-ink); border-radius: var(--radius); padding: 6% 7%;
  display: flex; flex-direction: column; justify-content: center; gap: .25em; overflow: hidden; position: relative;
  font: 700 clamp(.95rem, 2.3vw, 1.3rem)/1.18 var(--head);
  text-shadow: 0 1px 3px rgba(0,0,0,.85), 0 0 14px rgba(0,0,0,.6);
  background: linear-gradient(rgba(0,0,0,.8), rgba(0,0,0,.8)), var(--still, none) center/cover no-repeat, var(--screen); }
.screen .l.hot { color: #ff6234; }
.screen.quote { font: 500 clamp(.9rem, 2.1vw, 1.15rem)/1.35 var(--body); font-style: italic; }
.screen.formula { font: 700 1rem/1.05 var(--head); }
.screen .tcode { position: absolute; left: .75rem; bottom: .6rem; font: 600 .68rem/1 var(--mono); color: #202124; background: #ff6234; padding: .3em .45em; border-radius: 4px; text-shadow: none; }
.screen .kind { position: absolute; right: .75rem; top: .6rem; font: 600 .6rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: #c58bff; background: rgba(171,79,246,.22); padding: .35em .5em; border-radius: 4px; text-shadow: none; }
.screen .credit { position: absolute; left: .75rem; top: .6rem; font: 500 .6rem/1 var(--body); color: #babcc2; text-shadow: none; max-width: 60%; }
.screen .txt { display: flex; flex-direction: column; gap: .04em; width: max-content; max-width: 66%; line-height: .98; letter-spacing: -.01em; text-transform: uppercase; overflow-wrap: normal; word-break: keep-all; }
.screen.quote .txt { text-transform: none; line-height: 1.12; letter-spacing: 0; }
.screen.formula .txt { line-height: 1.05; }
.screen .l { display: block; }
.screen .l.rule { border-top: .09em solid currentColor; margin: .12em 0; width: 100%; }
.screen:not(.quote):not(.formula) .txt { font-weight: 700; }

/* Gallery */
.filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.filters button { font: 600 .74rem/1 var(--body); letter-spacing: .05em; text-transform: uppercase; padding: .55em .9em; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; cursor: pointer; min-height: 36px; }
.filters button:hover { border-color: var(--purple); }
.filters button[aria-pressed="true"] { background: var(--purple-strong); border-color: var(--purple-strong); color: #fff; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.gallery a { text-decoration: none; color: inherit; display: block; border-radius: var(--radius); }
.gallery a[hidden] { display: none; }
.gallery a:hover .screen { box-shadow: 0 0 0 2px var(--orange); }
@media (prefers-reduced-motion: no-preference) { .gallery .screen { transition: transform .15s ease, box-shadow .15s ease; } .gallery a:hover .screen { transform: translateY(-2px); } }

/* Reference shelf */
.shelf { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1.25rem; }
.shelf > div { background: var(--surface); border-radius: var(--radius); padding: 1.1rem 1.25rem .4rem; min-width: 0; }
.shelf h3 { font-size: 1.25rem; display: flex; justify-content: space-between; align-items: baseline; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
.shelf h3 small { font: 600 .74rem/1 var(--body); color: var(--purple); background: var(--tint-p); padding: .3em .55em; border-radius: 999px; }
.refs { list-style: none; margin: 0; padding: 0; }
.refs li { padding: .85rem 0; border-bottom: 1px solid var(--border); display: grid; gap: .3rem; }
.refs li:last-child { border-bottom: 0; }
.refs .name { font-weight: 600; overflow-wrap: anywhere; }
.refs .desc { color: var(--muted); font-size: .92rem; line-height: 1.45; }
.refs .hits { display: flex; flex-wrap: wrap; gap: .35rem .6rem; align-items: center; }

/* Find + prompt */
.find, .prompt { display: grid; gap: 1rem; max-width: 46rem; }
.find form { display: flex; gap: .5rem; flex-wrap: wrap; }
.find input[type="search"] { flex: 1 1 16rem; }
.find-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.find-chips button { font: 500 .85rem/1.3 var(--body); padding: .45rem .8rem; border: 1px solid var(--border); background: transparent; color: var(--text); border-radius: 999px; cursor: pointer; min-height: 36px; }
.find-chips button:hover { border-color: var(--coral); color: var(--coral); }
.findnote { margin: 0; font-size: .85rem; color: var(--muted); min-height: 1.2em; }
.results { list-style: none; margin: 0; padding: 0; }
.results li { display: grid; grid-template-columns: auto auto 1fr; gap: .3rem .75rem; align-items: baseline; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.results .rtype { font: 600 .62rem/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--purple); white-space: nowrap; }
.results .rtext { min-width: 0; line-height: 1.5; overflow-wrap: anywhere; }
.results mark { background: var(--tint-o); color: inherit; border-radius: 2px; padding: 0 .1em; }
@media (max-width: 30rem) { .results li { grid-template-columns: auto 1fr; } .results .rtext { grid-column: 1 / -1; } }
.promptopts { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; font-size: .92rem; }
.promptopts label { display: inline-flex; gap: .4rem; align-items: center; cursor: pointer; font-weight: 500; font-size: .92rem; }
.promptopts input { accent-color: var(--orange); width: 1.1rem; height: 1.1rem; }
.ptokens { margin-left: auto; font: .78rem/1 var(--mono); color: var(--muted); }
.prompt textarea { width: 100%; padding: .9rem 1rem; font: .8rem/1.55 var(--mono); resize: vertical; }
.copyrow { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.starters ul { margin: .5rem 0 0; padding-left: 1.2rem; display: grid; gap: .35rem; }

/* Teardown: hero button (always on the dark masthead) and the section */
.td-cta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.td-cta .btn { min-height: 44px; }
.td-cta .btn[disabled] { opacity: .75; cursor: progress; }
.td-msg { margin: 0; font-size: .9rem; color: #babcc2; max-width: 34rem; line-height: 1.45; }
.td-slot:empty { display: none; }
.teardown { display: grid; gap: 1.6rem; }
.teardown h3 { font-size: 1.15rem; margin-bottom: .7rem; }
.td-block { display: grid; gap: .6rem; min-width: 0; }
.td-promise { display: grid; gap: .35rem; max-width: 46rem; border-left: 4px solid var(--orange); background: var(--surface); border-radius: 0 10px 10px 0; padding: .8rem 1rem; }
.td-promise p { font: 600 1.1rem/1.45 var(--head); }
.td-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr)); gap: .6rem; }
.td-tile { display: grid; gap: .3rem; align-content: start; background: var(--surface); border-radius: 10px; padding: .8rem .9rem; font-size: .9rem; line-height: 1.4; }
.td-tile.na { opacity: .7; }
.td-score { font: 600 .85rem/1 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.td-score b { font: 700 1.9rem/1 var(--head); color: var(--orange-ink); margin-right: .1em; }
.td-label { font: 600 .68rem/1.3 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--purple-ink); }
.td-words { font-weight: 600; overflow-wrap: anywhere; }
.td-notes { color: var(--text); }
.td-ev { color: var(--muted); font-size: .84rem; }
.td-gap { max-width: 46rem; }
/* The three hooks (DECISIONS #35): three cards (a muted one when a hook is missing), then the three checks as a compact list. */
.td-tiles.td-hooks { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.td-hook { gap: .5rem; min-width: 0; }
.td-hook.na .td-notes { color: var(--muted); }
.td-hook-text { font: 600 1.05rem/1.35 var(--head); overflow-wrap: anywhere; }
.td-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip.td-pat { background: var(--tint-p); color: var(--purple-ink); }
.chip.td-trg { background: transparent; border: 1px solid var(--border2); color: var(--muted); }
.td-hook .td-notes { overflow-wrap: anywhere; }
.td-checks { list-style: none; margin: .2rem 0 0; padding: 0; display: grid; gap: .65rem; max-width: 52rem; }
.td-checks li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; font-size: .92rem; line-height: 1.45; }
.td-check-k { font-weight: 600; min-width: 4.5rem; }
.chip.td-v.good { background: var(--tint-g); color: var(--pass); }
.chip.td-v.warn { background: var(--tint-o); color: var(--orange-ink); }
.td-check-note { flex: 1 1 16rem; min-width: 0; color: var(--muted); overflow-wrap: anywhere; }
.td-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.td-table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: .88rem; line-height: 1.4; }
.td-table th { text-align: left; font: 600 .66rem/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface); padding: .55rem .7rem; }
.td-table td { padding: .55rem .7rem; border-top: 1px solid var(--border); vertical-align: top; }
.td-table td:first-child { white-space: nowrap; }
.td-table tr.sag td { background: var(--tint-c); }
.td-sag { color: var(--fail); font-weight: 600; }
.td-loop { display: block; color: var(--muted); }
.td-judge { display: grid; grid-template-columns: minmax(8rem, auto) 1fr; gap: .45rem 1rem; margin: .3rem 0 0; max-width: 52rem; font-size: .92rem; line-height: 1.45; }
.td-judge dt { font-weight: 600; }
.td-judge dd { margin: 0; color: var(--muted); }
.td-payoff { max-width: 52rem; font-size: .92rem; line-height: 1.5; }
.td-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1.25rem 2rem; }
.td-list { margin: 0; padding-left: 1.2rem; display: grid; gap: .5rem; font-size: .92rem; line-height: 1.45; }
.td-list li::marker { color: var(--purple); }
@media (max-width: 30rem) { .td-judge { grid-template-columns: 1fr; gap: .15rem; } .td-judge dd { margin-bottom: .45rem; } }

/* Teardown: how it looks in the feed (DECISIONS #34). The stage copies the feed's own colors and sizes (dark by default,
   light with the page) in our fonts. Home / Mobile / Search are radio inputs; :has() switches the layout without JS. */
.fs { --yt-bg: #0f0f0f; --yt-text: #f1f1f1; --yt-muted: #aaaaaa; --yt-ph: #272727; --yt-line: #303030; display: grid; gap: .6rem; margin-bottom: .9rem; min-width: 0; }
:root[data-theme="light"] .fs { --yt-bg: #ffffff; --yt-text: #0f0f0f; --yt-muted: #606060; --yt-ph: #ececec; --yt-line: #e5e5e5; }
.fs-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.fs-title { font: 600 .68rem/1.3 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--purple-ink); }
.fs-note { margin: 0; }
.fs-seg { display: inline-flex; margin: 0; padding: 0; min-width: 0; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.fs-seg label { position: relative; display: inline-flex; }
.fs-seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.fs-seg span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 1em; font: 600 .78rem/1 var(--body); color: var(--text); cursor: pointer; }
.fs-seg input:checked + span { background: var(--purple-strong); color: #fff; }
.fs-seg input:focus-visible + span { outline: 2px solid var(--purple); outline-offset: -2px; }
.fs-cap { margin: 0; font-size: .72rem; line-height: 1.4; color: var(--dim); }
.fs-stage { background: var(--yt-bg); color: var(--yt-text); border: 1px solid var(--yt-line); border-radius: 14px; padding: 20px; font-family: var(--body); min-width: 0; }

/* Home: a 3×2 grid of 16:9 cards. The real card is a fixed slot (from the video ID); the rest are blank placeholders. */
.feed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 16px; }
.fc { display: grid; grid-template-columns: 48px minmax(0, 1fr) 28px; /* avatar 36 + 12 gap; menu 24 + 4 gap */ grid-template-areas: "th th th" "av ti mn" "av sub mn"; grid-template-rows: auto auto 1fr; align-content: start; min-width: 0; }
.fc-th { grid-area: th; position: relative; display: block; aspect-ratio: 16 / 9; margin-bottom: 12px; border-radius: 12px; overflow: hidden; background: var(--yt-ph); }
.fc-th img, .sc-th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fc-dur { position: absolute; right: 8px; bottom: 8px; padding: 1px 4px; border-radius: 4px; background: rgba(0, 0, 0, .6); color: #fff; font: 600 12px/18px var(--body); font-variant-numeric: tabular-nums; }
.fc-av { grid-area: av; position: relative; width: 36px; height: 36px; margin-right: 12px; border-radius: 50%; overflow: hidden; background: var(--yt-ph); }
.fc.real .fc-av { display: grid; place-items: center; background: var(--av); color: #fff; font: 600 16px/1 var(--body); }
.fc-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fc-ti { grid-area: ti; margin: 0 0 4px; max-height: 44px; font: 600 16px/22px var(--body); color: var(--yt-text); overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.fc-sub { grid-area: sub; display: grid; min-width: 0; font: 400 14px/20px var(--body); color: var(--yt-muted); }
.fc-ch, .fc-mt { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-play { vertical-align: -2px; margin-right: 4px; }
.fc-vw, .fc-ds { display: none; }
.fc-mn { grid-area: mn; justify-self: end; width: 24px; height: 24px; fill: var(--yt-text); }
.fc-bars { grid-area: ti; display: grid; gap: 8px; padding-top: 3px; }
.fc-bars i { display: block; height: 14px; border-radius: 4px; background: var(--yt-ph); }
.fc-bars i:nth-child(1) { width: 92%; }
.fc-bars i:nth-child(2) { width: 64%; }
.fc-bars i:nth-child(3) { width: 40%; height: 12px; margin-top: 4px; }

/* Mobile and Search: one column, the real card second, with a placeholder above (.pre) and below (.post). */
.fs:has(.fs-r:is([value="mobile"], [value="search"]):checked) .feed { grid-template-columns: minmax(0, 1fr); }
.fs:has(.fs-r:is([value="mobile"], [value="search"]):checked) .fc { display: none; }
.fs:has(.fs-r:is([value="mobile"], [value="search"]):checked) .fc:is(.real, .pre, .post) { display: grid; }
.fs:has(.fs-r:is([value="mobile"], [value="search"]):checked) .fc.pre { order: -1; }
.fs:has(.fs-r:is([value="mobile"], [value="search"]):checked) .fc.post { order: 1; }
.fs:has(.fs-r:is([value="mobile"], [value="search"]):checked) .fc-play { display: none; }
.fs:has(.fs-r:is([value="mobile"], [value="search"]):checked) .fc-vw { display: inline; }

/* Mobile: a phone-width column, full-bleed thumbnails, "Channel · 69K views · 2w ago" on one line. */
.fs:has(.fs-r[value="mobile"]:checked) .feed { max-width: 400px; margin-inline: auto; gap: 0; border: 1px solid var(--yt-line); border-radius: 22px; overflow: hidden; }
.fs:has(.fs-r[value="mobile"]:checked) .fc { padding: 0 12px 20px; }
.fs:has(.fs-r[value="mobile"]:checked) .fc-th { margin: 0 -12px 12px; border-radius: 0; }
.fs:has(.fs-r[value="mobile"]:checked) .fc-ti { max-height: 42px; font-size: 15px; line-height: 21px; }
.fs:has(.fs-r[value="mobile"]:checked) .fc-sub { display: flex; font-size: 12px; line-height: 18px; }
.fs:has(.fs-r[value="mobile"]:checked) .fc-mt { flex: none; }
.fs:has(.fs-r[value="mobile"]:checked) .fc-ch + .fc-mt::before { content: " · "; white-space: pre; }

/* Search: a list, thumbnail left at 360 px; title, views and age, channel, then the description's first lines. */
.fs:has(.fs-r[value="search"]:checked) .feed { gap: 16px; }
.fs:has(.fs-r[value="search"]:checked) .fc { grid-template-columns: minmax(0, 360px) 32px minmax(0, 1fr) 28px; grid-template-areas: "th ti ti mn" "th mt mt mn" "th av ch mn" "th ds ds mn"; grid-template-rows: auto auto auto 1fr; }
.fs:has(.fs-r[value="search"]:checked) .fc-th { margin: 0 16px 0 0; }
.fs:has(.fs-r[value="search"]:checked) .fc-ti { max-height: 52px; margin-bottom: 2px; font-size: 18px; line-height: 26px; font-weight: 400; }
.fs:has(.fs-r[value="search"]:checked) .fc-sub { display: contents; font-size: 12px; line-height: 18px; }
.fs:has(.fs-r[value="search"]:checked) .fc-mt { grid-area: mt; font-size: 12px; line-height: 18px; color: var(--yt-muted); }
.fs:has(.fs-r[value="search"]:checked) .fc-ch { grid-area: ch; align-self: center; padding: 12px 0; font-size: 12px; line-height: 18px; color: var(--yt-muted); }
.fs:has(.fs-r[value="search"]:checked) .fc-av { align-self: center; width: 24px; height: 24px; margin: 0 8px 0 0; font-size: 11px; }
.fs:has(.fs-r[value="search"]:checked) .fc-ds { grid-area: ds; max-height: 36px; font: 400 12px/18px var(--body); color: var(--yt-muted); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.fs:has(.fs-r[value="search"]:checked) .fc.ph .fc-av { margin-top: 12px; }

/* Shorts: one row of 9:16 cards, title and views below, no avatar. */
.feed.shorts { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 12px; }
.sc { display: grid; grid-template-columns: minmax(0, 1fr) 28px; grid-template-areas: "th th" "ti mn" "mt mn"; align-content: start; min-width: 0; }
.sc-th { grid-area: th; display: block; aspect-ratio: 9 / 16; margin-bottom: 10px; border-radius: 12px; overflow: hidden; background: var(--yt-ph); }
.sc .fc-mt { grid-area: mt; font: 400 14px/20px var(--body); color: var(--yt-muted); }

@media (max-width: 56rem) {
  .feed:not(.shorts) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Phones: Home collapses to one column (a placeholder above and below), Search shrinks its thumbnail, Shorts shows two. */
@media (max-width: 40rem) {
  .fs-stage { padding: 12px; }
  .feed:not(.shorts) { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .feed .fc { display: none; }
  .feed .fc:is(.real, .pre, .post) { display: grid; }
  .feed .fc.pre { order: -1; }
  .feed .fc.post { order: 1; }
  .fs:has(.fs-r[value="search"]:checked) .fc { grid-template-columns: 44% 26px minmax(0, 1fr) 24px; }
  .fs:has(.fs-r[value="search"]:checked) .fc-th { margin-right: 10px; border-radius: 8px; }
  .fs:has(.fs-r[value="search"]:checked) .fc-ti { max-height: 40px; font-size: 14px; line-height: 20px; font-weight: 600; }
  .fs:has(.fs-r[value="search"]:checked) .fc-ch { padding: 4px 0; }
  .fs:has(.fs-r[value="search"]:checked) .fc-av { width: 20px; height: 20px; margin-right: 6px; font-size: 10px; }
  .fs:has(.fs-r[value="search"]:checked) .fc-ds { display: none; }
  .fs:has(.fs-r[value="search"]:checked) .fc-mn { width: 20px; height: 20px; }
  .feed.shorts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feed.shorts .sc.ph:not(.post) { display: none; }
}

/* Video description */
.vdesc { display: grid; gap: 1rem; max-width: 46rem; }
.vdesc textarea { width: 100%; padding: .9rem 1rem; font: .85rem/1.55 var(--mono); resize: vertical; }
.desc-opt { display: inline-flex; gap: .4rem; align-items: center; cursor: pointer; font-weight: 500; color: var(--text); }
.desc-opt input { accent-color: var(--orange); width: 1.1rem; height: 1.1rem; }

/* By the numbers (DECISIONS #37): YouTube's public numbers in two blocks, then Avail.video's calculations set apart. */
.numbers { display: grid; gap: 1.25rem; }
.nb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1.25rem; }
.nb-block { display: grid; gap: 1rem; align-content: start; min-width: 0; background: var(--surface); border-radius: var(--radius); padding: 1.1rem 1.25rem 1.25rem; }
.nb-block h3 { font-size: 1.15rem; }
.nb-block h4 { font: 600 .66rem/1.3 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; }
.nb-calc { border-left: 4px solid var(--purple); border-radius: 0 var(--radius) var(--radius) 0; }
.nb-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); gap: 1rem 1.25rem; margin: 0; }
.nb-calc .nb-dl { grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); }
.nb-stat { min-width: 0; display: grid; gap: .25rem; align-content: start; }
.nb-stat dt { font: 600 .66rem/1.3 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.nb-stat dd { margin: 0; font: 700 1.35rem/1.15 var(--head); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.nb-stat dd.nb-t { font: 600 .95rem/1.35 var(--body); }
.nb-stat dd[title] { cursor: help; text-decoration: underline dotted color-mix(in srgb, var(--muted) 60%, transparent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
.nb-sub, .nb-stat dd.nb-sub { margin: 0; font: 400 .8rem/1.4 var(--body); color: var(--muted); overflow-wrap: anywhere; }
.nb-calc .nb-stat dd:not(.nb-sub) { font-size: 1.2rem; }
.nb-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.nb-tags .chip { text-transform: none; letter-spacing: 0; font: 500 .8rem/1.3 var(--body); white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
.nb-none { margin: 0; font-size: .9rem; color: var(--muted); }
.nb-chan { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.nb-av { width: 44px; height: 44px; flex: none; border-radius: 50%; object-fit: cover; background: var(--surface2); }
.nb-who { display: grid; gap: .1rem; min-width: 0; color: var(--text); text-decoration: none; line-height: 1.3; }
.nb-who b { font: 700 1.05rem/1.25 var(--head); overflow-wrap: anywhere; }
.nb-who span { font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
a.nb-who:hover b { text-decoration: underline; }
.nb-spark { margin: 0; display: grid; gap: .4rem; max-width: 26rem; }
.nb-spark figcaption { font: 600 .66rem/1.3 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.nb-spark svg { display: block; width: 100%; height: 48px; overflow: visible; }
.nb-spark polyline { fill: none; stroke: var(--orange); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
@media (max-width: 30rem) {
  .nb-block { padding: 1rem; }
  .nb-dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; }
  .nb-calc .nb-dl { grid-template-columns: minmax(0, 1fr); }
}

/* Outline drawer */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.45); }
.outline { position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; width: min(20rem, 86vw); overflow-y: auto;
  padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1rem calc(env(safe-area-inset-bottom, 0px) + 1.5rem) max(1rem, env(safe-area-inset-left, 0px));
  background: var(--surface); border-right: 1px solid var(--border); box-shadow: 8px 0 32px rgba(0,0,0,.35); }
.outline[hidden], .scrim[hidden] { display: none; }
.outline-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.outline-head button { width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; }
.outline ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.outline ol ol { margin: 2px 0 4px .9rem; padding-left: .7rem; border-left: 1px solid var(--border); }
.outline a { display: flex; gap: .6rem; align-items: baseline; padding: .55rem .65rem; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; line-height: 1.3; }
.outline ol ol a { font-weight: 400; font-size: .9rem; color: var(--muted); padding: .4rem .6rem; }
.outline a .ix { font: 600 .7rem/1 var(--mono); color: var(--dim); min-width: 1.4em; }
.outline a:hover { background: var(--surface2); }
.outline a[aria-current="true"] { background: var(--tint-o); color: var(--text); }
.outline a[aria-current="true"] .ix { color: var(--orange); }
@media (prefers-reduced-motion: no-preference) { .outline:not([hidden]) { animation: slidein .2s ease-out; } @keyframes slidein { from { transform: translateX(-100%); } } }

@media (max-width: 30rem) {
  .report { gap: 2.75rem; }
  .section-head h2 { font-size: 1.65rem; }
  .chhead { grid-template-columns: 1fr auto; }
  .chhead .rng { grid-column: 1 / -1; }
}

/* "Your other videos with …": a name on the report linked to the signed-in viewer's own library (DECISIONS #29) */
.xlink { justify-self: start; display: inline-flex; flex-wrap: wrap; gap: .25em; align-items: center; min-height: 32px; padding: .25rem .7rem; border-radius: 999px; background: var(--tint-p); border: 1px solid var(--purple); color: var(--text); font: 600 .8rem/1.3 var(--body); text-decoration: none; overflow-wrap: anywhere; max-width: 100%; }
.xlink:hover { text-decoration: underline; }
.xlink .xn { font-variant-numeric: tabular-nums; }

/* Previews (DECISIONS #33): one popover per page holding YouTube's own player, built by report.js. The player viewport
   stays at least 200×200 CSS px (YouTube embed rule): 356×200 on desktop, full width and ≥200px tall as a phone sheet.
   Nothing is drawn over the playing player; the still shows only while it is hidden (loading or seeking). */
.pv { position: absolute; z-index: 60; width: 358px; background: var(--surface); border: 1px solid var(--border2); border-radius: 12px; overflow: hidden; box-shadow: 0 12px 36px rgba(0,0,0,.45); }
.pv[hidden] { display: none; }
.pv-media { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 200px; background: #000; }
.pv-frame, .pv-still { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pv:not(.live) .pv-frame { visibility: hidden; }
.pv.live .pv-still { display: none; }
.pv-still { display: block; color: #f7f2f1; text-decoration: none; }
.pv-still img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-still img[hidden] { display: none; }
.pv-note { position: absolute; left: .6rem; bottom: .5rem; font: 600 .68rem/1 var(--body); letter-spacing: .04em; color: #f7f2f1; background: rgba(0,0,0,.6); padding: .35em .55em; border-radius: 4px; display: none; }
.pv.loading .pv-note, .pv.err .pv-note { display: block; }
.pv-play { display: none; position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border: 0; border-radius: 50%; background: var(--orange); color: var(--on-accent); font-size: 1.3rem; line-height: 1; padding-left: 4px; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,.5); }
.pv.rm .pv-play { display: block; }
.pv.rm .pv-note, .pv.err .pv-play { display: none; }
.pv.err .pv-note { display: block; }
.pv-cap { display: grid; grid-template-columns: auto 1fr; gap: .2rem .55rem; align-items: baseline; padding: .6rem .75rem .65rem; color: var(--text); text-decoration: none; font-size: .86rem; line-height: 1.35; }
.pv-cap:hover { color: var(--text); }
.pv-label { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.pv-go { grid-column: 2; font-size: .72rem; color: var(--dim); }
.pv-cap:hover .pv-go { color: var(--orange-ink); }
.pv.sheet { position: fixed; left: 8px; right: 8px; top: auto; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); width: auto; }
@media (prefers-reduced-motion: no-preference) {
  .pv.loading .pv-note { animation: pvpulse 1.2s ease-in-out infinite; }
  @keyframes pvpulse { 50% { opacity: .55; } }
}
