/* Atlas — "the season, planned", in a calm workspace.
   V3 (30 Sep 2026): a warm neutral canvas, one ink colour for every grey, hairline borders
   instead of heavy rules and shadows, a light sidebar, compact controls with a bevelled
   primary button, sunken pill toggles, and colour kept for meaning (charts, status).
   The Overview headline keeps Bricolage Grotesque. Principles adapted from Lovable's app
   (studied 30 Sep); no brand assets, gradient or typeface copied.

   Headlines are sentences that answer the page's question, set in Bricolage Grotesque;
   everything else in Schibsted Grotesk. Chart colours are checked for colour-blind
   separation (dataviz validator), light and dark. The V3 component layer is at the end. */

@font-face { font-family: "Bricolage"; src: url("/static/fonts/bricolage.woff") format("woff");
  font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Schibsted"; src: url("/static/fonts/schibsted.woff") format("woff");
  font-weight: 400 900; font-display: swap; }

:root {
  --paper: #f7f6f3; --sheet: #fdfdfb; --raised: #ffffff; --ink: #1c1b19; --ink-2: #5a5752; --ink-3: #6e6b65;
  --rule: #e9e7e2; --rule-soft: #f0eeea; --rule-strong: #d8d5ce;
  --cover: #f1f0ec; --cover-ink: #1c1b19; --cover-muted: #6e6b65; --cover-hover: rgba(28, 27, 25, 0.05); --cover-on: rgba(28, 27, 25, 0.07);
  --night: #1c1b19; --night-ink: #f3f2ee; --night-muted: #a9a59d;
  --mark: #ffd84d; --mark-soft: rgba(255, 216, 77, 0.42);
  --accent: #1f64b8; --tint: rgba(28, 27, 25, 0.045); --ring: rgba(42, 120, 214, 0.24);
  --series1: #2a78d6; --series2: #eb6834; --series3: #1baf7a; --series4: #eda100; --series5: #e87ba4; --series6: #008300; --series7: #4a3aa7; --series8: #e34948;
  --cmp: #e7e1d6; --cmp-line: #aca391; --series1-soft: rgba(42, 120, 214, 0.1);
  --good: #1a8f3c; --warning: #e0a100; --serious: #e2703f; --critical: #d03b3b;
  --good-ink: #147034; --bad-ink: #bb2f2f;
  --warning-mark: #b07d00; --seg-on: #ffffff;
  --shadow-sm: 0 1px 2px rgba(28, 27, 25, 0.06);
  --shadow-pop: 0 1px 2px rgba(28, 27, 25, 0.04), 0 8px 24px rgba(28, 27, 25, 0.1), 0 0 0 1px rgba(28, 27, 25, 0.06);
  --bevel: inset 0 0.5px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 0.5px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.06);
  --ease: cubic-bezier(.2, 0, 0, 1);
  /* aliases kept for older markup */
  --surface: var(--sheet); --page: var(--paper); --grid: var(--rule); --baseline: var(--rule-strong); --muted: var(--ink-3);
  --display: "Bricolage", ui-sans-serif, system-ui, sans-serif;
  --text: "Schibsted", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 6px; --r: 8px; --r-md: 12px; --r-lg: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111110; --sheet: #181817; --raised: #1f1f1d; --ink: #f3f2ee; --ink-2: #b6b2aa; --ink-3: #86827b;
    --rule: #292826; --rule-soft: #212120; --rule-strong: #3a3936;
    --cover: #0c0c0b; --cover-ink: #eceae5; --cover-muted: #8b877f; --cover-hover: rgba(255, 255, 255, 0.05); --cover-on: rgba(255, 255, 255, 0.08);
    --night: #0c0c0b; --night-ink: #f3f2ee; --night-muted: #9c988f;
    --mark: #f5cf45; --mark-soft: rgba(245, 207, 69, 0.22);
    --accent: #6ea8f0; --tint: rgba(255, 255, 255, 0.055); --ring: rgba(110, 168, 240, 0.3);
    --series1: #3987e5; --series2: #d95926; --series3: #199e70; --series4: #c98500; --series5: #d55181; --series6: #008300; --series7: #9085e9; --series8: #e66767;
    --cmp: #34312b; --cmp-line: #787062; --series1-soft: rgba(57, 135, 229, 0.14);
    --good: #3fbf62; --warning: #f0b92a; --serious: #ee8a5c; --critical: #ef5d5d;
    --good-ink: #5fd07d; --bad-ink: #f27d74;
    --warning-mark: #f0b92a; --seg-on: #2c2b29;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-pop: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.07);
    --bevel: inset 0 0.5px 0 rgba(255, 255, 255, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --paper: #111110; --sheet: #181817; --raised: #1f1f1d; --ink: #f3f2ee; --ink-2: #b6b2aa; --ink-3: #86827b;
    --rule: #292826; --rule-soft: #212120; --rule-strong: #3a3936;
    --cover: #0c0c0b; --cover-ink: #eceae5; --cover-muted: #8b877f; --cover-hover: rgba(255, 255, 255, 0.05); --cover-on: rgba(255, 255, 255, 0.08);
    --night: #0c0c0b; --night-ink: #f3f2ee; --night-muted: #9c988f;
    --mark: #f5cf45; --mark-soft: rgba(245, 207, 69, 0.22);
    --accent: #6ea8f0; --tint: rgba(255, 255, 255, 0.055); --ring: rgba(110, 168, 240, 0.3);
    --series1: #3987e5; --series2: #d95926; --series3: #199e70; --series4: #c98500; --series5: #d55181; --series6: #008300; --series7: #9085e9; --series8: #e66767;
    --cmp: #34312b; --cmp-line: #787062; --series1-soft: rgba(57, 135, 229, 0.14);
    --good: #3fbf62; --warning: #f0b92a; --serious: #ee8a5c; --critical: #ef5d5d;
    --good-ink: #5fd07d; --bad-ink: #f27d74;
    --warning-mark: #f0b92a; --seg-on: #2c2b29;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-pop: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.07);
    --bevel: inset 0 0.5px 0 rgba(255, 255, 255, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
/* hidden means hidden, whatever display a class sets (the chart tooltip stayed on screen without this) */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--text);
  -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 0; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 600; }
h2 { font-family: var(--display); font-size: 1.5rem; letter-spacing: -0.015em; font-variation-settings: "opsz" 36; }
h3 { font-size: 1rem; }
p { margin: 0 0 8px; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
code { font-size: 0.875em; background: var(--paper); border: 1px solid var(--rule); padding: 1px 5px; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.quiet { color: var(--ink-2); }
.small { font-size: 0.875rem; }
.note, .meta { font-size: 0.8125rem; color: var(--ink-3); margin: 4px 0 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 8px; z-index: 60; }
.skip-link:focus { left: 8px; }
.icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon .icon-cut { stroke-width: 1.8; }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- controls */
button, .btn {
  font: 600 0.9375rem/1 var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r); border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper); cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
button:hover, .btn:hover { background: color-mix(in srgb, var(--ink) 86%, var(--accent)); }
button.ghost, .btn.secondary, .custom-range button { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
button.ghost:hover, .btn.secondary:hover, .custom-range button:hover { border-color: var(--ink); background: transparent; }
button.link { background: none; border: 0; min-height: 0; padding: 0; color: inherit; font-weight: 500; text-decoration: underline; }
input, select {
  font: 400 0.9375rem var(--text); min-height: 44px; padding: 0 12px; border-radius: var(--r);
  border: 1px solid var(--rule-strong); background: var(--sheet); color: var(--ink);
}
input:focus, select:focus { outline: 3px solid var(--tint); outline-offset: 0; border-color: var(--accent); }
input[type="file"] { padding: 9px 12px; }
label { font-size: 0.875rem; font-weight: 500; }

/* ---------------------------------------------------------------- frame: the cover and its tabs */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--cover); color: var(--cover-ink); position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 22px; padding: 22px 0 20px 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--cover-ink); text-decoration: none; padding-right: 16px;
  font: 700 1.375rem/1 var(--display); letter-spacing: -0.02em; font-stretch: 90%; }
.mark { width: 18px; height: 18px; border-radius: 50%; border: 3px solid currentColor; position: relative; flex: none; }
.mark::after { content: ""; position: absolute; left: -3px; right: -3px; top: 5px; height: 2px; background: currentColor; }
.client { display: flex; align-items: center; gap: 8px; margin-right: 16px; font-size: 0.875rem; font-weight: 600; color: var(--cover-ink);
  padding: 10px 12px; border: 1px solid rgba(255,255,255,0.12); border-radius: var(--r); }
.client-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mark); flex: none; }
.nav-scroll { display: flex; flex-direction: column; gap: 16px; }
.nav-group { display: grid; gap: 2px; }
.nav-label { margin: 0 0 4px; padding-left: 12px; font-size: 0.8125rem; color: var(--cover-muted); }
.side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.side ul a { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 16px 0 12px; border-radius: var(--r) 0 0 var(--r);
  color: var(--cover-ink); text-decoration: none; font-weight: 500; font-size: 0.9375rem; opacity: 0.86; }
.side ul a .icon { color: var(--cover-muted); }
.side ul a:hover { background: var(--cover-hover); opacity: 1; }
/* the open tab joins the page, like a divider tab */
.side ul a[aria-current="page"] { background: var(--paper); color: var(--ink); opacity: 1; font-weight: 650; }
.side ul a[aria-current="page"] .icon { color: var(--accent); }
.side-foot { margin-top: auto; display: grid; gap: 10px; padding-right: 16px; font-size: 0.875rem; color: var(--cover-muted); }
.side-foot .link { color: var(--cover-muted); }
.switcher { display: grid; gap: 4px; }
.switcher label { color: var(--cover-muted); }

