/* Analytico workspace. Tokens mirror the Sketch foundations page. */
@font-face { font-family: "Quando"; src: url("/_/quando.fe2345d1be.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Quicksand"; src: url("/_/quicksand.22945b1f30.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
/* A local fallback shaped like Quando, so titles keep their line height while it loads. */
@font-face { font-family: "Quando fallback"; src: local("Georgia"), local("Times New Roman"), local("Liberation Serif"); ascent-override: 99.12%; descent-override: 25.88%; line-gap-override: 0%; }

:root {
  /* Sheets rise on the curve iOS sheets rise on, and drop on a smooth S, as
     from rest; app.js moves sheets and the page on the same two (RISE, DROP). */
  --sheet-ease: cubic-bezier(.32, .72, 0, 1);
  --sheet-drop: cubic-bezier(.45, 0, .2, 1);
  --canvas: #f7f5f4; --surface: #fff; --subtle: #f3efed; --border: #e9e4e1; --border-strong: #ddd5d1;
  --ink: #282421; --ink-2: #6f625d; --muted: #766a64;
  --brand: #d64937; --brand-dark: #b53a2b; --brand-wash: #fbedea;
  --success: #22704a; --success-wash: #22704a1a; --warning: #9a5b08; --warning-wash: #9a5b0814;
  --error: #9f1d20; --error-wash: #9f1d2014;
  --blue: #0057ae; --violet: #644a9b; --teal: #1a7471; --amber: #d99a2b;
  /* Washes behind each data colour, and the tones of the stage art. */
  --blue-wash: #0057ae14; --blue-soft: #eaf2fb; --blue-pale: #d6e2f0; --blue-line: #c3d9ef; --blue-mark: #0057ae59;
  --violet-wash: #efebf5; --violet-pale: #d9d1e8; --teal-wash: #e5f2f1; --amber-wash: #f8eedf; --tone-blue-wash: #e6eef7;
  /* Primary buttons; text on brand and data fills. */
  --primary: #b53a2b; --primary-hover: #9c3124; --on-brand: #fff;
  --surface-hover: #fcfbfa; --shimmer: #f8f5f3; --sidebar: #efebe8; --glass: #ffffffd9; --glass-border: #ffffffb3;
  --brand-select: #d649372e; --brand-ring: #d6493726; --brand-line: #d6493733;
  --good-bg: #2f8f5b14; --good-line: #2f8f5b40; --warn-line: #c77d1240; --bad-line: #9f1d2033;
  /* Dark surfaces in both modes: tooltips, toasts, code, the replay stage. */
  --tooltip: #282421; --tooltip-hover: #3a3431; --tooltip-ink: #fff;
  --good-on-dark: #7ad3a0; --bad-on-dark: #f2a0a0; --link-on-dark: #ffb4a8;
  --code-bg: #282421; --code-ink: #ede7e3; --player-stage: #282421;
  --scrim: #28242159; --scrim-light: #2824210f; --elev: #2824211f;
  --radius: 12px; --radius-s: 8px; --radius-xs: 6px;
  --shadow-pop: 0 16px 40px -8px #28242133, 0 2px 6px #2824210f;
  --shadow-sheet: -8px 0 32px -8px #28242129;
  --display: "Quando", "Quando fallback", Georgia, serif;
  /* The system face everywhere: SF Pro on Apple devices, Segoe UI on Windows, Roboto on Android. */
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
/* Dark: the apps' warm dark palette (Sketch, v5 · Apps · Foundations). */
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #171412; --surface: #211d1b; --subtle: #2a2522; --border: #3a3330; --border-strong: #4a423e;
    --ink: #f3efed; --ink-2: #b5a9a3; --muted: #8a7f79;
    --brand: #e5604e; --brand-dark: #f08a7a; --brand-wash: #3a221d;
    --success: #57b886; --success-wash: #57b8861f; --warning: #e0a64a; --warning-wash: #e0a64a1a;
    --error: #ef7a76; --error-wash: #ef7a761f;
    --blue: #6aa5ec; --violet: #a690e0; --teal: #4cbab5; --amber: #e0a64a;
    --blue-wash: #6aa5ec1f; --blue-soft: #1d2a3a; --blue-pale: #2c4a6e; --blue-line: #2c4a6e; --blue-mark: #6aa5ec80;
    --violet-wash: #2a2436; --violet-pale: #4a3f66; --teal-wash: #1c302f; --amber-wash: #33281a; --tone-blue-wash: #1d2a3a;
    --primary: #d9533f; --primary-hover: #e5604e;
    --surface-hover: #262120; --shimmer: #2f2926; --sidebar: #1f1b19; --glass: #211d1bd9; --glass-border: #ffffff14;
    --brand-select: #e5604e4d; --brand-ring: #e5604e40; --brand-line: #e5604e4d;
    --good-bg: #57b8861a; --good-line: #57b8864d; --warn-line: #e0a64a4d; --bad-line: #ef7a764d;
    --tooltip: #3a3330; --tooltip-hover: #4a423e; --tooltip-ink: #f3efed;
    --code-bg: #0f0d0c; --player-stage: #0f0d0c;
    --scrim: #00000099; --scrim-light: #00000040; --elev: #0000004d;
    --shadow-pop: 0 16px 40px -8px #00000099, 0 2px 6px #00000066;
    --shadow-sheet: -8px 0 32px -8px #00000099;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 14px/20px var(--sans); -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1, "lnum" 1; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-select); }
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.muted { color: var(--muted); } .secondary { color: var(--ink-2); } .num { font-family: var(--display); font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.good { color: var(--success); } .bad { color: var(--error); } .warn { color: var(--warning); }

/* Shell */
.app { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 8px; height: calc(100vh - 16px); margin: 8px 4px 8px 8px; display: flex; flex-direction: column; padding: 14px 10px 12px; gap: 1px; overflow-y: auto; scrollbar-width: none; background: var(--sidebar); border: 1px solid var(--glass-border); border-radius: 16px; box-shadow: 0 1px 3px var(--elev); }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 14px; font: 600 15px/20px "Quicksand", var(--sans); }
.brand img { width: 24px; height: 24px; }
.site-switch { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s); text-align: left; }
.site-switch:hover { border-color: var(--border-strong); }
.site-avatar { width: 28px; height: 28px; border-radius: 6px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font: 15px var(--display); flex: none; }
.site-switch strong { display: block; font-weight: 600; font-size: 13px; line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-switch small { display: block; font-size: 12px; line-height: 16px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-switch .i { margin-left: auto; color: var(--muted); }
.search-trigger { display: flex; align-items: center; gap: 8px; margin: 10px 0 12px; padding: 6px 10px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-xs); color: var(--muted); font-size: 13px; text-align: left; }
.search-trigger:hover { border-color: var(--border-strong); color: var(--ink-2); }
.search-trigger kbd { margin-left: auto; }
kbd { font: 600 11px/16px var(--sans); color: var(--ink-2); background: var(--subtle); border-radius: 4px; padding: 2px 6px; }
.nav-group { padding: 14px 10px 6px; font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 7px; color: var(--ink); font-size: 13.5px; }
.nav .i { color: var(--ink-2); }
.nav:hover { background: var(--surface-hover); }
.nav .count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--success); font-variant-numeric: tabular-nums; }
.nav .count.quiet { color: var(--muted); }
.nav[aria-current="page"] { background: var(--brand-wash); color: var(--brand-dark); font-weight: 600; }
.nav[aria-current="page"] .i { color: var(--brand); }
.nav .dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.nav .dot.warn { background: var(--warning); } .nav .dot.bad { background: var(--error); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.sidebar-meta { padding: 10px 10px 0; font-size: 12px; color: var(--muted); }
.main { min-width: 0; }
.panel { min-height: 100vh; padding: 26px 32px 48px 28px; }
.phone-bar { display: none; }
.tabbar { display: none; }

/* Page head */
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px 24px; margin-bottom: 20px; flex-wrap: wrap; }
.head-text { min-width: 0; }
.title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
h1.title { font: 400 25px/32px var(--display); letter-spacing: -.005em; }
.subtitle { margin-top: 4px; color: var(--ink-2); font-size: 13px; line-height: 18px; }
.controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.live { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px 0 9px; border-radius: 13px; background: var(--good-bg); border: 1px solid var(--good-line); color: var(--success); font-size: 12px; font-weight: 600; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--good-line); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px #2f8f5b10; } }
.saved { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }

/* Buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: var(--radius-xs); border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 13px; line-height: 18px; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.btn .i { color: var(--ink-2); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-brand); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-primary .i { color: var(--on-brand); }
/* OpenAI's sign-in button rules: black (or white), nothing else. */
.btn-chatgpt { background: #000; border-color: #000; color: #fff; }
.btn-chatgpt:hover { background: #2b2b2b; border-color: #2b2b2b; }
.btn-chatgpt .i { color: #fff; width: 18px; height: 18px; }
.mark .i { width: 20px; height: 20px; }
.hint .i { width: 13px; height: 13px; margin: -2px 3px 0 0; }
.btn-danger { background: var(--error); border-color: var(--error); color: var(--on-brand); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--subtle); border-color: transparent; }
.btn-l { height: 36px; padding: 0 16px; }
.btn-icon { width: 32px; padding: 0; }
.btn[aria-expanded="true"] { background: var(--subtle); }
.btn[aria-pressed="true"] { background: var(--brand-wash); border-color: var(--brand); color: var(--brand-dark); }
.btn[aria-pressed="true"]:hover { background: var(--brand-wash); border-color: var(--brand-dark); }
.phone-only { display: none; }
.range-dates { margin-left: 6px; font-weight: 600; white-space: nowrap; }
.btn:disabled { opacity: .55; cursor: default; }
.link { color: var(--brand-dark); font-weight: 600; font-size: 13px; }
.link:hover { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 3px; }
.seg { display: inline-flex; padding: 2px; gap: 2px; background: var(--subtle); border-radius: var(--radius-s); }
.seg a, .seg button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 28px; padding: 0 10px; border-radius: var(--radius-xs); color: var(--ink-2); font-size: 13px; border: 0; background: none; }
.seg a:hover, .seg button:hover { color: var(--ink); }
.seg [aria-current="true"], .seg [aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px var(--elev); }
label.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.field small { font-weight: 400; color: var(--muted); font-size: 12px; }
.input, select.input, textarea.input { width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface); font-size: 14px; font-weight: 400; transition: border-color .12s, box-shadow .12s; }
textarea.input { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }
.input:hover { border-color: var(--border-strong); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.input.mono { font-family: var(--mono); font-size: 13px; }
select.input { appearance: none; padding-right: 32px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236f625d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; }
.switch { position: relative; width: 34px; height: 20px; flex: none; }
.switch input { appearance: none; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border-radius: 10px; background: var(--border-strong); cursor: pointer; transition: background .15s; }
.switch input:checked { background: var(--brand); }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px #28242133; transition: transform .15s; }
.switch input:checked::after { transform: translateX(14px); }
.form-grid { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.stack-s > * + * { margin-top: 8px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-head h2 { font-size: 17px; line-height: 24px; font-weight: 600; }
.section-head p { font-size: 13px; margin-top: 2px; color: var(--ink-2); }

/* Chips */
.chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -6px 0 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 10px; border-radius: var(--radius-xs); background: var(--brand-wash); color: var(--brand-dark); font-size: 12px; font-weight: 600; }
.chip .i { width: 14px; height: 14px; }
.chip a { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; }
.chip a:hover { background: var(--brand-ring); }
.chip-plain { background: var(--surface); border: 1px solid var(--border); color: var(--ink); padding: 0 10px; }
.pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 11px; font-weight: 600; line-height: 16px; white-space: nowrap; }
.pill-good { background: var(--success-wash); color: var(--success); }
.pill-bad { background: var(--error-wash); color: var(--error); }
.pill-warn { background: var(--warning-wash); color: var(--warning); }
.pill-brand { background: var(--brand-wash); color: var(--brand-dark); }
.pill-plain { background: var(--subtle); color: var(--ink-2); }

/* Cards */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: grid; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { font-size: 15px; line-height: 20px; font-weight: 600; }
.card-head .meta { font-size: 12px; color: var(--muted); }
.card-flush .card-head { padding: 16px 20px 0; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--ink-2); }
.section-title { display: flex; align-items: center; gap: 8px; margin: 28px 0 12px; font-size: 15px; font-weight: 600; }
.section-title .note { margin-left: auto; font-weight: 400; font-size: 12px; color: var(--muted); }
.hint { font-size: 12px; line-height: 18px; color: var(--muted); }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius-s); background: var(--subtle); font-size: 13px; line-height: 20px; }
.callout .i { margin-top: 2px; }
.callout-good { background: var(--good-bg); border: 1px solid var(--good-line); }
.callout-good .i { color: var(--success); }
.callout-warn { background: var(--warning-wash); border: 1px solid var(--warn-line); }
.callout-warn .i { color: var(--warning); }
.callout-bad { background: var(--error-wash); border: 1px solid var(--bad-line); }
.callout-bad .i { color: var(--error); }
.callout strong { font-weight: 600; }

