@font-face { font-family: "Clash Display"; src: url("/static/fonts/ClashDisplay-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Clash Display"; src: url("/static/fonts/ClashDisplay-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Clash Display"; src: url("/static/fonts/ClashDisplay-Semibold.otf") format("opentype"); font-weight: 600; font-display: swap; }

/* ── Tokens ───────────────────────────────────────────────────── */
:root {
  color-scheme: dark;
  --base: #04070a;
  --sheet: rgba(9, 13, 17, 0.9);
  --sheet-solid: #0a0f13;
  --raise: rgba(255, 255, 255, 0.04);
  --raise-2: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.14);
  --ink: #eef4f2;
  --ink-2: #a8b5b1;
  --ink-3: #7d8a87;
  --s-ios: #4d8ff5;
  --s-and: #22ad74;
  --ghost: rgba(238, 244, 242, 0.34);
  --good: #45d69a;
  --bad: #ff7a70;
  --warn: #f0b44c;
  --g1: #9af0a0; --g2: #3fd6c9; --g3: #3f86f2;
  --brand: linear-gradient(100deg, var(--g1), var(--g2) 50%, var(--g3));
  --aura-o: 0.55;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --z-sticky: 10; --z-pop: 20; --z-modal: 30; --z-toast: 40; --z-tip: 50;
}
:root[data-theme="light"] {
  color-scheme: light;
  --base: #e9f1f0;
  --sheet: rgba(255, 255, 255, 0.86);
  --sheet-solid: #ffffff;
  --raise: rgba(8, 30, 28, 0.035);
  --raise-2: rgba(8, 30, 28, 0.06);
  --line: rgba(8, 30, 28, 0.09);
  --line-2: rgba(8, 30, 28, 0.16);
  --ink: #0a1513;
  --ink-2: #42524e;
  --ink-3: #5c6b67;
  --s-ios: #2f74e0;
  --s-and: #139063;
  --ghost: rgba(10, 21, 19, 0.36);
  --good: #0f8a55;
  --bad: #c9362c;
  --warn: #9a6400;
  --aura-o: 0.42;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --base: #e9f1f0; --sheet: rgba(255,255,255,0.86); --sheet-solid: #fff;
    --raise: rgba(8,30,28,0.035); --raise-2: rgba(8,30,28,0.06);
    --line: rgba(8,30,28,0.09); --line-2: rgba(8,30,28,0.16);
    --ink: #0a1513; --ink-2: #42524e; --ink-3: #5c6b67;
    --s-ios: #2f74e0; --s-and: #139063; --ghost: rgba(10,21,19,0.36);
    --good: #0f8a55; --bad: #c9362c; --warn: #9a6400; --aura-o: 0.42;
  }
}