.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 10px 56px; background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.topbar-title { color: var(--ink-2); font-weight: 600; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px 0 4px; margin-left: -4px;
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 0.9375rem; border-radius: var(--r); }
.back:hover { color: var(--ink); background: var(--tint); }
.topbar-end { display: flex; align-items: center; gap: 16px; }
.fresh { display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--ink-2); white-space: nowrap; }
.fresh-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--rule); border-radius: 999px; background: var(--sheet); }
.theme-opt { width: 38px; min-height: 38px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--ink-3); }
.theme-opt:hover { background: var(--tint); color: var(--ink); }
.theme-opt[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.main { width: 100%; max-width: 1320px; padding: 16px 56px 112px; }

/* ---------------------------------------------------------------- page head: answer first */
.page-head { margin: 8px 0 40px; max-width: 64rem; }
.page-name { font-size: 0.9375rem; font-weight: 600; color: var(--ink-2); margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.page-name::before { content: ""; width: 22px; height: 8px; border-radius: 2px; background: var(--mark); }
.lede { font-family: var(--display); font-weight: 620; font-size: clamp(2rem, 1.2rem + 2.6vw, 3.25rem); line-height: 1.06;
  letter-spacing: -0.012em; font-stretch: 92%; font-variation-settings: "opsz" 72; max-width: 24ch; text-wrap: balance; }
.intro { margin: 16px 0 0; font-size: 1.125rem; color: var(--ink-2); max-width: 62ch; line-height: 1.5; }
section { margin-bottom: 64px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 16px; }
.section-head h2, section > h2 { margin-bottom: 16px; }
.section-head h2 { margin: 0; }

/* ---------------------------------------------------------------- banners and notices */
.banner, .notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin: 0 0 16px; max-width: 80ch;
  border-left: 3px solid var(--accent); background: var(--sheet); border-radius: 0 var(--r) var(--r) 0; color: var(--ink); }
.banner .icon { color: var(--accent); margin-top: 3px; }
.banner.error { border-left-color: var(--critical); } .banner.error .icon { color: var(--critical); }
.banner.warn { border-left-color: var(--warning); } .banner.warn .icon { color: var(--warning); }
.notice { border-left-color: var(--good); } .notice .icon { color: var(--good); margin-top: 3px; }
.setup { display: flex; gap: 14px; padding: 18px 20px; margin: 0 0 32px; background: var(--sheet); border-radius: var(--r);
  border-left: 3px solid var(--critical); }
.setup .icon { color: var(--critical); width: 20px; height: 20px; margin-top: 2px; }
.setup p:last-child { margin: 0; color: var(--ink-2); }

/* ---------------------------------------------------------------- the season strip */
.season-strip { margin: -8px 0 56px; }
.chart.strip { width: 100%; height: auto; display: block; overflow: visible; }
.strip .grid { stroke: var(--rule); stroke-dasharray: 2 4; }
.strip .tick { fill: var(--ink-3); font: 500 13px var(--text); }
.strip .month { fill: var(--ink-2); font: 600 14px var(--text); }
.strip .month-rule { stroke: var(--rule-strong); stroke-width: 1; }
.strip .baseline { stroke: var(--ink); stroke-width: 1.5; }
.strip .ghost { fill: none; stroke: var(--ink-3); stroke-width: 1.25; stroke-dasharray: 3 2; }
.strip .bar { fill: var(--series1); }
.strip .now-label { fill: var(--ink); font: 700 13px var(--text); }
.strip .bar-g:hover .ghost, .strip .bar-g.on .ghost { stroke: var(--ink); }
.strip .bar-g.on .bar { fill: color-mix(in srgb, var(--series1) 80%, var(--ink)); }
.strip-key { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; font-size: 0.875rem; color: var(--ink-2); }
.key-solid, .key-ghost { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.key-solid { background: var(--series1); }
.key-ghost { border: 1.25px dashed var(--ink-3); margin-left: 10px; }

/* ---------------------------------------------------------------- the spread: main column + margin notes */
.spread { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; margin-bottom: 64px; }
.spread-main > section:last-child { margin-bottom: 0; }
.margin { position: sticky; top: 84px; margin: 0; padding-left: 28px; border-left: 1px solid var(--rule-strong); }
.margin h2 { font-size: 1.25rem; margin-bottom: 16px; }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.note-item { position: relative; padding-left: 16px; }
.note-item::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 4px; width: 3px; border-radius: 2px; background: var(--ink-3); }
.note-item.sev-critical::before { background: var(--critical); }
.note-item.sev-serious::before { background: var(--serious); }
.note-item.sev-warning::before { background: var(--warning); }
.note-money { font: 650 1.25rem/1.2 var(--display); letter-spacing: -0.02em; margin: 0 0 4px; font-variant-numeric: tabular-nums; }
.note-finding { font-weight: 600; font-size: 0.9375rem; line-height: 1.4; margin: 0 0 6px; }
.note-action { font-size: 0.875rem; color: var(--ink-2); line-height: 1.45; margin: 0; }

/* ---------------------------------------------------------------- filter bar: one compact sticky row */
.period-bar { position: sticky; top: 64px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  margin: 0 0 28px; padding: 8px 0; background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.seg a, .seg .disabled { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: var(--r-sm);
  color: var(--ink-2); text-decoration: none; font-size: 0.9375rem; font-weight: 500; position: relative; }
.seg a:hover { color: var(--ink); background: var(--tint); }
.seg a[aria-current="true"] { color: var(--ink); font-weight: 650; background: var(--sheet); box-shadow: inset 0 -2px 0 var(--accent); }
.seg .disabled { color: var(--ink-3); cursor: not-allowed; text-decoration: line-through; text-decoration-thickness: 1px; }
.seg.compare a, .seg.grain a { font-size: 0.875rem; min-height: 36px; }
/* segmented pills: a sunken track with the chosen option raised */
.seg.pills { flex-wrap: nowrap; gap: 2px; padding: 3px; border-radius: 9px; background: color-mix(in srgb, var(--ink) 6%, transparent); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.spread-main, .spread > * { min-width: 0; }
.chart-switches .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg.pills a { min-height: 32px; padding: 0 11px; font-size: 0.875rem; border-radius: 7px; white-space: nowrap; }
.seg.pills a:hover { background: color-mix(in srgb, var(--sheet) 60%, transparent); }
.chart-switches .seg { flex-wrap: nowrap; gap: 2px; padding: 3px; border-radius: 9px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.chart-switches .seg a, .chart-switches .seg .disabled { min-height: 30px; padding: 0 10px; font-size: 0.8125rem; border-radius: 7px; }
.range-label { margin-left: auto; font-size: 0.8125rem; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.custom-pop { position: relative; }
.custom-pop summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px;
  border: 1px solid var(--rule-strong); border-radius: 9px; font-size: 0.875rem; font-weight: 500; color: var(--ink-2); background: var(--sheet); }
.custom-pop summary::-webkit-details-marker { display: none; }
.custom-pop summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: 2px; }
.custom-pop[data-on] summary { color: var(--ink); font-weight: 650; border-color: var(--ink); }
.custom-pop[open] .custom-range { position: absolute; top: calc(100% + 6px); left: 0; z-index: 25; padding: 14px; background: var(--sheet);
  border: 1px solid var(--rule); border-radius: var(--r); box-shadow: var(--shadow-pop); flex-wrap: nowrap; }
.custom-range { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.875rem; }
.custom-range label { color: var(--ink-2); font-weight: 500; }
.custom-range input[type="date"] { min-height: 38px; padding: 0 10px; }
.custom-range button { min-height: 38px; }

/* ---------------------------------------------------------------- figures: a ruled strip, not a wall of cards */
.figure-row, .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 0 0 8px;
  border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--rule); }
/* each figure carries a rule on its left; the one at the start of a row is clipped away */
.figure-row, .tiles { overflow: hidden; }
.fig, .tile { padding: 18px 20px; margin: 0 0 0 -1px; border-left: 1px solid var(--rule); display: grid; align-content: start; gap: 4px; min-width: 0; }
.fig dt, .tile h3 { font-size: 0.875rem; font-weight: 500; color: var(--ink-2); }
.fig dd { margin: 0; }
.fig-value, .tile .value { font: 620 2rem/1.1 var(--display); letter-spacing: -0.01em; font-stretch: 92%; font-variant-numeric: tabular-nums; margin: 2px 0; }
.fig-cmp, .cmp { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 0.8125rem; margin: 0; }
.vs { color: var(--ink-3); }
.delta { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-variant-numeric: tabular-nums; }
.delta.good { color: var(--good-ink); } .delta.bad { color: var(--bad-ink); } .delta.flat { color: var(--ink-2); }
.delta .icon { width: 13px; height: 13px; }
.fig-spark .spark { margin-top: 6px; }
.spark { width: 100%; max-width: 180px; height: 34px; display: block; }
.spark-line { fill: none; stroke: var(--series1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-cmp { fill: none; stroke: var(--ink-3); stroke-width: 1.25; stroke-dasharray: 3 2; stroke-linejoin: round; }
.spark-dot { fill: var(--series1); }
.tile .note { font-size: 0.75rem; }
/* period tiles you can click to chart */
.tile.tab { color: var(--ink); text-decoration: none; cursor: pointer; position: relative; transition: background-color .15s; }
.tile.tab:hover { background: var(--tint); }
.tile.tab.on::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent); }
.chart-hint { font-size: 0.75rem; color: var(--ink-3); margin-top: 4px; }
.tile.tab.on .chart-hint { color: var(--accent); font-weight: 650; }
.standing { font-size: 1.25rem; margin: 16px 0 6px; }
.standing-note { margin-bottom: 16px; }

/* ---------------------------------------------------------------- period section and charts */
.period { margin-bottom: 64px; }
.period-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 18px; }
.period-head h2 { font-size: 1.375rem; }
.period-head .note { width: 100%; }
.period-tiles { margin-bottom: 24px; }
.chart-pick { margin-bottom: 12px; }
.panel, .block { background: var(--sheet); border-radius: var(--r-lg); padding: 24px 28px; margin: 0; }
.block { margin-bottom: 40px; }
.block h2 { font-size: 1.375rem; }
.block > .meta { margin: 2px 0 18px; }
.period-panel { padding: 22px 26px 18px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.chart-head h3 { font: 600 1.0625rem var(--display); }
.chart-narrow { display: none; }
.chart-switches { display: flex; flex-wrap: wrap; gap: 8px; }
.chart-sum { margin: 2px 0 0; font-size: 0.8125rem; color: var(--ink-2); }
.chart-key { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 0.8125rem; color: var(--ink-2); }
.trend { margin-top: 20px; }
.trend .chart-pick { margin: 0 0 14px; }
/* time columns: this period solid, the comparison an outlined ghost behind it */
.chart.cols .grid { stroke: var(--rule); stroke-dasharray: 2 4; }
.chart.cols .baseline { stroke: var(--ink); stroke-width: 1.25; }
.chart.cols .tick.x { fill: var(--ink-2); font-weight: 600; }
.chart.cols .month-rule { stroke: var(--rule-strong); stroke-width: 1; }
.chart.cols .bar { fill: var(--series1); }
.chart.cols .bar.peak { fill: color-mix(in srgb, var(--series1) 82%, var(--ink)); }
.chart.cols .ghost { fill: color-mix(in srgb, var(--ink-3) 14%, transparent); stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2.5 2; }
.chart.cols .avg { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 5 4; }
.chart.cols .peak-label { fill: var(--ink); font: 700 12.5px var(--text); paint-order: stroke; stroke: var(--sheet); stroke-width: 4px; }
.chart.cols .bar-g:hover .bar, .chart.cols .bar-g.on .bar { fill: color-mix(in srgb, var(--series1) 75%, var(--ink)); }
.chart.cols .bar-g:hover .ghost, .chart.cols .bar-g.on .ghost { stroke: var(--ink); }
.chart.cols .bar-g:hover .hit, .chart.cols .bar-g.on .hit { fill: color-mix(in srgb, var(--ink) 5%, transparent); }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(460px, 1fr)); gap: 24px; }
.panel figcaption { margin-bottom: 12px; }
.panel figcaption h3 { font: 600 1.0625rem var(--display); }
.panel figcaption p { color: var(--ink-2); font-size: 0.875rem; margin: 2px 0 0; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .baseline { stroke: var(--rule-strong); stroke-width: 1; }
.chart .tick { fill: var(--ink-3); font: 500 13px var(--text); }
.chart .line { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.chart .line-cmp { stroke-width: 1.75; stroke-dasharray: 4 3; }
.chart .area { fill-opacity: 0.1; stroke: none; }
.chart .dot { stroke: var(--sheet); stroke-width: 2; }
.chart .end-label { fill: var(--ink); font: 700 13px var(--text); }
.chart .hit { fill: transparent; }
.chart .xh { stroke: var(--ink-2); stroke-width: 1; opacity: 0; }
.chart .col.on .xh { opacity: 0.55; }
.chart .bar-g.on .bar { opacity: 0.82; }
.chart .connector { stroke: var(--rule-strong); stroke-width: 1; }
.chart .hlabel { fill: var(--ink); font: 500 14px var(--text); }
.chart .hsub, .chart .hvalue { fill: var(--ink-2); font: 500 13px var(--text); }
.chart .hlabel.strong, .chart .hvalue.strong { font-weight: 700; fill: var(--ink); }
.chart.split { height: 14px; width: 100%; }
.chart-empty { color: var(--ink-3); padding: 24px 0; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; padding: 0; font-size: 0.875rem; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.key-line { width: 16px; height: 2px; border-radius: 1px; display: inline-block; }
.sw-series1 { background: var(--series1); } .sw-series2 { background: var(--series2); } .sw-series3 { background: var(--series3); }
.sw-series4 { background: var(--series4); } .sw-series5 { background: var(--series5); } .sw-series6 { background: var(--series6); }
.sw-critical { background: var(--critical); }
.tip { position: fixed; z-index: 100; pointer-events: none; display: grid; gap: 4px; min-width: 150px; max-width: 300px; padding: 10px 12px;
  background: var(--ink); color: var(--paper); border-radius: var(--r); box-shadow: var(--shadow-pop); font-size: 0.8125rem; }
.tip-title { color: color-mix(in srgb, var(--paper) 72%, transparent); font-size: 0.75rem; }
.tip-row { display: flex; align-items: center; gap: 8px; }
.tip-row strong { font-variant-numeric: tabular-nums; }
.tip-key { width: 12px; height: 3px; border-radius: 2px; background: var(--paper); flex: none; }
.tip-name { color: color-mix(in srgb, var(--paper) 72%, transparent); }

/* ---------------------------------------------------------------- split panels (sites, customers) */
.split-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.split-panels .panel { background: none; padding: 0; border-radius: 0; display: grid; gap: 12px; align-content: start; }
.split-panels .panel h3 { font: 600 1.125rem var(--display); }
.big-figure { font: 620 2.5rem/1 var(--display); letter-spacing: -0.01em; font-stretch: 92%; margin: 0; display: flex; align-items: center; gap: 12px; font-variant-numeric: tabular-nums; }
.big-figure .delta { font: 700 0.875rem var(--text); letter-spacing: 0; }
.mini-table { font-size: 0.9375rem; }

/* ---------------------------------------------------------------- areas: an index, not a card grid */
.areas h2 { margin-bottom: 8px; }
.area-index { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.area-index li { border-bottom: 1px solid var(--rule); }
.area-row { display: grid; grid-template-columns: minmax(220px, 1.3fr) minmax(0, 2fr) 150px 150px; gap: 24px; align-items: center;
  padding: 18px 12px; margin: 0 -12px; color: var(--ink); text-decoration: none; border-radius: var(--r); transition: background-color .15s; }
.area-row:hover { background: var(--sheet); }
.area-name { display: flex; align-items: flex-start; gap: 14px; }
.area-name > .icon { width: 20px; height: 20px; margin-top: 3px; color: var(--accent); }
.area-name strong { display: block; font: 650 1.1875rem/1.2 var(--display); letter-spacing: -0.01em; }
.area-blurb { display: block; font-size: 0.875rem; color: var(--ink-2); margin-top: 2px; }
.area-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.af { display: grid; gap: 2px; min-width: 0; }
.af-label { font-size: 0.8125rem; color: var(--ink-2); }
.af-value { font-weight: 650; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-value .delta { font-size: 0.75rem; margin-left: 4px; }
.af-value .delta .icon { display: none; }
.area-spark .spark { max-width: 150px; }
.area-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.issue-count { font-size: 0.8125rem; font-weight: 650; color: var(--bad-ink); }
.area-open { font-size: 0.875rem; font-weight: 650; color: var(--accent); }
.area-row:hover .area-open { text-decoration: underline; }

/* ---------------------------------------------------------------- quick look */
dialog.quick { width: min(820px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 20px;
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow-pop); overflow: auto; }
dialog.quick::backdrop { background: rgba(9, 12, 22, 0.55); }
dialog.quick[open] { animation: pop .2s cubic-bezier(.2, .8, .2, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.quick-inner { padding: 32px 36px 36px; display: grid; gap: 24px; }
.quick-close { position: absolute; top: 18px; right: 18px; width: 44px; padding: 0; border-radius: 999px; background: var(--sheet); color: var(--ink); border-color: var(--rule); }
.quick-close:hover { background: var(--sheet); border-color: var(--ink); }
.quick-head h2 { display: flex; align-items: center; gap: 12px; font-size: 2rem; letter-spacing: -0.025em; }
.quick-head h2 .icon { width: 24px; height: 24px; color: var(--accent); }
.quick-head .meta { font-size: 0.9375rem; color: var(--ink-2); }
.quick-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--rule); }
.quick-figs { overflow: hidden; }
.qf { display: grid; gap: 2px; padding: 14px 16px; margin-left: -1px; border-left: 1px solid var(--rule); align-content: start; justify-items: start; }
.qf span:first-child { font-size: 0.8125rem; color: var(--ink-2); }
.qf strong { font: 650 1.375rem/1.15 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.qf .delta { font-size: 0.75rem; }
.quick-chart { margin: 0; background: var(--sheet); border-radius: var(--r-lg); padding: 18px 20px; }
.quick-chart figcaption { font: 600 1rem var(--display); margin-bottom: 8px; }
.quick-issues h3 { font: 600 1.125rem var(--display); margin-bottom: 10px; }
.quick-issues ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.quick-issues li { display: flex; gap: 10px; align-items: flex-start; }
.quick-issues li .icon { color: var(--critical); margin-top: 4px; }
.quick-foot { margin: 0; }
.quick .split-panels { grid-template-columns: 1fr; gap: 24px; margin: 0; }

/* ---------------------------------------------------------------- issues ledger (area pages) */
.issues { margin-bottom: 64px; }
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.entry { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.entry-money { display: grid; align-content: start; justify-items: end; text-align: right; gap: 2px; }
.entry-money strong { font: 650 1.75rem/1.1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.entry-money span { font-size: 0.8125rem; color: var(--ink-2); }
.entry-body { display: grid; gap: 6px; justify-items: start; }
.finding { font-weight: 650; margin: 0; max-width: 70ch; font-size: 1.0625rem; }
.mechanism { color: var(--ink-2); margin: 0; max-width: 70ch; }
.action { margin: 4px 0 0; max-width: 70ch; }
.action span { font-weight: 650; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.chip .icon { width: 14px; height: 14px; }
.chip.sev-critical .icon, .chip.st-error .icon { color: var(--critical); }
.chip.sev-serious .icon { color: var(--serious); }
.chip.sev-warning .icon { color: var(--warning); }
.chip.sev-info .icon, .chip.st-disconnected .icon, .chip.st-syncing .icon, .chip.st-waiting .icon { color: var(--ink-3); }
.chip.st-connected .icon, .chip.sev-ok .icon { color: var(--good); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 64px; }
.two-col h2 { font-size: 1.25rem; margin-bottom: 12px; }
.findings { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.findings li { display: flex; gap: 10px; align-items: flex-start; }
.findings li .icon { margin-top: 4px; }
.findings.good .icon { color: var(--good-ink); } .findings.bad .icon { color: var(--bad-ink); }

/* ---------------------------------------------------------------- tables: quiet rules, real numbers */
.table-wrap, .table-scroll { overflow-x: auto; }
.table-scroll { background: var(--sheet); border-radius: 12px; max-height: 560px; overflow-y: auto; border: 1px solid var(--rule); }
.table-scroll.tall { max-height: 720px; }
.table-card { position: relative; }
.table-card .table-scroll { border-radius: 12px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
th { text-align: left; font-weight: 600; font-size: 0.8125rem; color: var(--ink-3); padding: 11px 16px; border-bottom: 1px solid var(--rule-strong); }
td { padding: 13px 16px; border-bottom: 1px solid var(--rule); vertical-align: middle; color: var(--ink); }
tbody th { font-size: 0.9375rem; color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--rule); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody tr:hover td, tbody tr:hover th { background: color-mix(in srgb, var(--ink) 3%, var(--sheet)); }
th.num, td.num { text-align: right; }
td.strong { font-weight: 650; }
table.data thead th { position: sticky; top: 0; background: var(--sheet); z-index: 2; white-space: nowrap; }
table.data td, table.data th { white-space: nowrap; }
/* the first column stays put when a wide table scrolls sideways */
table.data tbody th, table.data tfoot th { position: sticky; left: 0; background: var(--sheet); z-index: 1; }
table.data thead th:first-child { left: 0; z-index: 3; }
table.data tfoot td, table.data tfoot th { position: sticky; bottom: 0; background: var(--sheet); border-top: 1px solid var(--ink); border-bottom: 0; font-weight: 650; padding-top: 12px; padding-bottom: 12px; }
table.data tfoot th { z-index: 2; }
table.data td.items { white-space: normal; min-width: 240px; max-width: 420px; color: var(--ink-2); }
table.data td .delta { font-size: 0.8125rem; font-weight: 600; }
.pcell { display: flex; align-items: center; gap: 12px; }
.pname { display: block; font-weight: 600; }
.sku { display: block; color: var(--ink-3); font-size: 0.8125rem; font-weight: 400; margin-top: 1px; max-width: 460px; overflow: hidden; text-overflow: ellipsis; }
.pdot { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.35); }
.pdot.none { box-shadow: inset 0 0 0 1.5px var(--rule-strong); }
.pdot.c-black { background: #1f2024; } .pdot.c-blush { background: #e9b9b3; } .pdot.c-green { background: #3f7d5a; }
.pdot.c-grey { background: #9aa0a8; } .pdot.c-navy { background: #1f2f5c; } .pdot.c-orange { background: #e8772e; }
.pdot.c-pink { background: #e0609e; } .pdot.c-tan { background: #c79a6b; } .pdot.c-turquoise { background: #2bb3b1; }
.kind-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 0.6875rem; font-weight: 600;
  color: var(--ink-2); background: color-mix(in srgb, var(--ink) 7%, transparent); vertical-align: 2px; }
a.sort { color: inherit; text-decoration: none; }
a.sort:hover, a.sort.on { color: var(--ink); }
a.sort.on::after { content: " ↓"; }
.share { display: inline-flex; align-items: center; gap: 10px; min-width: 140px; }
.share-bar { display: inline-block; height: 6px; border-radius: 3px; background: var(--series1); min-width: 2px; max-width: 80px; flex: none; }
.table-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.table-search { margin-left: auto; }
.table-search input { min-height: 38px; width: 240px; padding: 0 12px 0 34px; border-radius: 9px; border: 1px solid var(--rule-strong); background: var(--sheet) no-repeat 11px 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%237d8397' stroke-width='2'%3E%3Ccircle cx='6' cy='6' r='4.5'/%3E%3Cpath d='m9.5 9.5 3 3'/%3E%3C/svg%3E"); }
.table-empty { padding: 28px; text-align: center; color: var(--ink-2); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; margin: 0 0 24px; border-radius: var(--r); background: var(--sheet); border: 1px solid var(--rule); }
.callout p { margin: 0; } .callout .icon { margin-top: 3px; color: var(--accent); flex: none; }
.callout.good .icon { color: var(--good-ink); }
.empty-state { display: flex; gap: 12px; align-items: center; padding: 32px; border-radius: 12px; background: var(--sheet); border: 1px dashed var(--rule-strong); }
.empty-state p { margin: 0; }
.review-form select, .review-form input { min-height: 36px; font-size: 0.875rem; }
.year-in { width: 88px; }
.review-form table.data tbody th { white-space: normal; min-width: 260px; max-width: 400px; }
.review-form select { max-width: 220px; }
.form-foot { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.back-link { font-weight: 600; }
.mini-table th, .mini-table td { padding: 8px 6px; }
.mini-table tbody th { font-size: 0.9375rem; }
.runs { margin-top: 8px; }
details summary { cursor: pointer; color: var(--ink-2); font-size: 0.9375rem; font-weight: 500; padding: 8px 0; }
details.breakdown { margin-top: 16px; }
.product-table { margin-top: 48px; }

/* ---------------------------------------------------------------- orders */
.stage-filter { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 16px; }
.stage-filter a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: var(--r-sm);
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 0.9375rem; }
.stage-filter a:hover { background: var(--tint); color: var(--ink); }
.stage-filter a[aria-current="true"] { background: var(--sheet); color: var(--ink); font-weight: 650; box-shadow: inset 0 -2px 0 var(--accent); }
.stage-filter .n { color: var(--ink-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.order-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.order-search input[type="search"] { width: min(360px, 100%); }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.pager a { font-weight: 600; }

/* ---------------------------------------------------------------- stock and storage */
.stock { margin: 48px 0 64px; }
.status-chips { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 16px; }
.pallet-shelf { margin: 0 0 40px; display: grid; gap: 12px; }
.pallet-shelf h3 { font: 600 1.25rem var(--display); }

/* ---------------------------------------------------------------- costs entry */
.cost-entry { grid-column: 1 / -1; display: grid; gap: 12px; }
.cost-entry h3 { font: 600 1.25rem var(--display); }
.cost-entry td:last-child { white-space: nowrap; }
.inline-cost { display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; }
.inline-cost input[name="cogs"] { width: 100px; }
.inline-cost input[type="date"] { width: 160px; }
.inline-cost button { min-height: 44px; }
.upload { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.upload > label { flex-basis: 100%; }

/* ---------------------------------------------------------------- connections */
.conns { list-style: none; margin: 0 0 40px; padding: 0; display: grid; gap: 0; border-top: 1.5px solid var(--ink); }
.conn { display: grid; gap: 10px; padding: 24px 0; border-bottom: 1px solid var(--rule); background: none; border-radius: 0; }
.conn-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.conn-head h2 { font-size: 1.375rem; }
.conn-head h2 .quiet { font-weight: 500; }
.conn .actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.conn .actions form { margin: 0; }
.conn > form:not(.token-form) { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.token-form { display: grid; gap: 8px; margin: 8px 0; max-width: 64ch; }
.token-form .inline { display: flex; gap: 8px; flex-wrap: wrap; }
.token-form .inline input { flex: 1 1 280px; min-width: 0; }
.key-once { border-left: 3px solid var(--good); background: var(--sheet); border-radius: 0 var(--r) var(--r) 0; padding: 14px 18px; margin: 8px 0; }
.key-once h3 { margin: 0 0 6px; display: flex; gap: 8px; align-items: center; }
.key-once h3 .icon { color: var(--good); }
code.secret { display: inline-block; word-break: break-all; padding: 8px 12px; border: 1px dashed var(--rule-strong); user-select: all; font-size: 0.9375rem; background: var(--paper); }
ol.steps { padding-left: 22px; display: grid; gap: 8px; color: var(--ink-2); max-width: 74ch; }
ol.steps code { white-space: nowrap; }
ol.steps code.url { white-space: normal; overflow-wrap: anywhere; }
fieldset.choice { flex-basis: 100%; border: 0; padding: 0; margin: 0 0 8px; display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
fieldset.choice legend { flex-basis: 100%; font-weight: 600; margin-bottom: 8px; padding: 0; }
.upload fieldset.choice label { flex-basis: auto; display: inline-flex; gap: 8px; align-items: center; font-weight: 400; font-size: 1rem; min-height: 44px; }
fieldset.choice input[type="radio"] { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--accent); }
.connections-page section.panel { background: none; padding: 0; }

/* ---------------------------------------------------------------- sign-in */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 16px; background: var(--cover); }
.login { width: 100%; max-width: 420px; background: var(--paper); border-radius: 20px; padding: 36px; display: grid; gap: 14px; }
.login .brand { color: var(--ink); padding: 0; }
.login h1 { font: 650 2rem/1.1 var(--display); letter-spacing: -0.025em; }
.login form { display: grid; gap: 10px; }
.login .dev { font-size: 0.875rem; background: var(--sheet); padding: 10px 12px; border-radius: var(--r); }

/* ---------------------------------------------------------------- accounts: sign in, sign up, reset, invite */
.auth-body { margin: 0; min-height: 100vh; background: var(--paper); }
.auth { display: grid; grid-template-columns: minmax(320px, 5fr) 7fr; min-height: 100vh; }
.auth-side { background: var(--cover); color: var(--cover-ink); padding: 40px 48px; display: flex; flex-direction: column; gap: 48px; }
.auth-side .brand { color: var(--cover-ink); font: 650 1.25rem var(--display); }
.auth-pitch { margin-top: auto; margin-bottom: auto; max-width: 30rem; }
.auth-kicker { display: inline-block; font-size: 0.8125rem; font-weight: 650; color: var(--cover); background: var(--mark); padding: 3px 10px; border-radius: 4px; margin: 0 0 18px; }
.auth-kicker.dark { margin-bottom: 12px; }
.auth-line { font: 600 clamp(1.6rem, 2.6vw, 2.25rem)/1.15 var(--display); letter-spacing: -0.02em; margin: 0 0 28px; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; color: var(--cover-muted); }
.auth-points li { display: flex; gap: 10px; align-items: center; }
.auth-points .icon { color: var(--mark); }
.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font: 650 2.125rem/1.1 var(--display); letter-spacing: -0.025em; margin: 0 0 8px; }
.auth-sub { color: var(--ink-2); margin: 0 0 24px; }
.auth-form { display: grid; gap: 8px; }
.auth-form label { font-weight: 600; font-size: 0.875rem; margin-top: 8px; }
.auth-form input:not([type="hidden"]), .auth-form select { width: 100%; background: var(--sheet); }
.auth-form button.wide, .btn.wide { width: 100%; margin-top: 16px; justify-content: center; }
.auth-foot { margin-top: 28px; }
.auth-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--tint); color: var(--accent); margin-bottom: 18px; }
.auth-icon .icon { width: 22px; height: 22px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; }
.label-row label { margin-top: 0; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 72px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 32px; padding: 0 10px; font-size: 0.8125rem;
  background: transparent; color: var(--ink-2); border: 0; }
.pw-toggle:hover { background: var(--tint); color: var(--ink); }
.pw-toggle[hidden] { display: none; }
.or { display: flex; align-items: center; gap: 12px; margin: 28px 0 20px; color: var(--ink-3); font-size: 0.8125rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--rule-strong); }
.inline-field { display: flex; gap: 8px; }
.inline-field input { flex: 1; min-width: 0; }
button.secondary { background: var(--sheet); color: var(--ink); border-color: var(--rule-strong); }
button.secondary:hover { border-color: var(--ink); background: var(--sheet); }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two-fields > div { display: grid; gap: 8px; }
.dev { font-size: 0.875rem; background: var(--sheet); padding: 10px 12px; border-radius: var(--r); border: 1px dashed var(--rule-strong); }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 20px 20px; gap: 0; }
  .auth-pitch { display: none; }
  .auth-main { place-items: start center; padding: 28px 16px; }
}

/* ---------------------------------------------------------------- account and team */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; margin-bottom: 24px; }
.panel.settings h2 { font-size: 1.25rem; margin: 0 0 14px; }
.stack-form { display: grid; gap: 8px; max-width: 440px; }
.stack-form label { font-weight: 600; font-size: 0.875rem; margin-top: 6px; }
.stack-form button { justify-self: start; margin-top: 10px; }
.stack-form.narrow { margin-top: 16px; }
.wide-panel { margin-bottom: 32px; }
.new-workspace { margin-top: 18px; }
.invite-form { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(140px, 1fr) auto; gap: 12px; align-items: end; }
.invite-form > div { display: grid; gap: 6px; }
.invite-form label { font-weight: 600; font-size: 0.875rem; }
.role-help { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 24px; margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--rule); }
.role-help dt { font-weight: 650; font-size: 0.875rem; } .role-help dd { margin: 2px 0 0; color: var(--ink-2); font-size: 0.875rem; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 0.875rem;
  background: color-mix(in srgb, var(--accent) 14%, var(--sheet)); color: var(--accent); }
.avatar.ghost { background: transparent; border: 1.5px dashed var(--rule-strong); color: var(--ink-3); }
tr.pending th, tr.pending td { color: var(--ink-2); }
form.inline { display: inline; margin: 0; }
button.linkish { background: none; border: 0; min-height: 32px; padding: 0 6px; color: var(--accent); font-weight: 600; font-size: 0.875rem; }
button.linkish:hover { background: var(--tint); }
button.linkish.danger { color: var(--bad-ink); }
.role-form select { min-height: 34px; font-size: 0.875rem; }
.copy-row { display: flex; gap: 8px; margin-top: 10px; }
.copy-row input { flex: 1; min-width: 0; font-size: 0.8125rem; }
.callout.bad .icon { color: var(--critical); }
@media (max-width: 860px) { .invite-form { grid-template-columns: 1fr; } }

.start { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); max-width: 960px; gap: 16px; }
.start-step { display: flex; gap: 16px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; padding: 22px; }
.start-step h3 { font: 650 1.0625rem var(--display); margin: 2px 0 6px; }
.start-step p { color: var(--ink-2); margin: 0 0 14px; font-size: 0.9375rem; }
.start-n { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; background: var(--mark); color: #1b2238; }

.add-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 12px; }
.add-card { display: grid; gap: 8px; align-content: start; padding: 18px; border: 1px solid var(--rule); border-radius: 12px; }
.add-card h3 { font: 650 1rem var(--display); margin: 0; }
.add-card button { justify-self: start; margin-top: 6px; }
.add-card label { font-weight: 600; font-size: 0.875rem; }

/* ---------------------------------------------------------------- customers */
.segments { margin-bottom: 32px; }
.segments + .panel { margin-bottom: 40px; }
.segments .section-head { display: block; }
.segments .section-head p { margin: 6px 0 0; }
.seg-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.seg-card { position: relative; display: flex; flex-direction: column; gap: 10px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; padding: 20px 22px 18px; }
.seg-card::before { content: ""; position: absolute; left: -1px; top: 18px; bottom: 18px; width: 3px; border-radius: 0 2px 2px 0; background: var(--ink-3); }
.seg-card.tone-act::before { background: var(--accent); } .seg-card.tone-good::before { background: var(--good); } .seg-card.tone-watch::before { background: var(--warning); }
.seg-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.seg-top h3 { font: 650 1.0625rem/1.25 var(--display); margin: 0; }
.seg-count { font: 700 1.75rem/1 var(--display); color: var(--ink); text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.seg-count span { font: 500 0.8125rem var(--text); color: var(--ink-3); }
.seg-bar { display: block; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 7%, transparent); overflow: hidden; }
.seg-fill { display: block; height: 100%; background: var(--series1); border-radius: 2px; }
.seg-who { margin: 0; font-size: 0.875rem; color: var(--ink-2); }
.seg-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 4px 0 0; }
.seg-facts dt { font-size: 0.75rem; color: var(--ink-3); } .seg-facts dd { margin: 1px 0 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.seg-due { display: flex; gap: 8px; align-items: flex-start; margin: 2px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--mark-soft); font-size: 0.875rem; }
.seg-due .icon { margin-top: 3px; flex: none; }
.seg-todo { margin: 0; font-size: 0.875rem; color: var(--ink-2); line-height: 1.5; }
.seg-todo strong { color: var(--ink); }
.seg-open { margin-top: auto; font-weight: 600; font-size: 0.875rem; }
.seg-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink-2); }
.seg-tag.tone-act { background: var(--tint); color: var(--accent); }
.seg-tag.tone-good { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good-ink); }
.season-dots { display: inline-flex; gap: 3px; }
.sdot { display: inline-grid; place-items: center; min-width: 26px; height: 20px; padding: 0 4px; border-radius: 5px; font-size: 0.6875rem; font-weight: 700;
  background: color-mix(in srgb, var(--series1) 12%, transparent); color: var(--accent); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0; font-weight: 600; }
.mono-lede { font-size: clamp(2rem, 4vw, 3rem); }
.cust-link { color: inherit; text-decoration: none; display: block; }
.cust-link:hover .pname { color: var(--accent); text-decoration: underline; }
.customer-list { margin-bottom: 56px; }
.block-title { font-size: 1.375rem; margin: 16px 0 16px; padding-top: 24px; border-top: 1.5px solid var(--ink); }
.timeline { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 28px; max-width: 820px; }
.tl-season h2 { font-size: 1.125rem; margin: 0 0 10px; }
.tl-season > ul { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--rule-strong); display: grid; gap: 12px; }
.tl-order { position: relative; display: grid; grid-template-columns: 120px 1fr; gap: 16px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px; }
.tl-order::before { content: ""; position: absolute; left: -26px; top: 20px; width: 12px; height: 12px; border-radius: 50%; background: var(--series1); box-shadow: 0 0 0 3px var(--paper); }
.tl-order.cancelled { opacity: 0.6; } .tl-order.cancelled::before { background: var(--ink-3); }
.tl-date { font-weight: 600; font-size: 0.875rem; color: var(--ink-2); }
.tl-head { margin: 0 0 6px; }
.tl-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 0.9375rem; }
.tl-items li { display: flex; align-items: center; gap: 8px; }
@media (max-width: 860px) { .tl-order { grid-template-columns: 1fr; gap: 4px; } }

/* ---------------------------------------------------------------- exceptions and work queue */
.exceptions { margin-top: 32px; }
.exceptions .section-head { display: block; } .exceptions .section-head p { margin: 4px 0 0; }
.ex-list, .sg-list, .task-list { list-style: none; margin: 0; padding: 0; }
.ex-row, .sg-row { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid var(--rule); }
.ex-row:first-child, .sg-row:first-child { border-top: 0; }
.ex-title, .sg-title { display: flex; gap: 8px; align-items: baseline; margin: 0 0 4px; }
.ex-title .icon, .sg-title .icon { flex: none; transform: translateY(2px); }
.sev-serious .ex-title .icon, .sev-serious .sg-title .icon { color: var(--serious); }
.sev-critical .sg-title .icon { color: var(--critical); }
.sev-warning .ex-title .icon, .sev-warning .sg-title .icon { color: var(--warning); }
.sev-info .ex-title .icon, .sev-info .sg-title .icon { color: var(--ink-3); }
.ex-main p, .sg-main p { margin: 0 0 4px; }
.ex-examples { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px !important; }
.order-chip { font: 600 0.75rem ui-monospace, Menlo, monospace; padding: 3px 8px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); text-decoration: none; }
.order-chip:hover { background: var(--tint); color: var(--accent); }
.ex-act, .sg-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.sg-money { font: 700 1.125rem var(--display); font-variant-numeric: tabular-nums; }
.suggest { margin-bottom: 32px; }
.evidence summary { font-size: 0.8125rem; padding: 4px 0; }
.own-task { display: flex; gap: 8px; margin: 0 0 20px; }
.own-task input[name="title"] { flex: 1; min-width: 0; background: var(--sheet); }
.own-task input[type="date"] { width: 170px; background: var(--sheet); }
.queue-group { font-size: 1rem; margin: 24px 0 10px; }
.task { display: flex; justify-content: space-between; gap: 20px; padding: 16px 18px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; margin-bottom: 10px; }
.task.st-doing { border-left: 3px solid var(--accent); }
.task.st-done .task-title, .task.st-dismissed .task-title { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.task-title { font-weight: 650; margin: 0 0 4px; }
.task-main p { margin: 0 0 4px; }
.task-meta { color: var(--ink-3); }
.overdue { color: var(--bad-ink); }
.task-act { flex: none; display: flex; gap: 6px; align-items: flex-start; }
.small-btn { min-height: 34px; padding: 0 12px; font-size: 0.875rem; }
.history { margin: 6px 0 0; padding-left: 18px; font-size: 0.8125rem; display: grid; gap: 2px; }
@media (max-width: 860px) { .ex-row, .sg-row, .task { flex-direction: column; } .ex-act, .sg-side { align-items: flex-start; } .own-task { flex-wrap: wrap; } }

/* ---------------------------------------------------------------- daily brief */
.brief-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--rule); margin-bottom: 32px; }
.brief-block { padding: 20px 24px 22px; border-left: 1px solid var(--rule); }
.brief-block:first-child { border-left: 0; padding-left: 0; }
.brief-block h3 { font: 600 0.9375rem var(--text); color: var(--ink-2); margin: 0 0 6px; }
.brief-big { font: 700 2.25rem/1.05 var(--display); letter-spacing: -0.02em; margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.brief-cmp { margin: 0 0 14px; font-size: 0.875rem; color: var(--ink-2); }
.brief-facts { display: flex; gap: 28px; margin: 0; }
.brief-facts dt { font-size: 0.75rem; color: var(--ink-3); } .brief-facts dd { margin: 2px 0 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.brief-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; margin-bottom: 24px; }
.brief-two h2, .weekly h2 { font-size: 1.125rem; margin: 0 0 14px; }
.sold, .needs { list-style: none; margin: 0; padding: 0; }
.sold li { display: grid; grid-template-columns: 14px 1fr auto auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.sold li:first-child { border-top: 0; }
.sold-name { font-weight: 600; } .sold-n { color: var(--ink-2); font-size: 0.875rem; } .sold-v { font-weight: 650; min-width: 72px; text-align: right; }
.needs li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--rule); }
.needs li:first-child { border-top: 0; }
.needs .icon { flex: none; margin-top: 4px; }
.weekly-lede { font-size: 1.0625rem; max-width: 70ch; }
.weekly-actions { margin: 16px 0 0; padding-left: 20px; display: grid; gap: 12px; }
.weekly-actions p { margin: 0 0 2px; }
@media (max-width: 860px) { .brief-block { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); } .brief-block:first-child { border-top: 0; } }