/* Metric cards */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.metric { display: grid; align-content: start; gap: 4px; padding: 15px 18px 14px; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
a.metric:hover { border-color: var(--border-strong); }
.metric[aria-current="true"] { border-color: var(--brand); box-shadow: inset 0 0 0 .5px var(--brand); background: color-mix(in srgb, var(--brand-wash) 40%, var(--surface)); }
.metric-label { font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-value { font: 400 28px/36px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-delta { display: flex; align-items: baseline; gap: 6px; min-width: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric .delta { height: auto; padding: 0; background: none; border-radius: 0; font-size: 12px; }
.delta { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 9px; font-size: 11px; font-weight: 600; }
.delta-up { background: var(--success-wash); color: var(--success); }
.delta-down { background: var(--error-wash); color: var(--error); }
.delta-flat { background: var(--subtle); color: var(--ink-2); }

/* Charts */
.chart-card { padding-bottom: 14px; }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 16px; margin-bottom: 12px; flex-wrap: wrap; }
.chart-head h2 { font-size: 15px; line-height: 20px; font-weight: 600; }
.insight { display: flex; align-items: center; gap: 8px; margin-top: 4px; color: var(--ink-2); font-size: 13px; line-height: 18px; }
.insight::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex: none; }
.legend { display: flex; gap: 8px; flex-wrap: wrap; }
.legend { gap: 16px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 12px; font-weight: 500; white-space: nowrap; }
.legend .this { color: var(--ink); font-weight: 600; }
.legend .this::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.legend .prev::before { content: ""; width: 12px; border-top: 2px dashed var(--muted); }
.chart { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); grid-template-rows: 1fr auto; height: 224px; }
.chart-y { position: relative; grid-row: 1; }
.chart-y span { position: absolute; right: 10px; transform: translateY(-50%); font-size: 11px; color: var(--muted); }
.chart-plot { position: relative; grid-row: 1; grid-column: 2; }
.chart-plot > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart-grid line { stroke: var(--subtle); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-grid line.base { stroke: var(--border); }
.line-current { fill: none; stroke: var(--brand); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.line-previous { fill: none; stroke: var(--muted); stroke-width: 1.75; stroke-dasharray: 5 6; vector-effect: non-scaling-stroke; }
.area-current { fill: url(#area-fill); }
.chart-x { grid-column: 2; display: flex; justify-content: space-between; padding-top: 10px; font-size: 11px; color: var(--muted); }
.chart-x span[aria-current="true"] { color: var(--ink); font-weight: 600; }
.chart-mark { position: absolute; top: -10px; bottom: 0; width: 0; border-left: 1.5px solid var(--blue-mark); }
.chart-mark span { position: absolute; top: -18px; left: 0; transform: translateX(var(--shift, -50%)); display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 12px; background: var(--blue-soft); border: 1px solid var(--blue-line); color: var(--blue); font-size: 11px; font-weight: 600; white-space: nowrap; }
.chart-mark .i { width: 14px; height: 14px; flex: none; }
.chart-mark b { max-width: 220px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.chart-mark.raised span { top: -46px; }
.chart:has(.chart-mark.raised) { margin-top: 62px; }
@media (max-width: 720px) { .chart-mark b { display: none; } .chart-mark span { padding: 0 5px; } }
/* Annotation labels sit above the plot; keep them clear of the text above. */
.chart:has(.chart-mark) { margin-top: 34px; }
.chart-hover { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid var(--border-strong); pointer-events: none; opacity: 0; }
.chart-dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); box-shadow: 0 0 0 6px var(--brand-ring); pointer-events: none; opacity: 0; }
.chart-tip { position: absolute; top: 8px; z-index: 2; min-width: 160px; padding: 10px 14px; border-radius: 10px; background: var(--tooltip); color: var(--tooltip-ink); box-shadow: 0 8px 20px -4px #28242166; pointer-events: none; opacity: 0; }
.chart-tip small { display: block; color: var(--muted); font-size: 11px; line-height: 16px; font-weight: 600; }
.chart-tip strong { display: block; font: 400 18px/22px var(--display); }
.chart-tip em { display: block; font-style: normal; font-size: 11px; line-height: 16px; font-weight: 600; color: var(--good-on-dark); }
.chart-tip em.down { color: var(--bad-on-dark); }
.chart.hovering .chart-hover, .chart.hovering .chart-dot, .chart.hovering .chart-tip { opacity: 1; }
.chart-why { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 12px; background: var(--tooltip); color: var(--tooltip-ink); font-size: 12px; font-weight: 600; border: 0; opacity: 0; transform: translate(-50%, -150%); }
.chart-why .i { width: 12px; height: 12px; }
.chart.hovering .chart-why { opacity: 1; }
/* Touch: the page still scrolls up and down over a chart; sideways scrubs. */
.chart-plot { touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.chart.pinned .chart-tip { pointer-events: auto; }
/* The period pill: in place of the period bar once it has scrolled away. */
.pill-dock { position: sticky; top: 12px; z-index: 25; height: 0; display: flex; justify-content: center; pointer-events: none; }
.period-pill { display: flex; align-items: center; height: 38px; padding: 3px; border-radius: 19px; background: var(--glass); border: 1px solid var(--glass-border); box-shadow: 0 6px 20px -6px var(--scrim), 0 1px 2px var(--elev); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); opacity: 0; transform: translateY(-6px); }
/* It eases in while scrolling; going, it goes at once, so a new page never shows it fading out. */
.period-pill.shown { opacity: 1; transform: none; pointer-events: auto; transition: opacity .15s, transform .15s; }
.period-pill button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; border-radius: 16px; background: none; color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.period-pill button + button { border-left: 1px solid var(--border); border-radius: 0 16px 16px 0; padding-left: 10px; }
.period-pill button:hover { background: var(--subtle); }
.period-pill button.on { color: var(--brand-dark); }
.period-pill .i { width: 15px; height: 15px; }

/* Values a bar holds: on hover with a mouse, on a tap with a finger. */
[data-tip] { position: relative; }
[data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 5; padding: 6px 10px; border-radius: 8px; background: var(--tooltip); color: var(--tooltip-ink); font-size: 12px; font-weight: 600; line-height: 16px; white-space: nowrap; pointer-events: none; opacity: 0; }
[data-tip]:hover::after, [data-tip].tip-on::after { opacity: 1; }
.barchart-col:first-child[data-tip]::after { left: 0; transform: none; }
.barchart-col:last-child[data-tip]::after { left: auto; right: 0; transform: none; }
.chart-open { display: block; margin-top: 6px; padding-top: 6px; border-top: 1px solid #ffffff26; color: var(--link-on-dark); font-size: 12px; font-weight: 600; }
.now-band { fill: var(--brand); fill-opacity: .1; }
.chart-now { position: absolute; top: -18px; transform: translateX(-50%); color: var(--brand-dark); font-size: 11px; font-weight: 600; pointer-events: none; }
.spark { overflow: visible; }
.spark path { vector-effect: non-scaling-stroke; }

/* Ranked lists */
.rank { display: grid; gap: 6px; }
.rank-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-height: 36px; padding: 0 0 0 12px; border-radius: var(--radius-s); }
.rank-row .bar { position: absolute; inset: 0 auto 0 0; border-radius: var(--radius-s); background: var(--subtle); }
.rank-row:first-child .bar.lead { background: var(--brand-wash); }
.rank-row > :not(.bar):not(.rank-edge) { position: relative; }
.rank-name { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13px; font-weight: 600; }
.rank-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-name .n { color: var(--muted); font-weight: 400; width: 14px; flex: none; }
.rank-value { font: 400 14px/20px var(--display); text-align: right; min-width: 52px; }
.rank-pct { font-size: 11px; color: var(--muted); width: 34px; text-align: right; }
a.rank-row:hover .bar { filter: brightness(.97); }
a.rank-row:hover { outline: 1.5px solid var(--brand); outline-offset: -1.5px; }
.rank-edge { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 2px; }
.avatar { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--on-brand); font-size: 11px; font-weight: 600; flex: none; }
.avatar .i { width: 13px; height: 13px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--canvas); padding: 9px 16px; white-space: nowrap; }
.table th a { display: inline-flex; align-items: center; gap: 4px; }
.table th a:hover { color: var(--ink); }
.table td { padding: 12px 16px; border-top: 1px solid var(--border); white-space: nowrap; }
.table td.wrap { white-space: normal; overflow-wrap: anywhere; }
/* Phones: the first column wraps, but never narrower than a short word or two. */
@media (max-width: 720px) { .table td:first-child { white-space: normal; overflow-wrap: anywhere; min-width: 9em; } .table td:first-child:has(.person-avatar) { min-width: 13em; } .table th, .table td { padding-left: 10px; padding-right: 10px; }
  /* A long path keeps two lines; the whole of it is in the details. */
  .table td.strong:first-child > a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; } }
.table .r { text-align: right; } .table .strong { font-weight: 600; }
.table tbody tr { transition: background .1s; }
.table tbody tr[data-href] { cursor: pointer; }
.table tbody tr[data-href]:hover, .table tbody tr[aria-selected="true"] { background: var(--brand-wash); }
.table .bar-cell { width: 90px; }
.mini-bar { height: 8px; border-radius: 4px; background: var(--brand-wash); }
.edit-cell { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 2px 4px; margin: -2px -4px; border-radius: 4px; font-weight: 400; }
.edit-cell:hover { background: var(--subtle); }
.edit-cell .i { width: 14px; height: 14px; color: var(--muted); }
.inline-input { width: 150px; height: 32px; text-align: right; }

/* Tabs */
.tabs { display: flex; gap: 24px; box-shadow: inset 0 -1px var(--border); margin: 0 0 20px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs a { position: relative; padding: 0 2px 10px; color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--brand); border-radius: 1px; }

/* Empty, loading, notices */
.empty { display: grid; justify-items: center; gap: 8px; padding: 40px 24px; text-align: center; }
.empty h3 { font: 400 20px/26px var(--display); }
.empty p { max-width: 440px; color: var(--ink-2); font-size: 13px; line-height: 20px; }
.empty .row { justify-content: center; margin-top: 8px; }
.empty-art { width: 200px; height: 120px; margin-bottom: 8px; }
.stage { position: relative; display: grid; place-items: center; padding: 70px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--subtle); overflow: hidden; }
.stage-ghost { position: absolute; inset: 22% 3% auto; width: 94%; height: 40%; }
.stage-ghost path { fill: none; stroke: var(--border-strong); stroke-width: 3; stroke-dasharray: 10 8; vector-effect: non-scaling-stroke; }
.stage-card { position: relative; display: grid; justify-items: center; gap: 8px; max-width: 480px; padding: 28px 28px 22px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 8px 24px #2824210f; text-align: center; }
.stage-art { width: 200px; height: 120px; margin-bottom: 6px; }
.stage-card h2 { font: 400 20px/26px var(--display); }
.stage-card p { color: var(--ink-2); font-size: 13px; line-height: 20px; }
.stage-card .row { justify-content: center; margin-top: 10px; }
.stage-hint { margin-top: 4px; color: var(--muted) !important; font-size: 12px !important; }
/* The illustrations and the chart's area are SVG drawn in the light palette;
   CSS outranks presentation attributes, so they follow the tokens here. */
:is(.stage-art, .empty-art) [fill="#fff"] { fill: var(--surface); }
:is(.stage-art, .empty-art) [fill="#F3EFED"] { fill: var(--subtle); }
:is(.stage-art, .empty-art) [fill="#E9E4E1"] { fill: var(--border); }
:is(.stage-art, .empty-art) [stroke="#E9E4E1"] { stroke: var(--border); }
:is(.stage-art, .empty-art) [stroke="#E3DCD8"] { stroke: var(--border-strong); }
:is(.stage-art, .empty-art) [fill="#D9CFCA"] { fill: var(--border-strong); }
:is(.stage-art, .empty-art) [stroke="#D9CFCA"] { stroke: var(--border-strong); }
:is(.stage-art, .empty-art) :is([fill="#FBEAE7"], [fill="#FBEDEA"]) { fill: var(--brand-wash); }
:is(.stage-art, .empty-art) [stroke="#F0C9C1"] { stroke: var(--brand-line); }
:is(.stage-art, .empty-art) [fill="#D64937"] { fill: var(--brand); }
:is(.stage-art, .empty-art) [fill="#0057AE"] { fill: var(--blue); }
:is(.stage-art, .empty-art) [fill="#644A9B"] { fill: var(--violet); }
#area-fill stop { stop-color: var(--brand); }
.pop.pop-range { grid-template-columns: 150px minmax(0, 1fr); width: 500px; padding: 0; }
.pop-range:popover-open { display: grid; }
.range-presets { display: grid; align-content: start; gap: 2px; padding: 10px; border-right: 1px solid var(--border); }
.range-presets a, .range-presets span { display: block; padding: 7px 10px; border-radius: var(--radius-xs); color: var(--ink); font-size: 14px; }
.range-presets a:hover { background: var(--subtle); }
.range-presets [aria-current="true"] { background: var(--brand-wash); color: var(--brand-dark); font-weight: 600; }
.range-presets .range-custom:not([aria-current]) { color: var(--muted); }
.range-form { padding: 14px 16px 16px; }
.range-form .input:invalid, .range-form .input[aria-invalid="true"] { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.field-error { color: var(--error); font-size: 13px; }
.range-info { padding: 10px 12px; border-radius: var(--radius-xs); background: var(--subtle); color: var(--ink-2); font-size: 12px; line-height: 18px; }
.range-info strong { display: block; color: var(--ink); font-weight: 500; font-size: 13px; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; }
.period-fixed { display: grid; justify-items: end; gap: 4px; }
.period-tag { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: var(--radius-s); background: var(--subtle); font-size: 13px; font-weight: 600; }
.period-fixed small { color: var(--muted); font-size: 12px; }
.notice { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 16px; border-radius: var(--radius-s); background: var(--warning-wash); border: 1px solid var(--warn-line); font-size: 13px; }
.notice .i { color: var(--warning); }
.notice a { margin-left: auto; }
.skeleton { border-radius: 6px; background: linear-gradient(90deg, var(--subtle), var(--shimmer), var(--subtle)); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Insight cards */
.insights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.insight-card { position: relative; padding: 16px 18px 14px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.insight-card::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 2px 2px 0; background: var(--tone, var(--brand)); }
.insight-card .top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.insight-card .big { font: 400 22px/28px var(--display); color: var(--tone, var(--brand)); white-space: nowrap; }
.insight-card .what { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insight-card p { margin: 10px 0 8px; font-size: 12px; line-height: 18px; color: var(--ink-2); }
.insight-card a { font-size: 12px; font-weight: 600; color: var(--tone, var(--brand)); }

/* Overlays */
dialog { color: var(--ink); }
dialog::backdrop { background: var(--scrim); }
.dialog { width: min(540px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 16px; background: var(--surface); box-shadow: 0 24px 64px -12px #28242166; }
.dialog-wide { width: min(640px, calc(100vw - 32px)); }
.dialog-head { display: flex; align-items: flex-start; gap: 12px; padding: 24px 28px 0; }
.dialog-head h2 { font-size: 17px; line-height: 24px; font-weight: 600; }
.dialog-head p { margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.dialog-head .close { margin-left: auto; }
.dialog-body { padding: 20px 28px 24px; display: grid; gap: 16px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 28px 20px; border-top: 1px solid var(--border); }
.sheet { position: fixed; inset: 8px 8px 8px auto; width: min(460px, calc(100vw - 16px)); height: auto; max-height: none; max-width: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sheet); overflow-y: auto; }
.sheet::backdrop { background: var(--scrim-light); }
/* Wide screens: an open sheet sits beside the page, like the apps' inspector; the table stays usable. */
@media (min-width: 1100px) {
  dialog.sheet:not(:modal) { z-index: 30; }
  /* Every row can scroll clear of a half-height sheet. */
  html:has(dialog.sheet[data-detents][open]) .panel { padding-bottom: 60vh; }
  body:has(dialog.sheet[open]:not(:modal)) .main { padding-right: 476px; }
  /* The details show the selected page's time, scroll and change; the table keeps what fits. */
  body:has(dialog.sheet[open]:not(:modal)) .table .hide-m { display: none; }
}
.sheet-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: flex-start; gap: 12px; padding: 20px 24px 0; background: var(--surface); }
.sheet-head .overline { font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sheet-head h2 { font-size: 17px; line-height: 24px; font-weight: 600; word-break: break-all; }
.sheet-head .close { margin-left: auto; }
.sheet .tabs { padding: 0 24px; margin: 16px 0 0; position: sticky; top: 64px; background: var(--surface); }
.sheet-body { padding: 20px 24px 32px; display: grid; gap: 20px; }
/* Page details, as in the apps: the sheet is canvas, its figures white cards. */
.sheet { background: var(--canvas); }
/* Opening a sheet focuses the sheet, not its first button: no ring until the keyboard moves. */
dialog:focus { outline: none; }
.sheet .sheet-head { background: var(--canvas); padding-bottom: 4px; }
.sheet-head h2 { font-size: 20px; line-height: 26px; }
.sheet-close { display: grid; place-items: center; flex: none; width: 36px; height: 36px; margin-left: auto; border-radius: 50%; background: var(--subtle); color: var(--ink-2); }
.sheet-close:hover { color: var(--ink); background: var(--border); }
.sheet-close .i { width: 18px; height: 18px; }
.seg.seg-sheet { display: flex; margin: 14px 24px 0; }
.seg.seg-sheet a { flex: 1; height: 30px; }
.metrics.metrics-sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.metrics-sheet .metric { grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; padding: 12px 14px; container-type: inline-size; }
.metrics-sheet .metric-label { font-size: 13px; font-weight: 400; }
.metrics-sheet .metric-delta { grid-row: 1; grid-column: 2; }
.metrics-sheet .metric-value { grid-column: 1 / -1; font-size: min(26px, 16cqi); line-height: 32px; margin-top: 4px; }
.sheet .card .subhead { margin-top: 0; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 24px 0; }
.btn.btn-pill { height: 34px; padding: 0 14px; border-radius: 17px; }
.btn.btn-wash { background: var(--brand-wash); border-color: transparent; color: var(--brand-dark); }
.btn.btn-wash:hover { background: var(--brand-select); }
.btn-wash .i { color: var(--brand-dark); }
.mini-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mini { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-s); }
.mini small { display: block; font-size: 12px; color: var(--ink-2); }
.mini .row-between strong { font: 400 20px/26px var(--display); }
[popover] { margin: 0; padding: 0; border: 0; color: var(--ink); background: transparent; overflow: visible; }
.pop { min-width: 220px; padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-pop); }
.pop-wide { width: 460px; padding: 0; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: var(--radius-xs); background: none; text-align: left; font-size: 13px; white-space: nowrap; }
.menu-item:hover, .menu-item:focus-visible { background: var(--subtle); outline: none; }
.menu-item kbd { margin-left: auto; background: none; color: var(--muted); font-weight: 400; }
.menu-item.accent { color: var(--brand-dark); font-weight: 600; }
.menu-item.accent .i { color: var(--brand); }
.menu-sep { height: 1px; margin: 4px -6px; background: var(--border); }
.menu-label { padding: 8px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.pop-section { padding: 16px 18px; }
.pop-section + .pop-section { border-top: 1px solid var(--border); }
.cond { display: grid; grid-template-columns: 140px minmax(0, 1fr) 28px; gap: 8px; align-items: center; }

/* Toasts */
#toasts { position: fixed; left: 50%; bottom: 24px; z-index: 50; display: grid; gap: 8px; transform: translateX(-50%); }
.toast { display: flex; align-items: center; gap: 12px; min-width: 320px; max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 10px; background: var(--tooltip); color: var(--tooltip-ink); box-shadow: 0 10px 30px -6px var(--scrim); font-size: 13px; animation: toast-in .2s ease-out; }
.toast .i { color: var(--good-on-dark); }
.toast.error .i { color: var(--bad-on-dark); }
.toast form, .toast a { margin-left: auto; }
.toast button, .toast a { border: 0; background: none; color: var(--link-on-dark); font-weight: 600; font-size: 13px; padding: 0 0 0 12px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.toast.leaving { opacity: 0; transform: translateY(8px); transition: opacity .16s ease-in, transform .16s ease-in; }

/* Palette */
.palette { width: min(640px, calc(100vw - 32px)); margin-top: 12vh; padding: 0; border: 0; border-radius: 14px; background: var(--surface); box-shadow: 0 24px 64px -12px #2824214d; }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.palette-input input { flex: 1; border: 0; outline: none; font-size: 16px; background: none; }
.palette-list { max-height: 380px; overflow-y: auto; padding: 8px; }
.palette-group { padding: 10px 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--radius-s); }
.palette-item[aria-selected="true"] { background: var(--subtle); }
.palette-item strong { display: block; font-size: 13px; font-weight: 600; }
.palette-item small { display: block; font-size: 12px; color: var(--ink-2); }
.palette-item.ask .badge { background: var(--brand); color: var(--on-brand); }
.palette-item.ask[aria-selected="true"] { background: var(--brand-wash); }
.palette-foot { padding: 10px 20px; border-top: 1px solid var(--border); background: var(--canvas); border-radius: 0 0 14px 14px; font-size: 12px; color: var(--muted); }

/* Steps, timelines, funnels */
.steps { display: grid; gap: 28px; position: relative; }
.step { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 16px; position: relative; }
.step::before { content: ""; position: absolute; left: 11px; top: 28px; bottom: -28px; width: 2px; background: var(--border); }
.step:last-child::before { display: none; }
.step-num { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: 12px; font-weight: 600; }
.step-num.todo { background: var(--surface); border: 1.5px solid var(--border); color: var(--ink-2); }
.step-num.done { background: var(--success); }
.step h3 { font-size: 15px; line-height: 24px; font-weight: 600; margin-bottom: 10px; }
.code { position: relative; padding: 16px 96px 16px 20px; border-radius: 10px; background: var(--code-bg); color: var(--code-ink); font: 12px/19px var(--mono); white-space: pre-wrap; word-break: break-all; }
.code .copy { position: absolute; top: 10px; right: 10px; height: 30px; padding: 0 14px; border: 0; border-radius: 6px; background: #ffffff1f; color: var(--on-brand); font-weight: 600; font-size: 13px; }
.code .copy:hover { background: #ffffff33; }
.listening { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 10px; background: var(--canvas); border: 1px solid var(--border); }
.listening.ok { background: var(--good-bg); border-color: var(--good-line); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-line); animation: pulse-brand 1.6s infinite; flex: none; }
.listening.ok .pulse { background: var(--success); box-shadow: 0 0 0 4px var(--good-line); animation: none; }
@keyframes pulse-brand { 50% { box-shadow: 0 0 0 8px #d649370f; } }
.timeline { display: grid; gap: 0; }
.tl-row { display: grid; grid-template-columns: 64px 22px minmax(0, 1fr); gap: 10px; padding-bottom: 18px; position: relative; }
.tl-row::before { content: ""; position: absolute; left: 84px; top: 16px; bottom: 0; width: 2px; background: var(--border); }
.tl-row:last-child::before { display: none; }
.tl-time { font-size: 12px; color: var(--muted); padding-top: 1px; }
.tl-dot { width: 12px; height: 12px; margin: 3px 0 0 5px; border-radius: 50%; border: 2.5px solid var(--brand); background: var(--surface); position: relative; }
.tl-dot.good { border-color: var(--success); } .tl-dot.bad { border-color: var(--error); } .tl-dot.blue { border-color: var(--blue); }
.tl-row strong { display: block; font-size: 13px; font-weight: 600; }
.tl-row small { display: block; font-size: 12px; color: var(--ink-2); word-break: break-all; }
.funnel { display: grid; grid-template-columns: repeat(var(--steps), minmax(0, 1fr)); gap: 20px; }
.funnel-col { display: grid; grid-template-rows: 240px auto; gap: 12px; min-width: 0; }
.funnel-track { position: relative; border-radius: 8px 8px 4px 4px; background: var(--subtle); overflow: hidden; }
.funnel-bar { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 8px 8px 4px 4px; background: linear-gradient(var(--brand), var(--primary)); display: flex; justify-content: center; padding-top: 10px; color: var(--on-brand); font: 400 22px/28px var(--display); }
.funnel-drop { position: absolute; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: 11px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.funnel-bar.short { color: transparent; }
.funnel-value { position: absolute; left: 0; right: 0; text-align: center; color: var(--ink); font: 400 22px/28px var(--display); }
.funnel-col strong { display: block; font: 400 16px/22px var(--display); }
.funnel-col small { display: block; font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-list { display: grid; gap: 10px; }
.step-item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--canvas); }
.step-item .step-num { width: 22px; height: 22px; font-size: 11px; }
.step-item small { display: block; font-size: 11px; color: var(--muted); }
.step-item strong { display: block; font-size: 13px; font-weight: 600; word-break: break-all; }
.vitals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.vital-dist { display: flex; gap: 2px; height: 8px; margin: 14px 0 8px; }
.vital-dist span { border-radius: 4px; }
.share-bar { display: flex; height: 24px; border-radius: 6px; overflow: hidden; gap: 2px; }
.health-banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radius); border: 1px solid var(--good-line); background: var(--good-bg); margin-bottom: 16px; }
.health-banner.warn { border-color: var(--warn-line); background: var(--warning-wash); }
.health-banner strong { display: block; font-size: 15px; line-height: 20px; }
.health-banner small { display: block; color: var(--ink-2); font-size: 12px; }
.check-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--border); }
.check-row:first-child { border-top: 0; }
.check-row strong { display: block; font-size: 13px; }
.check-row small { display: block; font-size: 12px; color: var(--ink-2); }
.list-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--border); }
.list-row:first-child { border-top: 0; }
.list-row.alerting { background: var(--warning-wash); }
.list-row strong { display: block; font-size: 14px; font-weight: 600; }
.list-row small { display: block; font-size: 12px; color: var(--ink-2); }
.icon-tile { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--subtle); color: var(--ink-2); }
.icon-tile.brand { background: var(--brand-wash); color: var(--brand); }
.icon-tile.warn { background: var(--warning-wash); color: var(--warning); }
.triage { margin: 0 20px 16px 70px; padding: 14px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--warn-line); }
.option-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.option-card { position: relative; display: block; padding: 14px 16px 14px 44px; border: 1px solid var(--border); border-radius: var(--radius-s); cursor: pointer; }
.option-card input { position: absolute; left: 16px; top: 16px; width: 16px; height: 16px; accent-color: var(--brand); margin: 0; }
.option-card:has(input:checked) { border-color: var(--brand); background: var(--brand-wash); }
.option-card strong { display: block; font-size: 14px; }
.option-card small { display: block; font-size: 12px; color: var(--ink-2); line-height: 17px; margin-top: 2px; }
.settings { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; }
.subnav { display: grid; gap: 2px; align-content: start; }
.split-builder { grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); align-items: start; }
.split-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.subnav form { margin-top: 12px; }
.provider { display: grid; gap: 4px; }
.provider-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border-radius: 10px; }
.provider-row.recommended { background: var(--brand-wash); }
.provider-row.connected { background: var(--good-bg); }
.provider-row strong { display: block; font-size: 13px; }
.provider-row small { display: block; font-size: 12px; color: var(--ink-2); }
.mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--on-brand); font: 16px var(--display); }
.dash-tile { position: relative; }
.dash-tile.editing { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--radius); }
.dash-tools { position: absolute; top: -16px; right: 12px; z-index: 2; display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: 0 4px 12px -2px var(--elev); }
.dash-tools button { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 6px; background: none; color: var(--ink-2); }
.dash-tools button:hover { background: var(--subtle); }
.add-tile { display: grid; gap: 12px; padding: 20px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: var(--canvas); }
.widget-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.widget-option { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface); text-align: left; }
.widget-option:hover { border-color: var(--brand); background: var(--brand-wash); }
.widget-option strong { font-size: 13px; } .widget-option small { font-size: 12px; color: var(--ink-2); }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(400px, 100%); padding: 32px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: 0 8px 24px -8px #2824210f; }
.login-card h1 { font: 400 22px/28px var(--display); margin: 20px 0 6px; }
.ask-answer { font-size: 14px; line-height: 22px; }
.ask-q { justify-self: end; max-width: 85%; padding: 10px 14px; border-radius: 12px; background: var(--subtle); font-size: 13px; }
.ask-input { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 12px 0 0; background: var(--surface); }
.ask-thinking { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 13px; }
.why { position: absolute; z-index: 5; width: 400px; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-pop); }
.driver { display: grid; gap: 2px; }
.driver .track { height: 5px; border-radius: 3px; background: var(--subtle); margin-top: 6px; overflow: hidden; }
.driver .track span { display: block; height: 100%; border-radius: 3px; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; font-size: 13px; }
.kv dt { color: var(--ink-2); white-space: nowrap; } .kv dd { margin: 0; min-width: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; }

