/* Sidekick dashboard look. Design tokens live on :root and are the only place colors, fonts and sizes are set, so
   the whole look can be redone here without touching sidekick/dash.py. The shared tokens and components come from
   design/ (copied in by `python3 site/build.py --sync`), the same as site/src/styles.css: --brand for headings,
   logo and footer; purple accent (--accent) for buttons, links and focus rings (design-direction.md, Grape 2026-10-22). */
@font-face { font-family: "Archivo"; src: url("/sidekick/static/archivo-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/sidekick/static/archivo-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/sidekick/static/archivo-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }

/* ==== shared tokens: generated from design/tokens.css by `python3 site/build.py --sync`, edit there ==== */
/* Shared design tokens: the website (site/src/styles.css) and the dashboard (sidekick/static/dash.css). DESIGN.md is
   the spec. Edit here, then run `python3 site/build.py --sync` to copy this into both stylesheets (a test checks they
   match). Colors live only on :root. Dark for everyone; light only when the visitor turns it on in the footer (the
   sk_theme cookie: the server adds data-theme="light" to <html>, no script). */
:root {
  color-scheme: dark;
  --brand: #E4D9FA;       /* headings, logo */
  --brand-deep: #2E1657;  /* footer, trust band (stays deep purple in both schemes) */
  --accent: #6D3FD6;      /* buttons, bars, toggles (Grape, matches the bot) */
  --accent-deep: #5A30BC; /* hover, pressed */
  --accent-ink: #9B7BF0;  /* accent as text: links, numbers, focus rings, quiet-button edges */
  --on-accent: #FFFFFF;   /* text on accent buttons and on the deep purple footer */
  --ink: #ECE8F2;         /* body text */
  --muted: #ADA6B8;       /* secondary text */
  --paper: #15111C;       /* page */
  --stone: #1E1928;       /* panels, cards and bands */
  --soft: #2A2140;        /* Free pills, inline code, the current tab */
  --line: #342C40;        /* quiet rules and borders */
  --line-strong: #4A3F5C; /* card edges and row dividers you need to see */
  --field: #7A6F8C;       /* edges of things you type in (3:1) */
  --live: #D6453D;        /* the live dot, nothing else */
  --live-ink: #FF8A80;    /* the LIVE label text */
  --ok: #4FC48A;          /* check marks, connected, done */
  --win: #E9C46A;         /* wins only (Honey): milestones, every box ticked */
  --warn: #F29B5C;        /* heads-up notes (orange, darker than Honey): 8.5:1 page, 7.9:1 panels, 6.9:1 soft */
  --foot-ink: #E6DDF0;    /* text on the deep purple footer and trust band */
  --foot-line: #4A3270;   /* rules on the deep purple footer */
  --shadow: none;         /* card lift: flat in dark, soft in light */
  --radius: 10px;         /* every corner */
  --tap: 44px;            /* smallest tap target */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);   /* every UI transition */
  --dur-press: 160ms;     /* button press */
  --dur-ui: 200ms;        /* color changes, open and close */
  --dur-swap: 240ms;      /* page crossfade */
  /* Redesign A, Calm manager (2026-11): app shell, chart kit, spacing (shared since the dashboard uses them too) */
  --sidebar: #110D17;     /* dashboard sidebar and phone top bar, a step below the page */
  --sidebar-w: 248px;     /* dashboard sidebar width, labels always shown */
  --rank-name-w: 132px;   /* ranked-bar name column (charts.ranked, r20); 96px under 560px wide */
  --chart-1: #9B7BF0;     /* series order 1-4; they differ in lightness as well as hue */
  --chart-2: #5FA8E8;
  --chart-3: #F29B5C;
  --chart-4: #4FC48A;
  --heat-0: #272135;      /* best-time heat strip, empty slot */
  --heat-1: #392861;
  --heat-2: #4A3086;
  --heat-3: #5C38AE;
  --heat-4: #6D3FD6;      /* best slot (Grape) */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-6: 1.5rem; --s-8: 2rem; --s-12: 3rem; --s-16: 4rem;
  --t-xs: .75rem; --t-sm: .875rem; --t-base: 1rem; --t-lg: 1.125rem; --t-xl: 1.25rem;
  --t-stat: 2.25rem;      /* big numbers on stat tiles (800, tabular) */
  /* Contrast pass (2026-11-13, canvas 8RR3sfdzs9pxFH31yx37nL remix): each dashboard area has a key colour (the dot in
     its card header bars) and a tint (the header bar fill). Never text colours, never a status. */
  --key-stats: #A88BFA;   /* numbers and charts: Home tiles, Streams, Reports */
  --key-today: #4CC3D9;   /* Today, Discord, Community, Tools, Settings, server pages */
  --key-goal: #F28DB2;    /* goals, Road to Affiliate, Growth, Coach, Plan (rose: kept clear of --warn and --win) */
  --tint-stats: #2B2342;
  --tint-today: #19303A;
  --tint-goal: #3A2233;
  --tint-plain: #262033;  /* header bar of a card outside any area */
  --nav-current: #33275A; /* the current page in the dashboard sidebars (13:1 under --strong text) */
  /* Home "B Cockpit" (r24, #731): the three status fills the canvas added. Its --track is --soft, --focus is
     --accent-ink and --honey-text is --win here; --raise isn't used. */
  --ok-bg: #173326;       /* behind an up chip: --ok on it 6.2:1 */
  --warn-bg: #34231A;     /* heads-up rows: --ink 11:1, --accent-ink links 4.6:1, --warn icons 6.9:1 */
  --win-bg: #3A3018;      /* the Honey row (road done): --win on it 7.8:1 */
}
:root[data-theme="light"] {
  color-scheme: light;
  --brand: #2E1657;
  --accent-ink: #5434B8;
  --ink: #1F1A28;
  --muted: #5B536A;
  --paper: #F7F4FB;
  --stone: #FFFFFF;
  --soft: #ECE5F6;
  --line: #DDD5E8;
  --line-strong: #CFC5DD;
  --field: #8A7FA0;
  --live: #C23A33;
  --live-ink: #B3261E;
  --ok: #1A754A;
  --win: #7A5F00;         /* dark gold: 5.6:1 page, 6.1:1 panels, 4.9:1 soft */
  --warn: #8C3B00;        /* burnt orange, darker than --win: 7.0:1 page, 7.7:1 panels, 6.2:1 soft */
  --shadow: 0 1px 2px rgba(46, 22, 87, .08), 0 10px 30px rgba(46, 22, 87, .07);
  --sidebar: #EEE9F5;
  --chart-1: #6D3FD6;
  --chart-2: #2F78C4;
  --chart-3: #B85F22;
  --chart-4: #1C7F4E;
  --heat-0: #F0ECF6;
  --heat-1: #CFC1EE;
  --heat-2: #AF96E6;
  --heat-3: #8E6ADE;
  --heat-4: #6D3FD6;
  --key-stats: #6D3FD6;
  --key-today: #0B7285;
  --key-goal: #A3305E;
  --tint-stats: #F1ECFD;
  --tint-today: #E3F2F5;
  --tint-goal: #FBE9F0;
  --tint-plain: #F4F0F9;
  --nav-current: #E1D8FA;
  --ok-bg: #E1F3E9;       /* --ok 4.9:1 */
  --warn-bg: #FCEBDD;     /* --ink 14.6:1, --accent-ink 7.1:1, --warn 6.6:1 */
  --win-bg: #FBF1D6;      /* --win 5.4:1 */
}
/* ==== end shared tokens ==== */

/* Dashboard-only tokens (DESIGN.md "Dashboard-only tokens") */
:root {
  --strong: #FFFFFF;      /* the strongest text on a panel: post titles, setting names, message labels */
  --good: var(--ok);      /* connected, saved */
  --danger: #FF8A80;      /* remove, not connected, errors */
  --font: "Archivo", "Atkinson Hyperlegible", system-ui, sans-serif;
  --wrap: 44rem;
  --gap: 1.25rem;         /* space between cards and blocks */
  /* #185 Wrapped slides: one bold Grape colour each, fixed (no light-mode override, design.md "Wrapped") */
  --wrapped-0: #2E1657;
  --wrapped-1: #4A2391;
  --wrapped-2: #5A30BC;
  --wrapped-3: #3B1F6E;
  --wrapped-ink: #FFFFFF;
}
:root[data-theme="light"] {
  --strong: #1F1A28;
  --danger: #B3261E;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.55;
  font-size: 1.0625rem; min-height: 100vh; display: flex; flex-direction: column; -webkit-tap-highlight-color: transparent; }
main { flex: 1; width: 100%; padding-top: 2rem; padding-bottom: 3rem; }
main > p, .side-main > p, .card p { max-width: 62ch; }
.wrap { max-width: var(--wrap); margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }
a { color: var(--accent-ink); text-underline-offset: .18em; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent-ink); outline-offset: 3px; }
h1 { color: var(--brand); font-size: clamp(1.8rem, 5vw, 2.4rem); font-weight: 800; letter-spacing: -.02em;
  line-height: 1.15; margin: 0 0 .6rem; overflow-wrap: anywhere; }
h2 { color: var(--brand); font-size: 1.2rem; font-weight: 800; margin: 2rem 0 .5rem; }
h1, h2, h3 { text-wrap: balance; }   /* DESIGN.md Type: no single word alone on a heading's last line */
p, li { text-wrap: pretty; }
.back { display: inline-flex; align-items: center; min-height: var(--tap); }   /* "Back to your home": a 44px target, not a 20px line */
.lead { font-size: 1.15rem; color: var(--muted); margin-top: 0; }
.note { color: var(--muted); font-size: .95rem; }

/* header + footer */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1rem; min-height: 4rem;
  flex-wrap: wrap; }
.brand { font-weight: 800; color: var(--brand); text-decoration: none; font-size: 1.15rem; display: inline-flex;
  align-items: center; min-height: var(--tap); }
.top-links { display: flex; gap: 1rem; margin-right: auto; }   /* #132: Dashboard + Website, left after the logo */
.top-links a { color: var(--ink); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center;
  min-height: var(--tap); }
.top-links a:hover { color: var(--brand); text-decoration: underline; }
@media (max-width: 40rem) { .top-links .to-site { display: none; } }   /* phones: the logo is the website link */
.who { display: flex; align-items: center; gap: .75rem; margin: 0; color: var(--muted); min-width: 0; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 12rem; }
.foot { background: var(--brand-deep); color: var(--on-accent); padding: 1rem 0; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.foot a { color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap);
  min-width: var(--tap); }
.foot a:focus-visible { outline-color: var(--on-accent); }   /* white ring on the deep purple, like the site footer */

/* ==== shared components: generated from design/components.css by `python3 site/build.py --sync`, edit there ==== */
/* Shared components (DESIGN.md "Shared components"): button, pill, plan badge, card, progress bar, Example tag,
   status dot. Same source as tokens.css: edit here, then `python3 site/build.py --sync`. */
.button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: var(--tap);
  padding: .7rem 1.2rem; border: 2px solid var(--accent); border-radius: var(--radius); background: var(--accent);
  color: var(--on-accent); font: inherit; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none;
  cursor: pointer; user-select: none; }