/* ---------------------------------------------------------------- marketing */
.chart.cols .band { fill: color-mix(in srgb, var(--ink) 5%, transparent); stroke: var(--rule-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.chart.cols .band-label { fill: var(--ink-2); font: 600 11.5px var(--text); paint-order: stroke; stroke: var(--sheet); stroke-width: 4px; }
.key-band { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-left: 10px; background: color-mix(in srgb, var(--ink) 6%, transparent); border: 1px dashed var(--rule-strong); }
.campaigns, .sources { margin-top: 40px; }
.sources .section-head { display: block; } .sources .section-head p { margin: 4px 0 0; }
.add-campaign { margin-bottom: 16px; padding: 16px 24px; }
.add-campaign summary { font-weight: 650; color: var(--ink); }
.campaign-form { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 14px; }
.campaign-form > div { display: grid; gap: 6px; }
.campaign-form label { font-weight: 600; font-size: 0.875rem; }
.campaign-form .cf-wide { grid-column: span 2; }
.campaign-form .cf-go { align-self: end; }
.src-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.src-card { display: flex; flex-direction: column; gap: 8px; background: var(--sheet); border: 1px dashed var(--rule-strong); border-radius: 14px; padding: 18px 20px; }
.src-head { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.src-head h3 { font: 650 1rem var(--display); margin: 0; }
.src-card p { margin: 0; }
.src-shows { margin: 0; padding-left: 18px; font-size: 0.875rem; color: var(--ink-2); }
.src-card .btn { align-self: flex-start; margin-top: auto; }

/* ---------------------------------------------------------------- data and definitions */
.fresh-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.fresh-tag.ok { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good-ink); }
.fresh-tag.old { background: color-mix(in srgb, var(--warning) 22%, transparent); color: var(--ink); }
.coverage { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px 32px; }
.coverage p { margin: 6px 0 0; }
.cov-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.cov-n { font: 700 1.5rem var(--display); font-variant-numeric: tabular-nums; }
.seg-fill.low { background: var(--serious); }
.defs { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px 32px; margin: 0; }
.defs dt { font-weight: 650; } .defs dd { margin: 3px 0 0; color: var(--ink-2); font-size: 0.9375rem; }
main .panel + .panel { margin-top: 24px; }
.panel h2 { font-size: 1.25rem; margin: 0 0 14px; }

/* ---------------------------------------------------------------- guide */
.guide { display: grid; gap: 12px; }
.guide-count { color: var(--ink-3); font-size: 0.875rem; margin: 0; }
.guide-dots { list-style: none; margin: 0 0 12px; padding: 0; display: flex; gap: 6px; }
.guide-dots li { width: 28px; height: 4px; border-radius: 2px; background: var(--rule); }
.guide-dots li.done { background: var(--rule-strong); }
.guide-dots li.on { background: var(--ink); }
.guide-body { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 48px; align-items: start; }
.guide-text h1 { font: 650 2.25rem/1.1 var(--display); letter-spacing: -0.025em; margin-bottom: 16px; }
.guide-text ul { margin: 0 0 24px; padding-left: 20px; display: grid; gap: 10px; max-width: 60ch; }
.guide-text li { color: var(--ink-2); }
.guide-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.skip { color: var(--ink-2); font-size: 0.875rem; }
.guide-shot { margin: 0; }
.guide-shot img { width: 100%; height: auto; display: block; border-radius: var(--r-lg); background: var(--sheet); }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 1100px) {
  .spread { grid-template-columns: 1fr; gap: 40px; }
  .margin { position: static; padding-left: 0; border-left: 0; border-top: 1.5px solid var(--ink); padding-top: 20px; }
  .area-row { grid-template-columns: minmax(200px, 1fr) minmax(0, 1.4fr) 120px; }
  .area-spark { display: none; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .period-bar { position: static; }
  .range-label { margin-left: 0; width: 100%; }
  .custom-pop[open] .custom-range { flex-wrap: wrap; width: min(92vw, 360px); }
  .side { position: static; height: auto; padding: 14px 16px 0; gap: 12px; display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .client { grid-column: 2; margin: 0; padding: 6px 10px; }
  .nav-scroll { grid-column: 1 / -1; display: flex; flex-direction: row; overflow-x: auto; gap: 2px; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .nav-group { display: block; flex: none; }
  .nav-label { display: none; }
  .nav-group ul { display: flex; gap: 2px; }
  .side ul a { white-space: nowrap; min-height: 44px; padding: 0 12px; border-radius: var(--r) var(--r) 0 0; }
  .side-foot { grid-column: 1 / -1; display: none; }
  .topbar { padding: 8px 16px; min-height: 56px; }
  .fresh { display: none; }
  .main { padding: 12px 16px 72px; }
  .page-head { margin-bottom: 28px; }
  .intro { font-size: 1rem; }
  section { margin-bottom: 48px; }
  .figure-row, .tiles { grid-template-columns: 1fr 1fr; }
  .fig, .tile { padding: 14px 12px; border-bottom: 1px solid var(--rule); }
  .fig-value, .tile .value { font-size: 1.5rem; }
  .split-panels, .two-col { grid-template-columns: 1fr; gap: 32px; }
  .charts { grid-template-columns: 1fr; }
  .chart-wide { display: none; } .chart-narrow { display: block; }
  .panel, .block { padding: 18px 16px; }
  .area-row { grid-template-columns: 1fr; gap: 12px; }
  .money-went, .pallet-shelf, .charts .panel { overflow-x: auto; }
  .money-went .chart, .pallet-shelf .chart, .charts .panel .chart { min-width: 560px; }
  .area-end { flex-direction: row; justify-content: space-between; align-items: center; }
  .entry { grid-template-columns: 1fr; gap: 8px; }
  .entry-money { justify-items: start; text-align: left; grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 8px; }
  .guide-body { grid-template-columns: 1fr; gap: 20px; }
  .guide-shot { order: -1; }
  .quick-inner { padding: 24px 18px; }
  .cost-entry thead { display: none; }
  .cost-entry table, .cost-entry tbody, .cost-entry tr, .cost-entry td { display: block; }
  .cost-entry tr { padding: 12px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
  .cost-entry td { border: 0; padding: 0; }
  .cost-entry td:nth-child(4) { grid-column: 1 / -1; }
}

/* ---- Product detail, profit column, year cost (30 Sep) ---- */
.pcell.big { gap: 14px; align-items: center; }
.pcell.big .pdot { width: 22px; height: 22px; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px 24px; margin-bottom: 12px; }
.panel-head h3 { margin: 0 0 4px; }
.panel-head p { margin: 0; }
.panel-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.kv { display: grid; gap: 0; margin: 0; }
.kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--ink-2); font-size: 0.9375rem; white-space: nowrap; flex: none; }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.kv > div.total { border-top: 1px solid var(--rule-strong); border-bottom: 0; font-weight: 600; }
.kv > div.total dt { color: var(--ink); }
.sub-h { font-size: 0.875rem; font-weight: 600; color: var(--ink-2); margin: 20px 0 4px; }
.section-h { font: 600 1.25rem var(--display); margin: 8px 0 14px; }
a.row-link { color: inherit; text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .15s; }
a.row-link:hover, a.row-link:focus-visible { background-size: 100% 1px; }
.sub-num { display: block; font-size: 0.75rem; color: var(--ink-3, var(--ink-2)); font-weight: 400; }
.neg { color: var(--critical); font-weight: 600; }
.year-cost { border: 1px solid var(--rule); border-radius: var(--r); padding: 16px 18px; margin: 12px 0 24px; background: var(--sheet); }
.year-cost-title { margin: 0 0 12px; }
.year-cost-fields { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; }
.year-cost-fields label { display: grid; gap: 4px; font-size: 0.8125rem; color: var(--ink-2); }
.year-cost-fields input[name=cogs] { width: 96px; }
@media (max-width: 860px) { .split-panels { grid-template-columns: 1fr; } }
.contacts-upload { margin: 16px 0 8px; border: 1px solid var(--rule); border-radius: var(--r); padding: 12px 16px; background: var(--sheet); }
.contacts-upload summary { cursor: pointer; font-weight: 600; }
.contacts-upload[open] summary { margin-bottom: 8px; }
.contact-card { max-width: 640px; margin: 0 0 32px; }
.contact-card dd { text-align: right; overflow-wrap: anywhere; }

/* ---- Marketing: ads, search, website (30 Sep) ---- */
.mk-section { margin: 0 0 56px; }
.mk-section h3 { font: 600 1rem var(--text, inherit); margin: 20px 0 10px; }
.mk-split { margin-top: 8px; }
.mk-split > div { min-width: 0; }
.mk-opps { margin: 16px 0; }
.opp-list { list-style: none; margin: 8px 0 0; padding: 0; }
.opp-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-top: 1px solid var(--rule); }
.opp-list li > div { display: grid; gap: 2px; min-width: 0; }
.opp-list form { flex: none; }
.funnel-steps { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 10px; }
.funnel-steps li { display: grid; grid-template-columns: 150px 1fr 80px 190px; align-items: center; gap: 12px; }
.f-label { font-size: 0.9375rem; color: var(--ink-2); }
.f-bar { height: 12px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 6%, transparent); overflow: hidden; }
.f-bar .bar { display: block; height: 100%; border-radius: 6px; background: var(--series1, var(--accent)); }
.f-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.f-rate { font-size: 0.8125rem; color: var(--ink-2); }
.google-picker table { margin: 8px 0 12px; }
.google-picker select { max-width: 280px; }
@media (max-width: 860px) {
  .funnel-steps li { grid-template-columns: 1fr 70px; }
  .funnel-steps .f-bar { grid-column: 1 / -1; order: 3; }
  .funnel-steps .f-rate { grid-column: 1 / -1; order: 4; }
  .opp-list li { flex-direction: column; align-items: flex-start; }
}

/* ================================================================ V3 component layer
   Calm workspace. Every rule below refines an earlier one; tokens are at the top. */

body { font-size: 0.9375rem; line-height: 1.55; }
h2 { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; }
a { color: var(--ink); text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent); }
a:hover { text-decoration-color: currentColor; }
code { background: var(--tint); border: 0; border-radius: 5px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

/* ---- controls: 36px, 8px corners, a bevelled dark primary */
button, .btn {
  font: 500 0.875rem/1 var(--text); min-height: 36px; padding: 0 14px; border-radius: var(--r); border: 0;
  background: var(--ink); color: var(--paper); box-shadow: var(--bevel);
  transition: background-color .15s var(--ease), opacity .15s var(--ease), box-shadow .15s var(--ease);
}
button:hover, .btn:hover { background: color-mix(in srgb, var(--ink) 88%, var(--paper)); }
button:active, .btn:active { opacity: 0.82; }
button.ghost, .btn.secondary, button.secondary, .custom-range button {
  background: var(--sheet); color: var(--ink); border: 1px solid var(--rule-strong); box-shadow: var(--shadow-sm);
}
button.ghost:hover, .btn.secondary:hover, button.secondary:hover, .custom-range button:hover { background: color-mix(in srgb, var(--ink) 4%, var(--sheet)); border-color: var(--rule-strong); }
button.link, button.linkish { box-shadow: none; }
button.linkish { color: var(--ink); min-height: 30px; border-radius: 6px; font-weight: 500; }
button.linkish:hover { background: var(--tint); }
input, select {
  font: 400 0.875rem var(--text); min-height: 36px; padding: 0 11px; border-radius: var(--r);
  border: 1px solid var(--rule-strong); background: var(--raised); box-shadow: var(--shadow-sm);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input:hover, select:hover { border-color: color-mix(in srgb, var(--ink) 28%, var(--rule-strong)); }
input:focus, select:focus { outline: 2px solid transparent; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
input[type="file"] { padding: 6px 10px; box-shadow: none; background: transparent; border-style: dashed; }
input[type="radio"], input[type="checkbox"] { box-shadow: none; }
label { font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); }

/* ---- the sidebar: light, quiet, rounded items */
.shell { grid-template-columns: 248px minmax(0, 1fr); }
.side { background: var(--cover); border-right: 1px solid var(--rule); padding: 18px 12px 16px; gap: 18px; }
.brand { padding: 2px 8px; font: 650 1.1875rem/1 var(--display); letter-spacing: -0.02em; color: var(--cover-ink); }
.mark { width: 16px; height: 16px; border-width: 2.5px; }
.mark::after { top: 4.5px; }
.client { margin: 0; padding: 8px 10px; gap: 10px; border: 1px solid var(--rule); background: var(--sheet); border-radius: 10px;
  color: var(--cover-ink); font-weight: 550; box-shadow: var(--shadow-sm); }
.client-dot { width: 20px; height: 20px; border-radius: 6px; background: var(--ink); position: relative; }
.client-dot::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--mark); }
.nav-scroll { gap: 14px; }
.nav-label { padding-left: 10px; margin: 0 0 2px; font-size: 0.75rem; font-weight: 500; color: var(--cover-muted); }
.side ul { gap: 1px; }
.side ul a { min-height: 34px; padding: 0 10px; gap: 10px; border-radius: var(--r); font-size: 0.875rem; font-weight: 450;
  color: var(--cover-ink); opacity: 1; transition: background-color .12s var(--ease); }