/* Compact: icon rail */
@media (max-width: 1180px) {
  .app { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { padding: 14px 8px; align-items: center; }
  .sidebar .brand span, .site-switch div, .site-switch .i, .search-trigger span, .search-trigger kbd, .sidebar .nav span, .nav-group, .sidebar-meta, .sidebar .nav .dot, .sidebar .nav .count { display: none; }
  .brand { padding: 2px 0 14px; }
  .site-switch { width: 44px; padding: 7px; justify-content: center; }
  .search-trigger { width: 44px; justify-content: center; padding: 8px 0; }
  .sidebar .nav { width: 44px; justify-content: center; padding: 10px 0; }
  .nav-group { display: block; height: 1px; width: 24px; padding: 0; margin: 10px 0; background: var(--border); font-size: 0; }
  .panel { padding: 22px 24px 40px 20px; }
  .metric-value { font-size: 24px; line-height: 32px; }
  .vitals, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .insights, .grid-3, .split-builder, .split-main { grid-template-columns: minmax(0, 1fr); }
  .settings { grid-template-columns: minmax(0, 1fr); }
  .subnav { display: flex; overflow-x: auto; scrollbar-width: none; gap: 4px; }
  .subnav .nav { flex: none; white-space: nowrap; }
  .subnav form { margin-top: 0; } .subnav .hint { display: none; }
  .widget-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mobile: tab bar and bottom sheets */
@media (max-width: 720px) {
  body { font-size: 15px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .main { padding: 0 0 108px; }
  .panel { min-height: 100vh; padding: 0 16px 32px; }
  .phone-bar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 -16px 6px; padding: calc(8px + env(safe-area-inset-top)) 16px 8px; background: linear-gradient(var(--canvas) 55%, transparent); }
  .phone-site { display: flex; align-items: center; gap: 10px; min-width: 0; height: 48px; padding: 0 14px 0 8px; border-radius: 24px; text-align: left; }
  .phone-site img { width: 30px; height: 30px; flex: none; }
  .phone-site span { min-width: 0; }
  .phone-site strong { display: block; font-size: 15px; line-height: 19px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .phone-site small { display: block; font-size: 12px; line-height: 15px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .phone-site .i { color: var(--ink-2); }
  .phone-round { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; color: var(--ink); }
  .phone-round .i { width: 20px; height: 20px; }
  .glass { background: var(--glass); border: 1px solid var(--glass-border); box-shadow: 0 4px 16px var(--elev), 0 1px 2px var(--elev); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); }
  .head { margin-bottom: 14px; }
  h1.title { font-size: 30px; line-height: 38px; }
  .controls { width: 100%; }
  .controls .seg { flex: 1; } .controls .seg a { flex: 1; min-width: 0; }
  .controls .btn-label { display: inline; }
  .phone-only { display: inline; } .phone-hide { display: none; }
  .controls .btn-actions { width: auto; padding: 0 12px; }
  .metrics { gap: 9px; }
  .metric { grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; padding: 12px 14px 14px; }
  .metric-label { font-size: 13px; font-weight: 400; }
  .metric-delta { grid-row: 1; grid-column: 2; }
  .metric-delta .vs { display: none; }
  /* Sized to the card, so "€12,647.10" fits half a phone's width. */
  .metric { container-type: inline-size; }
  .metric-value { grid-column: 1 / -1; font-size: min(25px, 16cqi); line-height: 32px; margin-top: 4px; }
  .row-between.top, .row-between:has(> .row > .seg) { flex-wrap: wrap; }
  .row > .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg a, .seg button, .seg span[data-seg] { white-space: nowrap; }
  .card { padding: 14px 16px; } .card-flush { padding: 0; } .chart { height: 180px; }
  .chart-x span:nth-child(even) { visibility: hidden; }
  .vitals, .grid-4, .option-cards { grid-template-columns: minmax(0, 1fr); }
  .chart-card .chart-head { flex-wrap: wrap; }
  .funnel { grid-template-columns: minmax(0, 1fr); } .funnel-col { grid-template-rows: auto auto; } .funnel-track { height: 32px; } .funnel-bar { position: static; height: 100%; width: var(--w); padding: 0 10px; justify-content: flex-start; align-items: center; font-size: 15px; } .funnel-bar.short { color: var(--ink); overflow: visible; } .funnel-drop, .funnel-value { display: none; }
  .tabbar { position: fixed; left: 20px; right: 20px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); padding: 5px; border-radius: 32px; }
  .tabbar a { display: grid; justify-items: center; align-content: center; gap: 3px; height: 52px; border-radius: 26px; font-size: 10px; font-weight: 500; color: var(--ink-2); }
  .tabbar a[aria-current="page"] { background: var(--brand-wash); color: var(--brand-dark); font-weight: 600; }
  .tabbar a[aria-current="page"] .i { color: var(--brand); }
  .tabbar .i { width: 22px; height: 22px; }
  [popover].as-sheet.as-sheet { position: fixed; inset: auto 0 0 0; width: 100%; max-width: none; max-height: 88vh; overflow-y: auto; padding: 22px 8px calc(16px + env(safe-area-inset-bottom)); border: 0; border-radius: 28px 28px 0 0; background: var(--surface); box-shadow: 0 -8px 32px var(--elev); }
  [popover].as-sheet::before { content: ""; position: absolute; top: 8px; left: 50%; width: 37px; height: 5px; margin-left: -18px; border-radius: 3px; background: var(--border-strong); }
  [popover].as-sheet::backdrop { background: var(--scrim); }
  /* Rise from the bottom edge and drop back to it, the backdrop fading along.
     z-index matters only on the way out, where Safari has left the top layer. */
  [popover].as-sheet { z-index: 40; transform: translateY(calc(100% + 40px)); transition: transform .34s var(--sheet-drop), display .34s allow-discrete, overlay .34s allow-discrete; }
  [popover].as-sheet:popover-open { transform: none; transition-duration: .42s; transition-timing-function: var(--sheet-ease); }
  @starting-style { [popover].as-sheet:popover-open { transform: translateY(calc(100% + 40px)); } }
  [popover].as-sheet::backdrop { opacity: 0; transition: opacity .34s, display .34s allow-discrete, overlay .34s allow-discrete; }
  [popover].as-sheet:popover-open::backdrop { opacity: 1; }
  @starting-style { [popover].as-sheet:popover-open::backdrop { opacity: 0; } }
  /* A tap on the dimmed page only closes the sheet (app.js), so nothing under it lights up as pressed. */
  html:has([popover].as-sheet:popover-open) { -webkit-tap-highlight-color: transparent; }
  .as-sheet .menu-item { padding: 12px 14px; font-size: 16px; }
  .sheet { inset: auto 0 0 0; width: 100%; max-height: 92vh; border-radius: 28px 28px 0 0; border: 0; padding-bottom: env(safe-area-inset-bottom); }
  .sheet-head::before { content: ""; position: absolute; top: 8px; left: 50%; width: 37px; height: 5px; margin-left: -18px; border-radius: 3px; background: var(--border-strong); }
  .sheet-head { padding: 26px 16px 0; }
  .sheet .tabs { padding: 0 16px; }
  /* Forms at 16px: iOS zooms into anything smaller when it gets focus. */
  .input.input, .input.input.mono { font-size: 16px; }
  /* Room for the floating tab bar under the last card. */
  .panel { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  /* Where a finger lands: 40–44 pt. */
  .btn-icon { width: 40px; height: 40px; }
  .sheet-close { width: 40px; height: 40px; }
  .switch { width: 51px; height: 31px; }
  .switch input { border-radius: 16px; }
  .switch input::after { width: 27px; height: 27px; }
  .switch input:checked::after { transform: translateX(20px); }
  .check { min-height: 44px; }
  .check input { width: 22px; height: 22px; }
  details > summary { min-height: 44px; display: flex; align-items: center; }
  .card-foot a, a.link:not(p a, .hint a), button.link, .table th a { display: inline-block; padding: 12px 0; margin: -12px 0; }
  .edit-cell { padding-block: 9px; }
  /* A chart note's label: tap its pin. */
  .chart-mark.open b { display: inline; }
  .seg.seg-sheet { margin: 12px 16px 0; }
  /* One row of equal tiles, an icon over each label, as in Maps' place cards. */
  .sheet-actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; padding: 12px 16px 0; }
  .sheet-actions .btn.btn-pill { flex-direction: column; gap: 4px; height: 58px; padding: 0 6px; border-radius: 14px; font-size: 13px; }
  .sheet-actions .btn .i { width: 20px; height: 20px; }
  /* Page details: half height over the list, which stays usable; pulled up, nearly all of it. */
  /* dvh: the heights app.js works out from innerHeight, with Safari's toolbars shown or not. */
  dialog.sheet[data-detents] { height: 56dvh; max-height: none; overflow-y: hidden; box-shadow: 0 -10px 36px var(--elev), 0 -1px 0 var(--border); transition: height .42s var(--sheet-ease); }
  dialog.sheet[data-detents].expanded { height: 92dvh; overflow-y: auto; }
  dialog.sheet:not(:modal) { z-index: 30; }
  /* Every row can scroll clear of a half-height sheet. */
  html:has(dialog.sheet[data-detents][open]) .panel { padding-bottom: 60vh; }
  .sheet-body { padding: 16px 16px 28px; }
  /* A sheet scrolls on its own; the page behind stays put. */
  .sheet, [popover].as-sheet, .dialog { overscroll-behavior: contain; }
  html:has(dialog.sheet[open]:modal, dialog.dialog[open]:modal) { overflow: hidden; }
  .dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .pop-wide { width: calc(100vw - 24px); }
  .table th, .table td { padding: 10px 12px; }
  .hide-m, .section-title .note { display: none; }
  .legend span { font-size: 11px; }
  .pop.pop-range { grid-template-columns: minmax(0, 1fr); width: calc(100vw - 24px); }
  .range-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); border-right: 0; border-bottom: 1px solid var(--border); }
  .stage { padding: 32px 12px; }
  .period-fixed { justify-items: start; }
  .controls { gap: 6px; }
  .controls .seg { flex: 1 1 100%; }
  .controls > .btn { flex: 1; }
  .settings .subnav { margin: 0 -16px; padding: 0 16px; }
  .toast { min-width: 0; }
  #toasts { bottom: calc(96px + env(safe-area-inset-bottom)); left: 16px; right: 16px; transform: none; }
  /* Under the floating site switcher. */
  .pill-dock { top: 74px; }
  .period-pill { height: 42px; border-radius: 21px; }
  .period-pill button { height: 36px; border-radius: 18px; font-size: 14px; }
  .period-pill button + button { border-radius: 0 18px 18px 0; min-width: 48px; justify-content: center; }
  .toast { min-width: 0; }
}
@media print {
  .sidebar, .tabbar, .controls, #toasts { display: none !important; }
  .app { display: block; } .main { padding: 0; } .panel { border: 0; box-shadow: none; padding: 0; }
  body { background: #fff; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Runtime states */
.seg span[data-seg] { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 28px; padding: 0 10px; border-radius: var(--radius-xs); color: var(--ink-2); font-size: 13px; cursor: pointer; }
.seg input:checked + span[data-seg] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px var(--elev); }
.seg input:focus-visible + span[data-seg] { outline: 2px solid var(--brand); outline-offset: 1px; }
html.loading::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 100; background: linear-gradient(90deg, transparent, var(--brand), transparent); background-size: 50% 100%; animation: loading 1s infinite linear; }
@keyframes loading { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.why { top: 40%; }
dialog[open] { animation: dialog-in .16s ease-out; }
dialog.sheet[open] { animation: sheet-in .2s ease-out; }
dialog[open]::backdrop { animation: fade-in .3s ease-out; }
/* app.js moves a closing dialog out; its backdrop fades meanwhile. */
dialog.leaving { pointer-events: none; }
dialog.leaving::backdrop { opacity: 0; transition: opacity .34s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(6px) scale(.99); } }
@keyframes sheet-in { from { opacity: 0; transform: translateX(16px); } }
@keyframes fade-in { from { opacity: 0; } }
/* Phones: sheets and dialogs rise from the bottom edge. */
@keyframes sheet-up { from { transform: translateY(calc(100% + 40px)); } }
@media (max-width: 720px) { dialog.sheet[open], dialog.dialog[open] { animation: sheet-up .42s var(--sheet-ease); } }
/* Popover menus fade in by their button, and out. */
.pop { transition: opacity .12s ease-out, transform .12s ease-out, display .12s allow-discrete, overlay .12s allow-discrete; }
.pop:not(:popover-open):not(.as-sheet) { opacity: 0; transform: translateY(-4px); }
@starting-style { .pop:popover-open:not(.as-sheet) { opacity: 0; transform: translateY(-4px); } }
/* A page shown from memory while its fresh copy loads. */
html.refreshing::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 100; background: linear-gradient(90deg, transparent, var(--brand-wash), transparent); background-size: 50% 100%; animation: loading 1.4s infinite linear; }
.chart.drillable .chart-plot { cursor: pointer; }
.kb-selected, a.kb-selected { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: 6px; }
/* Long grids of heavy cards skip rendering until they scroll near. */
.heat-card, .insight-card, table.cohorts { content-visibility: auto; contain-intrinsic-size: auto 320px; }
.shortcuts { grid-template-columns: minmax(0, 1fr) auto; }
.shortcuts dd { text-align: right; color: var(--ink-2); white-space: nowrap; }
pre.code { overflow-x: auto; }
code { font-family: var(--mono); font-size: .92em; background: var(--subtle); padding: 1px 5px; border-radius: 4px; }
.code code { background: none; }