.button.quiet { background: transparent; color: var(--accent-ink); border-color: var(--accent-ink); }
@media (hover: hover) {
  .button:hover { background: var(--accent-deep); border-color: var(--accent-ink); }
  .button.quiet:hover { background: var(--soft); }
}
.button:active { background: var(--accent-deep); }
.button.quiet:active { background: var(--soft); }
.button:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; }
.button[disabled] { opacity: .5; cursor: not-allowed; }

/* pills: a word in a rounded box. In a list (li.pill) it is a status and gets a dot; ok = connected or done */
.pill { display: inline-flex; align-items: center; gap: .4rem; padding: .15rem .65rem; border: 1px solid var(--line-strong);
  border-radius: 99px; font-size: .85rem; font-weight: 600; line-height: 1.4; color: var(--muted); background: var(--stone);
  white-space: nowrap; }
li.pill::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--muted); flex: none; }
.pill.ok { color: var(--ok); }
li.pill.ok::before { background: var(--ok); }
.pill.free { background: var(--soft); color: var(--accent-ink); border-color: var(--soft); }
.plan-badge { display: inline-flex; align-items: center; padding: .15rem .65rem; border: 1px solid var(--line-strong);
  border-radius: 99px; font-size: .85rem; font-weight: 600; line-height: 1.4; color: var(--muted); background: var(--stone); }
.plan-badge.plus, .plan-badge.trial { color: var(--brand); border-color: var(--accent-ink); background: var(--soft); }
.plan-badge.trial { border-style: dashed; }
.status-line { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0; }

/* status dot: a state next to its word, never alone. Red is only ever the live dot */
.status-dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--muted); flex: none; }
.status-dot.ok { background: var(--ok); }
.status-dot.live { background: var(--live); }

/* card: one feature area on a panel */
.card { background: var(--stone); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); }

/* progress bar: a real <progress>; a finished box turns ok green. Bars never animate their value */
progress { display: block; width: 100%; height: .45rem; appearance: none; -webkit-appearance: none; border: 0;
  border-radius: 99px; background: var(--line); color: var(--accent-ink); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--line); border-radius: 99px; }
progress::-webkit-progress-value { background: var(--accent-ink); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--accent-ink); border-radius: 99px; }
progress.done, .met progress { color: var(--ok); }
progress.done::-webkit-progress-value, .met progress::-webkit-progress-value { background: var(--ok); }
progress.done::-moz-progress-bar, .met progress::-moz-progress-bar { background: var(--ok); }

/* Example tag: marks a mock filled with made-up numbers */
.example-tag { display: inline-flex; align-items: center; font-size: .75rem; font-weight: 600; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 5px; padding: 0 .4rem; line-height: 1.5; }

/* MOTION: buttons change color in 200ms, lift 1px on hover and press to .97 (gated, deletable) */
@media (prefers-reduced-motion: no-preference) {
  .button { transition: background-color var(--dur-ui) ease, border-color var(--dur-ui) ease, color var(--dur-ui) ease,
    transform var(--dur-press) var(--ease-out); }
  .button:active { transform: scale(.97); }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .button:hover { transform: translateY(-1px); }
  .button:hover:active { transform: translateY(0) scale(.97); }
}

/* light mode switch (footer, deep purple in both schemes): a form, no script. Both buttons are in the page; the one
   for the look you already have is hidden. Posts to /theme (site) or the dashboard's theme path, which set sk_theme */
.theme-switch { margin: 0; }
.theme-switch button { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0; border: 0;
  background: none; color: var(--on-accent); font: inherit; text-decoration: underline; text-underline-offset: .18em;
  cursor: pointer; }
.theme-switch button:focus-visible { outline: 3px solid var(--on-accent); outline-offset: 2px; }
.theme-switch .to-dark, [data-theme="light"] .theme-switch .to-light { display: none; }
[data-theme="light"] .theme-switch .to-dark { display: inline-flex; }
/* ==== end shared components ==== */
/* buttons: filled = the one main action, quiet = everything else, danger = removes or deletes something */
.button { padding: .55rem 1.1rem; }   /* denser than the site */
.button.danger { background: var(--danger); border-color: var(--danger); color: var(--paper); }
.button.danger:hover { background: color-mix(in srgb, var(--danger) 82%, var(--paper)); }
.button.quiet.danger { background: transparent; color: var(--danger); }
.button.quiet.danger:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); }
.button[disabled] { opacity: .5; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 0; }
.row form { margin: 0; }

/* cards: one per feature area, title on top */
.card { padding: .25rem 1.25rem 1.25rem; margin: 0 0 var(--gap); }   /* look: shared .card */
.card > h2 { font-size: var(--t-lg); font-weight: 800; margin: 1rem 0 .25rem; }
.card > h2 + .note { margin-top: 0; }
/* Contrast pass (2026-11-13, DESIGN.md "Area colours"): the first title of a card is a tinted header bar with the
   area's key dot, so areas read apart before any words. The area comes from the page (data-area) or the card's id. */
.card { --pad-x: 1.25rem; }
.card > h2:first-child, .card > .card-head:first-child { margin: -.25rem calc(-1 * var(--pad-x)) var(--s-4);
  padding: var(--s-3) var(--pad-x); background: var(--tint, var(--tint-plain)); border-bottom: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
.card > h2:first-child, .card > .card-head:first-child > h2 { display: flex; align-items: center; gap: var(--s-2); }
.card > h2:first-child::before, .card > .card-head:first-child > h2::before { content: ""; flex: none; width: .625rem;
  height: .625rem; border-radius: 3px; background: var(--key, var(--muted)); }
.card > h2:first-child + .note, .card > .card-head:first-child + .note { margin-top: 0; }
/* DESIGN.md "Card icons": the card's Phosphor icon (dash_sections.CARD_ICONS, inlined server-side) takes the key
   dot's place in the area's key colour; a card the map doesn't know keeps the dot */
.card-icon { flex: none; width: 1.25rem; height: 1.25rem; color: var(--key, var(--muted)); }
.card > h2:first-child:has(> .card-icon)::before, .card > .card-head:first-child > h2:has(> .card-icon)::before { content: none; }
.tiles > .card > h2:first-child { display: block; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; }
.tiles > .card > h2:first-child::before { content: none; }   /* stat tiles keep a plain label: the strip is one block */
.card.danger-zone { --tint: transparent; --key: var(--danger); }
[data-area="stats"], #numbers, #totals, #recaps, #timeline, #snapshot, #weekly, #report, #followers
  { --key: var(--key-stats); --tint: var(--tint-stats); }
[data-area="today"], #today, #checkin, #quest, #setup, #servers, #discord, #posts
  { --key: var(--key-today); --tint: var(--tint-today); }
[data-area="goal"], #road, #goals, #focus, #milestones, #plan
  { --key: var(--key-goal); --tint: var(--tint-goal); }
.card .note { font-size: .95rem; color: var(--muted); }
.card > :last-child { margin-bottom: 0; }
.card .row { margin-top: 1rem; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 55%, var(--line-strong)); }
.danger-zone > h2 { color: var(--danger); }
.notice { padding-top: 1.1rem; }
.notice p:first-child { margin-top: 0; }

/* message boxes: the edge color and the bold first word both say what kind it is */
.msg { border-left: 4px solid var(--accent-ink); background: var(--stone); padding: .75rem 1rem; margin: 0 0 var(--gap);
  border-radius: 0 var(--radius) var(--radius) 0; max-width: none; }
.msg b:first-child { color: var(--strong); }
.msg.saved { border-left-color: var(--good); }
.msg.warn { border-left-color: var(--warn); }
.msg.error { border-left-color: var(--danger); }

/* forms */
.field { display: grid; gap: .3rem; font-weight: 600; margin: 1rem 0 0; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .95rem; }
.field select, .server select { font: inherit; font-weight: 400; min-height: var(--tap); padding: .4rem .6rem; border: 1px solid var(--field);
  border-radius: var(--radius); background: var(--paper); color: var(--ink); width: 100%; }
.field select:hover, .server select:hover { border-color: var(--muted); }
.server select { width: auto; max-width: 100%; }   /* #102: the role picker inline in a people row */
@media (max-width: 30rem) {   /* phones: the person's name on top, their role and buttons below */
  .server.person { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .server.person .row { justify-content: flex-start; }
}
.field input { font: inherit; font-weight: 400; min-height: var(--tap); padding: .4rem .6rem; border: 1px solid var(--field);
  border-radius: var(--radius); background: var(--paper); color: var(--ink); width: 100%; box-sizing: border-box; }
.field input:hover { border-color: var(--muted); }
.goal-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0 1rem; }
.goals { list-style: none; padding: 0; margin: .5rem 0 0; }
.goals li { padding: .75rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.goals li:first-child { border-top: 0; }
.goals .state { color: var(--muted); margin: .2rem 0 0; }
.goals .hit .state { color: var(--win); font-weight: 600; }
.goals form { display: inline-flex; margin: .5rem .5rem 0 0; }
.steps { padding-left: 1.4rem; margin: .5rem 0 0; }
.steps li { margin: .4rem 0; padding-left: .2rem; }
.steps li::marker { color: var(--accent-ink); font-weight: 800; }
/* #108 first-week quest: one row per step, an empty ring to do, a filled ok check when Sidekick ticked it */
#quest progress { margin: .5rem 0 .25rem; }
.quest { list-style: none; padding: 0; margin: .25rem 0 0; }
.quest-step { display: flex; align-items: center; gap: .75rem; padding: .75rem 0; border-top: 1px solid var(--line);
  flex-wrap: wrap; }
.quest-step:first-child { border-top: 0; }
.quest-step > div { flex: 1 1 14rem; min-width: 0; overflow-wrap: anywhere; }
.quest-step b { font-size: 1.05rem; color: var(--strong); }
.quest-step .note { margin: .2rem 0 0; }
.quest-step > .button { margin-left: 2.15rem; }   /* under the words, not the ring, once it wraps on a phone */
@media (min-width: 40rem) { .quest-step > .button { margin-left: 0; } }
.quest-mark { width: 1.4rem; height: 1.4rem; flex: none; border-radius: 50%; border: 2px solid var(--field);
  box-sizing: border-box; align-self: flex-start; margin-top: .1rem; }
.quest-step.done .quest-mark { background: var(--ok); border-color: var(--ok); position: relative; }
.quest-step.done .quest-mark::after { content: ""; position: absolute; left: .38rem; top: .14rem; width: .3rem;
  height: .62rem; border: solid var(--paper); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.quest-step.done b { color: var(--muted); font-weight: 600; }

/* server picker */
.servers { list-style: none; padding: 0; margin: .5rem 0 1.5rem; border-top: 1px solid var(--line); }
.server { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem;
  padding: .85rem 0; border-bottom: 1px solid var(--line); }
.server-info { display: grid; gap: .1rem; min-width: 0; }
.server .row { margin-top: 0; justify-content: flex-end; }   /* #102: role + Save + Remove on one line */
.server-name { font-weight: 600; overflow-wrap: anywhere; }
.long { overflow-wrap: anywhere; }   /* #213 an email address or a removal link on a phone */
.tag { font-size: .9rem; color: var(--muted); }
.tag.ok { color: var(--good); }
/* #207 Connections: a last-seen light, the dot before the words (green = seen lately, orange = needs you, grey = idle) */
.tag.off { color: var(--warn); }
.tag.light::before { content: ""; display: inline-block; width: .5rem; height: .5rem; margin-right: .4rem;
  border-radius: 50%; background: var(--muted); }
.tag.light.ok::before { background: var(--good); }
.tag.light.off::before { background: var(--warn); }
h2.group { font-size: 1.05rem; font-weight: 800; color: var(--brand); margin: 1.75rem 0 .25rem; }
.login-card { max-width: 32rem; margin-top: .5rem; }
.login-card .button { width: 100%; }
.asks { margin: 1rem 0; }   /* the 18+ page's list of Twitch permissions: there to open, the tick box stays in view */
.asks summary { min-height: var(--tap); line-height: var(--tap); color: var(--accent-ink); font-weight: 600; cursor: pointer; }
.asks li { margin-top: .5rem; overflow-wrap: anywhere; }
.msg:has(+ .login-card) { max-width: 32rem; }   /* a page's message sits above its card, at the card's width */

/* server pages: sidebar + cards (research: /mnt/project-files/design/dashboard-research.md) */
body:has(.server-frame) .wrap { max-width: 64rem; }
.server-frame { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 2rem; align-items: start; }
.side { display: grid; gap: .15rem; position: sticky; top: 1rem; }
.side-server { margin: 0 0 .5rem; padding: 0 .75rem; font-weight: 800; color: var(--brand); overflow-wrap: anywhere; }
.side a { display: flex; align-items: center; min-height: var(--tap); padding: .3rem .75rem; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.25; }
.side a:hover { background: var(--stone); }
.side a[aria-current="page"] { background: var(--nav-current); color: var(--strong); font-weight: 800;
  box-shadow: inset 3px 0 0 var(--accent-ink); }
.side a.danger { color: var(--danger); }
.side a.side-back { color: var(--muted); font-weight: 400; font-size: .95rem; margin-bottom: .25rem; }
.side a.side-back::before { content: "←"; margin-right: .4rem; }
.side-main > h1:first-child { margin-top: 0; }
@media (max-width: 48rem) {
  .server-frame { grid-template-columns: 1fr; gap: 1.25rem; }
  .side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
  .side-back, .side-server { grid-column: 1 / -1; }
  .side a.side-back { padding: 0; min-height: var(--tap); margin: 0; }
  .side-server { padding: 0; margin: 0; }
  .side a:not(.side-back) { border: 1px solid var(--field); font-size: .95rem; padding: .35rem .65rem; }
  .side a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent-ink); }
}

