/*
 * AI Video Bench - public portal stylesheet (dark only, no light theme).
 * Public portal UI contract (2026-10-19): design tokens, component classes and ids listed at the end of this header.
 * This file must stay ASCII-only: it is copied to dist/assets/ and served to ko/en/ja pages alike.
 *
 * External loads: the two @import lines below are the only ones (whitelist: jsDelivr Pretendard,
 * Google Fonts Inter + JetBrains Mono). ja layouts add Noto Sans JP with their own <link>; without it
 * the ja stack falls back to Hiragino / Yu Gothic / Meiryo. font-display: swap on every family.
 *
 * Chart palette - one series, one emphasis (rank 1 only). Validated with the dataviz validator:
 *   node scripts/validate_palette.js "#0EA875,#5A79C8" --mode dark --surface "#0F1421"
 *     [PASS] Lightness band       all 2 inside L 0.48-0.67
 *     [PASS] Chroma floor         all 2 >= 0.1
 *     [PASS] CVD separation       worst adjacent #5A79C8<->#0EA875 dE 17.9 (deutan), tritan 8.8
 *     [PASS] Normal-vision floor  worst adjacent #5A79C8<->#0EA875 dE 21.7 (normal)
 *     [PASS] Contrast vs surface  all 2 >= 3:1
 *     -> ALL CHECKS PASS (exit 0). Same result with --surface "#07090E" (page background).
 *   Rejected first: "#10B981,#5B7FB8" (brand emerald L 0.696 is above the dark band; base chroma 0.097),
 *   "#10B981,#64748B" (slate reads gray, chroma 0.041).
 *   --viz-top #0EA875 marks the rank-1 bar only (medal text is always printed next to it, so rank is
 *   never carried by color alone); --viz-base #5A79C8 is every other bar and the .tgauge fill.
 *
 * Text contrast, WCAG 2.x ratio. Surfaces: --bg #07090E / --bg-2 #0B0F17 / card #0F1421
 * (card = rgba(17,24,39,.75) over --bg). Body text needs 4.5:1, text >= 24px or >= 18.66px bold needs 3:1.
 *   --text        #E6EDF3   16.85 / 16.23 / 15.56
 *   --text-2      #9AA4B2    7.90 /  7.61 /  7.29
 *   --muted       #6B7686    4.33 /  4.17 /  3.99   -> NOT used for text (hairlines, disabled glyphs only)
 *   --muted-text  #808B9B    5.77 /  5.56 /  5.33   (4.93 on the emerald-tinted partner card #0F1E27)
 *   --emerald     #10B981    7.85 on bg, 7.25 on card
 *   --cyan        #22D3EE   11.02 on bg, 10.17 on card
 *   --amber       #F59E0B    9.27 on bg, 8.56 on card
 *   --rose        #F43F5E    5.42 on bg, 5.01 on card
 *   --indigo      #6366F1    4.46 on bg, 4.12 on card -> fills and large text only; indigo text = #A5B4FC (9.22)
 *   link          #67E8F9   13.74 on bg, 12.68 on card
 *   disclosure    #FDE68A   14.57 on the amber tint #1A150E
 *   gold          #F5C542   11.33 on card, 9.35 on gold tint #262624; silver #CBD5E1 12.38; bronze #E0A47A 8.54
 *   lock badge    #FDA4AF    8.94 on rose tint #261827;  baseline badge #A5F3FC 12.86 on cyan tint #112331
 *   CTA text #FFF on the CTA fill stops #047857 / #0E7490 / #4338CA = 5.48 / 5.36 / 7.90
 *     (mid blends 5.45 and 6.93; hover brightness(1.06) keeps >= 4.75). The brand gradient
 *     (#10B981 -> #22D3EE -> #6366F1) is the bright 1px rim and glow; white on #22D3EE alone would be 1.8:1.
 *   avatar initials #FFF on #6D28D9 / #B45309 / #BE123C = 7.10 / 5.02 / 6.29
 *   savings figure: brand gradient text, 40-64px (large text, 3:1): worst stop #6366F1 = 4.46 on bg.
 *
 * Class / id contract (templates and JS should use these names):
 *   layout   .disclosure-box (first element of <body>) .indep-chip .topbar .brand .nav .langs .nav-toggle
 *            main  .wrap  .section .section__head .section__note .eyebrow  .split .hero-grid
 *   buttons  .btn .btn--cta .btn--ghost .btn--sm .btn--block   .cta-disc (one line, directly above a /go link)
 *   cards    .card .panel .glass  .tcard .tcard--partner .tcard__head .ticon[data-initial] .tbadge(--gold|
 *            --silver|--bronze|--lock|--base|--end) .ttags .tprice .tgauge(style="--v:.42") .tmeta  .tgrid
 *            .medal(--1|--2|--3)  .lock-badge  .base-badge
 *   calc     input[type=range] (style="--p:40%", a <percentage>)  .slider .slider__head .slider__out
 *            #calc-savings .savings__value  .top3 .top3__card(--1)  #calc-top3 > li
 *   charts   .viz .viz__head .bars .bar .bar__label .bar__fill(style="--w:.42") .bar__value .bar--top
 *            .bars--mini  .viz-tip .viz-tip__value .viz-tip__label .viz-tip__key  .viz-table  .viz-toggle
 *            rank-1 bar = .bar--top / [data-rank="1"]; without either marker the first .bar is rank 1.
 *            charts.js markup is styled too: .bars > .bar-row(.is-hi) > .bar-label(.bar-rank .bar-name)
 *            .bar-track > .bar-fill, .bar-value;  .chart-tip(__title __row __k __v);  table.data-table
 *   hero.js  .savings__line(.savings__pre .savings__num .savings__post) .savings__basis .savings__rule
 *            #calc-top3 > .tcard(.tcard--top = rank 1, .tcard--sparkle) .tmodel .tmonth .tcard__actions
 *            .ticon--initial .tcard__lottie  ol.beats > li.beat(--span) .beat__t .beat__d  pre.prompt-text
 *            .hook-lines .hook-line  ul.cost-lines .cost-line(__k __v __meta) .cost-total(__k __v __sub) .cost-basis
 *   media    .dual .dual__stage[data-wipe-host] .dual__wipe .dual__controls  .demo-label .ai-label
 *   other    .refuge-card  .masterbook-card .fork-preview .fork__opt(--a|--b)  .json-preview
 *            .avatar[data-initial] .chip .chip--est  .ranking-basis / #calc-basis  .modal .modal-card .toast .footer
 */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap");

@property --p { syntax: "<percentage>"; inherits: true; initial-value: 0%; }