* { box-sizing: border-box; }
html { background: var(--base); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); background: transparent;
  font: 400 14px/1.45 Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01";
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.display, h1, h2, h3 { font-family: "Clash Display", Inter, sans-serif; font-weight: 500; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
.num { font-variant-numeric: tabular-nums; }
::selection { background: color-mix(in srgb, var(--g2) 40%, transparent); }
:focus-visible { outline: 2px solid var(--g2); outline-offset: 2px; border-radius: 6px; }

/* ── Aura background ─────────────────────────────────────────── */
.aura { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--base); }
.aura i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: var(--aura-o); will-change: transform; }
.aura .b1 { width: 52vw; height: 52vw; left: -14vw; top: -22vw; background: radial-gradient(circle, #7ff09a 0%, transparent 65%); animation: drift1 34s var(--ease-io) infinite alternate; }
.aura .b2 { width: 46vw; height: 46vw; left: 30vw; top: -18vw; background: radial-gradient(circle, #2fd6c6 0%, transparent 65%); animation: drift2 41s var(--ease-io) infinite alternate; }
.aura .b3 { width: 50vw; height: 50vw; right: -18vw; top: -10vw; background: radial-gradient(circle, #3b73f5 0%, transparent 65%); animation: drift3 37s var(--ease-io) infinite alternate; }
.aura .b4 { width: 40vw; height: 40vw; left: 10vw; top: 26vh; background: radial-gradient(circle, #6a5cf2 0%, transparent 62%); opacity: calc(var(--aura-o) * 0.45); animation: drift4 46s var(--ease-io) infinite alternate; }
.aura::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, transparent 38%, var(--base) 92%); }
.grain { position: absolute; inset: -50%; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
@keyframes drift1 { to { transform: translate3d(12vw, 8vh, 0) scale(1.15); } }
@keyframes drift2 { to { transform: translate3d(-10vw, 12vh, 0) scale(0.9); } }
@keyframes drift3 { to { transform: translate3d(-8vw, 6vh, 0) scale(1.2); } }
@keyframes drift4 { to { transform: translate3d(16vw, -6vh, 0) scale(1.1); } }

/* ── Top bar ─────────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: var(--z-sticky); display: flex; align-items: center; justify-content: space-between;
  padding: 18px max(28px, calc((100vw - 1360px) / 2 + 28px)); border-bottom: 1px solid transparent; transition: background .3s, backdrop-filter .3s; }
.top.scrolled { background: color-mix(in srgb, var(--base) 72%, transparent); backdrop-filter: blur(16px) saturate(1.4); border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 34px; height: auto; filter: drop-shadow(0 4px 14px rgba(63, 214, 201, .35)); }
.brand .word { font: 600 22px/1 "Clash Display"; letter-spacing: -0.01em; }
.brand .hq { font: 500 12px/1 "Clash Display"; color: var(--ink-2); padding: 4px 6px 3px; border-radius: 6px; background: var(--raise-2); margin-top: 2px; }
.top-right { display: flex; align-items: center; gap: 4px; }
.top-right form { margin: 0; display: flex; }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin-right: 10px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--good); position: relative; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--good); animation: ping 2.4s var(--ease) infinite; }
.live.stale .pulse { background: var(--warn); } .live.stale .pulse::after { border-color: var(--warn); }
@keyframes ping { 0% { transform: scale(.4); opacity: .9; } 80%, 100% { transform: scale(1.6); opacity: 0; } }

.ib { position: relative; width: 38px; height: 38px; border: 0; border-radius: 12px; background: transparent; color: var(--ink-2);
  display: inline-grid; place-items: center; transition: background .2s, color .2s, transform .2s var(--ease); }
.ib:hover { background: var(--raise-2); color: var(--ink); }
.ib:active { transform: scale(.94); }
.ib svg { width: 19px; height: 19px; }
.ib.sm { width: 32px; height: 32px; border-radius: 10px; }
.ib.sm svg { width: 16px; height: 16px; }
.ib.spinning svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--sheet-solid); color: var(--ink); border: 1px solid var(--line-2); font-size: 12px; padding: 4px 8px; border-radius: 7px;
  white-space: nowrap; z-index: var(--z-tip); pointer-events: none; animation: fadeUp .18s var(--ease); }

main { max-width: 1360px; margin: 0 auto; padding: 0 28px 80px; }

/* ── Now ─────────────────────────────────────────────────────── */
.now { padding: 44px 0 30px; }
.now-when { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; color: var(--ink-2); font-size: 13.5px; }
.now-when .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--g2); box-shadow: 0 0 12px var(--g2); }
.statement { font-size: clamp(30px, 4.3vw, 60px); line-height: 1.1; font-weight: 500; color: var(--ink-2); max-width: 20em; letter-spacing: -0.02em; }
.statement .w { display: inline-block; opacity: 0; filter: blur(8px); transform: translateY(12px); animation: wordIn .9s var(--ease) forwards; }
.statement .n { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
@keyframes wordIn { to { opacity: 1; filter: blur(0); transform: none; } }
.movement { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 26px 0 0; font-size: 14px; color: var(--ink-2); }
.movement li { display: inline-flex; align-items: baseline; gap: 6px; opacity: 0; animation: fadeUp .7s var(--ease) forwards; }
.movement b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.movement .up b { color: var(--good); } .movement .down b { color: var(--bad); }
.movement a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line-2); transition: border-color .2s, color .2s; }
.movement a:hover { color: var(--ink); border-color: var(--ink-2); }
.movement .alert b { color: var(--bad); } .movement .caution b { color: var(--warn); }
.ribbon { margin-top: 34px; }
.ribbon-label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-3); margin-bottom: 4px; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Sheets ──────────────────────────────────────────────────── */
.sheet { background: var(--sheet); border: 1px solid var(--line); border-radius: 28px; margin-top: 18px; overflow: clip;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .6); animation: sheetIn 1s var(--ease) both; }
.sheet:nth-of-type(2) { animation-delay: .08s; } .sheet:nth-of-type(3) { animation-delay: .14s; } .sheet:nth-of-type(4) { animation-delay: .2s; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

.period-head { padding: 30px 32px 22px; }
.period-head h2 { font-size: clamp(24px, 2.6vw, 34px); display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .3em; }
.range-trigger { border: 0; background: none; padding: 0; font: inherit; letter-spacing: inherit; color: var(--ink);
  display: inline-flex; align-items: baseline; gap: 6px; position: relative; }
.range-trigger::after { content: ""; position: absolute; left: 0; right: 30px; bottom: -4px; height: 2px; border-radius: 2px; background: var(--brand);
  transform-origin: left; transition: transform .45s var(--ease); }
.range-trigger:hover::after, .range-trigger[aria-expanded="true"]::after { transform: scaleX(1.06); }
.range-trigger svg { width: 22px; height: 22px; stroke-width: 2; align-self: center; color: var(--ink-2); transition: transform .35s var(--ease); }
.range-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.period-sub { margin: 10px 0 0; color: var(--ink-3); font-size: 13.5px; }

/* Metric rail */
.rail { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rail-ind { position: absolute; top: -1px; left: 0; height: 2px; background: var(--brand); border-radius: 0 0 2px 2px;
  transition: transform .55s var(--ease), width .55s var(--ease); z-index: 1; }
.tab { text-align: left; border: 0; background: transparent; padding: 18px 22px 20px; border-left: 1px solid var(--line); position: relative; transition: background .25s; min-width: 0; }
.tab:first-child, .rail-ind + .tab { border-left: 0; }
.tab:hover { background: var(--raise); }
.tab[aria-selected="true"] { background: var(--raise-2); }
.tab .l { font-size: 13px; color: var(--ink-2); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab .v { display: block; font: 500 clamp(22px, 2.1vw, 30px)/1.15 "Clash Display"; margin: 8px 0 6px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tab .d { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; display: block; overflow: hidden; text-overflow: ellipsis; }
.tab .v.empty { color: var(--ink-3); }
.delta { font-weight: 600; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); } .delta.flat { color: var(--ink-3); }

.main-chart { padding: 22px 32px 26px; }
.chart-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); min-height: 20px; margin-bottom: 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.sw { width: 10px; height: 10px; border-radius: 3px; background: var(--c); display: inline-block; }
.sw.dash { width: 16px; height: 0; border-top: 2px dashed var(--ghost); border-radius: 0; background: none; }
.legend-inline { display: inline-flex; align-items: center; gap: 6px; }
.legend-inline i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); display: inline-block; margin-left: 8px; }

/* Split panes: hairline grid inside the sheet, not floating cards */
.split { display: grid; grid-template-columns: 7fr 5fr; border-top: 1px solid var(--line); }
.split > .pane + .pane { border-left: 1px solid var(--line); }
.split-last { display: grid; grid-template-columns: 7fr 5fr; }
.split-last > .pane + .pane { border-left: 1px solid var(--line); }
.pane { padding: 24px 32px 28px; min-width: 0; }
.pane-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.pane-head h3 { font-size: 20px; }
.pane-note { font-size: 12.5px; color: var(--ink-3); }

/* Funnel: five equal columns, equal gaps, bars anchored to one baseline */
.funnel { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 14px; }
.fcol { display: grid; grid-template-rows: auto auto 210px auto; min-width: 0; position: relative; }
.fcol .fl { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcol .fv { font: 500 24px/1.2 "Clash Display"; margin: 4px 0 12px; font-variant-numeric: tabular-nums; }
.fcol .ftrack { position: relative; border-radius: 8px; background: var(--raise); overflow: hidden; }
.fcol .fbar { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--s-ios) 100%, white 12%), var(--s-ios));
  transform-origin: bottom; transform: scaleY(0); animation: growY .9s var(--ease) forwards; }
