/* ===== Tokens ===== */
:root {
  --bg: #07080c; --bg-2: #0c0e14;
  --surface: #11141c; --surface-2: #171b25; --surface-3: #1e2330;
  --glass: rgba(20, 24, 34, .72);
  --line: #242a37; --line-2: #313848;
  --text: #eef0f6; --muted: #9098ad; --faint: #5f6679;
  --accent: #4de0c4; --accent-2: #8b7cff; --accent-ink: #04120f;
  --accent-soft: rgba(77, 224, 196, .12);
  --warn: #f2b84b; --warn-soft: rgba(242, 184, 75, .12);
  --bad: #ff6b7d; --bad-soft: rgba(255, 107, 125, .12);
  --p0: #4de0c4; --p1: #8b7cff; --p2: #ff8a5c; --p3: #4ab3ff; --p4: #f25fa8;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --shadow-lift: 0 2px 4px rgba(0,0,0,.4), 0 18px 40px rgba(0,0,0,.45);
  --radius: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font-body: 'Inter', 'Noto Sans Telugu', system-ui, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --bg: #f4f5f9; --bg-2: #eceef4; --surface: #ffffff; --surface-2: #f3f4f8; --surface-3: #e9ebf1; --glass: rgba(255,255,255,.78); --line: #e1e4ec; --line-2: #d2d6e0; --text: #121521; --muted: #586074; --faint: #8b92a3; --accent: #0a9d84; --accent-2: #5b4ce0; --accent-ink: #fff; --accent-soft: rgba(10,157,132,.1); --warn: #a86b00; --warn-soft: rgba(168,107,0,.1); --bad: #c8283e; --bad-soft: rgba(200,40,62,.08); --p0: #0a9d84; --p1: #5b4ce0; --p2: #e2622e; --p3: #1d7fd6; --p4: #d13a87; --shadow: 0 1px 2px rgba(20,24,40,.06), 0 8px 24px rgba(20,24,40,.08); --shadow-lift: 0 2px 4px rgba(20,24,40,.08), 0 18px 40px rgba(20,24,40,.14); color-scheme: light; } }
:root[data-theme="light"] { --bg: #f4f5f9; --bg-2: #eceef4; --surface: #ffffff; --surface-2: #f3f4f8; --surface-3: #e9ebf1; --glass: rgba(255,255,255,.78); --line: #e1e4ec; --line-2: #d2d6e0; --text: #121521; --muted: #586074; --faint: #8b92a3; --accent: #0a9d84; --accent-2: #5b4ce0; --accent-ink: #fff; --accent-soft: rgba(10,157,132,.1); --warn: #a86b00; --warn-soft: rgba(168,107,0,.1); --bad: #c8283e; --bad-soft: rgba(200,40,62,.08); --p0: #0a9d84; --p1: #5b4ce0; --p2: #e2622e; --p3: #1d7fd6; --p4: #d13a87; --shadow: 0 1px 2px rgba(20,24,40,.06), 0 8px 24px rgba(20,24,40,.08); --shadow-lift: 0 2px 4px rgba(20,24,40,.08), 0 18px 40px rgba(20,24,40,.14); color-scheme: light; }

/* ===== Base ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; transition: background-color .35s var(--ease), color .35s var(--ease); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0; }
h2 { font-size: 19px; } h3 { font-size: 16px; }
a { color: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.wrap { max-width: 1220px; margin: 0 auto; padding: 0 16px; }
.small, .hint { color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.ic { width: 20px; height: 20px; flex: none; }
.ic.sm { width: 17px; height: 17px; } .ic.xs { width: 14px; height: 14px; } .ic.lg { width: 30px; height: 30px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ===== App bar ===== */
.appbar { position: sticky; top: 0; z-index: 50; background: var(--glass); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.appbar-in { display: flex; align-items: center; gap: 16px; height: 60px; }
.logo-mark { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 19px; text-decoration: none; letter-spacing: -.01em; }
.logo-mark span:last-child { color: var(--accent); }
.lm-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); transition: transform .5s var(--spring); }
.logo-mark:hover .lm-ic { transform: rotate(-12deg) scale(1.08); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-size: 14px; transition: background-color .2s, color .2s, transform .2s var(--ease); }
.nav a:hover { color: var(--text); background: var(--surface-2); transform: translateY(-1px); }
@media (max-width: 720px) { .nav span { display: none; } .nav a { padding: 8px; } }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); transition: transform .18s var(--ease), background-color .2s, border-color .2s; }
.icon-btn:hover:not(:disabled) { background: var(--surface-2); border-color: var(--line-2); transform: translateY(-1px); }
.icon-btn:active:not(:disabled) { transform: scale(.94); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn.xs { width: 22px; height: 22px; border-radius: 6px; border: 0; background: transparent; }
.theme-btn .ic { transition: transform .5s var(--spring); }
.theme-btn:hover .ic { transform: rotate(40deg); }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; padding: 44px 0 28px; }
.hero::before { content: ''; position: absolute; inset: -40% -10% auto; height: 520px; background: radial-gradient(40% 50% at 20% 30%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%), radial-gradient(35% 45% at 80% 20%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 70%); pointer-events: none; animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate3d(3%, 4%, 0) scale(1.05); } }
.hero .wrap { position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--accent); background: var(--accent-soft); padding: 5px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); letter-spacing: -.025em; margin: 14px 0 10px; max-width: 760px; }
.grad { background: linear-gradient(100deg, var(--accent), var(--accent-2) 60%, var(--p4)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { color: var(--muted); max-width: 680px; margin: 0; font-size: 16px; }
.stats { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px; min-width: 110px; transition: transform .3s var(--ease), box-shadow .3s; }
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat b { display: block; font-family: var(--font-display); font-size: 24px; line-height: 1.1; }
.stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.banner { display: flex; gap: 8px; align-items: flex-start; margin: 18px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 14px; max-width: 900px; }
.banner .ic { margin-top: 2px; }

/* ===== Cards & entrance ===== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.glass { background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.card-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-title > .ic { color: var(--accent); }
.card-title .small { margin-left: auto; }
.section { margin: 26px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.stack > * + * { margin-top: 16px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; margin-top: 18px; }
@media (max-width: 980px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.sticky { position: sticky; top: 76px; }
@media (max-width: 980px) { .sticky { position: static; } }
.entering .rise { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.meta { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 2px 0; font-size: 12.5px; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 5px; }

/* ===== Picker ===== */
.picker { position: relative; z-index: 20; margin-top: 4px; }
.picker-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.picker-top .card-title { flex: 1; min-width: 220px; }
.picker-top .card-title .small { margin-left: 4px; }
.search-box { position: relative; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; height: 42px; width: min(100%, 360px); transition: border-color .2s, box-shadow .2s; }
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-box > .ic { color: var(--muted); }
.search-box input { flex: 1; border: 0; background: transparent; outline: none; min-width: 0; height: 100%; }
.search-menu { left: 0; right: 0; top: calc(100% + 8px); }
.search-box.open .search-menu:not(:empty) { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
.brand-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.dd { position: relative; }
.dd-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); transition: transform .2s var(--ease), border-color .2s, background-color .2s, box-shadow .2s; }
.dd-btn:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--shadow); }
.dd-btn:active { transform: scale(.97); }
.dd.open .dd-btn, .dd-btn.has { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.logo { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font-family: var(--font-display); font-weight: 700; font-size: 14px; background: var(--surface-3); transition: transform .4s var(--spring); }
.dd-btn:hover .logo { transform: rotate(-8deg) scale(1.08); }
.count { font-size: 12px; color: var(--muted); }
.sel-badge { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; animation: pop .35s var(--spring); }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.chev { transition: transform .3s var(--ease); color: var(--muted); }
.dd.open .chev { transform: rotate(180deg); }
.dd-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 300px; max-width: min(420px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-lift); padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.97); transform-origin: top left; pointer-events: none; transition: opacity .18s var(--ease), transform .22s var(--ease), visibility .22s; z-index: 30; }
.dd.open .dd-menu { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.brand-bar .dd:nth-last-child(-n+3) .dd-menu { left: auto; right: 0; transform-origin: top right; }
.dd-head { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 10px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.dd-list { max-height: 340px; overflow-y: auto; overscroll-behavior: contain; }
.dd-item { display: grid; grid-template-columns: 22px 1fr; grid-template-rows: auto auto; column-gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; transition: background-color .15s, transform .15s var(--ease); }
.dd-item:hover:not(:disabled) { background: var(--surface-2); transform: translateX(2px); }
.dd-item:disabled { opacity: .4; cursor: not-allowed; }
.cbox { grid-row: span 2; align-self: center; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2); color: transparent; transition: background-color .2s, border-color .2s, color .2s, transform .3s var(--spring); }
.dd-item.on .cbox { background: var(--c, var(--accent)); border-color: var(--c, var(--accent)); color: #fff; transform: scale(1.08); }
.dd-name { font-weight: 500; font-size: 14px; }
.dd-name em { font-style: normal; color: var(--muted); }
.dd-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-empty { padding: 12px; margin: 0; color: var(--muted); font-size: 14px; }
@media (max-width: 640px) {
  .dd-menu, .brand-bar .dd:nth-last-child(-n+3) .dd-menu { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; max-width: none; min-width: 0; transform: translateY(24px); transform-origin: bottom center; }
  .dd-list { max-height: 55vh; }
  .search-menu { position: absolute; left: 0; right: 0; bottom: auto; top: calc(100% + 8px); }
}
.tray { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.tray-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 40%, var(--line)); font-size: 13.5px; animation: chip-in .35s var(--spring) both; }
@keyframes chip-in { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); flex: none; }
.tray-hint { margin-left: auto; }