/* ------------------------------------------------------------------ 1. tokens */
:root {
  color-scheme: dark;
  /* contract tokens (exact values, do not change) */
  --bg: #07090E;
  --bg-2: #0B0F17;
  --card: rgba(17,24,39,.75);
  --line: rgba(255,255,255,.08);
  --line-hi: rgba(16,185,129,.45);
  --text: #E6EDF3;
  --text-2: #9AA4B2;
  --muted: #6B7686;
  --emerald: #10B981;
  --cyan: #22D3EE;
  --indigo: #6366F1;
  --amber: #F59E0B;
  --rose: #F43F5E;
  --radius: 16px;
  /* derived tokens */
  --muted-text: #808B9B;
  --card-solid: #0F1421;
  --line-2: rgba(255,255,255,.14);
  --link: #67E8F9;
  --emerald-text: #6EE7B7;
  --indigo-text: #A5B4FC;
  --gold: #F5C542;
  --silver: #CBD5E1;
  --bronze: #E0A47A;
  --grad-cta: linear-gradient(135deg,#10B981 0%,#22D3EE 50%,#6366F1 100%);
  --cta-fill: linear-gradient(135deg,#047857 0%,#0E7490 50%,#4338CA 100%);
  --grad-fill: linear-gradient(90deg,#10B981 0%,#22D3EE 100%);
  --glow-hover: 0 0 0 1px var(--line-hi), 0 8px 40px -12px rgba(16,185,129,.35);
  --shadow-lg: 0 30px 80px -30px rgba(0,0,0,.75);
  /* chart tokens (validated, see header) */
  --viz-top: #0EA875;
  --viz-base: #5A79C8;
  --viz-track: rgba(90,121,200,.16);
  --viz-grid: rgba(255,255,255,.07);
  /* creators grid shared tokens (grid itself lives in creators.css) */
  --avatar-size: 56px;
  --grad-avatar-1: linear-gradient(135deg,#047857 0%,#0E7490 100%);
  --grad-avatar-2: linear-gradient(135deg,#4338CA 0%,#6D28D9 100%);
  --grad-avatar-3: linear-gradient(135deg,#B45309 0%,#BE123C 100%);
  --creator-min: 240px;
  /* type */
  --font-sans: "Inter", "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Noto Sans KR", "Malgun Gothic", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* layout */
  --nav-h: 64px;
  --maxw: 1280px;
  --gutter: 24px;
  --section-gap: 120px;
  --ease-out: cubic-bezier(.2,.8,.2,1);
}
:root:lang(ja) {
  --font-sans: "Inter", "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic",
    Meiryo, system-ui, sans-serif;
}

/* ------------------------------------------------------------------ 2. base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background-color: var(--bg); scrollbar-color: rgba(255,255,255,.18) transparent; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  padding-top: var(--nav-h);
  min-height: 100vh;
  color: var(--text);
  font: 400 16px/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background-color: var(--bg);
  /* hero glow: contract gradients on top, the generated mesh (assets/img/hero_glow.webp) underneath.
     If the image is missing the layer simply paints nothing and the gradients remain. */
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(16,185,129,.15), transparent),
    radial-gradient(ellipse 45% 35% at 86% -4%, rgba(99,102,241,.14), transparent),
    url("img/hero_glow.webp");
  background-repeat: no-repeat;
  background-position: 50% 0, 50% 0, 50% 0;
  background-size: 100% 1100px, 100% 1100px, 2400px auto;
}
:lang(ko) { word-break: keep-all; overflow-wrap: break-word; }
img, svg, video, canvas { max-width: 100%; }
img, video { height: auto; }
a { color: var(--link); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
p { margin: 0 0 1em; }
::selection { background: rgba(16,185,129,.35); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
a:focus-visible { border-radius: 4px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--card-solid); color: var(--text); border: 1px solid var(--line-2); }
.skip-link:focus { top: 12px; }
.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; }

/* typography scale */
h1, h2, h3, h4 { color: var(--text); margin: 0; }
h1 { font-size: clamp(36px, 5vw, 64px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; margin-bottom: 20px; text-wrap: balance; }
h1 em, .grad-text {
  font-style: normal;
  background: var(--grad-cta);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
h2 { font-size: 32px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; margin-bottom: 12px; text-wrap: balance; }
h3 { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.35; margin-bottom: 8px; }
h4 { font-size: 16px; font-weight: 600; line-height: 1.4; margin-bottom: 6px; }
.lead { font-size: 18px; line-height: 1.6; color: var(--text-2); max-width: 68ch; }
small, .small { font-size: 13px; color: var(--muted-text); }
.muted { color: var(--muted-text); }
strong, b { font-weight: 650; }
code, kbd, samp, pre { font-family: var(--font-mono); font-size: .92em; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; letter-spacing: -0.01em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

/* icons (assets/icons.svg sprite) */
.icon { display: inline-block; flex: none; width: 1em; height: 1em; vertical-align: -0.125em; stroke: currentColor; fill: none; }
.icon--lg { width: 1.25em; height: 1.25em; }
.icon--xl { width: 1.5em; height: 1.5em; }

/* ------------------------------------------------------------------ 3. layout */
.wrap, .container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
main, main.wrap { display: block; padding-top: 96px; padding-bottom: 120px; }
[id] { scroll-margin-top: 88px; }
main > section + section, .section + .section { margin-top: var(--section-gap); }
.section { position: relative; }
.section__head, .section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 32px; }
.section__head h2, .section-head h2 { margin: 0; }
.section__head p, .section-head p { margin: 8px 0 0; color: var(--text-2); max-width: 70ch; }
.section__note, .section-note, .list-note, .sort-note { display: block; margin: 0 0 10px; font-size: 13px; line-height: 1.5; color: var(--muted-text); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 5px 12px; font-size: 13px; font-weight: 600; letter-spacing: .01em; color: var(--emerald-text); background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.25); border-radius: 999px; }
.split, .hero-grid, .hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.grid-2, .two-col { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3, .three { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

/* ------------------------------------------------------------------ 4. first-line disclosure (legal, keep) */
/* first element of <body>; sits right under the fixed nav, above all page content.
   font-size > 1em on purpose: the notice must be larger than the 16px body text. */
.disclosure-box {
  font-size: 1.0625em;
  line-height: 1.5;
  font-weight: 500;
  color: #FDE68A;
  width: min(calc(100% - 2 * var(--gutter)), calc(var(--maxw) - 2 * var(--gutter)));
  margin: 16px auto 0;
  padding: 10px 16px 10px 14px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  background: linear-gradient(90deg, rgba(245,158,11,.14), rgba(245,158,11,.05) 60%, rgba(245,158,11,.03));
  border: 1px solid rgba(245,158,11,.24);
  border-left: 4px solid var(--amber);
  border-radius: 12px;
}
.disclosure-box strong { min-width: 0; font-weight: 600; color: #FDE68A; overflow-wrap: anywhere; }
.disclosure-box a { color: #FDE68A; text-decoration: underline; text-decoration-color: rgba(253,230,138,.45); }
/* independence declaration chip (next to the disclosure, also accepted in the nav) */
.indep-chip, .disclosure-box .chip, .badge.b-indep {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; line-height: 1.45; white-space: nowrap;
  color: var(--emerald-text); background: rgba(16,185,129,.10); border: 1px solid rgba(16,185,129,.35);
}
.disclosure-box .indep-chip, .disclosure-box .chip { margin-left: auto; }

/* ------------------------------------------------------------------ 5. fixed navigation (64px) */
.topbar, .site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  height: 64px;
  background: rgba(7,9,14,.72);
  -webkit-backdrop-filter: saturate(160%) blur(20px); backdrop-filter: saturate(160%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.topbar > .wrap, .topbar .bar, .site-header > .wrap { height: 100%; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; color: var(--text); font-size: 16px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; }
.brand::before { content: ""; width: 22px; height: 22px; border-radius: 7px; background: var(--grad-cta); box-shadow: 0 0 18px rgba(16,185,129,.45); }
.brand:hover { text-decoration: none; color: #fff; }
.topbar .badge.b-indep { font-size: 12px; padding: 2px 9px; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; min-width: 0; padding: 4px 3px; font-size: 14px; font-weight: 500; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--text-2); padding: 8px 12px; border-radius: 8px; white-space: nowrap; transition: color .2s, background-color .2s; }
.nav a:hover, .nav a[aria-current="page"], .nav a.is-active { color: var(--text); background: rgba(255,255,255,.05); text-decoration: none; }
.langs { display: flex; flex: none; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.langs a { padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.langs a:hover, .langs a[aria-current], .langs a.is-current { background: rgba(255,255,255,.08); color: var(--text); text-decoration: none; }
.nav-toggle { display: none; flex: none; width: 40px; height: 40px; margin-left: auto; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.03); color: var(--text); font-size: 18px; cursor: pointer; }
.nav-toggle:hover { border-color: var(--line-2); }
.coach-banner { margin-top: 12px; padding: 10px 16px; border: 1px solid rgba(34,211,238,.3); border-radius: 12px; background: rgba(34,211,238,.06); color: var(--text); font-size: 14px; }

/* ------------------------------------------------------------------ 6. glass cards */
.card, .panel, .glass, .tcard, .refuge-card, .masterbook-card, .fork__opt, .fork-a, .fork-b, .out {
  background: var(--card);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card, .glass { display: block; padding: 20px; color: var(--text); }
.panel { padding: 24px; }
.card, .glass, .tcard, .refuge-card, .masterbook-card, .top3__card, a.panel {
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card:hover, .glass:hover, .tcard:hover, .refuge-card:hover, .masterbook-card:hover, a.panel:hover {
  border-color: var(--line-hi);
  box-shadow: 0 0 0 1px var(--line-hi), 0 8px 40px -12px rgba(16,185,129,.35);
}
a.card:hover, .tcard:hover { transform: translateY(-2px); text-decoration: none; }
.card h3:first-child, .panel h3:first-child { margin-top: 0; }
.cards, .tgrid, .tcards, .tool-grid {
  display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
/* :has() rules stay in their own blocks so a browser without :has() drops only these lines */
#partners-featured:has(> .tcard), #ranking-list:has(> .tcard) {
  display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}

/* ------------------------------------------------------------------ 7. buttons, CTA, adjacent disclosure */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: rgba(255,255,255,.04); color: var(--text);
  font: 600 15px/1.25 var(--font-sans); text-align: center; text-decoration: none;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color .2s, border-color .2s, box-shadow .2s, transform .2s, filter .2s, color .2s;
}
.btn:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.22); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline-offset: 3px; }
.btn .icon { width: 1.1em; height: 1.1em; }
/* primary CTA: deep fill (white text >= 5.36:1) + brand gradient as the bright rim and glow */
.btn--cta, .btn.accent, .cta-affiliate {
  min-height: 48px; padding: 12px 22px; border-radius: 12px;
  border: 1px solid transparent;
  background: var(--cta-fill) padding-box, var(--grad-cta) border-box;
  color: #fff; font-weight: 700; font-size: 16px;
  text-shadow: 0 1px 1px rgba(0,0,0,.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 8px 28px -10px rgba(16,185,129,.55);
}
.btn--cta:hover, .btn.accent:hover, .cta-affiliate:hover {
  filter: brightness(1.06);
  border-color: transparent;
  background: var(--cta-fill) padding-box, var(--grad-cta) border-box;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 10px 40px -8px rgba(16,185,129,.6), 0 0 26px -6px rgba(34,211,238,.55);
  transform: translateY(-1px);
}
.btn--ghost, .btn.ghost, .btn-secondary {
  background: transparent; color: var(--text); border-color: rgba(255,255,255,.16);
}
.btn--ghost:hover, .btn.ghost:hover, .btn-secondary:hover { border-color: var(--line-hi); background: rgba(16,185,129,.06); color: #fff; }
.btn--sm { min-height: 36px; padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn--block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"], .btn.is-disabled {
  opacity: .5; cursor: not-allowed; filter: none; transform: none; box-shadow: none;
}
.btn-row, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0; }
/* adjacent disclosure: one grey line directly above every /go link */
.cta-disc, .cta-wrap .adjacent, .cta-disclosure {
  display: block; margin: 0 0 6px; font-size: 12px; line-height: 1.4; letter-spacing: .01em; color: var(--muted-text);
}
.cta-block { display: flex; flex-direction: column; align-items: stretch; gap: 0; margin-top: auto; }
.cta-block .cta-legal { margin: 0 0 6px; font-size: 12px; line-height: 1.45; color: var(--muted-text); }
.cta-block .btn { width: 100%; }
.cta-block .cta-tag { align-self: flex-start; margin-top: 6px; }
.cta-wrap { margin: 14px 0 4px; }
.cta-wrap .btn { width: 100%; }
.cta-tag { font-size: 11px; font-weight: 700; color: var(--muted-text); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.link-official { color: var(--text-2); }

/* ------------------------------------------------------------------ 8. tool card (one component for every public list) */
.tcard { position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 20px; }
.tcard--partner {
  border-color: rgba(16,185,129,.28);
  background: linear-gradient(180deg, rgba(16,185,129,.07), rgba(16,185,129,0) 45%), var(--card);
}
.tcard--partner::before {
  content: ""; position: absolute; top: -1px; left: 18px; right: 18px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(16,185,129,.9), rgba(34,211,238,.7), transparent);
}
.tcard--base { border-color: rgba(34,211,238,.28); }
.tcard--ended, .tcard--sunset { border-style: dashed; border-color: rgba(255,255,255,.14); }
.tcard__head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tcard__head h3 { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.tcard__head h3 a { color: inherit; }
.ticon {
  flex: none; display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 10px; object-fit: cover;
  background: rgba(255,255,255,.04); box-shadow: 0 0 0 1px rgba(255,255,255,.08);
}
/* fallback when there is no assets/tools/<id>.svg: <span class="ticon" data-initial="Hf"></span> */
.ticon[data-initial]:not(img) { border-radius: 50%; background: var(--grad-avatar-1); box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.ticon[data-initial]:not(img)::before { content: attr(data-initial); color: #fff; font: 800 14px/1 var(--font-sans); letter-spacing: -0.02em; }
.ticon[data-cat="voice"]:not(img) { background: var(--grad-avatar-2); }
.ticon--initial { border-radius: 50%; background: var(--grad-avatar-1); color: #fff; font: 800 14px/1 var(--font-sans); letter-spacing: -0.02em; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.ticon[data-cat="clipper"]:not(img) { background: var(--grad-avatar-3); }
.tbadge {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap;
  color: var(--text-2); background: rgba(255,255,255,.05); border: 1px solid var(--line);
}
.tbadge--gold, .tbadge[data-medal="1"] { color: var(--gold); background: rgba(245,197,66,.10); border-color: rgba(245,197,66,.38); }
.tbadge--silver, .tbadge[data-medal="2"] { color: var(--silver); background: rgba(203,213,225,.08); border-color: rgba(203,213,225,.32); }
.tbadge--bronze, .tbadge[data-medal="3"] { color: var(--bronze); background: rgba(224,164,122,.09); border-color: rgba(224,164,122,.34); }
.tbadge--lock, .lock-badge, .badge.b-lock { color: #FDA4AF; background: rgba(244,63,94,.10); border-color: rgba(244,63,94,.42); }
.tbadge--base, .base-badge, .badge.b-base { color: #A5F3FC; background: rgba(34,211,238,.08); border-color: rgba(34,211,238,.38); }
.tbadge--end { color: var(--muted-text); }
/* the Luma notice takes the score slot: a wider, wrapping authority badge */
.lock-badge {
  display: flex; align-items: flex-start; gap: 8px; white-space: normal;
  padding: 10px 12px; border: 1px solid rgba(244,63,94,.42); border-radius: 12px; font-size: 13px; font-weight: 600; line-height: 1.5;
}
.base-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid rgba(34,211,238,.38); border-radius: 999px; font-size: 12px; font-weight: 600; }
.ttags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ttags li { padding: 3px 9px; border-radius: 999px; font-size: 12px; line-height: 1.4; color: var(--text-2); background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.tprice { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; margin: 0; font-size: 28px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; color: var(--text); }
.tprice small { font: 500 13px/1.3 var(--font-sans); letter-spacing: 0; color: var(--muted-text); }
.tmodel { margin: -6px 0 0; font-size: 12.5px; color: var(--text-2); }
.tmonth { margin: -8px 0 0; font-size: 13px; color: var(--text-2); }
.tcard__actions { margin-top: auto; display: flex; flex-direction: column; gap: 0; }
.tcard__actions .btn { width: 100%; }
.tgauge { position: relative; height: 6px; margin-top: -4px; border-radius: 999px; background: var(--viz-track); overflow: hidden; }
.tgauge > span { display: block; height: 100%; width: calc(var(--v, 0) * 100%); min-width: 3px; border-radius: inherit; background: var(--viz-base); transition: width .5s var(--ease-out); }
.tmeta { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted-text); }
.tmeta a { color: var(--text-2); text-decoration: underline; text-decoration-color: rgba(154,164,178,.4); }
.tmeta a:hover { color: var(--text); }
.tcard > .tmeta + *, .tcard__foot { margin-top: auto; }
.tcard > .btn, .tcard__foot .btn { width: 100%; }
.tcard > .btn--cta + .btn--ghost, .tcard > .btn + .btn { margin-top: -4px; }
/* medals (calculated rankings only) */
.medal { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; font-size: 15px; line-height: 1; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line); }
.medal--1 { box-shadow: inset 0 0 0 1px rgba(245,197,66,.6), 0 0 14px -2px rgba(245,197,66,.5); background: rgba(245,197,66,.10); }
.medal--2 { box-shadow: inset 0 0 0 1px rgba(203,213,225,.5); background: rgba(203,213,225,.07); }
.medal--3 { box-shadow: inset 0 0 0 1px rgba(224,164,122,.55); background: rgba(224,164,122,.08); }

/* ------------------------------------------------------------------ 9. hero: designer + slider calculator */
#hero { position: relative; }
#hero .lead { margin-bottom: 32px; }
#hero-form { display: flex; flex-direction: column; gap: 14px; }
.input-row { display: flex; gap: 8px; align-items: stretch; }
.input-row > input, .input-row > textarea { flex: 1 1 auto; min-width: 0; }
#hero-idea { min-height: 56px; font-size: 16px; }
textarea#hero-idea { resize: vertical; }
.field-row { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
pre#hero-prompt, .prompt-pre, pre.prompt {
  margin: 0; padding: 14px 16px; max-height: 320px; overflow: auto;
  white-space: pre-wrap; word-break: break-word;
  font: 500 13px/1.6 var(--font-mono); color: var(--text);
  background: rgba(3,6,12,.6); border: 1px solid var(--line); border-radius: 12px;
}
table.beats, .beats-table { font-size: 13px; }
table.beats td:first-child, .beats-table td:first-child { font-family: var(--font-mono); color: var(--emerald-text); white-space: nowrap; }
/* 8-Beat timeline strip (hero.js: ol.beats > li.beat[--span] > .beat__t + .beat__d) */
.beats { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 10px; padding: 0; }
.beat {
  flex: 1 1 calc(var(--span, .125) * 100%); min-width: 132px;
  display: flex; flex-direction: column; gap: 2px; padding: 8px 10px;
  border: 1px solid var(--line); border-top: 2px solid rgba(16,185,129,.55); border-radius: 10px;
  background: rgba(16,185,129,.05);
}
.beat__t { color: var(--emerald-text); font: 700 12px/1.3 var(--font-mono); font-variant-numeric: tabular-nums; }
.beat__d { color: var(--text); font-size: 12.5px; line-height: 1.45; }
pre.prompt-text { margin: 0; padding: 12px 14px; max-height: 240px; overflow: auto; white-space: pre-wrap; word-break: break-word; font: 500 12.5px/1.6 var(--font-mono); color: var(--text-2); background: rgba(3,6,12,.6); border: 1px solid var(--line); border-radius: 12px; }
.hook-lines { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.hook-line::marker { color: var(--emerald-text); font-weight: 700; }
/* default-tool cost lines (hero.js: ul.cost-lines) */
.cost-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cost-line, .cost-total { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; font-size: 14px; }
.cost-line__k, .cost-total__k { color: var(--text-2); }
.cost-line__v { color: var(--text); font-weight: 700; }
.cost-line__meta, .cost-total__sub, .cost-basis { flex-basis: 100%; font-size: 12px; color: var(--muted-text); }
.cost-line__meta a, .cost-basis a { color: var(--text-2); text-decoration: underline; text-decoration-color: rgba(154,164,178,.4); }
.cost-total { padding-top: 10px; margin-top: 2px; border-top: 1px solid var(--line); }
.cost-total__k { color: var(--text); font-weight: 600; }
.cost-total__v { font-size: 22px; font-weight: 700; color: var(--text); }
.cost-basis { margin: 10px 0 0; }
#hero-hook { margin: 0; padding: 12px 16px 12px 18px; list-style: none; border-left: 3px solid var(--emerald); background: rgba(16,185,129,.05); border-radius: 0 12px 12px 0; }
#hero-hook li + li { margin-top: 6px; }
#hero-cost dl, .kv-list { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; margin: 0; font-size: 14px; }
#hero-cost dl.cost-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
#hero-cost .cost-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
#hero-cost .cost-row--total { padding-top: 10px; border-top: 1px solid var(--line); font-weight: 700; }
#hero-cost dt, .kv-list dt { color: var(--text-2); }
#hero-cost dd, .kv-list dd { margin: 0; text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text); }
#hero-run { width: 100%; }

/* custom range slider: fill follows --p (a <percentage>, set by JS or inline style) */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 28px; margin: 0; padding: 0;
  background: transparent; cursor: pointer;
}
input[type="range"]:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 8px; }
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px;
  background: var(--grad-fill) 0 0 / var(--p) 100% no-repeat, rgba(255,255,255,.08);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; margin-top: -7px; border-radius: 50%;
  background: #fff; border: 3px solid var(--emerald);
  box-shadow: 0 0 0 4px rgba(16,185,129,.18), 0 0 18px rgba(16,185,129,.65);
  transition: box-shadow .2s, transform .2s;
}
input[type="range"]:hover::-webkit-slider-thumb, input[type="range"]:focus-visible::-webkit-slider-thumb {
  transform: scale(1.08); box-shadow: 0 0 0 6px rgba(16,185,129,.24), 0 0 24px rgba(34,211,238,.7);
}
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(255,255,255,.08); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--grad-fill); }
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--emerald);
  box-shadow: 0 0 0 4px rgba(16,185,129,.18), 0 0 18px rgba(16,185,129,.65);
}
.slider, .calc-field { display: grid; gap: 8px; }
.slider + .slider, .calc-field + .calc-field { margin-top: 18px; }
.slider__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-2); }
.slider output, .slider__out, #calc-shorts-out, #calc-retry-out {
  font: 700 20px/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text);
}
.slider__scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted-text); }
.fixed-note { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }

/* savings hero figure: one per view, same sans as the page, proportional digits (dataviz rule) */
#calc-savings, .savings { margin: 24px 0 8px; }
.savings__value, .hero-num, #calc-savings .num, #calc-savings [data-savings] {
  display: block;
  font: 800 clamp(40px, 6vw, 64px)/1.02 var(--font-sans);
  letter-spacing: -0.035em;
  font-variant-numeric: proportional-nums lining-nums;
  background: var(--grad-cta);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 0 24px rgba(16,185,129,.25));
}
.savings__label, #calc-savings p { margin: 6px 0 0; font-size: 14px; color: var(--text-2); }
/* sentence "<pre> <number> <post>": number on its own first line, the sentence reads underneath */
.savings__line { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .3em; margin: 0; font-size: 16px; line-height: 1.5; color: var(--text-2); }
.savings__num {
  order: -1; flex: 0 0 100%;
  font: 800 clamp(40px, 6vw, 64px)/1.04 var(--font-sans);
  letter-spacing: -0.035em;
  font-variant-numeric: proportional-nums lining-nums;
  background: var(--grad-cta);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 0 24px rgba(16,185,129,.25));
  padding-bottom: 4px;
}
.savings__pre, .savings__post { color: var(--text); font-weight: 600; }
#calc-savings .savings__basis, #calc-savings .savings__rule, .savings__basis, .savings__rule { margin: 8px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--muted-text); }
#calc-savings .savings__rule { margin-top: 2px; }

