/* ═══════════════════════════════════════════════════════════════════════════
   TestVibe self-hosted guide — shared stylesheet.

   The guide is a set of focused pages (install, first boot, upgrade, backup,
   …) that share one shell: the top bar, the persistent sidebar, breadcrumbs
   and the pager. Every token and component below is the same one the single
   -page guide used, so a page written against the old markup still renders.
   ═══════════════════════════════════════════════════════════════════════════ */

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

:root {
  color-scheme: light;
  --gray-900: #101729; --gray-800: #1f2738; --gray-700: #374151;
  --gray-600: #4b5563; --gray-500: #6b7280; --gray-400: #9ca3af;
  --gray-300: #d1d5db; --gray-200: #e5e7eb; --gray-100: #f3f4f6;
  --gray-50:  #f9fafb;
  --app-bg: #ffffff; --card: #ffffff; --shell: #f8f8fa; --border-c: #e5e7eb;
  --primary: #2563eb; --primary-strong: #1d4ed8; --primary-soft: #eff6ff;
  --ok: #15803d; --ok-soft: #f0fdf4;
  --warn: #b45309; --warn-soft: #fffbeb;
  --bad: #b91c1c; --bad-soft: #fef2f2;
  --term-bg: #101729; --term-fg: #e5e7eb; --term-dim: #9ca3af;
  --font-ui: "Roboto", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Roboto Mono", ui-monospace, monospace;
  --radius-pill: 999px; --radius-card: 12px; --radius-tile: 8px;
  --shadow-tile: 0 1px 2px rgba(16,23,41,.05), 0 1px 3px rgba(16,23,41,.06);
  --ease: cubic-bezier(.4,0,.2,1);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --gray-900: #f1f5f9; --gray-800: #e2e8f0; --gray-700: #cbd5e1;
  --gray-600: #94a3b8; --gray-500: #64748b; --gray-400: #475569;
  --gray-300: #334155; --gray-200: #1e293b; --gray-100: #0f172a;
  --gray-50:  #0a0f1a;
  --app-bg: #0d1117; --card: #161b22; --shell: #1a2030; --border-c: #21293a;
  --primary: #3b82f6; --primary-soft: #1e3a5f;
  --ok: #4ade80; --ok-soft: #0f2417;
  --warn: #fbbf24; --warn-soft: #2a1f06;
  --bad: #f87171; --bad-soft: #2a1010;
  --term-bg: #0a0f1a; --term-fg: #e2e8f0; --term-dim: #64748b;
}