.side ul a .icon { color: var(--cover-muted); width: 16px; height: 16px; }
.side ul a:hover { background: var(--cover-hover); }
.side ul a[aria-current="page"] { background: var(--cover-on); color: var(--cover-ink); font-weight: 600; box-shadow: none; }
.side ul a[aria-current="page"] .icon { color: var(--cover-ink); }
.side-foot { padding: 0 6px; color: var(--cover-muted); font-size: 0.8125rem; }
.side-foot .link, .side-foot button.link { color: var(--cover-muted); font-size: 0.8125rem; }
.side-foot select { min-height: 34px; width: 100%; }

/* ---- top bar and page head */
.topbar { min-height: 56px; padding: 8px 48px; background: color-mix(in srgb, var(--paper) 86%, transparent); border-bottom: 1px solid transparent; }
.back { min-height: 32px; font-size: 0.875rem; font-weight: 500; border-radius: var(--r); padding: 0 8px 0 4px; }
.back:hover { background: var(--tint); }
.theme-switch { background: color-mix(in srgb, var(--ink) 5%, transparent); border: 0; padding: 3px; }
.theme-opt { width: 30px; min-height: 30px; box-shadow: none; background: transparent; }
.theme-opt:hover { background: color-mix(in srgb, var(--sheet) 70%, transparent); }
.theme-opt[aria-pressed="true"] { background: var(--sheet); color: var(--ink); box-shadow: var(--shadow-sm); }
.fresh { font-size: 0.8125rem; }
.main { max-width: 1240px; padding: 12px 48px 112px; }
.page-head { margin: 12px 0 36px; }
.page-name { font-size: 0.8125rem; font-weight: 500; color: var(--ink-3); margin: 0 0 12px; }
.page-name::before { width: 6px; height: 6px; border-radius: 50%; background: var(--mark); box-shadow: 0 0 0 3px var(--mark-soft); }
.page-name a { color: var(--ink-3); text-decoration: none; }
.page-name a:hover { color: var(--ink); }
.lede { font-weight: 600; font-size: clamp(1.9rem, 1.15rem + 1.9vw, 2.75rem); line-height: 1.08; letter-spacing: -0.028em; max-width: 26ch; }
.intro { font-size: 1rem; margin-top: 12px; line-height: 1.55; }
section { margin-bottom: 56px; }

/* ---- surfaces: hairline, no shadow */
.panel, .block { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 22px 24px; }
.split-panels .panel { border: 0; }
.quick-chart { border: 1px solid var(--rule); border-radius: var(--r-md); }
.chart-head h3, .panel figcaption h3 { font: 600 1rem var(--text); letter-spacing: -0.005em; }

/* ---- figures: one card with hairline dividers */
.figure-row, .tiles { border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--sheet); margin: 0 0 16px; }
.fig, .tile { padding: 16px 20px; border-left-color: var(--rule); }
.fig dt, .tile h3 { font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); }
.fig-value, .tile .value { font: 600 1.75rem/1.15 var(--display); letter-spacing: -0.02em; }
.quick-figs { border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--sheet); }
.tile.tab.on::after { height: 2px; background: var(--ink); }
.tile.tab.on .chart-hint { color: var(--ink); }

/* ---- toggles: a sunken track, the chosen option raised */
.seg { gap: 2px; padding: 3px; border-radius: 10px; background: color-mix(in srgb, var(--ink) 5.5%, transparent); flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg a, .seg .disabled { min-height: 30px; padding: 0 11px; border-radius: 7px; font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); white-space: nowrap;
  transition: background-color .12s var(--ease), color .12s var(--ease); }
.seg a:hover { background: color-mix(in srgb, var(--sheet) 60%, transparent); color: var(--ink); }
.seg a[aria-current="true"], .seg.pills a[aria-current="true"], .chart-switches .seg a[aria-current="true"] {
  background: var(--seg-on); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(28, 27, 25, 0.1), inset 0 0 0 1px var(--rule-strong); }
.seg.compare a, .seg.grain a { min-height: 30px; font-size: 0.8125rem; }
.period-bar { top: 56px; gap: 8px; padding: 10px 0; margin-bottom: 24px; background: color-mix(in srgb, var(--paper) 90%, transparent); }
.custom-pop summary { min-height: 36px; border-radius: 10px; border: 1px solid var(--rule-strong); background: var(--raised); box-shadow: var(--shadow-sm); font-size: 0.8125rem; color: var(--ink-2); }
.custom-pop[data-on] summary { border-color: var(--ink-3); color: var(--ink); }
.custom-pop[open] .custom-range { border-radius: var(--r-md); border: 0; box-shadow: var(--shadow-pop); }
.range-label { color: var(--ink-3); }

/* ---- tables: hairline rows, muted headers, a soft hover */
.table-scroll { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-md); }
.table-card .table-scroll { border-radius: var(--r-md); }
table { font-size: 0.875rem; }
th { font-weight: 500; font-size: 0.75rem; letter-spacing: 0.01em; color: var(--ink-3); padding: 10px 16px; border-bottom: 1px solid var(--rule); }
td { padding: 11px 16px; border-bottom: 1px solid var(--rule-soft); }
tbody th { font-size: 0.875rem; font-weight: 550; border-bottom: 1px solid var(--rule-soft); }
tbody tr { transition: background-color .1s var(--ease); }
tbody tr:hover td, tbody tr:hover th { background: color-mix(in srgb, var(--ink) 2.5%, var(--sheet)); }
table.data thead th { background: color-mix(in srgb, var(--ink) 1.5%, var(--sheet)); }
table.data tfoot td, table.data tfoot th { border-top: 1px solid var(--rule-strong); font-weight: 600; }
td.strong { font-weight: 600; }
.pname { font-weight: 550; }
.sku { font-size: 0.75rem; color: var(--ink-3); }
a.row-link:hover { text-decoration: none; }
tbody tr:has(a.row-link):hover .pname, tbody tr:has(a.cust-link):hover .pname { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ink-3); }
a.cust-link { color: inherit; text-decoration: none; }
.kind-tag { border-radius: 6px; padding: 1px 6px; font-weight: 500; }
.table-tools { gap: 8px; margin-bottom: 12px; }
.table-search input { min-height: 34px; border-radius: 9px; background-color: var(--raised); }
.share-bar { height: 5px; }
.pdot { width: 12px; height: 12px; }

/* ---- callouts and notices: soft tints, no heavy bars */
.callout, .banner, .notice { border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--sheet); padding: 12px 16px; }
.banner.error, .callout.bad { background: color-mix(in srgb, var(--critical) 5%, var(--sheet)); border-color: color-mix(in srgb, var(--critical) 25%, var(--rule)); }
.banner.warn { background: color-mix(in srgb, var(--warning) 7%, var(--sheet)); border-color: color-mix(in srgb, var(--warning) 30%, var(--rule)); }
.notice, .callout.good { background: color-mix(in srgb, var(--good) 5%, var(--sheet)); border-color: color-mix(in srgb, var(--good) 22%, var(--rule)); }
.banner, .notice { border-left-width: 1px; }
.callout .icon, .banner .icon { color: var(--ink-2); }
.setup { border: 1px solid color-mix(in srgb, var(--critical) 22%, var(--rule)); border-left-width: 1px; border-radius: var(--r-md);
  background: color-mix(in srgb, var(--critical) 4%, var(--sheet)); padding: 14px 18px; }
.empty-state { border-radius: var(--r-md); border: 1px dashed var(--rule-strong); background: transparent; }

/* ---- lists that used heavy top rules */
.area-index, .ledger, .conns { border-top: 1px solid var(--rule); }
.area-row { border-radius: var(--r-md); }
.area-row:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.area-name > .icon { color: var(--ink-2); }
.area-open { color: var(--ink); font-weight: 550; }
.margin { border-left: 1px solid var(--rule); }
.note-item { padding-left: 18px; }
.note-item::before { top: 9px; bottom: auto; width: 7px; height: 7px; border-radius: 50%; }
.note-money { font-weight: 600; }
.stage-filter a { min-height: 32px; border-radius: 8px; font-size: 0.875rem; }
.stage-filter a:hover { background: var(--tint); }
.stage-filter a[aria-current="true"] { background: var(--raised); box-shadow: 0 1px 2px rgba(28, 27, 25, 0.1), 0 0 0 1px var(--rule); }

/* ---- charts: quieter grids and baselines */
.chart .grid, .chart.cols .grid, .strip .grid { stroke: var(--rule-soft); stroke-dasharray: none; }
.chart.cols .baseline, .strip .baseline { stroke: var(--rule-strong); stroke-width: 1; }
.chart .tick, .strip .tick { fill: var(--ink-3); font-size: 12px; }
.chart.cols .tick.x, .strip .month { fill: var(--ink-2); font-weight: 500; }
.chart.cols .month-rule, .strip .month-rule { stroke: var(--rule); }
.tip { border-radius: 10px; background: var(--night); color: var(--night-ink); box-shadow: var(--shadow-pop); }

/* ---- dialogs */
dialog.quick { border-radius: 16px; background: var(--paper); box-shadow: var(--shadow-pop); }
dialog.quick::backdrop { background: rgba(20, 19, 17, 0.4); backdrop-filter: blur(2px); }
.quick-close { width: 34px; min-height: 34px; background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); box-shadow: none; }

/* ---- sign-in pages: the dark panel is its own colour now the sidebar is light */
.login-body { background: var(--paper); }
.login { background: var(--sheet); border: 1px solid var(--rule); border-radius: 16px; box-shadow: var(--shadow-pop); }
.auth-side { background: var(--night); color: var(--night-ink); }
.auth-side .brand { color: var(--night-ink); }
.auth-kicker { color: var(--night); }
.auth-points { color: var(--night-muted); }
.auth-card h1 { font-weight: 600; letter-spacing: -0.03em; }

/* ---- motion: fast and restrained; none for people who ask for none */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---- touch: bigger targets on phones */
@media (max-width: 860px) {
  button, .btn, input, select { min-height: 44px; }
  .seg a { min-height: 36px; }
  .side ul a { min-height: 40px; }
  .main { padding: 8px 16px 96px; }
  .topbar { padding: 8px 16px; }
  .shell { grid-template-columns: 1fr; }
  .side { padding: 12px 16px 6px; gap: 10px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .side ul a { padding: 0 12px; }
  .fig, .tile { padding: 14px 14px; }
  .panel, .block { padding: 18px 16px; }
  .margin { border-top: 1px solid var(--rule); }
  .period-bar { position: static; }
}
@media (max-width: 1100px) { .margin { border-top: 1px solid var(--rule); } }

/* ---- status badges: a soft tint per meaning, in tables and headers */
td .chip, .conn-head .chip, .src-head .chip { padding: 3px 8px 3px 6px; border-radius: 6px; font-weight: 500; font-size: 0.75rem;
  background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); gap: 5px; }
