/* Heatmapify dashboard: shared styles for index.html (app) and about.html (docs). */
:root {
  --bg: #08080c;
  --bg-2: #0e0e14;
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .06);
  --surface-3: rgba(255, 255, 255, .09);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f3f3f6;
  --text-2: #b9b9c6;
  --muted: #85859a;
  --faint: #5c5c70;
  --ember: #ff5a1f;
  --ember-2: #ff2e63;
  --gold: #ffb347;
  --grad: linear-gradient(100deg, #ffb347 0%, #ff5a1f 45%, #ff2e63 100%);
  --good: #3ecf8e;
  --good-bg: rgba(62, 207, 142, .12);
  --bad: #ff6b6b;
  --bad-bg: rgba(255, 107, 107, .12);
  --warn: #f5c451;
  --warn-bg: rgba(245, 196, 81, .12);
  --sig-comments: #7aa2ff;
  --sig-transcript: #5fd3a3;
  --sig-audio: #ffb454;
  --sig-visual: #b392f0;
  --radius: 12px;
  --radius-sm: 8px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 20px 60px -30px rgba(0, 0, 0, .8);
  --topbar: rgba(8, 8, 12, .72);
  --input: rgba(0, 0, 0, .35);
  --input-focus: rgba(0, 0, 0, .5);
  --well: rgba(0, 0, 0, .32);
  --option: #15151d;
  --knob: #d8d8e0;
  --bar-bg: rgba(14, 14, 20, .88);
  --on-good: #07150f;
  --thumb-bg: linear-gradient(135deg, #1a1a24, #0f0f15);
  --official-ink: #ffa27a;
  --estimated-ink: #a9c1ff;
  --tip-bg: rgba(20, 20, 28, .96);
  --logo-bg: linear-gradient(160deg, #1c1c26, #101016);
  --glow-a: rgba(255, 90, 31, .16);
  --glow-b: rgba(255, 46, 99, .10);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f7f6f3;
  --bg-2: #efeee9;
  --surface: #ffffff;
  --surface-2: rgba(22, 22, 32, .045);
  --surface-3: rgba(22, 22, 32, .085);
  --line: rgba(22, 22, 32, .09);
  --line-2: rgba(22, 22, 32, .16);
  --text: #14141b;
  --text-2: #3f3f4b;
  --muted: #696978;
  --faint: #9b9baa;
  --good: #128a57;
  --good-bg: rgba(18, 138, 87, .1);
  --bad: #d23f3f;
  --bad-bg: rgba(210, 63, 63, .09);
  --warn: #a87a06;
  --warn-bg: rgba(214, 160, 20, .12);
  --shadow: 0 1px 2px rgba(20, 20, 30, .04), 0 12px 32px -18px rgba(20, 20, 30, .18);
  --topbar: rgba(247, 246, 243, .8);
  --input: #ffffff;
  --input-focus: #ffffff;
  --well: rgba(22, 22, 32, .035);
  --option: #ffffff;
  --knob: #ffffff;
  --bar-bg: rgba(255, 255, 255, .92);
  --on-good: #ffffff;
  --thumb-bg: linear-gradient(135deg, #ecebe6, #e2e1db);
  --official-ink: #c2410c;
  --estimated-ink: #3654c9;
  --tip-bg: rgba(255, 255, 255, .97);
  --logo-bg: linear-gradient(160deg, #1c1c26, #101016);
  --glow-a: rgba(255, 90, 31, .10);
  --glow-b: rgba(255, 46, 99, .06);
  color-scheme: light;
}
:root[data-theme="light"] .tooltip { box-shadow: 0 16px 40px -12px rgba(20, 20, 30, .25); }
:root[data-theme="light"] .toggle input::after { box-shadow: 0 1px 2px rgba(0,0,0,.25); }
:root[data-theme="light"] .url-bar { box-shadow: 0 24px 60px -30px rgba(255, 70, 40, .35), 0 1px 2px rgba(20,20,30,.05); }
:root[data-theme="light"] .badge.medium { color: var(--warn); }
.theme-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 6px; color: var(--muted); background: none; border: 1px solid var(--line); }
.theme-btn:hover { color: var(--text); border-color: var(--line-2); }
.theme-btn svg { width: 17px; height: 17px; }
.theme-btn .sun { display: none; }
:root[data-theme="light"] .theme-btn .sun { display: block; }
:root[data-theme="light"] .theme-btn .moon { display: none; }
html { transition: background-color .2s; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { min-height: 100vh; display: flex; flex-direction: column; font-size: 15px; line-height: 1.5; font-feature-settings: "cv11", "ss01"; }
body::before { /* soft ember glow at the top */
  content: ""; position: fixed; inset: -20vh -10vw auto; height: 70vh; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 60% at 50% 0%, var(--glow-a), transparent 70%), radial-gradient(40% 50% at 85% 10%, var(--glow-b), transparent 70%);
}
::selection { background: rgba(255, 90, 31, .35); }
a { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small-text { font-size: 13px; line-height: 1.5; }
.mono { font-family: var(--mono); }
code { font-family: var(--mono); font-size: .86em; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px; color: var(--text); white-space: nowrap; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------------ nav -- */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--topbar); backdrop-filter: saturate(1.5) blur(16px); -webkit-backdrop-filter: saturate(1.5) blur(16px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1200px; margin: 0 auto; height: 64px; padding: 0 clamp(16px, 3vw, 28px); display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; letter-spacing: -.015em; font-size: 16px; white-space: nowrap; }
.brand .sub { color: var(--muted); font-weight: 500; }
.logo-img { width: 30px; height: 30px; border-radius: 7px; display: block; flex: none; }
.logo { width: 30px; height: 30px; border-radius: 5px; display: grid; place-items: end center; grid-auto-flow: column; gap: 2px; padding: 7px 6px; background: var(--logo-bg); border: 1px solid var(--line-2); }
.logo i { display: block; width: 3px; border-radius: 2px; background: var(--grad); }
.logo i:nth-child(1) { height: 6px; opacity: .55; } .logo i:nth-child(2) { height: 14px; } .logo i:nth-child(3) { height: 10px; opacity: .8; } .logo i:nth-child(4) { height: 5px; opacity: .4; }
.navlinks { display: flex; gap: 4px; margin-left: 8px; }
.navlinks a { white-space: nowrap; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 550; padding: 7px 12px; border-radius: 999px; transition: color .15s, background .15s; }
.navlinks a:hover { color: var(--text); background: var(--surface-2); }
.navlinks a.active { color: var(--text); background: var(--surface-3); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-link { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 6px; color: var(--muted); border: 1px solid var(--line); transition: color .15s, border-color .15s; }
.icon-link:hover { color: var(--text); border-color: var(--line-2); }
.icon-link svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- shell -- */
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 28px) 48px; display: flex; flex-direction: column; gap: 20px; flex: 1; }
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 2.4vw, 26px); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head > div:first-child { min-width: 0; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; }
h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.04; letter-spacing: -.035em; font-weight: 750; }
h2 { font-size: clamp(22px, 2.6vw, 28px); line-height: 1.2; font-weight: 700; }
h3 { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
h4 { font-size: 15px; font-weight: 650; }
.card-head p, .sub-text { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.eyebrow .spark { width: 6px; height: 6px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 12px var(--ember); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 18px 2px 2px; }
.section-title h2 { font-size: 20px; }

/* --------------------------------------------------------------- inputs -- */
input, select, button, textarea { font: inherit; color: inherit; }
.input, input[type=text], input[type=password], input[type=url], select { width: 100%; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--input); outline: none; transition: border-color .15s, box-shadow .15s, background .15s; color: var(--text); }
input::placeholder { color: var(--faint); }
input:focus, select:focus { border-color: rgba(255, 90, 31, .6); box-shadow: 0 0 0 4px rgba(255, 90, 31, .14); background: var(--input-focus); }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2385859a' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
select option { background: var(--option); color: var(--text); }
button { cursor: pointer; border: 0; border-radius: var(--radius-sm); padding: 11px 18px; font-weight: 600; font-size: 14px; transition: transform .08s, background .15s, opacity .15s, border-color .15s, box-shadow .15s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
button:active { transform: scale(.98); }
button:disabled { opacity: .55; cursor: progress; }
button svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 28px -8px rgba(255, 70, 40, .65), 0 1px 0 rgba(255, 255, 255, .25) inset; }
.btn-primary:hover { box-shadow: 0 10px 34px -8px rgba(255, 70, 40, .85), 0 1px 0 rgba(255, 255, 255, .25) inset; }
.btn-ghost { background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--surface-3); border-color: var(--line-2); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 6px; }
.btn-link { background: none; padding: 4px 2px; color: var(--muted); font-weight: 550; }
.btn-link:hover { color: var(--text); }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field small { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.with-btn { position: relative; display: flex; }
.with-btn input { padding-right: 70px; font-family: var(--mono); font-size: 13.5px; }
.with-btn button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.with-btn button:active { transform: translateY(-50%) scale(.97); }

.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; color: var(--text-2); font-weight: 550; user-select: none; }
.toggle input { appearance: none; -webkit-appearance: none; width: 34px; height: 20px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-2); position: relative; cursor: pointer; transition: background .15s; margin: 0; flex: none; }
.toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--knob); transition: transform .18s; }
.toggle input:checked { background: var(--ember); border-color: transparent; }
.toggle input:checked::after { transform: translateX(14px); background: #fff; }
.toggle input:focus-visible { box-shadow: 0 0 0 4px rgba(255, 90, 31, .2); }

.pill { text-decoration: none; display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.neutral { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.pill.ok { background: var(--good-bg); color: var(--good); }
.pill.ok::before { box-shadow: 0 0 10px var(--good); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.busy::before { animation: pulse 1s infinite ease-in-out; }
@keyframes pulse { 50% { opacity: .3; } }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 550; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
button.chip { cursor: pointer; }
button.chip:hover { border-color: var(--line-2); color: var(--text); }
.chip.off { opacity: .4; }
.chip.off .dot { background: var(--faint) !important; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ----------------------------------------------------------------- hero -- */
.hero { position: relative; padding: clamp(48px, 8vw, 96px) 0 clamp(24px, 4vw, 40px); text-align: center; }
.hero h1 { max-width: 980px; margin: 22px auto 0; font-size: clamp(24px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -.03em; font-weight: 700; }
.wordmark { display: block; color: var(--text); }
.nav-wordmark { height: 19px; width: auto; margin-top: 2px; }
.hero-logo { display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 1.6vw, 18px); }
.hero-mark { width: clamp(120px, 16vw, 190px); height: auto; overflow: visible; }
.hero-mark .hm-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: hm-draw 1.1s cubic-bezier(.65,0,.35,1) .15s forwards; filter: drop-shadow(0 0 18px rgba(255,120,30,.35)); }
.hero-mark .hm-dot { transform-box: fill-box; transform-origin: center; transform: scale(0); animation: hm-pop .45s cubic-bezier(.34,1.6,.5,1) 1.1s forwards; }
.hero-wordmark { height: clamp(46px, 8.2vw, 96px); width: auto; max-width: 92%; }
@keyframes hm-draw { to { stroke-dashoffset: 0; } }
@keyframes hm-pop { to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .hero-mark .hm-line { animation: none; stroke-dashoffset: 0; } .hero-mark .hm-dot { animation: none; transform: none; } }
.hero .lede { max-width: 640px; margin: 18px auto 0; color: var(--text-2); font-size: clamp(15px, 1.6vw, 17.5px); line-height: 1.6; }
.hero-strip { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 54px; margin: 0 auto; max-width: 520px; opacity: .9; }
.hero-strip i { flex: 1; height: 100%; border-radius: 3px 3px 1px 1px; background: var(--grad); transform-origin: bottom; animation: rise 2.8s ease-in-out infinite; opacity: .85; }
@keyframes rise { 0%, 100% { transform: scaleY(var(--a)); } 50% { transform: scaleY(var(--b)); } }

.analyze { max-width: 820px; margin: 34px auto 0; text-align: left; }
.url-bar { display: flex; align-items: center; gap: 8px; padding: 7px 7px 7px 16px; border-radius: 11px; background: var(--bar-bg); border: 1px solid var(--line-2); box-shadow: 0 30px 80px -30px rgba(255, 70, 40, .35), 0 0 0 1px rgba(255, 255, 255, .02) inset; transition: border-color .15s, box-shadow .15s; }
.url-bar:focus-within { border-color: rgba(255, 90, 31, .55); box-shadow: 0 30px 80px -30px rgba(255, 70, 40, .55), 0 0 0 4px rgba(255, 90, 31, .12); }
.url-bar .yt { width: 26px; height: 26px; flex: none; color: #ff3b3b; }
.url-bar input { border: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 16.5px; padding: 12px 6px; }
.url-bar .btn-primary { padding: 13px 22px; border-radius: 8px; font-size: 15px; }
.analyze-opts { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 18px; margin-top: 14px; padding: 0 4px; }
.analyze-opts .left { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.seg { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-2); font-weight: 550; }
.seg select { width: auto; padding: 7px 32px 7px 12px; font-size: 13px; border-radius: 6px; }
.recent { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }
.recent .lbl { font-size: 12px; color: var(--faint); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-right: 2px; }
.recent .chip { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }

/* ----------------------------------------------------------- connection -- */
.conn { overflow: hidden; }
.conn-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.conn-ico { width: 42px; height: 42px; border-radius: 7px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); flex: none; }
.conn-ico svg { width: 20px; height: 20px; }
.conn-top .t { min-width: 0; flex: 1; }
.conn-top .t p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conn-top .actions { display: flex; align-items: center; gap: 8px; }
.conn-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(18px, 3vw, 36px); margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.conn.collapsed .conn-body { display: none; }
.steps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; counter-reset: s; }
.steps-list li > div { min-width: 0; }
.steps-list > li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; counter-increment: s; }
.steps-list > li::before { content: counter(s); width: 30px; height: 30px; border-radius: 5px; display: grid; place-items: center; font-family: var(--mono); font-size: 13px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }
.steps-list li > div > b { display: block; font-size: 14px; font-weight: 650; margin-top: 4px; }
.steps-list li > div > span { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; line-height: 1.5; }
.os-tabs { display: inline-flex; padding: 3px; border-radius: 6px; background: var(--well); border: 1px solid var(--line); }
.os-tabs button { padding: 5px 11px; font-size: 12.5px; border-radius: 4px; background: none; color: var(--muted); }
.os-tabs button.on { background: var(--surface-3); color: var(--text); }
.file-hint { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 10px 12px; border-radius: 6px; background: var(--well); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.file-hint svg { width: 18px; height: 18px; flex: none; color: var(--gold); }
.file-hint code { font-size: 12.5px; }
.bg-steps { list-style: none; margin: 10px 0 0; padding: 12px 14px; border-radius: 7px; background: var(--well); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.bg-steps li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; }
.bg-steps li::before { content: "→"; color: var(--ember); font-weight: 700; }
.bg-steps li.stop::before { content: "■"; font-size: 10px; line-height: 20px; color: var(--bad); }
.opt-tag { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-left: 6px; padding: 2px 7px; border-radius: 4px; border: 1px solid var(--line); vertical-align: 1px; }
.os-only, .os-only-inline { display: none !important; }
[data-os-show="win"] .os-only-inline.win, [data-os-show="mac"] .os-only-inline.mac { display: inline !important; }
[data-os-show="win"] .os-only.win, [data-os-show="mac"] .os-only.mac { display: block !important; }
[data-os-show="win"] .file-hint.os-only.win, [data-os-show="mac"] .cmd.os-only.mac, [data-os-show="win"] .bg-steps.os-only.win, [data-os-show="mac"] .bg-steps.os-only.mac { display: flex !important; }
.cmd { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 9px 10px 9px 12px; border-radius: 6px; background: var(--well); border: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; color: var(--text-2); }
.cmd span { flex: 1; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.cmd .copy { padding: 4px 8px; font-size: 11.5px; border-radius: 4px; background: var(--surface-2); color: var(--muted); font-family: var(--sans); }
.cmd .copy:hover { color: var(--text); }
.conn-form { align-self: start; display: flex; flex-direction: column; gap: 16px; padding: 20px; border-radius: 10px; background: var(--well); border: 1px solid var(--line); }
.conn-form .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ------------------------------------------------------------- progress -- */
.progress-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.stage { font-weight: 650; font-size: 18px; text-transform: capitalize; letter-spacing: -.01em; }
.pct { font-family: var(--mono); font-size: 32px; font-weight: 600; letter-spacing: -.03em; }
.bar { position: relative; height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 16px 0 18px; }
.bar span { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--grad); border-radius: 99px; transition: width .6s ease; overflow: hidden; }
.bar span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: translateX(-100%); animation: shimmer 1.6s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; list-style: none; margin: 0; padding: 0; }
.stepper li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 550; color: var(--muted); transition: all .25s; }
.stepper li i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; display: grid; place-items: center; }
.stepper li.active { color: var(--text); border-color: rgba(255, 90, 31, .45); background: rgba(255, 90, 31, .07); }
.stepper li.active i { border-color: var(--ember); border-top-color: transparent; animation: spin .8s linear infinite; }
.stepper li.done { color: var(--text-2); }
.stepper li.done i { background: var(--good); border-color: var(--good); }
.stepper li.done i::after { content: ""; width: 7px; height: 4px; border: 2px solid var(--on-good); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- error -- */
.error { border-color: rgba(255, 107, 107, .35); background: linear-gradient(180deg, rgba(255, 107, 107, .08), rgba(255, 107, 107, .03)); display: flex; gap: 14px; align-items: flex-start; }
.error .ico { width: 34px; height: 34px; border-radius: 6px; background: var(--bad-bg); color: var(--bad); display: grid; place-items: center; flex: none; }
.error .ico svg { width: 18px; height: 18px; }
.error b { display: block; font-size: 15px; }
.error p { margin: 4px 0 0; color: var(--text-2); font-size: 13.5px; }

/* -------------------------------------------------------------- results -- */
.results { display: flex; flex-direction: column; gap: 20px; scroll-margin-top: 80px; }
.subnav { position: sticky; top: 64px; z-index: 40; display: flex; gap: 4px; padding: 10px 0; margin: 0 0 -8px; background: linear-gradient(180deg, var(--bg) 70%, transparent); overflow-x: auto; scrollbar-width: none; }
.subnav a { text-decoration: none; font-size: 13px; font-weight: 600; color: var(--muted); padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--bar-bg); white-space: nowrap; }
.subnav a:hover { color: var(--text); border-color: var(--line-2); }