/* ===== Versus cards ===== */
.versus { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .versus { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.vs-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s; }
.vs-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--c); }
.vs-card::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--c) 14%, transparent), transparent 60%); pointer-events: none; }
.vs-card:hover { transform: translateY(-4px) rotate(-.3deg); box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
.vs-card.lead { border-color: color-mix(in srgb, var(--c) 60%, var(--line)); }
.vs-phone { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: color-mix(in srgb, var(--c) 16%, var(--surface-2)); color: var(--c); flex: none; transition: transform .5s var(--spring); }
.vs-card:hover .vs-phone { transform: rotate(-10deg) scale(1.06); }
.vs-info { display: flex; flex-direction: column; min-width: 0; flex: 1; position: relative; z-index: 1; }
.vs-info b { font-family: var(--font-display); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-brand { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.vs-score { display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; z-index: 1; }
.vs-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; background: transparent; opacity: 0; transition: opacity .2s, transform .2s; z-index: 2; }
.vs-card:hover .vs-x, .vs-x:focus-visible { opacity: 1; }
@media (hover: none) { .vs-x { opacity: .7; } }
.crown { position: absolute; top: 8px; left: 12px; color: #f5c451; z-index: 2; animation: bob 2.4s ease-in-out infinite; }
.crown .ic { width: 16px; height: 16px; }
@keyframes bob { 50% { transform: translateY(-3px) rotate(-6deg); } }
.ring { display: block; }
.ring-bg { fill: none; stroke: var(--surface-3); stroke-width: 3.2; }
.ring-fg { fill: none; stroke: var(--c); stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: var(--v) 100; transform: rotate(-90deg); transform-origin: 18px 18px; animation: ring-fill 1.1s var(--ease) both; }
@keyframes ring-fill { from { stroke-dasharray: 0 100; } }
.ring text { fill: var(--text); font: 700 10px var(--font-display); }
.ring.none .ring-fg { display: none; }
.ring.none .ring-bg { stroke-dasharray: 3 3; }

/* ===== Winner tiles ===== */
.winners { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.win-tile { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.win-tile:hover { transform: translateY(-3px) scale(1.02); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--c, var(--line-2)) 50%, var(--line)); }
.wt-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: color-mix(in srgb, var(--c, var(--faint)) 15%, var(--surface-2)); color: var(--c, var(--muted)); }
.wt-cat { font-size: 12px; color: var(--muted); margin-top: 4px; }
.wt-win { font-family: var(--font-display); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-win.muted { color: var(--faint); font-weight: 500; }
.wt-bars { display: flex; align-items: flex-end; gap: 3px; height: 26px; margin-top: 4px; }
.wt-bars i { flex: 1; height: max(3px, var(--h)); background: var(--c); border-radius: 3px 3px 1px 1px; opacity: .85; transform-origin: bottom; animation: grow .8s var(--ease) both; }
@keyframes grow { from { transform: scaleY(0); } }

/* ===== Radar ===== */
.radar-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 16px; align-items: center; margin-top: 8px; }
@media (max-width: 640px) { .radar-wrap { grid-template-columns: 1fr; } }
.radar { width: 100%; max-height: 380px; overflow: visible; }
.rd-ring { fill: none; stroke: var(--line); }
.rd-axis { stroke: var(--line); }
.rd-label { fill: var(--muted); font-size: 11.5px; }
.rd-shape polygon { fill: color-mix(in srgb, var(--c) 18%, transparent); stroke: var(--c); stroke-width: 2; stroke-linejoin: round; transition: fill .25s; }
.rd-shape { transform-box: view-box; transform-origin: 50% 50%; animation: radar-in .9s var(--ease) both; animation-delay: calc(var(--d) * 120ms); }
.rd-shape:hover polygon { fill: color-mix(in srgb, var(--c) 34%, transparent); }
.rd-dot { fill: var(--c); }
@keyframes radar-in { from { opacity: 0; transform: scale(.2) rotate(-25deg); } }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.legend li { display: flex; align-items: center; gap: 10px; }

/* ===== Toolbar ===== */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); position: sticky; top: 68px; z-index: 10; box-shadow: var(--shadow); }
@media (max-width: 980px) { .toolbar { top: 64px; } }
.seg { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-2); border-radius: 10px; padding: 3px; isolation: isolate; }
.seg::before { content: ''; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / 3); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); transform: translateX(calc(var(--i) * 100%)); transition: transform .35s var(--spring); z-index: -1; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; color: var(--muted); transition: color .2s; }
.seg button[aria-selected="true"] { color: var(--text); font-weight: 600; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.track { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--surface-3); transition: background-color .25s; }
.knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .3s var(--spring); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track .knob { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.spec-search { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 180px; background: var(--surface-2); border-radius: 10px; padding: 0 10px; height: 36px; color: var(--muted); transition: box-shadow .2s; }
.spec-search:focus-within { box-shadow: 0 0 0 3px var(--accent-soft); }
.spec-search input { flex: 1; border: 0; background: transparent; outline: none; color: var(--text); min-width: 0; }
.tb-actions { display: flex; gap: 6px; }

/* ===== Accordion categories ===== */
.cats { display: flex; flex-direction: column; gap: 12px; }
.acc { padding: 0; overflow: clip; }
.acc:hover { border-color: var(--line-2); }
.acc.filtered-out { display: none; }
.acc-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 0; background: transparent; text-align: left; transition: background-color .2s; }
.acc-head:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.cat-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); flex: none; transition: transform .45s var(--spring); }
.acc.open .cat-ic { transform: rotate(-8deg) scale(1.05); }
.acc-title { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.badges { display: flex; gap: 6px; align-items: center; }
.badge { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.p0 { color: var(--accent); background: var(--accent-soft); }
.badge.cov { background: linear-gradient(90deg, var(--accent-soft) var(--cov), var(--surface-2) var(--cov)); }
@media (max-width: 560px) { .badges { display: none; } }
.acc .chev { transition: transform .35s var(--ease); }
.acc.open > .acc-head .chev { transform: rotate(180deg); }
.acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.acc.open .acc-body { grid-template-rows: 1fr; }
.acc-inner { overflow: hidden; padding: 0 16px; }
.acc.open .acc-inner { padding-bottom: 16px; }
.score-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 8px; }
.sc { position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 8px 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; overflow: hidden; }
.sc span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc b { font-family: var(--font-display); }
.sc i { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--w); background: var(--c); border-radius: 0 3px 3px 0; transform-origin: left; animation: grow-x .8s var(--ease) both; }
.sc.win { background: color-mix(in srgb, var(--c) 12%, var(--surface-2)); }
.sc.win b { color: var(--c); }
@keyframes grow-x { from { transform: scaleX(0); } }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-top: 1px solid var(--line); vertical-align: top; }
thead th { border-top: 0; color: var(--muted); font-weight: 500; font-size: 13px; white-space: nowrap; }
thead th .dot { margin-right: 7px; width: 8px; height: 8px; }
tbody tr { transition: background-color .15s; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
td { position: relative; }
td.label { color: var(--muted); min-width: 140px; }
td.best { color: var(--accent); font-weight: 600; }
td.best .ic { margin-right: 4px; vertical-align: -2px; color: #f5c451; }
td.na { color: var(--faint); }
td.unv { color: var(--warn); font-style: italic; }
.note { display: block; margin-top: 3px; font-size: 12px; color: var(--faint); }
.mbar { display: block; height: 4px; width: var(--w); max-width: 120px; margin-top: 6px; border-radius: 2px; background: var(--c); opacity: .75; transform-origin: left; animation: grow-x .7s var(--ease) both; }
td[data-tip] { cursor: help; }
td[data-tip]::after { content: attr(data-tip); position: absolute; left: 8px; bottom: calc(100% - 4px); z-index: 5; max-width: 260px; width: max-content; padding: 6px 9px; border-radius: 8px; background: var(--text); color: var(--bg); font-size: 12px; font-weight: 400; font-style: normal; line-height: 1.35; opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .15s, transform .15s var(--ease); }
td[data-tip]:hover::after, td[data-tip]:focus-visible::after { opacity: 1; transform: none; }

/* ===== Priorities panel ===== */
.slider { display: grid; grid-template-columns: 18px 90px 1fr 26px; gap: 8px; align-items: center; font-size: 14px; margin: 8px 0; color: var(--muted); }
.slider span { color: var(--text); }
.slider input { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--fill), var(--surface-3) var(--fill)); outline: none; }
.slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.3); transition: transform .2s var(--spring); }
.slider input:active::-webkit-slider-thumb { transform: scale(1.25); }
.slider input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.slider output { text-align: right; font-variant-numeric: tabular-nums; }
.rank { margin-top: 16px; }
.rank-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; font-size: 14px; margin-top: 10px; }
.rank-row span:first-child { display: inline-flex; align-items: center; gap: 5px; }
.rank-row .ic { color: #f5c451; }
.bar { grid-column: 1 / -1; height: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--c, var(--accent-2)); border-radius: 4px; transition: width .5s var(--ease); }
.verdict { margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--accent-soft); font-weight: 500; animation: rise .4s var(--ease); }
.verdict.close { background: var(--surface-2); color: var(--muted); font-weight: 400; }
.profiles { margin: 10px 0 0; padding: 0; list-style: none; font-size: 14px; }
.profiles li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.profiles li span:last-child { color: var(--muted); text-align: right; }