/* #588 creator app shell (DESIGN.md "Dashboard app shell"): sidebar from dash_sections.SECTIONS on desktop, a top
   bar with a Menu <details> on phones (no script). Rows reuse .side a; icons are 20px --muted, --accent-ink when current. */
body:has(.app-frame) .wrap { max-width: calc(var(--sidebar-w) + 1160px + var(--s-8)); }
.app-frame { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); gap: var(--s-8); align-items: start; }
.app-side { align-content: start; background: var(--sidebar); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: var(--s-3); min-height: calc(100vh - 8rem); grid-template-rows: auto; display: flex; flex-direction: column; }
.app-side a, .app-side-phone a { gap: var(--s-3); }
.side-icon { flex: none; color: var(--muted); }
.side a[aria-current="page"] .side-icon { color: var(--accent-ink); }
.side-gap { flex: 1; min-height: var(--s-6); }
.side a.side-plan-box { margin-top: var(--s-2); min-height: 56px; border: 1px solid var(--line-strong); }
.side-plan-box > span { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-1); }
.side-plan-sub { font-size: var(--t-sm); color: var(--muted); font-weight: 600; }
.side-main { min-width: 0; max-width: 1160px; }
.app-bar { display: none; }
.moved { display: none; }
.moved:target { display: block; }
.heads-up { border-color: var(--warn); }
@media (max-width: 47.5rem) {
  .app-frame { grid-template-columns: 1fr; gap: var(--s-4); }
  .app-side { display: none; }
  .app-bar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
    background: var(--sidebar); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: var(--s-2) var(--s-3); }
  .app-bar-title { font-weight: 800; color: var(--brand); }
  /* the open list drops down under the whole bar (positioned on .app-bar), so <details> keeps its own box for
     screen readers (no display: contents) */
  .app-menu > summary { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--s-4);
    border: 1px solid var(--field); border-radius: var(--radius); font-weight: 600; cursor: pointer; list-style: none; }
  .app-menu > summary::-webkit-details-marker { display: none; }
  .app-menu[open] > summary::after { content: "▴"; }
  .app-menu[open] > summary { background: var(--soft); }
  .side.app-side-phone { position: absolute; left: -1px; right: -1px; top: calc(100% + var(--s-1)); z-index: 5;
    display: grid; grid-template-columns: 1fr; gap: .15rem; padding: var(--s-2); background: var(--sidebar);
    border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); }
  .side.app-side-phone a { border: 0; font-size: 1rem; padding: .3rem .75rem; }
  .side.app-side-phone a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent-ink); }
}

/* status pills under the page title: facts from code, word + color */
.status-line { margin: 0 0 var(--gap); }   /* look: shared .status-line, li.pill */
.pill { font-size: .9rem; }
.pill.off { color: var(--danger); }
li.pill.off::before { background: var(--danger); }

/* settings rows */
.settings { list-style: none; padding: 0; margin: 0; }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 0;
  border-bottom: 1px solid var(--line-strong); }
.setting:last-child { border-bottom: 0; }
.setting > div { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.setting b { font-size: 1.05rem; color: var(--strong); }
.setting .note { margin: .25rem 0 0; }
.setting form { margin: 0; flex: none; }
.setting:target { outline: 2px solid var(--accent-ink); outline-offset: 4px; border-radius: 6px; }
/* #607 P2b "Where does this post?" under an on public post: one line, then the picker full width */
.setting:has(+ .setting.where) { border-bottom: 0; }   /* the switch and its line read as one row */
.setting.where { flex-wrap: wrap; padding-top: 0; }
.setting.where > div { flex-basis: 12rem; }
.setting.where form { flex: 1 1 100%; }
.setting.where .note { margin: 0; }
@media (max-width: 30rem) {
  .setting.stack { flex-wrap: wrap; }
  .setting.stack > div { flex-basis: 100%; }
}

/* on/off switch: a plain submit button, state shown by word + knob position, never by color alone */
.switch { display: inline-flex; align-items: center; gap: .6rem; min-height: var(--tap); min-width: 6.5rem;
  padding: .3rem .9rem .3rem .35rem; border-radius: 99px; border: 2px solid var(--muted); background: var(--paper);
  color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; user-select: none; }
.switch .knob { width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--muted); flex: none; }
.switch.on { flex-direction: row-reverse; padding: .3rem .35rem .3rem .9rem; background: var(--accent);
  border-color: var(--accent-ink); color: var(--on-accent); }
.switch.on .knob { background: var(--on-accent); }
.switch:hover { border-color: var(--brand); }
.switch[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 30rem) { .switch { min-width: 5.5rem; } }

/* small, quick feedback on hover and press; nothing moves for people who ask for less motion */
@media (prefers-reduced-motion: no-preference) {
  .switch, .side a, .field select, .server select { transition: background-color var(--dur-ui) ease, border-color var(--dur-ui) ease,
    color var(--dur-ui) ease, transform var(--dur-press) var(--ease-out); }
  .switch:active { transform: scale(.97); }
}
@media (hover: none) {   /* phones: no hover color left stuck after a tap */
  .button:hover { background: var(--accent); }
  .button.quiet:hover, .button.quiet.danger:hover { background: transparent; }
  .button.danger:hover { background: var(--danger); }
  .side a:hover { background: transparent; }
  .side a[aria-current="page"]:hover { background: var(--nav-current); }
}

/* plan badge (#155): sidebar and status line. Plus uses the accent, the trial the same with a dashed edge */
.side-plan { margin: -.25rem 0 .5rem; padding: 0 .75rem; }
.plan-badge { font-size: .9rem; }   /* look: shared .plan-badge */
.status-line li:has(> .plan-badge), .status-line li:has(> a > .plan-badge) { display: inline-flex; }
a:has(> .plan-badge) { display: inline-flex; text-decoration: none; }   /* home: the badge opens the Plan page */
a:hover > .plan-badge, a:focus-visible > .plan-badge { border-color: var(--accent-ink); color: var(--brand); }
.plus-tag { display: inline-block; margin-left: .4rem; padding: 0 .45rem; border: 1px solid var(--accent-ink);
  border-radius: 6px; font-size: .85rem; font-weight: 600; color: var(--accent-ink); vertical-align: .1em; }
.locked { flex: none; color: var(--muted); font-size: .95rem; font-weight: 600; }
.side a.lighter { color: var(--muted); font-weight: 400; }
.msg.banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.msg.banner p { margin: 0; flex: 1 1 18rem; }
@media (max-width: 48rem) { .side-plan { grid-column: 1 / -1; padding: 0; margin: 0; } }

/* creator home (#137): Discord posts shown on the web (style.post_html). One quiet rule between posts in a card */
.post { padding: .75rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.card > h2 + .post { border-top: 0; padding-top: .25rem; }
.post h3 { font-size: 1.05rem; margin: 0 0 .35rem; color: var(--strong); }
.post h3 a { color: inherit; }
/* links that stand alone (a post title, the plan badge) get a full tap target without moving the layout */
.post h3 > a, .status-line li > a { display: inline-block; padding-block: calc((var(--tap) - 1.4em) / 2);
  margin-block: calc((var(--tap) - 1.4em) / -2); }
.post.win h3 { color: var(--win); }   /* milestones and every-box-ticked: the win colour */
.post p { margin: .35rem 0; }
.post small.sub { font-size: .9rem; color: var(--muted); }
.post-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .5rem 1rem; margin: .5rem 0; }
.post-fields .wide { grid-column: 1 / -1; }
.post-fields dt { font-size: .9rem; color: var(--muted); }
.post-fields dd { margin: 0; font-weight: 600; }
.post-fields .wide dd { font-weight: 400; }
.post code { font-family: ui-monospace, monospace; letter-spacing: -.05em; }

/* #97 report cards on the creator home: the card's own SVG, sized to the column */
.report-card { margin: 1rem 0 0; max-width: 30rem; }
.report-card svg { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line-strong); }
.report-card figcaption { color: var(--muted); font-size: .95rem; margin-top: .5rem; }
.share-card { max-width: 15rem; }   /* the 9:16 weekly share card (#189): a preview, the PNG is full size */
.row.bottom { align-items: flex-end; }   /* a field with its label above + its button: line the button up with the box */