.fcol .fc { margin-top: 10px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.fcol .fc b { color: var(--ink); font-weight: 600; }
@keyframes growY { to { transform: scaleY(1); } }

/* Platform + countries */
.platform { margin-bottom: 18px; }
.pbar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--raise); }
.pbar span { display: block; height: 100%; transition: flex-grow .8s var(--ease); }
.plabels { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.plabels b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; margin-left: 6px; }
.plabels .sw { margin-right: 6px; }
.countries { list-style: none; margin: 0; padding: 0; }
.countries li { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.countries li:first-child { border-top: 0; }
.countries .flag { font-size: 16px; line-height: 1; }
.countries .meter { height: 3px; border-radius: 2px; background: var(--raise-2); margin-top: 6px; overflow: hidden; }
.countries .meter span { display: block; height: 100%; background: var(--ink-2); opacity: .55; border-radius: 2px; transform-origin: left; animation: growX .9s var(--ease) both; }
.countries .cv { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; }
@keyframes growX { from { transform: scaleX(0); } }

/* ── Subscribers ─────────────────────────────────────────────── */
.subs-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 30px 32px 18px; flex-wrap: wrap; }
.subs-head h2 { font-size: clamp(24px, 2.6vw, 34px); }
.subs-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 38px; border-radius: 12px; background: var(--raise); width: 260px; transition: background .2s, box-shadow .2s; }
.search:focus-within { background: var(--raise-2); box-shadow: 0 0 0 1px var(--line-2); }
.search svg { width: 16px; height: 16px; color: var(--ink-3); flex: none; }
.search input { border: 0; background: none; outline: 0; width: 100%; font-size: 13.5px; }
.search input::placeholder { color: var(--ink-3); }
.tb { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent;
  color: var(--ink-2); font-size: 13.5px; font-weight: 500; text-decoration: none; transition: background .2s, color .2s, transform .2s var(--ease); }