/* Sign-in */
.btn-block { width: 100%; }
.btn-l .i { width: 20px; height: 20px; }
.btn-primary.btn-l { height: 48px; font-size: 15px; gap: 10px; }
.btn-provider { gap: 10px; }
.btn-provider .auth-mark { width: 24px; height: 24px; }
.auth-help { text-align: center; margin-top: 8px; }
.auth-other { margin-top: 20px; height: 40px; font-weight: 500; }
.auth-foot { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); text-align: center; }
.login-card .field { font-size: 13px; }
.auth-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; }
.auth-mark .i { width: 16px; height: 16px; }
.auth-mark svg:not(.i) { width: 18px; height: 18px; }
.auth-mark.passkey { background: var(--brand-wash); color: var(--brand); }
.auth-mark.google { background: var(--surface); border: 1px solid var(--border); }
.auth-mark.chatgpt { background: #000; color: #fff; }
.auth-mark.password { background: var(--subtle); color: var(--ink-2); }
.auth-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 10px; color: var(--ink); transition: border-color .12s, background .12s; }
a.auth-row:hover { border-color: var(--brand); background: var(--brand-wash); }
.auth-row strong { display: block; font-size: 14px; font-weight: 600; }
.auth-row small { display: block; font-size: 12px; color: var(--ink-2); }
.auth-row > .i { color: var(--muted); }
.auth-row.disabled { opacity: .5; }
.method-list > .method-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--border); }
.method-list > .method-row:first-child { border-top: 0; }
.method-row strong { display: block; font-size: 14px; font-weight: 600; }
.method-row small { display: block; font-size: 12px; color: var(--ink-2); }
.dialog-head > .auth-mark { margin-top: 2px; }
@media (max-width: 720px) { .login { align-items: start; padding: 72px 16px 24px; } .login-card { border: 0; box-shadow: none; background: transparent; padding: 0; } .method-list > .method-row { flex-wrap: wrap; padding: 14px 16px; } }
.consent-sites:has(input[name=all]:checked) .consent-picks { display: none; }
dialog:focus { outline: none; }
/* Alert and schedule rows: on phones the status moves under the title. */
@media (max-width: 720px) {
  .list-row:not([style*="grid-template"]) { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 16px; }
  .list-row:not([style*="grid-template"]) > :first-child { grid-row: 1 / span 2; align-self: start; }
  .list-row:not([style*="grid-template"]) > :nth-child(3):not(:last-child) { grid-column: 2 / -1; grid-row: 2; }
}
.chip-view { display: inline-block; height: 20px; line-height: 18px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; font-weight: 400; }