.overview { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: center; overflow: hidden; }
.overview::after { content: ""; position: absolute; inset: auto -10% -60% 40%; height: 120%; background: radial-gradient(closest-side, rgba(255, 90, 31, .12), transparent); pointer-events: none; }
.thumb { position: relative; display: block; background: var(--thumb-bg) !important; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 9; background: #111; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.thumb:hover img { transform: scale(1.04); }
.thumb .play { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .55)); opacity: 0; transition: opacity .2s; }
.thumb:hover .play { opacity: 1; }
.thumb .play svg { width: 44px; height: 44px; color: #fff; }
.ov-body { min-width: 0; position: relative; z-index: 1; }
.ov-body h2 { margin: 12px 0 8px; }
.ov-body p { margin: 0; color: var(--text-2); font-size: 14px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); text-transform: capitalize; }
.badge.official { background: rgba(255, 90, 31, .14); border-color: rgba(255, 90, 31, .35); color: var(--official-ink); }
.badge.estimated { background: rgba(122, 162, 255, .12); border-color: rgba(122, 162, 255, .3); color: var(--estimated-ink); }
.badge.high { background: var(--good-bg); border-color: rgba(62, 207, 142, .3); color: var(--good); }
.badge.medium { background: var(--warn-bg); border-color: rgba(245, 196, 81, .3); color: var(--warn); }
.badge.low { background: var(--bad-bg); border-color: rgba(255, 107, 107, .3); color: var(--bad); }
.disclaimer { margin-top: 12px !important; padding: 10px 12px; border-radius: 6px; background: rgba(122, 162, 255, .07); border: 1px solid rgba(122, 162, 255, .18); color: var(--text-2) !important; font-size: 13px !important; }