body { font-family: var(--font-ui); background: var(--app-bg); color: var(--gray-700); line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code, kbd { font-family: var(--font-mono); font-size: 0.86em; }
p code, li code, td code, dd code { background: var(--gray-100); padding: 0.08em 0.34em; border-radius: 4px; }
/* Inline code carries long unbreakable tokens (registry hosts, --set flags, paths).
   Without this they push the article wider than the viewport on a phone, and the
   whole page scrolls sideways instead of the token wrapping. Block code stays
   unwrapped — it scrolls inside its own container instead. */
p code, li code, td code, dd code, h3 code { overflow-wrap: anywhere; }

/* ── Nav ── */
.nav-wrap { position: sticky; top: 0; z-index: 20; background: var(--app-bg); border-bottom: 1px solid var(--border-c); }
nav.top { max-width: 1180px; margin: 0 auto; padding: 0.9rem 2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.nav-left { display: flex; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; }
.brand-logo { height: 32px; width: auto; display: block; }
.nav-tag { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gray-500); border-left: 1px solid var(--border-c); padding-left: 1rem; }
.nav-right { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.nav-docs { font-weight: 500; font-size: 0.88rem; color: var(--gray-700); }
.nav-docs:hover { color: var(--primary); text-decoration: none; }
.theme-toggle { display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: var(--shell); border: 1px solid var(--border-c); border-radius: 999px; }
.theme-toggle button { display: grid; place-items: center; width: 28px; height: 28px; border: none; background: transparent; cursor: pointer; border-radius: 999px; color: var(--gray-500); }
.theme-toggle button:hover { color: var(--gray-900); }
.theme-toggle button svg { width: 14px; height: 14px; display: block; }
.theme-toggle button[aria-pressed="true"] { background: var(--card); color: var(--primary); box-shadow: var(--shadow-tile); }
.who { font-size: 0.82rem; color: var(--gray-500); }
.signout { font-size: 0.8rem; color: var(--gray-600); background: none; border: 1px solid var(--border-c); border-radius: var(--radius-pill); padding: 0.28rem 0.75rem; cursor: pointer; font-family: var(--font-ui); }
.signout:hover { border-color: var(--gray-400); color: var(--gray-900); }

/* ── Layout ── */
.page { max-width: 1180px; margin: 0 auto; padding: 2.6rem 2rem 5rem; }
.kicker { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); margin-bottom: 0.5rem; }
h1 { font-size: 1.9rem; font-weight: 500; color: var(--gray-900); letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.lede { font-size: 1rem; color: var(--gray-600); max-width: 62ch; margin-bottom: 2rem; }
h2 { font-size: 1.15rem; font-weight: 500; color: var(--gray-900); margin-bottom: 0.4rem; }
h3 { font-size: 0.95rem; font-weight: 600; color: var(--gray-800); margin-bottom: 0.35rem; }
h4 { font-size: 0.86rem; font-weight: 600; color: var(--gray-800); margin-bottom: 0.3rem; }

.card { background: var(--card); border: 1px solid var(--border-c); border-radius: var(--radius-card); padding: 1.4rem 1.5rem; margin-bottom: 1.1rem; }
.card-head { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.card-head .grow { flex: 1; min-width: 0; }
.muted { font-size: 0.875rem; color: var(--gray-500); }
.tiny { font-size: 0.78rem; color: var(--gray-400); }

/* ── Guide shell: sticky sidebar + article ── */
.guide { display: grid; grid-template-columns: 244px minmax(0, 1fr); gap: 2.4rem; align-items: start; }
/* min-width:0 is load-bearing. A grid item's automatic minimum size is its
   min-content width, and these articles carry wide code blocks and tables — without
   this the column grows to fit them and the whole page scrolls sideways instead of
   the block that is actually too wide. */
.guide > aside, .guide > article { min-width: 0; }
.side { position: sticky; top: 84px; max-height: calc(100vh - 104px); display: flex; flex-direction: column; gap: 0.7rem; }
.side-scroll { overflow-y: auto; padding-right: 0.4rem; padding-bottom: 1rem; }

/* search */
.side-search { position: relative; }
.side-search input { width: 100%; height: 34px; padding: 0 1.9rem 0 0.6rem; font-family: var(--font-ui); font-size: 0.82rem; color: var(--gray-900); background: var(--card); border: 1px solid var(--gray-300); border-radius: var(--radius-tile); outline: none; }
.side-search input:focus { border-color: var(--primary); }
.side-search .hint { position: absolute; right: 0.45rem; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 0.66rem; color: var(--gray-400); border: 1px solid var(--border-c); border-radius: 4px; padding: 0 0.25rem; pointer-events: none; }
.side-search input:focus + .hint, .side-search input:not(:placeholder-shown) + .hint { display: none; }

.nav-cat { font-family: var(--font-mono); font-size: 0.63rem; letter-spacing: 0.11em; text-transform: uppercase; color: var(--gray-400); margin: 1.1rem 0 0.35rem; }
.nav-cat:first-child { margin-top: 0.2rem; }
.nav-page { display: block; font-size: 0.83rem; color: var(--gray-600); padding: 0.24rem 0.4rem 0.24rem 0.62rem; border-left: 2px solid transparent; line-height: 1.4; border-radius: 0 4px 4px 0; }
.nav-page:hover { color: var(--gray-900); background: var(--gray-50); text-decoration: none; }
.nav-page.current { color: var(--gray-900); font-weight: 600; border-left-color: var(--primary); background: var(--primary-soft); }
.nav-secs { margin: 0.15rem 0 0.4rem; list-style: none; }
.nav-sec { display: block; font-size: 0.78rem; color: var(--gray-500); padding: 0.16rem 0.4rem 0.16rem 1.5rem; border-left: 2px solid var(--border-c); line-height: 1.35; }
.nav-sec:hover { color: var(--gray-900); text-decoration: none; }
.nav-sec.on { color: var(--primary); border-left-color: var(--primary); }

/* results */
.results { list-style: none; }
.results li a { display: block; padding: 0.34rem 0.5rem; border-radius: 6px; border-left: 2px solid transparent; }
.results li a:hover, .results li a.on { background: var(--gray-50); text-decoration: none; border-left-color: var(--primary); }
.r-label { display: block; font-size: 0.82rem; color: var(--gray-800); line-height: 1.35; }
.r-page { display: block; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray-400); }
.results mark { background: transparent; color: var(--primary); font-weight: 600; }
.results .none { font-size: 0.8rem; color: var(--gray-400); padding: 0.4rem 0.5rem; }

/* sidebar toggle — only used below the breakpoint */
.side-toggle { display: none; width: 100%; align-items: center; justify-content: space-between; gap: 0.5rem; font-family: var(--font-ui); font-size: 0.83rem; font-weight: 500; color: var(--gray-800); background: var(--card); border: 1px solid var(--border-c); border-radius: var(--radius-tile); padding: 0.5rem 0.8rem; cursor: pointer; }
.side-toggle svg { width: 14px; height: 14px; transition: transform 0.15s var(--ease); }
.side-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

/* breadcrumbs + pager */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; font-size: 0.78rem; color: var(--gray-400); margin-bottom: 0.9rem; }
.crumbs a { color: var(--gray-500); }
.crumbs a:hover { color: var(--primary); }
.crumbs .sep { color: var(--gray-300); }
.crumbs .here { color: var(--gray-700); }

.pager { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.9rem; margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--border-c); }
.pager a { display: block; border: 1px solid var(--border-c); border-radius: var(--radius-tile); padding: 0.7rem 0.95rem; background: var(--card); }
.pager a:hover { border-color: var(--primary); text-decoration: none; }
.pager .dir { display: block; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray-400); margin-bottom: 0.15rem; }
.pager .t { display: block; font-size: 0.9rem; font-weight: 500; color: var(--gray-900); }
.pager a.next { text-align: right; }