/* #385 the one optional question before the next coach note, above the notes */
.ask { margin: 1rem 0 0; padding: .25rem 1rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.ask .button { margin-top: 1rem; }
.ask > h3 { font-size: 1.05rem; margin: 1rem 0 0; color: var(--strong); }
.check input[type="radio"] { border-radius: 50%; }

/* #188 public page settings: one tick box per section, each a full tap row */
.checks { border: 0; padding: 0; margin: 1rem 0 0; display: grid; gap: .1rem; }
.checks legend { font-weight: 600; padding: 0; margin-bottom: .3rem; }
/* one tick box rule for every page: a full tap row, plain weight; inside a .checks list the rows sit close */
.check { display: flex; align-items: center; gap: .6rem; min-height: var(--tap); margin: 1rem 0 0; cursor: pointer;
  font-weight: 400; }
.check input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--accent); flex: none; cursor: pointer; }
.checks .check { margin: 0; }
/* the "I understand" box on a delete/remove confirm page: bigger, bold, the danger accent */
.check.confirm { gap: .75rem; font-weight: 600; }
.check.confirm input { width: 1.5rem; height: 1.5rem; accent-color: var(--danger); }

/* #110 stream timeline: one row per minute with something in it, clock time then what happened */
.timeline { list-style: none; margin: .5rem 0 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: .75rem; padding: .45rem 0;
  border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.timeline time { color: var(--muted); font-variant-numeric: tabular-nums; }
/* every sub-heading straight inside a card (raids in, YouTube chapters, good-time nudges): one size and color */
.card > h3, .card form > h3 { font-size: 1.05rem; margin: 1rem 0 0; color: var(--strong); }
/* #298 the last stream's raiders, each with its thank-you card download */
.raid-thanks { list-style: none; margin: .5rem 0 0; padding: 0; }
.raid-thanks li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .75rem;
  padding: .45rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.raid-thanks li > span { flex: 1 1 14rem; min-width: 0; }   /* the button stays at the end of the row, or under it */
/* #300 the paste-ready YouTube chapters: monospaced digits, read-only, select and copy */
.chapters { display: block; width: 100%; margin: .5rem 0 0; padding: .6rem .7rem; font: inherit;
  font-variant-numeric: tabular-nums; line-height: 1.5; color: var(--ink); background: var(--paper);
  border: 1px solid var(--field); border-radius: var(--radius); resize: vertical; }

/* #202 the free tools on the creator home: this week's schedule picture (in the theme picked in the tool) and the
   best open slots in the category looked at there */
.schedule-image { margin: 1rem 0 0; max-width: 36rem; }
.schedule-image img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line-strong); }
.schedule-image figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: .5rem; }
.best-slots { margin: .5rem 0; padding-left: 1.4rem; }
.best-slots li { margin: .25rem 0; color: var(--muted); }
.best-slots b { color: var(--strong); }

/* #185 the Wrapped story: full-height slides side by side, one per screen, moved by swipe, arrow keys or Back / Next
   (scroll snap, no script). Colours are fixed in both looks; the small slide-in is off under reduced motion. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrapped { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  border-radius: var(--radius); scrollbar-width: none; }
.wrapped::-webkit-scrollbar { display: none; }
.wrapped-slide { flex: 0 0 100%; scroll-snap-align: start; min-height: min(80vh, 46rem); display: flex;
  flex-direction: column; justify-content: space-between; gap: 1.5rem; padding: 2rem 1.25rem 1.25rem;
  color: var(--wrapped-ink); background: var(--wrapped-0); overflow-wrap: anywhere; }
.wrapped-slide.tone-1 { background: var(--wrapped-1); }
.wrapped-slide.tone-2 { background: var(--wrapped-2); }
.wrapped-slide.tone-3 { background: var(--wrapped-3); }
.wrapped-slide a:not(.button) { color: var(--wrapped-ink); }
.wrapped-slide a:focus-visible { outline-color: var(--wrapped-ink); }   /* the usual ring is too faint on Grape */
.wrapped:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; }
.wrapped-body { margin: auto 0; }
.wrapped-hero { font-size: clamp(2.6rem, 14vw, 5rem); font-weight: 800; line-height: 1; letter-spacing: -.03em;
  margin: 0; text-wrap: balance; }
.wrapped-label { font-size: 1.25rem; font-weight: 600; margin: .5rem 0 0; text-wrap: balance; }
.wrapped-line { font-size: 1.1rem; margin: 1rem 0 0; max-width: 32ch; text-wrap: pretty; }
.wrapped-ai { font-size: 1rem; font-style: italic; margin: .6rem 0 0; max-width: 32ch; opacity: .9; text-wrap: pretty; }
.wrapped-items { margin: 1rem 0 0; padding-left: 1.4rem; }
.wrapped-items li { margin: .3rem 0; }
.wrapped-chart { display: flex; align-items: flex-end; gap: 4px; height: 5rem; margin-top: 1.25rem; max-width: 22rem; }
.wrapped-chart i { flex: 1; min-height: 3px; background: var(--wrapped-ink); opacity: .85; border-radius: 3px 3px 0 0; }
.wrapped-chart .h1 { height: 10%; } .wrapped-chart .h2 { height: 20%; } .wrapped-chart .h3 { height: 30%; }
.wrapped-chart .h4 { height: 40%; } .wrapped-chart .h5 { height: 50%; } .wrapped-chart .h6 { height: 60%; }
.wrapped-chart .h7 { height: 70%; } .wrapped-chart .h8 { height: 80%; } .wrapped-chart .h9 { height: 90%; }
.wrapped-chart .h10 { height: 100%; }   /* tenths of the best month (dash.wrapped_story; the CSP has no inline styles) */
.wrapped-nav { justify-content: space-between; }
.wrapped-slide .button { background: var(--wrapped-ink); color: var(--wrapped-0); border-color: var(--wrapped-ink); }
.wrapped-slide .button.quiet { background: transparent; color: var(--wrapped-ink); }
@media (prefers-reduced-motion: no-preference) {
  .wrapped { scroll-behavior: smooth; }
  .wrapped-slide .wrapped-body { animation: wrapped-in var(--dur-swap) var(--ease-out); }
}
@keyframes wrapped-in { from { transform: translateY(8px); } }   /* movement only: the words are never hidden */

/* #211 collab links: each link's URL in a read-only box to select and copy, and the collab page's times in two zones */
.field-copy { display: block; width: 100%; box-sizing: border-box; margin: .4rem 0 0; min-height: var(--tap);
  padding: .4rem .6rem; font: inherit; font-size: .95rem; color: var(--ink); background: var(--paper);
  border: 1px solid var(--field); border-radius: var(--radius); }
.field textarea.chapters { font-weight: 400; margin: 0; }
.tag.suggested { display: block; margin-top: .3rem; color: var(--warn); }   /* a collab time waiting for an answer */
.tag.raid-hint { display: block; margin-top: .3rem; }   /* #416 a raid with the partner: "Mark as done?" */
.past-collabs { margin: .5rem 0; padding-left: 1.4rem; }   /* the partner page's list of the creator's other collabs */
.past-collabs li { margin: .25rem 0; color: var(--muted); }
/* #200 the "Made with Streamer Sidekick" line on its own (= site/src/styles.css .made-with) */
.made-with { margin-top: 1.5rem; }
.made-with a { color: inherit; }
/* #336 the Wrapped Share toggle: a full tap target in the slide's own ink */
.wrapped-share summary { min-height: var(--tap); line-height: var(--tap); margin-top: 1rem; color: var(--wrapped-ink);
  font-weight: 600; cursor: pointer; }   /* --wrapped-ink, not --ink: the slides keep their Grape in light mode */
.collab-times { width: 100%; border-collapse: collapse; margin: .75rem 0 0; font-variant-numeric: tabular-nums; }
.collab-times th { text-align: left; font-size: .9rem; color: var(--muted); font-weight: 600; padding: 0 .75rem .3rem 0; }
.collab-times td { padding: .45rem .75rem .45rem 0; border-top: 1px solid var(--line); vertical-align: top; }
.collab-links li { margin: 0; color: var(--ink); }
.collab-links a { display: inline-block; min-height: var(--tap); line-height: var(--tap); }   /* a full tap target */

/* Low-pressure mode: a coach note's next step, shown only when opened */
details.next-step { margin: 0 0 .75rem; }
details.next-step summary { cursor: pointer; font-weight: 600; padding: .75rem 0; }

/* #590 Coach, Discord, Community, Tools & connections, Settings (DESIGN.md "Card anatomy"): a card head with the title
   and one status on the right, cards two-up on wide screens, Settings in one readable column, more behind <details> */
/* one card head for every page: the title (same size as a plain .card > h2) and one status on the right (.card-meta) */
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-1) var(--s-4);
  margin: var(--s-4) 0 var(--s-1); }
.card-head > h2 { font-size: var(--t-lg); font-weight: 800; margin: 0; overflow-wrap: anywhere; }
.card-meta { font-size: var(--t-sm); font-weight: 600; color: var(--muted); overflow-wrap: anywhere; }
.card-meta.ok { color: var(--good); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: var(--s-4);
  align-items: start; margin: 0 0 var(--gap); }
.card-grid > .card { margin: 0; min-width: 0; }
.settings-page { max-width: 760px; }
.prefs form { padding: var(--s-1) 0 var(--s-4); border-bottom: 1px solid var(--line-strong); }
.prefs form:last-child { border-bottom: 0; padding-bottom: 0; }
.prefs .field { margin-top: var(--s-3); }
.prefs .row { margin-top: var(--s-3); }
details.card-more { margin-top: var(--s-4); border-top: 1px solid var(--line-strong); }
details.card-more > summary { min-height: var(--tap); display: flex; align-items: center; cursor: pointer; font-weight: 600;
  color: var(--accent-ink); overflow-wrap: anywhere; }
details.card-more > .note { margin-top: 0; }
.history-views a[aria-current="page"] { background: var(--soft); color: var(--strong); }   /* #581 the open view */
#account .setting .row { margin: 0; }
.setting .setting-name { margin: 0; font-size: 1.05rem; color: var(--strong); }

/* ==== #589 chart kit (sidekick/charts.py, DESIGN.md "Chart kit"): colours by class, the CSP allows no inline style.
   Honey (--win) only on a goal won as a win, never in a chart. ==== */
.stat-tile { padding: 20px; display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.stat-title { margin: 0; font-size: var(--t-sm); font-weight: 600; color: var(--muted); }
.stat-row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-3); }
.stat-num { margin: 0; font-size: var(--t-stat); font-weight: 800; line-height: 1.05; color: var(--strong);
  font-variant-numeric: tabular-nums; }