td .chip .icon, .conn-head .chip .icon, .src-head .chip .icon { width: 12px; height: 12px; }
td .chip.sev-ok, .chip.st-connected { background: color-mix(in srgb, var(--good) 12%, transparent); color: var(--good-ink); }
td .chip.sev-warning { background: color-mix(in srgb, var(--warning) 16%, transparent); color: color-mix(in srgb, var(--warning) 45%, var(--ink)); }
td .chip.sev-serious { background: color-mix(in srgb, var(--serious) 14%, transparent); color: color-mix(in srgb, var(--serious) 60%, var(--ink)); }
td .chip.sev-critical, .chip.st-error { background: color-mix(in srgb, var(--critical) 11%, transparent); color: var(--bad-ink); }
td .chip + .sku { margin-top: 4px; }
.seg-tag { border-radius: 6px; font-weight: 500; padding: 2px 8px; }

/* ---- design review fixes (HIG review, 30 Sep) */
.note-item.sev-warning::before { background: var(--warning-mark); }
.chip.sev-warning .icon, .banner.warn .icon { color: var(--warning-mark); }
.note-sev { display: block; font-size: 0.75rem; font-weight: 600; color: var(--ink-2); margin: 0 0 2px; }
.topbar { border-bottom-color: var(--rule); }
.pw-toggle, button.linkish, .quick-close, button.link { box-shadow: none; }
.pw-toggle { min-height: 28px; }
.seg-tag.tone-act { background: var(--mark-soft); color: var(--ink); }
.sdot { background: var(--tint); color: var(--ink-2); }
.avatar { background: var(--tint); color: var(--ink); }
.page-name::before { box-shadow: none; }
.tile.tab.on::after { background: var(--mark); height: 3px; }
.fig-value, .tile .value { font-variation-settings: "opsz" 32; font-stretch: 92%; }
.fig dt, .tile h3 { letter-spacing: 0; }
@media (prefers-contrast: more) {
  :root { --ink-2: #3d3b37; --ink-3: #55524c; --rule: #cfccc5; --rule-strong: #a9a59d; }
}
@media (forced-colors: active) {
  .seg a[aria-current="true"], .side ul a[aria-current="page"], .stage-filter a[aria-current="true"] { outline: 1px solid CanvasText; }
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .auth-side { background: var(--raised); border-right: 1px solid var(--rule); } }
:root[data-theme="dark"] .auth-side { background: var(--raised); border-right: 1px solid var(--rule); }
@media (max-width: 860px) {
  .auth { grid-template-rows: auto 1fr; }
  .auth-side { padding: 16px 20px; }
  .seg a { min-height: 40px; }
}

/* ---- saving in place (data-async forms) */
.async-status { flex-basis: 100%; margin: 8px 0 0; font-size: 0.8125rem; color: var(--ink-2); }
.async-status.ok { color: var(--good-ink); }
.async-status.bad { color: var(--bad-ink); }
.inline-cost .async-status { display: none; }
.inline-cost .async-status.bad { display: block; }
.inline-cost:has(.async-status.bad) { flex-wrap: wrap; }
tr.row-saved td, tr.row-saved th { background: color-mix(in srgb, var(--good) 6%, var(--sheet)); color: var(--ink-2); transition: background-color .3s var(--ease); }
.saved-note { font-size: 0.8125rem; font-weight: 550; color: var(--good-ink); }
button:disabled { opacity: 0.6; cursor: progress; }

/* ---- charts, modernised (30 Sep): validated indigo-led palette (dataviz validator, light and dark),
   the comparison as a quiet solid grey instead of dashed outlines, 4px rounded data ends,
   hairline solid grids, a soft wash under the lead line */
.chart .grid, .chart.cols .grid, .strip .grid { stroke: var(--rule-soft); stroke-width: 1; stroke-dasharray: none; }
.chart .baseline, .chart.cols .baseline, .strip .baseline { stroke: var(--rule-strong); stroke-width: 1; }
.chart .tick, .strip .tick { fill: var(--ink-3); font: 500 11.5px var(--text); }
.chart.cols .tick.x, .strip .month { fill: var(--ink-3); font: 500 11.5px var(--text); }
.chart.cols .month-rule, .strip .month-rule { stroke: var(--rule-soft); }
.chart.cols .ghost, .strip .ghost { fill: var(--cmp); stroke: none; stroke-dasharray: none; }
.chart.cols .bar-g:hover .ghost, .chart.cols .bar-g.on .ghost, .strip .bar-g:hover .ghost, .strip .bar-g.on .ghost { fill: color-mix(in srgb, var(--cmp) 70%, var(--ink-3)); stroke: none; }
.chart.cols .bar, .strip .bar { fill: var(--series1); }
.chart.cols .bar.peak { fill: var(--series1); }
.chart.cols .bar-g:hover .bar, .chart.cols .bar-g.on .bar, .strip .bar-g.on .bar { fill: color-mix(in srgb, var(--series1) 82%, var(--ink)); }
.chart.cols .bar-g:hover .hit, .chart.cols .bar-g.on .hit { fill: color-mix(in srgb, var(--ink) 3%, transparent); }
.chart.cols .avg { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 4; opacity: 0.7; }
.chart.cols .peak-label { fill: var(--ink); font: 650 11.5px var(--text); stroke: var(--sheet); stroke-width: 3px; }
.strip .now-label { fill: var(--ink-3); font: 600 11px var(--text); letter-spacing: .02em; }
.strip .now-rule { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .line { stroke-width: 2; }
.chart .line-cmp { stroke-width: 1.75; stroke-dasharray: none; }
.chart .area { fill-opacity: 0.09; }
.chart .dot { stroke: var(--sheet); stroke-width: 2; }
.chart .end-label { fill: var(--ink); font: 650 12px var(--text); }
.chart .xh { stroke: var(--ink-3); }
.chart .bar-cmp { opacity: 1; }
.key-solid { background: var(--series1); border-radius: 3px; }
.key-ghost { background: var(--cmp); border: 0; border-radius: 3px; margin-left: 12px; }
.sw-series7 { background: var(--series7); } .sw-series8 { background: var(--series8); }
.sw-cmp { background: var(--cmp); } .sw-cmp-line { background: var(--cmp-line); }
.swatch { border-radius: 3px; }
.key-line { height: 3px; border-radius: 2px; }
.spark-line { stroke: var(--series1); stroke-width: 1.75; }
.spark-cmp { stroke: var(--cmp-line); stroke-width: 1.25; stroke-dasharray: none; }
.share-bar { background: var(--series1); opacity: 0.85; }
.f-bar .bar { background: var(--series1); }
.tip { background: var(--raised); color: var(--ink); border: 1px solid var(--rule); box-shadow: var(--shadow-pop); padding: 10px 12px; }
.tip-title, .tip-name { color: var(--ink-3); }
.tip-key { height: 8px; width: 8px; border-radius: 2px; }

/* ---- season / year and compare menus */
.pick-pop summary { gap: 6px; }
.pick-pop summary .quiet { font-weight: 500; }
.pick-pop[open] .pick-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 25; min-width: 240px; max-height: 60vh; overflow-y: auto;
  padding: 6px; background: var(--raised); border-radius: var(--r-md); box-shadow: var(--shadow-pop); }
.pick-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.pick-menu a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 7px 10px; border-radius: 6px;
  color: var(--ink); text-decoration: none; font-size: 0.875rem; white-space: nowrap; }
.pick-menu a:hover { background: var(--tint); }
.pick-menu a[aria-current="true"] { font-weight: 600; background: var(--tint); }
.pick-menu a[aria-current="true"]::after { content: "✓"; color: var(--ink-2); margin-left: 8px; }
.pick-h { margin: 6px 10px 4px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.pick-sub { color: var(--ink-3); font-size: 0.8125rem; }
.compare-pop summary { border-color: var(--rule-strong); color: var(--ink); font-weight: 550; }

/* ---- look closer: expand a chart full screen */
.zoomable { position: relative; }
.zoom-btn { position: absolute; top: -2px; right: 0; width: 30px; height: 30px; min-height: 0; padding: 0; display: grid; place-items: center;
  border-radius: 8px; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink-2); box-shadow: var(--shadow-sm); opacity: 0; transition: opacity .15s var(--ease), color .15s; cursor: zoom-in; }
.zoom-btn svg { width: 15px; height: 15px; }
.zoom-btn:hover { color: var(--ink); border-color: var(--rule-strong); }
[data-expand] { cursor: zoom-in; }
.zoomable:hover .zoom-btn, .zoom-btn:focus-visible { opacity: 1; }
@media (hover: none) { .zoom-btn { opacity: 1; } }
dialog.chart-zoom { width: min(1500px, 96vw); max-height: 94vh; padding: 20px 24px 24px; border: 0; border-radius: 16px;
  background: var(--sheet); color: var(--ink); box-shadow: var(--shadow-pop); }
dialog.chart-zoom::backdrop { background: rgba(20, 19, 17, 0.45); backdrop-filter: blur(3px); }
.zoom-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; }
.zoom-title { margin: 0; font-weight: 600; }
.zoom-body svg.chart { width: 100%; height: auto; max-height: 76vh; }
.zoom-close { min-height: 32px; }

/* ---- confirm before removing */
dialog.confirm { width: min(440px, calc(100vw - 32px)); padding: 22px 24px 20px; border: 0; border-radius: 14px; background: var(--raised); color: var(--ink); box-shadow: var(--shadow-pop); }
dialog.confirm::backdrop { background: rgba(20, 19, 17, 0.4); backdrop-filter: blur(2px); }
dialog.confirm[open] { animation: pop .18s var(--ease); }
.confirm-title { font: 600 1.0625rem var(--text); margin: 0 0 8px; letter-spacing: -0.01em; }
.confirm-text { color: var(--ink-2); font-size: 0.9375rem; margin: 0 0 20px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
dialog.confirm button.danger { background: var(--critical); color: #fff; }
dialog.confirm button.danger:hover { background: color-mix(in srgb, var(--critical) 88%, #000); }

/* ---- daily brief, V3: scannable, not paragraphs */
.brief-grid { border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--sheet); overflow: hidden; margin-bottom: 24px; }
.brief-block { padding: 18px 22px 20px; border-left: 1px solid var(--rule); margin-left: -1px; }
.brief-block:first-child { padding-left: 22px; }
.brief-block h3 { font: 500 0.8125rem var(--text); color: var(--ink-2); margin: 0 0 8px; }
.brief-big { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font: 600 2rem/1.1 var(--display); letter-spacing: -0.02em; margin: 0 0 4px; }
.brief-cmp { font-size: 0.8125rem; color: var(--ink-3); margin: 0 0 14px; }
.brief-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-stat { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; background: var(--tint); font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.chip-stat .k { font-weight: 500; color: var(--ink-2); }
.pill { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 999px; font: 600 0.75rem/1.4 var(--text); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.pill.good { background: color-mix(in srgb, var(--good) 13%, transparent); color: var(--good-ink); }
.pill.bad { background: color-mix(in srgb, var(--critical) 11%, transparent); color: var(--bad-ink); }
.pill.flat { background: var(--tint); color: var(--ink-2); }
.brief-two .panel h2, .weekly h2 { font: 600 1.0625rem var(--text); margin: 0 0 12px; letter-spacing: -0.01em; }
.sold { list-style: none; margin: 0; padding: 0; }
.sold li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--rule-soft); font-size: 0.875rem; }
.sold li:first-child { border-top: 0; }
.sold-n { color: var(--ink-3); font-size: 0.8125rem; } .sold-v { font-weight: 600; font-variant-numeric: tabular-nums; }
.needs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.need a, .need .need-ok { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px;
  background: var(--tint); color: var(--ink); text-decoration: none; font-size: 0.875rem; font-weight: 500; }
.need a:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.need-n { min-width: 30px; height: 26px; padding: 0 8px; border-radius: 7px; display: inline-grid; place-items: center; font-weight: 650; font-variant-numeric: tabular-nums; background: var(--raised); box-shadow: var(--shadow-sm); }
.need.tone-serious .need-n { color: var(--bad-ink); }
.need.tone-warning .need-n { color: var(--warning-mark); }
.need .icon { color: var(--ink-3); }
.need .need-ok { grid-template-columns: auto; color: var(--good-ink); display: flex; gap: 8px; }
.need.tone-good .need-ok .icon { color: var(--good-ink); }
.weekly { margin-top: 40px; }
.week-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--sheet); overflow: hidden; margin-bottom: 24px; }
.wk { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 14px 18px; border-left: 1px solid var(--rule); margin-left: -1px; }
.wk .k { flex-basis: 100%; font-size: 0.8125rem; color: var(--ink-2); }
.wk strong { font: 600 1.375rem/1.2 var(--display); letter-spacing: -0.015em; }
.wk .s { flex-basis: 100%; font-size: 0.75rem; color: var(--ink-3); }
.actions-h { font: 600 0.9375rem var(--text); margin: 0 0 10px; }
.action-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.action-card { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 12px; background: var(--sheet); }
.ac-dot { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--ink-3); }
.action-card.sev-critical .ac-dot { background: var(--critical); } .action-card.sev-serious .ac-dot { background: var(--serious); }
.action-card.sev-warning .ac-dot { background: var(--warning-mark); }
.ac-finding { font-weight: 600; margin: 0 0 6px; line-height: 1.4; }
.ac-do { display: flex; gap: 8px; align-items: baseline; margin: 0; font-size: 0.875rem; color: var(--ink-2); }
.ac-label { flex: none; font-size: 0.6875rem; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; padding: 1px 6px; border-radius: 5px; background: var(--mark-soft); color: var(--ink); }
.ac-why { margin-top: 6px; }
.ac-why summary { font-size: 0.8125rem; padding: 2px 0; color: var(--ink-3); }
.ac-why p { font-size: 0.8125rem; color: var(--ink-2); margin: 4px 0 0; }
@media (max-width: 860px) { .brief-block, .wk { border-left: 0; margin-left: 0; border-top: 1px solid var(--rule); } .brief-block:first-child, .wk:first-child { border-top: 0; } }
.needs li.need { display: block; padding: 0; border: 0; }
.needs .need .icon { margin-top: 0; }
.brief-two { align-items: stretch; }
.brief-two > section { margin: 0; }

/* ---- settings */
.settings-lede { max-width: 70ch; margin: 0 0 16px; }
.season-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.season-form input[type="date"] { width: 160px; }
.season-len { margin-left: 4px; }
.season-form .async-status { flex-basis: auto; margin: 0 0 0 4px; }
.seasons-table td { white-space: normal; }
.settings-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-top: 20px; }
.season-add h3 { font: 600 1rem var(--text); margin: 0 0 10px; }
.sf-row { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.sf-row label { display: grid; gap: 4px; }
.sf-row input[type="number"] { width: 100px; } .sf-row input[type="text"] { width: 90px; }

/* ---- dashboard: right now (today, this month, last month's profit and loss) */
.dash { margin: 0 0 32px; }
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.dash-card { grid-column: span 4; display: flex; flex-direction: column; min-width: 0; padding: 18px 20px 16px; border: 1px solid var(--rule);
  border-radius: var(--r-lg); background: var(--sheet); color: var(--ink); text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.dash-card:hover { border-color: var(--rule-strong); box-shadow: var(--shadow-pop); }
.dash-card:focus-visible { outline: 2px solid var(--series1); outline-offset: 2px; }
.dash-card.c-wide { grid-column: span 8; }
.dash-card.c-pnl { grid-column: span 8; }
.dash-card h3 { font: 500 0.8125rem var(--text); color: var(--ink-2); margin: 0 0 6px; }
.dash-big { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font: 600 2rem/1.1 var(--display); letter-spacing: -0.02em; margin: 0 0 2px; font-variant-numeric: tabular-nums; }
.dash-sub { font-size: 0.8125rem; color: var(--ink-3); margin: 0 0 12px; }
.dash-sub a { color: var(--series1); }
.dash-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 12px; }
.dash-split > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 8px 10px; border-radius: 10px; background: var(--tint); }
.dash-split .k { flex-basis: 100%; font-size: 0.75rem; color: var(--ink-2); }
.dash-split strong { font: 600 1.125rem/1.2 var(--display); font-variant-numeric: tabular-nums; }
.dash-foot { font-size: 0.75rem; color: var(--ink-3); margin: auto 0 0; padding-top: 6px; }
.dash-card .chart { margin-top: auto; }
.dash-card .legend { margin-top: 4px; }
.chart.mini-bars { width: 100%; height: auto; display: block; margin: 4px 0 0; overflow: visible; }
.chart .mini-mark { font: 500 10px var(--text); fill: var(--ink-3); }
.chart .mini-mark.on { fill: var(--ink); font-weight: 650; }
.chart .bar-quiet { opacity: 1; }
.chart.gauge { width: 100%; max-width: 260px; height: auto; display: block; margin: 4px auto 0; }
.gauge-track { fill: none; stroke: var(--cmp); stroke-width: 16; stroke-linecap: round; }
.gauge-fill { fill: none; stroke-width: 16; stroke-linecap: round; }
.gauge-mark { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
table.pnl { width: 100%; border-collapse: collapse; font-size: 0.875rem; font-variant-numeric: tabular-nums; }
table.pnl th, table.pnl td { padding: 6px 8px; border-top: 1px solid var(--rule-soft); text-align: left; font-weight: 400; }
table.pnl thead th { border-top: 0; font-size: 0.75rem; color: var(--ink-3); font-weight: 500; }
table.pnl .num { text-align: right; white-space: nowrap; }
table.pnl tr.total th, table.pnl tr.total td { font-weight: 600; border-top-color: var(--rule); }
table.pnl tr.result th, table.pnl tr.result td { font-weight: 700; border-top: 1.5px solid var(--ink); font-size: 0.9375rem; }
table.pnl tr.cost th { padding-left: 20px; color: var(--ink-2); }
@media (max-width: 1100px) { .dash-card, .dash-card.c-pnl { grid-column: span 6; } .dash-card.c-wide { grid-column: span 12; } }
@media (max-width: 700px) { .dash-card, .dash-card.c-wide, .dash-card.c-pnl { grid-column: span 12; } .dash-big { font-size: 1.75rem; } }

/* ---- channels and locations */
.split-panels.mix { margin-top: 24px; }
.panel-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink); text-decoration: none; margin: 0 0 10px; }
.panel-link h3 { margin: 0; font: 600 1.0625rem var(--text); }
.panel-link .icon { color: var(--ink-3); transition: transform 0.15s; }
.panel-link:hover .icon { transform: translateX(2px); color: var(--ink); }
.mini-h { font: 600 0.8125rem var(--text); color: var(--ink-2); margin: 18px 0 6px; }
ol.rank { list-style: none; margin: 0; padding: 0; counter-reset: r; }
ol.rank li { display: grid; grid-template-columns: 1.6em 1fr auto auto; gap: 10px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--rule-soft); font-size: 0.875rem; counter-increment: r; }
ol.rank li::before { content: counter(r); color: var(--ink-3); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
ol.rank li:first-child { border-top: 0; }
.rank-v { font-weight: 600; font-variant-numeric: tabular-nums; }
.rank-n { font-size: 0.75rem; text-align: right; min-width: 6.5em; }
p.chips { display: flex; flex-wrap: wrap; gap: 6px; }
p.chips .chip { padding: 3px 9px; border-radius: 999px; background: var(--tint); font-weight: 500; }

/* ---- pop-ups behind "needs doing" */
.needs-table .sub { display: block; font-size: 0.75rem; color: var(--ink-3); }
.needs-table td.items { max-width: 260px; white-space: normal; font-size: 0.8125rem; color: var(--ink-2); }
.needs-table td { vertical-align: top; }
ul.task-mini { list-style: none; margin: 0; padding: 0; }
ul.task-mini li { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--rule-soft); }
ul.task-mini li.due .t { color: var(--bad-ink); }
.quick { max-width: min(900px, calc(100vw - 32px)); }