/* Best Top 3 (rank 1 = gold rim) */
.top3, ol#calc-top3, ul#calc-top3, #calc-top3 > ol, #calc-top3 > ul {
  list-style: none; margin: 20px 0 0; padding: 0;
  display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr));
}
#calc-top3:has(> .top3__card) { margin: 20px 0 0; display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.top3__card, :is(.top3, ol#calc-top3, ul#calc-top3, #calc-top3 > ol, #calc-top3 > ul) > li {
  position: relative; overflow: hidden; min-width: 0;
  display: flex; flex-direction: column; gap: 6px; padding: 16px;
  border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line);
}
.top3__card--1, :is(.top3, #calc-top3) [data-rank="1"],
:is(.top3, ol#calc-top3, ul#calc-top3, #calc-top3 > ol, #calc-top3 > ul) > li:first-child {
  border-color: rgba(245,197,66,.55);
  background: linear-gradient(180deg, rgba(245,197,66,.10), rgba(245,197,66,.02));
  box-shadow: 0 0 0 1px rgba(245,197,66,.18), 0 12px 40px -16px rgba(245,197,66,.45);
}
/* CSS sparkle when no Lottie file is present */
.top3__card--1::after, :is(.top3, ol#calc-top3, ul#calc-top3, #calc-top3 > ol, #calc-top3 > ul) > li:first-child::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255,236,170,.10) 50%, transparent 65%);
  transform: translateX(-100%); animation: top3-sheen 3.6s var(--ease-out) 1s infinite;
}
.top3__card.has-lottie::after, li.has-lottie::after { display: none; }
@keyframes top3-sheen { 0% { transform: translateX(-100%); } 45%, 100% { transform: translateX(100%); } }
.top3__rank { font-size: 22px; line-height: 1; }
.top3__name { font-size: 16px; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.top3__per { font: 700 20px/1.2 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text); }
.top3__month { font-size: 13px; color: var(--text-2); }
.top3__card .btn, :is(.top3, #calc-top3) li .btn { margin-top: auto; width: 100%; }
#calc-top3:has(> .tcard) { margin: 20px 0 0; display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
#calc-top3 > .tcard { padding: 14px; gap: 10px; }
#calc-top3 > .tcard .tcard__head { flex-wrap: wrap; gap: 8px 10px; }
#calc-top3 > .tcard .tcard__head h3 { font-size: 15px; }
#calc-top3 > .tcard .tbadge { order: -1; flex-basis: auto; }
#calc-top3 > .tcard .ticon { width: 32px; height: 32px; border-radius: 8px; }
#calc-top3 > .tcard .ttags { display: none; }
#calc-top3 > .tcard .tprice { font-size: 22px; }
#calc-top3 > .tcard .btn { min-height: 44px; padding: 10px 12px; font-size: 14px; }
/* rank 1 card anywhere in a calculated ranking: gold rim (medal text is printed too) */
.tcard--top, #calc-top3 > .tcard[data-rank="1"] {
  border-color: rgba(245,197,66,.55);
  background: linear-gradient(180deg, rgba(245,197,66,.09), rgba(245,197,66,0) 55%), var(--card);
  box-shadow: 0 0 0 1px rgba(245,197,66,.18), 0 12px 40px -16px rgba(245,197,66,.45);
}
.tcard--top:hover, #calc-top3 > .tcard[data-rank="1"]:hover { border-color: rgba(245,197,66,.75); box-shadow: 0 0 0 1px rgba(245,197,66,.35), 0 12px 44px -12px rgba(245,197,66,.5); }
.tcard--top .tbadge, #calc-top3 > .tcard[data-rank="1"] .tbadge { color: var(--gold); background: rgba(245,197,66,.10); border-color: rgba(245,197,66,.38); }
.tcard--sparkle { overflow: hidden; }
.tcard__lottie { display: inline-block; flex: none; width: 32px; height: 32px; margin-left: auto; pointer-events: none; }
.lottie-slot { position: absolute; top: 8px; right: 8px; width: 48px; height: 48px; pointer-events: none; }

/* ------------------------------------------------------------------ 10. charts (dataviz rules) */
.viz, figure.viz { margin: 24px 0 0; }
.viz__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.viz__title { margin: 0; font-size: 14px; font-weight: 600; color: var(--text); }
.viz__caption, .viz figcaption { margin-top: 10px; font-size: 12.5px; color: var(--muted-text); }
/* horizontal bars: thin (12px), 4px rounded data end, square at the baseline.
   Two markups are supported: the contract rows (.bars > .bar: .bar__label .bar__fill .bar__value, value at the tip)
   and the charts.js rows (.bars > .bar-row: .bar-label(.bar-rank .bar-name) .bar-track > .bar-fill, .bar-value). */
.bars {
  --label-w: 9.5em; --value-w: 6.5em; --gap: 12px;
  position: relative; list-style: none; margin: 0; padding: 4px 0;
  display: flex; flex-direction: column; gap: 4px; font-size: 13px;
  transition: opacity .2s;
}
.bars .bar {
  position: relative; display: flex; align-items: center; gap: var(--gap);
  min-height: 30px; padding: 2px 0; border-radius: 6px;
  transition: transform .45s var(--ease-out), background-color .15s;
}
.bars .bar::before {
  content: ""; position: absolute; top: -2px; bottom: -2px; width: 1px;
  left: calc(var(--label-w) + var(--gap) - 1px); background: var(--viz-grid);
}
.bar__label {
  flex: 0 0 var(--label-w); min-width: 0; text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text); font-weight: 500;
}
.bar__fill {
  flex: 0 0 auto; height: 12px; min-width: 3px;
  width: calc((100% - var(--label-w) - var(--value-w) - 2 * var(--gap)) * var(--w, var(--v, 0)));
  max-width: calc(100% - var(--label-w) - var(--value-w) - 2 * var(--gap));
  border-radius: 0 4px 4px 0;
  background: var(--viz-base);
  transform-origin: left center;
  transition: width .5s var(--ease-out), filter .15s;
}
.bar__value { flex: 0 1 auto; min-width: 0; white-space: nowrap; color: var(--text-2); font: 500 12.5px/1.2 var(--font-mono); font-variant-numeric: tabular-nums; }
.bars .bar--top .bar__fill, .bars .bar[data-rank="1"] .bar__fill { background: var(--viz-top); }
.bars:not(:has(.bar--top, .bar[data-rank="1"])) > .bar:first-child .bar__fill { background: var(--viz-top); }
.bars .bar--top .bar__value, .bars .bar[data-rank="1"] .bar__value { color: var(--text); font-weight: 700; }
.bars:not(:has(.bar--top, .bar[data-rank="1"])) > .bar:first-child .bar__value { color: var(--text); font-weight: 700; }
/* charts.js rows */
.bar-row {
  display: grid; grid-template-columns: minmax(7em, var(--label-w)) minmax(0, 1fr) minmax(4.5em, auto);
  align-items: center; gap: var(--gap); min-height: 30px; padding: 3px 6px; border-radius: 8px;
  outline: none; cursor: default;
}
.bar-label { display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; min-width: 0; color: var(--text); font-size: 13px; line-height: 1.3; }
.bar-rank { flex: none; min-width: 1.8em; text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }
.bar-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.bar-track { position: relative; display: block; height: 12px; background: transparent; box-shadow: inset 1px 0 0 var(--viz-grid); }
.bar-fill { display: block; height: 100%; min-width: 3px; border-radius: 0 4px 4px 0; background: var(--viz-base); transition: filter .15s; }
.bar-value { text-align: right; white-space: nowrap; color: var(--text-2); font: 500 12.5px/1.2 var(--font-mono); font-variant-numeric: tabular-nums; }
.bar-row.is-hi .bar-fill { background: var(--viz-top); }
.bar-row.is-hi .bar-value, .bar-row.is-hi .bar-name { color: var(--text); font-weight: 700; }
.bar-row:focus-visible { box-shadow: 0 0 0 2px var(--cyan); }
/* hover / focus lift, both markups */
.bars .bar:hover, .bars .bar:focus-visible, .bars .bar.is-hover, .bar-row:hover, .bar-row:focus-visible { background: rgba(255,255,255,.035); }
.bars .bar:hover .bar__fill, .bars .bar:focus-visible .bar__fill, .bars .bar.is-hover .bar__fill,
.bar-row:hover .bar-fill, .bar-row:focus-visible .bar-fill { filter: brightness(1.2) saturate(1.1); }
.bars.is-busy { opacity: .55; }
.bars.is-enter .bar__fill { animation: viz-grow .6s var(--ease-out) both; }
@keyframes viz-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.bars--mini { --label-w: 7.5em; --value-w: 5.5em; font-size: 12px; }
.bars--mini .bar, .bars--mini .bar-row { min-height: 24px; }
.bars--mini .bar__fill, .bars--mini .bar-track { height: 8px; }
/* tooltip: values lead, labels follow; never the only way to a value (table view exists) */
.viz-tip, .chart-tip {
  position: absolute; z-index: 60; pointer-events: none;
  min-width: 148px; max-width: 260px; padding: 10px 12px;
  border-radius: 10px; background: rgba(11,15,23,.96); border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 12px 32px -8px rgba(0,0,0,.6);
  font-size: 12.5px; line-height: 1.45; color: var(--text-2);
}
.viz-tip strong, .viz-tip__value { display: block; font: 700 15px/1.3 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text); }
.viz-tip__label { display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.viz-tip__key { display: inline-block; flex: none; width: 12px; height: 2px; border-radius: 1px; background: var(--viz-base); }
.viz-tip__key--top { background: var(--viz-top); }
.chart-tip__title { margin: 0 0 4px; color: var(--text-2); font-size: 12px; }
.chart-tip__row { display: flex; justify-content: space-between; gap: 14px; }
.chart-tip__k { color: var(--text-2); }
.chart-tip__v { color: var(--text); font: 700 13px/1.4 var(--font-mono); font-variant-numeric: tabular-nums; }
/* table view toggle + table twin of every chart */
.viz-toggle, #calc-table-toggle {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 12px;
  border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--text-2);
  font: 600 13px/1.2 var(--font-sans); cursor: pointer; transition: color .2s, border-color .2s, background-color .2s;
}
.viz-toggle:hover, #calc-table-toggle:hover, .viz-toggle[aria-pressed="true"], #calc-table-toggle[aria-pressed="true"], #calc-table-toggle[aria-expanded="true"] {
  color: var(--text); border-color: var(--line-hi); background: rgba(16,185,129,.06);
}
:is(table.viz-table, .viz-table table, table.data-table) caption { caption-side: top; text-align: left; padding: 0 0 8px; font-size: 13px; color: var(--text-2); }
#calc-table, .viz-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
:is(table.viz-table, .viz-table table, table.data-table) { width: 100%; margin-top: 12px; border-collapse: separate; border-spacing: 0; font-size: 14px; }
:is(table.viz-table, .viz-table table, table.data-table) :is(th, td) { padding: 10px 12px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
:is(table.viz-table, .viz-table table, table.data-table) thead th { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--muted-text); background: rgba(255,255,255,.02); }
:is(table.viz-table, .viz-table table, table.data-table) :is(td.num, th.num, .num) { text-align: right; }
:is(table.viz-table, .viz-table table, table.data-table) tbody tr:hover td { background: rgba(255,255,255,.03); }
/* ranking basis (required wherever a ranking is shown) */
.ranking-basis, #calc-basis, .basis-note {
  display: block; margin: 16px 0 0; padding: 10px 12px;
  font-size: 13px; line-height: 1.55; color: var(--text-2);
  background: rgba(255,255,255,.025); border: 1px solid var(--line); border-left: 3px solid var(--cyan); border-radius: 10px;
}

