:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-2: #f1f3f6;
  --line: #e7e9ee;
  --line-2: #d6dae1;
  --text: #0f1729;
  --muted: #5b6475;
  --faint: #98a1b0;
  --accent: #4f46e5;
  --accent-ink: #ffffff;
  --good: #16a34a;
  --warn: #b45309;
  --bad: #dc2626;
  --tiktok: #0e9fb5;
  --instagram: #db2777;
  --youtube: #dc2626;
  --radius: 8px;
  --radius-sm: 6px;
  --pad-x: clamp(16px, 2.6vw, 32px);
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--sans); }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack { display: grid; gap: 12px; align-content: start; }
.spacer { flex: 1; }

/* ── layout ─────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 16px 8px; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px; background: var(--bg);
}
.brand { display: flex; align-items: center; gap: 9px; padding: 4px 8px 22px; font-weight: 600; letter-spacing: -0.01em; font-size: 17px; }
.brand-mark { width: 24px; height: 24px; border-radius: 4px; background: var(--text); color: #fff; display: grid; place-items: center; font-size: 9px; font-weight: 800; letter-spacing: 0; }
.side-org { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
.side-org .av { width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.side-org b { display: block; font-weight: 600; font-size: 14px; }
.side-org span { color: var(--muted); font-size: 12px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius);
  text-decoration: none; color: #2b3445; font-weight: 500;
}
.nav a svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav a:hover { background: #f4f6f9; color: var(--text); }
.nav a.active { background: #e3e8ef; color: var(--text); font-weight: 600; }
.nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; padding: 10px; font-size: 12px; color: var(--faint); }
.side-goal { padding: 12px 10px; margin: 12px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); }
.side-goal .v { font-size: 18px; font-weight: 800; }

main { padding: 0 var(--pad-x) 80px; min-width: 0; }
.page-head { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin: 0 calc(-1 * var(--pad-x)) 24px; padding: 16px var(--pad-x); min-height: 66px; border-bottom: 1px solid var(--line); }
.page-head > .grow { flex: 1 1 280px; }
.page-head h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

/* ── surfaces ───────────────────────────────────────── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.card h2 { margin: 0 0 12px; font-size: 14px; color: var(--muted); font-weight: 500; }
.card h2 .row { display: inline-flex; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-4 .tile { padding: 12px; }
.grid-4 .tile .v { font-size: 19px; overflow-wrap: anywhere; }

.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.tile .k { color: var(--muted); font-size: 12px; font-weight: 600; }
.tile .v { font-size: 22px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile .s { color: var(--faint); font-size: 12px; margin-top: 2px; }
.tile.alert { border-color: rgba(255, 84, 104, 0.45); }
.tile.money .v { color: var(--accent); }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; padding: 22px 24px; position: relative; overflow: hidden; }
.hero::after {
  content: ''; position: absolute; inset: auto -10% -60% 40%; height: 220px;
  background: radial-gradient(closest-side, rgba(79, 70, 229, 0.07), transparent); pointer-events: none;
}
.hero .label { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; }
.hero .big { font-size: clamp(44px, 7vw, 76px); font-weight: 900; letter-spacing: -0.03em; line-height: 1; margin: 8px 0 14px; font-variant-numeric: tabular-nums; }
.hero .big small { font-size: 0.32em; color: var(--muted); font-weight: 700; letter-spacing: 0; margin-left: 8px; }
.progress { height: 12px; border-radius: 99px; background: var(--panel-2); overflow: hidden; position: relative; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width 0.6s ease; }
.progress.thin { height: 6px; }
.progress .pace { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: 0.55; }
.hero-side { display: grid; gap: 10px; text-align: right; min-width: 170px; }
.hero-side .k { color: var(--muted); font-size: 12px; }
.hero-side .v { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* main earnings / views panel: flat on the page, like the reference */
.goal-banner {
  display: flex; align-items: center; gap: 14px; margin: -24px calc(-1 * var(--pad-x)) 28px; padding: 16px var(--pad-x);
  background: linear-gradient(90deg, #fde68a, #fef3c7 55%, #fffbeb); border-bottom: 1px solid #f6e3a8;
}
.goal-banner .ic { width: 38px; height: 38px; border-radius: var(--radius); background: #16181d; display: grid; place-items: center; font-size: 19px; flex: none; }
.goal-banner b { display: block; font-weight: 600; }
.goal-banner span { color: #4a5365; font-size: 13px; }
.ep { min-width: 0; }
.ep-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.ep-label { display: flex; align-items: center; gap: 2px; }
.ep-label button { background: none; border: 0; padding: 0 10px 0 0; cursor: pointer; color: var(--faint); font-weight: 500; font-size: 14px; }
.ep-label button.on { color: #2b3445; }
.ep-label button:hover { color: var(--text); }
.ep-info { width: 15px; height: 15px; border: 1.4px solid #2b3445; border-radius: 50%; color: #2b3445; font: 600 9.5px/12.5px var(--sans); text-align: center; cursor: help; }
.ep-total-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.ep-total { font-size: clamp(28px, 3.4vw, 34px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.ep-delta { padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.ep-delta.up { background: #e8f8ee; color: var(--good); }
.ep-delta.down { background: #fdecec; color: var(--bad); }
.ep-vs { margin-top: 12px; color: var(--muted); font-size: 14px; }
.ep-range-wrap { position: relative; }
.ep-range button { min-width: 40px; }
.ep-custom { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; width: min(340px, calc(100vw - 48px)); background: #fff; box-shadow: 0 16px 40px rgba(15, 23, 41, 0.14); }
.ep-plot { position: relative; height: clamp(220px, 28vw, 330px); touch-action: pan-y; cursor: crosshair; border-left: 1px solid var(--line); }
.ep-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.ep-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ep-base { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ep-area { fill: #eef0fc; stroke: none; }
.ep-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ep-line-prev { fill: none; stroke: var(--accent); stroke-opacity: 0.22; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ep-dot-prev { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: #c7cbf6; pointer-events: none; }
.ep-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); box-shadow: 0 0 0 5px rgba(79, 70, 229, 0.2); pointer-events: none; z-index: 2; }
.ep-tip { position: absolute; transform: translate(-50%, calc(-100% - 16px)); padding: 10px 12px; background: #fff; border: 1px solid #eceef2; border-radius: var(--radius); text-align: center; white-space: nowrap; pointer-events: none; box-shadow: 0 2px 8px rgba(15, 23, 41, 0.04); z-index: 5; font-size: 14px; line-height: 1.35; color: #1f2737; }
.ep-tip b { display: block; margin-top: 2px; color: var(--text); font-weight: 700; }
.ep-tip .small { color: var(--muted); }
.ep-stats { display: grid; grid-template-columns: repeat(6, 1fr); margin-top: 36px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ep-stats > div { padding: 0 22px; border-left: 1px solid var(--line); min-width: 0; }
.ep-stats > div:first-child { padding-left: 0; border-left: 0; }
.ep-stats .k { color: #4a5365; font-size: 14px; }
.ep-stats .v { margin-top: 8px; font-size: 18px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-videos { margin-top: 28px; }
.tv-head { color: #4a5365; font-size: 14px; margin-bottom: 4px; }
.tv-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.tv-row:hover .tv-name { color: var(--accent); }
.tv-name { flex: 1; min-width: 0; color: var(--text); }
.tv-total { color: var(--muted); font-size: 13px; white-space: nowrap; }
.tv-gain { color: var(--good); font-weight: 600; min-width: 56px; text-align: right; }
.ep-axis { display: flex; justify-content: space-between; margin-top: 12px; color: #2b3445; font-size: 14px; }

/* chart */
.chart { width: 100%; height: 220px; display: block; }
.chart .bar { fill: #e2e5ec; }
.chart .bar.hit { fill: var(--accent); }
.chart .bar.today { fill: #818cf8; }
.chart .goal { stroke: var(--accent); stroke-dasharray: 4 4; stroke-width: 1; opacity: 0.6; }
.chart text { fill: var(--faint); font-size: 12px; font-family: var(--sans); }
.chart .tip { fill: var(--text); font-weight: 700; }
.chart .goal-label { fill: var(--accent); font-weight: 700; stroke: var(--panel); stroke-width: 4px; paint-order: stroke; }
.chart-wrap { overflow-x: auto; }

.split-bars { display: grid; gap: 12px; }
.split-bars .line { display: grid; grid-template-columns: 90px 1fr 76px; gap: 10px; align-items: center; }

/* ── platform & status chips ────────────────────────── */
.pf { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.pf::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pf.tiktok { color: var(--tiktok); }
.pf.instagram { color: var(--instagram); }
.pf.youtube { color: var(--youtube); }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700;
  border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.04em;
}
.chip.good { color: var(--good); border-color: rgba(61, 220, 132, 0.35); }
.chip.warn { color: var(--warn); border-color: rgba(255, 176, 32, 0.35); }
.chip.bad { color: var(--bad); border-color: rgba(255, 84, 104, 0.4); }
.chip.live { color: var(--accent); border-color: rgba(79, 70, 229, 0.3); }
.chip.info { color: #2563eb; border-color: rgba(37, 99, 235, 0.3); }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; }
.badge.accent { background: var(--accent); color: var(--accent-ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--faint); }
.dot.good { background: var(--good); } .dot.bad { background: var(--bad); } .dot.warn { background: var(--warn); }
.spin { width: 10px; height: 10px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── tables & lists ─────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
tbody tr:hover td { background: #f8f9fb; }
.cell-title { max-width: 340px; }
.cell-title .t { font-weight: 600; }
.cell-title .c { color: var(--muted); font-size: 12px; }
.err { color: var(--bad); font-size: 12px; max-width: 420px; }
.note { color: var(--warn); font-size: 12px; max-width: 420px; }

.list { display: grid; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { overflow-wrap: anywhere; }
.rank { width: 22px; color: var(--faint); font-weight: 800; font-variant-numeric: tabular-nums; }
.gain { color: var(--good); font-weight: 600; font-variant-numeric: tabular-nums; }

.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--panel-2); object-fit: cover; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--muted); border: 1px solid var(--line-2); }

.empty { padding: 30px 10px; text-align: center; color: var(--muted); }
.empty b { color: var(--text); display: block; margin-bottom: 4px; font-size: 15px; }

/* ── forms ──────────────────────────────────────────── */
label.field { display: grid; gap: 6px; font-weight: 600; font-size: 13px; }
label.field > span { color: var(--muted); }
label.field .hint { font-weight: 400; color: var(--faint); font-size: 12px; }
input[type=text], input[type=password], input[type=number], input[type=url], input[type=datetime-local], input[type=date], input[type=search], select, textarea {
  width: 100%; background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 9px 11px; outline: none;
}
textarea { resize: vertical; min-height: 92px; }
input:focus, select:focus, textarea:focus { border-color: #a5b4fc; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--panel-2); border-radius: var(--radius); }
.seg button { background: transparent; border: 0; padding: 5px 11px; border-radius: var(--radius-sm); cursor: pointer; color: #4a5365; font-weight: 500; }
.seg button:hover { color: var(--text); }
.seg button.on { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(15, 23, 41, 0.08), 0 0 0 1px rgba(15, 23, 41, 0.04); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: #fff; cursor: pointer; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: #aab1bd; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--panel-2); }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn.lg { padding: 12px 20px; font-size: 15px; }
.btn.block { width: 100%; }

.drop {
  border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 34px 18px; text-align: center; cursor: pointer;
  transition: border-color 0.15s, background 0.15s; background: #fafbfc;
}
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(79, 70, 229, 0.04); }
.drop .big { font-size: 16px; font-weight: 800; }
.file-card { display: flex; gap: 14px; align-items: center; }
.file-card video { width: 92px; height: 164px; object-fit: cover; border-radius: var(--radius-sm); background: #000; flex: none; }

.acct-group { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.acct-group-head { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--panel-2); }
.acct-opt { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); cursor: pointer; }
.acct-opt:hover { background: #f8f9fb; }
.acct-opt.disabled { opacity: 0.45; cursor: not-allowed; }

.cmd {
  display: flex; align-items: center; gap: 8px; background: #f8f9fb; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 6px 6px 6px 10px; font-family: var(--mono); font-size: 12px; min-width: 0;
}
.cmd code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

pre.code { background: #f8f9fb; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; overflow-x: auto; font: 12px/1.5 var(--mono); color: #334155; margin: 0; }

/* ── dialog / toast ─────────────────────────────────── */
dialog {
  background: var(--panel); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px);
}
dialog::backdrop { background: rgba(15, 23, 41, 0.3); backdrop-filter: blur(2px); }
dialog form { display: grid; gap: 14px; padding: 20px; }
dialog h3 { margin: 0; font-size: 17px; }
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 50; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: #fff; border: 1px solid var(--line-2); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 10px 14px; box-shadow: 0 10px 30px rgba(15, 23, 41, 0.12); animation: pop 0.18s ease-out; }
.toast.bad { border-left-color: var(--bad); }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } }

.banner { border: 1px solid #f6d58a; background: #fffbeb; border-radius: var(--radius-sm); padding: 10px 14px; color: #8a4b08; }
.banner.bad { border-color: #f5b5b5; background: #fef2f2; color: #991b1b; }
.banner.good { border-color: #a7e3bd; background: #f0fdf4; color: #166534; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 8px 12px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--text); border-bottom-color: var(--accent); }

.checklist { display: grid; gap: 10px; }
.check-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.check-item .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 900; flex: none; background: var(--panel-2); color: var(--faint); }
.check-item .ic.ok { background: #dcfce7; color: var(--good); }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: min(380px, 100%); padding: 28px; }
.login h1 { margin: 0 0 6px; font-size: 22px; }

/* ── responsive ─────────────────────────────────────── */
@media (max-width: 1080px) {
  .split, .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side {
    position: fixed; inset: auto 0 0 0; height: auto; flex-direction: row; padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    border-right: 0; border-top: 1px solid var(--line); z-index: 20; overflow-x: auto; gap: 2px;
  }
  .brand, .side-foot, .side-goal, .side-org { display: none; }
  .nav { display: contents; }
  .nav a { position: relative; flex: 1 1 0; min-width: 48px; flex-direction: column; gap: 2px; font-size: 9.5px; padding: 6px 2px; justify-content: center; text-align: center; }
  .nav a span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .side { background: #fff; }
  .nav a.active { box-shadow: inset 0 2px 0 var(--accent); }
  .nav .badge { position: absolute; top: 1px; left: 50%; margin: 0 0 0 4px; height: 16px; min-width: 16px; font-size: 10px; padding: 0 4px; }
  .sub-item { flex-wrap: wrap; }
  .sub-item > .stack:last-child { grid-auto-flow: column; justify-content: start; align-items: center; width: 100%; }
  .card > .row > h2.grow { flex-basis: 100%; }
  main { padding-bottom: 110px; }
  .ep-stats { grid-template-columns: repeat(2, 1fr); row-gap: 18px; padding: 18px 0; }
  .ep-stats > div:nth-child(2n + 1) { padding-left: 0; border-left: 0; }
  .page-head { padding: 12px var(--pad-x); min-height: 0; }
  .goal-banner { padding: 12px var(--pad-x); }
  .tv-total { display: none; }
  .ep-range-wrap { width: 100%; }
  .ep-range { display: flex; }
  .ep-range button { flex: 1; min-width: 0; padding: 7px 6px; }
  .ep-custom { left: 0; right: auto; }
  .hero { grid-template-columns: 1fr; }
  .hero-side { text-align: left; grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .split-bars .line { grid-template-columns: 76px 1fr 56px; }
}
.seg button { white-space: nowrap; }
@media (max-width: 760px) {
  #ov-platform { width: 100%; }
  #ov-platform button { flex: 1; padding: 5px 4px; }
}
.ep-change { font-size: 13px; font-weight: 500; margin-left: 4px; }
.ep-change.up { color: var(--good); }
.ep-change.down { color: var(--bad); }
.ep-tip.below { transform: translate(-50%, 16px); }
/* account switcher in the sidebar */
.scope { position: relative; margin-bottom: 14px; }
button.side-org { width: 100%; padding: 8px; border: 0; border-radius: var(--radius); background: none; cursor: pointer; text-align: left; color: var(--text); }
button.side-org:hover, button.side-org[aria-expanded="true"] { background: #f4f6f9; }
.side-org .grow { min-width: 0; }
.side-org b, .scope-item b { display: block; }
.side-org svg, .scope-item svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.scope-menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(15, 23, 41, 0.12); max-height: 60vh; overflow-y: auto; }
.scope-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: var(--radius-sm); background: none; cursor: pointer; text-align: left; color: var(--text); }
.scope-item:hover { background: #f4f6f9; }
.scope-item .av { width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 600; flex: none; }
.scope-item b { font-weight: 500; font-size: 14px; }
.scope-item span { color: var(--muted); font-size: 12px; }
.scope-item.on svg { stroke: var(--accent); }
.scope-sep { height: 1px; background: var(--line); margin: 4px 2px; }
.only-phone { display: none; }
@media (max-width: 760px) {
  .scope { display: none; }
  select.only-phone { display: block; width: 100%; }
}