.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpi { padding: 16px 18px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); min-width: 0; transition: border-color .15s, transform .15s; }
.kpi.clickable { cursor: pointer; }
.kpi.clickable:hover { border-color: rgba(255, 90, 31, .4); transform: translateY(-1px); }
.kpi .k { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.kpi .k svg { width: 14px; height: 14px; opacity: .7; }
.kpi .v { font-family: var(--mono); font-size: clamp(22px, 2.4vw, 28px); font-weight: 600; letter-spacing: -.03em; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.accent .v { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-player { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.player-card { position: sticky; top: 124px; }
.seg-toggle { display: inline-flex; padding: 3px; border-radius: 7px; background: var(--well); border: 1px solid var(--line); }
.seg-toggle button { padding: 6px 12px; font-size: 12.5px; border-radius: 5px; background: none; color: var(--muted); }
.seg-toggle button.on { background: var(--surface-3); color: var(--text); }
.sig-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.moments { max-height: 560px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-weight: 550; }
.lg { display: inline-flex; align-items: center; gap: 7px; }
.lg::before { content: ""; width: 12px; height: 12px; border-radius: 4px; }
.lg.peak::before { background: rgba(62, 207, 142, .35); border: 1px solid var(--good); }
.lg.drop::before { background: rgba(255, 107, 107, .25); border: 1px solid var(--bad); }
.lg.avg::before { height: 0; border-top: 2px dashed var(--muted); border-radius: 0; }
.chart { width: 100%; position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--mono); font-size: 10.5px; fill: var(--faint); }
.chart text.cat { font-family: var(--sans); font-size: 11.5px; fill: var(--muted); font-weight: 550; }
.chart .hit { cursor: crosshair; }
.chart-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }

.player { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.now { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.now .live { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.now.playing .live { background: var(--ember); box-shadow: 0 0 10px var(--ember); animation: pulse 1.2s infinite; }

.moments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.moment { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, background .15s; }
.moment:hover { border-color: var(--line-2); background: var(--surface-2); }
.moment .rank { width: 34px; height: 34px; border-radius: 6px; display: grid; place-items: center; font-family: var(--mono); font-weight: 600; font-size: 13px; background: rgba(62, 207, 142, .12); color: var(--good); }
.moments.low .rank { background: var(--bad-bg); color: var(--bad); }
.moment .time { font-family: var(--mono); font-weight: 600; font-size: 14px; display: flex; align-items: baseline; gap: 8px; }
.moment .time small { font-family: var(--sans); color: var(--faint); font-weight: 500; font-size: 12px; }
.moment .chips { margin-top: 6px; }
.moment .chips .chip { padding: 2px 8px; font-size: 11px; }
.moment .sc { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.moment .sc b { font-family: var(--mono); font-size: 15px; }
.mini { width: 64px; height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.mini span { display: block; height: 100%; background: var(--good); border-radius: 99px; }
.moments.low .mini span { background: var(--bad); }
.moment .open { font-size: 11.5px; color: var(--faint); text-decoration: none; font-weight: 600; }
.moment .open:hover { color: var(--text); }
.empty { color: var(--muted); font-size: 13.5px; padding: 12px; }

.hbars { display: flex; flex-direction: column; gap: 13px; margin-top: 4px; }
.hbar .row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 7px; color: var(--text-2); }
.hbar .row > span { display: inline-flex; align-items: center; gap: 8px; }
.hbar .row b { font-family: var(--mono); font-weight: 600; font-size: 12.5px; color: var(--text); }
.track { position: relative; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.track span { position: absolute; top: 0; bottom: 0; border-radius: 99px; }
.track.center::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--line-2); }
.skipped { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.skip { font-size: 12.5px; color: var(--text-2); padding: 9px 11px; border-radius: 6px; background: var(--warn-bg); border: 1px solid rgba(245, 196, 81, .2); }
.allgood { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--good); font-weight: 600; padding: 7px 11px; border-radius: 6px; background: var(--good-bg); align-self: flex-start; }

.data-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.raw { margin-top: 16px; }
.raw summary { cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 600; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.raw summary::-webkit-details-marker { display: none; }
.raw summary::before { content: "›"; display: inline-block; transition: transform .15s; font-size: 16px; }
.raw[open] summary::before { transform: rotate(90deg); }
.raw pre { max-height: 360px; overflow: auto; font-family: var(--mono); font-size: 12px; line-height: 1.55; background: var(--well); border: 1px solid var(--line); border-radius: 7px; padding: 14px; color: var(--text-2); margin: 10px 0 0; }

/* -------------------------------------------------------------- tooltip -- */
.tooltip { position: fixed; z-index: 100; pointer-events: none; min-width: 170px; padding: 11px 12px; border-radius: 7px; background: var(--tip-bg); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .8); font-size: 12.5px; backdrop-filter: blur(8px); }
.tooltip .t { font-family: var(--mono); font-weight: 600; margin-bottom: 7px; color: var(--text); }
.tooltip .r { display: flex; justify-content: space-between; gap: 14px; color: var(--text-2); padding: 1.5px 0; }
.tooltip .r span { display: inline-flex; align-items: center; gap: 7px; }
.tooltip .r b { font-family: var(--mono); color: var(--text); font-weight: 600; }
.tooltip .r.main b { color: var(--gold); }
.tooltip .hint { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line); color: var(--faint); font-size: 11.5px; }

/* --------------------------------------------------------------- footer -- */
.foot { border-top: 1px solid var(--line); margin-top: 24px; }
.foot-in { max-width: 1200px; margin: 0 auto; padding: 26px clamp(16px, 3vw, 28px) 34px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.foot-in nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-in a { color: var(--muted); text-decoration: none; }
.foot-in a:hover { color: var(--text); }

/* ------------------------------------------------------------ about page -- */
.doc-hero { padding: clamp(48px, 7vw, 84px) 0 clamp(20px, 3vw, 32px); max-width: 820px; }
.doc-hero h1 { font-size: clamp(32px, 4.6vw, 52px); margin-top: 16px; }
.doc-hero .lede { margin: 16px 0 0; color: var(--text-2); font-size: clamp(15px, 1.5vw, 17px); line-height: 1.65; max-width: 700px; }
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.toc { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 2px; padding-left: 2px; }
.toc .lbl { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 650; margin: 0 0 10px 12px; }
.toc a { text-decoration: none; color: var(--muted); font-size: 13.5px; font-weight: 550; padding: 7px 12px; border-radius: 5px; border-left: 2px solid transparent; transition: all .15s; }
.toc a:hover { color: var(--text); background: var(--surface); }
.toc a.on { color: var(--text); border-left-color: var(--ember); background: var(--surface); border-radius: 0 5px 5px 0; }
.doc-body { display: flex; flex-direction: column; gap: 56px; min-width: 0; }
.doc-sec { scroll-margin-top: 90px; }
.doc-sec > h2 { display: flex; align-items: center; gap: 12px; }
.doc-sec > h2 .n { font-family: var(--mono); font-size: 13px; color: var(--ember); font-weight: 600; padding: 3px 8px; border-radius: 4px; background: rgba(255, 90, 31, .1); border: 1px solid rgba(255, 90, 31, .25); }
.doc-sec > p { color: var(--text-2); font-size: 15px; line-height: 1.7; margin: 14px 0 0; max-width: 760px; }
.doc-sec > p b { color: var(--text); }
.tiles { display: grid; gap: 14px; margin-top: 20px; }
.tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile { padding: 20px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.tile h4 { display: flex; align-items: center; gap: 10px; }
.tile p { margin: 10px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.65; }
.tile p b { color: var(--text); }
.tile small { display: block; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.tile.hl-official { background: linear-gradient(160deg, rgba(255, 90, 31, .1), transparent 60%), var(--surface); border-color: rgba(255, 90, 31, .25); }
.tile.hl-estimated { background: linear-gradient(160deg, rgba(122, 162, 255, .1), transparent 60%), var(--surface); border-color: rgba(122, 162, 255, .22); }
.sig-head { display: flex; align-items: center; gap: 10px; }
.sig-head .ic { width: 34px; height: 34px; border-radius: 6px; display: grid; place-items: center; }
.sig-head .ic svg { width: 18px; height: 18px; }
.sig-head .w { margin-left: auto; font-family: var(--mono); font-size: 13px; font-weight: 600; padding: 3px 9px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); }
.weightbar { display: flex; height: 38px; border-radius: 7px; overflow: hidden; margin-top: 22px; border: 1px solid var(--line); }
.weightbar span { display: flex; align-items: center; padding: 0 12px; font-size: 12.5px; font-weight: 650; color: #0b0b10; white-space: nowrap; overflow: hidden; }
.pipeline { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; counter-reset: p; }
.pipeline li { position: relative; padding: 16px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); counter-increment: p; }
.pipeline li::before { content: "0" counter(p); font-family: var(--mono); font-size: 12px; color: var(--ember); font-weight: 600; }
.pipeline b { display: block; margin-top: 8px; font-size: 14.5px; }
.pipeline span { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.formula { margin-top: 18px; padding: 16px 18px; border-radius: 8px; background: var(--well); border: 1px solid var(--line); font-family: var(--mono); font-size: 13.5px; color: var(--text-2); overflow-x: auto; white-space: nowrap; }
.formula .k { color: var(--gold); }
.note { margin-top: 18px; padding: 14px 16px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 14px; line-height: 1.6; }
.note b { color: var(--text); }
.note.warnish { background: var(--warn-bg); border-color: rgba(245, 196, 81, .22); }
.conf-table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 20px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 14px; }
.conf-table th, .conf-table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.conf-table th { font-size: 12px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .06em; background: var(--surface); }
.conf-table tr:last-child td { border-bottom: 0; }
.conf-table td { color: var(--text-2); }
.url-compare { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.url-compare .tile code { white-space: normal; word-break: break-all; }
.cta { margin-top: 8px; padding: clamp(24px, 4vw, 40px); border-radius: var(--radius); text-align: center; background: radial-gradient(80% 120% at 50% 0%, rgba(255, 90, 31, .16), transparent 70%), var(--surface); border: 1px solid var(--line); }
.cta h2 { font-size: clamp(22px, 3vw, 30px); }
.cta p { color: var(--text-2); margin: 10px auto 20px; max-width: 520px; }
.cta a.btn-primary { display: inline-flex; text-decoration: none; padding: 13px 22px; border-radius: 8px; font-weight: 650; }

/* ----------------------------------------------------------- responsive -- */
@media (max-width: 1000px) {
  .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .kpi { grid-column: span 2; }
  .kpi:nth-child(4), .kpi:nth-child(5) { grid-column: span 3; }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .grid-player { grid-template-columns: minmax(0, 1fr); }
  .player-card { position: static; }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .url-compare, .tiles.three { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .conn-body { grid-template-columns: minmax(0, 1fr); }
  .conn-top .t { flex: 1 1 calc(100% - 60px); }
  .conn-top .t p { white-space: normal; }
  .conn-top .actions { width: 100%; justify-content: space-between; }
  .conn-form { padding: 16px; }
  .overview { grid-template-columns: minmax(0, 1fr); }
  .grid-2, .tiles.two, .tiles.four { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stepper { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .stepper li { flex-direction: column; text-align: center; padding: 10px 4px; font-size: 11.5px; }
  .brand .sub { display: none; }
  .topbar-in { gap: 10px; }
  .brand > .nav-wordmark { display: none; }
  .navlinks a { padding: 7px 10px; font-size: 13.5px; }
  #navConn { font-size: 0; gap: 0; padding: 9px; }
  .icon-link, .theme-btn { width: 34px; height: 34px; }
  .navlinks { margin-left: 0; }
  .url-bar { flex-wrap: wrap; padding: 8px; }
  .url-bar .yt { display: none; }
  .url-bar input { flex: 1 1 100%; padding: 10px 8px; }
  .url-bar .btn-primary { flex: 1 1 100%; }
  .weightbar span { font-size: 11px; padding: 0 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

.dl-btn svg { width: 15px; height: 15px; flex: none; }
.dl-btn { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 650; white-space: nowrap; text-decoration: none; padding: 8px 13px; border-radius: 6px; }
.steps-list a, .cta a:not(.btn-primary):not(.btn-ghost) { color: var(--ember); text-decoration: none; font-weight: 600; }
.steps-list a:hover { text-decoration: underline; }
.cta-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cta-ghost { display: inline-flex; align-items: center; text-decoration: none; padding: 13px 22px; border-radius: 8px; font-weight: 600; }
@media (max-width: 760px) { .dl-btn span { display: none; } .dl-btn { padding: 9px; } }

/* ---------- Touch + motion polish ---------- */
:root { --ease: cubic-bezier(.22, 1, .36, 1); --ease-press: cubic-bezier(.3, 0, .5, 1); }
* { -webkit-tap-highlight-color: transparent; }
button, a, summary, label, select, .moment, .kpi, [role=button] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button, .dl-btn, .cta-ghost, .navlinks a, .subnav a, .icon-link, .theme-btn, .os-tabs button, .seg-toggle button { -webkit-user-select: none; user-select: none; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
button, .dl-btn, .cta-ghost, .cta a.btn-primary, .navlinks a, .subnav a, .icon-link, .theme-btn, .moment, .kpi, .chip, .pill, .toc a, .thumb, .tile, .pipeline li {
  transition: transform .35s var(--ease), background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .3s var(--ease), opacity .2s var(--ease);
}
button:active, .dl-btn:active, .cta-ghost:active, .cta a.btn-primary:active, .navlinks a:active, .subnav a:active, .icon-link:active, .theme-btn:active, .pill:active {
  transform: scale(.96); transition-duration: .12s; transition-timing-function: var(--ease-press);
}
.with-btn button:active { transform: translateY(-50%) scale(.94); }
.moment:active, .kpi:active { transform: scale(.985); transition-duration: .12s; }
@media (hover: hover) {
  .moment:hover, .kpi:hover { transform: translateY(-2px); }
  .dl-btn:hover, .cta a.btn-primary:hover, .url-bar .btn-primary:hover { transform: translateY(-1px); }
}
.toggle input, .toggle input::after { transition: background-color .25s var(--ease), border-color .25s var(--ease), transform .4s var(--ease); }
.stepper li { transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease); }
.bar span { transition: width .7s var(--ease); }
.raw summary::before { transition: transform .3s var(--ease); }
.thumb img { transition: transform .6s var(--ease); }
.reveal { animation: reveal .55s var(--ease) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 440px) { .nav-right { gap: 6px; } .navlinks { gap: 2px; } .navlinks a { padding: 7px 9px; } }
@media (max-width: 380px) { .nav-right .icon-link { display: none; } }
@media (max-width: 860px) { .dl-btn span { display: none; } .dl-btn { padding: 9px; } }

/* share-as-image dialog */
.share-dlg { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 18px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg-2); color: var(--text); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7); overflow: auto; }
.share-dlg::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); }
.share-dlg[open] { animation: dlg-in .22s var(--ease, ease-out); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.share-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.share-head h3 { font-size: 17px; }
.share-preview { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-sm); overflow: hidden; background: #0b0b10; border: 1px solid var(--line); }
.share-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.share-preview img:not([src]) { visibility: hidden; }
.share-busy { position: absolute; inset: 0; display: grid; place-items: center; color: #a7a7b8; font: 500 13px var(--mono); }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.share-actions button { display: inline-flex; align-items: center; gap: 7px; }
.share-actions svg, #shareImage svg { width: 15px; height: 15px; }
@media (max-width: 520px) { .share-actions button { flex: 1 1 auto; justify-content: center; } }

/* API key box: a text field masked with CSS, so browsers don't treat it as a login */
.secret { -webkit-text-security: disc; font-family: var(--mono); letter-spacing: .04em; }
.secret.revealed { -webkit-text-security: none; }
.secret::placeholder { -webkit-text-security: none; }