/* ------------------------------------------------------------------ 11. partners row, ranking list */
#partners-featured .section__note { margin-bottom: 6px; }
#ranking-bars { margin-bottom: 32px; }
.rank-list, ol#ranking-list, ul#ranking-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rank-row, :is(ol#ranking-list, ul#ranking-list) > li {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .2s, box-shadow .2s;
}
.rank-row:hover, :is(ol#ranking-list, ul#ranking-list) > li:hover { border-color: var(--line-hi); box-shadow: var(--glow-hover); }

/* ------------------------------------------------------------------ 12. dual sync player + shelter */
.dual { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.dual__stage {
  position: relative; width: 100%; max-width: 420px; margin-inline: auto;
  aspect-ratio: 9 / 16; max-height: 78vh;
  border-radius: var(--radius); overflow: hidden; background: #000;
  border: 1px solid var(--line); box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.03);
  cursor: ew-resize; touch-action: pan-y;
}
.dual__stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.dual__stage video[data-role="b"] { z-index: 1; }
.dual__stage[style*="--wipe"]::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: var(--wipe); z-index: 2; width: 2px; transform: translateX(-1px);
  background: rgba(255,255,255,.85); box-shadow: 0 0 12px rgba(34,211,238,.8); pointer-events: none;
}
.dual__tag { position: absolute; top: 10px; z-index: 3; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(0,0,0,.6); }
.dual__tag--a { left: 10px; }
.dual__tag--b { right: 10px; }
.dual__wipe { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 420px; margin-inline: auto; font-size: 13px; color: var(--text-2); }
input.dual__wipe { display: block; }
.dual__wipe input[type="range"] { flex: 1 1 auto; }
.dual__controls, .dual-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.dual__controls button, .dual-controls button, [data-ds-action] {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px;
  border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255,255,255,.04);
  color: var(--text); font: 600 14px/1.2 var(--font-sans); cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s;
}
.dual__controls button:hover, [data-ds-action]:hover { border-color: var(--line-hi); }
[data-ds-action][aria-pressed="true"], [data-ds-action].is-active, .dual__controls .is-active {
  color: var(--emerald-text); border-color: rgba(16,185,129,.55); background: rgba(16,185,129,.10);
}
/* demo / AI labels: always visible above the player */
.demo-label, .ai-label {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px;
  padding: 4px 10px; border-radius: 8px;
  font-size: 13px; font-weight: 600; line-height: 1.45;
  color: #FDE68A; background: rgba(245,158,11,.10); border: 1px solid rgba(245,158,11,.30);
}
#refuge-cards, .refuge-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.refuge-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 24px; overflow: hidden; }
.refuge-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--rose), var(--amber));
}
.refuge-card__kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; color: #FDA4AF; }
.refuge-card__fact { font-size: 22px; font-weight: 700; line-height: 1.3; color: var(--text); }
.refuge-card .src, .refuge-card__src { font-size: 12px; color: var(--muted-text); }