.stat-note { margin: 0; font-size: var(--t-sm); font-weight: 600; color: var(--muted); }
.stat-note.up { color: var(--ok); }
.stat-empty { margin: 0; font-size: var(--t-sm); color: var(--muted); }
.ck-spark { flex: none; overflow: visible; }
.ck-line { stroke: var(--chart-1); }
.ck-dot, .ck-bar, .ck-c1 { fill: var(--chart-1); }
.ck-bar.last, .ck-dot.last { fill: var(--accent); }
.ck-stub { fill: var(--line-strong); }
.ck-c2 { fill: var(--chart-2); }
.ck-c3 { fill: var(--chart-3); }
.ck-c4 { fill: var(--chart-4); }
.ck-chapter { fill: var(--muted); }
.ck-chapter-name { fill: var(--muted); font-size: 12px; }
.ck-area { fill: var(--soft); }
.ck-base { stroke: var(--line-strong); }
.ck-bars, .ck-timeline { display: block; font-family: var(--font); }
.ck-value { fill: var(--strong); font-size: 13px; font-weight: 600; text-anchor: middle; }
.ck-axis { fill: var(--muted); font-size: 12px; }
.ck-bars .ck-axis { text-anchor: middle; }
.ck-scroll { overflow-x: auto; }
.ck-timeline { min-width: 720px; }
.ck-bars { max-width: 640px; }
.ck-empty svg, .ck-locked svg { max-width: 520px; }
.ck-timeline a:focus-visible { outline: 3px solid var(--accent-ink); }
.ck-key { display: flex; flex-wrap: wrap; gap: var(--s-4); list-style: none; padding: 0; margin: 0;
  font-size: var(--t-sm); color: var(--muted); }
.ck-key li { display: inline-flex; align-items: center; gap: 6px; }
.ck-empty, .ck-locked { display: flex; flex-direction: column; gap: var(--s-3); align-items: flex-start; }
.ck-empty p, .ck-locked p { margin: 0; color: var(--muted); font-size: var(--t-sm); }
.ck-skel { fill: var(--soft); }
.ck-blur { filter: blur(3px); opacity: .7; }
.goal { display: flex; flex-direction: column; gap: var(--s-2); }
.goal-head { display: flex; justify-content: space-between; gap: var(--s-3); }
.goal-name { margin: 0; font-weight: 600; }
.goal-num { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--strong); }
progress.goal-bar.win { color: var(--win); }
progress.goal-bar.win::-webkit-progress-value { background: var(--win); }
progress.goal-bar.win::-moz-progress-bar { background: var(--win); }

/* #589 Home, Streams, Reports, Growth (DESIGN.md "Card anatomy"): tiles grid, title row with one status on the right,
   a 7/30 days link pair, and the parts of a merged card */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: var(--s-4);
  margin: 0 0 var(--gap); }
.tiles > .card { margin: 0; }
#numbers { gap: 0; background: var(--stone); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; }
#numbers > .card { border: 0; border-radius: 0; box-shadow: -1px 0 0 var(--line-strong), 0 -1px 0 var(--line-strong);
  background: transparent; }
.goals-list { display: flex; flex-direction: column; gap: var(--s-4); }
.seg { display: inline-flex; border: 1px solid var(--field); border-radius: var(--radius); overflow: hidden; }
.seg a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--s-4); color: var(--ink);
  font-weight: 600; text-decoration: none; }
.seg a + a { border-left: 1px solid var(--field); }
.seg a[aria-current="true"] { background: var(--soft); color: var(--strong); }
.card-part { border-top: 1px solid var(--line-strong); margin-top: var(--s-6); padding-top: var(--s-2); }
.card-part > h3 { font-size: var(--t-lg); color: var(--brand); margin: var(--s-3) 0 var(--s-2); }
.ck-locked { margin-top: var(--s-2); }
#totals .card, .tiles .card { padding: 20px; }
@media (max-width: 47.5rem) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
  #numbers { gap: 0; }
  .tiles .card { padding: var(--s-4); }
  .stat-num { font-size: 1.75rem; }
  .stat-row .ck-spark { display: none; }   /* the number and the vs-usual line carry it on a phone; the label stays in the tile */
}

/* #607 Get set up (design/onboarding-r1 in sidekick-docs): a step rail on the left (desktop) or a progress bar (phone),
   one step per page, radio rows as tappable choice cards, Back and Skip as quiet text buttons, one filled button */
.ob-frame { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: var(--s-8); align-items: start; }
.ob-main { max-width: 40rem; min-width: 0; }
.ob-main h1 { margin-top: var(--s-2); }
.ob-later { display: flex; justify-content: flex-end; margin: 0; }
.ob-exit { color: var(--muted); font-weight: 600; display: inline-flex; align-items: center; min-height: var(--tap); }
.ob-rail { position: sticky; top: var(--s-4); background: var(--sidebar); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: var(--s-3); }
.ob-rail ol { list-style: none; margin: 0; padding: 0; }
.ob-rail-step { display: grid; grid-template-columns: 1.4rem 1fr; column-gap: var(--s-3); align-items: center;
  min-height: 2.5rem; padding: 0 var(--s-2); border-radius: var(--radius); color: var(--muted); font-weight: 600;
  font-size: var(--t-sm); }
.ob-rail-step .quest-mark { width: 1.1rem; height: 1.1rem; }
.ob-rail-step.done .quest-mark { background: var(--ok); border-color: var(--ok); position: relative; }
.ob-rail-step.done .quest-mark::after { content: ""; position: absolute; left: .3rem; top: .1rem; width: .25rem;
  height: .5rem; border: solid var(--paper); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ob-rail-step.current { background: var(--soft); color: var(--strong); box-shadow: inset 3px 0 0 var(--accent-ink); }
.ob-rail-step.current .quest-mark { border-color: var(--accent-ink); }
.ob-rail-step.skipped .quest-mark { border-style: dashed; }
.ob-count { color: var(--muted); font-size: var(--t-sm); font-weight: 600; margin: 0; }
.ob-progress { display: none; width: 100%; margin: var(--s-2) 0 var(--s-4); accent-color: var(--accent); }
.ob-group { border: 0; padding: 0; margin: 0 0 var(--gap); display: grid; gap: var(--s-3); min-width: 0; }
.choice { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); background: var(--stone);
  border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; box-shadow: var(--shadow); }
.choice input { margin: .3rem 0 0; accent-color: var(--accent); width: 1.1rem; height: 1.1rem; flex: none; }
.choice:has(input:checked) { border-color: var(--accent-ink); background: var(--soft); }
.choice:has(input:focus-visible) { outline: 3px solid var(--accent-ink); outline-offset: 3px; }
.choice-body { display: grid; gap: var(--s-1); min-width: 0; }
.choice-body b { color: var(--strong); }
.choice-body .note { font-size: var(--t-sm); }
@media (prefers-reduced-motion: no-preference) {
  /* MOTION: the picked choice's edge and fill change in --dur-ui (deletable) */
  .choice { transition: border-color var(--dur-ui) var(--ease-out), background var(--dur-ui) var(--ease-out); }
}
.ob-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-2) var(--s-6); flex-wrap: wrap;
  margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.ob-actions > .button { order: 3; }
.ob-actions > .ob-back { order: 1; margin-right: auto; }
.ob-actions > .ob-skip { order: 2; }
.ob-back, .ob-skip { display: inline-flex; align-items: center; min-height: var(--tap); font: inherit; font-weight: 600;
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--accent-ink); text-decoration: underline; }
.ob-skip { color: var(--muted); }
.ob-plan-line { margin-top: var(--s-4); }
/* #607 s3: the mods invite link, side-by-side choices, the go-live alert's top line in the preview */
.ob-inline { grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); }
.ob-copy { display: flex; gap: var(--s-2); flex-wrap: wrap; margin: var(--s-3) 0; }
.ob-copy input { flex: 1 1 14rem; min-width: 0; min-height: var(--tap); }
.ob-alert-line { margin: 0 0 var(--s-2); color: var(--strong); overflow-wrap: anywhere; }
@media (max-width: 48rem) {
  .ob-frame { grid-template-columns: 1fr; gap: 0; }
  .ob-rail { display: none; }
  .ob-progress { display: block; }
  .ob-actions > .button { flex: 1 1 100%; order: -1; }
}

/* #607 s2 steps 1, 4, 5 and step 2's phone note (design/onboarding-r1): the schedule rows, Finish this on my computer
   (a <details>, phones only: a desktop is already where it would send you) with its link and QR code */
.ob-sched { list-style: none; padding: 0; margin: var(--s-2) 0 var(--s-3); }
.ob-sched li { display: grid; grid-template-columns: 8rem 5rem 1fr; gap: var(--s-3); padding: var(--s-2) 0;
  border-top: 1px solid var(--line); }
.ob-sched li:first-child { border-top: 0; }
.ob-sched b { color: var(--strong); }
.ob-phone-note { margin: 0 0 var(--gap); }
.ob-phone-note summary { min-height: var(--tap); display: flex; align-items: center; color: var(--accent-ink);
  font-weight: 600; cursor: pointer; }
.ob-qr { margin: var(--s-3) 0; display: grid; gap: var(--s-2); justify-items: start; }
.ob-qr svg { width: 12rem; height: 12rem; max-width: 100%; border-radius: var(--radius); }
.ob-form > .field, .ob-form > .choice { margin-bottom: var(--gap); }
@media (min-width: 48.01rem) {
  .ob-phone-note { display: none; }
}
@media (max-width: 48rem) {
  .ob-sched li { grid-template-columns: 1fr auto; }
  .ob-sched li .note { grid-column: 1 / -1; margin-top: calc(-1 * var(--s-2)); }
}
/* #607 the guided Discord setup (setup_steps/discord_layout.py): preset lists, make-or-use rows, the layout drawing */
.mini-list { display: grid; gap: var(--s-1); margin-top: var(--s-2); font-size: var(--t-sm); color: var(--muted);
  border-left: 2px solid var(--line-strong); padding-left: var(--s-3); }
.ob-sub { padding: var(--s-1) var(--s-4) var(--s-4); margin: 0; display: grid; gap: var(--s-3); }
.ob-field { display: grid; gap: var(--s-2); font-weight: 600; margin: var(--s-3) 0 0; }
.ob-match { list-style: none; padding: var(--s-1) var(--s-4); margin: 0 0 var(--gap); }
.ob-match-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4);
  flex-wrap: wrap; padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.ob-match-row:first-child { border-top: 0; }
.ob-match-item { display: inline-flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; min-width: 0; color: var(--muted); }
.ob-match-item b { color: var(--strong); overflow-wrap: anywhere; }
.ob-match select, .ob-sub select { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--field);
  border-radius: var(--radius); min-height: var(--tap); padding: 0 var(--s-3); max-width: 100%; flex: 0 1 16rem; min-width: 0; }
