/* TeamUp Hub. One stylesheet, light + dark, phone-first. The look ("Clipboard"): Geist, hairlines instead of
   shadows, a white top bar, quick 140ms movement, one type scale, two corners.
   Brand yellow is for the logo mark, the primary button and count badges, never for the active tab or data: charts
   use the validated series palette and the status colours, each with a label or icon beside it.

   The scale, used by app.css and ui-shell.css alike (so older pages and the page kit look like one product):
     type     12.5 (labels, small print) · 13.5 (secondary, nav, buttons) · 14 (body) · 15 (card titles) ·
              18 (section and lightbox headings) · 24 (page titles, 600, -0.02em) · 26 (stat numbers)
     weight   400 · 500 · 600 (the fonts are served 400 to 600, so nothing is faux-bolded)
     corners  8px cards, panels, the lightbox and sheets · 6px buttons, inputs, chips, rows and pills · round avatars,
              switches and count badges
     numbers  Geist Mono (.num, stats, tables' figures, times), tabular
     motion   140ms cubic-bezier(.2, 0, 0, 1) for hover, press and colour; 180ms for the lightbox (fade and scale) and
              sheets (slide) */

/* Geist and Geist Mono (SIL Open Font License), self-hosted: public/assets/fonts. One variable file per subset. */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/assets/fonts/geist-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/assets/fonts/geist-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/assets/fonts/geist-mono-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-num: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --fs-xs: 12.5px; --fs-sm: 13.5px; --fs-md: 14px; --fs-lg: 15px; --fs-h: 18px; --fs-title: 24px; --fs-stat: 26px;
  --r-card: 8px; --r-ctl: 6px;
  --t: 140ms; --t-slide: 180ms; --ease: cubic-bezier(.2, 0, 0, 1);
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f4f4f2;
  --surface-3: #ebeae7;
  --ink: #171716;
  --ink-2: #52514d;
  --ink-3: #8a8984;
  --line: #e7e6e3;
  --line-2: #d8d7d3;
  --brand: #ffe500;
  --brand-ink: #0a0a0a;
  --accent: #7a6800;
  --accent-soft: rgba(255, 229, 0, .22);
  --s1: #2a78d6;  /* series 1, blue */
  --s2: #eb6834;  /* series 2, orange */
  --s3: #1baf7a;  /* series 3, aqua */
  --s1-soft: rgba(42, 120, 214, .12);
  --good: #0a7d0a;
  --good-fill: #0ca30c;
  --good-soft: rgba(12, 163, 12, .1);
  --warn: #9a6400;
  --warn-fill: #fab219;
  --warn-soft: rgba(250, 178, 25, .18);
  --bad: #b8302f;
  --bad-fill: #d03b3b;
  --bad-soft: rgba(208, 59, 59, .1);
  --grid: #ebeae6;
  --axis: #cfcec9;
  /* Cards sit flat on hairlines (an empty shadow, so it still combines with others); floating things keep one. */
  --shadow: 0 0 #0000;
  --shadow-pop: 0 1px 2px rgba(20, 20, 15, .06), 0 8px 24px rgba(20, 20, 15, .10);
  --shadow-lg: 0 24px 64px rgba(20, 20, 15, .18);
  --avatar-l: 88%;
  --avatar-ink: 30%;
  --radius: var(--r-card);
  --top-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111110; --surface: #191918; --surface-2: #212120; --surface-3: #2a2a28;
    --ink: #ededeb; --ink-2: #b5b4af; --ink-3: #807f7a; --line: #2b2b29; --line-2: #3a3a37;
    --accent: #ffe500; --accent-soft: rgba(255, 229, 0, .12);
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s1-soft: rgba(57, 135, 229, .16);
    --good: #3fc23f; --good-soft: rgba(12, 163, 12, .16); --warn: #fab219; --warn-soft: rgba(250, 178, 25, .14);
    --bad: #ef6b6a; --bad-soft: rgba(208, 59, 59, .18); --grid: #262624; --axis: #3a3a37;
    --shadow-pop: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .45); --shadow-lg: 0 24px 64px rgba(0, 0, 0, .6);
    --avatar-l: 24%; --avatar-ink: 86%;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111110; --surface: #191918; --surface-2: #212120; --surface-3: #2a2a28;
  --ink: #ededeb; --ink-2: #b5b4af; --ink-3: #807f7a; --line: #2b2b29; --line-2: #3a3a37;
  --accent: #ffe500; --accent-soft: rgba(255, 229, 0, .12);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s1-soft: rgba(57, 135, 229, .16);
  --good: #3fc23f; --good-soft: rgba(12, 163, 12, .16); --warn: #fab219; --warn-soft: rgba(250, 178, 25, .14);
  --bad: #ef6b6a; --bad-soft: rgba(208, 59, 59, .18); --grid: #262624; --axis: #3a3a37;
  --shadow-pop: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .45); --shadow-lg: 0 24px 64px rgba(0, 0, 0, .6);
  --avatar-l: 24%; --avatar-ink: 86%;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--fs-md)/1.5 var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; }
b, strong, th { font-weight: 600; }
p { margin: 0; }
svg { display: block; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--s1); outline-offset: 2px; border-radius: 6px; }
:root { --gutter: 32px; --page-gap: 20px; }
.wrap { width: 100%; margin: 0; padding: 0 var(--gutter); }
/* Full width: the layout fills the window; running text keeps a readable measure inside its card. */
main p { max-width: 75ch; }
main .empty p, main .ui-empty p { margin-inline: auto; }
main .banner > div { max-width: 120ch; }
@media (max-width: 1100px) { :root { --gutter: 24px; } }
@media (max-width: 760px) { :root { --gutter: 16px; --page-gap: 16px; } }
.muted { color: var(--ink-3); }
.small { font-size: 13.5px; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
/* Motion: quick and without bounce; none at all for those who ask. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 6px; z-index: 60; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ buttons */
/* One button for both kits (ui-shell.css adds nothing to it): 34px, 13.5px/500, 6px corners, a slight press. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 34px; padding: 0 13px; border-radius: var(--r-ctl); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: var(--fs-sm); font-weight: 500; line-height: 1.2; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease), filter var(--t) var(--ease), transform var(--t) var(--ease);
}
.btn:hover { background: var(--surface-2); border-color: var(--line-2); }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.btn-primary:hover { background: var(--brand); border-color: var(--brand); filter: brightness(.96); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-dark:hover { background: var(--ink); border-color: var(--ink); opacity: .9; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { border-color: transparent; }
.btn-sm { min-height: 28px; padding: 0 10px; font-size: var(--fs-xs); border-radius: var(--r-ctl); }
.btn-block { width: 100%; min-height: 44px; font-size: var(--fs-md); }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-ctl);
  border: 1px solid transparent; background: transparent; color: inherit; cursor: pointer;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease), transform var(--t) var(--ease);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.96); }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------ top bar */
/* White, a hairline under it; the sections are quiet text, the one you're on in ink with a 2px line that slides to it
   (app.js moveTabMark). Settings is the gear at the right. */
.top { position: sticky; top: 0; z-index: 30; background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 20px; height: var(--top-h); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-ctl); background: var(--brand); color: var(--brand-ink); font-weight: 600; font-size: var(--fs-xs); letter-spacing: -.02em; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text b { font-weight: 600; font-size: var(--fs-md); letter-spacing: -.01em; }
.brand-text small { color: var(--ink-3); font-size: var(--fs-xs); }
.tabs { position: relative; display: flex; align-self: stretch; align-items: stretch; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  display: inline-flex; align-items: center; gap: 6px; padding: 0 11px;
  color: var(--ink-3); text-decoration: none; font-weight: 500; font-size: var(--fs-sm); white-space: nowrap;
  transition: color var(--t) var(--ease);
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); }
.tabs-mark { position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--ink); opacity: 0; pointer-events: none; transition: transform var(--t) var(--ease), width var(--t) var(--ease), opacity var(--t) var(--ease); }
/* Count badges: the brand's yellow, round. */
.tab-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font: 500 var(--fs-xs)/1 var(--font-num); letter-spacing: -.02em; }
.tab-count:empty { display: none; }
.gear-slot { display: contents; }
.gear { position: relative; color: var(--ink-3); }
.gear:hover, .gear[aria-current="page"] { color: var(--ink); }
.gear[aria-current="page"] { background: var(--surface-2); }
.gear .tab-count { position: absolute; top: -3px; right: -5px; }
.top-actions { display: flex; align-items: center; gap: 2px; flex: none; margin-left: auto; color: var(--ink-2); }
.top-actions .icon-btn { color: var(--ink-3); }
.top-actions .icon-btn:hover { color: var(--ink); }
.sync { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; margin-right: 4px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 500; cursor: pointer; transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease); }
.sync:hover { background: var(--surface-2); border-color: var(--line-2); }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good-fill); box-shadow: 0 0 0 3px var(--good-soft); }
.sync[data-state="demo"] .sync-dot { background: var(--brand); box-shadow: 0 0 0 3px rgba(255, 229, 0, .25); }
.sync[data-state="busy"] .sync-dot { background: var(--warn-fill); animation: pulse 1s infinite; }
.sync[data-state="error"] .sync-dot { background: var(--bad-fill); box-shadow: 0 0 0 3px var(--bad-soft); }
@keyframes pulse { 50% { opacity: .35; } }

.bottom-nav { display: none; }
/* A phone's More: the sections that aren't in the bottom bar, each with its pages. It slides up. */
.more-sheet { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; max-height: 80vh; overflow-y: auto; background: var(--surface); color: var(--ink); border-radius: var(--r-card) var(--r-card) 0 0; border-top: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 6px 16px calc(18px + env(safe-area-inset-bottom)); animation: sheet-in var(--t-slide) var(--ease); }
.more-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 4px; font-size: var(--fs-lg); }
.more-head b { font-weight: 600; }
.more-sec { padding: 10px 0; border-top: 1px solid var(--line); }
.more-sec:first-of-type { border-top: 0; }
.more-title { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--fs-lg); padding: 6px 0; }
.more-title svg { color: var(--ink-3); }
.more-pages { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 2px 28px; }
.more-pages a { padding: 6px 10px; border-radius: var(--r-ctl); background: var(--surface-2); color: var(--ink-2); text-decoration: none; font-size: var(--fs-sm); font-weight: 500; }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { transform: translateY(6px) scale(.985); opacity: 0; } }

/* ------------------------------------------------------------ layout */
/* One rhythm down the page: header, banner, page head and content are --page-gap apart on every page. */
main, main.wrap { padding-top: var(--page-gap); padding-bottom: 60px; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r-card); background: var(--accent-soft); border: 1px solid rgba(200, 180, 0, .3); margin-bottom: var(--page-gap); font-size: var(--fs-sm); }
.banner > svg { margin-top: 2px; }
.banner b { font-weight: 600; }
/* A page's title, its line and its buttons. The buttons sit on the title's line (not the bottom of the block), so a
   title is at the same height on every page however many rows of buttons it has. */
.view-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: var(--page-gap); }
.view-head h1 { font-size: var(--fs-title); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.view-head p { color: var(--ink-3); font-size: var(--fs-sm); margin-top: 4px; }
.grid { display: grid; gap: 16px; }
.cols-today { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: grid; gap: 16px; align-content: start; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); min-width: 0; }
/* Card padding is shared with the page kit's .ui-card (ui-shell.css): 16px sides, a 14px head, 12px between. */
.card-pad { padding: 14px 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 0; }
.card-head h2 { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.card-head h2 svg { color: var(--ink-3); }
.card-head .sub { color: var(--ink-3); font-size: var(--fs-xs); font-weight: 400; }
.card-body { padding: 12px 16px 16px; }
.card-foot { padding: 0 16px 14px; }
/* Micro-labels are sentence case: 12.5px/500, muted (the page kit's .ui-label is the same). */
.section-title { font-size: var(--fs-xs); font-weight: 500; color: var(--ink-3); margin: 6px 0 8px; }
.empty { padding: 26px 18px; text-align: center; color: var(--ink-3); }
.empty b { display: block; color: var(--ink); margin-bottom: 4px; font-size: var(--fs-lg); font-weight: 600; }

/* ------------------------------------------------------------ stat tiles */
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { position: relative; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); text-align: left; cursor: pointer; overflow: hidden; transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease), transform var(--t) var(--ease); }
.tile:hover { border-color: var(--line-2); background: color-mix(in srgb, var(--surface-2) 40%, var(--surface)); }
.tile:active { transform: scale(.985); }
.tile-label { font-size: var(--fs-xs); font-weight: 500; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
/* Stat numbers: Geist Mono, 26px/500, tight. */
.tile-value { display: block; font-family: var(--font-num); font-size: var(--fs-stat); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile-value small { font-family: var(--font); font-size: var(--fs-sm); font-weight: 500; color: var(--ink-3); letter-spacing: 0; margin-left: 3px; }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 4px; font-size: 12.5px; color: var(--ink-3); min-height: 24px; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.delta.flat { color: var(--ink-3); }
.tile .spark { width: 64px; height: 24px; flex: none; }
.tile-foot > span:first-child { min-width: 0; }

/* ------------------------------------------------------------ pills, avatars */
/* Pills and the page kit's .ui-chip are one size: 22px, 12.5px/500, 6px corners. */
.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: var(--r-ctl); font-size: var(--fs-xs); font-weight: 500; line-height: 1; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.pill svg { width: 12px; height: 12px; }
.pill.trial { background: rgba(232, 68, 47, .12); color: #c2341f; }
.pill.new { background: var(--s1-soft); color: var(--s1); }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.brand { background: var(--accent-soft); color: var(--accent); }
:root[data-theme="dark"] .pill.trial { color: #ff8a78; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.trial { color: #ff8a78; } }
.avatar { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-weight: 600; font-size: var(--fs-xs); background: hsl(var(--h, 40) 60% var(--avatar-l)); color: hsl(var(--h, 40) 55% var(--avatar-ink)); }
.avatar.lg { width: 54px; height: 54px; font-size: 18px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who-text { min-width: 0; display: flex; flex-direction: column; }
.who-name { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-sub { display: block; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name-btn { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; min-width: 0; }
.row > .name-btn { flex: 1; }
.row-right { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.name-btn:hover .who-name { text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------ chips */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); font-size: var(--fs-sm); font-weight: 500; cursor: pointer; color: var(--ink-2); transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease), transform var(--t) var(--ease); }
.chip:hover { border-color: var(--line-2); background: var(--surface-2); color: var(--ink); }
.chip:active { transform: scale(.985); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip .n { font-family: var(--font-num); font-size: var(--fs-xs); font-weight: 400; opacity: .7; }

/* ------------------------------------------------------------ moments */
.moments { display: grid; gap: 10px; }
.moment { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease); }
.moment:hover { border-color: var(--line-2); background: color-mix(in srgb, var(--surface-2) 50%, var(--surface)); }
.m-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); }
.m-icon svg { width: 18px; height: 18px; }
.m-icon.k-first, .m-icon.k-sessions, .m-icon.k-joined, .m-icon.k-days { background: var(--good-soft); color: var(--good); }
.m-icon.k-quiet, .m-icon.k-missing, .m-icon.k-risk { background: var(--warn-soft); color: var(--warn); }
.m-icon.k-trialEnding, .m-icon.k-trialOver, .m-icon.k-cancelling { background: var(--bad-soft); color: var(--bad); }
.m-icon.k-lead { background: var(--s1-soft); color: var(--s1); }
.m-title { font-weight: 500; font-size: var(--fs-md); }
.m-meta { font-size: 13.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-actions { display: flex; gap: 6px; }

/* ------------------------------------------------------------ lists */
.rows { display: grid; grid-template-columns: minmax(0, 1fr); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row-right { text-align: right; flex: none; font-size: 13.5px; color: var(--ink-3); max-width: 55%; }

/* class rows */
.class-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) 128px; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); cursor: pointer; border-radius: 6px; }
.class-row:first-child { border-top: 0; }
.class-row:hover { background: var(--surface-2); }
.class-row, .prow, .lrow { transition: background-color var(--t) var(--ease); }
.class-time { font-family: var(--font-num); font-weight: 500; font-variant-numeric: tabular-nums; }
.class-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.class-meta { font-size: 12.5px; color: var(--ink-3); }
.class-past { opacity: .5; }
.fill { display: grid; gap: 4px; justify-items: end; }
.fill-bar { position: relative; width: 100%; height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.fill-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--s1); }
.fill-bar i.full { background: var(--good-fill); }
.fill-bar i.low { background: var(--warn-fill); }
.fill-text { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.day-head { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 0 6px; border-bottom: 2px solid var(--ink); margin-bottom: 2px; }
.day-head h3 { font-size: 15px; font-weight: 600; }

/* ------------------------------------------------------------ members table */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); min-width: 240px; flex: 1; max-width: 360px; }
.search input { border: 0; outline: 0; background: transparent; width: 100%; }
select.select { height: 38px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); padding: 0 10px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12.5px; font-weight: 500; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl td { transition: background-color var(--t) var(--ease); }
.tbl .r { text-align: right; }
.tbl td.r, .tbl td.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; position: relative; } /* holds its .sr labels, which would widen the page */
.wk-bars { display: flex; align-items: flex-end; gap: 3px; height: 26px; }
.wk-bars i { display: block; width: 7px; border-radius: 2px 2px 0 0; background: var(--s1); min-height: 2px; }
.wk-bars i.zero { background: var(--surface-3); }
.ms { display: grid; gap: 4px; min-width: 110px; }
.ms-bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.ms-bar i { display: block; height: 100%; background: var(--s3); border-radius: 3px; }
.risk { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.risk-dot { width: 9px; height: 9px; border-radius: 50%; }
.risk.high { color: var(--bad); } .risk.high .risk-dot { background: var(--bad-fill); }
.risk.watch { color: var(--warn); } .risk.watch .risk-dot { background: var(--warn-fill); }
.risk.ok { color: var(--ink-3); } .risk.ok .risk-dot { background: var(--good-fill); }
.risk.paused { color: var(--ink-3); } .risk.paused .risk-dot { background: var(--axis); }
.mcards { display: none; }

/* ------------------------------------------------------------ kickstarter board */
.board { display: grid; grid-template-columns: repeat(7, minmax(180px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.lane { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 120px; }
/* The Kickstart board shares .board with Sales' (a row of columns): each week keeps a readable width. */
.board > .lane { flex: 1 0 200px; }
.lane-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 10px; font-weight: 600; font-size: 13.5px; }
.lane-head .n { font-size: 12.5px; color: var(--ink-3); }
.lane-cards { display: grid; gap: 8px; }
.kcard { display: grid; gap: 8px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; text-align: left; width: 100%; box-shadow: var(--shadow); }
.kcard:hover { border-color: var(--ink-3); }
.kprog { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.kprog i { display: block; height: 100%; background: #e8442f; border-radius: 3px; }
.kmeta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-3); gap: 6px; flex-wrap: wrap; }
.kflags { display: flex; gap: 4px; flex-wrap: wrap; }

/* ------------------------------------------------------------ charts */
.chart { position: relative; width: 100%; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart text { font-size: 11px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart .grid-line { stroke: var(--grid); stroke-width: 1; }
.chart .axis-line { stroke: var(--axis); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .cross { stroke: var(--ink-3); stroke-width: 1; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin: 2px 0 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; background: currentColor; }
.legend i.box { width: 10px; height: 10px; border-radius: 3px; }
.tip { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: var(--bg); border-radius: 6px; padding: 7px 10px; font-size: 12.5px; line-height: 1.4; box-shadow: var(--shadow-pop); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); }
.tip b { font-weight: 600; }
.tip .sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.chart-table { margin-top: 10px; font-size: 13.5px; }
.chart-table table { width: 100%; border-collapse: collapse; }
.chart-table th, .chart-table td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: right; }
.chart-table th:first-child, .chart-table td:first-child { text-align: left; }
.heat { display: grid; gap: 3px; }
.heat-row { display: grid; grid-template-columns: 38px repeat(var(--cols), minmax(0, 1fr)); gap: 3px; align-items: center; }
.heat-cell { height: 26px; border-radius: 4px; background: var(--surface-2); position: relative; }
.heat-cell[data-v] { cursor: default; }
.heat-cell.on:hover { outline: 2px solid var(--ink); outline-offset: -1px; }
.heat-lbl { font-size: 11px; color: var(--ink-3); text-align: center; }
.heat-day { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.scale { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); margin-top: 10px; }
.scale-bar { width: 140px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #cde2fb, #86b6ef, #3987e5, #1c5cab, #0d366b); }
.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 13.5px; }
.hbar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 14px; border-radius: 0 4px 4px 0; background: transparent; }
.hbar-track i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--s1); }
.hbar-track i.intro { background: var(--s2); }
.funnel { display: grid; gap: 8px; }
.funnel-step { display: grid; grid-template-columns: 150px minmax(0, 1fr) 90px; gap: 10px; align-items: center; font-size: 13.5px; }
.funnel-bar { height: 26px; border-radius: 0 6px 6px 0; display: flex; align-items: center; padding-left: 8px; color: #fff; font-weight: 600; font-size: 12.5px; min-width: 28px; }

/* ------------------------------------------------------------ report */
.report-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kv { padding: 12px 14px; border-radius: 8px; background: var(--surface-2); }
.kv-l { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.kv-v { font-family: var(--font-num); font-size: var(--fs-title); font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kv-d { font-size: 12.5px; }

/* ------------------------------------------------------------ reports */
.rep-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.rep-h { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.01em; color: var(--ink); margin: 28px 2px 12px; }
.rep-periods { justify-content: flex-end; max-width: 760px; }
.rep-custom { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: var(--fs-sm); color: var(--ink-2); }
.rep-custom label { display: inline-flex; gap: 6px; align-items: center; }
.rep-custom input[type="date"] { height: 30px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); font: inherit; }
.rep-metrics { gap: 6px; }
.rep-time tbody tr[data-range] { cursor: pointer; }
.rep-time tbody tr[data-range]:hover td { background: var(--surface-2); }
.rep-time tbody tr.muted td { color: var(--ink-3); }
.rep-time td .small { line-height: 1.2; }
.rep-time td:first-child { white-space: nowrap; }
.rep-timechart { max-width: 900px; }
.rep-loading { position: fixed; z-index: 20; top: calc(var(--top-h) + 16px); left: 50%; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; box-shadow: var(--shadow); }
.ins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-bottom: 16px; }
.ins { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 12px 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--axis); color: inherit; text-decoration: none; box-shadow: var(--shadow); }
a.ins:hover { border-color: var(--line-2); }
.ins b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.ins p { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; }
.ins-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); }
.ins.good { border-left-color: var(--good-fill); } .ins.good .ins-ic { background: var(--good-soft); color: var(--good); }
.ins.bad { border-left-color: var(--bad-fill); } .ins.bad .ins-ic { background: var(--bad-soft); color: var(--bad); }
.ins.warn { border-left-color: var(--warn-fill); } .ins.warn .ins-ic { background: var(--warn-soft); color: var(--warn); }
.ins.info { border-left-color: var(--s1); } .ins.info .ins-ic { background: var(--s1-soft); color: var(--s1); }
.read { margin-bottom: 16px; border-color: var(--line-2); }
.read-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.read-cta b { display: inline-flex; align-items: center; gap: 6px; }
.read-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }
.score { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.score-group { display: flex; flex-direction: column; overflow: hidden; }
.metrics { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); margin-top: 12px; }
.metrics.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.score-group.wide { grid-column: 1 / -1; }
.score-group.wide .metrics { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.metric { position: relative; background: var(--surface); padding: 12px 14px 12px; min-height: 104px; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.metric-l { font-size: 12.5px; font-weight: 500; color: var(--ink-3); padding-right: 74px; }
.metric-v { font-family: var(--font-num); font-size: var(--fs-title); font-weight: 500; letter-spacing: -.03em; line-height: 1.2; margin-top: 2px; font-variant-numeric: tabular-nums; }
.metric-d { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-top: 2px; font-size: 12.5px; }
.metric-s { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.metric-s.need { color: var(--warn); font-weight: 600; }
.metric-spark { position: absolute; top: 12px; right: 12px; opacity: .9; }
.metric-spark .spark { width: 64px; height: 20px; }
.chg { font-weight: 600; font-size: 12.5px; border-radius: 6px; padding: 0 5px; }
.chg.up { color: var(--good); background: var(--good-soft); }
.chg.down { color: var(--bad); background: var(--bad-soft); }
.chg.flat, .chg.neutral { color: var(--ink-3); background: var(--surface-2); }
.legend i.dash { background: repeating-linear-gradient(90deg, currentColor 0 5px, transparent 5px 8px); opacity: .8; }
.fspend { display: inline-block; font-weight: 600; font-size: 13.5px; background: var(--surface-2); border-radius: 6px; padding: 4px 10px; margin-bottom: 10px; }
.fsteps { display: grid; gap: 8px; }
.fstep { display: grid; grid-template-columns: 150px minmax(0, 1fr) 48px 86px; gap: 10px; align-items: center; font-size: 13.5px; }
.fstep-l { font-weight: 600; }
.fstep-bar { position: relative; height: 28px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.fstep-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 0 6px 6px 0; }
.fstep-bar b { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); font-size: 13.5px; color: var(--ink); background: var(--surface); border-radius: 6px; padding: 0 5px; }
.fstep-r { text-align: right; font-weight: 600; }
.fstep-c { text-align: right; font-size: 12.5px; }
.mature { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--s1-soft); font-size: 13.5px; }
.tbl-tight { font-size: 13.5px; }
.tbl-tight th, .tbl-tight td { padding: 8px 10px; }
.tbl tr.static { cursor: default; }
.tbl tr.static:hover td { background: transparent; }
.tbl tr.total td { border-top: 2px solid var(--line-2); }
.tbl tr.changed td { background: var(--accent-soft); }
.cohort { display: grid; gap: 3px; font-size: 12.5px; overflow-x: auto; }
.cohort-row { display: grid; grid-template-columns: 54px 52px repeat(var(--cols), minmax(46px, 1fr)); gap: 3px; align-items: center; }
.cohort-row.head { color: var(--ink-3); font-weight: 600; font-size: 12.5px; }
.cohort-row .r { text-align: right; padding-right: 6px; }
.cohort-row .c { text-align: center; border-radius: 4px; padding: 5px 0; font-weight: 600; }
.cohort-row .c.empty { background: var(--surface-2); }
.cohort-row.head .c { font-weight: 600; }

/* ------------------------------------------------------------ people lists */
.plist { padding: 0 6px; }
.prow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; width: 100%; padding: 9px 8px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; cursor: pointer; border-radius: 6px; }
.prow:first-child { border-top: 0; }
.prow:hover { background: var(--surface-2); }
.prow[data-static] { cursor: default; }
.prow[data-static]:hover { background: none; }
.prow > svg { color: var(--ink-3); }
.msg-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.msg-btn:hover { background: var(--brand); border-color: var(--brand); color: #0a0a0a; }
.msg-btn { position: relative; }
.msg-btn.urgent { background: var(--bad-fill); border-color: var(--bad-fill); color: #fff; animation: msg-pulse 1.6s ease-out infinite; }
.msg-btn.replied { background: var(--warn-soft); border-color: var(--warn-fill); color: var(--warn); }
.msg-btn.recent { background: var(--good-soft); border-color: var(--good-fill); color: var(--good); }
.msg-btn.nudge { border-color: var(--warn-fill); color: var(--warn); animation: msg-glow 2.4s ease-in-out infinite; }
.msg-dot { position: absolute; top: -4px; right: -4px; width: 11px; height: 11px; border-radius: 50%; background: var(--bad-fill); border: 2px solid var(--surface); }
.msg-btn.replied .msg-dot { background: var(--warn-fill); }
.msg-tick { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; background: var(--good-fill); color: #fff; border: 2px solid var(--surface); }
@keyframes msg-pulse { 0% { box-shadow: 0 0 0 0 rgba(208, 59, 59, .55); } 70% { box-shadow: 0 0 0 9px rgba(208, 59, 59, 0); } 100% { box-shadow: 0 0 0 0 rgba(208, 59, 59, 0); } }
@keyframes msg-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(250, 178, 25, 0); } 50% { box-shadow: 0 0 0 4px rgba(250, 178, 25, .35); } }
@media (prefers-reduced-motion: reduce) { .msg-btn.urgent, .msg-btn.nudge { animation: none; } }
.who-sub.msg-note { display: flex; align-items: center; gap: 4px; }
.msg-note.urgent { color: var(--bad); font-weight: 600; }
.msg-note.replied, .msg-note.nudge { color: var(--warn); font-weight: 600; }
.msg-note.recent { color: var(--good); }
.msg-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink-3); }
.msg-legend span { display: inline-flex; align-items: center; gap: 6px; }
.msg-btn.sm { width: 14px; height: 14px; border-radius: 4px; animation: none; display: inline-block; }
.waiting-bar { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 14px; padding: 10px 14px; border-radius: 8px; border: 1px solid rgba(208, 59, 59, .35); background: var(--bad-soft); text-align: left; cursor: pointer; }
.waiting-bar > svg { margin-left: auto; color: var(--ink-3); }
.waiting-bar .msg-btn { pointer-events: none; }
.kfoot { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; }
.kfoot .msg-btn { width: 28px; height: 28px; margin-left: auto; }
#d-msgs { scroll-margin-top: 120px; }
label.prow { grid-template-columns: auto auto minmax(0, 1fr) auto; }
label.prow input { width: 18px; height: 18px; accent-color: var(--ink); }
.kv.tap { border: 0; text-align: left; cursor: pointer; width: 100%; }
.kv.tap:hover { background: var(--surface-3); }
.tidy { border-color: rgba(250, 178, 25, .5); }
.pill.muted { background: var(--surface-2); color: var(--ink-3); }
.d-back { display: inline-flex; align-items: center; gap: 6px; margin: 10px 18px 0; border: 0; background: none; color: var(--accent); font-weight: 600; cursor: pointer; font-size: 13.5px; }
[data-list] { cursor: pointer; }
.metric[data-list]:hover { background: var(--surface-2); }
.metric[data-list] .metric-l::after { content: ' ›'; color: var(--ink-3); font-weight: 600; }
tr[data-list]:hover td { background: var(--surface-2); }