/* ---- brief charts and monthly review */
.brief-charts { margin-bottom: 24px; }
.brief-charts figure { margin: 0; }
.bars-14 .chart.mini-bars { height: auto; }
.bars-14-x { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--ink-3); margin-top: 6px; }
.brief-spark { margin-top: 12px; }
.brief-spark .spark { width: 100%; height: 36px; }
.monthly { margin-top: 40px; }
.month-chart { margin: 0 0 16px; }
.month-two { margin-top: 0; }
dl.pnl-mini { margin: 0; display: grid; }
dl.pnl-mini > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--rule-soft); font-size: 0.875rem; }
dl.pnl-mini > div:first-child { border-top: 0; }
dl.pnl-mini dt { color: var(--ink-2); } dl.pnl-mini dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
dl.pnl-mini > div.total { border-top: 1.5px solid var(--ink); } dl.pnl-mini > div.total dt { color: var(--ink); font-weight: 600; }
ul.bullets { list-style: none; margin: 0 0 12px; padding: 0; }
ul.bullets li { position: relative; padding: 6px 0 6px 16px; font-size: 0.875rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
ul.bullets li::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--series1); }

/* ---- sortable table headers */
th.sortable a { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; }
th.sortable.num a { justify-content: flex-end; }
th.sortable a:hover { color: var(--ink); }
.sort-mark { font-size: 0.75rem; color: var(--ink-3); opacity: 0.5; }
th.sortable[aria-sort] .sort-mark { opacity: 1; color: var(--ink); }
th.sortable[aria-sort] a { color: var(--ink); font-weight: 600; }

/* ---- season strip: verdict and running total beside the weekly bars */
.strip-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 12px; }
.strip-verdict .sv-k { flex-basis: 100%; font-size: 0.8125rem; color: var(--ink-2); }
.strip-verdict strong { font: 600 1.625rem/1.1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.strip-verdict .sv-t { font-size: 0.875rem; color: var(--ink-2); }
.strip-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.strip-sub { font-size: 0.8125rem; color: var(--ink-2); margin: 0 0 4px; }
.strip-run .chart { width: 100%; height: auto; }
@media (max-width: 1000px) { .strip-grid { grid-template-columns: 1fr; } }

/* ---- pinch to zoom in an expanded chart */
.zoom-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 10px; }
.zoom-hint { font-size: 0.8125rem; color: var(--ink-3); margin-right: auto; }
.zoom-tools button { font-size: 0.8125rem; padding: 4px 10px; }
.chart-zoom .zoom-body { touch-action: pan-y; overflow: hidden; }
.chart-zoom .zoom-body svg.chart { transition: transform 0.12s ease-out; will-change: transform; }
.chart-zoom .zoom-body.loading { opacity: 0.55; transition: opacity 0.15s; }
.brief-two > .panel + .panel, .split-panels > .panel + .panel, .split-panels > div > .panel { margin-top: 0; }

/* ---- dashboard polish: compare bars, legend keys, gradient areas */
.cmp-bars { list-style: none; margin: 6px 0 14px; padding: 0; display: grid; gap: 10px; }
.cmp-bars li { display: grid; grid-template-columns: 5.5em 1fr auto; gap: 10px; align-items: center; font-size: 0.8125rem; color: var(--ink-2); }
.cb-track { height: 10px; border-radius: 999px; background: var(--tint); overflow: hidden; }
.cb-fill { display: block; height: 100%; border-radius: 999px; background: var(--cmp-line); }
.cmp-bars li.lead .cb-fill { background: var(--series1); }
.cmp-bars li.lead { color: var(--ink); font-weight: 600; }
.cb-v { font-variant-numeric: tabular-nums; }
.mini-key { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mini-key .k-lead, .mini-key .k-accent { width: 8px; height: 8px; border-radius: 2px; display: inline-block; background: var(--series1); }
.mini-key .k-accent { background: var(--series2); margin-left: 8px; }
.chart .area.grad { fill-opacity: 1; }
.dash-card .chart .line { stroke-width: 2.25; }
.dash-card .chart .line-cmp { stroke-width: 1.75; stroke-dasharray: 3 4; }
.dash-card .grid { stroke: var(--rule-soft); }

/* ---- daily brief: day navigation, traffic and sales */
.brief-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.brief-bar > :first-child { margin: 0; }
.day-nav { display: flex; align-items: center; gap: 6px; }
.dn-step { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); }
.dn-step:hover { border-color: var(--rule-strong); }
.dn-step .icon { width: 16px; height: 16px; }
.dn-step:not(.next) .icon { transform: rotate(180deg); }
.dn-step.off { visibility: hidden; }
.dn-pick input[type="date"] { height: 36px; border-radius: 10px; padding: 0 10px; font: 500 0.875rem var(--text); }
.dn-latest { font-size: 0.875rem; font-weight: 600; margin-left: 4px; }
.brief-traffic { margin: 8px 0 32px; }
.brief-traffic .brief-two { margin-bottom: 16px; }
.drivers-card h3 { font: 600 1.0625rem var(--text); margin: 0; }
.drivers-card .meta { font-size: 0.8125rem; color: var(--ink-3); margin: 2px 0 14px; }
.equation { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 0 0 6px; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.equation b { font: 650 1.25rem/1.1 var(--display); letter-spacing: -0.01em; }
.equation .eq-op { color: var(--ink-3); font-size: 1rem; }
.equation .eq-r b { color: var(--series1); }
.equation.before { font-size: 0.8125rem; color: var(--ink-3); margin-bottom: 16px; }
.equation.before .eq-k { font-weight: 600; margin-right: 4px; }
.drivers { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.drivers li { display: grid; grid-template-columns: minmax(150px, 1fr) 1.2fr 80px; gap: 12px; align-items: center; font-size: 0.875rem; }
.dr-name { display: flex; align-items: center; gap: 6px; }
.dr-bar { position: relative; height: 12px; }
.dr-mid { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--rule-strong); }
.dr-fill { position: absolute; top: 0; height: 100%; border-radius: 3px; }
.drivers li.dv-pos .dr-fill { left: 50%; background: var(--series1); }
.drivers li.dv-neg .dr-fill { right: 50%; background: var(--series2); }
.dr-v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.verdict { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--rule-soft); font-size: 0.875rem; font-weight: 500; }

/* ---- campaign-aware comparisons */
.adjust { margin: 0 0 16px; border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
.adjust > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 9px 2px; cursor: pointer; list-style: none; font-size: 0.8125rem; color: var(--ink-2); }
.adjust > summary::-webkit-details-marker { display: none; }
.adjust > summary::before { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
.adjust[open] > summary::before { transform: rotate(45deg); }
.adjust .adj-k { font-weight: 600; color: var(--ink); }
.adjust .adj-s { display: inline-flex; gap: 6px; align-items: center; font-variant-numeric: tabular-nums; }
.adj-body { padding: 4px 2px 14px; }
.adj-t { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.adj-t th, .adj-t td { text-align: left; vertical-align: top; padding: 8px 12px 8px 0; border-top: 1px solid var(--rule-soft); }
.adj-t thead th { border-top: 0; font-size: 0.75rem; font-weight: 600; color: var(--ink-3); }
.adj-t tbody th { font-weight: 500; color: var(--ink-2); width: 30%; }
.adj-t td { font-variant-numeric: tabular-nums; }
.adj-t td > .small { display: block; margin-top: 2px; }
.adj-camps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.adj-body > p { margin: 10px 0 0; }
.adj-method { margin-top: 10px; }
.adj-method > summary { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; font-size: 0.8125rem; color: var(--accent); list-style: none; }
.adj-method > summary::-webkit-details-marker { display: none; }
.adj-method .icon { width: 14px; height: 14px; }
.adj-method ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); display: grid; gap: 4px; }
@media (max-width: 640px) { .adj-t tbody th { width: auto; } }
.camp-chip { display: flex; gap: 6px; align-items: flex-start; margin: 10px 0 0; font-size: 0.8125rem; color: var(--ink-3); }
.camp-chip .icon { width: 14px; height: 14px; color: var(--ink-3); flex: none; margin-top: 2px; }
.est { font-size: 0.6875rem; font-weight: 600; padding: 0 6px; border-radius: 999px; background: var(--tint); color: var(--ink-3); margin-left: 4px; vertical-align: 1px; }
.camp-caveat { margin: 8px 0 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 6px; }
.choice-row .choice { position: relative; }
.choice-row .choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice-row .choice span { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--rule); font-size: 0.875rem; font-weight: 500; background: var(--sheet); }
.choice-row .choice input:checked + span { background: color-mix(in srgb, var(--accent) 12%, var(--sheet)); border-color: var(--accent); color: var(--accent); }
.choice-row .choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.campaign-form .cf-step { grid-column: 1 / -1; }
.campaign-form .cf-l { font-weight: 600; font-size: 0.875rem; }
.cf-dates { display: flex; flex-wrap: wrap; gap: 10px; }
.cf-dates label { display: grid; gap: 4px; font-weight: 400; }
.campaign-form .cf-more { grid-column: 1 / -1; }
.campaign-form .cf-more summary, .spike-more summary { font-size: 0.8125rem; color: var(--accent); cursor: pointer; }
.campaign-form .cf-more input { margin-top: 8px; width: 100%; }
.campaign-form input[name="name"], .campaign-form select { max-width: 460px; }
.add-campaign > summary { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; cursor: pointer; }
.add-campaign > summary .icon { width: 18px; height: 18px; color: var(--accent); }
.spike-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.spike-quick form { margin: 0; }
.camp-inline { color: var(--ink-2); }
.camp-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
.camp { padding: 18px 20px; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--sheet); }
.camp-head { display: flex; justify-content: space-between; gap: 12px; }
.camp-name { font-weight: 650; margin: 0; }
.camp-meta { font-size: 0.8125rem; color: var(--ink-3); margin: 2px 0 0; }
.camp-notes { font-size: 0.8125rem; color: var(--ink-2); margin: 4px 0 0; }
.series-tag { padding: 1px 7px; border-radius: 999px; background: var(--tint); color: var(--ink-2); }
.camp-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 14px 0 0; }
.camp-figs div { padding: 10px 12px; border-radius: 10px; background: var(--tint); }
.camp-figs dt { font-size: 0.75rem; color: var(--ink-2); }
.camp-figs dd { margin: 2px 0 0; font-weight: 650; font-variant-numeric: tabular-nums; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pair { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule-soft); }
.pair-h { font-size: 0.875rem; margin: 0 0 4px; }
.series-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-size: 0.8125rem; }
.series-form input { width: 200px; }
.campaign-form .hint { display: block; font-size: 0.75rem; color: var(--ink-3); margin-top: 4px; }
.spikes { margin-top: 24px; }
.spikes h3 { font: 600 1.0625rem var(--text); margin: 0 0 4px; }
.spike-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.spike-list li { padding: 12px 16px; border: 1px solid var(--rule); border-radius: 12px; background: var(--sheet); }
.spike-top { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.875rem; }
.spike-list .spike-more { margin-top: 8px; }

/* ---- richer hover: the column under the pointer lights up, the rest step back */
.chart .bar-g .hit, .chart .col .hit { fill: transparent; transition: fill .12s; }
.chart .bar-g:hover .hit, .chart .bar-g.on .hit { fill: var(--tint); }
.chart.cols .bar, .chart .bar { transition: opacity .15s; }
.chart.cols:hover .bar-g:not(:hover) .bar, .chart.cols:hover .bar-g:not(:hover) .ghost { opacity: .45; }
.chart .hover-dot { opacity: 0; stroke: var(--sheet); stroke-width: 2; transition: opacity .1s; pointer-events: none; }
.chart .col:hover .hover-dot, .chart .col.on .hover-dot { opacity: 1; }
.chart .col:hover .xh, .chart .col.on .xh { opacity: .5; }
.chart:hover .end-label { opacity: .35; }

/* ---- refresh button */
.refresh-form { margin: 0; }
.refresh-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; min-height: 0; padding: 0 12px 0 10px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--sheet); color: var(--ink-2); font: 500 0.8125rem var(--text); box-shadow: var(--shadow-sm); cursor: pointer; }
.refresh-btn:hover { color: var(--ink); border-color: var(--rule-strong); }
.refresh-btn svg { width: 14px; height: 14px; }
.refresh-btn.spinning svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .refresh-btn.spinning svg { animation-duration: 3s; } }
@media (max-width: 600px) { .refresh-label { display: none; } .refresh-btn { padding: 0 9px; } }

/* ---- traffic and sales cards (plain figures, no equation) */
.tr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tr-total { display: flex; align-items: center; gap: 8px; }
.tr-total strong { font: 600 1.5rem/1.1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.drivers-card .verdict { border-top: 0; padding-top: 0; margin: 6px 0 16px; font-size: 0.9375rem; }
.tr-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tr-tile { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 12px; background: var(--tint); }
.tr-tile .k { font-size: 0.75rem; color: var(--ink-2); }
.tr-tile strong { font: 600 1.25rem/1.15 var(--display); font-variant-numeric: tabular-nums; }
.tr-tile .s { font-size: 0.75rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.tr-part { font-size: 0.75rem; font-weight: 600; margin-top: 2px; }
.tr-part.pos { color: var(--good-ink); } .tr-part.neg { color: var(--bad-ink); }
@media (max-width: 560px) { .tr-tiles { grid-template-columns: 1fr; } }

/* ---- live traffic */
.live-card { margin: 0 0 16px; }
.live-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.live-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; font: 600 1.0625rem var(--text); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); }
.live-dot.on { background: #1f9d55; box-shadow: 0 0 0 0 rgba(31, 157, 85, 0.5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(31, 157, 85, 0.45); } 70% { box-shadow: 0 0 0 8px rgba(31, 157, 85, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 157, 85, 0); } }
@media (prefers-reduced-motion: reduce) { .live-dot.on { animation: none; } }
.live-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0 6px; }
.live-figs div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--tint); }
.live-figs strong { font: 600 1.5rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.live-figs span { font-size: 0.75rem; color: var(--ink-2); }
.live-card.compact .live-figs { margin-bottom: 0; }
.live-card.compact .chart.mini-bars, .live-card.compact .dash-foot { display: none; }
.live-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 8px; }
@media (max-width: 700px) { .live-figs { grid-template-columns: 1fr 1fr; } .live-lists { grid-template-columns: 1fr; } }
.funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.funnel li { display: grid; grid-template-columns: 150px 1fr 60px 44px; gap: 10px; align-items: center; font-size: 0.875rem; }
.fn-bar { height: 14px; border-radius: 4px; background: var(--tint); overflow: hidden; }
.fn-fill { display: block; height: 100%; background: var(--series1); border-radius: 4px; min-width: 2px; }
.fn-v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.fn-step { text-align: right; font-size: 0.75rem; color: var(--ink-3); }
.traffic-sources { margin: 24px 0; }
.traffic-sources .brief-two, .traffic-sources .table-card { margin-bottom: 16px; }
.live-setup { margin-top: 24px; }
.snippet-site { margin-top: 14px; }
.snippet-h { font-weight: 650; margin: 0 0 6px; }
.steps-small { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 0.875rem; }
pre.code { margin: 6px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--tint); border: 1px solid var(--rule); overflow-x: auto; font-size: 0.75rem; user-select: all; }

.chart.mini-bars:not(.marked) { height: 64px; }

/* ---- no browser focus ring on chart marks (the crosshair shows where you are) */
.chart g:focus, .chart g:focus-visible, .chart .col:focus { outline: none; }
.chart .bar-g.clickable { cursor: pointer; }
.quick-two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 12px; }
.quick-two ol.rank + ol.rank { margin-top: 10px; }
.qf-cmp { display: flex; flex-direction: column; gap: 2px; font-size: 0.75rem; color: var(--ink-3); }
.qf-cmp span { display: flex; align-items: center; gap: 4px; }
@media (max-width: 640px) { .quick-two { grid-template-columns: 1fr; } }