.ob-match .ico, .d-server .ico, .ob-summary .ico { width: 16px; height: 16px; flex: none; }
.ob-preview { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.d-server { background: var(--sidebar); color: var(--muted); border-radius: var(--radius); padding: var(--s-3);
  border: 1px solid var(--line-strong); font-size: var(--t-base); min-width: 0; }
.d-server ul { list-style: none; margin: 0 0 var(--s-2); padding: 0; }
.d-name { color: var(--strong); font-weight: 800; margin: 0 0 var(--s-2); padding: 0 var(--s-2) var(--s-2);
  border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.d-cat { display: flex; align-items: center; gap: var(--s-1); font-size: var(--t-xs); font-weight: 800; margin: var(--s-3) 0 var(--s-1);
  padding: 0 var(--s-2); color: var(--muted); text-transform: uppercase; min-width: 0; }
.d-cat > span:not(.d-tag) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-cat.new { color: var(--strong); }
.d-ch { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-1) var(--s-2); border-radius: var(--radius); color: var(--ink); min-width: 0; }
.d-ch > span:not(.d-tag) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-ch.dim { color: var(--muted); }
.d-hash { font-weight: 800; width: 16px; text-align: center; color: var(--muted); flex: none; }
.d-tag { margin-left: auto; font-size: var(--t-xs); font-weight: 800; border-radius: var(--radius); padding: 0 var(--s-2); line-height: 1.5;
  white-space: nowrap; flex: none; text-transform: none; }
.d-tag.new { background: var(--accent); color: var(--on-accent); }
.d-tag.yours { border: 1px solid var(--ok); color: var(--ok); }
.d-tag.there { border: 1px solid var(--line-strong); color: var(--muted); }
.ob-legend .d-tag, .ob-match-item .d-tag { margin: 0 var(--s-2) 0 0; }
.ob-match-item .d-tag { margin: 0; }
.d-legend-dim { color: var(--muted); font-weight: 800; font-size: var(--t-xs); margin-right: var(--s-2); }
.ob-summary { padding: var(--s-1) var(--s-4) var(--s-4); margin: 0; min-width: 0; }
.ob-legend { list-style: none; padding: 0; margin: 0 0 var(--s-3); display: grid; gap: var(--s-3); overflow-wrap: anywhere; }
.ob-summary .note { display: flex; gap: var(--s-2); align-items: flex-start; }
@media (max-width: 48rem) {
  .ob-preview { grid-template-columns: 1fr; }
  .ob-match select { flex: 1 1 100%; }
}
/* #607 Get set up, P3 (s7): Extras cards, Welcome numbers, the Done watch line, Send this to a mod, the dashboard tour
   (one sidebar row ringed per stop, no script) and the mod welcome */
.ob-extras { list-style: none; margin: 0 0 var(--gap); padding: 0; display: grid; }
.ob-extra { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-3); align-items: center;
  padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.ob-extra:first-child { border-top: 0; }
.ob-extra .button { min-height: var(--tap); }
.choice-ico { display: inline-flex; color: var(--accent-ink); }
.ob-numbers h2 { margin-top: 0; }
.ob-number-row { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-8); }
.ob-number { display: grid; margin: 0; }
.ob-number b { font-size: var(--t-xl); color: var(--strong); font-variant-numeric: tabular-nums; }
.ob-number span { color: var(--muted); font-size: var(--t-sm); font-weight: 600; }
.ob-watch { margin-top: 0; }
.ob-handoff { margin-top: var(--gap); }
.ob-handoff .note { margin-top: 0; }
.side a.tour-on { outline: 3px solid var(--accent-ink); outline-offset: 2px; background: var(--soft); color: var(--strong); }
.side a.tour-on .side-icon { color: var(--accent-ink); }
.tour-card { max-width: 40rem; }
.tour-card h1 { margin-top: var(--s-2); }
.tour-where { display: none; }
.tour-row { display: flex; align-items: center; gap: var(--s-3); min-height: var(--tap); padding: .3rem .75rem;
  border-radius: 8px; outline: 3px solid var(--accent-ink); outline-offset: 2px; background: var(--soft);
  color: var(--strong); font-weight: 600; }
.tour-row .side-icon { color: var(--accent-ink); }
.mod-welcome { margin: 0 auto; }
.ob-progress-on { display: block; }
@media (max-width: 48rem) {
  .ob-extra { grid-template-columns: auto minmax(0, 1fr); }
  .ob-extra .button { grid-column: 1 / -1; width: 100%; }
  .tour-where { display: grid; gap: var(--s-2); margin: var(--s-4) 2px; }
}

/* #628 server settings rows: the first sentence shows, the rest under More; a post preview under its own line */
.setting details { margin-top: var(--s-1); }
.setting:has(> details.preview) { flex-wrap: wrap; }
.setting > details.preview { flex-basis: 100%; margin-top: 0; }
.setting summary { display: inline-flex; align-items: center; min-height: var(--tap); cursor: pointer; font-weight: 600;
  font-size: var(--t-sm); color: var(--accent-ink); list-style: none; }
.setting summary::-webkit-details-marker { display: none; }
/* one arrow rule for every <details> summary (the phone Menu too): the arrow has no spoken name */
.setting summary::after, .note-more > summary::after, .card > details.more > summary::after,
.card > details.preview > summary::after,
.app-menu > summary::after { content: "▾" / ""; margin-left: var(--s-2); color: var(--muted); }
.setting details[open] > summary::after, .note-more[open] > summary::after, .card > details.more[open] > summary::after,
.card > details.preview[open] > summary::after { content: "▴" / ""; }
.setting details.more > .note { margin-top: 0; }
.preview-post { margin-top: var(--s-2); padding: var(--s-3) var(--s-4); background: var(--paper); border: 1px solid var(--line-strong);
  border-radius: var(--radius); max-width: 34rem; display: flex; flex-direction: column; align-items: flex-start;
  gap: var(--s-2); }
.preview-post .post { padding: 0; border-top: 0; align-self: stretch; }

/* ==== today-a (remix PRs 11-13: Discord, Community, Settings, Your data, server Settings) ==== */
/* a card's help text: one line, the rest under More (dash.card_note); a card-level post preview (dash.preview_html) */
.card > .note-more, .card > details.preview { margin: calc(-1 * var(--s-2)) 0 0; }
.card > .note-more + details.preview { margin-top: 0; }
.card > .note-more:last-child { margin-bottom: 0; }
.note-more > summary, .card > details.preview > summary { display: inline-flex; align-items: center; min-height: var(--tap);
  cursor: pointer; font-weight: 600; font-size: var(--t-sm); color: var(--accent-ink); list-style: none; }
.note-more > summary::-webkit-details-marker, .card > details.preview > summary::-webkit-details-marker { display: none; }
.note-more > .note { margin-top: 0; }
#socials .stat-num { font-size: var(--t-lg); white-space: nowrap; text-align: right; }
#socials .stat-num small { display: block; font-size: var(--t-sm); font-weight: 600; color: var(--muted); }
/* a row with a preview keeps its switch beside the words; only the preview wraps to the next line */
.setting:has(> details.preview) > div { flex: 1 1 0; min-width: 0; }

/* ==== r14 goal (remix rollout PRs 10, 17, 18: Growth, Coach, Home, Plan). Rules for these pages' cards only. ==== */
/* Growth: a counted goal is a bar with its buttons under it; the latest wins as tiles, title in Honey */
.goals li > .goal { margin-bottom: var(--s-2); }
.win-tiles { list-style: none; padding: 0; margin: 0 0 var(--s-2); display: grid; gap: var(--s-3);
  grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr)); }
.win-tile { padding: var(--s-3) var(--s-4); border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--paper); color: var(--win); font-weight: 700; overflow-wrap: anywhere; }
/* Coach: the pre-flight setting row sits flush in its card */
#preflight .settings .setting:first-child { padding-top: 0; }
#preflight .setting > div { flex: 1 1 0; }   /* the switch stays on the right of the text; the preview wraps under */
#preflight .setting > div > .note:first-child { margin-top: 0; }
.chart-caption { margin: var(--s-1) 0 var(--s-3); font-size: var(--t-sm); color: var(--muted); }   /* a chart's unit, said in words */
.setting > .setting-under { flex-basis: 100%; margin: 0; }   /* a line that belongs with the switch, under the row */
/* Home: Finish setting up shows one status tile per step; Today in Discord is a setting row with its preview */
.setup-tiles { list-style: none; padding: 0; margin: var(--s-3) 0; display: grid; gap: var(--s-2);
  grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr)); }
.setup-tile { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3);
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); min-width: 0; }
.setup-tile.next { border-color: var(--accent-ink); }
.setup-tile-name { flex: 1 1 auto; min-width: 0; font-weight: 600; color: var(--strong); overflow-wrap: anywhere; }
.setup-tile-word { font-size: var(--t-sm); color: var(--muted); white-space: nowrap; }
.setup-tile.ok .setup-tile-word { color: var(--ok); }
.setup-tile.next .setup-tile-word { color: var(--accent-ink); font-weight: 600; }
#today .setting > div { flex: 1 1 0; }
/* Plan, Crew, waitlist: a number strip inside a card (Referral link, Gift months), Crew boards as small tables */
.num-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(9rem, 100%), 1fr)); margin: 0 0 var(--s-4);
  border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.num-cell { padding: var(--s-3) var(--s-4); box-shadow: -1px 0 0 var(--line-strong), 0 -1px 0 var(--line-strong);
  min-width: 0; display: flex; flex-direction: column-reverse; gap: var(--s-1); }
.num-cell .stat-num { font-size: 1.75rem; }
.board-table { width: 100%; border-collapse: collapse; }
.board-table caption { text-align: left; font-weight: 700; color: var(--strong); padding-bottom: var(--s-2); }
.board-table th, .board-table td { padding: var(--s-1) 0; border-top: 1px solid var(--line); text-align: left;
  font-weight: 400; overflow-wrap: anywhere; }
.board-table td { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--strong); }
.crew-join-facts { margin: var(--s-2) 0 0; padding-left: 1.2rem; }
/* #631 Plan: Starter and Plus side by side, one plain line per row */
.compare-scroll { overflow-x: auto; }
.plan-compare { width: 100%; border-collapse: collapse; }
.plan-compare th, .plan-compare td { padding: var(--s-2) var(--s-2); border-top: 1px solid var(--line); text-align: left;
  vertical-align: top; overflow-wrap: anywhere; }
.plan-compare thead th { border-top: 0; font-size: var(--t-sm); color: var(--muted); font-weight: 600; }
.plan-compare tbody th { font-weight: 500; color: var(--strong); }
.plan-compare td, .plan-compare thead th + th { width: 4.5rem; text-align: center; }
.plan-compare td.yes { color: var(--ok); font-weight: 700; }
.plan-compare td.no { color: var(--muted); }
.compare-links { list-style: none; padding: 0; margin: var(--s-1) 0 0; display: flex; flex-wrap: wrap; gap: 0 var(--s-3);
  font-size: var(--t-sm); font-weight: 400; }

/* r14 stats: Streams, Reports, History (remix PRs 7-9; only the stats lane adds rules here) */
.ck-bars .ck-axis .ck-start { text-anchor: start; }
.ck-bars .ck-axis .ck-end { text-anchor: end; }
.ck-heat { display: block; min-width: 560px; max-width: 640px; font-family: var(--font); }   /* axis text stays 12px: scrolls on a phone */
.ck-heat .ck-day { font-size: 12px; }
.ck-heat-0 { fill: var(--heat-0); stroke: var(--line-strong); }   /* no stream: outlined, not only a shade */
.ck-heat-1 { fill: var(--heat-1); }
.ck-heat-2 { fill: var(--heat-2); }
.ck-heat-3 { fill: var(--heat-3); }
.ck-heat-4 { fill: var(--heat-4); stroke: var(--strong); stroke-width: 1.5; }   /* the top shade: outlined */
#recaps .ck-cap, #snapshot .ck-cap { margin-bottom: var(--s-3); }
.ck-cap { margin: var(--s-2) 0 0; color: var(--muted); font-size: var(--t-sm); }
.ck-legend { display: flex; align-items: center; gap: var(--s-2); margin: var(--s-2) 0 0; color: var(--muted);
  font-size: var(--t-sm); }