/* ===== Storyboard, player, sources ===== */
.controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.controls label { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
select { background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 6px 8px; }
.btn { border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 7px 13px; transition: transform .18s var(--ease), border-color .2s; }
.btn:hover { border-color: var(--line-2); transform: translateY(-1px); }
.btn:active { transform: scale(.96); }
.status { margin-top: 14px; padding: 10px 12px; border-radius: 12px; font-size: 14px; transition: background-color .3s, color .3s; }
.status.ok { background: var(--accent-soft); color: var(--accent); }
.status.bad { background: var(--bad-soft); color: var(--bad); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.play-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); box-shadow: var(--shadow); transition: transform .25s var(--spring); }
.play-btn:hover { transform: scale(1.08); }
.play-btn:active { transform: scale(.92); }
.scenes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 14px; }
.scene { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; transition: border-color .25s, transform .25s var(--ease); }
.scene:hover { transform: translateY(-2px); }
.scene.invalid { border-color: var(--bad); }
.scene-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.scene-top b { color: var(--text); font-family: var(--font-display); font-size: 14px; }
textarea { width: 100%; min-height: 84px; resize: vertical; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 8px; font-size: 13px; line-height: 1.5; transition: border-color .2s; }
textarea:focus { border-color: var(--accent); outline: none; }
.facts { display: flex; flex-wrap: wrap; gap: 4px; }
.fact { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--surface); color: var(--muted); }
.fact.best { color: var(--accent); }
.issue { font-size: 12px; color: var(--bad); }
.src-phone { font-size: 15px; margin-top: 16px; }
.sources { list-style: none; padding: 0; margin: 6px 0 0; }
.sources li { padding: 8px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.sources a { color: var(--accent); text-decoration: none; font-weight: 500; }
.sources a:hover { text-decoration: underline; }

/* ===== Toasts & footer ===== */
#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: 14px; box-shadow: var(--shadow-lift); animation: toast-in .35s var(--spring) both; }
.toast.info .ic { color: var(--warn); }
.toast.out { animation: toast-out .35s var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.92); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px) scale(.96); } }
footer { color: var(--faint); font-size: 13px; padding: 30px 0 48px; border-top: 1px solid var(--line); margin-top: 40px; }
.foot-in { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
footer a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ===== Video frames (reference-style), sized in container units ===== */
.player { margin-top: 16px; }
.screen { container-type: inline-size; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; position: relative; }
.screen .vf { position: absolute; inset: 0; animation: vf-in .45s ease both; }
@keyframes vf-in { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
.vf { --cols: 3; display: flex; flex-direction: column; padding: 4cqw 5cqw; font-family: 'Montserrat', 'Inter', 'Noto Sans Telugu', sans-serif; color: #fff; overflow: hidden; }
.vf-purple { background: radial-gradient(120% 140% at 100% 0%, #3d1d63 0%, #1a0f2e 45%, #07060d 100%); }
.vf-mint { background: #8fbfae; }
.vf-yellow { background: #e6cf45; color: #fff; }
.vf-dark { background: #050505; }
.vf-light { background: #e9eaee; color: #111; }
.vf-lavender { background: linear-gradient(180deg, #f2e8fb, #dccbef); color: #2c2140; }
.vf-cols { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 2.5cqw; align-items: center; text-align: center; }
.vf-grow { flex: 1; }
.vf-top { align-items: start; }
.vf-col { display: flex; flex-direction: column; align-items: center; gap: 1.2cqw; }
.vf-caps { font-weight: 800; font-size: 4.2cqw; letter-spacing: .02em; text-transform: uppercase; text-shadow: 0 .2cqw .6cqw rgba(0,0,0,.25); line-height: 1.1; }
.vf-caps.sm { font-size: 2.2cqw; }
.vf-sub { font-size: 1.5cqw; opacity: .7; }
.vf-pill { display: inline-block; background: #000; color: #fff; font-weight: 700; font-size: 1.9cqw; padding: .5cqw 1.2cqw; border-radius: .7cqw; white-space: nowrap; }
.vf-phone { width: 9cqw; aspect-ratio: 9 / 19.5; border-radius: 1.6cqw; background: #1b1b1f; border: .35cqw solid #9a9aa3; box-shadow: 0 1cqw 2.5cqw rgba(0,0,0,.35); position: relative; }
.vf-phone i { position: absolute; top: 1.1cqw; left: 50%; width: 1cqw; height: 1cqw; margin-left: -.5cqw; border-radius: 50%; background: #000; }
.vf-stage { position: relative; display: flex; justify-content: center; }
.vf-stage .vf-phone { width: 13cqw; opacity: .9; }
.vf-big { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; color: #fff; text-shadow: 0 .3cqw 1cqw rgba(0,0,0,.6); }
.vf-big b { font-size: 4.6cqw; font-weight: 800; line-height: 1; }
.vf-big span { font-size: 2.2cqw; font-weight: 800; text-transform: uppercase; margin-top: .4cqw; }
.vf-light .vf-big, .vf-lavender .vf-big { position: static; color: #111; text-shadow: none; order: -1; margin-bottom: 1cqw; }
.vf-light .vf-stage, .vf-lavender .vf-stage { flex-direction: column; align-items: center; }
.vf-big.best b { color: #7cf2c9; }
.vf-light .vf-big.best b, .vf-lavender .vf-big.best b { color: #0a9d84; }
.vf-tag { position: absolute; left: 5cqw; bottom: 3cqw; font-size: 1.6cqw; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.vf-note { position: absolute; right: 3cqw; bottom: 2cqw; font-size: 1.1cqw; opacity: .45; }
.vf-vsrow { flex: 1; display: flex; align-items: center; gap: 4cqw; }
.vf-vs { font-size: 10cqw; font-weight: 900; font-style: italic; letter-spacing: -.04em; line-height: 1; }
/* VS table */
.vf-table { padding: 3cqw 5cqw; }
.vf-thead { display: grid; grid-template-columns: 1.4fr repeat(var(--cols), 1fr); align-items: end; gap: 1.5cqw; text-align: center; }
.vf-thead .vf-vs { font-size: 8cqw; text-align: left; align-self: center; }
.vf-thead .vf-phone { width: 6cqw; }
.vf-tbody { margin-top: 2cqw; }
.vf-tr { display: grid; grid-template-columns: 1.4fr repeat(var(--cols), 1fr); gap: 1.5cqw; padding: 1.3cqw 1.5cqw; font-size: 1.8cqw; align-items: center; }
.vf-tr.alt { background: rgba(255,255,255,.07); }
.vf-td-label { opacity: .9; }
.vf-td { text-align: center; font-weight: 600; }
.vf-td.best { color: #7cf2c9; }
/* Chip cards */
.vf-chips { padding: 0; gap: 0; }
.vf-band { display: grid; grid-template-columns: repeat(var(--cols), 1fr); background: #000; color: #fff; text-align: center; font-size: 2cqw; font-weight: 600; padding: 1.6cqw 0; }
.vf-chips .vf-grow { gap: .3cqw; align-items: stretch; }
.vf-chipcard { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2cqw; padding: 2cqw; }
.vf-chipcard.c0 { background: linear-gradient(160deg, #eef0ff, #d9ddf5); }
.vf-chipcard.c1 { background: linear-gradient(160deg, #e3ebf7, #b9c9e6); }
.vf-chipcard.c2 { background: linear-gradient(160deg, #fdeff5, #f6cfe0); }
.vf-chipcard.c3 { background: linear-gradient(160deg, #eaf7f1, #c8e9da); }
.vf-chipcard.c4 { background: linear-gradient(160deg, #fff6e5, #f6e0b5); }
.vf-chipname { font-size: 3cqw; font-weight: 800; line-height: 1.15; background: linear-gradient(90deg, #6b3df5, #e0337a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vf-chipcard .vf-phone { width: 7cqw; transform: rotate(-8deg); }
/* Stat rows (HDR-video style) */
.vf-title { text-align: center; font-size: 3.4cqw; font-weight: 800; margin-bottom: 2cqw; }
.vf-stats { display: flex; flex-direction: column; gap: 1cqw; font-size: 1.8cqw; margin-top: 2.5cqw; }
.vf-stats b { color: #ff5a5f; font-weight: 700; }
.vf-stats b.best { color: #7cf2c9; }
.vf-dark .vf-pill { background: #fff; color: #000; }
/* Verdict & outro */
.vf-col.dim { opacity: .35; }
.vf-col.win .vf-phone { border-color: #7cf2c9; box-shadow: 0 0 3cqw rgba(124,242,201,.45); transform: scale(1.12); }
.vf-verdict { text-align: center; font-size: 3cqw; font-weight: 700; margin-top: 1cqw; }
.vf-verdict b { color: #7cf2c9; }
.vf-center { justify-content: center; align-items: center; }

/* Player controls */
.player-bar { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.player-bar .time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.progress { flex: 1; min-width: 120px; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; cursor: pointer; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); }
.filmstrip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.thumb { border: 2px solid transparent; border-radius: 8px; padding: 0; background: none; cursor: pointer; text-align: left; }
.thumb[aria-current="true"] { border-color: var(--accent); }
.thumb .screen { border-radius: 6px; pointer-events: none; }
.thumb .screen .vf { animation: none; }
.thumb small { display: block; font-size: 11px; color: var(--muted); padding: 3px 2px 0; }
.vf-stats b.na, .vf-td.na { color: rgba(255,255,255,.4); font-weight: 500; }
.vf-big.na b { opacity: .5; }

/* ===== Refinements ===== */
.lm-text b { color: var(--accent); font-weight: 700; }
.winners { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .winners { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rd-shape polyline { fill: none; stroke: var(--c); stroke-width: 2; stroke-dasharray: 4 3; }
.legend li { align-items: flex-start; }
.legend li .dot { margin-top: 6px; }
.legend small { display: block; color: var(--faint); font-size: 11.5px; line-height: 1.3; margin-top: 2px; }
@media (max-width: 640px) {
  .picker.glass { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface); }
  .brand-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dd-btn { width: 100%; }
  .dd-btn .count { display: none; }
  .dd-btn > span:nth-child(2) { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dd.open::before { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 29; animation: fade .2s both; }
  .dd.open .dd-menu { transform: none; }
  .vs-card { padding-right: 34px; }
}
@keyframes fade { from { opacity: 0; } }

/* ===== Video pacing: slower, clearer transitions ===== */
.screen .vf { animation: none; }
.screen .vf.enter { animation: slide-in 1s var(--ease) both; }
.screen .vf.leave { animation: slide-out .9s var(--ease) both; z-index: 0; }
@keyframes slide-in { from { opacity: 0; transform: translateX(7%) scale(.985); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes slide-out { to { opacity: 0; transform: translateX(-6%) scale(.985); filter: blur(3px); } }
/* Columns, rows and big numbers appear one after another so each value can be read. */
.screen .vf.enter .vf-cols > *, .screen .vf.enter .vf-tr, .screen .vf.enter .vf-stats > div, .screen .vf.enter .vf-chipcard { animation: item-in .7s var(--ease) both; }
.screen .vf.enter .vf-cols > *:nth-child(1), .screen .vf.enter .vf-tr:nth-child(1) { animation-delay: .45s; }
.screen .vf.enter .vf-cols > *:nth-child(2), .screen .vf.enter .vf-tr:nth-child(2) { animation-delay: .65s; }
.screen .vf.enter .vf-cols > *:nth-child(3), .screen .vf.enter .vf-tr:nth-child(3) { animation-delay: .85s; }
.screen .vf.enter .vf-cols > *:nth-child(4), .screen .vf.enter .vf-tr:nth-child(4) { animation-delay: 1.05s; }
.screen .vf.enter .vf-cols > *:nth-child(5), .screen .vf.enter .vf-tr:nth-child(5) { animation-delay: 1.25s; }
.screen .vf.enter .vf-big b { animation: num-in .8s var(--spring) both; animation-delay: inherit; }
@keyframes item-in { from { opacity: 0; transform: translateY(18px); } }
@keyframes num-in { from { opacity: 0; transform: scale(.6); } }
.vf-counter { position: absolute; right: 3cqw; top: 2.4cqw; font-size: 1.35cqw; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .4cqw 1cqw; border-radius: 999px; background: rgba(0,0,0,.35); color: #fff; }
.vf-light .vf-counter, .vf-lavender .vf-counter, .vf-mint .vf-counter, .vf-yellow .vf-counter { background: rgba(0,0,0,.6); }
.vf-title-card { gap: 1.4cqw; text-align: center; }
.vf-title-ic { display: grid; place-items: center; width: 9cqw; height: 9cqw; border-radius: 2.4cqw; background: linear-gradient(135deg, #4de0c4, #8b7cff); color: #07080c; }
.vf-title-ic .ic { width: 5cqw; height: 5cqw; }
.vf-title-big { font-size: 6.4cqw; font-weight: 900; letter-spacing: -.02em; line-height: 1; }
.screen .vf.enter .vf-title-big { animation: title-in 1.1s var(--ease) both; animation-delay: .25s; }
@keyframes title-in { from { opacity: 0; letter-spacing: .2em; } }
.vf-title-phones { margin-top: 1cqw; width: auto; gap: 1cqw; }
.vf-title-phones .vf-pill { background: rgba(255,255,255,.12); }
.shot-bar { display: flex; gap: 3px; height: 6px; margin-top: 10px; }
.shot-bar i { flex: var(--w); background: var(--surface-3); border-radius: 3px; transition: background-color .3s; }
.shot-bar i.done { background: color-mix(in srgb, var(--accent) 55%, var(--surface-3)); }
.shot-bar i.now { background: var(--accent); }
@media (prefers-reduced-motion: reduce) { .screen .vf.leave { display: none; } }
.filmstrip { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 6px; scroll-snap-type: x proximity; }
.filmstrip .thumb { flex: 0 0 150px; scroll-snap-align: center; }
.vf-counter { top: auto; bottom: 2.4cqw; right: 3cqw; }
.vf-table .vf-tag { display: none; }
.vf-td.long { font-size: 1.3cqw; line-height: 1.25; font-weight: 500; }
.vf-tr { padding-top: 1.1cqw; padding-bottom: 1.1cqw; }
.vf-stats b { word-break: break-word; }