/* ------------------------------------------------------------ sales */
.lead-row { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.lead-steps { display: flex; gap: 3px; }
.lead-steps i { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); }
.lead-steps i.on { background: var(--good-fill); }
.ssteps { display: grid; gap: 12px; }
.sstep { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; }
.sstep > div { display: grid; gap: 6px; min-width: 0; }
.sstep-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-3); font-weight: 600; font-size: 13.5px; }
.sstep.done .sstep-n { background: var(--good-fill); color: #fff; }
.sstep.done b { color: var(--good); }
.pay-form { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 8px; }
.pay-form .d-actions, .pay-form p { grid-column: 1 / -1; }
.note-row { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; white-space: pre-wrap; }
.note-row:first-of-type { border-top: 0; }
.spinner.sm { width: 12px; height: 12px; display: inline-block; vertical-align: middle; }

.pill.hot { background: var(--bad-soft); color: var(--bad); }
.pill.warmt { background: var(--warn-soft); color: var(--warn); }
.pill.coldt { background: var(--s1-soft); color: var(--s1); }
.who-sub.temp-why { color: var(--ink-2); }
.temp-card.hot { border-left: 4px solid var(--bad-fill); }
.temp-card.warm { border-left: 4px solid var(--warn-fill); }
.temp-card.cold { border-left: 4px solid var(--s1); }
.temp-card.not { border-left: 4px solid var(--axis); }

/* sales: list and board */
.vtoggle { display: inline-flex; padding: 2px; gap: 2px; border-radius: var(--r-ctl); background: var(--surface-2); border: 1px solid var(--line); }
.vtoggle button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border: 0; border-radius: 4px; background: none; color: var(--ink-2); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; transition: background-color var(--t) var(--ease), color var(--t) var(--ease); }
.vtoggle button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, .06); }
.ltable { padding: 4px 8px; }
.lhead, .lrow { display: grid; grid-template-columns: minmax(240px, 2.3fr) minmax(110px, 1fr) minmax(100px, .9fr) minmax(180px, 2fr) minmax(120px, 1.1fr) auto; gap: 12px; align-items: start; }
.lhead { padding: 8px 8px 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.lrow { padding: 10px 8px; border-top: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.lrow:hover { background: var(--surface-2); }
.lc-who { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; min-width: 0; }
.lc { display: grid; gap: 2px; min-width: 0; font-size: 14px; }
.lc small { color: var(--ink-2); font-size: 12.5px; overflow-wrap: anywhere; }
.lc small.said { color: var(--ink); font-style: italic; }
.lc-k { display: none; font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.lrow .temp-why { white-space: normal; overflow: visible; text-overflow: clip; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-end { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
@media (max-width: 1100px) {
  .lhead { display: none; }
  .lrow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
  .lc-who { grid-column: 1 / -1; }
  .lc-conv { grid-column: 1 / -1; }
  .lc-k { display: block; }
  .lc-end { grid-column: 1 / -1; justify-content: space-between; }
}
.board { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; align-items: flex-start; }
.bcol { flex: 0 0 268px; display: grid; gap: 8px; padding: 8px; border-radius: 8px; background: var(--surface-2); border: 2px solid transparent; scroll-snap-align: start; }
.bcol.over { border-color: var(--accent); background: var(--accent-soft); }
.bcol.sale header b { color: var(--good); }
.bcol header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 2px 4px; font-size: 13.5px; }
.bcol header .n { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.bcards { display: grid; gap: 8px; min-height: 40px; }
.bempty { margin: 0; padding: 10px 4px; font-size: 13.5px; color: var(--ink-3); }
.bcard { display: grid; gap: 6px; padding: 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); cursor: pointer; font-size: 14px; }
.bcard:hover { background: color-mix(in srgb, var(--surface-2) 50%, var(--surface)); }
.bcard.hot { border-left-color: var(--bad-fill); }
.bcard.warm { border-left-color: var(--warn-fill); }
.bcard.cold { border-left-color: var(--s1); }
.bcard.not { border-left-color: var(--axis); opacity: .75; }
.bcard.won { border-left-color: var(--good-fill); }
.bcard.dragging { opacity: .4; }
.bcard-top { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.bcard-top b { min-width: 0; overflow-wrap: anywhere; }
.bcard-why { margin: 0; font-size: 12.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bcard-foot { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ink-3); }
.bcard-foot .msg-note { display: inline-flex; align-items: center; gap: 4px; }
.focus { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; padding: 10px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.focus > svg { color: var(--accent); }
.focus-chip { display: inline-flex; gap: 5px; align-items: center; height: 30px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.focus-chip b { font-weight: 600; }
.focus-chip.lane-new b, .focus-chip.lane-waiting b { color: var(--bad); }
.focus-chip.lane-ready b { color: var(--good); }
.bcol-name { display: inline-flex; align-items: center; gap: 6px; }
.bcol-hint { margin: -4px 4px 2px; font-size: 12.5px; color: var(--ink-3); line-height: 1.35; }
.bcol { flex-basis: 250px; }
.bcol.lane-new header svg, .bcol.lane-waiting header svg { color: var(--bad); }
.bcol.lane-ready header svg, .bcol.lane-setup header svg, .bcol.lane-booked header svg { color: var(--good); }
.bcol.lane-ready, .bcol.lane-setup { background: color-mix(in srgb, var(--good-soft) 55%, var(--surface-2)); }
.bcol.lane-waiting { background: color-mix(in srgb, var(--bad-soft) 45%, var(--surface-2)); }
.bcol.shut { flex-basis: 150px; opacity: .85; }
.bcard-next { margin: 0; display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 4px; align-items: start; font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.bcard-next svg { margin-top: 3px; color: var(--accent); }
.bcard.urgent { box-shadow: 0 0 0 2px var(--bad-soft); }
.bcard-stage { font-size: 12.5px; color: var(--ink-3); font-weight: 500 }
.who-sub.lane-next { color: var(--ink); font-weight: 600; white-space: normal; }
.park-opts { display: grid; gap: 10px; margin-top: 10px; }
.park-opts label { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: center; cursor: pointer; }
.park-opts small { grid-column: 2; color: var(--ink-3); }
.park-opts .park-lost { margin-top: 4px; font-size: 13.5px; color: var(--ink-2); }
.bcard-tally { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
@media (max-width: 760px) { .bcol { flex-basis: 82vw; } .vtoggle { width: 100%; } .vtoggle button { flex: 1; justify-content: center; } }

/* ------------------------------------------------------------ settings */
.plans-tbl td { vertical-align: top; }
.plans-tbl .select { height: 34px; min-width: 170px; }
.plans-tbl .why { color: var(--ink-2); max-width: 420px; }
.ai-says { margin-top: 6px; padding: 6px 8px; border-radius: 6px; background: var(--s1-soft); color: var(--ink); display: block; }
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; margin: 10px 0 0; font-size: 12.5px; }
.roles dt { font-weight: 600; }
.roles dd { margin: 0; color: var(--ink-3); }
@media (max-width: 760px) { .roles { grid-template-columns: minmax(0, 1fr); } }
.checks { display: grid; gap: 6px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 16px; height: 16px; accent-color: var(--ink); }
.spend-rows { display: grid; gap: 6px; margin-top: 8px; }
.spend-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 110px 36px; gap: 6px; align-items: center; }

/* ------------------------------------------------------------ the lightbox (app.js openDrawer) */
/* A centred card over a dimmed page (the old side drawer's markup, unchanged): its head stays at the top and a closing
   row of buttons at the bottom while the body scrolls. .wide for wide forms and tables. A phone gets a full-height
   sheet. In with a quick fade and scale, no slide. */
.scrim { position: fixed; inset: 0; background: rgba(15, 15, 12, .45); z-index: 40; animation: fade-in var(--t-slide) var(--ease); }
.drawer {
  position: fixed; z-index: 41; inset: 0; margin: auto; width: min(720px, calc(100vw - 48px)); height: -webkit-fit-content; height: fit-content;
  max-height: 90vh; max-height: 90dvh; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-card);
  box-shadow: var(--shadow-lg); overflow-y: auto; overscroll-behavior: contain; outline: none; animation: lightbox-in var(--t-slide) var(--ease);
}
.drawer.wide { width: min(960px, calc(100vw - 48px)); }
@keyframes lightbox-in { from { opacity: 0; transform: scale(.98); } }
.d-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.d-head h2 { font-size: var(--fs-h); font-weight: 600; letter-spacing: -.01em; }
.d-close { margin-left: auto; margin: -4px -6px 0 auto; }
.d-body { padding: 16px 18px 20px; display: grid; gap: 16px; }
/* A row of buttons that ends the lightbox stays in view. */
.d-body > .d-actions:last-child { position: sticky; bottom: 0; z-index: 2; margin: 0 -18px -20px; padding: 12px 18px; background: var(--surface); border-top: 1px solid var(--line); }
@media (max-width: 600px) {
  .drawer, .drawer.wide { inset: 0; width: 100%; height: 100%; max-height: none; margin: 0; border: 0; border-radius: 0; animation: sheet-in var(--t-slide) var(--ease); padding-bottom: env(safe-area-inset-bottom); }
  .d-head { padding: 14px 16px 12px; padding-top: max(14px, env(safe-area-inset-top)); }
  .d-body { padding: 14px 16px 20px; }
  .d-body > .d-actions:last-child { margin: 0 -16px -20px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
}
.d-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.d-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.d-stat b { display: block; font-size: var(--fs-h); font-weight: 500; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.d-stat span { font-size: 12.5px; color: var(--ink-3); }
.d-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cal { display: grid; grid-template-columns: 26px repeat(12, minmax(0, 1fr)); gap: 3px; font-size: 10.5px; color: var(--ink-3); }
.cal i { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--surface-3); }
.cal i.a { background: var(--s1); }
.cal i.n { background: var(--bad-fill); }
.cal i.l { background: var(--warn-fill); }
.cal i.r { background: transparent; box-shadow: inset 0 0 0 2px var(--s1); }
.cal i.f { opacity: .35; }
.cal-wk { font-size: 10px; white-space: nowrap; overflow: visible; color: var(--ink-3); align-self: end; padding-bottom: 2px; }
.cal-wk.now { color: var(--ink); font-weight: 600; }
.cal i.now { box-shadow: inset 0 0 0 1px var(--line-2); }
.cal i.now.r { box-shadow: inset 0 0 0 2px var(--s1); }
.cal i.today { outline: 2px solid var(--ink); outline-offset: 1px; position: relative; z-index: 1; }
.cal i.k { border-bottom: 3px solid #e8442f; }
.legend i.box.cal-today-key { background: none; outline: 2px solid var(--ink); outline-offset: -2px; }
.legend i.box.cal-k-key { background: none; border-bottom: 3px solid #e8442f; border-radius: 0; height: 8px; }
.reasons { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; }
textarea.ta, input.inp { width: 100%; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); padding: 10px 12px; resize: vertical; }
input.inp { height: 40px; padding: 0 12px; }
textarea.ta:focus, input.inp:focus, select.select:focus { outline: 2px solid var(--s1); outline-offset: -1px; }
.thread { display: grid; gap: 6px; max-height: 340px; overflow-y: auto; padding: 4px; }
.bubble { max-width: 82%; padding: 8px 12px; border-radius: 8px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.bubble.in { background: var(--surface-3); justify-self: start; border-bottom-left-radius: 4px; }
.bubble.out { background: var(--s1); color: #fff; justify-self: end; border-bottom-right-radius: 4px; }
.bubble small { display: block; font-size: 12.5px; opacity: .7; margin-top: 2px; }

/* ------------------------------------------------------------ dialog, toasts */
dialog.dlg { border: 1px solid var(--line); border-radius: var(--r-card); padding: 0; width: min(460px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
dialog.dlg[open] { animation: lightbox-in var(--t-slide) var(--ease); }
dialog.dlg::backdrop { background: rgba(15, 15, 12, .45); }
.dlg-body { padding: 20px 20px 8px; display: grid; gap: 10px; }
.dlg-body h3 { font-size: 18px; font-weight: 600; }
.dlg-quote { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; font-size: 14px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; }
.toasts { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--r-ctl); box-shadow: var(--shadow-pop); font-size: var(--fs-sm); font-weight: 500; animation: pop-in var(--t-slide) var(--ease); }
.toast.bad { background: var(--bad-fill); color: #fff; }

/* ------------------------------------------------------------ email studio */
.studio { display: grid; grid-template-columns: 300px minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; align-items: start; }
.seg-list { display: grid; gap: 6px; }
.seg { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; text-align: left; width: 100%; }
.seg:hover { border-color: var(--ink-3); }
.seg[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.seg-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); }
.seg-ic svg { width: 16px; height: 16px; }
.seg[aria-pressed="true"] .seg-ic { background: var(--brand); color: #0a0a0a; }
.seg-l { font-weight: 600; font-size: 13.5px; line-height: 1.25; }
.seg-a { font-size: 12.5px; color: var(--ink-3); }
.seg-n { font-family: var(--font-num); font-weight: 500; font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.seg-people { display: flex; flex-wrap: wrap; gap: 4px; }
.seg-people .pill { cursor: pointer; }
.studio-step { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.studio-step i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--bg); font-style: normal; font-size: 12.5px; }
.opts { display: flex; gap: 6px; flex-wrap: wrap; }
.opt { padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); cursor: pointer; font-size: 13.5px; font-weight: 600; text-align: left; }
.opt small { display: block; font-weight: 500; color: var(--ink-3); font-size: 12.5px; }
.opt[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.preview-wrap { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.preview-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--surface); }
.preview-frame { display: block; width: 100%; height: 760px; min-height: 480px; border: 0; background: #f2f2f0; margin: 0 auto; transition: width .2s; }
.preview-frame.mobile { width: 390px; max-width: 100%; }
.inbox { padding: 12px 14px; background: var(--surface); border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.inbox-from { font-weight: 600; font-size: 14px; }
.inbox-subj { font-weight: 600; font-size: 14px; }
.inbox-pre { color: var(--ink-3); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ideas { display: flex; flex-wrap: wrap; gap: 6px; }
.blocks-ed { display: grid; gap: 8px; }
.block-ed { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface); }
.block-ed-h { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 500; color: var(--ink-3); margin-bottom: 4px; }
.block-ed textarea { width: 100%; border: 0; background: transparent; resize: vertical; padding: 0; min-height: 44px; outline: none; font-size: 14px; }
.notes { padding: 10px 12px; border-radius: 8px; background: var(--warn-soft); font-size: 13.5px; }
.progress { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--s1); transition: width .3s; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
details.more summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--ink-2); padding: 4px 0; }

/* ------------------------------------------------------------ login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.login-card { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 28px; display: grid; gap: 14px; }
.login-card h1 { font-size: var(--fs-title); font-weight: 600; letter-spacing: -.02em; }
.login-card h2 { font-size: 15px; font-weight: 600; }
.login-form { display: grid; gap: 14px; }
.login-err { color: var(--bad); font-weight: 600; }
.login-alt { border-top: 1px solid var(--line); padding-top: 12px; }
.login-alt summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.login-alt[open] summary { margin-bottom: 12px; }

/* ------------------------------------------------------------ who's signed in (Training on) */
.who-menu { position: relative; }
.who-menu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 6px; }
.who-menu summary::-webkit-details-marker { display: none; }
.who-menu summary:hover { background: var(--surface-2); }
.who-menu .avatar { width: 30px; height: 30px; font-size: 12.5px; }
.who-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 35; display: grid; gap: 2px; min-width: 220px; max-width: 280px; padding: 14px; border-radius: 8px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-pop); animation: pop-in var(--t) var(--ease); }
.who-pop b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.who-pop span { font-size: 13.5px; color: var(--ink-3); overflow-wrap: anywhere; }
.who-pop .btn { margin-top: 10px; justify-self: start; }
body.has-who #logout { display: none; }
/* Eight sections and the gear (nav-model.js): the gym's line under the logo goes on a laptop; under 1180px the sync
   chip keeps its dot and drops its words; on a tablet the logo loses its words, and narrower still the bar scrolls
   and keeps the section in view. */
@media (max-width: 1440px) { .brand-text small { display: none; } }
@media (max-width: 1180px) { .tabs a { padding: 0 8px; } .tabs { gap: 0; } .top-in { gap: 14px; } .sync span:last-child { display: none; } .sync { padding: 0 9px; } }
@media (min-width: 761px) and (max-width: 1100px) { .brand-text { display: none; } }

/* ------------------------------------------------------------ training */
/* A tab row inside a page (Coaching → Programmes · Workouts · Journeys): the top bar's language, quiet text and a 2px
   ink line under the one you're on. */
.subtabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 0 0 var(--page-gap); border-bottom: 1px solid var(--line); }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px 9px; color: var(--ink-3); text-decoration: none; font-weight: 500; font-size: var(--fs-sm); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--t) var(--ease), border-color var(--t) var(--ease); }
.subtabs a:first-child { padding-left: 0; }
.subtabs a:hover { color: var(--ink); }
.subtabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.t-who { color: var(--ink-2); }
.t-error p { margin: 4px 0 12px; }
.t-err { color: var(--bad); margin-top: 10px; }
.lib-filters { display: grid; gap: 8px; margin-bottom: 14px; }
.chips-l { align-self: center; font-size: 12.5px; font-weight: 500; color: var(--ink-3); min-width: 88px; }
.lib-count { margin-bottom: 10px; }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
.ex { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.ex-thumb { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 6px; overflow: hidden; background: var(--surface-2); color: var(--ink-3); }
.ex-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ex-text { display: grid; gap: 3px; min-width: 0; }
.ex-name { font-weight: 600; font-size: 14px; line-height: 1.25; }
.ex-sub { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.lib-more { display: flex; justify-content: center; margin-top: 16px; }
.t-team { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.staff-row .who { flex: 1; }
.staff-row.inactive .who { opacity: .55; }
.staff-right { display: flex; align-items: center; gap: 6px; flex: none; }
.role-pick { height: 34px; min-width: 110px; }
.t-roles { display: grid; gap: 10px; margin: 0; font-size: 13.5px; }
.t-roles dt { font-weight: 600; }
.t-roles dd { margin: 0; color: var(--ink-3); }
/* Who sees Train (train-access.js): the panel on Training → Team, and the switch on a client page and in the drawer */
.acc-card { margin-bottom: 16px; }
.acc-body { display: grid; gap: 14px; }
.acc-lead { font-size: 14px; color: var(--ink-2); max-width: 640px; }
.acc-release { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
.acc-release:disabled .pg-type { cursor: default; opacity: .8; }
.acc-note { margin-top: -6px; }
.acc-sec .section-title { display: flex; align-items: center; gap: 8px; margin-top: 0; }
.acc-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-size: 12.5px; letter-spacing: 0; }
.acc-row .who { flex: 1; }
.acc-add .search { max-width: 420px; }
.acc-found { display: grid; gap: 6px; margin-top: 8px; max-width: 520px; }
.acc-found .pk-ex:disabled { cursor: default; opacity: .75; }
.acc-found .pk-ex > .who { display: flex; }
.acc-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.acc-switch-t { display: grid; gap: 1px; min-width: 0; }
.acc-switch-t small { color: var(--ink-3); font-size: 12.5px; }
.acc-switch .vtoggle button { min-width: 56px; justify-content: center; }
.acc-bar { padding: 12px 18px; margin-bottom: 16px; }
.acc-in-drawer { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .acc-release { grid-template-columns: minmax(0, 1fr); }
  .acc-row { flex-wrap: wrap; row-gap: 6px; }
  .acc-row .who { flex: 1 1 100%; }
  .acc-row .staff-right { margin-left: 42px; }
  .acc-card .card-head .sub { display: none; }
  .acc-switch .vtoggle { width: auto; }
}

/* ------------------------------------------------------------ App (the gym app's admin: app-admin.js) and
   Training → Journeys and Food (train-journeys.js, train-food.js). Lists and cards reuse Check-ins' ci-* layout. */
.app-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
/* Two cards side by side are the same height; a column of cards keeps each card its own height. */
.app-cols > .stack { align-content: start; }
.app-cols.wide-left { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.app-form { display: grid; gap: 12px; }
.app-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.app-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.app-row .select, .app-form .select { width: 100%; height: 40px; }
.app-inline { display: flex; gap: 8px; margin-top: 10px; }
.app-inline .inp { flex: 1; min-width: 0; }
.app-owner-note { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.app-form .d-actions, .card-body .d-actions { margin-top: 4px; }
/* chat */
.ch-noreports { display: flex; align-items: center; gap: 6px; margin: -6px 0 14px; }
.ch-reports { margin-bottom: 16px; border-color: var(--bad-soft); box-shadow: inset 3px 0 0 var(--bad-fill), var(--shadow); }
.ch-report { align-items: flex-start; gap: 12px; }
.ch-report .who-text { flex: 1; }
.ch-quote { display: block; margin: 4px 0; padding: 6px 10px; border-radius: 6px; background: var(--surface-2); font-size: 14px; white-space: pre-wrap; }
.ch-report-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ch-emoji { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); font-size: 15px; }
.ci-head .ch-emoji { width: 44px; height: 44px; font-size: 24px; }
.ch-empty { padding: 4px 10px 10px; }
.ch-list-foot { padding: 10px; border-top: 1px solid var(--line); margin-top: 6px; }
.ch-card { gap: 14px; }
.chat-thread { max-height: none; height: clamp(280px, calc(100vh - 470px), 620px); padding: 8px 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); align-content: start; }
.chat-thread .bubble { max-width: min(78%, 620px); }
.ch-who { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 1px; opacity: .85; }
.bubble.removed { opacity: .55; }
.bubble.removed .ch-who ~ * { text-decoration: none; }
.ch-rm { font-size: 12.5px; color: inherit; text-decoration: underline; opacity: .9; }
.ch-day { justify-self: center; font-size: 12.5px; font-weight: 600; color: var(--ink-3); background: var(--surface-2); border-radius: 999px; padding: 2px 10px; margin: 6px 0 2px; }
.ch-compose { display: grid; gap: 8px; }
.ch-compose .ta { min-height: 64px; }
.ch-compose-r { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.ch-as { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); }
.ch-as .inp { width: 160px; height: 34px; }
.ch-ed { display: grid; gap: 8px; }
.ch-ed-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) minmax(0, 1.4fr) auto auto; gap: 6px; align-items: center; }
.ch-ed-row .inp { height: 36px; padding: 0 10px; }
.ch-ed-emoji { text-align: center; }
/* notices */
.phone-mock { max-width: 320px; margin: 0 auto; padding: 12px; border-radius: 24px; background: #0a0a0a; border: 1px solid #262626; color: #f4f4f2; }
.phone-top { display: flex; justify-content: space-between; color: #9d9d97; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin: 2px 6px 10px; }
.phone-mock .small.muted { color: #9d9d97; padding: 10px; }
.bn-prev { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: #1d2a36; border-left: 4px solid #3987e5; font-size: 14px; line-height: 1.4; }
.bn-prev.warning { background: #2f2814; border-left-color: #fab219; }
.bn-prev.urgent { background: #331716; border-left-color: #ef6b6a; }
.bn-btn { font-weight: 800; font-size: 13px; color: #ffe500; }
/* events */
.ev-row { gap: 12px; }
.ev-row .who-text { flex: 1; }
.ev-date { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 8px; background: var(--surface-2); line-height: 1.05; }
.ev-date b { font-family: var(--font-num); font-size: 18px; font-weight: 500; }
.ev-date span { font-size: 12.5px; font-weight: 600; letter-spacing: .08em; color: var(--accent); }
.ev-act { display: flex; gap: 4px; align-items: center; }
.ev-row .who-sub svg, .ch-noreports svg { display: inline-block; vertical-align: -1px; }
#hl-del .who-sub, .ch-report .who-sub { white-space: normal; }
.ek-status { display: flex; align-items: center; gap: 6px; margin: 10px 0; font-size: 14px; }
/* wheel */
.wh-sum { font-size: 15px; }
.tbl tr.wh-win td { background: var(--accent-soft); }
/* health */
.hl-big { font-size: 15px; margin-bottom: 10px; }
.hl-big b { font-family: var(--font-num); font-size: 24px; font-weight: 500; margin-right: 4px; }
.hl-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.hl-checks li { display: flex; align-items: center; gap: 8px; }
.hl-checks li.ok svg { color: var(--good); }
.hl-checks li.no svg { color: var(--bad); }
.hl-run .who-text, .hl-crash .who-text { flex: 1; }
.hl-url { font-size: 12.5px; word-break: break-all; }
.wh-apps { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.wh-apps p { flex-basis: 100%; }
/* journeys */
.jr-live { margin-bottom: 16px; }
.jr-chips { gap: 6px; }
.jr-chip { text-decoration: none; color: inherit; height: auto; min-height: 32px; padding: 4px 10px; }
.jr-chip.need { border-color: var(--warn-fill); }
.jr-chip .pill { margin-left: 2px; }
.jr-done summary { cursor: pointer; list-style: none; }
.jr-done summary::-webkit-details-marker { display: none; }
.jr-prog .fill-bar { height: 8px; }
.jr-tasks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; font-size: 13.5px; }
.jr-goals { margin-top: 6px; }
.jr-tasks li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 6px; align-items: center; color: var(--ink-3); }
.jr-tasks li.done { color: var(--ink); }
.jr-tasks li.done svg { color: var(--good); }
.jr-tasks small { color: var(--ink-3); font-size: 12.5px; }
.jr-day { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.jr-day:first-of-type { border-top: 0; }
.jr-day-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jr-mood { font-size: 18px; }
.jr-reply { display: flex; gap: 8px; }
.jr-reply .inp { flex: 1; min-width: 0; height: 36px; }
/* food */
.fd-sum { font-size: 15px; }
.fd-days { display: grid; gap: 2px; }
.fd-day { display: grid; grid-template-columns: 118px minmax(80px, 1fr) 84px 96px 56px; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.fd-day:first-child { border-top: 0; }
.fd-date { font-weight: 600; }
.fd-bar { position: relative; height: 10px; border-radius: 6px; background: var(--surface-2); }
.fd-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: var(--s1); }
.fd-bar b { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 1.5px dashed var(--ink-2); }
.fd-n { text-align: right; }
.fd-nothing { grid-column: 2 / -1; }
.cl-app { margin-top: 16px; }
.cl-app .card-head + .card-body + .card-head { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 14px; }
/* Settings → Features & plan: a row per feature (the member app, then hub tools), the options, Stronger Systems' rows. */
.ft-sec { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.ft-sec svg { display: inline-block; }
.ft-intro { margin: 0; }
.ft-list { display: grid; }
.ft-row { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ft-row:first-child { border-top: 0; padding-top: 2px; }
.ft-row:last-child { padding-bottom: 2px; }
.ft-row .acc-switch-t { flex: 1 1 260px; gap: 3px; }
.ft-row .acc-switch-t b { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ft-row.off .acc-switch-t b { color: var(--ink-2); }
.ft-row.ft-master { margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 6px; background: var(--accent-soft); border-top-color: transparent; }
.ft-row.ft-master + .ft-row { border-top-color: transparent; }
.ft-note { color: var(--ink-3); }
.ft-note .link-btn { font-size: 12.5px; }
.ft-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ft-ctl .vtoggle button { min-width: 56px; justify-content: center; }
.ft-ctl .vtoggle button:disabled { cursor: default; opacity: .7; }
.ft-lock .select { height: 38px; }
.ft-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ft-tabs .select { width: 100%; height: 40px; }
.ft-bar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 8px; border-radius: 8px; background: #0a0a0a; color: #f4f4f2; font-size: 12.5px; font-weight: 600; }
.ft-bar span { flex: 1 1 0; min-width: 0; padding: 6px 2px; border-radius: 6px; background: #1d1d1d; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-bar em { flex-basis: 100%; color: #9d9d97; font-style: normal; font-weight: 500; text-align: center; }
.ft-banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; margin-bottom: 16px; border-color: var(--accent); background: var(--accent-soft); font-size: 14px; }
.ft-banner svg { flex: none; margin-top: 2px; }
.ft-history .who-name { white-space: normal; }
/* The plan: a small badge and a line, and modules that come with Strong. */
.ft-plan { display: grid; justify-items: start; gap: 6px; }
.ft-plan .small { color: var(--ink-2); }
.plan-pill.strong { background: var(--accent-soft); color: var(--accent); }
.plan-pill.basic { background: var(--s1-soft); color: var(--s1); }
.ft-row.ft-strong .acc-switch-t small:not(.ft-note) { color: var(--ink-3); }

@media (max-width: 1100px) {
  .app-cols, .app-cols.wide-left { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .ft-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ft-ctl { width: 100%; }
  .ft-ctl .vtoggle { width: auto; }
  .ft-ctl .vtoggle button { flex: none; }
  .ft-bar { font-size: 12.5px; gap: 3px; padding: 6px; }
}
/* A phone shows one conversation at a time: the report queue waits on the list. */
@media (max-width: 960px) { .ch-open #ch-reports { display: none; } }
@media (max-width: 760px) {
  #a-page .card-head .sub, .jr-live .card-head .sub { display: none; }
  .app-row, .app-row.three { grid-template-columns: minmax(0, 1fr); }
  .chat-thread { height: clamp(260px, calc(100vh - 400px), 520px); }
  .ch-compose-r { justify-content: space-between; }
  .ch-as .inp { width: 130px; }
  .ch-report { flex-wrap: wrap; }
  .ch-report-act { width: 100%; justify-content: flex-start; }
  .ch-ed-row { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .ch-ed-row .ch-ed-desc { grid-column: 1 / -1; grid-row: 2; }
  .ch-ed-row .check { grid-column: 1 / 3; grid-row: 3; }
  .ev-row { flex-wrap: wrap; }
  .ev-act { margin-left: 60px; }
  .fd-day { grid-template-columns: 96px minmax(60px, 1fr) 72px; }
  .jr-tasks { grid-template-columns: minmax(0, 1fr); }
  .fd-day > :nth-child(n+4) { display: none; }
  .jr-reply { flex-wrap: wrap; }
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .studio { grid-template-columns: 260px minmax(0, 1fr); }
  .studio-preview { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .cols-today, .cols-2, .cols-3, .t-team { grid-template-columns: minmax(0, 1fr); }
  .score { grid-template-columns: minmax(0, 1fr); }
  .rep-tools { align-items: flex-start; }
  .rep-periods { justify-content: flex-start; }
  .report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  :root { --top-h: 54px; }
  .tabs { display: none; }
  /* Filter chips scroll sideways on a phone instead of stacking up above the list. */
  .lib-filters .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .lib-filters .chips::-webkit-scrollbar { display: none; }
  .lib-filters .chip { flex: none; }
  .chips-l { min-width: 0; flex: none; }
  .ex-grid { grid-template-columns: minmax(0, 1fr); }
  .ex { grid-template-columns: 60px minmax(0, 1fr); }
  .ex-thumb { width: 60px; height: 60px; }
  .metrics, .score-group.wide .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-v { font-size: 24px; }
  .metric-spark { display: none; }
  .metric-l { padding-right: 0; }
  .fstep { grid-template-columns: 96px minmax(0, 1fr) 40px; }
  .fstep-c { display: none; }
  .spend-row { grid-template-columns: 1fr 1fr; }
  .read-cta { flex-direction: column; align-items: flex-start; }
  .brand-text small { display: none; }
  .sync span:last-child { display: none; }
  main, main.wrap { padding-bottom: calc(96px + env(safe-area-inset-bottom)); padding-top: 16px; }
  /* The phone's bottom bar: white with a hairline, like the top; the section you're on in ink. */
  .bottom-nav {
    display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  }
  .bottom-nav a, .bottom-nav button { display: grid; justify-items: center; gap: 3px; padding: 4px 0 2px; color: var(--ink-3); text-decoration: none; font-size: var(--fs-xs); font-weight: 500; position: relative; border: 0; background: none; cursor: pointer; min-width: 0; transition: color var(--t) var(--ease); }
  .bottom-nav span:not(.tab-count) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bottom-nav svg { width: 20px; height: 20px; }
  .bottom-nav [aria-current="page"] { color: var(--ink); }
  .bottom-nav [aria-current="page"]::before { content: ""; position: absolute; top: -7px; left: 28%; right: 28%; height: 2px; background: var(--ink); }
  .bottom-nav .tab-count { position: absolute; top: -2px; left: 56%; }
  .gear-slot { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile-value { font-size: 26px; }
  .view-head h1 { font-size: 24px; }
  .moment { grid-template-columns: auto minmax(0, 1fr); }
  .m-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .tbl-wrap-members { display: none; }
  .mcards { display: grid; gap: 8px; }
  .mcard { display: grid; gap: 8px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; text-align: left; width: 100%; cursor: pointer; }
  .mcard-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); }
  .d-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hbar { grid-template-columns: minmax(0, 120px) minmax(0, 1fr) 36px; }
  .funnel-step { grid-template-columns: 110px minmax(0, 1fr) 70px; }
  .class-row { grid-template-columns: 48px minmax(0, 1fr) 92px; }
  .report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview-frame { height: 640px; }
  .search { min-width: 0; max-width: none; }
}
@media print {
  .top, .bottom-nav, .toolbar, .no-print, .drawer, .scrim { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* Training library: browse by movement */
.lib-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lib-bar .search { flex: 1 1 260px; }
.pat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.pat { display: grid; gap: 4px; text-align: left; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); cursor: pointer; font: inherit; }
.pat:hover, .pat:focus-visible { border-color: var(--ink-3); outline: none; }
.pat b { font-size: 15px; font-weight: 600; }
.pat span { color: var(--ink-2); font-size: 13.5px; line-height: 1.35; }
.pat .n { color: var(--ink-3); font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.lib-crumb { display: grid; gap: 2px; margin: 4px 0 10px; }
.lib-crumb h2 { font-size: 18px; font-weight: 600; }
.lib-crumb .link-btn { justify-self: start; display: inline-flex; gap: 6px; align-items: center; }
button.ex { font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; }
button.ex:hover, button.ex:focus-visible { border-color: var(--ink-3); outline: none; }
.ex-photo { width: 100%; max-height: 260px; object-fit: contain; background: #fff; border-radius: var(--radius); margin-bottom: 12px; }
.ex-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; line-height: 1.45; }
.ex-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.ex-dl dt { color: var(--ink-3); font-weight: 600; }
.ex-dl dd { margin: 0; min-width: 0; }

/* ------------------------------------------------------------ training: shared bits */
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; font-size: 14px; }
.stack-sm { display: grid; gap: 10px; }
.field-l { font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
fieldset.pg-types, fieldset.pg-colors { border: 0; margin: 0; padding: 0; min-width: 0; }
.danger-txt { color: var(--bad); }
.link-plain { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.vtoggle button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, .06); }
.check > span { display: grid; gap: 1px; }
.check small { color: var(--ink-3); font-size: 12.5px; }
.check input { flex: none; }
label.check { align-items: flex-start; }
label.check input { margin-top: 3px; }
.pill.sched.trk { background: var(--s1-soft); color: var(--s1); }
.pill.sched.prg { background: rgba(232, 68, 47, .12); color: #c2341f; }
.pill.sched.lib { background: var(--good-soft); color: var(--good); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.sched.prg { color: #ff8a78; } }
:root[data-theme="dark"] .pill.sched.prg { color: #ff8a78; }
.pg-dot { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 4px; }

/* ------------------------------------------------------------ training: workouts */
.wo-list { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); align-items: start; }
.wo-row { display: flex; align-items: flex-start; gap: 8px; padding: 12px 10px 12px 16px; }
.wo-main { flex: 1; min-width: 0; display: grid; gap: 3px; color: inherit; text-decoration: none; }
.wo-main b { font-size: 15px; }
.wo-main:hover b { text-decoration: underline; text-underline-offset: 3px; }
.wo-desc { color: var(--ink-2); }
.wo-main .chips { margin-top: 4px; }
.wo-acts { display: flex; gap: 2px; flex: none; }
.wo-ed { display: grid; gap: 14px; max-width: 1080px; }
.wo-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.wo-top .back-link { margin: 0; }
.wo-save { display: flex; align-items: center; gap: 10px; }
#wo-status { display: inline-flex; align-items: center; gap: 4px; }
.wo-ed .banner { margin: 0; }
.wo-copy { align-items: center; flex-wrap: wrap; }
.wo-copy > span { flex: 1 1 260px; }
.wo-copy .btn { flex: 0 0 auto; }
.wo-meta { display: grid; gap: 12px; }
.wo-name { width: 100%; border: 0; border-bottom: 2px solid var(--line); background: transparent; font-size: 24px; font-weight: 600; letter-spacing: -.3px; padding: 4px 0 6px; outline: 0; }
.wo-name:focus { border-bottom-color: var(--s1); }
.wo-meta-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wo-blocks { display: grid; gap: 12px; }
.wo-block { padding: 12px 14px 14px; border-left: 4px solid var(--line-2); }
.wo-block.k-superset { border-left-color: var(--s1); }
.wo-block.k-circuit { border-left-color: var(--s3); }
.wo-block.k-emom, .wo-block.k-amrap, .wo-block.k-interval, .wo-block.k-for_time { border-left-color: var(--s2); }
.wb-head { display: flex; align-items: center; gap: 8px; }
.wb-letter { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 6px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 13.5px; }
.wb-kind { height: 34px; min-width: 132px; font-weight: 600; }
.wb-title { height: 34px; flex: 1; min-width: 80px; }
.wb-acts { display: flex; gap: 0; margin-left: auto; flex: none; }
.wb-acts .icon-btn { width: 32px; height: 32px; }
.icon-btn:disabled { opacity: .3; cursor: default; }
.wb-params { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.bf { display: grid; gap: 3px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.bf .inp { height: 34px; width: 110px; }
.wb-items { display: grid; gap: 10px; margin-top: 10px; }
.wb-empty { padding: 4px 2px; }
.wb-foot { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.wb-notes { flex: 1; min-width: 200px; }
.wb-notes summary { cursor: pointer; color: var(--ink-3); font-weight: 600; padding: 5px 0; }
.wb-notes .ta { margin-top: 6px; }
.wb-item { border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); padding: 10px; }
.wi-head { display: flex; align-items: center; gap: 8px; }
.wi-name { display: grid; gap: 0; flex: 1; min-width: 0; }
.wi-name b { font-size: 15px; }
.wi-name:hover b { text-decoration: underline; text-underline-offset: 3px; }
.wi-acts { display: flex; align-items: center; gap: 0; flex: none; }
.wi-acts .icon-btn { width: 32px; height: 32px; }
.sets { display: grid; gap: 4px; margin-top: 8px; }
.set-row { display: grid; grid-template-columns: var(--cols); gap: 6px; align-items: center; }
.set-head { font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.set-n { font-weight: 600; color: var(--ink-3); text-align: center; font-variant-numeric: tabular-nums; }
.sf { display: block; min-width: 0; }
.sf > span:first-child { display: none; }
.sf input, .sf select { width: 100%; height: 34px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); padding: 0 8px; min-width: 0; font-variant-numeric: tabular-nums; }
.sf input:focus, .sf select:focus { outline: 2px solid var(--s1); outline-offset: -1px; }
.load-in { display: flex; min-width: 0; }
.load-in input { border-radius: 6px 0 0 6px; flex: 1; }
.load-in select { width: auto; flex: none; border-radius: 0 6px 6px 0; border-left: 0; padding: 0 4px; font-size: 13.5px; }
.set-row.t-warmup .set-n { color: var(--warn); }
.set-row.t-drop .set-n, .set-row.t-failure .set-n { color: var(--bad); }
.set-del { width: 32px; height: 32px; color: var(--ink-3); }
.wi-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.wi-notes.inp { height: 32px; flex: 1; min-width: 160px; font-size: 13.5px; }
.wo-add { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.wo-add-kinds { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pk-pats { display: flex; flex-wrap: wrap; gap: 6px; }
.pk-h { font-size: 18px; font-weight: 600; margin: 6px 0 2px; }
.pk-list { display: grid; gap: 6px; }
.pk-ex { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); text-align: left; cursor: pointer; font: inherit; color: inherit; }
.pk-ex > span:first-child { display: grid; gap: 1px; min-width: 0; }
.pk-ex:hover, .pk-ex:focus-visible { border-color: var(--ink-3); }
.pk-add { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 6px; background: var(--surface-2); }
.pk-ex.picked .pk-add { background: var(--good-soft); color: var(--good); }
.pk-done { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0 4px; background: var(--bg); border-top: 1px solid var(--line); }

/* ------------------------------------------------------------ training: programmes */
.pg-intro { flex: 1; min-width: 240px; max-width: 70ch; margin-right: auto; } /* its button goes to the right edge */
.pg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.pg-card { display: grid; gap: 8px; align-content: start; padding: 14px 16px; color: inherit; text-decoration: none; }
.pg-card:hover { border-color: var(--ink-3); }
.pg-card-top { display: flex; align-items: center; gap: 8px; }
.pg-card-top b { font-size: 15px; flex: 1; min-width: 0; }
.pg-desc { color: var(--ink-2); }
.pg-facts { display: grid; gap: 4px; color: var(--ink-3); }
.pg-facts > span { display: flex; align-items: center; gap: 6px; }
.pg-form { gap: 14px; }
.pg-types { display: grid; gap: 8px; }
.pg-type { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.pg-type:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pg-type input { margin-top: 3px; accent-color: var(--ink); }
.pg-type > span { display: grid; gap: 2px; }
.pg-type small { color: var(--ink-3); font-size: 12.5px; line-height: 1.35; }
.pg-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.pg-colors legend { width: 100%; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; inset: 0; }
.swatch i { display: block; width: 30px; height: 30px; border-radius: 6px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); }
.swatch input:checked + i { box-shadow: 0 0 0 2px var(--ink); }
.swatch input:focus-visible + i { outline: 2px solid var(--s1); outline-offset: 2px; }
.pg-archive { margin-left: auto; color: var(--bad); }
.pg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pg-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.pg-title h2 { font-size: 24px; font-weight: 600; letter-spacing: -.3px; }
.pg-title .pg-dot { width: 14px; height: 14px; }
.pg-ed > .pg-desc { margin-top: 4px; }
.pg-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.pg-side { order: -1; }
.pg-side .rows { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); column-gap: 24px; }
.pg-side .row { border-top: 0; }
.pg-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pg-nav-l, .pg-nav-r { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pg-week { display: inline-flex; align-items: baseline; gap: 8px; margin-left: 6px; flex-wrap: wrap; }
.pg-week b { font-size: 15px; }
.wk-pick { height: 32px; }
.wk-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wk-grid.loading { opacity: .55; }
.wk-day { display: flex; flex-direction: column; gap: 6px; min-height: 180px; padding: 8px 6px; border-radius: 8px; background: var(--surface-2); border: 2px solid transparent; min-width: 0; }
.wk-day header { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; padding: 0 2px; font-size: 13.5px; flex-wrap: wrap; }
.wk-day header span { color: var(--ink-3); font-size: 12.5px; }
.wk-day header .pill { display: none; }
.wk-day.today { background: var(--accent-soft); }
.wk-day.today header b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.wk-day.past .pi { opacity: .72; }
.wk-day.over { border-color: var(--accent); background: var(--accent-soft); }
.wk-items { display: grid; gap: 6px; align-content: start; }
.wk-add { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: auto; height: 30px; border: 1px dashed var(--line-2); border-radius: 6px; background: transparent; color: var(--ink-3); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.wk-add:hover, .wk-add:focus-visible { color: var(--ink); border-color: var(--ink-3); background: var(--surface); }
.pi { display: flex; gap: 6px; align-items: flex-start; padding: 7px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--s1); cursor: pointer; font-size: 13.5px; line-height: 1.3; min-width: 0; }
.pi:hover, .pi:focus-visible { border-color: var(--ink-3); }
.pi.k-rest { border-left-color: var(--axis); background: transparent; }
.pi.k-note { border-left-color: var(--warn-fill); }
.pi.dragging { opacity: .4; }
.pi[draggable="true"] { cursor: grab; }
.pi-ic { flex: none; color: var(--ink-3); margin-top: 1px; }
.pi-text { display: grid; gap: 1px; min-width: 0; }
.pi-text b { overflow-wrap: anywhere; }
.pi-note { color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pg-hint { margin-top: 10px; }
.od-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.od-row { display: flex; align-items: center; gap: 8px; }
.od-row .pi { flex: 1; padding: 10px 12px; font-size: 14px; }
.od-n { width: 22px; text-align: center; font-weight: 600; color: var(--ink-3); }
.od-acts { display: flex; flex: none; }
.add-opts { gap: 8px; }
.add-opts .seg { grid-template-columns: 32px minmax(0, 1fr) 0; }
.add-note { display: grid; gap: 10px; margin-top: 6px; }
.mv-rel { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mv-rel .select { width: 100%; }
.as-row .who { flex: 1; }
.as-ic { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); }
.as-form { gap: 14px; }
.as-kinds { width: 100%; }
.as-kinds button { flex: 1; justify-content: center; }
.as-picked { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--ink); border-radius: 8px; background: var(--surface); }
.as-picked .who-text { flex: 1; }
.as-found { display: grid; gap: 6px; margin-top: 8px; }
.as-newgroup { margin-top: 10px; }

/* ------------------------------------------------------------ training: saved blocks */
.pg-views { margin-bottom: 14px; }
.vtoggle a { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 4px; color: var(--ink-2); font-size: 13.5px; font-weight: 500; text-decoration: none; }
.vtoggle a:hover { color: var(--ink); }
.vtoggle a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, .06); }
.bl-ic { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 6px; background: var(--s1-soft); color: var(--s1); }
.pill.bl-len { background: var(--s1-soft); color: var(--s1); }
.bl-search { max-width: 280px; }
.bl-card { gap: 10px; }
.bl-open { display: grid; gap: 8px; color: inherit; text-decoration: none; }
.bl-open:hover b { text-decoration: underline; text-underline-offset: 3px; }
.bl-acts { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.bl-acts-r { display: flex; gap: 2px; }
.bl-acts-r .icon-btn { width: 34px; height: 34px; color: var(--ink-3); }
.bl-acts-r .icon-btn:hover { color: var(--ink); }
.bl-ed .pg-head .d-actions { flex-wrap: wrap; }
.bl-banner { margin: 12px 0 0; align-items: center; }
.bl-banner svg { flex: none; }
.wk-save { width: 24px; height: 24px; margin-left: auto; color: var(--ink-3); }
.wk-save:hover, .wk-save:focus-visible { color: var(--ink); }
.wk-day.off { background: transparent; border: 2px dashed var(--line); }
.wk-day.off header b, .wk-day.off header span { color: var(--ink-3); }
.bl-len-f { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 10px; align-items: end; }
.bl-len-f .select { width: 100%; height: 40px; }
.bl-weeks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bl-weeks .select { width: 100%; height: 40px; }
.bl-what { display: grid; gap: 2px; padding: 12px 14px; background: var(--surface-2); }
.bl-what b { font-size: 15px; }
.bl-ins { gap: 18px; }
.bl-ins > div:empty { display: none; }
.bl-ins > div, .bl-ins .field, .bl-ins .as-picked { min-width: 0; }
.bl-ins .who-sub { white-space: normal; }
.bl-pick { max-height: 46vh; overflow-y: auto; margin-top: 8px; padding: 2px; }
.bl-ins .search { max-width: none; }
.bl-ins .field-l { display: block; }
.bl-ins .as-picked .pg-dot { width: 14px; height: 14px; }
.bl-day { max-width: 140px; }
.bl-hint { display: grid; gap: 6px; margin-top: 8px; }
.bl-hint b { font-size: 14px; }
.bl-warn { display: flex; gap: 6px; align-items: flex-start; padding: 8px 10px; border-radius: 6px; background: var(--warn-soft); color: var(--ink); }
.bl-warn svg { flex: none; margin-top: 2px; color: var(--warn); }
.bl-prev { list-style: none; margin: 0; padding: 0; display: grid; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.bl-prev li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 13.5px; }
.bl-prev li:first-child { border-top: 0; }
.bl-prev li.off { background: var(--surface-2); }
.bl-prev li.off .bl-day-i { opacity: .55; text-decoration: line-through; }
.bl-day-l { display: flex; flex-direction: column; gap: 1px; }
.bl-day-l .muted { font-size: 12.5px; }
.bl-day-l .pill { align-self: flex-start; margin-top: 3px; }
.bl-day-i { display: flex; flex-wrap: wrap; gap: 4px 10px; align-content: start; }
.bl-pi { display: inline-flex; align-items: center; gap: 5px; }
.bl-pi svg { color: var(--ink-3); flex: none; }
.bl-pi.k-rest, .bl-pi.k-note { color: var(--ink-2); }
fieldset.bl-clash { padding: 12px; border-radius: 8px; background: var(--warn-soft); }
.bl-clash legend { float: left; width: 100%; font-size: 14px; color: var(--ink); margin-bottom: 10px; }
@media (max-width: 760px) {
  .pg-views { display: flex; }
  .pg-views a { flex: 1; justify-content: center; }
  .bl-search { max-width: none; flex: 1 1 100%; }
  .pg-nav .pg-nav-r .btn { flex: 1 1 auto; }
  .bl-weeks { grid-template-columns: minmax(0, 1fr); }
  .bl-prev li { grid-template-columns: 96px minmax(0, 1fr); }
  .wk-day header .wk-save { margin-left: 0; margin-top: 2px; }
}

/* ------------------------------------------------------------ training: clients */
.act-card { margin-bottom: 14px; }
.act-card .card-head .sub { text-align: right; }
.act-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; scroll-snap-type: x proximity; }
.act { flex: 0 0 250px; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: inherit; text-decoration: none; font-size: 13.5px; line-height: 1.35; scroll-snap-align: start; }
.act:hover { border-color: var(--ink-3); }
.act-ic { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 6px; background: var(--s1-soft); color: var(--s1); }
.act-ic.k-pr { background: var(--accent-soft); color: var(--accent); }
.act-text { display: grid; gap: 2px; min-width: 0; }
.cl-bar .chips { flex: 1; }
.chip:disabled { opacity: .45; cursor: default; }
.cl-last { display: grid; gap: 1px; font-size: 13.5px; }
.cl-table td .chips { flex-wrap: wrap; }
.cl-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.cl-head-t { flex: 1; min-width: 0; }
.cl-head h2 { font-size: 24px; font-weight: 600; letter-spacing: -.3px; }
.cl-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cl-prog { color: inherit; text-decoration: none; flex: 1; }
.cl-prog:hover .who-name { text-decoration: underline; text-underline-offset: 3px; }
.logs { display: grid; gap: 6px; }
.log { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.log.open { border-color: var(--ink-3); }
.log-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.log-head .who-text { flex: 1; }
.log-head svg { color: var(--ink-3); transition: transform var(--t) var(--ease); }
.log.open .log-head svg { transform: rotate(180deg); }
.log-body { padding: 0 12px 12px; display: grid; gap: 10px; }
.log-note { color: var(--ink-2); font-style: italic; }
.lb { display: grid; gap: 8px; }
.lb-item b { font-size: 14px; }
.lb-sets { margin: 4px 0 0; padding-left: 22px; font-size: 13.5px; display: grid; gap: 2px; font-variant-numeric: tabular-nums; }
.nt-form { display: grid; gap: 8px; margin-bottom: 12px; }
.nt-form-r { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cnotes { display: grid; gap: 8px; }
.note { padding: 10px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.note.pinned { background: var(--accent-soft); border-color: rgba(200, 180, 0, .35); }
.note p { white-space: pre-wrap; font-size: 14px; }
.note-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.note-foot > span:first-child { display: inline-flex; align-items: center; gap: 4px; }
.hb-week { display: flex; gap: 3px; flex: none; }
.hb-week i { width: 12px; height: 12px; border-radius: 3px; background: var(--surface-3); }
.hb-week i.on { background: var(--good-fill); }
.hb-week i.rest { background: var(--axis); }

@media (max-width: 960px) {
  .cl-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .hide-sm { display: none; }
  .cl-table { display: none; }
  .cl-bar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .cl-bar .chips { flex: none; }
  .cl-bar .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .cl-bar .chips::-webkit-scrollbar { display: none; }
  .cl-bar .chip { flex: none; }
  .cl-card .mcard-row { align-items: flex-start; }
  .cl-card .mcard-row > .num { flex: none; text-align: right; }
  .act { flex-basis: 78vw; }
  .act-card .card-head .sub { display: none; }
  .wo-name { font-size: 18px; }
  .wo-block { padding: 10px 10px 12px; }
  .wb-head { flex-wrap: wrap; }
  .wb-title { order: 3; flex-basis: 100%; }
  .wb-kind { min-width: 0; flex: 1; }
  .wb-item { padding: 8px; }
  .wi-acts .icon-btn { width: 30px; }
  .set-row.set-head { display: none; }
  .set-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line); }
  .sets .set-row:nth-child(2) { border-top: 0; }
  .set-n { width: 22px; align-self: center; order: -2; }
  .sf { flex: 1 1 calc(33% - 12px); min-width: 74px; }
  .sf > span:first-child { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-bottom: 2px; }
  .sf-type { flex-basis: calc(100% - 70px); order: -1; }
  .sf-load { flex-basis: calc(66% - 6px); }
  .set-del { order: -1; margin-left: auto; }
  .sf input, .sf select { height: 38px; font-size: 15px; }
  .load-in select { font-size: 14px; }
  .wo-add { flex-direction: column; align-items: stretch; }
  .wk-grid { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .wk-day { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: start; min-height: 0; padding: 8px; gap: 4px 8px; }
  .wk-day header { flex-direction: column; align-items: flex-start; gap: 0; grid-row: span 2; }
  .wk-day header .pill { display: inline-flex; margin-top: 2px; }
  .wk-add { margin-top: 0; justify-content: flex-start; padding: 0 10px; height: 32px; }
  .wk-items:empty { display: none; }
  .pg-nav-r { width: 100%; }
  .pg-nav-r .btn { flex: 1; }
  .pg-title h2 { font-size: 18px; }
  .mv-rel { grid-template-columns: 1fr; }
}
.seg .seg-l, .seg .seg-a { display: block; }
.seg .pg-dot { width: 14px; height: 14px; }
#pk-back { display: inline-flex; align-items: center; gap: 6px; }
.cl-grid .stack, .logs, .lb, .cnotes { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.log { min-width: 0; }
@media (max-width: 760px) {
  .cl-head-t { flex-basis: calc(100% - 80px); }
  .cl-head .btn { margin-left: 68px; }
}
.log-head .who-sub { white-space: normal; }

/* ------------------------------------------------------------ training: habits */
.hb-bar { justify-content: space-between; }
.hb-bar-r { display: flex; gap: 8px; flex-wrap: wrap; }
.hb-intro { max-width: 76ch; margin: -4px 0 14px; }
.hb-cats { margin-bottom: 14px; }
.hb-none { margin-bottom: 12px; }
.hb-sec { margin-bottom: 22px; }
.hb-sec .section-title .n { font-weight: 600; opacity: .7; margin-left: 4px; }
.hb-empty-act { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.hb-emoji { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 6px; background: var(--surface-2); font-size: 18px; line-height: 1; color: var(--ink-3); }
.hb-emoji.lg { width: 44px; height: 44px; border-radius: 8px; font-size: 24px; }
.hb-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.hb-lib { display: flex; gap: 12px; align-items: flex-start; padding: 14px; text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%; }
.hb-lib:hover, .hb-lib:focus-visible { border-color: var(--ink-3); }
.hb-lib-t { display: grid; gap: 4px; min-width: 0; }
.hb-lib-t b { font-size: 15px; line-height: 1.3; }
.hb-facts { color: var(--ink-2); font-weight: 600; }
.hb-lib .chips { margin-top: 2px; }
.hb-name-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; }
.hb-emoji-in { text-align: center; font-size: 18px; }
.hb-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
fieldset.hb-days { border: 0; margin: -4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hb-day { position: relative; min-width: 50px; justify-content: center; }
.hb-day:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.hb-day:has(input:focus-visible) { outline: 2px solid var(--s1); outline-offset: 2px; }
.hb-habit { display: grid; gap: 14px; padding: 14px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.hb-habit .section-title { margin: 0; }
.hb-habit .pg-type, .hb-habit .inp, .hb-habit .select { background: var(--surface); }
.field small.muted { font-weight: 500; }
.hb-who { display: flex; gap: 8px; align-items: flex-start; color: var(--ink-2); }
.hb-who svg { margin-top: 2px; color: var(--ink-3); }
.hb-sub { margin-top: 4px; }
.hb-desc { margin-top: 8px; max-width: 76ch; white-space: pre-wrap; }
.hb-habit-line { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; color: var(--ink-2); }
.hb-habit-line svg { margin-top: 2px; color: var(--good); }
.hb-stats { margin: 16px 0; }
.hb-stats .d-stat small { font-size: 13.5px; color: var(--ink-3); font-weight: 600; }
.hb-row .who-sub { white-space: normal; }
.lbd { list-style: none; margin: 0; padding: 0; display: grid; }
.lbd-head, .lbd-row { display: grid; grid-template-columns: 34px minmax(0, 1.3fr) minmax(0, 1fr) 84px; gap: 12px; align-items: center; }
.lbd-head { padding: 0 0 8px; font-weight: 600; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.lbd-head span:last-child, .lbd-streak { text-align: right; }
.lbd-row { padding: 9px 0; border-top: 1px solid var(--line); }
.lbd-row:first-child { border-top: 0; }
.lbd-rank { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 600; font-size: 13.5px; color: var(--ink-3); }
.lbd-row.lbd-podium .lbd-rank { background: var(--accent-soft); color: var(--ink); }
.lbd-row.lbd-p1 .lbd-rank { background: var(--brand); color: var(--brand-ink); }
.lbd-who { min-width: 0; color: inherit; text-decoration: none; }
a.lbd-who:hover .who-name { text-decoration: underline; text-underline-offset: 3px; }
.lbd-who .avatar { width: 32px; height: 32px; font-size: 12.5px; }
.lbd-prog { display: grid; gap: 4px; }
.lbd-prog .ms-bar i { background: var(--good-fill); }
.lbd-prog .small { color: var(--ink-3); }
.lbd-streak { font-weight: 600; color: var(--ink-2); }
@media (max-width: 760px) {
  .hb-bar { align-items: stretch; }
  .hb-bar .vtoggle { width: 100%; }
  .hb-bar .vtoggle button { flex: 1; justify-content: center; }
  .hb-bar-r { width: 100%; }
  .hb-bar-r .btn { flex: 1; }
  .hb-grid { grid-template-columns: minmax(0, 1fr); }
  .hb-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 0 16px; }
  .hb-cats::-webkit-scrollbar { display: none; }
  .hb-cats .chip { flex: none; }
  .lbd-head { display: none; }
  .lbd-row { grid-template-columns: 30px minmax(0, 1fr) auto; row-gap: 6px; }
  .lbd-prog { grid-column: 2 / -1; }
  .lbd-streak { grid-row: 1; grid-column: 3; }
  .pg-head .hb-bar-r { width: 100%; }
}

/* Training → Check-ins (train-checkins.js): the week bar, who's due, and one member's week */
.ci-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.ci-week { display: flex; align-items: center; gap: 6px; }
.ci-week-t { display: grid; min-width: 190px; text-align: center; line-height: 1.25; }
.ci-week-t b { font-size: 15px; font-weight: 600; }
.ci-week-t span { font-size: 12.5px; color: var(--ink-3); }
.ci-prog { flex: 1; min-width: 220px; display: grid; gap: 6px; }
.ci-prog-t { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ci-prog-t b { font-size: 15px; font-weight: 600; }
.ci-layout { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.ci-list { padding: 6px; position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; }
.ci-sec { display: flex; align-items: center; gap: 8px; padding: 10px 10px 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.ci-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: inherit; text-decoration: none; }
.ci-row:hover { background: var(--surface-2); }
.ci-row.on { background: var(--s1-soft); }
.ci-row .avatar { width: 32px; height: 32px; font-size: 12.5px; }
.ci-row .who-sub { white-space: normal; line-height: 1.3; }
.ci-big small { font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-right: 4px; }
.ci-all { padding: 12px 10px; color: var(--good); font-weight: 600; }
.ci-back { display: none; }
.ci-pick { padding: 40px 18px; }
.ci-card { padding: 18px; display: grid; gap: 18px; }
.ci-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ci-head-t { flex: 1; min-width: 0; }
.ci-head h2 { font-size: 24px; font-weight: 600; letter-spacing: -.3px; }
.ci-head h2 a { color: inherit; text-decoration: none; }
.ci-head h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ci-head-r { display: flex; gap: 8px; flex-wrap: wrap; }
.ci-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ci-panel { display: grid; gap: 8px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-width: 0; }
.ci-panel-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ci-panel h3, .ci-answers h3, .ci-reply h3 { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; }
.ci-big { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ci-viz { display: grid; gap: 4px; }
.kbars, .wspark { width: 100%; max-width: 360px; height: auto; display: block; overflow: visible; }
.kb-bar { fill: var(--s1); }
.kb-none { fill: var(--axis); }
.kb-target { stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 4 3; }
.kb-day { font-size: 12.5px; fill: var(--ink-3); text-anchor: middle; }
.ws-week { fill: var(--s1-soft); }
.ws-dot { fill: var(--axis); }
.ws-line { fill: none; stroke: var(--s1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ci-key { display: flex; gap: 12px; flex-wrap: wrap; }
.ci-key span { display: inline-flex; align-items: center; gap: 5px; }
.ci-key i { display: inline-block; }
.ci-key .k-bar { width: 8px; height: 10px; border-radius: 2px 2px 0 0; background: var(--s1); }
.ci-key .k-target { width: 14px; border-top: 1.5px dashed var(--ink-2); }
.ci-key .k-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--axis); }
.ci-key .k-line { width: 14px; height: 2px; border-radius: 1px; background: var(--s1); }
.ci-key .k-week { width: 12px; height: 10px; border-radius: 2px; background: var(--s1-soft); }
.ci-habits { display: grid; gap: 6px; }
.ci-habit { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; }
.ci-habit-n { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-habit-s { grid-column: 1 / -1; margin-top: -2px; }
.hb-week i.future { background: none; box-shadow: inset 0 0 0 1px var(--line-2); }
.ci-sess { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; padding: 3px 0; border-top: 1px solid var(--line); }
.ci-answers { display: grid; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.ci-answers p { font-size: 14px; max-width: 72ch; }
.ci-q { display: flex; align-items: center; gap: 10px; }
.ci-rating { font-size: 18px; letter-spacing: 1px; color: var(--warn-fill); }
.ci-rating .dim { color: var(--surface-3); }
.ci-moods { display: flex; gap: 8px; flex-wrap: wrap; }
.ci-mood { display: grid; justify-items: center; gap: 1px; min-width: 40px; padding: 6px 4px; border-radius: 8px; background: var(--surface-2); font-size: 18px; }
.ci-mood small { font-size: 12.5px; color: var(--ink-3); }
.ci-reply { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.ci-sent { padding: 10px 14px; border-radius: 8px; background: var(--good-soft); display: grid; gap: 4px; }
.ci-sent p { font-size: 14px; }
.ci-picks .chip { height: 30px; font-size: 12.5px; }
.ci-ta { min-height: 84px; font: inherit; font-size: 14px; }
.ci-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ci-actions-r { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.ci-list-note:empty { display: none; }
.ci-past { display: grid; gap: 8px; }
.ci-past .section-title { margin: 4px 0 0; }
.ci-past-r { padding: 8px 12px; border-left: 3px solid var(--line-2); display: grid; gap: 2px; }
.ci-past-r p { font-size: 14px; }
@media (max-width: 1180px) { .ci-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 960px) {
  .ci-layout { grid-template-columns: minmax(0, 1fr); }
  .ci-list { position: static; max-height: none; }
  .ci-layout.has-card .ci-list { display: none; }
  .ci-layout:not(.has-card) .ci-main { display: none; }
  .ci-back { display: inline-flex; }
  .ci-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ci-bar { gap: 10px; }
  .ci-week { width: 100%; justify-content: space-between; }
  .ci-week-t { flex: 1; min-width: 0; }
  .ci-prog { min-width: 0; flex-basis: 100%; }
  #ci-add { width: 100%; justify-content: center; }
  .ci-card { padding: 14px; }
  .ci-grid { grid-template-columns: minmax(0, 1fr); }
  .ci-head-r { flex-basis: 100%; }
  .ci-actions-r { width: 100%; }
  .ci-actions-r .btn-primary { flex: 1; justify-content: center; }
  .ci-picks { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
  .ci-picks::-webkit-scrollbar { display: none; }
  .ci-picks .chip { flex: none; }
}

/* ------------------------------------------------------------------ Classes → Live board (app-board.js) */
.bd-modes { margin: -4px 0 16px; }
.bd-modes .vtoggle { max-width: 100%; overflow-x: auto; }
.bd-modes .vt-link { white-space: nowrap; }
@media (max-width: 480px) { .bd-modes .vt-link svg { display: none; } }
.vtoggle .vt-link { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 4px; color: var(--ink-2); font-size: 13.5px; font-weight: 500; text-decoration: none; }
.vtoggle .vt-link[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, .06); }
.bd-run { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.bd-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: bd-blink 1.4s ease-in-out infinite; }
@keyframes bd-blink { 50% { opacity: .3; } }
.bd-empty { padding: 14px 6px; }
.bd-sessions { display: grid; gap: 18px; }
.bd-session + .bd-session { border-top: 1px solid var(--line); padding-top: 16px; }
.bd-s-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.bd-s-name { font-size: 18px; font-weight: 600; letter-spacing: -.2px; }
.bd-s-act { display: flex; gap: 6px; flex-wrap: wrap; }
.bd-count { margin: 12px 0 8px; font-size: 14px; color: var(--ink-2); }
.bd-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.bd-p { display: grid; grid-template-columns: 12px minmax(0, 1fr); column-gap: 8px; align-items: center; padding: 7px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.bd-p i { grid-row: span 2; width: 12px; height: 12px; border-radius: 4px; background: var(--z, #9ca3af); }
.bd-p b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-p small { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.bd-p.off { opacity: .65; } .bd-p.off i { background: repeating-linear-gradient(135deg, var(--ink-3) 0 2px, transparent 2px 4px); }
.bd-p.hidden i { background: none; border: 2px dashed var(--ink-3); }
.bd-classes .bd-class { padding: 10px 0; }
.bd-class.past { opacity: .5; }
.bd-time { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 52px; }
.bd-time small { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.bd-class .who-text { flex: 1; min-width: 0; }
.bd-class.now .bd-time { color: var(--good); }
.bd-own { display: flex; gap: 8px; margin-top: 14px; }
.bd-demo { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 16px; padding: 14px; border-radius: 8px; background: var(--accent-soft); }
.bd-demo .btn { flex: none; }
.bd-sec { font-size: 12.5px; font-weight: 500; color: var(--ink-3); margin: 16px 0 6px; }
.bd-res-h { font-size: 14px; margin-bottom: 12px; }
.bd-pod { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.bd-pod-p { position: relative; border-radius: 8px; padding: 12px; display: grid; gap: 2px; background: #d4d8de; color: #0b0b0b; overflow: hidden; }
.bd-pod-p.p1 { background: #ffe500; } .bd-pod-p.p3 { background: #d98a4b; }
.bd-pod-p b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-pod-p small { font-size: 12.5px; opacity: .75; }
.bd-pod-r { position: absolute; right: 10px; top: 6px; font-weight: 600; font-size: 24px; opacity: .3; }
.bd-pod-pts { font-size: 26px; font-weight: 600; letter-spacing: -1px; line-height: 1; font-variant-numeric: tabular-nums; }
.bd-pod-pts small { font-size: 13.5px; margin-left: 3px; letter-spacing: 0; }
.bd-mini { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; }
.bd-tv .bd-mini { margin-bottom: 14px; }
.bd-open { min-height: 50px; font-size: 15px; font-weight: 600; }
.bd-link { display: flex; gap: 14px; align-items: center; margin: 14px 0 6px; }
.bd-link-t { display: grid; gap: 6px; flex: 1; min-width: 0; justify-items: start; }
.bd-short { font-size: 15px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; word-break: break-all; }
.bd-qr { width: 120px; height: 120px; flex: none; background: #fff; border-radius: 8px; padding: 6px; }
.bd-steps { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.bd-steps b { color: var(--ink); }
kbd { font: 600 12.5px/1 var(--font-num); padding: 2px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; background: var(--surface-2); }

.bd-canvas { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-lg); }
/* the editor (board-editor.js): bar, layers | canvas | settings; a sheet from the bottom on a phone */
.bd-ed { display: grid; gap: 12px; }
.bd-ed-bar { display: flex; gap: 8px 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.bd-ed-namef { flex: 0 1 240px; min-width: 140px; }
.bd-ed-namef .inp { font-weight: 600; }
.bd-ed-state { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.bd-ed-state .ui-chip svg { margin-right: -1px; }
.bd-retry { cursor: pointer; text-decoration: underline; }
.bd-ed-bar-r { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bd-ed-bar-r .btn:disabled { opacity: .45; cursor: default; }
.bd-ed-work { display: grid; grid-template-columns: 200px minmax(0, 1fr) 312px; gap: 12px; align-items: start; }
.bd-ed-side, .bd-ed-panel { padding: 12px; position: sticky; top: calc(var(--top-h) + 12px); max-height: calc(100vh - var(--top-h) - 24px); overflow: auto; overscroll-behavior: contain; }
.bd-ed-side-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bd-ed-side h3, .bd-ed-panel h3 { font-size: 14px; font-weight: 600; }
.bd-ed-tpl { margin-top: 12px; }
.bd-lyr { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 3px; }
.bd-lyr-i { display: flex; align-items: center; gap: 2px; border-radius: 6px; border: 1px solid transparent; }
.bd-lyr-i:hover { background: var(--surface-2); }
.bd-lyr-i.sel { background: var(--accent-soft); border-color: var(--brand); }
.bd-lyr-pick { flex: 1; min-width: 0; min-height: 36px; display: flex; gap: 8px; align-items: center; text-align: left; padding: 4px 8px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; border-radius: 6px; }
.bd-lyr-pick svg { color: var(--ink-3); flex: none; }
.bd-lyr-pick span { display: grid; min-width: 0; }
.bd-lyr-pick b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-lyr-pick small { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bd-lyr-x { flex: none; width: 30px; height: 30px; color: var(--ink-3); }
.bd-lyr-x:hover { color: var(--bad); }
.bd-lyr-none { font-size: 13.5px; color: var(--ink-3); padding: 8px 2px; }
.bd-ed-mid { min-width: 0; display: grid; gap: 10px; }
.bd-ed-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.bd-ph-only { display: none; }
.bd-ed-hint { display: flex; gap: 6px; align-items: flex-start; margin: 0; }
.bd-ed-hint svg { flex: none; margin-top: 2px; }
.bd-ed-wrap { position: relative; isolation: isolate; }
.bd-ed-wrap .bd-canvas { overflow: visible; }
.bd-ed-wrap .bd-host { overflow: hidden; border-radius: 8px; }
.bd-host, .bd-ov { position: absolute; left: 0; top: 0; right: 0; bottom: 0; }
.bd-ov { touch-action: pan-y; }
.bd-ov.dragging { background-image: linear-gradient(to right, rgba(255, 229, 0, .14) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 229, 0, .14) 1px, transparent 1px); background-size: calc(100% / 48) calc(100% / 27); cursor: grabbing; }
.bd-box { position: absolute; border: 1px dashed rgba(255, 255, 255, .22); border-radius: 6px; cursor: pointer; outline: none; }
.bd-box:hover { border: 2px solid rgba(255, 229, 0, .75); background: rgba(255, 229, 0, .05); }
.bd-box:focus-visible { border: 3px solid #3987e5; }
.bd-box.sel { border: 2px solid #ffe500; box-shadow: 0 0 0 1px rgba(0, 0, 0, .8), 0 0 0 5px rgba(255, 229, 0, .25); z-index: 100 !important; cursor: grab; touch-action: none; }
.bd-box.sel:focus-visible { box-shadow: 0 0 0 2px #3987e5, 0 0 0 6px rgba(57, 135, 229, .35); }
.bd-tag { position: absolute; left: 4px; top: 4px; font: 800 11px/1 system-ui, sans-serif; background: #ffe500; color: #000; padding: 4px 6px; border-radius: 4px; opacity: 0; pointer-events: none; white-space: nowrap; }
.bd-box:hover .bd-tag { opacity: 1; }
.bd-h { position: absolute; width: 14px; height: 14px; background: #fff; border: 2px solid #000; border-radius: 50%; box-shadow: 0 0 0 2px #ffe500; touch-action: none; }
.bd-h::before { content: ""; position: absolute; left: -7px; top: -7px; right: -7px; bottom: -7px; } /* a 28px target */
.bd-h-nw { left: -8px; top: -8px; cursor: nwse-resize; } .bd-h-se { right: -8px; bottom: -8px; cursor: nwse-resize; }
.bd-h-ne { right: -8px; top: -8px; cursor: nesw-resize; } .bd-h-sw { left: -8px; bottom: -8px; cursor: nesw-resize; }
.bd-h-n { left: 50%; top: -8px; margin-left: -7px; cursor: ns-resize; } .bd-h-s { left: 50%; bottom: -8px; margin-left: -7px; cursor: ns-resize; }
.bd-h-e { right: -8px; top: 50%; margin-top: -7px; cursor: ew-resize; } .bd-h-w { left: -8px; top: 50%; margin-top: -7px; cursor: ew-resize; }
.bd-guide-l { position: absolute; z-index: 150; pointer-events: none; background: #ff3ea5; }
.bd-guide-l.v { top: 0; bottom: 0; width: 1px; margin-left: -.5px; }
.bd-guide-l.h { left: 0; right: 0; height: 1px; margin-top: -.5px; }
.bd-ov-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; color: #fff; text-align: center; z-index: 5; }
.bd-ov-empty b { font-size: 18px; } .bd-ov-empty small { color: #aaa; }
.bd-tb { position: absolute; z-index: 20; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 8px; background: #111; color: #fff; box-shadow: 0 8px 28px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .12); white-space: nowrap; }
.bd-tb-n { font-size: 12.5px; font-weight: 600; color: #ffe500; padding: 0 8px 0 6px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.bd-tb-b { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 34px; height: 34px; padding: 0 8px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.bd-tb-b:hover, .bd-tb-b:focus-visible { background: rgba(255, 255, 255, .14); outline: none; }
.bd-tb-b:focus-visible { box-shadow: 0 0 0 2px #3987e5; }
.bd-tb-b:disabled { opacity: .35; cursor: default; }
.bd-tb-b.del { color: #ff8a80; }
.bd-tb-b.del:hover { background: rgba(239, 68, 68, .22); color: #fff; }
.bd-pn-h { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.bd-pn-h > svg { color: var(--accent); margin-top: 2px; flex: none; }
.bd-pn-h > div { flex: 1; min-width: 0; }
.bd-pn-x { flex: none; margin: -4px -4px 0 0; }
.bd-pn-b { display: grid; gap: 4px; }
.bd-pn-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.bd-del { color: var(--bad); }
.bd-ed-panel input[type="range"] { width: 100%; accent-color: #b8a200; }
.bd-scrim { position: fixed; inset: 0; z-index: 44; background: rgba(0, 0, 0, .35); }
.bd-utoast { display: flex; align-items: center; gap: 14px; }
.bd-utoast-b { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 10px; border: 0; border-radius: 6px; background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 600; cursor: pointer; }
/* + Add: every piece with a picture */
dialog.bd-sheet { border: 0; padding: 0; border-radius: 8px; width: min(880px, calc(100vw - 32px)); max-height: min(86vh, 820px); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); overflow: auto; overscroll-behavior: contain; }
dialog.bd-sheet::backdrop { background: rgba(0, 0, 0, .45); }
.bd-sheet-h { position: sticky; top: 0; z-index: 2; display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 16px 18px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.bd-sheet-h h2 { font-size: 18px; font-weight: 600; }
.bd-addgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; padding: 14px 18px 18px; }
.bd-add-i { display: grid; gap: 6px; align-content: start; text-align: left; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit; font: inherit; cursor: pointer; }
.bd-add-i:hover, .bd-add-i:focus-visible { border-color: var(--ink-3); background: var(--surface-2); }
.bd-add-i:focus-visible { outline: 2px solid #3987e5; outline-offset: 2px; }
.bd-add-pv { position: relative; display: block; height: 96px; border-radius: 6px; background: #000; overflow: hidden; pointer-events: none; }
.bd-add-t { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bd-add-t svg { color: var(--accent); }
.bd-add-t b { font-size: 13.5px; }
.bd-add-i small { font-size: 12.5px; color: var(--ink-3); line-height: 1.35; }
/* Preview on TV */
dialog.bd-pvw { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: #000; }
dialog.bd-pvw::backdrop { background: #000; }
.bd-pvw-host { position: absolute; inset: 0 0 52px; overflow: hidden; }
.bd-pvw-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 52px; display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 0 14px; color: #ddd; font-size: 13px; background: #111; }
.bd-pvw-bar span { display: inline-flex; gap: 6px; align-items: center; }
.bd-under { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.bd-ppl button { min-width: 38px; justify-content: center; height: 28px; }
.bd-pos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.bd-pos label { display: grid; gap: 3px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.bd-pos .inp { height: 34px; padding: 0 6px; font-variant-numeric: tabular-nums; }
.bd-fields { gap: 10px; }
.bd-fields .field small { font-size: 12.5px; line-height: 1.35; }
.bd-imgrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bd-thumb { width: 64px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); flex: none; }
.bd-thumb.dark { background: #000; object-fit: contain; padding: 3px; }
.bd-file { cursor: pointer; }
.bd-file.busy { pointer-events: none; opacity: .6; }
.bd-file.busy::after { content: "Uploading…"; }
.bd-guide { display: flex; gap: 6px; align-items: flex-start; background: var(--s1-soft); border-radius: 6px; padding: 8px 10px; }
.bd-guide svg { margin-top: 2px; color: var(--s1); }
.bd-slide { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.bd-slide .inp { height: 34px; }
.bd-slide-b { display: flex; }
.bd-slides { gap: 8px; }
.bd-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.bd-col { display: flex; gap: 8px; align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 6px; }
.bd-col input[type="color"] { width: 34px; height: 34px; border: 0; padding: 0; background: none; border-radius: 6px; cursor: pointer; flex: none; }
.bd-col span { display: grid; gap: 2px; min-width: 0; }
.bd-col b { font-size: 12.5px; }
.bd-hex { height: 26px !important; padding: 0 6px !important; font: 12.5px var(--font-num); }
.bd-seg { width: 100%; margin-bottom: 8px; }
.bd-seg button { flex: 1; justify-content: center; font-size: 13.5px; padding: 0 6px; }
.bd-zones { display: grid; gap: 6px; }
.bd-zone { display: flex; gap: 8px; align-items: center; }
.bd-zone i { width: 16px; height: 16px; border-radius: 4px; flex: none; }
.bd-zone .inp { height: 34px; }
.bd-reset { display: grid; gap: 6px; justify-items: start; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.bd-tpls { display: grid; gap: 12px; }
.bd-tpl { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.bd-tpl-pv { position: relative; width: 200px; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; }
/* Designs */
.bd-dz { display: grid; gap: 14px; }
.bd-dz-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.bd-dz-head h2 { font-size: 18px; font-weight: 600; }
.bd-dz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.bd-dz-card { overflow: hidden; display: grid; }
.bd-dz-card.live { border-color: var(--good); box-shadow: 0 0 0 1px var(--good); }
.bd-dz-pv { display: block; position: relative; aspect-ratio: 16 / 9; background: #000; }
.bd-dz-pv:focus-visible { outline: 3px solid #3987e5; outline-offset: -3px; }
.bd-dz-host { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.bd-dz-body { padding: 12px 14px 14px; display: grid; gap: 10px; }
.bd-dz-t { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.bd-dz-t h3 { font-size: 15px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-dz-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bd-dz-acts .icon-btn { margin-left: auto; }
.bd-dz-empty { padding: 28px 18px; display: grid; gap: 8px; justify-items: center; text-align: center; }
.bd-dz-foot { margin: 0; }
/* TV setup */
.bd-tvp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.bd-tvp h3 { display: flex; gap: 6px; align-items: center; }
.bd-link-b { display: flex; gap: 6px; flex-wrap: wrap; }
.bd-tvn-d { margin: 10px 0 0; }
.bd-run-tv { margin: 10px 0 0; } .bd-run-tv .bd-short { font-size: 13.5px; padding: 2px 6px; }
/* the first-time helper */
.bd-help { margin-bottom: 14px; border-color: var(--brand); background: linear-gradient(0deg, var(--accent-soft), var(--accent-soft)), var(--surface); }
.bd-help-in { position: relative; display: grid; grid-template-columns: minmax(180px, .7fr) minmax(0, 2fr); gap: 12px 20px; align-items: center; padding: 14px 44px 14px 16px; }
.bd-help-t h2 { font-size: 15px; font-weight: 600; }
.bd-help-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bd-help-steps li { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; padding: 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.bd-help-steps li.done { opacity: .65; }
.bd-help-steps li.now { border-color: var(--ink-3); }
.bd-help-steps li > span:nth-child(2) { display: grid; flex: 1; min-width: 120px; }
.bd-help-steps b { font-size: 13.5px; } .bd-help-steps small { font-size: 12.5px; color: var(--ink-3); line-height: 1.35; }
.bd-help-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; background: var(--surface-3); }
.bd-help-steps li.done .bd-help-n { background: var(--good); color: #fff; }
.bd-help-steps li.now .bd-help-n { background: var(--brand); color: var(--brand-ink); }
.bd-help-x { position: absolute; right: 8px; top: 8px; }
/* the timer: the remote (Run a class and the Timer page), the builder, saved timers */
.bd-remote { display: grid; gap: 12px; }
.bd-rd { position: relative; display: grid; justify-items: center; gap: 2px; padding: 16px 14px 18px; border-radius: 16px; background: #0b0b0b; color: #fff; text-align: center; overflow: hidden; transition: background-color .3s, color .3s; }
.bd-rd[data-type="work"] { background: var(--brand); color: #0b0b0b; }
.bd-rd[data-type="rest"] { background: #38bdf8; color: #0b0b0b; }
.bd-rd[data-type="setrest"] { background: #a78bfa; color: #0b0b0b; }
.bd-rd[data-type="prep"], .bd-rd[data-type="paused"] { background: #27272a; color: #fff; }
.bd-rd[data-type="done"] { background: #22c55e; color: #0b0b0b; }
.bd-rd-ph { font-size: 12px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; opacity: .85; }
.bd-rd-t { font-size: 46px; font-weight: 900; letter-spacing: -1.5px; line-height: 1.02; font-variant-numeric: tabular-nums; }
.bd-rd-r { font-size: 13px; font-weight: 750; opacity: .8; }
.bd-rd-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(0, 0, 0, .18); }
.bd-rd-bar i { display: block; height: 100%; background: currentColor; opacity: .7; transform-origin: 0 50%; transform: scaleX(0); transition: transform .25s linear; }
.bd-rbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.bd-rbtns .btn { flex: 1; min-height: 46px; justify-content: center; font-size: 15px; font-weight: 600; }
.bd-remote.big .bd-rd { padding: 26px 16px 30px; border-radius: 8px; }
.bd-remote.big .bd-rd-ph { font-size: 15px; }
.bd-remote.big .bd-rd-t { font-size: clamp(64px, 16vw, 112px); letter-spacing: -3px; }
.bd-remote.big .bd-rd-r { font-size: 15px; }
.bd-remote.big .bd-rbtns .btn { min-height: 60px; font-size: 18px; border-radius: 6px; }
.bd-next { margin-top: 10px; }
.bd-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.bd-chip { display: grid; gap: 1px; text-align: left; padding: 9px 11px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.bd-chip:hover { border-color: var(--ink-3); background: var(--surface-2); }
.bd-chip b { font-size: 14px; } .bd-chip small { font-size: 12.5px; color: var(--ink-3); line-height: 1.3; }
.bd-tpage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.bd-tremote { position: sticky; top: calc(var(--top-h) + 12px); order: 2; }
.bd-tpage > .stack { order: 1; }
.bd-builder { display: grid; gap: 12px; }
.bd-kinds button { font-weight: 600; }
.bd-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.bd-stepper { display: flex; align-items: center; gap: 4px; }
.bd-stepper .inp { text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; min-width: 0; }
.bd-stepper .icon-btn { flex: none; width: 36px; height: 36px; font-size: 18px; font-weight: 600; border: 1px solid var(--line); border-radius: 6px; }
.bd-strip { display: flex; height: 14px; border-radius: 99px; overflow: hidden; gap: 1px; background: var(--surface-2); }
.bd-strip i { display: block; min-width: 1px; }
.bd-strip i.work { background: var(--brand); } .bd-strip i.rest { background: #38bdf8; } .bd-strip i.setrest { background: #a78bfa; } .bd-strip i.prep { background: var(--ink-3); }
.bd-sum { font-size: 14px; color: var(--ink-2); margin: 0; }
.bd-tb-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bd-trow.on { background: var(--accent-soft); border-radius: 8px; }
.bd-wod-act { display: flex; gap: 4px; align-items: center; flex: none; }
.bd-wod-row .who-text { flex: 1; min-width: 0; }
.bd-wod-pv { margin-top: 12px; }
.bd-wpick { display: grid; gap: 6px; max-height: 320px; overflow: auto; }
.bd-wopt { display: flex; gap: 10px; align-items: center; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.bd-wopt:has(input:checked) { border-color: var(--ink); background: var(--accent-soft); }
.bd-wopt span { display: grid; min-width: 0; } .bd-wopt b { font-size: 14px; } .bd-wopt small { font-size: 12.5px; color: var(--ink-3); }
.bd-wodf { display: grid; gap: 12px; }
.bd-demo-link { margin-top: 14px; white-space: normal; text-align: center; min-height: 44px; }
/* the designer: preview moments, between classes */
.bd-scenes button { gap: 5px; font-size: 13.5px; }
.bd-blurb { margin: -2px 0 8px; }
.bd-panels { display: grid; gap: 6px; }
.bd-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 6px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.bd-panel.on { border-color: var(--line-2); background: var(--surface-2); }
.bd-panel .check span { display: inline-flex; gap: 6px; align-items: center; }
.bd-panel .check svg { color: var(--accent); }
.bd-panel small { grid-column: 1 / -1; font-size: 12.5px; line-height: 1.35; }
.bd-panel-b { display: flex; }
.bd-rule { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.bd-pts { display: flex; gap: 6px; align-items: center; } .bd-pts small { color: var(--ink-3); }
@media (max-width: 1240px) {
  .bd-ed-work { grid-template-columns: 180px minmax(0, 1fr) 280px; }
  .bd-ed-bar-r .btn span { display: none; }
  .bd-ed-bar-r #bd-pub span, .bd-ed-bar-r #bd-preview span { display: inline; }
}
/* A phone or a small tablet: the canvas full width, layers and settings in a sheet from the bottom. */
@media (max-width: 899px) {
  .bd-ed-work { grid-template-columns: minmax(0, 1fr); }
  .bd-ed-side { display: none; }
  .bd-ph-only { display: inline-flex; }
  .bd-dt-only { display: none; }
  .bd-ed-tools .btn { flex: 1; justify-content: center; min-height: 40px; }
  .bd-ed-bar { padding: 8px; }
  .bd-ed-namef { flex: 1 1 140px; }
  .bd-ed-bar-r { margin-left: 0; width: 100%; }
  .bd-ed-bar-r .btn { min-height: 38px; }
  .bd-ed-bar-r #bd-pub { flex: 1; justify-content: center; }
  .bd-ed-bar-r #bd-preview span { display: none; }
  .bd-ed-panel { display: none; position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; top: auto; max-height: 68vh; border-radius: 8px 8px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow: 0 -12px 40px rgba(0, 0, 0, .3); }
  .bd-ed-panel.open { display: block; animation: bd-up .22s ease-out; }
  .bd-ed-panel.open::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 0 auto 10px; }
  .bd-ed-panel .bd-pn-h { position: sticky; top: -8px; background: var(--surface); padding-top: 4px; z-index: 1; }
  .bd-ed-hint { display: none; }
  .bd-tb { padding: 3px; }
  .bd-tb-n { display: none; }
  .bd-tb-b { min-width: 38px; height: 38px; }
  .bd-under .small { display: none; }
  .bd-scenes button span { display: none; }
  .bd-tvp { grid-template-columns: minmax(0, 1fr); }
  .bd-help-in { grid-template-columns: minmax(0, 1fr); padding-right: 40px; }
  .bd-help-steps { grid-template-columns: minmax(0, 1fr); }
  dialog.bd-sheet { width: 100vw; max-width: 100vw; max-height: 86vh; margin: auto 0 0; border-radius: 8px 8px 0 0; }
  .bd-addgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; }
  .bd-add-pv { height: 72px; }
  .bd-add-i small { display: none; }
}
@keyframes bd-up { from { transform: translateY(40px); opacity: .4; } }
@media (max-width: 960px) {
  .bd-run { grid-template-columns: minmax(0, 1fr); }
  .bd-tpage { grid-template-columns: minmax(0, 1fr); }
  .bd-tremote { position: static; order: 0; }
}
@media (max-width: 760px) {
  .bd-demo { flex-direction: column; align-items: stretch; }
  .bd-link { flex-direction: column; align-items: stretch; }
  .bd-qr { align-self: center; }
  .bd-pod-pts { font-size: 24px; }
  .bd-tpl { grid-template-columns: 120px minmax(0, 1fr); }
  .bd-tpl-pv { width: 120px; }
  .bd-tpl .btn { grid-column: 1 / -1; }
  .vtoggle .vt-link { padding: 0 10px; font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) { .bd-dot, .btn-pulse, .bd-ed-panel.open { animation: none; } }

/* ---------------------------------------------- problem reports and ideas (app-feedback.js) */
.who-pop .who-report { margin-top: 12px; justify-self: stretch; height: auto; min-height: 34px; padding-top: 6px; padding-bottom: 6px; white-space: normal; text-align: left; line-height: 1.3; }
.who-pop .who-report + .btn { margin-top: 6px; }
dialog.dlg.dlg-wide { width: min(560px, calc(100vw - 24px)); }
.fb-dlg .vtoggle { justify-self: start; }
.fb-dlg textarea { min-height: 120px; }
.fb-shots { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fb-add { cursor: pointer; }
.fb-thumb { position: relative; margin: 0; width: 88px; }
.fb-thumb img { display: block; width: 88px; height: 88px; object-fit: cover; object-position: top; border-radius: 6px; border: 1px solid var(--line); }
.fb-thumb figcaption { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.fb-thumb .icon-btn { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; min-height: 0; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-2); }
.fb-diag { font-size: 13.5px; }
.fb-diag summary { cursor: pointer; color: var(--ink-2); font-weight: 600; }
.fb-diag ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); display: grid; gap: 2px; }
.fb-diag b { font-weight: 600; color: var(--ink); }
.fb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 10px; }
.fb-bar #fb-new { margin-left: auto; }
.fb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-chips .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.fb-intro { margin: 0 0 14px; max-width: 70ch; }
.fb-card { padding: 14px 18px 16px; margin-bottom: 12px; display: grid; gap: 10px; }
.fb-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fb-who { display: grid; flex: 1; min-width: 160px; line-height: 1.3; }
.fb-who b { font-size: 14px; }
.fb-status { width: auto; height: 34px; }
.fb-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.5; }
.fb-files { display: flex; flex-wrap: wrap; gap: 10px; }
.fb-file { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13.5px; }
.fb-file img { display: block; max-width: 160px; max-height: 220px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); }
.fb-merged { display: grid; gap: 4px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); }
.fb-merged > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; }
.fb-reply { padding: 10px 12px; border-radius: 8px; background: var(--surface-2); border-left: 3px solid var(--brand); }
.fb-reply p { margin-top: 2px; white-space: pre-wrap; }
.fb-more { display: grid; gap: 10px; }
.fb-more > summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.fb-more[open] > summary { margin-bottom: 6px; }
.fb-more[open] { display: grid; gap: 10px; }
.fb-diag-list { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 13.5px; margin: 4px 0 0; }
.fb-diag-list dt { color: var(--ink-3); font-weight: 600; }
.fb-diag-list dd { margin: 0; overflow-wrap: anywhere; }
.fb-errors { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 12.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .fb-bar #fb-new { margin-left: 0; }
  .fb-card { padding: 12px 14px 14px; }
  .fb-file img { max-width: 120px; }
  .fb-diag-list { grid-template-columns: 1fr; gap: 0; }
  .fb-diag-list dd { margin-bottom: 6px; }
}

/* ------------------------------------------------------------ Members → At risk (at-risk.js) */
.rk-cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.rk-side { display: grid; gap: 16px; position: sticky; top: calc(var(--top-h) + 16px); }
.rk-chips { margin-bottom: 12px; }
.rk-list { display: grid; gap: 10px; }
.rk-note { margin: -4px 0 10px; }
.rk-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px 12px; display: grid; gap: 8px; border-left: 4px solid var(--line-2); }
.rk-card.high { border-left-color: var(--bad-fill); }
.rk-card.medium { border-left-color: var(--warn-fill); }
.rk-card.watch { border-left-color: var(--s1); }
.rk-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rk-top .who { min-width: 0; }
.rk-badges { display: flex; gap: 6px; align-items: center; flex: none; }
.rk-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.rk-chip b { font-variant-numeric: tabular-nums; font-weight: 600; padding-left: 5px; margin-left: 1px; border-left: 1px solid currentColor; opacity: .85; }
.rk-chip.high { background: var(--bad-soft); color: var(--bad); }
.rk-chip.medium { background: var(--warn-soft); color: var(--warn); }
.rk-chip.watch { background: var(--s1-soft); color: var(--s1); }
.chip.rk-f-high[aria-pressed="false"] .n { color: var(--bad); opacity: 1; }
.chip.rk-f-medium[aria-pressed="false"] .n { color: var(--warn); opacity: 1; }
.chip.rk-f-watch[aria-pressed="false"] .n { color: var(--s1); opacity: 1; }
.rk-why { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; }
.rk-head { display: block; font-weight: 600; font-size: 15px; line-height: 1.35; }
.rk-reasons { margin: 4px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }
.rk-why:hover .rk-head { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.rk-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rk-spark { display: inline-flex; align-items: center; gap: 8px; }
.rk-mini { width: 104px; height: 30px; flex: none; overflow: visible; }
.rk-mini rect { fill: var(--s1); opacity: .9; }
.rk-mini rect.now { opacity: .5; }
.rk-mini rect.zero { fill: var(--surface-3); opacity: 1; }
.rk-mini .usual { stroke: var(--ink-3); stroke-width: 1.2; stroke-dasharray: 3 3; }
.rk-status { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); min-width: 0; }
.rk-acts { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 2px; }
.rk-noapp { font-size: 12.5px; font-weight: 500; opacity: .65; }
.rk-month .rk-kvs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rk-month .kv { padding: 10px 12px; }
.rk-month .kv-v { font-size: 26px; }
.rk-month .kv-d { line-height: 1.3; margin-top: 2px; }
.rk-saved { display: flex; flex-wrap: wrap; gap: 6px; }
.rk-how summary { list-style: none; cursor: pointer; padding-bottom: 14px; }
.rk-how summary::-webkit-details-marker { display: none; }
.rk-how[open] summary svg:last-child { transform: rotate(90deg); }
.rk-how .card-body { padding-top: 0; display: grid; gap: 10px; }
.rk-weights { width: 100%; border-collapse: collapse; }
.rk-weights td { padding: 4px 0; border-bottom: 1px solid var(--line); }
.rk-weights .r { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 10px; }
.rk-detail-head { font-weight: 600; font-size: 15px; line-height: 1.35; }
.rk-detail .d-stat b { font-size: 15px; }
.rk-bar { fill: var(--s1); }
.rk-bar.now { opacity: .55; }
.rk-usual { stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart text.rk-usual-l { fill: var(--ink-2); font-weight: 600; }
.rk-signals { display: grid; gap: 12px; }
.rk-sig { display: grid; gap: 4px; }
.rk-sig-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.rk-pts { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-3); white-space: nowrap; }
.rk-pts small { font-weight: 600; color: var(--ink-3); }
.rk-pts.up { color: var(--ink); }
.rk-pts.down { color: var(--good); }
.rk-sig-bar i { display: block; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.rk-sig-bar b { display: block; height: 100%; border-radius: 3px; background: var(--ink-2); }
.rk-history .row { align-items: flex-start; }
.rk-open-member { justify-self: start; }
.rk-nudge .rk-phone { background: linear-gradient(160deg, #26324a, #10141c); border-radius: 18px; padding: 18px 12px; }
.rk-notif { display: grid; gap: 2px; background: rgba(255, 255, 255, .9); color: #111; border-radius: 14px; padding: 10px 12px; font-size: 13.5px; line-height: 1.35; box-shadow: 0 4px 18px rgba(0, 0, 0, .3); }
.rk-notif b { font-size: 14px; }
.rk-notif-app { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #555; text-transform: uppercase; letter-spacing: .4px; font-weight: 700; }
.rk-nudge small.over { color: var(--bad); font-weight: 600; }
.banner.bad { background: var(--bad-soft); border-color: rgba(208, 59, 59, .35); }
@media (max-width: 1100px) {
  .rk-cols { grid-template-columns: minmax(0, 1fr); }
  .rk-side { position: static; order: -1; }
  .rk-how { display: none; }
}
@media (max-width: 760px) {
  .rk-card { padding: 12px 12px 10px; }
  .rk-top { align-items: flex-start; }
  .rk-badges { flex-direction: column; align-items: flex-end; gap: 4px; }
  .rk-acts .btn { flex: 1 1 calc(50% - 6px); justify-content: center; }
  .rk-month .kv-v { font-size: 24px; }
  .rk-month .kv-d { font-size: 12.5px; }
  .rk-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .rk-chips .chip { flex: none; }
  .rk-detail .d-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* On a phone the month is three numbers above the list; the chart and the rest wait for a bigger screen. */
  .rk-month .rk-trend-box, .rk-month .rk-outcomes, .rk-month .kv-d.muted { display: none; }
  .rk-month .card-body { padding-bottom: 12px; }
}

/* ------------------------------------------------------------ Inbox (inbox.js): every member's messages in one list,
   My clients and coach assignment. Channel colours are labels, never the only signal: each badge says its channel. */
/* The page kit's head (ui-kit.js pageHead) with the Inbox's own pages as a slim tab strip on its right. */
.ib-head .ui-page-head { align-items: flex-end; }
.ib-head .ui-sub { font-size: 14px; margin-top: 4px; }
.ib-headline { color: var(--ink) !important; font-weight: 600 !important; }
.ib-extra { font-size: 14px; margin-left: 4px; }
.ib-tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.ib-tabs a { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border-radius: 6px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.ib-tabs a svg { color: var(--ink-3); }
.ib-tabs a:hover { background: var(--surface-2); color: var(--ink); }
.ib-tabs a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.ib-tabs a[aria-current="page"] svg { color: var(--ink); }
#mount > .ib-head + * { margin-top: 16px; }

/* Two panes at the page's full width: the list (whose, search, Waiting · All · Done) and the conversation. They fill
   the window below the head, each scrolling on its own. */
.ib-cols { display: grid; grid-template-columns: minmax(340px, 460px) minmax(0, 1fr); gap: 16px; align-items: stretch; height: max(520px, calc(100dvh - var(--ib-top, 240px) - 20px)); }
.ib-list { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.ib-list-head { display: grid; gap: 10px; padding: 12px 12px 10px; border-bottom: 1px solid var(--line); }
.ib-bar1, .ib-bar2 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ib-bar2 { justify-content: flex-end; flex-wrap: wrap; }
.ib-bar2 > .ib-seg, .ib-bar2 > .ib-searching { margin-right: auto; }
.ib-picks { display: flex; gap: 6px; margin-left: auto; }
.ib-sort { max-width: 124px; }
.ib-whose { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; max-width: 55%; padding: 0 10px 0 12px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ib-whose > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ib-whose:hover:not(:disabled) { border-color: var(--ink-3); }
.ib-whose:disabled { cursor: default; color: var(--ink-2); }
.ib-whose svg { flex: none; color: var(--ink-3); }
.ib-whose-n { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; font-weight: 600; display: inline-grid; place-items: center; }
.ib-q { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); color: var(--ink-3); }
.ib-q:focus-within { border-color: var(--ink-3); }
.ib-q input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); }
.ib-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 6px; background: var(--surface-2); }
.ib-seg button { border: 0; background: none; height: 30px; padding: 0 12px; border-radius: 6px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-3); cursor: pointer; white-space: nowrap; }
.ib-seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--line); }
.ib-searching { padding: 8px 2px; }
.ib-chan { flex: none; height: 30px; max-width: 132px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 600; padding: 0 8px; cursor: pointer; }
.ib-rows { flex: 1; min-height: 0; overflow-y: auto; }
.ib-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; border-top: 1px solid var(--line); }
.ib-row:first-child { border-top: 0; }
.ib-row:hover { background: var(--surface-2); }
.ib-row.on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--ink); }
.ib-row-open { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; width: 100%; text-align: left; padding: 11px 4px 11px 12px; border: 0; background: none; cursor: pointer; color: inherit; font: inherit; min-width: 0; }
.ib-row-more { width: 32px; height: 32px; margin: 8px 6px 0 0; color: var(--ink-3); opacity: .55; }
.ib-row:hover .ib-row-more, .ib-row-more:focus-visible, .ib-row-more[aria-expanded="true"], .ib-row.on .ib-row-more { opacity: 1; }
.ib-row-main { display: grid; gap: 4px; min-width: 0; }
.ib-row-top, .ib-row-mid, .ib-row-bot { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ib-row-bot { flex-wrap: wrap; gap: 4px; }
.ib-row-bot .ui-chip { height: 20px; font-size: 12.5px; padding: 0 7px; }
.ib-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-row.unread .ib-name { font-weight: 600; }
.ib-time { margin-left: auto; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; flex: none; }
.ib-row.unread .ib-time { color: var(--ink); font-weight: 600; }
.ib-prev { font-size: 13.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.ib-row.unread .ib-prev { color: var(--ink-2); }
.ib-unread { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #e8442f; color: #fff; font-size: 12.5px; font-weight: 600; display: grid; place-items: center; }
.ib-empty { padding: 40px 22px; }
.ib-more-n { padding: 10px 14px; border-top: 1px solid var(--line); }
.ib-list-foot { display: grid; gap: 2px; padding: 8px 12px 10px; border-top: 1px solid var(--line); }
.ib-note-line { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; color: var(--ink-3); }
.ib-note-line svg { flex: none; }
.ib-note-line.warn, .ib-why { color: var(--warn); }
.ib-why { display: flex; align-items: center; gap: 6px; padding: 6px 12px; margin: 0; }

/* The menus (a row's ⋯, the thread's ⋯, the whose picker): one floating card, a second step in its place. */
.ib-pop { position: fixed; z-index: 60; min-width: 240px; max-width: min(340px, calc(100vw - 16px)); max-height: min(70vh, 520px); overflow-y: auto; padding: 6px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(0, 0, 0, .16), 0 2px 6px rgba(0, 0, 0, .06); }
.ib-pop hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.ib-pop-h { padding: 6px 10px 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-pop-i, .ib-pop-back { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; text-align: left; cursor: pointer; }
.ib-pop-i:hover, .ib-pop-i:focus-visible, .ib-pop-back:hover { background: var(--surface-2); outline: 0; }
.ib-pop-i svg { flex: none; color: var(--ink-3); }
.ib-pop-i[aria-checked="true"] { background: var(--accent-soft); }
.ib-pop-i[aria-checked="true"] > svg:last-child { color: var(--ink); }
.ib-pop-i.danger, .ib-pop-i.danger svg { color: var(--bad); }
.ib-pop-sp { width: 15px; flex: none; }
.ib-pop-t { display: grid; gap: 1px; flex: 1; min-width: 0; }
.ib-pop-t small { font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.ib-pop-back { color: var(--ink-3); font-size: 12.5px; font-weight: 600; border-bottom: 1px solid var(--line); border-radius: 6px 6px 0 0; margin-bottom: 4px; }

.ib-ch { display: inline-flex; align-items: center; gap: 3px; flex: none; height: 18px; padding: 0 5px; border-radius: 6px; font-size: 12.5px; font-weight: 600; letter-spacing: .2px; background: var(--surface-3); color: var(--ink-2); }
.ib-ch svg { width: 11px; height: 11px; }
.ib-ch.ch-app { background: var(--accent-soft); color: var(--accent); }
.ib-ch.ch-sms { background: var(--s1-soft); color: var(--s1); }
.ib-ch.ch-whatsapp { background: var(--good-soft); color: var(--good); }
.ib-ch.ch-email { background: var(--surface-3); color: var(--ink-2); }
.ib-ch.ch-facebook, .ib-ch.ch-instagram { background: rgba(140, 80, 210, .12); color: #7a3fc2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ib-ch.ch-facebook, :root:not([data-theme="light"]) .ib-ch.ch-instagram { color: #c7a0f5; } }
:root[data-theme="dark"] .ib-ch.ch-facebook, :root[data-theme="dark"] .ib-ch.ch-instagram { color: #c7a0f5; }
.ib-pane { min-height: 0; padding: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; overflow: hidden; }
.ib-pick { display: grid; justify-items: center; gap: 6px; align-self: center; padding: 60px 20px; grid-row: 1 / -1; }
.ib-pick svg { width: 30px; height: 30px; color: var(--ink-3); }
.ib-th-head { display: grid; gap: 8px; padding: 12px 14px 12px 16px; border-bottom: 1px solid var(--line); }
.ib-th-who { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-width: 0; }
.ib-th-id { min-width: 0; flex: 1; }
.ib-th-name { display: block; max-width: 100%; border: 0; background: none; padding: 0; font: inherit; font-size: 18px; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-th-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.ib-th-state { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-3); }
.ib-wait { color: var(--ink); font-weight: 600; }
.ib-wait.over { color: var(--warn); }
.ib-nocoach { color: var(--warn); font-weight: 600; }
.ib-th-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ib-th-bar.compact { margin-bottom: 8px; }
.ib-th-acts { display: flex; gap: 6px; align-items: center; flex: none; }
.ib-more { width: 34px; height: 34px; color: var(--ink-2); }
.ib-coach { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); flex-wrap: wrap; }
.ib-coach .select { height: 30px; font-size: 13.5px; border-radius: 6px; }
.ib-back { justify-self: start; margin: -2px 0 0 -8px; }
.ib-thread { max-height: none; height: auto; min-height: 0; overflow-y: auto; padding: 12px 14px; align-content: start; gap: 8px; }
#d-msgs .ib-thread { height: auto; max-height: 380px; padding: 6px 2px; }
.ib-thread .bubble { max-width: min(80%, 620px); }
.bubble.out.ch-sms, .bubble.out.ch-whatsapp, .bubble.out.ch-email, .bubble.out.ch-facebook, .bubble.out.ch-instagram, .bubble.out.ch-webchat { background: #1f5fae; }
.bubble.in.ch-app { box-shadow: inset 3px 0 0 var(--brand); }
.ib-note { justify-self: center; width: min(90%, 560px); padding: 8px 12px; border-radius: 8px; background: var(--accent-soft); border: 1px dashed var(--accent); font-size: 13.5px; white-space: pre-wrap; }
.ib-note-h { display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--accent); margin-bottom: 2px; }
.ib-note small { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.ib-note-x { margin-left: auto; border: 0; background: none; color: inherit; cursor: pointer; padding: 2px; border-radius: 4px; }
.ib-none { padding: 20px; text-align: center; }
.ib-ghl-note { display: flex; align-items: center; gap: 6px; padding: 4px 16px; margin: 0; }
.ib-compose { display: grid; gap: 8px; padding: 10px 14px 14px; border-top: 1px solid var(--line); background: var(--surface); }
#d-msgs .ib-compose { padding: 10px 0 0; background: none; }
.ib-modes { display: inline-flex; gap: 2px; padding: 2px; border-radius: 6px; background: var(--surface-2); justify-self: start; }
.ib-modes button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 5px 10px; border-radius: 6px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-3); cursor: pointer; }
.ib-modes button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.ib-chans, .ib-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.ib-chan { height: 30px; padding: 0 10px 0 6px; }
.ib-chan[aria-pressed="true"] .ib-ch { background: rgba(255, 255, 255, .2); color: inherit; }
.ib-quick .chip { height: 28px; font-size: 12.5px; }
.ib-send-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ib-why.small { padding: 0; }
.ib-clients { display: grid; }
.ib-client { display: grid; grid-template-columns: minmax(180px, 1.2fr) auto minmax(0, 2fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.ib-client:first-child { border-top: 0; }
.ib-client.pick { grid-template-columns: 22px minmax(180px, 1.2fr) auto minmax(0, 2fr) auto; }
.ib-client-pills, .ib-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.ib-chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.ib-chip svg { width: 11px; height: 11px; }
.ib-chip.off { color: var(--ink-3); background: none; border: 1px dashed var(--line-2); }
.ib-chip.hot, .ib-hot { color: #c2341f; font-weight: 600; }
.ib-chip.hot { background: rgba(232, 68, 47, .12); }
.ib-check { width: 18px; height: 18px; accent-color: var(--ink); }
.ib-tasks { margin-bottom: 16px; border-color: var(--warn-soft); box-shadow: inset 3px 0 0 var(--warn-fill), var(--shadow); }
.ib-mine { display: grid; gap: 10px; }
.ib-hours { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ib-hours .inp { width: auto; height: 34px; }
.ib-two { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.ib-load { display: grid; gap: 4px; }
.ib-load-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(80px, 1.3fr) 130px auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.ib-load-row:first-child { border-top: 0; }
.ib-bar { position: relative; height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.ib-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: var(--s1); }
.ib-bar i.k { background: var(--s2); }
.ib-load-n { display: grid; gap: 1px; }
.ib-load-n b { font-size: 18px; font-weight: 600; }
.ib-load-acts { display: flex; gap: 6px; align-items: center; }
.ib-helpers { display: grid; gap: 14px; }
.ib-helpers p { margin: 2px 0 6px; }
.ib-bulk { position: sticky; top: calc(var(--top-h) + 4px); z-index: 2; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 10px; margin-bottom: 8px; border-radius: 8px; background: var(--surface-2); }
.ib-bulk .select { height: 32px; }
.ib-rules { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: 860px; }
.ib-rules .inp, .ib-rules .ta, .ib-rules .select { max-width: 100%; min-width: 0; }
.ib-preview { padding: 10px 12px; border-radius: 8px; background: var(--surface-2); }
.ib-tpl { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 8px; }
.ib-save { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ib-save .btn-ghost { white-space: normal; text-align: left; height: auto; min-height: 30px; }
@media (max-width: 1100px) {
  .ib-cols { grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); }
  .ib-client, .ib-client.pick { grid-template-columns: minmax(0, 1fr) auto; }
  .ib-client.pick { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .ib-client .ib-chips { grid-column: 1 / -1; }
  .ib-client.pick .ib-chips { grid-column: 2 / -1; }
  .ib-client-acts { grid-column: -2; grid-row: 1; }
  .ib-client-pills { grid-column: 1 / -1; }
  .ib-client.pick .ib-client-pills { grid-column: 2 / -1; }
  .ib-two { grid-template-columns: minmax(0, 1fr); }
}
/* Photos, videos and voice notes; scheduled messages; "Seen"; the composer's tools (inbox-media.js). */
.bubble .ib-text { display: block; }
.ib-media { display: grid; gap: 6px; margin: 2px 0 4px; }
.ib-img { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 8px; overflow: hidden; max-width: 260px; }
.ib-img img { display: block; width: 100%; max-height: 300px; object-fit: cover; background: var(--surface-3); }
.ib-video { display: block; width: min(320px, 100%); max-height: 320px; border-radius: 8px; background: #000; }
.ib-audio { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ib-audio audio { width: min(260px, 60vw); height: 36px; }
.ib-audio small { margin: 0; }
.bubble.imported { opacity: .9; border: 1px dashed var(--line-2); }
.bubble.out.imported { background: var(--surface-3); color: var(--ink); }
.ib-seen { justify-self: end; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-3); margin-top: -4px; }
.ib-sched { justify-self: end; width: min(82%, 560px); display: grid; gap: 4px; padding: 8px 12px; border-radius: 8px; border: 1px dashed var(--s1); background: var(--s1-soft); font-size: 14px; white-space: pre-wrap; }
.ib-sched-h { display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--s1); }
.ib-sched-acts { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.ib-sched-acts .btn { height: 26px; font-size: 12.5px; }
.ib-sched-when { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ib-sched-when .inp { width: auto; height: 32px; }
.ib-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.ib-tools .btn[aria-pressed="true"] { background: var(--s1-soft); color: var(--s1); }
.ib-att:empty, .bx-att:empty { display: none; }
.ib-att-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.ib-att-list li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); max-width: 280px; }
.ib-att-list li.bad { background: var(--warn-soft); }
.ib-att-list img, .ib-att-ic { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; display: grid; place-items: center; background: var(--surface-3); flex: none; }
.ib-att-t { display: grid; min-width: 0; font-size: 12.5px; }
.ib-att-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-att-t small { color: var(--ink-3); }
.ib-att-bar { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; margin-top: 3px; }
.ib-att-bar i { display: block; height: 100%; background: var(--s1); }
.ib-att-x { border: 0; background: none; color: var(--ink-3); cursor: pointer; padding: 4px; border-radius: 6px; }
.ib-rec { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: rgba(232, 68, 47, .1); color: #c2341f; margin-bottom: 6px; flex-wrap: wrap; }
.ib-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #e8442f; animation: ib-blink 1s infinite; }
@keyframes ib-blink { 50% { opacity: .25; } }
.ib-wave { width: 160px; height: 32px; color: #e8442f; flex: 1; min-width: 80px; }
.ib-lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .86); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.ib-lightbox img { max-width: 100%; max-height: calc(100vh - 80px); border-radius: 6px; }
.ib-lightbox-x { position: absolute; top: 12px; right: 16px; border: 0; background: rgba(255, 255, 255, .15); color: #fff; width: 40px; height: 40px; border-radius: 50%; font-size: 26px; cursor: pointer; }
.ib-lightbox-open { position: absolute; bottom: 14px; color: #fff; font-size: 13.5px; }
.ib-limit { display: inline-flex; align-items: center; gap: 4px; }
.ib-limit .inp { width: 64px; height: 28px; padding: 0 6px; }
/* Rules */
.ib-modes-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.ib-mode { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; cursor: pointer; }
.ib-mode.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--surface-2); }
.ib-mode input { margin-top: 3px; accent-color: var(--ink); }
.ib-mode span, .ib-toggle > span:last-child { display: grid; gap: 2px; }
.ib-mode small, .ib-toggle small { font-size: 12.5px; line-height: 1.4; }
.ib-toggle { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.ib-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ib-switch { flex: none; width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .15s; margin-top: 1px; }
.ib-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .15s; }
.ib-toggle input:checked + .ib-switch { background: var(--good); }
.ib-toggle input:checked + .ib-switch::after { transform: translateX(16px); }
.ib-toggle input:focus-visible + .ib-switch { outline: 2px solid var(--ink); outline-offset: 2px; }
.ib-preview-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ib-preview-h b { display: inline-flex; align-items: center; gap: 4px; }
.ib-preview-h .select { height: 30px; font-size: 13.5px; max-width: 220px; }
.ib-preview-msg { justify-self: start; max-width: 520px; padding: 9px 12px; border-radius: 8px; border-bottom-left-radius: 4px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; white-space: pre-wrap; }
/* Group message */
.bx { gap: 14px; }
.bx-kinds .chip { height: 32px; }
.bx-detail { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.bx-detail .select { max-width: 100%; }
.bx-pick { display: grid; gap: 8px; width: 100%; }
.bx-pick .search { max-width: 360px; }
.bx-preview { display: grid; gap: 6px; padding: 12px 14px; border-radius: 8px; background: var(--s1-soft); border: 1px solid var(--s1); }
.bx-names { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.bx-log .ib-media { margin-top: 6px; }
.bx-log .ib-img { max-width: 120px; }
.bx-stats { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
/* Import */
.imp-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 12px; flex-wrap: wrap; }
.imp-steps li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; background: var(--surface-2); color: var(--ink-3); font-size: 13.5px; font-weight: 600; }
.imp-steps li span { width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center; background: var(--surface-3); font-size: 12.5px; }
.imp-steps li.on { background: var(--ink); color: var(--surface); }
.imp-steps li.done { color: var(--good); }
.imp-how { margin: 0 0 6px; padding-left: 18px; display: grid; gap: 4px; }
.imp-drop { display: grid; justify-items: center; gap: 4px; padding: 26px 16px; border: 2px dashed var(--line-2); border-radius: 8px; cursor: pointer; text-align: center; }
.imp-drop input { max-width: 100%; }
.imp-paste summary { cursor: pointer; font-weight: 600; }
.imp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.imp-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 14px; }
.imp-sample td { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.imp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.imp-stats div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); }
.imp-stats b { font-size: 24px; font-weight: 600; }
.imp-stats span { font-size: 12.5px; color: var(--ink-3); }
.imp-stats .warn { background: var(--warn-soft); }
.imp-h { display: flex; align-items: center; gap: 6px; font-size: 14px; margin: 6px 0 0; }
.imp-list { display: grid; }
.imp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.imp-row:first-child { border-top: 0; }
.imp-row .select { max-width: 220px; height: 32px; }
.imp-row > span.small { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .imp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .imp-row { grid-template-columns: minmax(0, 1fr) auto; }
  .imp-row > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .imp-pair { grid-template-columns: minmax(0, 1fr); }
  .ib-img { max-width: 200px; }
}
/* A phone shows the list or one conversation, never both. */
@media (max-width: 760px) {
  .inbox-link { display: inline-grid; }
  /* Signed in as a coach, the header holds one more icon (the Inbox): a little less room each so it still fits 360px. */
  body.has-who .top-in { gap: 10px; }
  body.has-who .top-actions { gap: 0; }
  body.has-who .top-actions .icon-btn, body.has-who .who-menu summary { width: 32px; }
  /* One pane: the list, or (#inbox/<customer>) the conversation with a way back. */
  .ib-cols { grid-template-columns: minmax(0, 1fr); height: auto; }
  .ib-cols .ib-pane { display: none; }
  .ib-list { overflow: visible; }
  .ib-list-head { position: sticky; top: var(--top-h); z-index: 3; background: var(--surface); border-radius: var(--ui-radius) var(--ui-radius) 0 0; }
  .ib-whose { max-width: 48%; }
  .ib-rows { overflow: visible; }
  .ib-row-more { opacity: 1; }
  .ib-bar2 { gap: 6px; }
  .ib-seg { flex: 0 1 auto; min-width: 0; }
  .ib-seg button { padding: 0 9px; font-size: 13.5px; }
  .ib-chan { min-width: 0; max-width: 108px; flex: 0 1 auto; }
  .ib-phone-thread .ib-cols .ib-list { display: none; }
  .ib-phone-thread .ib-cols .ib-pane { display: grid; min-height: calc(100dvh - var(--top-h) - 110px); grid-template-rows: auto auto minmax(240px, 1fr) auto auto; }
  .ib-phone-thread .ib-head, .ib-phone-thread .view-head, .ib-phone-thread .subtabs { display: none; }
  .ib-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter, 16px)); padding: 0 var(--gutter, 16px); width: calc(100% + 2 * var(--gutter, 16px)); }
  .ib-tabs::-webkit-scrollbar { display: none; }
  .ib-tabs a { flex: none; }
  .ib-head .ui-page-head > .ui-actions { width: 100%; }
  .ib-thread { max-height: none; }
  .ib-th-bar { align-items: flex-start; }
  .ib-th-who { grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; }
  .ib-th-who .ib-th-acts { grid-column: 2; }
  .ib-th-who .avatar.lg { width: 44px; height: 44px; font-size: 15px; align-self: start; }
  .ib-th-name { font-size: 18px; white-space: normal; }
  .ib-load-row { grid-template-columns: minmax(0, 1fr) 90px; }
  .ib-load-row .ib-bar { grid-column: 1 / -1; grid-row: 2; }
  .ib-load-acts { grid-column: 1 / -1; }
  .ib-tpl { grid-template-columns: minmax(0, 1fr); }
  .ib-send-row { flex-wrap: wrap; }
}

/* ------------------------------------------------------------ Ads (SAM) */
/* The page furniture is ui-shell.css (ui-*); these are SAM's own pieces: hook pills, the Facebook-style preview, the
   review grid and overlay editor, Brand's swatches and photos, the wizard's big controls, the lead-form phone. */
.ads-link { display: none; }
.sam-focus { min-width: 0; }
.sam-plain { text-decoration: none; }
.sam-mt { margin-top: 8px; }
.sam-pad { padding: 14px 18px; }
.sam-nowrap { white-space: nowrap; }
.sam-danger { color: var(--bad); }
.ui-shell .chip.on, .sam-focus .chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.sam-ai { display: inline-block; margin-left: 4px; font-size: 12.5px; color: var(--accent); font-weight: 600; }

/* Switches and segmented controls (shared by the Ads screens). */
.switch-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.switch-row input[type=checkbox] { appearance: none; flex: none; width: 40px; height: 22px; border-radius: 999px; background: var(--line-2); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch-row input[type=checkbox]::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch-row input[type=checkbox]:checked { background: var(--good-fill); }
.switch-row input[type=checkbox]:checked::after { transform: translateX(18px); }
.switch-row input[type=checkbox]:disabled { opacity: .5; }
.switch-row > span { display: grid; gap: 2px; }
.switch-row.small input[type=checkbox] { width: 32px; height: 18px; }
.switch-row.small input[type=checkbox]::after { width: 12px; height: 12px; }
.switch-row.small input[type=checkbox]:checked::after { transform: translateX(14px); }
.switch-row.small { align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; }
.seg2 { display: inline-flex; padding: 3px; border-radius: 8px; background: var(--surface-3); gap: 2px; justify-self: start; }
.seg2 button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: transparent; padding: 7px 14px; border-radius: 6px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--ink-2); white-space: nowrap; }
.seg2 button[aria-checked="true"], .seg2 button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg2.small button { padding: 4px 10px; font-size: 12.5px; }

/* Hook pills: one soft colour per angle. */
.sam-hook { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 6px; font-size: 12.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; background: var(--surface-3); color: var(--ink-2); }
.sam-hook.h-pain { background: rgba(208, 59, 59, .1); color: #b02a29; }
.sam-hook.h-tactics { background: rgba(250, 178, 25, .18); color: #8a5a00; }
.sam-hook.h-secrets { background: rgba(27, 175, 122, .13); color: #127a55; }
.sam-hook.h-relatable { background: rgba(214, 51, 132, .1); color: #ad2468; }
.sam-hook.h-opp { background: rgba(12, 163, 12, .1); color: #0a7d0a; }
.sam-hook.h-proof { background: rgba(42, 120, 214, .11); color: #1d5fae; }
.sam-hook.h-identity { background: rgba(124, 77, 255, .11); color: #5b36c9; }
.sam-hook.h-contra { background: rgba(235, 104, 52, .12); color: #b8471b; }
:root[data-theme="dark"] .sam-hook { filter: brightness(1.6) saturate(.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sam-hook { filter: brightness(1.6) saturate(.9); } }

/* Rules an ad passed. */
.sam-rules summary { list-style: none; cursor: pointer; }
.sam-rules summary::-webkit-details-marker { display: none; }
.sam-checks { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; }
.sam-checks.good { color: var(--good); }
.sam-checks.bad { color: var(--bad); }
.sam-rules ul { list-style: none; padding: 8px 0 0; margin: 0; display: grid; gap: 3px; font-size: 12.5px; }
.sam-rules li { display: flex; gap: 6px; align-items: flex-start; }
.sam-rules li.ok svg { color: var(--good); }
.sam-rules li.no { color: var(--bad); }

/* Campaigns. */
.sam-cname { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sam-cname b { margin-right: 2px; }
.sam-pause { color: var(--warn); border-color: var(--warn-soft); }
.sam-draft { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.sam-draft-t { display: grid; gap: 2px; min-width: 0; color: inherit; text-decoration: none; }
.sam-draft-t b { font-weight: 600; }
.sam-funnel { display: grid; gap: 4px; }
.sam-fstep { display: grid; grid-template-columns: minmax(0, 1fr) minmax(60px, 1fr) 52px; gap: 12px; align-items: center; padding: 6px 0; }
.sam-fstep > span:first-child { display: grid; gap: 1px; font-size: 13.5px; }
.sam-meta-name { font-size: 12.5px; color: var(--ink-3); margin-left: 4px; }
.sam-facts-line { margin-top: -12px; }
.sam-adgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; align-items: start; }
.sam-adcard { display: grid; gap: 8px; min-width: 0; }
.sam-adcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; }
.sam-adstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 0; font-size: 12.5px; }
.sam-adstats dt { color: var(--ink-3); font-size: 12.5px; }
.sam-adstats dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.sam-launch { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 12px 0; }
.sam-launch > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); }
.sam-launch b { font-size: 18px; }

/* Leads. */
.ui-actions input.sam-search { height: 34px; width: 210px; font-size: 13.5px; }
.sam-ldrawer { display: grid; gap: 12px; }
.sam-ldrawer h2 { font-size: 24px; font-weight: 600; }
.sam-chips, .sam-contact { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sam-answers { display: grid; gap: 8px; margin: 0; }
.sam-answers dt { font-size: 12.5px; color: var(--ink-3); text-transform: capitalize; }
.sam-answers dd { margin: 0; font-weight: 600; }

/* Settings. */
.sam-val { font-weight: 600; }
.ui-field-row.sam-row-acts { grid-template-columns: minmax(0, 1fr); }
.sam-perms summary { cursor: pointer; }
.sam-perms ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; }
.ui-field-row.sam-loc { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.sam-loc-a { display: flex; gap: 6px; align-items: center; }
.sam-pre { font-size: 12.5px; background: var(--surface-2); padding: 10px; border-radius: 6px; overflow-x: auto; margin-top: 6px; }
.sam-copy { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sam-copy code { font-size: 12.5px; background: var(--surface-2); padding: 6px 8px; border-radius: 6px; word-break: break-all; }
.sam-purge { display: flex; gap: 6px; }
.sam-money { display: flex; align-items: center; gap: 8px; }
.sam-money .inp { width: 110px; }
.sam-save { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sam-step { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; padding: 14px 18px; }
.sam-step-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; background: var(--surface-3); color: var(--ink-2); }
.sam-step.ok .sam-step-n { background: var(--good-soft); color: var(--good); }
.sam-step-t { display: grid; gap: 2px; min-width: 0; }
.sam-step-t b { font-weight: 600; }
.sam-hints { margin-top: 12px; padding: 14px 18px; display: grid; gap: 6px; }
.sam-hints .ui-label { margin: 0; }
.sam-hint { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 14px; }
.sam-hint svg { flex: none; margin-top: 3px; color: var(--ink-3); }

/* The Facebook-style preview. */
.fb-ad { background: #fff; color: #050505; border: 1px solid #e3e5e8; border-radius: 12px; overflow: hidden; font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }
.fb-head { display: flex; align-items: center; gap: 9px; padding: 12px 14px 8px; }
.fb-av { width: 36px; height: 36px; border-radius: 50%; object-fit: contain; background: #0a0a0a; flex: none; border: 1px solid #eee; }
.fb-av-t { display: grid; place-items: center; color: #ffe500; font-weight: 900; }
.fb-who { display: grid; line-height: 1.25; }
.fb-who b { font-size: 13.5px; }
.fb-who span { font-size: 11.5px; color: #65676b; }
.fb-text { padding: 2px 14px 12px; white-space: pre-wrap; word-break: break-word; font-size: 13.5px; }
.fb-text.clamp { padding-bottom: 0; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.fb-text[contenteditable], .fb-headline[contenteditable], .fb-desc[contenteditable] { border-radius: 6px; outline-offset: 2px; cursor: text; }
.fb-text[contenteditable]:hover, .fb-headline[contenteditable]:hover, .fb-desc[contenteditable]:hover { background: #f5f6f7; }
.fb-media { position: relative; background: #f0f2f5; }
.fb-media img, .fb-media canvas { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.fb-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; background: #f7f8fa; }
.fb-foot-t { min-width: 0; }
.fb-headline { font-weight: 700; font-size: 14.5px; line-height: 1.3; }
.fb-desc { font-size: 12.5px; color: #65676b; }
.fb-cta { flex: none; padding: 7px 12px; border-radius: 7px; background: #e4e6eb; font-weight: 700; font-size: 13.5px; }

/* Review: a grid of ad cards, each with its design bar and overlay editor. */
.rv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 22px; align-items: start; } /* 3 across at 1440, 4 at 1920 */
.rv-card { display: grid; gap: 8px; min-width: 0; position: relative; }
.rv-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; padding: 0 2px; }
.rv-icons { display: flex; gap: 0; color: var(--ink-3); }
.rv-icons .icon-btn { width: 30px; height: 30px; }
.rv-menu { position: relative; }
.rv-menu summary { list-style: none; }
.rv-menu summary::-webkit-details-marker { display: none; }
.rv-menu-pop { position: absolute; right: 0; top: 32px; z-index: 6; display: grid; min-width: 170px; padding: 4px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.rv-menu-pop button { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 6px; font: inherit; font-size: 13.5px; cursor: pointer; color: var(--ink); }
.rv-menu-pop button:hover { background: var(--surface-2); }
.rv-busy { position: absolute; inset: 0; display: none; place-content: center; justify-items: center; gap: 8px; background: rgba(255, 255, 255, .78); color: #111; font-weight: 600; font-size: 14px; backdrop-filter: blur(2px); }
.rv-busy svg { color: #0ca30c; animation: spin 2s linear infinite; }
.rv-card.is-busy .rv-busy { display: grid; }
.rv-card.is-busy .fb-text, .rv-card.is-busy .fb-foot { opacity: .35; }
.rv-design { background: #fff; color: #050505; border-top: 1px solid #eef0f2; font-size: 13.5px; }
.rv-design .ui-hint { color: #65676b; }
.rv-design .link-btn { color: #1b8a5a; text-decoration: none; font-weight: 600; }
.rv-design .btn { background: #fff; color: #111; border-color: #d8dadf; }
.rv-design .btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.rv-design-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 9px 12px; }
.rv-picker { padding: 4px 12px 12px; }
.rv-picker-h { display: flex; align-items: center; justify-content: space-between; }
.rv-picker .ui-label, .rv-ed .ui-label { color: #6a6c70; }
.rv-dgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 1100px) { .rv-dgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 12px; } }
.rv-dthumb { position: relative; display: grid; gap: 4px; padding: 3px; border: 1.5px solid #e3e5e8; border-radius: 6px; background: #fff; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; color: #333; text-align: center; line-height: 1.15; }
.rv-dthumb canvas, .rv-photoonly { width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: 6px; display: grid; place-items: center; background: #f0f2f5; color: #888; }
.rv-dthumb.is-on { border-color: #111; }
.rv-dthumb .ui-tag { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); font-size: 12.5px; height: 16px; padding: 0 5px; }
.rv-ed { padding: 4px 12px 12px; display: grid; gap: 8px; }
.rv-ed-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.rv-ed .seg2 { background: #eef0f2; }
.rv-ed .seg2 button { color: #444; }
.rv-ed .seg2 button[aria-checked="true"] { background: #fff; color: #111; }
.rv-ed .seg2 [data-genov][aria-checked="true"] { background: var(--brand); color: var(--brand-ink); }
.rv-ed-body { display: grid; gap: 7px; }
.rv-ed.is-off .rv-ed-body { opacity: .45; pointer-events: none; }
.rv-ed .ui-label { margin-top: 4px; font-size: 12.5px; }
.rv-sub { text-transform: none; letter-spacing: 0; font-weight: 500; }
.rv-ed .inp { height: 36px; background: #fff; color: #111; border-color: #d8dadf; font-size: 13.5px; }
.rv-shadows { display: flex; gap: 8px; }
.rv-sw { width: 28px; height: 28px; border-radius: 50%; border: 1px solid #cfd2d6; background: var(--sw); cursor: pointer; padding: 0; position: relative; }
.rv-sw-none { background: linear-gradient(135deg, transparent 45%, #d03b3b 45%, #d03b3b 55%, transparent 55%), #fff; }
.rv-sw.is-on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1b8a5a; }
.rv-ed-2 { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; }
.rv-pos { display: grid; grid-template-columns: repeat(3, 30px); gap: 4px; }
.rv-pos button { width: 30px; height: 30px; border-radius: 6px; border: 1px solid #e3e5e8; background: #fff; color: #555; cursor: pointer; font-size: 14px; line-height: 1; }
.rv-pos button.is-on { background: #1b8a5a; border-color: #1b8a5a; color: #fff; }
/* Subject-aware layout: SAM's own pick is ringed; a spot over a face is struck out and can't be picked; one over people
   is amber (allowed, with its warning). */
.rv-pos button.is-auto { border: 2px dashed #1b8a5a; color: #1b8a5a; font-weight: 600; }
.rv-pos button.is-person { background: #fff7e6; border-color: #f0c36d; color: #8a5a00; }
.rv-pos button.is-face { background: repeating-linear-gradient(135deg, #fbecec 0 4px, #fff 4px 8px); border-color: #e8b4b4; color: #b8b8b8; }
.rv-pos button:disabled { cursor: not-allowed; }
.rv-pos button.is-face.is-on { background: #c0392b; border-color: #c0392b; color: #fff; }
.rv-auto, .rv-custom { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 6px; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; vertical-align: 1px; }
.rv-auto { background: #e7f5ee; color: #156b46; }
.rv-custom { background: #eef0f2; color: #444; }
.rv-why { display: flex; gap: 6px; align-items: flex-start; margin: -2px 12px 9px; font-size: 12.5px; line-height: 1.35; color: #56585c; }
.rv-why svg { flex: none; margin-top: 2px; color: #1b8a5a; }
.rv-layout { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: #56585c; }
.rv-layout:empty, .rv-warns:empty { display: none; }
.rv-layout .link-btn { margin-left: auto; }
.rv-warns { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; }
.rv-warns li { display: flex; gap: 6px; align-items: flex-start; line-height: 1.35; }
.rv-warns li svg { flex: none; margin-top: 2px; }
.rv-warns .is-face { color: #b3261e; font-weight: 600; }
.rv-warns .is-person { color: #8a5a00; }
.rv-warns .is-info { color: #65676b; }
.rv-flag { position: absolute; left: 10px; top: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 6px; background: rgba(255, 255, 255, .94); color: #65676b; font-size: 12.5px; font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.rv-flag.is-face { background: #b3261e; color: #fff; }
.rv-flag[hidden] { display: none; }
.rv-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rv-debug { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-3); cursor: pointer; }
.rv-size { display: flex; align-items: center; gap: 8px; }
.rv-size span { min-width: 44px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.rv-mt { margin-top: 10px !important; }
.rv-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 2px; }
.rv-consent { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 600; color: var(--warn); }
.rv-pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rv-pick { position: relative; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; }
.rv-pick img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.rv-pick.is-on { border-color: var(--ink); }
.rv-pick .rv-consent { position: absolute; left: 4px; bottom: 4px; background: rgba(255,255,255,.9); padding: 1px 5px; border-radius: 6px; }

/* The wizard's big controls. */
.w-big { display: grid; gap: 6px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.w-bignum { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.w-bignum b, .w-num { font-size: 26px; font-weight: 600; letter-spacing: -1px; line-height: 1.1; }
.w-bignum > span { color: var(--ink-3); font-weight: 600; }
.w-cur { font-size: 26px !important; color: var(--ink) !important; font-weight: 600 !important; }
.w-num { width: 120px; border: 0; border-bottom: 2px solid var(--line-2); background: transparent; color: var(--ink); padding: 0; font-family: inherit; }
.w-num:focus { outline: none; border-bottom-color: var(--ink); }
.w-range { width: 100%; accent-color: var(--ink); height: 26px; }
.w-range-l { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-3); }
.w-sum { font-size: 15px; }
.w-aud { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.w-name { margin-top: 6px; }
.w-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.w-ctx { font-size: 15px; }
.w-ctas, .w-fields { display: flex; gap: 6px; flex-wrap: wrap; }
.w-fields input { position: absolute; opacity: 0; pointer-events: none; }
.w-formstep { display: grid; grid-template-columns: minmax(0, var(--ui-form-w, 880px)) 290px; gap: 28px; align-items: start; }
/* Publish: what will be made, and beside it (a wide window) what SAM sends Meta. */
.w-pub { display: grid; gap: 16px; align-items: start; }
@media (min-width: 1180px) { .w-pub { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } .w-pub .am-plan pre { max-height: 560px; } }
.w-pub .am-plan { margin-top: 0; }
.w-phone { position: sticky; top: calc(var(--top-h) + 16px); }
.w-qrow { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; gap: 6px; align-items: center; }
.w-qrow .q-o { grid-column: 1 / 3; }
.w-thumbs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.w-thumbs img { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; }
.ui-choice .sam-hook { justify-self: start; }
.ui-choice .ui-hint > span:last-child { display: block; margin-top: 4px; }

/* The lead form's phone. */
.phone { width: 270px; min-height: 540px; border-radius: 38px; border: 10px solid #111; background: #fff; color: #050505; overflow: hidden; position: relative; box-shadow: 0 18px 40px rgba(0,0,0,.18); font: 13px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.ph-notch { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 84px; height: 20px; border-radius: 12px; background: #111; }
.ph-top { display: flex; justify-content: space-between; align-items: center; padding: 34px 14px 10px; background: #1b1b1b; color: #fff; }
.ph-top span { font-size: 11px; color: #bbb; }
.ph-q { padding: 12px 14px 16px; display: grid; gap: 9px; }
.ph-q > b { font-size: 15px; }
.ph-f { display: grid; gap: 3px; }
.ph-f span { font-size: 11.5px; color: #555; }
.ph-f i { display: block; height: 28px; border: 1px solid #ccd0d5; border-radius: 6px; }
.ph-ch { display: flex; flex-wrap: wrap; gap: 4px; }
.ph-ch em { font-style: normal; font-size: 11px; padding: 4px 8px; border: 1px solid #ccd0d5; border-radius: 12px; }
.ph-otp { font-size: 11px; color: #1d5fae; }
.ph-pp { font-size: 10.5px; color: #65676b; }
.ph-btn { display: block; text-align: center; padding: 9px; border-radius: 7px; background: #1877f2; color: #fff; font-weight: 700; }
.ph-thanks { padding: 40px 18px; display: grid; gap: 10px; justify-items: center; text-align: center; }
.ph-thanks svg { color: #0a7d0a; }
.ph-thanks b { font-size: 16px; }
.ph-thanks .ph-btn { width: 100%; margin-top: 8px; }

/* Onboarding. */
.sam-rail-sub { font-weight: 500; font-size: 12.5px; color: var(--ui-rail-muted); }
.ob-conn { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.ob-conn > svg { color: var(--good); }
.ob-conn > div { display: grid; gap: 2px; }
.ob-fb { display: grid; gap: 10px; justify-items: start; }
.ob-fbbtn { min-height: 48px !important; padding: 0 22px !important; font-size: 15px !important; background: #1877f2 !important; border-color: #1877f2 !important; color: #fff !important; }
.ob-id { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ob-id > div:first-child { display: grid; gap: 2px; margin-right: auto; }
.ob-swatches { display: flex; gap: 4px; }
.ob-swatches span { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); }
.ob-text { font-size: 13.5px; color: var(--ink-2); white-space: pre-line; }
.ob-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 13.5px; }
.ob-facts li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ob-facts li:last-child { border-bottom: 0; }
.ob-facts .icon-btn { width: 26px; height: 26px; flex: none; }
.ob-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.ob-photos img, .ob-add { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.ob-add { display: grid; place-content: center; justify-items: center; gap: 4px; border: 1.5px dashed var(--line-2); color: var(--ink-3); cursor: pointer; font-size: 12.5px; font-weight: 600; }
.ob-add.busy { opacity: .5; pointer-events: none; }

/* Brand. */
.b-mt { margin-top: 14px; }
.b-id { display: flex; align-items: center; gap: 14px; }
.b-id-logo { width: 56px; height: 56px; border-radius: 8px; border: 1px solid var(--line); object-fit: contain; background: #0a0a0a; display: grid; place-items: center; color: var(--ink-3); padding: 6px; }
.b-id > div { display: grid; gap: 2px; }
.b-id-name { font-size: 18px; font-weight: 600; }
.b-logos { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.b-logo { position: relative; width: 92px; display: grid; gap: 4px; justify-items: center; }
.b-logo img { width: 92px; height: 64px; object-fit: contain; background: #0a0a0a; border-radius: 8px; border: 1.5px solid var(--line); padding: 6px; }
.b-logo.is-primary img { border-color: var(--good-fill); }
.b-logo .ui-tag { background: var(--good-fill); color: #fff; }
.b-add { border: 1.5px dashed var(--line-2); border-radius: 8px; color: var(--ink-3); cursor: pointer; display: grid; place-content: center; justify-items: center; gap: 4px; background: transparent; font: inherit; }
.b-logo.b-add { height: 64px; }
.b-add:hover { border-color: var(--ink-3); color: var(--ink); }
.b-add.busy { opacity: .5; pointer-events: none; }
.b-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.b-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.b-swatch { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: grid; background: var(--surface); }
.b-swatch.b-add { min-height: 130px; border-style: dashed; }
.b-sw { display: block; height: 62px; cursor: pointer; border-bottom: 1px solid var(--line); }
.b-sw input { opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.b-sw-t { padding: 8px 10px 9px; display: grid; gap: 2px; justify-items: start; }
.b-hex { border: 0; background: transparent; font: inherit; font-weight: 600; font-size: 12.5px; padding: 0; width: 100%; color: var(--ink); font-variant-numeric: tabular-nums; }
.b-role { border: 0; background: transparent; font: inherit; font-size: 12.5px; color: var(--ink-3); padding: 0; cursor: pointer; }
.b-fonts { display: grid; gap: 8px; }
.b-font { display: grid; grid-template-columns: 80px 150px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.b-font b { font-weight: 600; }
.b-sample { font-size: 18px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-font-a { display: flex; gap: 6px; align-items: center; }
.b-font-in { width: 170px; height: 30px; }
.b-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.b-ph { position: relative; margin: 0; }
.b-ph img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.b-ph.b-add { aspect-ratio: 4 / 3; }
.b-ph-del { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; }
.b-ph:hover .b-ph-del, .b-ph-del:focus-visible { opacity: 1; }
.b-faces { position: absolute; left: 5px; top: 5px; max-width: calc(100% - 40px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 6px; padding: 1px 6px; background: rgba(0,0,0,.62); color: #fff; font-size: 12.5px; font-weight: 600; }
.b-faces.is-new { background: rgba(255,255,255,.92); color: #65676b; }
.b-facestat:empty { display: none; }
.b-consent { position: absolute; left: 5px; bottom: 5px; display: inline-flex; align-items: center; gap: 3px; border: 0; border-radius: 6px; padding: 2px 6px; background: rgba(255,255,255,.92); color: #8a5a00; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.b-offer { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 18px; }
.b-addoffer { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.b-rows .ui-row:first-child > summary { border-radius: 0; }
.b-rows { border-top: 1px solid var(--line); margin-top: 6px; }
.b-ins { flex: 1; min-width: 160px; height: 30px; font-size: 13.5px; }
.b-facts { list-style: none; margin: 0; padding: 0; }
.b-fact { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.b-fact > div:first-child { display: grid; gap: 2px; min-width: 0; }
.b-fact-ed { display: grid; gap: 6px; width: 100%; }
.b-addfact { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 8px; margin-top: 8px; }

@media (max-width: 1180px) {
  .w-formstep { grid-template-columns: minmax(0, 1fr); }
  .w-phone { position: static; justify-self: center; }
}
@media (max-width: 860px) {
  .rv-grid { grid-template-columns: minmax(0, 1fr); }
  .w-row2, .b-form, .b-addfact, .b-addoffer { grid-template-columns: minmax(0, 1fr); }
  .b-font { grid-template-columns: 70px minmax(0, 1fr) auto; }
  .b-sample { display: none; }
  .b-font-in { width: 130px; }
  .ui-actions input.sam-search { width: 100%; }
  .ui-field-row.sam-loc { grid-template-columns: minmax(0, 1fr); }
  .sam-fstep { grid-template-columns: minmax(0, 1fr) 70px 46px; }
  .w-qrow { grid-template-columns: minmax(0, 1fr) auto; }
  .w-qrow .q-k { grid-column: 1; }
  .w-qrow .q-o { grid-column: 1 / -1; }
  .sam-draft { flex-wrap: wrap; }
  .w-bignum b, .w-num { font-size: 26px; }
  .sam-adgrid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- Reports: the weekly analysis (weekly-analysis.js) */
.wa { margin-bottom: 16px; }
.wa-head { flex-wrap: wrap; row-gap: 8px; }
.wa-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wa-tools .select { height: 30px; font-size: 13.5px; }
.wa-tools .btn .spinner { width: 12px; height: 12px; }
.wa-tabs { padding: 12px 18px 0; }
.wa-loading { padding: 10px 18px 0; color: var(--ink-3); }
.wa-range { margin-bottom: 6px; }
.wa-note { display: flex; gap: 8px; align-items: flex-start; color: var(--ink-2); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; margin: 4px 0 12px; }
.wa-note svg { flex: none; margin-top: 2px; }
.wa-headline { font-size: 18px; font-weight: 600; line-height: 1.35; letter-spacing: -.1px; margin: 2px 0 16px; max-width: 70ch; }
.wa-changes { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 2px; max-width: 100ch; }
.wa-change { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.45; }
.wa-change:last-child { border-bottom: 0; }
.wa-change .pill { align-self: center; }
.wa-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); transform: translateY(-1px); }
.wa-dot.good { background: var(--good-fill); } .wa-dot.bad { background: var(--bad-fill); }
.wa-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.wa-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; line-height: 1.45; }
.wa-actions { list-style: decimal; }
.wa-foot { padding-top: 0; }
@media (max-width: 900px) { .wa-cols { grid-template-columns: minmax(0, 1fr); gap: 4px; } .wa-cols > div { padding-top: 6px; } }
@media (max-width: 560px) {
  .wa-change { grid-template-columns: auto minmax(0, 1fr); }
  .wa-change .pill { grid-column: 2; justify-self: start; }
  .wa-headline { font-size: 18px; }
}
@media print { .wa-tabs { display: none; } }

/* ---- Today: Needs you, three tiles; At risk cards' More (app.js renderToday, at-risk.js). Tokens only. ---- */
.today-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 0; }
.today-tiles .tile { padding: 12px 14px 10px; }
.today-tiles .tile-value { font-size: 26px; }
.today-tiles .tile-foot { flex-wrap: wrap; row-gap: 2px; }
.needs .card-body { display: grid; gap: 10px; }
.needs-line { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); color: var(--ink); text-align: left; text-decoration: none; font-size: 14px; cursor: pointer; }
.needs-line:hover { border-color: var(--line-2); }
.needs-line > svg { flex: none; color: var(--ink-3); }
.needs-line.muted { color: var(--ink-3); cursor: default; }
.needs-text { flex: 1; min-width: 0; }
.needs-go { display: inline-flex; align-items: center; gap: 2px; flex: none; color: var(--ink-2); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.needs-replies .msg-btn { pointer-events: none; flex: none; }
.needs-chips { margin: 0; }
.needs-more { display: flex; justify-content: center; }
.m-actions .m-more, .rk-acts .rk-more { flex: none; }
@media (max-width: 760px) {
  .today-tiles { gap: 8px; }
  .today-tiles .tile { padding: 10px 10px 8px; }
  .today-tiles .tile-value { font-size: 24px; }
  .today-tiles .tile .spark { display: none; }
  .today-tiles .tile-label { font-size: 12.5px; white-space: nowrap; }
  .today-tiles .tile-label svg { display: none; }
  .needs-line { flex-wrap: wrap; }
  .needs-go { margin-left: auto; }
  .rk-acts .btn.rk-more { flex: 0 0 auto; }
}