.ck-calendar { display: block; max-width: 100%; height: auto; font-family: var(--font); }
.ck-calendar .ck-mid { text-anchor: middle; }
.ck-cal { margin-bottom: var(--s-4); }
/* r18 schedule (#672): the week strip, same kit as the heatmap; the best-time heat strip scrolls like Reports' */
.ck-week { display: block; max-width: 100%; height: auto; font-family: var(--font); }
.ck-week .ck-mid { text-anchor: middle; }
.ck-week .ck-today { font-weight: 700; fill: var(--ink); }
#best-time .chart { margin: var(--s-3) 0 0; }

/* r14 today-b (remix PRs 14-16): server pages, refusal/oops/login notices, Tools, setup flow. Only this lane edits
   this block. A notice card's header bar sits flush with its top edge, like every other card's. */
.notice:has(> h2:first-child) { padding-top: .25rem; }
.card > details.more:not(.note-more) { margin: var(--s-1) 0 0; }
.card > p:has(+ details.more:not(.note-more)) { margin-bottom: 0; }
.card > details.more > summary { display: inline-flex; align-items: center; min-height: var(--tap); cursor: pointer;
  font-weight: 600; font-size: var(--t-sm); color: var(--accent-ink); list-style: none; }
.card > details.more > summary::-webkit-details-marker { display: none; }
.card > details.more > :not(summary) { margin-top: 0; }

/* ==== r14 wrap-up (remix PR 20: Wrapped, public collab page) ==== */
/* Wrapped is a stats page: its Share card's header bar takes the stats tint, a gap under the slides */
.wrapped + #share { --key: var(--key-stats); --tint: var(--tint-stats); margin-top: var(--s-4); }

/* r20 lane 3: Recent streams number strip (Avg, Time, Clips per stream); phone: date on line 1, cells in a grid on line 2 */
.ck-strip { list-style: none; margin: var(--s-3) 0 0; padding: 0; }
.ck-strip-row { display: flex; align-items: center; gap: var(--s-4); min-height: var(--tap); padding: var(--s-2) 0; }
.ck-strip-row + .ck-strip-row { border-top: 1px solid var(--line); }
.ck-strip-date { width: 5.5rem; flex: none; white-space: nowrap; font-weight: 600; font-size: var(--t-sm); color: var(--ink); }
.ck-strip-cells { display: flex; gap: var(--s-4); }
.ck-strip-cell { display: flex; flex-direction: column; gap: 2px; min-width: 44px; }
.ck-strip-label { font-size: 11px; line-height: 14px; color: var(--muted); }
.ck-strip-val { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink); }
@media (max-width: 30rem) {
  .ck-strip-row { flex-direction: column; align-items: stretch; gap: var(--s-1); }
  .ck-strip-date { width: auto; }
  .ck-strip-cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }   /* one column per cell */
}

/* r15 remix (#629, History): the average-viewers line, and a sparkline under each recap */
.ck-linechart .ck-wide { stroke: var(--chart-1); }
.recap-trend { display: flex; align-items: center; gap: var(--s-3); margin: 0 0 var(--s-4); }
.recap-trend .ck-spark { max-width: 100%; }
.history-charts > .ck-cap { margin-bottom: var(--s-4); }

/* r19 #672 server setup: the go-live preview sits under the Preview changes row, not tucked up against it */
#pick-card > details.preview { margin-top: var(--s-2); }

/* r20 lane 2: stacked stream timeline (viewers over chat on one clock). Two SVGs, CSS shows the one that fits. */
.ck-tl-wrap { max-width: 560px; }
.ck-tl { display: block; overflow: visible; font-family: var(--font); }
.ck-tl-p { display: none; }
.ck-tl-label { fill: var(--muted); font-size: 11px; font-weight: 600; }
.ck-tl-tick { fill: var(--muted); font-size: 11px; }
.ck-tl-peak, .ck-tl-name { fill: var(--ink); font-size: 11px; font-weight: 600; }
.ck-tl-count { fill: var(--ink); font-size: 10px; font-weight: 600; }
.ck-tl-line { fill: none; stroke: var(--chart-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ck-tl-clip { fill: var(--ink); }
.ck-tl-sub { fill: var(--stone); stroke: var(--chart-4); stroke-width: 2; }
.ck-ring { stroke: var(--stone); stroke-width: 2; }
.ck-key .ck-tl-line { stroke-width: 2; }
@media (max-width: 559px) {
  .ck-tl-d { display: none; }
  .ck-tl-p { display: block; }
}
.ck-key + .ck-tl-wrap { margin-top: var(--s-3); }
.ck-tl-wrap + .ck-cap { color: var(--ink); font-size: 13px; }

/* round 20 ranked bars (charts.ranked): a name column (--rank-name-w), a 1px baseline, then bars drawn by SVG in
   percent of the slot; the right 60px is kept for the value (six digits and a comma). Names are cut server-side, two spans switch at 560px. */
.rk { font-family: var(--font); max-width: 640px; --rank-w: var(--rank-name-w); }
.rk-gl { margin: var(--s-3) 0 var(--s-1); color: var(--muted); font-size: 12px; font-weight: 600; line-height: 16px; }
.rk-gl:first-child { margin-top: 0; }
.rk-row { display: grid; grid-template-columns: var(--rank-w) minmax(0, 1fr); column-gap: var(--s-2); align-items: center;
  min-height: 28px; }
.rk-two .rk-row { min-height: 40px; }
.rk-compact .rk-row { min-height: 24px; }
.rk-name { display: flex; flex-direction: column; justify-content: center; min-width: 0; line-height: 16px; }
.rk-n { color: var(--ink); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-s { color: var(--muted); font-size: 11px; line-height: 14px; }
.rk-short { display: none; }
.rk-bar { border-left: 1px solid var(--line-strong); padding-right: 60px; align-self: stretch; display: flex; align-items: center; }
.rk-bar svg { display: block; overflow: visible; }
.rk-c1 { fill: var(--chart-1); }
.rk-c2 { fill: var(--chart-2); }
.rk-v { fill: var(--ink); font-size: 13px; font-weight: 600; dominant-baseline: central; }
.rk-z { fill: var(--muted); font-size: 12px; dominant-baseline: central; }
.rk-more { margin: 0; padding-left: calc(var(--rank-w) + var(--s-2) + 1px + var(--s-2)); color: var(--muted); font-size: 12px; line-height: 20px; }
.rk + .ck-cap, .rk ~ .ck-cap { color: var(--ink); font-size: 13px; margin-top: var(--s-3); }
@media (max-width: 559.98px) {
  .rk { --rank-w: 96px; }
  .rk-long { display: none; }
  .rk-short { display: inline; }
}
.raid-compact { margin: var(--s-3) 0; }
.rk-title { margin: 0 0 var(--s-2); color: var(--ink); font-size: 13px; font-weight: 600; }

/* r20 lane 7: Growth, Wins: a 90-day line with a dot per win (chart colours by type, never Honey), the newest 3 listed */
.ck-winsfig { margin: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.ck-wins { display: block; max-width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.ck-wins .ck-wline { stroke-width: 1.5; }
.ck-wins .ck-wticks text { font-size: 11px; text-anchor: middle; }
.ck-wins .ck-wticks .ck-end { text-anchor: end; }
.ck-wdot { stroke: var(--stone); stroke-width: 1.5; }
.ck-wcount { fill: var(--ink); font-size: 10px; font-weight: 600; text-anchor: middle; }
.ck-wins-narrow { display: none; }
@media (max-width: 47.5rem) { .ck-wins-wide { display: none; } .ck-wins-narrow { display: block; } }
.ck-winlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; line-height: 18px; color: var(--ink); }
.ck-winlist li { display: flex; align-items: center; gap: 8px; }
.ck-winlist svg { flex: none; }
.ck-wdate { flex: none; width: 48px; color: var(--muted); }
.ck-winsfig > .ck-cap { color: var(--ink); font-size: 13px; margin: 0; }

/* r20 lane 6: follower rate tile beside the New followers bars (DESIGN.md "Stat tile, follower rate"): ~300px on a wide
   card, stacked under the bars on a phone. The tile is a plain block inside the card (charts.stat_tile bare=True). */
.follow-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
.rate-tile { min-width: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.rate-tile .stat-tile { padding: 0; }
.rate-tile .stat-row .ck-spark { display: block; }   /* the canvas keeps the sparkline on a phone */
.rate-tile .note { margin: 0; }
.rate-tile > .stat-title { margin: 0; }
@media (min-width: 47.5rem) {
  .follow-split:has(.rate-tile) { grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s-6); }
  .rate-tile { border-left: 1px solid var(--line-strong); padding-left: var(--s-6); }
}

/* ==== home-layout (r24 lane 1, issue 726): Home as direction B "Cockpit" (DESIGN.md "Home: B Cockpit") ==== start
   The markup is in reading order (= the phone order: needs-you-now, numbers, Today, road, checklist, email, links),
   one column by default. With 760px of room or more (a container query: the desktop sidebar takes 248px) it is two
   columns, Now (left) and Progress (right), 24px gutter, 16px stack gaps, max 1120px: each .home-slot goes to the
   column its data-col names, and dense auto-placement fills each column from the top, so Today tops Now when nothing
   needs you. The two columns share row lines, so the shorter card of a pair leaves space under it.
   The cards inside are styled in the lane sections below, not here.
   Lanes: write "issue 727", not the hash form, from here down (test_r20_wins bans hex-looking text after its block). */
.home-wrap { container-type: inline-size; }
.home-cockpit { display: flex; flex-direction: column; gap: var(--s-4); max-width: 1120px; margin: 0 0 var(--gap); }
.home-slot { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.home-slot > * { margin: 0; }   /* the gaps space the cards; a card's own bottom margin would double them */
.home-ov { display: none; margin: 0; font-size: .8125rem; font-weight: 600; line-height: 1.25rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); }   /* one column: each would sit above only part of its cards */
.home-links { display: flex; flex-wrap: wrap; gap: 0 var(--s-4); padding: 0 var(--s-1); }
.home-links a { min-height: var(--tap); display: inline-flex; align-items: center; font-weight: 600; }
.home-links.wide { display: none; }   /* the copy under the road: two columns only (links_row) */
@container (min-width: 760px) {
  .home-cockpit { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-auto-flow: row dense;
    gap: var(--s-4) var(--s-6); align-items: start; }
  .home-ov { display: block; grid-row: 1; }
  .home-cockpit > [data-col="now"] { grid-column: 1; }
  .home-cockpit > [data-col="progress"] { grid-column: 2; }
  .home-links.wide { display: flex; margin-top: var(--s-1); }
  .home-links.narrow { display: none; }
  .home-slot:has(> .home-links.narrow) { display: none; }   /* no empty slot left in the grid (no :has: an empty cell) */
}
/* ==== home-layout ==== end */

/* ==== home-banner (r24 lane 2, issue 727: heads-up rows, setup / review / check-in banner) ==== start
   Lane 2 edits only between these two markers. Banner = icon tile (44px) in column 1, title, line and actions in
   column 2, sized to its content. Heads-up = one status box, one row per heads-up, 1px rule between rows. */
.home-banner { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--s-3) var(--s-4);
  padding: var(--s-4); align-items: start; }
.banner-ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px;
  background: var(--tint-today); color: var(--key-today); }
.banner-body { min-width: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.banner-body > * { margin: 0; }
.banner-body h2, .banner-body h3 { margin: 0; font-size: 1.125rem; line-height: 1.5rem; font-weight: 800; color: var(--strong); }
.banner-body .banner-line { color: var(--muted); }
.banner-body .post { padding: 0; border: 0; }
.banner-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin-top: var(--s-1); }
.banner-actions form { margin: 0; }
.banner-body .row { margin-top: var(--s-1); }
.banner-body .note { font-size: .85rem; }
.button.text { background: transparent; border-color: transparent; color: var(--accent-ink); padding-left: .5rem;
  padding-right: .5rem; text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) { .button.text:hover { background: var(--soft); } }
.button.text:active { background: var(--soft); }
.heads-box { background: var(--warn-bg); border: 1px solid var(--warn); border-radius: var(--radius); overflow: hidden; }
.heads-row { display: flex; align-items: center; gap: var(--s-3); min-height: 44px; padding: var(--s-3) var(--s-4); }
.heads-row + .heads-row { border-top: 1px solid var(--line-strong); }
.heads-ico { flex: none; display: grid; place-items: center; color: var(--warn); }
.heads-ico svg { width: 20px; height: 20px; }
.heads-text { flex: 1 1 auto; min-width: 0; color: var(--ink); }
.heads-text > * { margin: 0; }
.heads-text h2 { font-size: 1rem; line-height: 1.5rem; font-weight: 800; color: var(--strong); }
.heads-text p + p { margin-top: var(--s-1); }
.heads-row .button { flex: none; }
@media (max-width: 30rem) { .heads-row { flex-wrap: wrap; } .heads-text { flex-basis: calc(100% - 44px); }
  .heads-row .button { margin-left: 32px; } }
/* ==== home-banner ==== end */

/* ==== home-tiles (r24 lane 3, issue 728: the 2x2 stat tiles) ==== start
   Lane 3 edits only between these two markers. Four separate tiles in a 2x2 grid, 12px apart (the framed strip and its
   shared lines are gone); Followers leads top left on the stats tint. Tile: label 14/600, number 34/800, the note on
   its own line, then the chip (left) and the sparkline (right). The chip is never red: up is --ok on --ok-bg, flat or
   down plain --muted on the track colour (--soft). Specificity beats the older #numbers strip rules above. */
.tiles#numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); background: none; border: 0;
  border-radius: 0; box-shadow: none; overflow: visible; }
.tiles#numbers > .card { border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow);
  background: var(--stone); padding: var(--s-4); gap: var(--s-1); container-type: inline-size; }