/* v3: shared bits */
.overline { font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.card-title { font-size: 15px; line-height: 22px; font-weight: 600; }
.dot-mark { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin-right: 6px; vertical-align: middle; }
.status-dot.good { background: var(--success); } .status-dot.bad { background: var(--error); } .status-dot.warn { background: var(--warning); }
.pill-blue { background: var(--blue-wash); color: var(--blue); }
.btn-dark { background: var(--tooltip); border-color: var(--tooltip); color: var(--tooltip-ink); }
.btn-dark:hover { background: var(--tooltip-hover); }
.btn-dark .i { color: var(--tooltip-ink); }
.btn-small { height: 30px; padding: 0 12px; font-size: 13px; }
.btn-replay { height: 30px; padding: 0 12px; font-variant-numeric: tabular-nums; }
.btn-replay .i { width: 12px; height: 12px; fill: currentColor; }
.chip.chip-plain .dot-mark, .chip .dot-mark { margin-right: 2px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.radio-row { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; cursor: pointer; }
.radio-row input { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--brand); flex: none; }
.radio-row strong { display: block; font-size: 14px; font-weight: 500; }
.radio-row small { display: block; font-size: 12px; line-height: 17px; color: var(--ink-2); margin-top: 2px; }
.meter { display: block; height: 6px; border-radius: 3px; background: var(--subtle); overflow: hidden; flex: none; width: 90px; }
.meter i { display: block; height: 100%; border-radius: 3px; background: var(--violet); }
.meter.blue i { background: var(--blue); }
.source-money .meter { width: 100%; margin-top: 8px; }
.source-money strong { display: block; font-size: 14px; font-weight: 500; }
.source-money small { display: block; font-size: 12px; color: var(--ink-2); }
.code-line { font: 12px var(--mono); background: var(--subtle); border-radius: var(--radius-xs); padding: 8px 10px; margin-top: 6px; }

/* Overview cards */
.country-row { display: flex; align-items: center; gap: 12px; font-size: 13px; padding: 4px 0; }
.country-row .meter { width: 34%; } .country-row .meter i { background: var(--brand); }
.country-row strong { width: 36px; text-align: right; font-weight: 500; }
.cc { display: inline-grid; place-items: center; width: 28px; height: 22px; border-radius: 4px; background: var(--subtle); font: 600 11px var(--sans); color: var(--ink-2); flex: none; }
.product-row { display: flex; gap: 12px; align-items: center; font-size: 13px; padding: 4px 0; }
.product-row .n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--subtle); color: var(--ink-2); font-size: 12px; flex: none; }
.product-row strong { font-weight: 500; } .product-row small { display: block; color: var(--ink-2); font-size: 12px; }
.goal-tile { display: flex; justify-content: space-between; align-items: center; background: var(--canvas); border-radius: var(--radius-s); padding: 10px 14px; }
.goal-tile small { display: block; font-size: 12px; color: var(--ink-2); } .goal-tile strong { font: 18px var(--display); }