.tb:hover { background: var(--raise-2); color: var(--ink); }
.tb:active { transform: scale(.97); }
.tb svg { width: 16px; height: 16px; }
.tb.solid { background: var(--ink); color: var(--base); }
.tb.solid:hover { background: var(--ink); opacity: .9; }
.subtabs { position: relative; display: flex; gap: 2px; padding: 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs button { border: 0; background: none; padding: 12px 10px 13px; font-size: 13.5px; color: var(--ink-3); white-space: nowrap; transition: color .2s; font-weight: 500; }
.subtabs button:hover { color: var(--ink-2); }
.subtabs button[aria-selected="true"] { color: var(--ink); }
.subtabs button .c { font-variant-numeric: tabular-nums; margin-left: 6px; color: var(--ink-3); font-weight: 400; }
.subtabs-ind { position: absolute; bottom: -1px; left: 0; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .5s var(--ease), width .5s var(--ease); }
.table-wrap { max-height: 560px; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { position: sticky; top: 0; z-index: 1; background: var(--sheet-solid); text-align: left; font-weight: 500; color: var(--ink-3); font-size: 12.5px;
  padding: 12px 16px; white-space: nowrap; cursor: pointer; user-select: none; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { padding-left: 32px; } th:last-child, td:last-child { padding-right: 32px; }
th:hover { color: var(--ink-2); }
th[aria-sort] { color: var(--ink); }
th[aria-sort="ascending"]::after { content: " ↑"; } th[aria-sort="descending"]::after { content: " ↓"; }
th.r, td.r { text-align: right; }
td { padding: 11px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; color: var(--ink-2); }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--raise); }
tbody tr.enter { animation: rowIn .5s var(--ease) both; }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } }
.who { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 500; }
.av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 600 12px/1 "Clash Display"; color: #04110d; flex: none; }
.who .copy { opacity: 0; border: 0; background: none; color: var(--ink-3); padding: 2px; border-radius: 6px; transition: opacity .15s; }
.who .copy svg { width: 14px; height: 14px; }
tr:hover .who .copy { opacity: 1; }
.who .anon { color: var(--ink-3); font-weight: 400; font-family: ui-monospace, "SF Mono", monospace; font-size: 12.5px; }
.st { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--ink-3)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--ink-3)) 20%, transparent); }
.store { display: inline-flex; align-items: center; gap: 7px; }
.store::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.soon { color: var(--warn); }
.empty-row td { padding: 60px 32px; text-align: center; color: var(--ink-3); }

