/* @repo/admin — one stylesheet. Inter is self-hosted (assets/fonts, OFL); no request leaves the origin. */
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-400.woff2) format('woff2'); }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/inter-500.woff2) format('woff2'); }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-600.woff2) format('woff2'); }
@font-face { font-family: Inter; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/inter-700.woff2) format('woff2'); }

:root {
  --page: #ededf0;
  --frame: #fff;
  --main: #f8f8f8;
  --card: #fff;
  --line: #eceef5;
  --rule: #e0e0e0;
  --ink: #111;
  --text: #333;
  --muted: #5c5c5c;
  --faint: #767676; /* the lightest grey that still passes 4.5:1 on white */
  --blue: #1b59f8;
  --pill: #e8eefe;
  --bar: #477bf9;
  --track: #f2f7ff;
  --weak-a: #ffad28; --weak-b: #ff7058; --weak-t: #ffe4dc;
  --strong-a: #80de54; --strong-b: #2fe99b; --strong-t: #d5fbea;
  --up: #12c47c; --down: #ff3e13;
  --brand: #9b5cff;
  --focus: #1b59f8;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(17, 24, 39, .03), 0 6px 18px -8px rgba(17, 24, 39, .06);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 400 14px/1.4 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'cv11', 'ss01'; -webkit-font-smoothing: antialiased;
}
h1, h2, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* ── Frame: white panel, sidebar, grey main ─────────────────────────────────────────────────── */
.frame {
  display: grid; grid-template-columns: 236px minmax(0, 1fr);
  min-height: calc(100vh - 48px); margin: 24px; padding: 14px 14px 14px 0;
  background: var(--frame); border-radius: 32px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .02), 0 20px 50px -30px rgba(0, 0, 0, .12);
}
.side { display: flex; flex-direction: column; padding: 28px 22px 20px 30px; }
.side-top { display: flex; align-items: center; justify-content: space-between; }
.logo { display: inline-flex; text-decoration: none; padding-left: 10px; }
.wordmark { font-weight: 800; font-size: 25px; letter-spacing: -.035em; line-height: 1; color: var(--ink); }
.wordmark b { font-weight: 800; color: var(--brand); }
.menu-btn { display: none; }
.side-nav { display: flex; flex-direction: column; flex: 1; margin-top: 42px; }
.nav { display: grid; gap: 10px; }
.nav-item {
  display: flex; align-items: center; gap: 14px; height: 42px; padding: 0 14px;
  border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 500; font-size: 14px;
}
.nav-item .ic { width: 22px; height: 22px; flex: none; color: #3a3a3a; }
.nav-item:hover { background: #f4f6fb; }
.nav-item.is-active { background: var(--pill); color: var(--blue); }
.nav-item.is-active .ic { color: var(--blue); }
.nav-heading { margin: 52px 14px 16px; font-size: 15px; font-weight: 500; color: var(--muted); }
.side-user { margin-top: auto; padding: 18px 14px 0; border-top: 1px solid var(--rule); display: grid; gap: 8px; }
.who { display: grid; gap: 2px; font-size: 12px; }
.who-email { color: var(--text); overflow-wrap: anywhere; }
.who-role { color: var(--faint); text-transform: capitalize; }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue); font-size: 13px; font-weight: 500; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

.main { background: var(--main); border-radius: 24px; padding: 34px 44px 48px 34px; min-width: 0; }
.main:focus { outline: none; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 32px; border-bottom: 1px solid var(--rule); }
.head h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.head-actions { display: flex; gap: 18px; align-items: center; }
.action { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: #222; text-decoration: none; background: none; border: 0; padding: 4px 2px; cursor: pointer; }
.action .ic { width: 15px; height: 15px; }
.action:hover { color: var(--blue); }

/* ── Filters ───────────────────────────────────────────────────────────────────────────────── */
.filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 28px 0 20px; }
.dd {
  position: relative; display: flex; align-items: center; height: 44px; padding: 0 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.dd label { font-size: 15px; color: var(--text); white-space: nowrap; padding-right: 4px; }
.dd select {
  flex: 1; min-width: 0; appearance: none; -webkit-appearance: none; border: 0; background: transparent;
  font-size: 15px; font-weight: 500; color: var(--ink); height: 100%; padding: 0 22px 0 0; cursor: pointer;
  text-overflow: ellipsis;
}
.dd select:focus { outline: none; }
.dd:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.dd .caret { position: absolute; right: 16px; width: 9px; height: 6px; pointer-events: none; color: #111; }
.filters noscript, .filters .apply { grid-column: 1 / -1; }

/* ── Cards ─────────────────────────────────────────────────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-head h2 { font-size: 13px; font-weight: 400; color: var(--text); display: flex; align-items: center; gap: 4px; }

.top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); gap: 22px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 14px; }
.stat { padding: 18px 15px 16px; min-height: 140px; display: flex; flex-direction: column; }
.big { margin-top: 24px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); font-variant-numeric: tabular-nums; }
.big .of { font-size: 17px; font-weight: 500; color: var(--faint); }
.spark-card .big { margin-top: 20px; }
.spark { display: block; width: calc(100% - 10px); height: 30px; margin: 10px 0 0 6px; }
.spark-empty { margin-top: 14px; font-size: 11px; color: var(--faint); }

.chart { padding: 14px 16px 12px; display: flex; flex-direction: column; }
.chart .card-head { padding: 0 2px 10px; border-bottom: 1px solid var(--rule); margin-bottom: 14px; }
.seg { display: inline-flex; align-items: center; gap: 4px; }
.seg select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; font-size: 11.5px; font-weight: 600; color: #1d2b4f; cursor: pointer; padding: 2px 14px 2px 4px; }
.seg { position: relative; }
.seg .chev { position: absolute; right: 2px; width: 9px; height: 6px; pointer-events: none; color: #1d2b4f; }
.bars-wrap { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: start; padding-right: 4px; }
.bars { display: block; width: 100%; overflow: visible; }
.bars .track { fill: var(--track); }
.bars-wrap text { font-size: 9px; fill: #555; font-family: Inter, system-ui, sans-serif; }
.bars-wrap text.x { font-size: 8px; fill: #666; letter-spacing: .02em; text-transform: uppercase; }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 18px; }
.list-card { padding: 24px 22px 26px; }
.list-card .card-head h2 { font-size: 13.5px; font-weight: 500; color: var(--muted); }

.topics { display: grid; gap: 22px; margin-top: 22px; }
.topic { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; column-gap: 15px; align-items: end; }
.thumb { width: 48px; height: 32px; border-radius: 6px; object-fit: cover; align-self: center; background: #eef0f5; }
.tile { display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; }
.topic-body { display: grid; gap: 8px; min-width: 0; }
.topic-name { font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter { display: block; height: 7px; border-radius: 99px; overflow: hidden; }
.meter .fill { display: block; height: 100%; border-radius: 99px; }
.meter.weak { background: var(--weak-t); }
.meter.weak .fill { background: linear-gradient(90deg, var(--weak-a), var(--weak-b)); }
.meter.strong { background: var(--strong-t); }
.meter.strong .fill { background: linear-gradient(90deg, var(--strong-a), var(--strong-b)); }
.topic-pct { font-size: 13px; color: var(--faint); white-space: nowrap; line-height: 1; padding-left: 4px; transform: translateY(2px); }
.topic-pct b { font-weight: 500; color: var(--text); }

.leaders { display: grid; gap: 22px; margin-top: 30px; }
.leader { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; column-gap: 12px; align-items: center; }
.leader.no-avatar { grid-template-columns: minmax(0, 1fr) auto; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 14px; }
.leader-name { display: block; font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader-sub { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.rank { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--ink); padding-right: 14px; font-variant-numeric: tabular-nums; }
.move { display: inline-flex; width: 12px; justify-content: center; }
.tri { width: 12px; height: 10px; }
.move.up { color: var(--up); }
.move.down { color: var(--down); }
.move.same { color: var(--faint); }

/* Category tiles and avatars: fixed colours, white text at ≥ 4.5:1. */
.tile-0, .av-0 { background: #6d4ae0; } .tile-1, .av-1 { background: #c2410c; } .tile-2, .av-2 { background: #0f766e; }
.tile-3, .av-3 { background: #1d4ed8; } .tile-4, .av-4 { background: #b91c1c; } .tile-5, .av-5 { background: #7e22ce; }
.tile-6, .av-6 { background: #15803d; } .tile-7, .av-7 { background: #a16207; } .tile-8, .av-8 { background: #be185d; }

/* ── Info tooltip ──────────────────────────────────────────────────────────────────────────── */
.tipwrap { position: relative; display: inline-flex; }
.info { display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; background: none; color: #555; cursor: help; border-radius: 50%; }
.info svg { width: 13px; height: 13px; }
.tip {
  position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); z-index: 20;
  width: max-content; max-width: 280px; padding: 9px 11px; border-radius: 10px;
  background: #111; color: #fff; font-size: 12px; font-weight: 400; line-height: 1.45; text-align: left;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .35); visibility: hidden; opacity: 0; transition: opacity .12s;
}
.tipwrap:hover .tip, .info:focus-visible + .tip, .info:focus + .tip { visibility: visible; opacity: 1; }

/* ── Empty / tables / notices ──────────────────────────────────────────────────────────────── */
.empty { padding: 26px 4px 8px; }
.empty-title { font-weight: 600; font-size: 13px; color: var(--text); }
.empty-body { margin-top: 4px; font-size: 12.5px; color: var(--faint); max-width: 46ch; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table caption { text-align: left; font-weight: 600; padding: 0 0 10px; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--rule); }
.table td { padding: 10px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.notice { padding: 10px 12px; border-radius: 10px; font-size: 13px; margin: 0 0 16px; }
.notice.error { background: #fff1ef; color: #9f1d0a; }
.notice.ok { background: #ecfdf3; color: #065f46; }
.foot { margin-top: 26px; font-size: 12px; color: var(--faint); }

/* ── Panels and forms (Settings, placeholders, auth) ───────────────────────────────────────── */
.panels { display: grid; gap: 20px; margin-top: 28px; max-width: 980px; }
.panel { padding: 24px; }
.panel h2 { font-size: 13.5px; font-weight: 500; color: var(--muted); margin-bottom: 6px; } /* the design's card title (Weakest Topics) */
.panel .lede { color: var(--muted); font-size: 13px; margin-bottom: 18px; max-width: 70ch; }
.form { display: grid; gap: 14px; max-width: 420px; }
.form.inline { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; max-width: none; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--text); }
.field input, .field select {
  height: 42px; padding: 0 12px; border: 1px solid #d9dbe3; border-radius: 10px; background: #fff; font-size: 14px; min-width: 0;
}
.field input:focus, .field select:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.hint { font-size: 12px; color: var(--faint); }
.btn { height: 42px; padding: 0 18px; border-radius: 10px; border: 0; background: var(--blue); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.btn:hover { background: #1449d6; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid #d9dbe3; }
.btn.small { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn.danger { background: #fff; color: #b42318; border: 1px solid #f3c1bb; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions form { display: inline; }
.codes { display: grid; grid-template-columns: repeat(2, max-content); gap: 8px 28px; font: 600 15px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; margin: 12px 0 18px; padding: 16px 18px; background: #f6f7fb; border-radius: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row input { flex: 1; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 500; background: #f0f1f5; color: var(--text); text-transform: capitalize; }
.badge.on { background: #e7f8ef; color: #0b6b43; }
.badge.off { background: #fff1ef; color: #9f1d0a; }

.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 24px; padding: 36px 32px 32px; box-shadow: 0 20px 50px -30px rgba(0, 0, 0, .2); }
.auth-logo { padding: 0; margin-bottom: 26px; }
.auth-card h1 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.auth-card .lede { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }
.auth-card .form { max-width: none; }
.auth-card .btn { width: 100%; }
.qr { display: block; width: 196px; height: 196px; margin: 4px auto 14px; border-radius: 8px; }
.secret { text-align: center; font-size: 13px; letter-spacing: .08em; margin-bottom: 16px; }
.alt { margin-top: 16px; font-size: 13px; color: var(--muted); }
.alt a { color: var(--blue); }

.placeholder { margin-top: 28px; }
.placeholder .panel { max-width: 640px; }

/* ── Responsive ────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1360px) {
  .top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .frame { grid-template-columns: 210px minmax(0, 1fr); }
  .main { padding: 28px 24px 40px; }
}
@media (max-width: 900px) {
  .frame { display: block; margin: 0; padding: 0; border-radius: 0; min-height: 100vh; }
  .side { padding: 14px 16px; position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid var(--rule); }
  .logo { padding-left: 0; }
  .menu-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--rule); border-radius: 10px; background: #fff; cursor: pointer; }
  .menu-btn .ic { width: 20px; height: 20px; }
  .side-nav { display: none; margin-top: 14px; }
  .side.is-open .side-nav { display: flex; }
  .nav-heading { margin-top: 20px; }
  .side-user { margin-top: 18px; }
  .main { border-radius: 0; padding: 22px 16px 40px; }
  .filters { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
  .codes { grid-template-columns: max-content; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.panel-sub { margin: 26px 0 12px; }
a.btn { display: inline-grid; place-items: center; text-decoration: none; }
.panel .table { margin-top: 6px; }
.panel .form.inline + .form.inline { margin-top: 14px; }
.tip-label { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: help; border-radius: 4px; }
.tip-label:hover, .tip-label:focus-visible { text-decoration: underline dotted; text-underline-offset: 3px; }
.tipwrap:hover .tip, .tip-label:focus-visible + .tip, .tip-label:focus + .tip { visibility: visible; opacity: 1; }
/* Stat titles stay on one line, as in the design: 12.5px, tighter padding, a 14px ⓘ. */
.stat { padding: 18px 13px 16px 14px; }
.stat .card-head h2 { font-size: 12.5px; white-space: nowrap; }
.stat .info { width: 15px; height: 15px; }
.stats { gap: 13px; }

/* ── Tabs, pager, facts, confirm dialog, chips (list/detail pages) ─────────────────────────── */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0 0; }
.tab { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 10px; font-size: 14px; font-weight: 500; color: #222; text-decoration: none; }
.tab:hover { background: #f2f3f7; }
.tab.is-active { background: var(--pill); color: var(--blue); }
.tab-count { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tab.is-active .tab-count { color: var(--blue); }
.pager { display: flex; align-items: center; gap: 12px; justify-content: flex-end; margin-top: 16px; }
.pager-at { font-size: 13px; color: var(--muted); }
.act-form { display: inline; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px 24px; margin: 0; }
.facts div { min-width: 0; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 500; background: var(--pill); color: var(--blue); }
.chip.plain { background: #f0f1f5; color: var(--text); }
.search { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 24px 0 8px; padding: 16px; }
.search .field { flex: 1 1 160px; }
.search .field.wide { flex: 3 1 260px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; border: 0; padding: 0; margin: 0 0 14px; }
.checks legend { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 8px; padding: 0; }
.checks label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table a { color: var(--ink); text-decoration: none; font-weight: 500; }
.table a:hover { color: var(--blue); }
.muted { color: var(--faint); }
.clip { max-width: 46ch; overflow-wrap: anywhere; }
dialog.confirm { border: 0; border-radius: 16px; padding: 24px; max-width: 420px; width: calc(100% - 32px); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .35); }
dialog.confirm::backdrop { background: rgba(17, 17, 17, .35); }
dialog.confirm p { font-size: 14px; line-height: 1.5; margin-bottom: 20px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
.scroll-x { overflow-x: auto; }
.stats.stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 28px; }
.panels.wide { max-width: none; }
.panels .grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.opts { margin: 0; padding-left: 18px; list-style: decimal; font-size: 12.5px; }
.opts li.ok { color: #0b6b43; font-weight: 600; }
.table .thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.form .wide-field, .form.inline .wide-field { flex: 1 1 320px; }
.steps { display: grid; gap: 10px; font-size: 14px; line-height: 1.55; color: var(--text); }
ol.steps { list-style: decimal; padding-left: 20px; }
ul.steps { list-style: disc; padding-left: 20px; }
.steps a, .guide .hint a { color: var(--blue); }
.guide .hint { margin-top: 14px; }
@media (max-width: 1100px) { .stats.stats-4, .panels .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats.stats-4, .panels .grid2 { grid-template-columns: 1fr; } }
/* ── People / Growth pages: built from the same card, rule and type tokens ────────────────── */
.stats.stats-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 6px; }
.stats.stats-6 .stat { min-height: 120px; }
.wide-panel { margin-top: 18px; }
.wide-panel .card-head h2, .list-card .card-head h2 { margin-bottom: 14px; }
.filters.filters-1 { grid-template-columns: minmax(0, 340px); }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); }
.search .check { height: 42px; }
.decide summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; height: 32px; }
.decide summary::-webkit-details-marker { display: none; }
.decide[open] summary { margin-bottom: 10px; }
.decide-form { min-width: 230px; gap: 10px; }
.decide-form .field input, .decide-form .field select { height: 36px; font-size: 13px; }
.crumb { margin: 24px 0 0; font-size: 13px; }
.crumb a { color: var(--blue); text-decoration: none; font-weight: 500; }
.person-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.funnel-bar { width: 220px; }
.table .hint { display: block; margin-top: 2px; }
@media (max-width: 1100px) { .stats.stats-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats.stats-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .funnel-bar { width: 120px; } }
/* Pale-blue pill actions (the nav's active state), the dd filter pill holding a text/date input, the sheet card. */
.btn.soft { background: var(--pill); color: var(--blue); border: 0; border-radius: 10px; }
.btn.soft:hover { background: #d9e4fd; }
.btn.soft-danger { background: #fff1ef; color: #9f1d0a; border: 0; border-radius: 10px; }
.btn.soft-danger:hover { background: #ffe4dc; }
.dd input { flex: 1; min-width: 0; border: 0; background: transparent; font: 500 15px Inter, system-ui, sans-serif; color: var(--ink); height: 100%; padding: 0; }
.dd input::placeholder { color: var(--faint); font-weight: 400; }
.dd input:focus { outline: none; }
.filters .apply-inline { height: 44px; border-radius: 14px; }
.filters.filters-1 { grid-template-columns: minmax(0, 1fr); }
.sheet { padding: 18px 20px 20px; }
.sheet .card-head { padding-bottom: 12px; }
.sheet > h2:not(.title) { font-size: 13px; font-weight: 400; color: var(--text); margin-bottom: 4px; }
.sheet h2.title { font-size: 16px; font-weight: 600; color: var(--ink); }
.sheet .lede { font-size: 12px; color: var(--faint); margin-bottom: 12px; }
.sheet .table th { font-weight: 400; color: var(--muted); }
.action.back { margin-top: 4px; }
.checks input { accent-color: var(--blue); }
.panels + .list-card, .grid2 > .list-card { min-width: 0; }
.sheet .card-head h2:not(.title) { font-size: 13px; font-weight: 400; color: var(--text); }
.sheet h2.title { margin-bottom: 10px; }
.sheet .facts + .hint, .sheet .lede + .facts { margin-top: 14px; }
.sheet .facts + .hint { display: block; }
.facts a { color: var(--ink); text-decoration: none; font-weight: 500; }
.facts a:hover { color: var(--blue); }

/* ── Wide panels, rule/edit forms, command blocks (Ads, Releases, Settings sections) ─────────── */
.panels.wide { max-width: none; }
.stats.five { grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0 0 18px; }
.stats.five .stat { min-height: 120px; }
.hits { display: grid; gap: 6px; margin: 14px 0 4px; font-size: 13px; }
.hits a { color: var(--blue); text-decoration: none; font-weight: 500; }
.hits a:hover { text-decoration: underline; }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 22px; margin: 4px 0 18px; }
h3.panel-sub { font-size: 13px; font-weight: 600; color: var(--ink); margin: 22px 0 10px; }
.cmd { margin: 0 0 12px; padding: 14px 16px; background: var(--track); border: 1px solid var(--line); border-radius: 12px; font: 12.5px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); overflow-x: auto; white-space: pre; }
.inline-edit { display: inline-block; }
.inline-edit > summary { list-style: none; display: inline-grid; place-items: center; }
.inline-edit > summary::-webkit-details-marker { display: none; }
.inline-edit[open] { display: block; flex-basis: 100%; }
.inline-edit[open] > form { margin-top: 10px; }
.events { display: grid; gap: 4px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.table details > summary { cursor: pointer; color: var(--blue); font-size: 12.5px; font-weight: 500; }
.grid2.channels { margin-top: 0; }
@media (max-width: 1360px) { .stats.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .stats.five { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.steps a, .guide .hint a { text-decoration: none; font-weight: 500; }
/* Section cards on list pages title like the design's cards: small grey, not the Settings form heading. */
.panel.wide-panel > h2, .person-title h2 + .lede { font-size: 13.5px; font-weight: 500; color: var(--muted); }
.panel.wide-panel > .lede { font-size: 12.5px; color: var(--faint); }
.person-title h2 { font-size: 15px; font-weight: 600; color: var(--ink); }
.who-cell { display: flex; align-items: center; gap: 10px; }
.table .avatar { width: 32px; height: 32px; font-size: 12px; flex: none; }
.table .form.inline { flex-wrap: nowrap; }
.table .form.inline input[type=number] { width: 96px; }
.tabs + .tabs { margin-top: -6px; }
.tabs + .search, .tabs + .filters { margin-top: 8px; }
/* Row actions inside a table: the design's pale-blue pill, not a solid button per row. */
.table .btn.small:not(.ghost):not(.danger) { background: var(--pill); color: var(--blue); }
.table .btn.small:not(.ghost):not(.danger):hover { background: #d9e4fd; }
.panel .lede a, .facts a { color: var(--blue); text-decoration: none; font-weight: 500; }
.panel .lede a:hover, .facts a:hover { text-decoration: underline; }

/* ── Observability: stat grids, code blocks, timeline marks, entry lists ───────────────────── */
.stats.obs-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 4px; }
.stats.obs-stats .stat { min-height: 120px; }
.panels.wide { max-width: none; margin-top: 18px; }
.grid2 + .panels.wide { margin-top: 22px; }
.obs-crumb { margin: 4px 0 16px; color: var(--muted); font-size: 13px; }
.obs-crumb a { color: var(--blue); text-decoration: none; font-weight: 500; }
.obs-msg { font-size: 13px; font-weight: 600; color: var(--ink); margin: 16px 0 8px; overflow-wrap: anywhere; }
.obs-pre { margin: 0 0 8px; padding: 14px 16px; background: #f6f7fb; border-radius: 12px; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; }
.obs-h3 { font-size: 13px; font-weight: 600; color: var(--text); margin: 18px 0 4px; }
.bars .mark { fill: var(--down); }
.entries { margin-top: 18px; gap: 18px; }
.entries .leader-name a { color: inherit; text-decoration: none; }
.entries .leader-name a:hover { color: var(--blue); }
.entries .leader-name { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.entries .leader-sub a { color: var(--blue); text-decoration: none; }
.entry-side { font-size: 12.5px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.list-card .card-head .action { font-size: 12.5px; }
@media (max-width: 1100px) { .stats.obs-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* A filter row whose last item is the Search button: everything on one line, the button sized to its text. */
.filters.with-btn { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)) auto; }
.filters.with-btn .apply-inline { grid-column: auto; padding: 0 22px; }
@media (max-width: 900px) { .filters.with-btn { grid-template-columns: minmax(0, 1fr); } }
.filters.cols-1 { --cols: 1; }
.tabs + .tabs { margin-top: -8px; border-bottom: 0; }
.tabs + .tabs .tab { font-size: 13px; padding: 8px 12px; }
.obs-note { margin: 0 0 16px; }
.obs-test { align-items: center; margin-top: 14px; }
/* Stat card ▲/▼ against the previous period (statCard delta). */
.stat.has-delta .big { margin-top: 18px; }
.delta { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.delta.same { color: var(--faint); }
.delta .tri { width: 9px; height: 8px; }
.delta .vs { font-weight: 400; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Bubble map (map.ts). */
.map-wrap { position: relative; margin-top: 10px; }
.map { display: block; width: 100%; height: auto; max-height: 520px; }
.map .land { fill: #eef1f7; stroke: #fff; stroke-width: .6; }
.map .land.has-data { fill: #dde6fd; }
.map .land.faint { fill: #f5f6f9; }
.map.india .land { stroke: #c9d0e0; stroke-width: 1; }
.map .state { fill: #eef1f7; stroke: #fff; stroke-width: 1.2; }
.map .state:hover, .map .land:hover { fill: #e3e9f8; }
.map .bubble { fill: rgba(71, 123, 249, .32); stroke: #2f6bf6; stroke-width: 1.2; }
.map a:hover .bubble, .map a:focus .bubble { fill: rgba(71, 123, 249, .55); }
.map-empty { position: absolute; inset: 0; display: grid; place-items: center; }
.map-card .seg { margin-left: auto; }
.grid-map { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 22px; margin-top: 18px; }
@media (max-width: 1100px) { .grid-map { grid-template-columns: minmax(0, 1fr); } }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.map.india { width: auto; height: 520px; max-width: 100%; margin: 0 auto; }

/* ── versions & crash analytics (ui.ts: platformBadge, versionPill, crashFreeGauge, stackedBarChart, legend, shareList, timeline) ── */
.pbadge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: #f0f1f5; color: var(--text); }
.pbadge.p-ios { background: #eef1f6; color: #1f2937; }
.pbadge.p-android { background: #e7f8ef; color: #0b6b43; }
.pbadge.p-web { background: var(--pill); color: var(--blue); }
.vpill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px; background: #f4f6fb; color: var(--ink); font-size: 12.5px; text-decoration: none; white-space: nowrap; }
.vpill b { font-weight: 600; }
.vpill .build { color: var(--muted); }
.vpill .ota { padding: 0 6px; border-radius: 99px; background: #f3ebff; color: #6d28d9; font-size: 11px; font-weight: 600; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
a.vpill:hover { background: var(--pill); color: var(--blue); }
.gauge-card .gauge { display: flex; align-items: flex-end; gap: 12px; }
.gauge svg { width: 84px; height: 46px; flex: none; }
.gauge .g-track, .gauge .g-fill { fill: none; stroke-width: 8; stroke-linecap: round; }
.gauge .g-track { stroke: var(--track); }
.g-good .g-fill { stroke: var(--up); } .g-warn .g-fill { stroke: var(--weak-a); } .g-bad .g-fill { stroke: var(--down); } .g-none .g-fill { stroke: transparent; }
.gauge .big { margin: 0; }
.gauge-sub { margin-top: 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; padding: 0 2px; font-size: 12px; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.shares { display: grid; gap: 16px; margin-top: 6px; }
.share { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: end; }
.share-body { display: grid; gap: 7px; min-width: 0; }
.share-name { font-size: 13.5px; font-weight: 500; overflow-wrap: anywhere; }
.share-pct { font-size: 12.5px; color: var(--faint); white-space: nowrap; }
.share-pct b { color: var(--ink); font-weight: 500; }
.meter.blue { background: var(--track); }
.meter.blue .fill { background: linear-gradient(90deg, #6e97fa, var(--bar)); }
.timeline { display: grid; gap: 0; margin-top: 4px; }
.tl { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 0; position: relative; }
.tl + .tl::before { content: ''; position: absolute; left: 6px; top: -10px; height: 20px; border-left: 2px solid var(--line); }
.tl-dot { width: 10px; height: 10px; border-radius: 99px; background: var(--bar); margin: 4px 2px 0; }
.tl-ota .tl-dot { background: var(--brand); } .tl-store .tl-dot { background: var(--up); } .tl-embedded .tl-dot { background: var(--weak-a); } .tl-first .tl-dot { background: #8a9ab8; } .tl-bad .tl-dot { background: var(--down); }
.tl-title { font-size: 13.5px; font-weight: 500; }
.tl-at { font-size: 12px; color: var(--faint); white-space: nowrap; }
.flag { display: inline-block; padding: 1px 7px; border-radius: 99px; font-size: 11px; font-weight: 600; background: #fff1ef; color: #9f1d0a; margin-left: 6px; vertical-align: 1px; }
.flag.new { background: #f3ebff; color: #6d28d9; } .flag.hang { background: #fff6e6; color: #8a5300; } .flag.ok { background: #e7f8ef; color: #0b6b43; }
.rate-good { color: #0b6b43; font-weight: 600; } .rate-warn { color: #8a5300; font-weight: 600; } .rate-bad { color: #9f1d0a; font-weight: 600; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1100px) { .grid3 { grid-template-columns: minmax(0, 1fr); } }
.panel-gap { margin-top: 20px; }

.w0{width:0%}.w1{width:1%}.w2{width:2%}.w3{width:3%}.w4{width:4%}.w5{width:5%}.w6{width:6%}.w7{width:7%}.w8{width:8%}.w9{width:9%}.w10{width:10%}.w11{width:11%}.w12{width:12%}.w13{width:13%}.w14{width:14%}.w15{width:15%}.w16{width:16%}.w17{width:17%}.w18{width:18%}.w19{width:19%}.w20{width:20%}.w21{width:21%}.w22{width:22%}.w23{width:23%}.w24{width:24%}.w25{width:25%}.w26{width:26%}.w27{width:27%}.w28{width:28%}.w29{width:29%}.w30{width:30%}.w31{width:31%}.w32{width:32%}.w33{width:33%}.w34{width:34%}.w35{width:35%}.w36{width:36%}.w37{width:37%}.w38{width:38%}.w39{width:39%}.w40{width:40%}.w41{width:41%}.w42{width:42%}.w43{width:43%}.w44{width:44%}.w45{width:45%}.w46{width:46%}.w47{width:47%}.w48{width:48%}.w49{width:49%}.w50{width:50%}.w51{width:51%}.w52{width:52%}.w53{width:53%}.w54{width:54%}.w55{width:55%}.w56{width:56%}.w57{width:57%}.w58{width:58%}.w59{width:59%}.w60{width:60%}.w61{width:61%}.w62{width:62%}.w63{width:63%}.w64{width:64%}.w65{width:65%}.w66{width:66%}.w67{width:67%}.w68{width:68%}.w69{width:69%}.w70{width:70%}.w71{width:71%}.w72{width:72%}.w73{width:73%}.w74{width:74%}.w75{width:75%}.w76{width:76%}.w77{width:77%}.w78{width:78%}.w79{width:79%}.w80{width:80%}.w81{width:81%}.w82{width:82%}.w83{width:83%}.w84{width:84%}.w85{width:85%}.w86{width:86%}.w87{width:87%}.w88{width:88%}.w89{width:89%}.w90{width:90%}.w91{width:91%}.w92{width:92%}.w93{width:93%}.w94{width:94%}.w95{width:95%}.w96{width:96%}.w97{width:97%}.w98{width:98%}.w99{width:99%}.w100{width:100%}