/* ── Hub ── */
.hub-cat { margin-bottom: 2.2rem; }
.hub-cat > h2 { font-size: 1.15rem; letter-spacing: -0.01em; }
.hub-cat > .muted { margin-bottom: 1rem; max-width: 70ch; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
a.hub-tile { display: block; background: var(--card); border: 1px solid var(--border-c); border-radius: var(--radius-card); padding: 1.1rem 1.2rem; color: inherit; }
a.hub-tile:hover { border-color: var(--primary); text-decoration: none; }
a.hub-tile h3 { color: var(--gray-900); font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
a.hub-tile:hover h3 { color: var(--primary); }
a.hub-tile p { font-size: 0.85rem; color: var(--gray-500); line-height: 1.55; }
.tile-secs { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.7rem; }
.tile-secs span { font-size: 0.72rem; color: var(--gray-500); background: var(--gray-100); border-radius: 5px; padding: 0.12rem 0.42rem; }
.tile-secs .more { background: transparent; color: var(--gray-400); }

/* The one page written for the people who will use the install rather than run
   it. It gets the top of the hub and a treatment nothing else has, so an
   administrator can hand their team a single link. */
a.hub-hero { display: block; border: 1px solid var(--primary); background: var(--primary-soft); border-radius: var(--radius-card); padding: 1.5rem 1.6rem; margin-bottom: 2.4rem; color: inherit; }
a.hub-hero:hover { text-decoration: none; border-color: var(--primary-strong); }
a.hub-hero .kicker { margin-bottom: 0.35rem; }
a.hub-hero h2 { font-size: 1.35rem; font-weight: 600; color: var(--gray-900); margin-bottom: 0.35rem; }
a.hub-hero p { font-size: 0.92rem; color: var(--gray-600); max-width: 66ch; }
a.hub-hero .go { display: inline-block; margin-top: 0.7rem; font-size: 0.85rem; font-weight: 500; color: var(--primary); }

/* ── Bits ── */
.pill { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.74rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 6px; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.plain { background: var(--gray-100); color: var(--gray-500); }

/* Naming a control the reader has to find on screen. Same token the getting-started
   page uses, so "press Sign in" reads identically on both sides of the guide. */
.ui { font-weight: 600; color: var(--gray-900); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font-family: var(--font-ui); font-size: 0.875rem; font-weight: 500; padding: 0.55rem 1rem; border-radius: var(--radius-tile); border: 1px solid transparent; cursor: pointer; transition: background 0.15s var(--ease), border-color 0.15s var(--ease); }
.btn:hover { text-decoration: none; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-strong); }
.btn.outline { background: var(--card); color: var(--gray-900); border-color: var(--gray-300); }
.btn.outline:hover { border-color: var(--gray-400); }
.btn:disabled { opacity: 0.5; cursor: default; }

input[type=text], input[type=email], input[type=password] {
  width: 100%; height: 40px; padding: 0 0.8rem; font-family: var(--font-ui); font-size: 0.9rem;
  color: var(--gray-900); background: var(--card); border: 1px solid var(--gray-300);
  border-radius: var(--radius-tile); outline: none;
}
input:focus { border-color: var(--primary); }
label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--gray-600); margin-bottom: 0.35rem; }
.field { margin-bottom: 0.9rem; }