/* ---- profit pop-up */
.pnl-t tr.sum th, .pnl-t tr.sum td { border-top: 1px solid var(--rule-strong); font-weight: 600; }
.pnl-t tr.total th, .pnl-t tr.total td { font-weight: 700; }
.pnl-t td:first-of-type { color: var(--ink); }
.pnl-t td { color: var(--ink-2); }
.more-rows { text-align: center; margin: 14px 0 0; overflow-anchor: none; }
.pnl-t tbody th, .pnl-t thead th { background: transparent; }
.campaign-form .cf-go { justify-self: start; }
.spike-rest { margin-top: 10px; }
.spike-rest > summary { font-size: 0.875rem; font-weight: 600; color: var(--accent); cursor: pointer; }
.camp-figs .range { font-weight: 400; font-size: 0.75rem; color: var(--ink-3); }
.table-scroll.endless { max-height: none; }
.refresh-btn.ready { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--rule)); }
.qf-vs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 0.75rem; color: var(--ink-3); }
.quick-head.month-step { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.quick-head.month-step .dn-step { width: 36px; height: 36px; }

/* ---- live traffic: not receiving, and the set-up check */
.live-warn { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 10px 14px; border-radius: 10px;
  background: color-mix(in srgb, var(--warning) 14%, var(--sheet)); border: 1px solid color-mix(in srgb, var(--warning) 45%, var(--rule)); font-size: 0.875rem; }
.live-warn .icon { width: 16px; height: 16px; color: var(--warning-mark); flex: none; margin-top: 2px; }
.live-warn strong { display: block; }
.live-warn a { margin-left: 4px; font-weight: 600; }
.live-card.stale .live-figs strong { color: var(--ink-3); }
.track-check { margin: 18px 0 10px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 12px; background: var(--tint); display: grid; gap: 12px; justify-items: start; }
.track-status { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.track-status li { display: flex; gap: 10px; align-items: flex-start; }
.track-status li .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.track-status li.ok .icon { color: var(--good); }
.track-status li.off .icon { color: var(--warning-mark); }
.track-status strong { display: block; font-size: 0.9375rem; }
.track-status .small { color: var(--ink-2); }
[data-quick-body].loading { opacity: .5; transition: opacity .15s; }
.camp-extend { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 14px; padding: 10px 14px; border-radius: 10px; background: var(--tint); font-size: 0.875rem; }
.camp-extend .icon { width: 16px; height: 16px; color: var(--accent); flex: none; }
.camp-extend p { margin: 0; flex: 1 1 320px; }
.camp-edit { margin-top: 10px; }
.camp-edit summary { font-size: 0.8125rem; color: var(--accent); cursor: pointer; }
.camp-edit form { margin-top: 8px; align-items: end; }

/* ---- ring cards: part of a whole, Activity-ring style */
.ring-card { display: flex; flex-direction: column; gap: 18px; padding: 22px 24px 18px; }
.ring-head h3 { margin: 0; font: 600 0.8125rem var(--text); letter-spacing: 0.01em; color: var(--ink-3); }
.ring-lede { margin: 4px 0 0; font: 600 1.1875rem/1.3 var(--display); letter-spacing: -0.01em; color: var(--ink); }
.ring-lede strong { font-weight: 700; }
.ring-body { display: grid; grid-template-columns: minmax(150px, 190px) minmax(0, 1fr); gap: 28px; align-items: center; }
.ring-fig { position: relative; }
.chart.ring { display: block; width: 100%; height: auto; overflow: visible; }
.chart.ring .ring-track { stroke: color-mix(in srgb, var(--ink) 6%, transparent); }
.chart.ring .ring-seg { transition: opacity .2s ease, stroke-width .2s ease; animation: ring-draw 1s cubic-bezier(.2, .8, .2, 1) both; cursor: pointer; }
.chart.ring .ring-seg:nth-of-type(2) { animation-delay: .08s; } .chart.ring .ring-seg:nth-of-type(3) { animation-delay: .16s; } .chart.ring .ring-seg:nth-of-type(4) { animation-delay: .24s; }
@keyframes ring-draw { from { stroke-dasharray: 0 100; } }
@media (prefers-reduced-motion: reduce) { .chart.ring .ring-seg { animation: none; } }
.chart.ring[data-focus] .ring-seg { opacity: .28; }
.chart.ring[data-focus] .ring-seg.on { opacity: 1; stroke-width: 32; }
.chart.ring .ring-v { font: 700 30px var(--display); letter-spacing: -0.03em; fill: var(--ink); font-variant-numeric: tabular-nums; }
.chart.ring .ring-c { font: 500 13px var(--text); fill: var(--ink-3); }
.rg-series1 .a { stop-color: color-mix(in srgb, var(--series1) 78%, white); } .rg-series1 .b { stop-color: var(--series1); }
.rg-series2 .a { stop-color: color-mix(in srgb, var(--series2) 78%, white); } .rg-series2 .b { stop-color: var(--series2); }
.rg-series3 .a { stop-color: color-mix(in srgb, var(--series3) 78%, white); } .rg-series3 .b { stop-color: var(--series3); }
.rg-series4 .a { stop-color: color-mix(in srgb, var(--series4) 78%, white); } .rg-series4 .b { stop-color: var(--series4); }
.ring-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ring-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px;
  background: color-mix(in srgb, var(--ink) 3%, transparent); transition: background .15s ease; cursor: default; outline: none; }
.ring-row:hover, .ring-row.on, .ring-row:focus-visible { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.ring-row:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.ring-dot { width: 10px; height: 10px; border-radius: 50%; }
.rr-main { display: grid; gap: 1px; min-width: 0; }
.rr-name { font-weight: 600; font-size: 0.9375rem; }
.rr-sub { font-size: 0.8125rem; color: var(--ink-3); }
.rr-fig { display: grid; justify-items: end; gap: 1px; }
.rr-v { font: 650 1rem var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.rr-share { font-size: 0.8125rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rr-delta { min-width: 64px; display: flex; justify-content: flex-end; }
.rr-delta .delta { font-size: 0.8125rem; }
.ring-note { margin: 0; font-size: 0.8125rem; color: var(--ink-3); }
@media (max-width: 560px) { .ring-body { grid-template-columns: 1fr; justify-items: center; } .chart.ring { max-width: 190px; } .ring-rows { width: 100%; } }
.table-scroll.list-box { max-height: min(70vh, 760px); overflow-y: auto; overscroll-behavior: contain; }
.table-scroll.list-box .more-rows { margin: 0; padding: 14px 0; }
section.swapping { opacity: .55; transition: opacity .12s; pointer-events: none; }
.split-panels .panel.ring-card { display: flex; background: var(--sheet); border: 1px solid var(--rule); border-radius: 20px; padding: 22px 22px 18px; container-type: inline-size; }
@container (max-width: 520px) {
  .ring-body { grid-template-columns: 1fr; justify-items: center; gap: 18px; }
  .ring-fig { width: 176px; }
  .ring-rows { width: 100%; }
}
.dash-head { align-items: center; }
.dash-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dash-nav .dn-step { width: 32px; height: 32px; }
.dash-nav .dn-latest { font-size: 0.8125rem; font-weight: 600; }

/* ======================================================================
   The month in review: full screen, one slide at a time
   ====================================================================== */
.recap-body { margin: 0; background: var(--paper); color: var(--ink); overflow: hidden; }
.recap { position: fixed; inset: 0; display: grid; grid-template-rows: auto 1fr; outline: none;
  background:
    radial-gradient(1200px 600px at 85% -10%, color-mix(in srgb, var(--series1) 14%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, color-mix(in srgb, var(--series3) 12%, transparent), transparent 60%),
    var(--paper); }
.rc-top { padding: max(14px, env(safe-area-inset-top)) 20px 0; position: relative; z-index: 3; max-width: 980px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.rc-progress { display: flex; gap: 4px; }
.rc-progress span { flex: 1; height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 14%, transparent); overflow: hidden; }
.rc-progress i { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 3px; transition: width .45s cubic-bezier(.2, .8, .2, 1); }
.rc-progress span.done i { width: 100%; }
.rc-bar-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.rc-month select { appearance: none; border: 0; background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); font: 600 0.875rem var(--text);
  padding: 7px 30px 7px 12px; border-radius: 999px; min-height: 0; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.rc-count-label { margin-left: auto; font-size: 0.8125rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rc-close { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-size: 22px; line-height: 1; text-decoration: none; color: var(--ink);
  background: color-mix(in srgb, var(--ink) 7%, transparent); }
.rc-close:hover { background: color-mix(in srgb, var(--ink) 12%, transparent); }
.rc-stage { position: relative; overflow: hidden; }
.rc-slide { position: absolute; inset: 0; overflow-y: auto; display: grid; align-items: center; justify-items: center; padding: 20px 20px max(40px, env(safe-area-inset-bottom));
  opacity: 0; transform: translateX(40px) scale(.985); pointer-events: none; visibility: hidden;
  transition: opacity .5s cubic-bezier(.2, .8, .2, 1), transform .6s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .6s; }
.rc-slide.on { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.rc-slide.past { transform: translateX(-40px) scale(.985); }
.rc-inner { width: 100%; max-width: 760px; }
.rc-slide.on .rc-inner > * { animation: rc-up .7s cubic-bezier(.2, .8, .2, 1) both; }
.rc-slide.on .rc-inner > *:nth-child(2) { animation-delay: .06s; } .rc-slide.on .rc-inner > *:nth-child(3) { animation-delay: .12s; }
.rc-slide.on .rc-inner > *:nth-child(4) { animation-delay: .18s; } .rc-slide.on .rc-inner > *:nth-child(5) { animation-delay: .24s; }
.rc-slide.on .rc-inner > *:nth-child(n+6) { animation-delay: .3s; }
@keyframes rc-up { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { .rc-slide, .rc-slide.on .rc-inner > * { transition: none; animation: none; transform: none; } }
.rc-eyebrow { margin: 0 0 10px; font: 600 0.8125rem var(--text); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.rc-hero { margin: 0; font: 700 clamp(3.25rem, 11vw, 6.5rem)/1 var(--display); letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.rc-hero.small { font-size: clamp(2.5rem, 8vw, 4.5rem); margin-top: 18px; }
.rc-title { margin: 0 0 26px; font: 650 clamp(1.5rem, 3.6vw, 2.25rem)/1.18 var(--display); letter-spacing: -0.025em; max-width: 24ch; text-wrap: balance; }
.rc-sub { margin: 10px 0 0; font-size: 1.125rem; color: var(--ink-2); }
.rc-compare { margin-top: 30px; display: grid; gap: 14px; justify-items: start; }
.rc-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.rc-seg button { border: 0; background: none; color: var(--ink-2); font: 600 0.875rem var(--text); padding: 7px 14px; border-radius: 999px; min-height: 0; cursor: pointer; }
.rc-seg button.on { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.rc-big-line { margin: 0; display: flex; align-items: center; gap: 12px; font-size: 1.0625rem; color: var(--ink-2); }
.rc-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font: 700 0.9375rem var(--text); font-variant-numeric: tabular-nums; }
.rc-chip.up { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good-ink); }
.rc-chip.down { background: color-mix(in srgb, var(--critical) 14%, transparent); color: var(--bad-ink); }
.rc-chip.flat { background: var(--tint); color: var(--ink-2); }
.rc-big-line .rc-chip { font-size: 1.125rem; padding: 6px 12px; }
.rc-rank { margin: 28px 0 0; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 1rem; padding: 10px 16px; border-radius: 14px;
  background: color-mix(in srgb, var(--ink) 5%, transparent); }
.rc-rank .icon { width: 18px; height: 18px; color: var(--ink-3); }
.rc-rank.top .icon { color: var(--good); }
.rc-hint { margin: 42px 0 0; font-size: 0.8125rem; color: var(--ink-3); }
.rc-note { margin: 20px 0 0; font-size: 0.875rem; color: var(--ink-3); max-width: 60ch; }
.rc-card { padding: 18px 20px; border-radius: 20px; background: color-mix(in srgb, var(--sheet) 88%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 7%, transparent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .04); }
.rc-k { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; font-weight: 600; color: var(--ink-3); }
.rc-v { margin: 6px 0 0; font: 700 1.75rem/1.1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.rc-s { margin: 6px 0 0; font-size: 0.875rem; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rc-s.up { color: var(--good-ink); } .rc-s.down { color: var(--bad-ink); }
.rc-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.rc-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.rc-wide { margin-top: 18px; }
.rc-gap { margin-top: 24px; }
/* drivers */
.rc-drivers { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rc-drivers li { display: grid; grid-template-columns: minmax(160px, 1fr) 1.3fr 90px; gap: 16px; align-items: center; padding: 16px 18px; border-radius: 18px; background: color-mix(in srgb, var(--sheet) 88%, transparent); }
.rd-name { display: grid; gap: 3px; font-weight: 650; }
.rd-vals { font-weight: 400; font-size: 0.875rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rd-vals strong { color: var(--ink); font-weight: 650; }
.rd-bar { position: relative; height: 14px; }
.rd-mid { position: absolute; left: 50%; top: -6px; bottom: -6px; width: 1.5px; background: var(--rule-strong); border-radius: 1px; }
.rd-fill { position: absolute; top: 0; height: 100%; width: 0; border-radius: 7px; transition: width .9s cubic-bezier(.2, .8, .2, 1) .25s; }
.rc-drivers li.d-pos .rd-fill { left: 50%; background: linear-gradient(90deg, color-mix(in srgb, var(--series1) 70%, white), var(--series1)); }
.rc-drivers li.d-neg .rd-fill { right: 50%; background: linear-gradient(270deg, color-mix(in srgb, var(--series2) 70%, white), var(--series2)); }
.rd-v { text-align: right; font: 700 1.0625rem var(--display); font-variant-numeric: tabular-nums; }
/* rhythm */
.rc-days { display: flex; align-items: flex-end; gap: 3px; height: 180px; padding: 10px 0; }
.rc-day { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; }
.rc-day .rc-bar, .rc-day .rc-ghost { position: absolute; bottom: 0; width: 72%; height: 0; border-radius: 5px 5px 2px 2px; transition: height .8s cubic-bezier(.2, .8, .2, 1); }
.rc-day .rc-ghost { width: 100%; background: color-mix(in srgb, var(--cmp) 80%, transparent); }
.rc-day .rc-bar { background: linear-gradient(180deg, color-mix(in srgb, var(--series1) 75%, white), var(--series1)); }
.rc-day.best .rc-bar { background: linear-gradient(180deg, color-mix(in srgb, var(--series3) 70%, white), var(--series3)); }
.rc-day:hover .rc-bar { filter: brightness(1.08); }
.rc-wd { display: flex; align-items: flex-end; gap: 6px; height: 70px; margin-top: 10px; }
.rc-wd span { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.rc-wd i { width: 100%; height: 0; border-radius: 6px; background: color-mix(in srgb, var(--series1) 35%, transparent); transition: height .8s cubic-bezier(.2, .8, .2, 1) .2s; }
.rc-wd span.top i { background: var(--series1); }
.rc-wd b { font-size: 0.6875rem; color: var(--ink-3); font-weight: 600; }
/* customers */
.rc-ringrow { display: grid; grid-template-columns: minmax(180px, 240px) 1fr; gap: 28px; align-items: center; }
.rc-stack { display: grid; gap: 12px; }
/* products and places */
.rc-lines, .rc-places { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rc-lines details { border-radius: 16px; background: color-mix(in srgb, var(--sheet) 88%, transparent); }
.rc-lines summary { display: grid; grid-template-columns: 24px minmax(90px, 1fr) 1.4fr 70px; gap: 12px; align-items: center; padding: 12px 16px; cursor: pointer; list-style: none; }
.rc-lines summary::-webkit-details-marker { display: none; }
.rl-rank { font: 700 0.875rem var(--display); color: var(--ink-3); }
.rl-name { font-weight: 650; }
.rl-bar { height: 10px; border-radius: 5px; background: color-mix(in srgb, var(--ink) 6%, transparent); overflow: hidden; }
.rl-bar span { display: block; height: 100%; width: 0; border-radius: 5px; background: linear-gradient(90deg, color-mix(in srgb, var(--series1) 70%, white), var(--series1)); transition: width .9s cubic-bezier(.2, .8, .2, 1) .2s; }
.rl-v { text-align: right; font: 650 0.9375rem var(--display); font-variant-numeric: tabular-nums; }
.rl-more { margin: 0; padding: 0 16px 14px 52px; font-size: 0.875rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rc-places li { display: grid; grid-template-columns: minmax(110px, 1fr) 1.4fr 70px 70px; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 16px; background: color-mix(in srgb, var(--sheet) 88%, transparent); }
.rp-name { font-weight: 650; } .rp-v { text-align: right; font: 650 0.9375rem var(--display); font-variant-numeric: tabular-nums; } .rp-c { text-align: right; }
.rp-c .rc-chip { font-size: 0.75rem; padding: 2px 8px; }
.rc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rc-pill { padding: 8px 14px; border-radius: 999px; background: color-mix(in srgb, var(--sheet) 88%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 7%, transparent); font-size: 0.9375rem; }
.rc-pill b { margin-left: 4px; }
/* money */
.rc-stackbar { display: flex; gap: 3px; height: 44px; border-radius: 14px; overflow: hidden; }
.rc-stackbar span { width: 0; height: 100%; transition: width .9s cubic-bezier(.2, .8, .2, 1) .2s; }
.rc-stackbar span:first-child { border-radius: 14px 0 0 14px; } .rc-stackbar span:last-child { border-radius: 0 14px 14px 0; }
.sb-0 { background: var(--series2); } .sb-1 { background: var(--series5); } .sb-2 { background: var(--series4); } .sb-3 { background: var(--series7); }
.sb-kept { background: linear-gradient(90deg, color-mix(in srgb, var(--series3) 75%, white), var(--series3)); }
.rc-legend { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.9375rem; color: var(--ink-2); }
.rc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.rc-legend b { color: var(--ink); margin-left: 4px; font-variant-numeric: tabular-nums; }
/* campaigns */
.rc-camps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rc-est { font: 600 0.75rem var(--text); padding: 2px 8px; border-radius: 999px; background: var(--tint); color: var(--ink-3); vertical-align: middle; letter-spacing: 0; }
/* season */
.rc-track { position: relative; height: 22px; border-radius: 11px; background: color-mix(in srgb, var(--ink) 7%, transparent); margin-top: 8px; }
.rt-done { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 11px; background: linear-gradient(90deg, color-mix(in srgb, var(--series1) 70%, white), var(--series1)); transition: width 1s cubic-bezier(.2, .8, .2, 1) .2s; }
.rt-range { position: absolute; top: -4px; bottom: -4px; border-radius: 8px; border: 2px dashed color-mix(in srgb, var(--series1) 60%, transparent); }
.rt-prior { position: absolute; top: -8px; bottom: -8px; width: 3px; border-radius: 2px; background: var(--ink); }
/* verdict */
.rc-verdict { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rc-verdict section { padding: 18px; border-radius: 22px; background: color-mix(in srgb, var(--sheet) 88%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 7%, transparent); }
.rc-verdict h3 { margin: 0 0 10px; font: 650 1.0625rem var(--display); }
.rc-verdict ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rc-verdict details { border-radius: 14px; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.rc-verdict summary { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; cursor: pointer; list-style: none; }
.rc-verdict summary::-webkit-details-marker { display: none; }
.rv-icon .icon { width: 18px; height: 18px; } .rv-icon.up .icon { color: var(--good); } .rv-icon.down .icon { color: var(--warning-mark); }
.rv-t { font-weight: 600; font-size: 0.9375rem; }
.rv-a { font: 700 0.9375rem var(--display); font-variant-numeric: tabular-nums; } .rv-a.up { color: var(--good-ink); } .rv-a.down { color: var(--bad-ink); }
.rc-verdict details p { margin: 0; padding: 0 14px 10px 46px; font-size: 0.875rem; color: var(--ink-2); }
.rc-verdict .rv-do { color: var(--ink); font-weight: 500; }
/* next */
.rc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
/* navigation */
.rc-nav { position: absolute; top: 50%; z-index: 2; width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: color-mix(in srgb, var(--sheet) 80%, transparent); color: var(--ink); box-shadow: 0 2px 10px rgba(0, 0, 0, .08); transition: opacity .2s; min-height: 0; padding: 0; }
.rc-nav .icon { width: 18px; height: 18px; }
.rc-nav.prev { left: max(16px, calc(50% - 560px)); } .rc-nav.prev .icon { transform: rotate(180deg); }
.rc-nav.next { right: max(16px, calc(50% - 560px)); }
.rc-nav[disabled] { opacity: 0; pointer-events: none; }
@media (max-width: 760px) {
  .rc-nav { display: none; }
  .rc-ringrow, .rc-verdict { grid-template-columns: 1fr; }
  .rc-ringrow .rc-ring { max-width: 200px; margin: 0 auto; }
  .rc-drivers li { grid-template-columns: 1fr 80px; } .rc-drivers .rd-bar { grid-column: 1 / -1; grid-row: 2; }
  .rc-places li { grid-template-columns: 1fr 70px 60px; } .rc-places .rl-bar { grid-column: 1 / -1; grid-row: 2; }
  .rc-lines summary { grid-template-columns: 20px 1fr 70px; } .rc-lines .rl-bar { grid-column: 2 / -1; grid-row: 2; }
  .rc-three { grid-template-columns: 1fr 1fr; }
}
/* the invitation on the Overview */
.recap-invite { position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px; margin: 0 0 20px; padding: 22px 24px; border-radius: 22px; text-decoration: none; color: var(--ink);
  background: linear-gradient(120deg, color-mix(in srgb, var(--series1) 16%, var(--sheet)), color-mix(in srgb, var(--series3) 14%, var(--sheet)));
  border: 1px solid color-mix(in srgb, var(--series1) 20%, var(--rule)); transition: transform .2s ease, box-shadow .2s ease; }
.recap-invite:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(0, 0, 0, .08); }
.ri-glow { position: absolute; right: -60px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--series1) 30%, transparent), transparent 70%); pointer-events: none; }
.ri-text { position: relative; display: grid; gap: 4px; flex: 1; }
.ri-k { font: 600 0.75rem var(--text); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.ri-text strong { font: 700 1.375rem/1.2 var(--display); letter-spacing: -0.02em; }
.ri-chg { font: 600 0.9375rem var(--text); color: var(--ink-2); margin-left: 6px; }
.ri-s { font-size: 0.875rem; color: var(--ink-2); }
.ri-play { position: relative; flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; padding-left: 3px; box-sizing: border-box;
  background: var(--ink); color: var(--paper); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.rc-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 4px 0 0; font-size: 0.8125rem; color: var(--ink-3); }
.rc-key span { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: -8px; }
.rc-key .k1 { background: var(--series1); } .rc-key .k2 { background: var(--cmp); } .rc-key .k3 { background: var(--series3); }
.recap-invite .ri-play svg { width: 20px; height: 20px; fill: var(--paper); margin-left: 2px; }

/* ---- Your day: the daily story, in the month in review's frame ---- */
.invites { display: grid; gap: 14px; margin: 0 0 20px; }
.invites.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.invites .recap-invite { margin: 0; }
.day-invite { background: linear-gradient(120deg, color-mix(in srgb, var(--series4) 18%, var(--sheet)), color-mix(in srgb, var(--series5) 16%, var(--sheet)));
  border-color: color-mix(in srgb, var(--series2) 22%, var(--rule)); }
.day-invite .ri-glow { background: radial-gradient(circle, color-mix(in srgb, var(--series2) 32%, transparent), transparent 70%); }
.day-invite .ri-s b { font-weight: 650; color: var(--ink); }
.rc-daypick { display: inline-flex; align-items: center; gap: 8px; }
.rc-daypick .dn-step { width: 32px; height: 32px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 7%, transparent); border: 0; }
.rc-daylabel { font: 600 0.875rem var(--text); min-width: 8ch; text-align: center; }
.rc-hours { gap: 2px; height: 160px; }
.rc-hours .rc-day .rc-bar, .rc-hours .rc-day .rc-ghost { border-radius: 4px 4px 1px 1px; }
.rc-axis { display: flex; justify-content: space-between; margin: 6px 0 10px; font-size: 0.75rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rc-week { gap: 12px; height: 200px; padding-bottom: 26px; }
.rc-week .rc-day .rc-bar, .rc-week .rc-day .rc-ghost { bottom: 22px; }
.rc-week .rc-day .rc-bar { width: 56%; }
.rc-wdl { position: absolute; bottom: 0; font: 600 0.75rem var(--text); color: var(--ink-3); }
.rt-end { position: absolute; top: -8px; bottom: -8px; width: 3px; border-radius: 2px; background: var(--ink-3); }
.rt-swatch { display: inline-block; width: 3px; height: 14px; border-radius: 2px; }
.rt-swatch.prior { background: var(--ink); } .rt-swatch.end { background: var(--ink-3); }
.rc-todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: td; }
.rc-todo li { display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center; padding: 18px 20px; border-radius: 20px;
  background: color-mix(in srgb, var(--sheet) 90%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 7%, transparent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .04); opacity: 0; transform: translateY(10px); }
.rc-slide.on .rc-todo li { animation: td-in .5s cubic-bezier(.2, .8, .2, 1) forwards; }
.rc-slide.on .rc-todo li:nth-child(2) { animation-delay: .08s; } .rc-slide.on .rc-todo li:nth-child(3) { animation-delay: .16s; } .rc-slide.on .rc-todo li:nth-child(4) { animation-delay: .24s; }
@keyframes td-in { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rc-todo li { opacity: 1; transform: none; } .rc-slide.on .rc-todo li { animation: none; } }
.td-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; }
.td-icon .icon { width: 22px; height: 22px; }
.td-act .td-icon { background: color-mix(in srgb, var(--series1) 14%, transparent); color: var(--series1); }
.td-check .td-icon { background: color-mix(in srgb, var(--warning) 18%, transparent); color: var(--warning-mark); }
.td-good .td-icon { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good-ink); }
.td-text { min-width: 0; }
.td-k { margin: 0; font: 600 0.75rem var(--text); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.td-t { margin: 2px 0 0; font: 650 1.0625rem/1.3 var(--display); }
.td-why { margin: 4px 0 0; font-size: 0.875rem; line-height: 1.45; color: var(--ink-2); }
.td-go { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; padding: 9px 14px; border-radius: 999px; font: 600 0.875rem var(--text);
  background: var(--ink); color: var(--paper); text-decoration: none; }
.td-go:hover { filter: brightness(1.15); }
.td-go .icon { width: 14px; height: 14px; }
@media (max-width: 640px) {
  .rc-todo li { grid-template-columns: 36px 1fr; gap: 12px; padding: 16px; }
  .td-icon { width: 36px; height: 36px; border-radius: 12px; }
  .td-go { grid-column: 2; justify-self: start; }
  .rc-week { gap: 6px; }
}

/* ---- The side panel: every quick look slides in from the right (from the bottom on a phone),
   so the page it came from stays in view beside it. ---- */
dialog.quick::backdrop { background: rgba(9, 12, 22, 0.28); backdrop-filter: blur(2px); }
@media (min-width: 900px) {
  dialog.quick { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(700px, 58vw); height: 100vh; max-height: 100vh; border-radius: 24px 0 0 24px;
    box-shadow: -1px 0 0 var(--rule), -24px 0 60px rgba(9, 12, 22, .16); overscroll-behavior: contain; }
  dialog.quick[open] { animation: sheet-in .32s cubic-bezier(.2, .8, .2, 1); }
  dialog.quick .quick-inner { padding: 36px 40px 48px; }
}
@media (max-width: 899px) {
  dialog.quick { position: fixed; inset: auto 0 0 0; margin: 0; width: 100vw; max-width: 100vw; max-height: 90vh; border-radius: 24px 24px 0 0;
    padding-bottom: env(safe-area-inset-bottom); overscroll-behavior: contain; }
  dialog.quick[open] { animation: sheet-up .32s cubic-bezier(.2, .8, .2, 1); }
  dialog.quick::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; margin: 10px auto 0; background: var(--rule-strong); }
  dialog.quick .quick-inner { padding: 20px 20px 32px; }
}
@keyframes sheet-in { from { transform: translateX(48px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { dialog.quick[open] { animation: none; } }
svg.chart .bar-g[data-s] { cursor: pointer; }
.recap svg.chart .bar-g[data-s] { cursor: default; }

/* ---- Charts draw themselves in the first time they come into view ---- */
@media (prefers-reduced-motion: no-preference) {
  svg.chart.will-draw .bar, svg.chart.will-draw .ghost { transform: scaleY(0); transform-box: fill-box; transform-origin: 50% 100%; }
  svg.chart.drawn .bar, svg.chart.drawn .ghost { transform: none; transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
  svg.chart.drawn .bar-g:nth-child(4n+1) .bar { transition-delay: .02s; } svg.chart.drawn .bar-g:nth-child(4n+2) .bar { transition-delay: .06s; }
  svg.chart.drawn .bar-g:nth-child(4n+3) .bar { transition-delay: .1s; } svg.chart.drawn .bar-g:nth-child(4n) .bar { transition-delay: .14s; }
  svg.chart.will-draw path.line:not(.line-cmp) { stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000); }
  svg.chart.drawn path.line:not(.line-cmp) { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s cubic-bezier(.35, .1, .2, 1); }
  svg.chart.will-draw .area, svg.chart.will-draw .dot, svg.chart.will-draw .end-label, svg.chart.will-draw .peak-label, svg.chart.will-draw .line-cmp { opacity: 0; }
  svg.chart.drawn .area, svg.chart.drawn .dot, svg.chart.drawn .end-label, svg.chart.drawn .peak-label { opacity: 1; transition: opacity .5s ease .7s; }
  svg.chart.drawn .line-cmp { opacity: 1; transition: opacity .6s ease .1s; }
}

/* ---- The Atlas agent ---- */
.ag-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; padding: 34px 36px; margin: 8px 0 18px;
  border-radius: 28px; border: 1px solid color-mix(in srgb, var(--series1) 18%, var(--rule));
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--series1) 20%, var(--sheet)) 0%, transparent 55%),
              radial-gradient(120% 140% at 100% 100%, color-mix(in srgb, var(--series3) 18%, var(--sheet)) 0%, transparent 60%),
              linear-gradient(120deg, color-mix(in srgb, var(--series7) 8%, var(--sheet)), var(--sheet)); }
.ag-orb { position: relative; width: 84px; height: 84px; }
.ag-orb span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--series1) 55%, transparent); }
.ag-orb span:first-child { inset: 22px; border: 0; background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--series1) 40%, white), var(--series1) 60%, var(--series7));
  box-shadow: 0 6px 20px color-mix(in srgb, var(--series1) 45%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  .ag-orb span:not(:first-child) { animation: ag-ping 2.8s cubic-bezier(.2, .6, .2, 1) infinite; opacity: 0; }
  .ag-orb span:nth-child(3) { animation-delay: 1.4s; }
  .ag-orb span:first-child { animation: ag-breathe 2.8s ease-in-out infinite; }
}
@keyframes ag-ping { 0% { transform: scale(.45); opacity: .9; } 100% { transform: scale(1.15); opacity: 0; } }
@keyframes ag-breathe { 50% { transform: scale(1.06); } }
.ag-eyebrow { margin: 0 0 6px; font: 600 0.75rem var(--text); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.ag-head { margin: 0; font: 700 clamp(1.5rem, 3vw, 2.25rem)/1.15 var(--display); letter-spacing: -0.03em; text-wrap: balance; max-width: 26ch; }
.ag-sub { margin: 10px 0 0; color: var(--ink-2); max-width: 62ch; }
.ag-play { display: grid; justify-items: center; gap: 8px; text-decoration: none; color: var(--ink); font: 600 0.8125rem var(--text); }
.ag-play .ri-play svg { width: 20px; height: 20px; fill: var(--paper); margin-left: 2px; }
.ag-play:hover .ri-play { transform: scale(1.05); }
.ag-play .ri-play { transition: transform .2s ease; }
.ag-loop { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ag-loop li { display: flex; align-items: baseline; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--sheet); border: 1px solid var(--rule); font-size: 0.875rem; }
.ag-loop li b { font-weight: 650; } .ag-loop li span { color: var(--ink-3); font-size: 0.8125rem; }
.ag-loop li:not(:last-child)::after { content: "→"; margin-left: 10px; color: var(--ink-3); }
.ag-loop li:last-child::after { content: "↺"; margin-left: 10px; color: var(--series1); font-weight: 700; }
.ag-section { margin: 0 0 28px; }
.ag-h { margin: 0 0 12px; font: 700 1.25rem var(--display); letter-spacing: -0.02em; }
.ag-note { margin: -4px 0 14px; font-size: 0.875rem; color: var(--ink-2); }
.ag-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ag-card { padding: 22px 24px; border-radius: 22px; background: var(--sheet); border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px rgba(0, 0, 0, .05); display: grid; gap: 16px; }
.ag-card.doing { border-color: color-mix(in srgb, var(--series1) 40%, var(--rule)); }
@media (prefers-reduced-motion: no-preference) {
  .ag-card { animation: td-in .5s cubic-bezier(.2, .8, .2, 1) both; opacity: 0; transform: translateY(10px); }
  .ag-card:nth-child(2) { animation-delay: .07s; } .ag-card:nth-child(3) { animation-delay: .14s; } .ag-card:nth-child(4) { animation-delay: .21s; }
}
.ag-top { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.ag-t { margin: 2px 0 0; font: 650 1.1875rem/1.3 var(--display); letter-spacing: -0.01em; }
.ag-why { margin: 6px 0 0; color: var(--ink-2); line-height: 1.5; max-width: 70ch; }
.ag-aud { margin-left: 60px; }
.ag-k { margin: 0 0 8px; font: 600 0.75rem var(--text); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.ag-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ag-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 0.875rem;
  background: color-mix(in srgb, var(--series1) 9%, var(--sheet)); border: 1px solid color-mix(in srgb, var(--series1) 22%, var(--rule)); }
.ag-chip b { font-variant-numeric: tabular-nums; }
.ag-chip .icon { width: 12px; height: 12px; color: var(--ink-3); }
.ag-chip:hover { border-color: var(--series1); }
.ag-draft { margin-left: 60px; border-radius: 16px; background: color-mix(in srgb, var(--ink) 3.5%, var(--paper)); border: 1px solid var(--rule); }
.ag-draft summary { display: flex; align-items: center; gap: 8px; padding: 12px 16px; cursor: pointer; list-style: none; font-weight: 600; font-size: 0.9375rem; }
.ag-draft summary::-webkit-details-marker { display: none; }
.ag-draft summary .icon { width: 14px; height: 14px; transition: transform .2s ease; color: var(--ink-3); }
.ag-draft[open] summary .icon { transform: rotate(90deg); }
.ag-subj { margin: 0 16px 10px; font-weight: 600; } .ag-subj span { font-weight: 500; color: var(--ink-3); margin-right: 6px; }
.ag-body { margin: 0 16px; padding: 14px 16px; border-radius: 12px; background: var(--sheet); border: 1px solid var(--rule-soft); white-space: pre-wrap; font: 0.9375rem/1.55 var(--text); max-height: 340px; overflow: auto; }
.ag-draft-foot { display: flex; align-items: center; gap: 10px; padding: 12px 16px 14px; }
.ag-copied { font-size: 0.8125rem; color: var(--good-ink); font-weight: 600; }
.ag-actions { margin-left: 60px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ag-form { margin: 0; display: inline; }
.ag-later { color: var(--ink-3); }
.ag-empty { display: flex; gap: 12px; align-items: center; padding: 22px 24px; border-radius: 20px; background: color-mix(in srgb, var(--good) 8%, var(--sheet)); border: 1px solid color-mix(in srgb, var(--good) 22%, var(--rule)); }
.ag-empty p { margin: 0; } .ag-empty .icon { width: 24px; height: 24px; color: var(--good); flex: none; }
.ag-empty.soft { background: var(--sheet); border-color: var(--rule); color: var(--ink-2); }
.ag-two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }
.ag-outcomes { list-style: none; margin: 0; padding: 0; border-radius: 20px; background: var(--sheet); border: 1px solid var(--rule); }
.ag-outcomes li { display: grid; grid-template-columns: 12px 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; }
.ag-outcomes li + li { border-top: 1px solid var(--rule-soft); }
.ag-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); }
.ag-dot.worked { background: var(--good); } .ag-dot.quiet { background: var(--critical); }
.ag-o-t { margin: 0; font-weight: 600; } .ag-o-d { margin: 2px 0 0; font-size: 0.8125rem; color: var(--ink-3); }
.ag-o-v { display: grid; justify-items: end; gap: 3px; font-variant-numeric: tabular-nums; }
.ag-o-v strong { font: 700 1.0625rem var(--display); } .ag-o-v > span:not(.rc-chip) { font-size: 0.75rem; color: var(--ink-3); }
.ag-o-v .rc-chip { font-size: 0.75rem; padding: 2px 8px; }
.ag-checks { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.ag-checks li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; padding: 14px 16px; border-radius: 16px; background: var(--sheet); border: 1px solid var(--rule); }
.ag-checks li .icon { width: 20px; height: 20px; margin-top: 1px; }
.ag-checks li.ok .icon { color: var(--good); } .ag-checks li.no .icon { color: var(--warning-mark); }
.ag-checks p { margin: 0; font-weight: 600; } .ag-checks span { font-size: 0.875rem; color: var(--ink-2); }
@media (max-width: 860px) {
  .ag-hero { grid-template-columns: 1fr; padding: 26px 22px; gap: 18px; }
  .ag-orb { width: 64px; height: 64px; } .ag-orb span:first-child { inset: 16px; }
  .ag-play { display: inline-flex; align-items: center; gap: 12px; justify-self: start; }
  .ag-loop { display: grid; grid-template-columns: 1fr 1fr; }
  .ag-loop li { padding: 8px 12px; flex-direction: column; gap: 0; }
  .ag-loop li::after { display: none; }
  .ag-two { grid-template-columns: 1fr; }
  .ag-aud, .ag-draft, .ag-actions { margin-left: 0; }
  .ag-card { padding: 18px; }
}
.ag-strip { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; padding: 12px 16px 12px 12px; border-radius: 18px; text-decoration: none; color: var(--ink);
  background: var(--sheet); border: 1px solid color-mix(in srgb, var(--series1) 22%, var(--rule)); box-shadow: 0 1px 2px rgba(0, 0, 0, .03); transition: box-shadow .2s ease, transform .2s ease; }
.ag-strip:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, .07); transform: translateY(-1px); }
.ag-orb.small { width: 36px; height: 36px; flex: none; } .ag-orb.small span:first-child { inset: 10px; }
.ag-strip-t { flex: 1; min-width: 0; font-size: 0.9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-strip-t b { font-weight: 700; margin-right: 6px; }
.ag-strip-first { color: var(--ink-2); }
.ag-strip-go { display: inline-flex; align-items: center; gap: 4px; font: 600 0.875rem var(--text); color: var(--accent); white-space: nowrap; }
.ag-strip-go .icon { width: 14px; height: 14px; }
@media (max-width: 640px) { .ag-strip-go { display: none; } .ag-strip-t { white-space: normal; } }
.ag-card.ag-gone { opacity: 0; transform: translateX(24px) scale(.98); padding-top: 0; padding-bottom: 0; margin: 0; border-width: 0; overflow: hidden;
  transition: opacity .25s ease, transform .3s ease, height .4s cubic-bezier(.2, .8, .2, 1) .1s, padding .4s ease .1s; }
.ag-subj em { font-style: normal; font-weight: 500; color: var(--ink-3); margin: 0 4px; }