/* Bar charts (revenue, returning visitors) */
.barchart { display: flex; gap: 10px; align-items: flex-end; height: 220px; padding-top: 18px; }
.barchart-col { flex: 1; min-width: 0; display: grid; grid-template-rows: 1fr 16px; grid-template-columns: minmax(0, 1fr); height: 100%; gap: 8px; text-align: center; }
.barchart-stack { display: flex; flex-direction: column-reverse; justify-content: flex-start; align-items: stretch; height: 100%; }
.barchart-stack span { display: grid; place-items: center; border-radius: 6px 6px 2px 2px; font-size: 11px; font-weight: 600; color: var(--on-brand); min-height: 0; }
.barchart-stack span + span { border-radius: 6px 6px 0 0; margin-bottom: 2px; }
.barchart-col small { font-size: 12px; line-height: 16px; color: var(--ink-2); white-space: nowrap; justify-self: center; }
.barchart-col.best small { color: var(--ink); font-weight: 600; }

/* Retention cohorts */
table.cohorts { border-collapse: separate; border-spacing: 4px; width: 100%; font-size: 13px; }
.cohorts th { font-weight: 500; color: var(--ink-2); text-align: left; padding: 0 4px 6px; white-space: nowrap; }
.cohorts td { white-space: nowrap; }
.cohorts .r { text-align: right; padding-right: 12px; }
.cohorts .cell { display: block; text-align: center; padding: 10px 4px; border-radius: 6px; color: var(--ink); font-weight: 600; }
.cohorts .cell.zero { background: var(--blue-soft); color: var(--blue); }