.msg { padding: 0.7rem 0.9rem; border-radius: var(--radius-tile); font-size: 0.86rem; margin-bottom: 1rem; line-height: 1.55; }
.msg.err { background: var(--bad-soft); color: var(--bad); }
.msg.ok { background: var(--ok-soft); color: var(--ok); }
.msg.info { background: var(--gray-100); color: var(--gray-600); }

table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
th { text-align: left; font-weight: 600; color: var(--gray-500); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 0 0.6rem 0.5rem; border-bottom: 1px solid var(--border-c); }
td { padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--border-c); color: var(--gray-700); vertical-align: top; }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }
.nowrap { white-space: nowrap; }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; }
.steps { counter-reset: s; list-style: none; }
.steps > li { counter-increment: s; position: relative; padding-left: 2rem; margin-bottom: 1rem; font-size: 0.9rem; color: var(--gray-600); }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0.05rem; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 0.72rem; font-weight: 700; display: grid; place-items: center; }
.steps strong { color: var(--gray-900); font-weight: 600; }
.steps ul { margin: 0.45rem 0 0 0; padding-left: 1.1rem; }
.steps ul li { margin-bottom: 0.28rem; }
.bullets { padding-left: 1.15rem; font-size: 0.9rem; color: var(--gray-600); }
.bullets li { margin-bottom: 0.4rem; }

section.sec { scroll-margin-top: 84px; margin-bottom: 2.6rem; }
section.sec > h2 { font-size: 1.3rem; letter-spacing: -0.01em; margin-bottom: 0.35rem; }
section.sec > .sec-lede { font-size: 0.925rem; color: var(--gray-600); max-width: 70ch; margin-bottom: 1.1rem; }
.sec-num { font-family: var(--font-mono); font-size: 0.7rem; color: var(--gray-400); letter-spacing: 0.08em; display: block; margin-bottom: 0.15rem; }