/* ------------------------------------------------------------------ 13. masterbook + either/or counter */
.mb-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.masterbook-card {
  position: relative; padding: 28px; overflow: hidden;
  background: radial-gradient(120% 80% at 100% 0%, rgba(99,102,241,.16), transparent 60%), var(--card);
}
#fork-preview, .fork-preview, .fork-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fork__opt, .fork-a, .fork-b { display: flex; flex-direction: column; gap: 10px; padding: 20px; min-width: 0; }
.fork__opt--a, .fork-a { border-color: rgba(16,185,129,.30); }
.fork__opt--b, .fork-b {
  border-color: rgba(99,102,241,.40);
  background: radial-gradient(100% 70% at 100% 0%, rgba(99,102,241,.14), transparent 65%), var(--card);
}
.fork__price, .fork-b .price { font: 700 28px/1.15 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text); margin: 0; }
.fork__badge { align-self: flex-start; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--indigo-text); border: 1px solid rgba(99,102,241,.45); background: rgba(99,102,241,.10); }
.json-preview, pre.json, pre.code {
  margin: 0; padding: 14px 16px; max-height: 280px; overflow: auto;
  font: 500 12.5px/1.6 var(--font-mono); color: var(--text-2);
  background: rgba(3,6,12,.6); border: 1px solid var(--line); border-radius: 12px; white-space: pre;
}