/* Feed + sources */
.feed { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; }
.feed li { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.feed li:first-child { border-top: 0; }
.feed .ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.feed .ic svg { width: 16px; height: 16px; stroke-width: 2; }
.feed .t { font-weight: 500; color: var(--ink); font-size: 13.5px; }
.feed .s { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed .a { text-align: right; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.feed .when { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.sources { list-style: none; margin: 0; padding: 0; }
.sources li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.sources li:first-child { border-top: 0; }
.sources .nm { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 500; }
.sources .nm::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--ink-3)); }
.sources .ago { color: var(--ink-3); font-size: 12.5px; }
.sources .msg { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-3); padding-left: 17px; word-break: break-word; }
.sources .msg.err { color: var(--bad); }
.empty { display: grid; place-items: center; text-align: center; color: var(--ink-3); font-size: 13.5px; padding: 24px; line-height: 1.5; }

/* ── Charts ─────────────────────────────────────────────────── */
.chart { position: relative; height: var(--h, 240px); }
.chart svg { display: block; overflow: visible; stroke: none; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text { fill: var(--ink-3); font: 400 11.5px Inter, sans-serif; font-variant-numeric: tabular-nums; }
.chart .bar { transform-box: fill-box; transform-origin: 50% 100%; transition: opacity .2s; }
.chart.animate .bar { animation: barIn .8s var(--ease) both; }
@keyframes barIn { from { transform: scaleY(0); } }
.chart.hovering .bar:not(.hot) { opacity: .38; }
.chart .line { fill: none; stroke-width: 2; }
.chart.animate .line { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.2s var(--ease) forwards; }
.chart .ghost { fill: none; stroke: var(--ghost); stroke-width: 1.5; stroke-dasharray: 4 4; }
.chart.animate .ghost, .chart.animate .area { animation: fade 1.2s var(--ease) both; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } }
.chart .cross { stroke: var(--line-2); stroke-width: 1; opacity: 0; transition: opacity .15s; }
.chart .hdot { opacity: 0; transition: opacity .15s; stroke: var(--sheet-solid); stroke-width: 2.5; }
.chart.hovering .cross, .chart.hovering .hdot { opacity: 1; }
.tip { position: absolute; top: 0; left: 0; z-index: var(--z-tip); pointer-events: none; min-width: 150px; padding: 10px 12px;
  background: var(--sheet-solid); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.5);
  font-size: 12.5px; opacity: 0; transition: opacity .15s, transform .18s var(--ease); }
.chart.hovering .tip { opacity: 1; }
.tip .th { color: var(--ink-2); margin-bottom: 6px; }
.tip .tr { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tip .tr + .tr { margin-top: 4px; }
.tip .tr span { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); }
.tip .tr b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.chart .empty { position: absolute; inset: 0; }

/* ── Picker ─────────────────────────────────────────────────── */
.picker { position: fixed; z-index: var(--z-pop); display: grid; grid-template-columns: 190px auto; background: var(--sheet-solid);
  border: 1px solid var(--line-2); border-radius: 20px; box-shadow: 0 40px 100px -30px rgba(0,0,0,.7); overflow: hidden;
  transform-origin: top left; animation: popIn .32s var(--ease); }
.picker[hidden] { display: none; }
.picker.closing { animation: popOut .18s var(--ease) forwards; }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.97); filter: blur(4px); } }
@keyframes popOut { to { opacity: 0; transform: translateY(-4px) scale(.98); filter: blur(3px); } }
.picker-presets { padding: 12px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.picker-presets button { text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; color: var(--ink-2); transition: background .15s, color .15s; }
.picker-presets button:hover { background: var(--raise-2); color: var(--ink); }
.picker-presets button[aria-pressed="true"] { background: var(--raise-2); color: var(--ink); font-weight: 500; }
.picker-cal { padding: 16px 18px 14px; position: relative; }
.cal-nav { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; pointer-events: none; }
.cal-nav .ib { pointer-events: auto; }
.cal-months { display: grid; grid-template-columns: repeat(2, 252px); gap: 26px; }
.cal-title { text-align: center; font: 500 15px/32px "Clash Display"; margin-bottom: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 36px); row-gap: 2px; }
.cal-dow { font-size: 11.5px; color: var(--ink-3); text-align: center; padding: 4px 0 6px; }
.cal-day { height: 36px; border: 0; background: none; font-size: 13px; color: var(--ink); position: relative; font-variant-numeric: tabular-nums; }
.cal-day span { position: relative; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; margin: 0 auto; border-radius: 10px; transition: background .12s; }
.cal-day:hover span { background: var(--raise-2); }
.cal-day.in::before { content: ""; position: absolute; inset: 1px 0; background: color-mix(in srgb, var(--g2) 16%, transparent); }
.cal-day.s::before { left: 50%; } .cal-day.e::before { right: 50%; } .cal-day.s.e::before { display: none; }
.cal-day.s span, .cal-day.e span { background: var(--ink); color: var(--base); font-weight: 600; }
.cal-day.today span { box-shadow: inset 0 0 0 1px var(--line-2); }
.cal-day:disabled { color: var(--ink-3); opacity: .45; cursor: default; }
.cal-day:disabled span { background: none; }
.cal-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.cal-foot > div { display: flex; gap: 6px; }