/* ── Callouts ── */
.note { border-left: 3px solid var(--gray-300); background: var(--gray-50); border-radius: 0 var(--radius-tile) var(--radius-tile) 0; padding: 0.85rem 1rem; margin: 1rem 0; font-size: 0.875rem; color: var(--gray-600); }
.note strong { color: var(--gray-900); }
.note.warn { border-left-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.note.warn strong { color: var(--warn); }
.note.bad { border-left-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.note.bad strong { color: var(--bad); }
.note.ok { border-left-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.note.ok strong { color: var(--ok); }
.note.info { border-left-color: var(--primary); background: var(--primary-soft); color: var(--gray-700); }
.note-label { display: block; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.3rem; opacity: 0.85; }

/* ── Code + console ── */
.code { position: relative; background: var(--gray-50); border: 1px solid var(--border-c); border-radius: var(--radius-tile); margin: 0.8rem 0; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.4rem 0.5rem 0.4rem 0.85rem; border-bottom: 1px solid var(--border-c); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray-400); }
.code pre { margin: 0; padding: 0.8rem 0.9rem; overflow-x: auto; font-family: var(--font-mono); font-size: 0.79rem; line-height: 1.7; color: var(--gray-800); white-space: pre; }
.code button.copy { border: 1px solid var(--border-c); background: var(--card); color: var(--gray-500); cursor: pointer; border-radius: 6px; padding: 0.15rem 0.45rem; font-size: 0.75rem; font-family: var(--font-mono); }
.code button.copy:hover { color: var(--primary); }

.term { background: var(--term-bg); border: 1px solid var(--border-c); border-radius: var(--radius-tile); margin: 0.9rem 0; overflow: hidden; }
.term-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.85rem; border-bottom: 1px solid rgba(255,255,255,0.08); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--term-dim); }
.term-head .dot { width: 8px; height: 8px; border-radius: 50%; background: #3f4a5f; display: inline-block; }
.term pre { margin: 0; padding: 0.9rem 1rem; overflow-x: auto; font-family: var(--font-mono); font-size: 0.775rem; line-height: 1.65; color: var(--term-fg); white-space: pre; }
.term pre b { color: #7dd3fc; font-weight: 500; }
.term pre i { color: var(--term-dim); font-style: normal; }
.term-cap { font-size: 0.76rem; color: var(--gray-400); margin: -0.5rem 0 1rem; }

figure { margin: 1.1rem 0 1.2rem; }
figure svg { display: block; width: 100%; height: auto; }
figcaption { font-size: 0.78rem; color: var(--gray-400); margin-top: 0.5rem; }

/* ── Screenshots ──────────────────────────────────────────────────────
   Real captures from a real boot of the shipped image, so they sit in the
   same frame as the terminal blocks: a labelled chrome bar, then the shot.
   Console captures keep the console's own black background; browser
   captures get a hairline so a white page does not bleed into the card. */
.shot { margin: 0.9rem 0; border: 1px solid var(--border-c); border-radius: var(--radius-tile); overflow: hidden; background: var(--term-bg); }
.shot .term-head { border-bottom: 1px solid rgba(255,255,255,0.08); }
.shot img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.shot.browser { background: var(--card); }
.shot.browser .term-head { background: var(--term-bg); }

.fig-box { fill: var(--card); stroke: var(--border-c); }
.fig-box-soft { fill: var(--gray-50); stroke: var(--border-c); }
.fig-accent { fill: var(--primary-soft); stroke: var(--primary); }
.fig-warn { fill: var(--warn-soft); stroke: var(--warn); }
.fig-t { fill: var(--gray-800); font-family: var(--font-ui); font-size: 12px; }
.fig-t.sm { fill: var(--gray-500); font-size: 10.5px; }
.fig-t.mono { font-family: var(--font-mono); font-size: 10.5px; fill: var(--gray-600); }
.fig-t.hd { font-weight: 600; font-size: 12.5px; fill: var(--gray-900); }
.fig-t.pri { fill: var(--primary); }
.fig-line { stroke: var(--gray-400); fill: none; }
.fig-line-pri { stroke: var(--primary); fill: none; }

.hide { display: none !important; }

footer { border-top: 1px solid var(--border-c); }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 1.6rem 2rem 3rem; display: flex; flex-wrap: wrap; gap: 0.8rem 1.5rem; align-items: center; justify-content: space-between; font-family: var(--font-mono); font-size: 0.74rem; color: var(--gray-500); }
.footer-inner a { color: var(--gray-500); }

@media (max-width: 980px) {
  .guide { grid-template-columns: 1fr; gap: 1.4rem; }
  .side { position: static; max-height: none; }
  .side-toggle { display: flex; }
  /* Collapsed by default on a narrow screen: the sidebar is 25 links, and it
     should not be the first screenful of every page on a phone. */
  .side-scroll { display: none; max-height: 60vh; border-bottom: 1px solid var(--border-c); }
  .side.open .side-scroll { display: block; }
  .side.open .side-search { display: block; }
  .side-search { display: none; }
}
@media (max-width: 700px) {
  nav.top, .page, .footer-inner { padding-left: 1.1rem; padding-right: 1.1rem; }
  .nav-tag { display: none; }
  h1 { font-size: 1.55rem; }
  .card { padding: 1.1rem 1rem; }
}

/* ── Walkthrough videos ────────────────────────────────────────────────────
   The guide is read on networks that cannot reach the public internet, so a
   video is an ENHANCEMENT and never the instruction: every step it shows is
   written out on the page beside it. Nothing third-party loads until someone
   asks for it — the poster is served from this origin, and the YouTube frame
   is only created on click. An operator who is air-gapped sees the poster and
   the caption, clicks nothing, and loses no information. */
.tv-vid { margin: 1.25rem 0 1.5rem; }
.tv-vid-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border: 1px solid var(--border-c); border-radius: var(--radius-card);
  overflow: hidden; background: var(--shell);
}
.tv-vid-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tv-vid-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tv-vid-play {
  position: absolute; inset: 0; width: 100%; height: 100%;
  padding: 0; border: 0; background: none; cursor: pointer; display: block;
}
.tv-vid-play::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(16,23,41,.28); transition: background .18s var(--ease);
}
.tv-vid-play:hover::after { background: rgba(16,23,41,.14); }
.tv-vid-play:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.tv-vid-badge {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  z-index: 1; display: flex; align-items: center; gap: .5rem;
  padding: .6rem 1.1rem .6rem .95rem; border-radius: var(--radius-pill);
  background: rgba(255,255,255,.94); color: #101729;
  font: 600 .9rem/1 var(--font-ui); box-shadow: var(--shadow-tile);
}
.tv-vid-badge::before {
  content: ""; width: 0; height: 0;
  border-left: 11px solid currentColor;
  border-top: 7px solid transparent; border-bottom: 7px solid transparent;
}
.tv-vid figcaption {
  margin-top: .6rem; font-size: .9rem; color: var(--muted, #6b7280); line-height: 1.5;
}
.tv-vid figcaption a { white-space: nowrap; }