#numbers .stat-num { font-size: 2.125rem; }   /* 34 */
#numbers .stat-note { font-weight: 400; }
#numbers .stat-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
  margin-top: var(--s-2); min-height: 24px; }
#numbers .stat-chip { margin: 0; display: inline-flex; align-items: center; gap: 2px; min-height: 24px; padding: 0 var(--s-2);
  border-radius: 6px; white-space: nowrap; font-size: .8125rem; font-weight: 600; line-height: 1.25rem; color: var(--muted);
  background: var(--soft); }
#numbers .stat-chip.up { color: var(--ok); background: var(--ok-bg); }
.tiles#numbers > .stat-lead { background: var(--tint-stats); }
#numbers .stat-lead .stat-num { font-size: 3rem; }   /* 48 */
@container (max-width: 215px) { .ck-spark { display: none; } }   /* a tile too narrow for chip and line (the Home column beside the sidebar) keeps the chip */
@media (max-width: 47.5rem) {
  #numbers .stat-num { font-size: 1.875rem; }   /* 30 */
  #numbers .stat-lead .stat-num { font-size: 2.5rem; }   /* 40 */
  #numbers .stat-foot .ck-spark { display: none; }   /* the chip carries it on a phone (two tiles a row) */
}
/* ==== home-tiles ==== end */

/* ==== home-today (r24 lane 4, issue 729: Today rows) ==== start
   Lane 4 edits only between these two markers.
   Today as rows, not a pasted Discord post: the state on the right of the header, one row per fact (icon, key 14/600
   --muted, value + muted meta, the row's link on the right), split by 1px rules. On a phone the key sits above the
   value; with the two columns (760px of room, the cockpit's container) the key is a 96px column and a row is one line.
   Then the zone line as fine print, and the footer: the links as 44px text links, "Discord copy on · Change" on the
   right. */
#today .today-head { align-items: center; }
.today-rows { margin: 0; padding: 0; list-style: none; }
.today-row { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: var(--s-3); align-items: start;
  padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.today-row:first-child { border-top: 0; padding-top: 0; }
.today-icon { grid-row: 1 / span 2; margin-top: .125rem; color: var(--key-today); }
.today-key { margin: 0; font-size: var(--t-sm); font-weight: 600; line-height: 1.25rem; color: var(--muted); }
.today-key, .today-value { display: block; }
.today-value { margin: 0; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.today-row.bare .today-value { grid-row: 1 / span 2; font-weight: 400; }
.today-meta { font-weight: 400; margin-left: var(--s-1); }
.today-go { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; margin-left: var(--s-2); }
.today-zone { margin: var(--s-2) 0 0; font-size: .8125rem; line-height: 1.25rem; color: var(--muted); }
.today-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--s-4);
  margin-top: var(--s-3); padding-top: var(--s-1); border-top: 1px solid var(--line); }
.today-links { display: flex; flex-wrap: wrap; gap: 0 var(--s-4); }
.today-links a, .today-copy a { min-height: var(--tap); display: inline-flex; align-items: center; font-weight: 600; }
.today-copy { margin: 0 0 0 auto; font-size: var(--t-sm); color: var(--muted); }   /* right, also when it wraps */
@container (min-width: 760px) {
  .today-row { grid-template-columns: 20px 96px minmax(0, 1fr); align-items: baseline; }
  .today-icon { grid-row: auto; align-self: center; margin-top: 0; }
  .today-row.bare .today-value { grid-row: auto; grid-column: 2 / span 2; }
  .today-go { min-height: 0; }   /* one line: the row itself is the tap height */
  .today-row:has(.today-go) { padding: 0; min-height: var(--tap); align-items: center; }
  .today-row:has(.today-go) .today-go { min-height: var(--tap); }
}
/* ==== home-today ==== end */

/* ==== home-road (r24 lane 5, issue 730: Road / Path card) ==== start
   Lane 5 edits only between these two markers. */
/* The compact road card (dash.road_card, DESIGN.md "Home: B Cockpit" Road): a "Next up" line 17/600, one row per box
   (label 14/600 muted, "now / need" on the right, then the meter on its own line: Partner six 14px boxes, Affiliate an
   8px progress), the rule under "How Twitch counts this" and road.note always visible. A finished road: one Honey row.
   Every box carries a --field edge (3:1 on the card, filled or not); the count beside them says the same in words. */
#road.road-card .road-sum { margin: 0 0 var(--s-2); font-size: 1.0625rem; font-weight: 600; line-height: 1.4;
  color: var(--brand); }
.road-rows { display: flex; flex-direction: column; gap: var(--s-2); }
.road-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-1) var(--s-3); align-items: center; }
.road-row > progress, .road-row > .road-boxes, .road-row > .road-missing { grid-column: 1 / -1; }
.road-label { font-size: var(--t-sm); font-weight: 600; color: var(--muted); }
.road-count { display: inline-flex; align-items: center; gap: var(--s-1); font-weight: 600;
  font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.road-missing { font-size: var(--t-sm); color: var(--muted); }
.road-ok { flex: none; width: 18px; height: 18px; color: var(--ok); }
.road-boxes { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.road-boxes > span { height: 14px; border-radius: 4px; background: var(--soft); box-shadow: inset 0 0 0 1px var(--field); }
.road-boxes > span.on { background: var(--accent); }   /* the --field edge stays: --accent alone is 2.7:1 on dark */
.road-row.met .road-boxes > span.on { background: var(--ok); }
progress.road-bar { height: .5rem; border-radius: 4px; }
.road-win { display: flex; align-items: center; gap: var(--s-3); margin: 0 0 var(--s-3); padding: var(--s-3) .875rem;
  border-radius: var(--radius); background: var(--win-bg); color: var(--win); font-weight: 600; }
.road-trophy { flex: none; color: var(--win); }
/* the fold and road.note share one line while the fold is shut (inline blocks); open, the rule takes the width */
#road.road-card > .road-rule { display: inline-block; vertical-align: middle; margin: var(--s-1) var(--s-4) 0 0; }
#road.road-card > .road-rule[open] { display: block; margin-right: 0; }
#road.road-card > .road-rule > p { margin: 0 0 var(--s-2); }
#road.road-card > .road-note { display: inline-block; vertical-align: middle; margin: var(--s-1) 0 0;
  font-size: var(--t-sm); }
/* A wide card (380px+ inside): each Affiliate box on one line, label · bar · count (rows display: contents so the
   three columns line up across rows; dense placement keeps the markup order label, count, bar). */
#road.road-card { container: road / inline-size; }
@container road (min-width: 380px) {
  #road.road-card[data-goal="affiliate"] .road-rows { display: grid; grid-auto-flow: row dense; align-items: center;
    grid-template-columns: max-content minmax(3rem, 1fr) max-content; gap: var(--s-2) var(--s-3); }
  #road.road-card[data-goal="affiliate"] .road-row { display: contents; }
  #road.road-card[data-goal="affiliate"] .road-label { grid-column: 1; }
  #road.road-card[data-goal="affiliate"] .road-row > progress { grid-column: 2; }
  #road.road-card[data-goal="affiliate"] .road-count { grid-column: 3; justify-self: end; }
  #road.road-card[data-goal="affiliate"] .road-missing { grid-column: 2 / -1; }
}
/* ==== home-road ==== end */

/* r26 lane3 #672 setting rows: an icon before the name (flag SIDEKICK_SETTING_ROW_ICONS, off) */
.setting-icon { display: inline-flex; vertical-align: -4px; margin-right: var(--s-2); }
.setting-icon .card-icon { color: var(--accent-ink); }

/* ==== r29 wording editor (#672, flag SIDEKICK_POST_LINES, off) ==== */
.setting-edit { margin: var(--s-1) 0 0; }
.setting-edit a { display: inline-flex; align-items: center; min-height: var(--tap); }
.preview-line { margin: var(--s-2) 0; overflow-wrap: anywhere; }
#wording-card .row { flex-wrap: wrap; gap: var(--s-2); }
/* ==== r29 wording editor ==== end */