/* ── Dialog + toast ─────────────────────────────────────────── */
dialog { border: 1px solid var(--line-2); border-radius: 22px; background: var(--sheet-solid); color: var(--ink); max-width: 560px; width: calc(100% - 32px); padding: 28px; }
dialog[open] { animation: popIn .32s var(--ease); }
dialog::backdrop { background: rgba(2, 5, 8, .6); backdrop-filter: blur(4px); }
dialog h2 { font-size: 24px; margin-bottom: 8px; }
dialog p { color: var(--ink-2); line-height: 1.55; margin: 0 0 18px; }
dialog label { font-size: 12.5px; color: var(--ink-3); }
dialog form { display: flex; justify-content: flex-end; margin-top: 6px; }
.copyfield { display: flex; gap: 6px; margin: 6px 0 16px; }
.copyfield code { flex: 1; min-width: 0; overflow: auto; white-space: nowrap; background: var(--raise); border-radius: 10px; padding: 10px 12px; font: 12.5px ui-monospace, "SF Mono", monospace; }
.costs { margin-top: 20px; }
.cost-summary { display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cost-summary > div { padding: 20px 28px; border-right: 1px solid var(--line); }
.cost-summary > div:last-child { border-right: 0; }
.cost-summary span { display: block; color: var(--ink-3); font-size: 12.5px; margin-bottom: 7px; }
.cost-summary b { font: 500 25px/1 "Clash Display"; font-variant-numeric: tabular-nums; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: var(--z-toast); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--base); padding: 10px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 500; transition: opacity .25s, transform .35s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .rail { grid-template-columns: repeat(3, 1fr); }
  .tab:nth-child(3n + 2) { border-left: 0; }
  .tab:nth-child(n + 5) { border-top: 1px solid var(--line); }
  .split, .split-last { grid-template-columns: 1fr; }
  .split > .pane + .pane, .split-last > .pane + .pane { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .top { padding: 14px 16px; }
  .live { display: none; }
  main { padding: 0 12px 60px; }
  .now { padding: 24px 4px 20px; }
  .sheet { border-radius: 22px; }
  .period-head, .subs-head { padding: 22px 18px 16px; }
  .rail { grid-template-columns: repeat(2, 1fr); }
  .tab { padding: 14px 16px 16px; }
  .tab:nth-child(n) { border-left: 1px solid var(--line); border-top: 0; }
  .tab:nth-child(2n + 2) { border-left: 0; }
  .tab:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .main-chart, .pane { padding-left: 18px; padding-right: 18px; }
  .funnel { column-gap: 6px; }
  .fcol { grid-template-rows: auto auto 110px auto; }
  .fcol .fv { font-size: 17px; }
  .fcol .fl { font-size: 11px; white-space: normal; min-height: 2.6em; line-height: 1.25; }
  .fcol .ofp { display: none; }
  .fcol .fc { font-size: 11.5px; }
  .subtabs { padding: 0 10px; }
  .search { width: 100%; }
  .subs-actions { width: 100%; }
  .cost-summary { grid-template-columns: repeat(2,1fr); }
  .cost-summary > div:nth-child(2) { border-right: 0; }
  .cost-summary > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  th:first-child, td:first-child { padding-left: 18px; }
  .picker { grid-template-columns: 1fr; left: 8px !important; right: 8px; top: auto !important; bottom: 8px; max-height: calc(100vh - 16px); overflow: auto; }
  .picker-presets { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
  .cal-months { grid-template-columns: 252px; justify-content: center; }
  .cal-months > :nth-child(2) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  .aura i { animation: none; }
}