/* ------------------------------------------------------------------ 14. creators: shared pieces (grid in creators.css) */
.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: var(--avatar-size); height: var(--avatar-size); border-radius: 50%;
  background: var(--grad-avatar-1); color: #fff;
  font: 800 calc(var(--avatar-size) * .36)/1 var(--font-sans); letter-spacing: -0.02em;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px rgba(255,255,255,.10);
}
.avatar[data-initial]:empty::before { content: attr(data-initial); }
.avatar[data-tone="2"] { background: var(--grad-avatar-2); }
.avatar[data-tone="3"] { background: var(--grad-avatar-3); }
.chip, .tool-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12.5px; line-height: 1.4; color: var(--text-2);
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
}
.tool-chip img { width: 16px; height: 16px; border-radius: 4px; }
.chip--est, .tool-chip--est, .is-estimated, .stack-estimated { border-style: dashed; border-color: rgba(154,164,178,.45); }
.chips { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips a { display: inline-flex; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.chips a:hover { color: var(--text); border-color: var(--line-hi); text-decoration: none; }

/* ------------------------------------------------------------------ 15. forms */
label { font-size: 14px; color: var(--text-2); }
.field, .form-grid label { display: flex; flex-direction: column; gap: 6px; }
label.check, .check { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; line-height: 1.5; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); align-items: end; }
.form-grid .wide { grid-column: 1 / -1; }
input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]),
select, textarea {
  width: 100%; min-height: 44px; padding: 10px 14px;
  color: var(--text); background-color: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.12); border-radius: 10px;
  font: 400 15px/1.45 var(--font-sans);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus {
  outline: none; border-color: var(--emerald); background-color: rgba(255,255,255,.05);
  box-shadow: 0 0 0 3px rgba(16,185,129,.20);
}
select {
  -webkit-appearance: none; appearance: none; padding-right: 38px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 19px) 52%, calc(100% - 14px) 52%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