/* Sessions, replays and the player */
.split-player { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.player { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.player-stage { position: relative; height: 560px; background: var(--player-stage); overflow: hidden; }
.player-frame { position: absolute; inset: 0; }
.player-frame .replayer-wrapper { position: absolute; transform-origin: 0 0; }
.player-frame iframe { border: 0; background: #fff; }
.player-badge { position: absolute; z-index: 2; top: 14px; left: 14px; background: #ffffff1f; color: var(--on-brand); font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 12px; }
.player-status { position: absolute; inset: 0; display: grid; place-items: center; color: var(--on-brand)fffb3; font-size: 14px; }
.player-controls { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.player-play { border-radius: 50%; background: var(--tooltip); color: var(--tooltip-ink); border-color: var(--tooltip); }
.player-play .i { fill: currentColor; width: 14px; height: 14px; }
.player-time { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.player-track { position: relative; flex: 1; height: 6px; border-radius: 3px; background: var(--subtle); cursor: pointer; }
.player-progress { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--ink-2); width: 0; }
.player-mark { position: absolute; top: -5px; width: 3px; height: 16px; border-radius: 2px; background: var(--muted); transform: translateX(-1px); }
.player-mark.error { background: var(--error); } .player-mark.rage { background: var(--brand); } .player-mark.money { background: var(--success); } .player-mark.page { background: var(--ink-2); }
.player-side { max-height: 720px; overflow: auto; }
.player-timeline { padding: 8px 12px 0; }
.tl-seek { width: 100%; border: 0; background: none; text-align: left; border-radius: var(--radius-s); padding-top: 8px; }
.tl-seek:hover { background: var(--canvas); }
.tl-seek::before { top: 24px; }
.tl-alert { background: var(--error-wash); }
.tl-dot.brand { border-color: var(--brand); }
.callout-card { border-left: 3px solid var(--error); }

/* Errors */
.split-detail { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); align-items: start; }
.error-detail .kv { margin-top: 6px; }
.bars { display: inline-flex; gap: 3px; align-items: flex-end; height: 24px; }
.bars i { display: block; width: 7px; border-radius: 2px; background: var(--border-strong); }
tr[aria-selected="true"] .bars i { background: var(--error); }

/* People */
.person-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-wash); color: var(--brand-dark); font-size: 12px; font-weight: 600; flex: none; }
.person-avatar.anonymous { background: var(--subtle); color: var(--muted); }
.split-person { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.journey { display: grid; gap: 14px; padding-top: 6px; }
.journey-item { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; position: relative; }
.journey-item::before { content: ""; position: absolute; left: 7px; top: 20px; bottom: -18px; width: 2px; background: var(--border); }
.journey-item:last-child::before { display: none; }
.journey-dot { width: 16px; height: 16px; margin-top: 14px; border-radius: 50%; border: 2px solid var(--muted); background: var(--surface); position: relative; }
.journey-dot.now { border-color: var(--brand); background: var(--brand); }
.journey-card { background: var(--canvas); border-radius: var(--radius-s); padding: 12px 14px; }
.journey-item.trouble .journey-card { background: var(--brand-wash); border: 1px solid var(--brand-line); }
.identity h2 { font-size: 15px; font-weight: 600; }
.device { padding: 6px 0; } .device strong { display: block; font-size: 13px; font-weight: 500; } .device small { display: block; font-size: 12px; color: var(--ink-2); }
.danger-zone { border-top: 1px solid var(--border); margin-top: 18px; padding-top: 16px; }
.danger-zone .btn-danger { background: var(--surface); color: var(--error); border-color: var(--bad-line); }
.danger-zone .btn-danger:hover { background: var(--error-wash); }

/* Heatmaps */
.seg-wide a { padding: 0 16px; }
.heat-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.heat-preview { background: var(--canvas); padding: 16px; min-height: 150px; display: grid; gap: 8px; align-content: start; border-bottom: 1px solid var(--border); }
.heat-body { padding: 14px 18px 16px; display: grid; gap: 6px; }
.heat-row { display: flex; align-items: center; gap: 10px; font-size: 13px; background: var(--surface); border-radius: 8px; padding: 6px 10px; }
.heat-row span.grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heat-blob { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle, #d64937 0, #f2a541 55%, #f2a54100 100%); flex: none; }
.scroll-strip { display: grid; grid-template-rows: repeat(20, 1fr); height: 150px; border-radius: 8px; overflow: hidden; background: var(--surface); }
.attention-strip { display: grid; gap: 3px; }
.attention-strip div { display: grid; grid-template-columns: 1fr 36px 44px; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-2); }
.attention-strip span { display: block; height: 8px; border-radius: 4px; background: var(--brand); opacity: .75; }
.attention-strip b { font-weight: 500; text-align: right; }

/* Search */
.table th.onsite, .table td.onsite { background: var(--subtle); }
.look { background: var(--canvas); border-left: 3px solid var(--warning); border-radius: var(--radius-s); padding: 12px 14px; }
.look small { display: block; font-size: 12px; color: var(--ink-2); } .look strong { display: block; margin: 2px 0 6px; } .look p { font-size: 13px; margin-bottom: 8px; }

/* Settings v3 */
.mode-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mode-card { position: relative; display: grid; gap: 8px; align-content: start; padding: 16px 16px 14px 46px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; background: var(--surface); }
.mode-card input { position: absolute; left: 16px; top: 20px; width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.mode-card:has(input:checked) { border: 2px solid var(--brand); padding: 15px 15px 13px 45px; background: var(--brand-wash); }
.mode-title { font: 22px/30px var(--display); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mode-card > small { font-size: 13px; line-height: 19px; color: var(--ink-2); }
.mode-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.mode-card li::before { content: "✓"; color: var(--success); display: inline-block; width: 18px; }
.mode-card li.no { color: var(--ink-2); } .mode-card li.no::before { content: "–"; color: var(--muted); }
.mode-sees { font-size: 12px; color: var(--ink-2); background: var(--canvas); border-radius: var(--radius-xs); padding: 8px 10px; }
.banner-preview { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-pop); background: #fff; font-size: 13px; line-height: 19px; }
.banner-preview p { margin-bottom: 10px; } .banner-preview .btn { pointer-events: none; }
.key-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; background: var(--canvas); border-radius: var(--radius-s); padding: 10px 14px; }
.key-row strong { display: block; font-size: 14px; font-weight: 500; } .key-row small { display: block; font-size: 12px; color: var(--ink-2); }
.integration { display: flex; flex-direction: column; }
.integration .icon-tile { font-size: 12px; font-weight: 600; background: var(--blue-wash); color: var(--blue); }
.integration strong { display: block; font-size: 15px; }
.status-line { display: block; font-size: 12px; color: var(--ink-2); }
.sends { font-size: 12px; color: var(--ink-2); background: var(--canvas); border-radius: var(--radius-s); padding: 10px 12px; margin-bottom: 14px; }
.integration-form summary { list-style: none; display: inline-flex; }
.integration-form summary::-webkit-details-marker { display: none; }
.table.team td { vertical-align: middle; }
.invite { gap: 8px; }

/* Public dashboards */
.public { max-width: 1160px; margin: 0 auto; padding: 32px 24px 24px; }
.public.embed { padding-top: 16px; }
.public-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.public-head strong { display: block; font-size: 15px; } .public-head small { display: block; font-size: 12px; color: var(--ink-2); }
.public-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; font-size: 12px; color: var(--ink-2); }
.overview-cards { align-items: stretch; }

@media (max-width: 1180px) {
  .split-player, .split-person, .split-detail { grid-template-columns: minmax(0, 1fr); }
  .mode-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .player-stage { height: 360px; }
  .barchart { height: 160px; gap: 4px; }
  .barchart-col:nth-child(even) small { visibility: hidden; }
  .key-row { grid-template-columns: minmax(0, 1fr) auto; }
  .key-row .hint { display: none; }
  .player-controls { flex-wrap: wrap; }
  .player-track { order: 9; flex-basis: 100%; margin: 6px 0 4px; }
  .table td.journey { white-space: normal; overflow-wrap: anywhere; }
}

/* Page pieces: details of one component or page. */
.input.input-xs { width: 120px; }
.input.input-s { width: 140px; }
.input.input-l { width: 200px; max-width: 100%; }
.input.input-m { max-width: 360px; }
.input.input-name { max-width: 220px; }
.input.input-email { max-width: 280px; }
.input.input-domain { max-width: 260px; }
.input.on-white { background: var(--surface); }
.example-label { margin: 16px 0 6px; }
.subhead { font-size: 13px; margin-bottom: 10px; }
.avatar.avatar-dot { width: 10px; height: 10px; }
.hint.hint-13 { font-size: 13px; line-height: 20px; }
.card-head.campaigns-head { padding: 16px 16px 14px 20px; }
.col-menu { width: 48px; }
.wizard { max-width: 640px; margin: 24px auto 0; }
.wizard.wizard-wide { max-width: 980px; }
.title.wizard-title { font: 600 22px/28px var(--sans); }
.input.input-big { height: 40px; font-size: 15px; }
.snippet-note { color: var(--muted); margin-top: 12px; font-family: var(--sans); }
.skip-later { margin: 28px 0 0 40px; }
.list-row.paused { opacity: .6; }
.swatch.swatch-violet { background: var(--violet); }
.swatch.swatch-violet-pale { background: var(--violet-pale); }
.bar-browser { background: var(--violet-pale); }
.bar-confirmed { background: var(--violet); }
.pad-under { padding: 0 20px 18px; }
.search-box.search-box-wide { width: min(340px, 100%); }
.metric-value.metric-value-s { font-size: 24px; }
.card.funnel-card { display: grid; gap: 12px; }
.funnel-mini { gap: 4px; align-items: flex-end; height: 56px; flex-wrap: nowrap; }
.funnel-mini > span { flex: 1; border-radius: 4px 4px 2px 2px; background: var(--brand); }
.card-title.form-title { margin: 2px 0 4px; }
.add-tile.add-step { width: 100%; margin-top: 10px; padding: 10px; display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.input.step-kind { width: 96px; height: 32px; }
.input.step-match { height: 32px; }
.card-head.funnel-head { padding: 18px 20px 0; }
.input.input-path { width: 280px; }
.chip.segment-chip { padding-right: 4px; }
.segment-chip > a { display: inline-flex; gap: 6px; align-items: center; width: auto; height: auto; }
.btn.btn-tiny { width: 22px; height: 22px; }
.rank-value.rank-value-text { font: 13px var(--sans); }
.chips.chips-bar { margin: 0 0 14px; }
.card-head.side-head { padding: 16px 18px 6px; }
.metric-value.metric-value-path { font-size: 22px; line-height: 44px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-between.top { align-items: flex-start; }
.mark.mark-chatgpt { background: var(--ink); color: var(--surface); }
.brand.flush-pad { padding: 0; }
/* Phones keep the full-width bottom sheet every dialog becomes there. */
@media (min-width: 721px) { .dialog.dialog-narrow { width: min(420px, calc(100vw - 32px)); } }
.dialog-foot.dialog-foot-plain { justify-content: flex-start; border: 0; padding-top: 0; }
.site-avatar.site-avatar-s { width: 22px; height: 22px; font-size: 12px; }
.link.add-condition { border: 0; background: none; padding: 12px 0 4px; display: inline-flex; gap: 6px; align-items: center; }
.input.input-op { width: 88px; }
.input.input-number { width: 90px; }
.spark.spark-preview { height: 64px; margin: 8px 0; }
.sheet-head.ask-head { padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.menu-label.flush-left { padding-left: 0; }
.menu-item.followup { background: var(--canvas); white-space: normal; }
.badge.badge-brand { background: var(--brand-wash); color: var(--brand-dark); }
.callout.callout-tight { padding: 8px 12px; margin: 6px 0 12px; }
.login-card.login-card-wide { width: min(460px, 100%); }
.card.consent-sites { padding: 6px 16px; }
.check.consent-all { padding: 8px 0; }
.check.consent-pick { padding: 8px 0 8px 28px; }
.bad.error-title { font-size: 16px; line-height: 22px; margin: 4px 0 14px; }
.hint.error-note { margin: 12px 0 16px; }
.card.card-selected { border-color: var(--brand); }
.metric-value.metric-value-l { font-size: 30px; line-height: 40px; }
.dist-good { background: var(--success); }
.dist-warn { background: var(--warning); }
.dist-poor { background: var(--error); }
.swatch.swatch-blue { background: var(--blue); }
.swatch.swatch-blue-pale { background: var(--blue-pale); }
.bar-new { background: var(--blue-pale); }
.bar-returning { background: var(--blue); }
.pulse.pulse-warn { background: var(--warning); box-shadow: 0 0 0 4px var(--warn-line); }
.pulse.pulse-ok { background: var(--success); box-shadow: 0 0 0 4px var(--good-line); animation: none; }
.input.input-xl { width: 240px; }
.card-head.table-head { padding: 18px 20px 6px; }
.card-head.search-head { padding: 16px 16px 14px; }
.search-box { width: min(320px, 100%); position: relative; }
.search-icon { position: absolute; left: 12px; color: var(--muted); display: flex; }
.search-box .input { padding-left: 36px; }
.reach { width: 45%; height: 6px; border-radius: 3px; background: var(--subtle); overflow: hidden; }
.reach > span { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.reach-pct { width: 40px; text-align: right; }
.rank-pct.strong-pct { color: var(--ink); font-weight: 600; }
.avatar.avatar-direct { background: none; color: var(--ink-2); }
.site-avatar.site-avatar-l { width: 36px; height: 36px; font-size: 20px; }
.card-head.method-head { padding: 16px 20px 4px; }
.passkey-error { margin: 0 20px 16px; }
.pop-280 { width: 280px; }
.steps-20 { gap: 20px; }
.step-help-6 { color: var(--ink-2); margin: -6px 0 10px; }
.code-plain { background: var(--subtle); color: var(--ink); }
.card-pad { padding: 16px 20px; }
.cell-wide { max-width: 360px; }
.list-row-2 { grid-template-columns: minmax(0, 1fr) auto; }
.grid-port { grid-template-columns: minmax(0, 1fr) 120px; gap: 12px; }
.seg-fill { display: flex; }
.seg-fill > * { flex: 1; }
.callout-block { display: block; }
.steps-list { padding-left: 18px; margin: 0; font-size: 13px; line-height: 20px; }
.steps-loose { gap: 22px; }
.step-help { margin: -4px 0 10px; color: var(--ink-2); }
.provider-card { padding: 16px 12px 12px; }
.provider-title { padding: 0 8px 12px; gap: 12px; }
.meter-line { height: 4px; border-radius: 2px; background: var(--subtle); margin-top: 6px; width: 200px; }
.meter-line > div { height: 100%; border-radius: 2px; background: var(--brand); }
.subnav-who { padding: 4px 10px; }
button.link { border: 0; background: none; }
.subnav button.nav { border: 0; background: none; width: 100%; }
details > summary { cursor: pointer; }
.consent-bar { height: 18px; margin-bottom: 16px; }
.consent-legend { gap: 6px 32px; }

/* Utilities: generic one-offs. Last, so they win. */
.block { display: block; }
.contents { display: contents; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.flush { margin: 0; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.ink { color: var(--ink); }
.ink-2 { color: var(--ink-2); }
.inline { display: inline; }
.lh-20 { line-height: 20px; }
.lh-22 { line-height: 22px; }
.mb-6 { margin-bottom: 6px; }
.mb-8 { margin-bottom: 8px; }
.mb-10 { margin-bottom: 10px; }
.mb-12 { margin-bottom: 12px; }
.mb-14 { margin-bottom: 14px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-28 { margin-bottom: 28px; }
.medium { font-weight: 500; }
.min-0 { min-width: 0; }
.ml-auto { margin-left: auto; }
.mt-4 { margin-top: 4px; }
.mt-6 { margin-top: 6px; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.mt-16 { margin-top: 16px; }
.mt-18 { margin-top: 18px; }
.mt-20 { margin-top: 20px; }
.mt-28 { margin-top: 28px; }
.mt-32 { margin-top: 32px; }
.my-8 { margin: 8px 0; }
.my-12 { margin: 12px 0; }
.nobreak { white-space: nowrap; }
.nowrap { flex-wrap: nowrap; }
.on-canvas { background: var(--canvas); }
.pad-10 { padding: 10px; }
.pad-20 { padding: 20px; }
.regular { font-weight: 400; }
.self-start { justify-self: start; }
.span-all { grid-column: 1 / -1; }
.start { justify-content: flex-start; }
.strong { font-weight: 600; }
.t-12 { font-size: 12px; }
.t-13 { font-size: 13px; }
.t-14 { font-size: 14px; }
.t-15 { font-size: 15px; }

/* Live */
.live-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.live-hero { display: grid; align-content: start; gap: 4px; }
.live-count { font-size: 72px; line-height: 84px; }
.live-minutes-label { margin-top: 18px; }
.live-minutes { display: flex; align-items: flex-end; gap: 4px; height: 96px; margin-top: 10px; }
.live-minutes span { flex: 1; min-height: 3px; border-radius: 3px 3px 1px 1px; background: var(--brand); }
.live-minutes span.now { background: var(--brand-line); }
.live-minutes span.zero { background: var(--border); }
.live-tag { display: inline-flex; gap: 8px; background: var(--good-bg); color: var(--success); }
.live-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--good-line); }
.live-tag.quiet { background: var(--subtle); color: var(--ink-2); }
.live-tag.quiet::before { background: var(--muted); box-shadow: none; }
/* More (phones) */
.more-head { margin: 18px 14px 8px; }
.more-list { display: grid; }
.more-row { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 14px; font-size: 16px; }
.more-row + .more-row { border-top: 1px solid var(--border); }
.more-row .i { color: var(--ink-2); width: 20px; height: 20px; }
.more-row span { flex: 1; }
.more-row .i:last-child { width: 15px; height: 15px; color: var(--muted); }
.feed-row { display: grid; grid-template-columns: 90px minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) 90px; gap: 16px; align-items: center; padding: 11px 20px; border-top: 1px solid var(--border); font-size: 13px; }
.feed-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-head { padding: 8px 20px; border: 0; background: var(--canvas); font-size: 12px; font-weight: 600; color: var(--ink-2); }
@media (max-width: 960px) { .live-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .card-flush .card-head { padding-left: 16px; padding-right: 16px; }
  .feed-head { display: none; }
  .feed-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "path when" "meta when"; gap: 2px 12px; padding: 11px 16px; }
  .feed-row:nth-child(2) { border-top: 0; }
  .feed-path { grid-area: path; font-size: 15px; }
  .feed-when { grid-area: when; font-size: 13px; }
  .feed-source { grid-area: meta; font-size: 12px; color: var(--ink-2); }
  .feed-country, .feed-device { display: none; }
}