select option { background: var(--card-solid); color: var(--text); }
textarea { min-height: 96px; resize: vertical; }
::placeholder { color: var(--muted-text); opacity: 1; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--emerald); }
.form-error, [data-error] .form-error { color: #FDA4AF; font-size: 13px; }
.controls { display: flex; flex-wrap: wrap; gap: 16px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.controls label { min-width: 160px; flex: 1 1 160px; display: flex; flex-direction: column; gap: 6px; }

/* ------------------------------------------------------------------ 16. modal + toast */
.modal {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center; padding: var(--gutter);
  background: rgba(3,5,9,.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.modal-card {
  width: min(720px, 100%); max-height: min(88vh, 900px); overflow: auto; padding: 28px;
  border-radius: 20px; background: rgba(13,18,28,.97); border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 40px 120px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(16,185,129,.08);
  animation: modal-in .22s var(--ease-out);
}
.modal-card h3 { margin-bottom: 12px; font-size: 20px; }
.modal-card textarea { width: 100%; }
.modal-card > .btn:last-child { margin-top: 16px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 32px);
  padding: 10px 18px; border-radius: 999px;
  color: #A7F3D0; background: rgba(6,40,30,.95); border: 1px solid rgba(16,185,129,.5);
  box-shadow: 0 12px 40px -10px rgba(0,0,0,.7), 0 0 24px -8px rgba(16,185,129,.5);
  font-size: 14px; font-weight: 600; animation: toast-in .2s var(--ease-out);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ------------------------------------------------------------------ 17. footer (legal pages stay linked) */
.footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(11,15,23,.4), var(--bg-2));
  padding: 56px 0 48px; color: var(--text-2); font-size: 14px;
}
.footer .independence {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 20px; padding: 12px 16px;
  color: var(--text); font-size: 14.5px; line-height: 1.6;
  background: rgba(16,185,129,.06); border: 1px solid rgba(16,185,129,.22); border-radius: 12px;
}
.footer .legal { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 20px 0; }
.footer .legal a, .footer a { color: var(--text-2); }
.footer .legal a:hover, .footer a:hover { color: var(--text); }
.footer .small { color: var(--muted-text); }
.legal-page { max-width: 820px; }
.legal-page h2 { margin-top: 40px; font-size: 24px; }
.legal-page h3 { margin-top: 24px; }

/* ------------------------------------------------------------------ 18. shared content blocks (all public pages) */
.hero { position: relative; padding: 8px 0 0; }
.note { padding: 12px 16px; border-left: 3px solid var(--amber); border-radius: 0 12px 12px 0; background: rgba(245,158,11,.06); color: var(--text); font-size: 14px; }
.note.lock { border-left-color: var(--rose); background: rgba(244,63,94,.07); }
.panel.warn { border-color: rgba(244,63,94,.45); }
.stats { list-style: none; margin: 16px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--text-2); }
.stats b { color: var(--text); font-size: 1.15em; font-family: var(--font-mono); }
.price { margin: 6px 0; font: 700 26px/1.2 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text); }
.out-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); margin-top: 16px; }
.out { padding: 16px; }
.cost { font-size: 14px; color: var(--text-2); }
.page-links, .other-tools, .alt-group { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.tool-link { font-weight: 700; color: var(--text); }
.evidence { font-size: 12.5px; color: var(--muted-text); white-space: nowrap; }
.src { color: var(--text-2); text-decoration: underline; text-decoration-color: rgba(154,164,178,.4); }
.src:hover { color: var(--text); }
.badge {
  display: inline-flex; align-items: center; gap: 4px; margin: 1px 2px;
  padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap; color: var(--text-2);
}
.badge.b-ok { color: var(--emerald-text); border-color: rgba(16,185,129,.38); }
.badge.b-warn { color: #FDA4AF; border-color: rgba(244,63,94,.42); }
.badge.b-muted, .badge-estimated { color: var(--muted-text); }
.badge-estimated { border-style: dashed; }
/* generic tables (comparison, key/value); wide tables scroll inside themselves, never the page */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll > table { min-width: max-content; }
.tool-summary { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 18px; max-width: 1100px; margin: 0 0 18px; }
.tool-summary > * { min-width: 0; }
.tool-content { max-width: 1100px; }
.tool-content dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px 20px; }
.tool-content :is(dt, dd) { margin: 0; }
.table-wrap, table.dense, table.compare, table.kv, table.programs-table, table.creators-table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
th, td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font-size: 12.5px; font-weight: 600; color: var(--muted-text); white-space: nowrap; }
td { min-width: 70px; }
table.kv th { width: 36%; color: var(--text-2); }
tbody tr:hover td { background: rgba(255,255,255,.025); }
td.num, th.num { text-align: right; }
/* legacy calculator page hooks (calculator.js) */
.calc-total { font: 700 22px/1.3 var(--font-mono); color: var(--text); }
.calc-fx, .calc-rep-rule, .calc-unknown { font-size: 12.5px; color: var(--muted-text); }
.calc-locked { color: #FDA4AF; }
.calc-badges { display: flex; flex-wrap: wrap; gap: 4px; }
/* embeds (creator posts) */
.embed-box { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--card-solid); }
.embed-box iframe { display: block; width: 100%; min-height: 200px; border: 0; }
.embed-caption { font-size: 12.5px; color: var(--muted-text); margin-top: 6px; }
.partial-slot { min-height: 0; }

/* ------------------------------------------------------------------ 19. responsive (3 tiers) */
/* >= 1200: two-column hero, inline nav */
@media (min-width: 1200px) {
  .split, .hero-grid, .hero__grid { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 32px; }
  .dual--side { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); align-items: start; }
}
/* 768 - 1199: one-column hero, cards in two columns */
@media (min-width: 768px) and (max-width: 1199.98px) {
  :root { --section-gap: 104px; }
  .cards, .tgrid, .tcards, .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #partners-featured:has(> .tcard), #ranking-list:has(> .tcard) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #refuge-cards, .refuge-grid, .mb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* below 1200 the nav collapses behind the toggle (64px bar cannot wrap) */
@media (max-width: 1199.98px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; }
  .nav.open {
    display: flex; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    max-height: calc(100vh - 64px); overflow-y: auto;
    padding: 12px var(--gutter) 16px;
    background: rgba(7,9,14,.97); border-bottom: 1px solid var(--line);
  }
  .nav.open a { padding: 12px; font-size: 15px; }
  .langs { order: 5; }
}
/* < 768: single column, 16px gutter, zero horizontal page scroll */
@media (max-width: 767.98px) {
  :root { --gutter: 16px; --section-gap: 72px; --avatar-size: 48px; }
  main, main.wrap { padding-top: 72px; padding-bottom: 88px; }
  h2 { font-size: 26px; }
  h3 { font-size: 17px; }
  .lead { font-size: 16.5px; }
  .disclosure-box { margin-top: 12px; padding: 9px 12px 9px 12px; }
  .disclosure-box strong { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
  .topnav__inner { min-width: 0; width: 100%; }
  .topnav__inner .brand { min-width: 0; margin-right: auto; }
  .topnav__inner .nav-toggle { min-width: 44px; min-height: 44px; margin-left: 0; }
  .topnav__inner .langs { display: none; }
  .nav.open .langs { display: flex; }
  .tool-summary, .tool-content dl { grid-template-columns: minmax(0, 1fr); }
  .nav.open .langs a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .btn--sm { min-width: 44px; min-height: 44px; }
  .disclosure-box .indep-chip, .disclosure-box .chip { margin-left: 0; white-space: normal; }
  .topbar .badge.b-indep { display: none; }
  .topbar > .wrap, .topbar .bar { gap: 10px; }
  .cards, .tgrid, .tcards, .tool-grid,
  #refuge-cards, .refuge-grid, .mb-grid, .grid-2, .grid-3, .two-col, .three { grid-template-columns: minmax(0, 1fr); }
  #partners-featured:has(> .tcard), #ranking-list:has(> .tcard) { grid-template-columns: minmax(0, 1fr); }
  .top3, ol#calc-top3, ul#calc-top3, #calc-top3 > ol, #calc-top3 > ul,
  #fork-preview, .fork-preview, .fork-grid, .field-row { grid-template-columns: minmax(0, 1fr); }
  #calc-top3:has(> .top3__card) { grid-template-columns: minmax(0, 1fr); }
  #calc-top3:has(> .tcard) { grid-template-columns: minmax(0, 1fr); }
  .input-row { flex-direction: column; }
  .panel { padding: 18px; }
  .tcard, .refuge-card { padding: 18px; }
  .masterbook-card { padding: 20px; }
  .modal-card { padding: 20px; border-radius: 16px; }
  .bars { --label-w: 7em; --value-w: 5.5em; --gap: 8px; }
  .section__head, .section-head { margin-bottom: 24px; }
  .dual__stage { max-height: 70vh; }
  /* flat surfaces on phones: same look, no per-card backdrop blur cost */
  .card, .panel, .glass, .tcard, .refuge-card, .masterbook-card, .fork__opt, .fork-a, .fork-b, .out {
    -webkit-backdrop-filter: none; backdrop-filter: none; background-color: var(--card-solid);
  }
  .tcard--partner { background: linear-gradient(180deg, rgba(16,185,129,.07), rgba(16,185,129,0) 45%), var(--card-solid); }
}

.aivb-modal.fork-modal { position: fixed; inset: 0; z-index: 100; display: grid; align-content: center; justify-items: center; gap: 12px; overflow-y: auto; padding: 20px; background: rgba(0,0,0,.76); }
.aivb-modal.fork-modal > * { width: min(100%, 620px); }
.aivb-modal.fork-modal > section { max-height: 32vh; overflow-y: auto; }
.aivb-modal.fork-modal > .btn-close { justify-self: center; }

/* ------------------------------------------------------------------ 20. motion + forced colors */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .card:hover, .tcard:hover, a.card:hover, .btn:hover, .btn--cta:hover, .btn:active { transform: none !important; }
  .top3__card--1::after, :is(.top3, ol#calc-top3, ul#calc-top3, #calc-top3 > ol, #calc-top3 > ul) > li:first-child::after { display: none; }
  .lottie-slot { display: none; }
}
@media (forced-colors: active) {
  .bar__fill, .tgauge > span { forced-color-adjust: none; background: CanvasText; }
  .bars .bar--top .bar__fill, .bars .bar[data-rank="1"] .bar__fill { background: Highlight; }
  .bars:not(:has(.bar--top, .bar[data-rank="1"])) > .bar:first-child .bar__fill { background: Highlight; }
  .btn--cta, .btn.accent, .cta-affiliate { border: 2px solid ButtonText; }
  .disclosure-box { border: 2px solid CanvasText; }
}
