/* ==========================================================================
   SiteRISE "Calm" kit (Mike, 29 Nov 2026).
   One shared stylesheet. Loaded LAST on every page that loads the Fold files
   (base.html, the public shells, the portals). It does three jobs:

   1. Re-points the Fold tokens at the calm tokens, so every page that already
      reads var(--surface), var(--border), var(--yes-fg) and friends changes
      look without its own markup changing.
   2. Squares off the Fold's cut corners and ornaments: round corners 12 to 16,
      1px line borders, no shadows (only slide-out panels keep one).
   3. Defines the kit classes for new markup: .cm-box, .cm-card, .cm-chip,
      .cm-btn, .cm-hero, .cm-num, .cm-table, .cm-panel.

   Status colours (Mike's rule): red = needs you or urgent, blue = important,
   grey = later or waiting, green = done. A drop in a number is grey with a
   minus sign. Red is never used for something that is only low.
   Light is the default; the per-person light or dark choice is untouched.
   ========================================================================== */

/* ---- Tokens: light (default) ------------------------------------------- */
:root {
  --good: #17705B; --on-good: #FFFFFF; --hero: #17705B; --chip: #E3F4EE;
  --ubg: #FDE2E1; --uln: #F0A8A4; --uk: #B42318;
  --ibg: #E2EEFF; --iln: #A9C8F2; --ik: #1D5FB4;
  --lbg: #EEF1F5; --lln: #D3D9E2; --lk: #5B6275;
  --onk: #FFFFFF;

  --bg: #F2F4F7; --surface: #FFFFFF; --bg-elevated: #E9EDF2; --under: var(--bg);
  --text: #1B1D25; --heading: #1B1D25; --muted: #5B6275;
  --border: #DFE4EB; --border-strong: #C9CFD9;

  --teal: #17705B; --teal-dark: #17705B; --deep: #17705B; --deep-2: #0F5444;
  --accent-fill: #17705B; --accent-fill-2: #125A49; --on-accent: #FFFFFF; --focus: #17705B;

  --yes-bg: #E3F4EE; --yes-fg: #17705B;
  --no-bg: #FDE2E1;  --no-fg: #B42318;
  --neutral-bg: #EEF1F5; --neutral-fg: #5B6275;
  --warn: #1D5FB4; --warn-bg: #E2EEFF; --warn-line: #A9C8F2; --on-warn: #FFFFFF;
  --danger-fill: #B42318; --on-danger: #FFFFFF;
  --count-bg: #B42318; --count-fg: #FFFFFF;

  --topbar-bg: #FFFFFF;
  --chart-accent: #17705B; --chart-area: rgba(23,112,91,.12);

  --cut: 0px; --cut-sm: 0px; --radius: 12px; --shadow: none; --pattern-ink: transparent;
  --r-card: 14px; --r-ctl: 12px;
  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --good: #5EE0B9; --on-good: #14161C; --hero: #1B6B58; --chip: #173A33;
    --ubg: #3D1E1E; --uln: #733434; --uk: #FF8F80;
    --ibg: #182A42; --iln: #2C4A73; --ik: #7FB2F0;
    --lbg: #23262F; --lln: #3A3F4D; --lk: #A3AABB;
    --onk: #14161C;
    --bg: #14161C; --surface: #1D2029; --bg-elevated: #262A35; --under: var(--bg);
    --text: #E9ECF2; --heading: #E9ECF2; --muted: #A3AABB;
    --border: #2E3340; --border-strong: #3B4150;
    --teal: #5EE0B9; --teal-dark: #5EE0B9; --deep: #5EE0B9; --deep-2: #8CEBD0;
    --accent-fill: #5EE0B9; --accent-fill-2: #8CEBD0; --on-accent: #14161C; --focus: #5EE0B9;
    --yes-bg: #173A33; --yes-fg: #5EE0B9;
    --no-bg: #3D1E1E;  --no-fg: #FF8F80;
    --neutral-bg: #23262F; --neutral-fg: #A3AABB;
    --warn: #7FB2F0; --warn-bg: #182A42; --warn-line: #2C4A73; --on-warn: #14161C;
    --danger-fill: #FF8F80; --on-danger: #14161C;
    --count-bg: #FF8F80; --count-fg: #14161C;
    --topbar-bg: #1D2029;
    --chart-accent: #5EE0B9; --chart-area: rgba(94,224,185,.12);
  }
}
:root[data-theme="dark"] {
  --good: #5EE0B9; --on-good: #14161C; --hero: #1B6B58; --chip: #173A33;
  --ubg: #3D1E1E; --uln: #733434; --uk: #FF8F80;
  --ibg: #182A42; --iln: #2C4A73; --ik: #7FB2F0;
  --lbg: #23262F; --lln: #3A3F4D; --lk: #A3AABB;
  --onk: #14161C;
  --bg: #14161C; --surface: #1D2029; --bg-elevated: #262A35; --under: var(--bg);
  --text: #E9ECF2; --heading: #E9ECF2; --muted: #A3AABB;
  --border: #2E3340; --border-strong: #3B4150;
  --teal: #5EE0B9; --teal-dark: #5EE0B9; --deep: #5EE0B9; --deep-2: #8CEBD0;
  --accent-fill: #5EE0B9; --accent-fill-2: #8CEBD0; --on-accent: #14161C; --focus: #5EE0B9;
  --yes-bg: #173A33; --yes-fg: #5EE0B9;
  --no-bg: #3D1E1E;  --no-fg: #FF8F80;
  --neutral-bg: #23262F; --neutral-fg: #A3AABB;
  --warn: #7FB2F0; --warn-bg: #182A42; --warn-line: #2C4A73; --on-warn: #14161C;
  --danger-fill: #FF8F80; --on-danger: #14161C;
  --count-bg: #FF8F80; --count-fg: #14161C;
  --topbar-bg: #1D2029;
  --chart-accent: #5EE0B9; --chart-area: rgba(94,224,185,.12);
}

/* ---- Shapes: round, flat, no cut corners -------------------------------- */
/* Real elements only. Pseudo-elements keep their own clip-path, which is how
   the small status markers and chevrons are drawn. */
body.fold, body.fold *, body.fold-public, body.fold-public * { clip-path: none !important; }
body.fold *, body.fold-public * { box-shadow: none; }
body.fold, body.fold-public { font-family: var(--font-body); background: var(--bg); color: var(--text); }
body.fold h1, body.fold h2, body.fold h3, body.fold .display,
body.fold-public h1, body.fold-public h2, body.fold-public h3 {
  font-family: var(--font-display); font-weight: 800; font-stretch: 100%; letter-spacing: -0.02em; color: var(--heading);
}

/* Fold ornaments: the corner folds, lattice, ribbons and wedges */
body.fold .card::before, body.fold .card::after, body.fold .card.fold::before, body.fold .card.fold::after,
body.fold .card-block::before, body.fold .table-card::before, body.fold .sh-card::before,
body.fold .page-head::before, body.fold .page-head::after,
body.fold .topbar::before, body.fold .topbar::after,
body.fold .sidebar::before, body.fold .sidebar::after,
body.fold .nav .group::before, body.fold .nav-acc-sum::before,
body.fold .nav-item.active::before, body.fold .nav-item.active::after,
body.fold .client-header::after, body.fold .section-head .line::after,
body.fold .btn-primary::after, body.fold .band::before,
body.fold-public .p-art::before, body.fold .p-art::before,
.p-art .p-wedge, .band .wedge, .cover-corner, .facet, .rule { display: none !important; }

/* The S-fold watermark is a Fold ornament: calm pages are plain */
.sr-wm { display: none !important; }
body.fold .account-block a { color: var(--good); }
body.fold .account-block, body.fold .account-block .acct-agency { color: var(--muted); }
body.fold .account-block .acct-agency { color: var(--text); }

/* Cards and boxes */
body.fold .card, body.fold .card-block, body.fold .table-card, body.fold .sh-card, body.fold .ftile, body.fold .ptile,
body.fold .page-head, body.fold .composer, body.fold .week, body.fold .cal, body.fold .list, body.fold .twrap,
body.fold .dpick, body.fold .drop, body.fold .sa-menu, body.fold .sa-pending, body.fold .rp-doc, body.fold .rpbar,
body.fold .split, body.fold .state, body.fold .account, body.fold .client-switch, body.fold .seg, body.fold .pop,
body.fold .bell-panel, body.fold .flash, body.fold .iconbtn, body.fold .demo-link, body.fold .navbtn {
  border-radius: var(--r-card);
}
body.fold .card { padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); }
body.fold .page-head {
  padding: 14px 18px; margin-bottom: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
}
body.fold .page-head .actions { margin-right: 0; }
body.fold .page-head h1 { font-size: 28px; font-weight: 800; margin-top: 2px; font-variation-settings: normal; }
body.fold .page-head .sub { font-size: 14px; margin-top: 4px; }
body.fold .eyebrow, body.fold .band .band-eyebrow {
  font-family: var(--font-body); font-stretch: 100%; font-size: 13px; font-weight: 700;
  letter-spacing: 0; text-transform: none; color: var(--muted);
}
body.fold .section { margin-top: 20px; }
body.fold .section-head { margin-bottom: 8px; }
body.fold .section-head h2 { font-size: 16px; font-weight: 800; }
body.fold .content { padding: 16px 20px 48px; }
body.fold .grid { gap: 12px; }

/* The dark "band" becomes the green hero card */
body.fold .band {
  background: var(--hero); color: #FFFFFF; border-radius: 16px; border: 0; padding: 20px 24px;
  --band-text: #FFFFFF; --band-muted: rgba(255,255,255,.88);
}
body.fold .band h2, body.fold .band h3 { color: #FFFFFF; }
body.fold .band a { color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; }
body.fold .band .band-eyebrow { color: #FFFFFF; }
body.fold .band .band-meta { color: rgba(255,255,255,.88); }
body.fold .band .band-meta b { color: #FFFFFF; }
body.fold .band .btn-primary { background: #FFFFFF !important; color: #17705B !important; }
body.fold .band .btn-ghost { color: #FFFFFF; border: 2px solid rgba(255,255,255,.75); background: transparent; }
body.fold .band .pill, body.fold .band .pill.yes, body.fold .band .pill.pending, body.fold .band .pill.warn { background: rgba(255,255,255,.18); color: #FFFFFF; }
body.fold .band table th, body.fold .band .kpi .label, body.fold .band .kpi .meta { color: rgba(255,255,255,.88); }

/* ---- Sidebar: a light card column, not an ink slab ---------------------- */
body.fold .app { background: none; }
body.fold .sidebar {
  --side-bg: var(--surface); --side-text: var(--text); --side-muted: var(--muted);
  --side-line: var(--border); --side-hover: var(--bg-elevated);
  background: var(--surface); color: var(--text); border-right: 1px solid var(--border);
}
body.fold .sidebar .brand img { display: none; }
body.fold .sidebar .brand::before {
  content: "SiteRISE"; display: block; font-family: var(--font-display); font-weight: 800;
  font-size: 24px; letter-spacing: -0.02em; color: var(--heading);
}
body.fold .brandrow { padding: 16px 14px 8px 16px; }
body.fold .sidebar .nav { padding: 0 10px; }
body.fold .sidebar .group, body.fold .sidebar .nav-acc-sum {
  font-family: var(--font-body); font-stretch: 100%; font-size: 13px; font-weight: 700;
  letter-spacing: 0; text-transform: none; color: var(--muted); padding: 14px 10px 4px; min-height: 44px;
}
body.fold .sidebar .nav-item {
  min-height: 44px; border-radius: 10px; margin: 2px 0; padding: 8px 10px;
  font-family: var(--font-body); font-stretch: 100%; font-size: 14px; font-weight: 600; color: var(--text);
}
body.fold .sidebar .nav-item:hover { background: var(--bg-elevated); color: var(--text); }
body.fold .sidebar .nav-item svg { color: var(--muted); }
body.fold .sidebar .nav-item.active {
  margin-left: 0; padding-left: 10px; background: var(--bg-elevated); color: var(--text); font-weight: 800;
}
body.fold .sidebar .nav-item.active svg { color: var(--good); }
body.fold .sidebar .nav-count, body.fold .sidebar .nav-acc-count, body.fold .sidebar .nav-item .nav-count {
  border-radius: 999px; background: var(--warn); color: var(--on-warn); font-size: 12px; font-weight: 700;
  min-width: 22px; height: 22px; padding: 0 7px; display: inline-grid; place-items: center; margin-left: auto;
}
body.fold .sidebar .nav-acc-count[hidden] { display: none; }
body.fold .sidebar .nav-badge, body.fold .sidebar .nav-item .nav-badge {
  border-radius: 999px; background: var(--ik); color: var(--onk); font-size: 12px; padding: 2px 9px;
}
body.fold .nav-off { border-radius: 999px; background: var(--lbg); color: var(--lk); letter-spacing: 0; text-transform: none; font-size: 11px; }
body.fold .client-header {
  background: var(--bg-elevated); border: 1px solid var(--border); border-left: 1px solid var(--border);
  border-radius: 12px; margin: 4px 10px 4px;
}
body.fold .client-header-name { color: var(--heading); font-family: var(--font-display); font-weight: 800; font-stretch: 100%; }
body.fold .client-header-domain { color: var(--muted); }
body.fold .nav-open .sidebar { box-shadow: 20px 0 60px rgba(0,0,0,.25); }

/* ---- Top bar: header card with the look switch ------------------------- */
body.fold .topbar {
  background: var(--topbar-bg); -webkit-backdrop-filter: none; backdrop-filter: none;
  border-bottom: 1px solid var(--border); min-height: 60px; padding: 8px 20px;
}
body.fold .iconbtn, body.fold .demo-link, body.fold .account, body.fold .client-switch, body.fold .navbtn {
  background: var(--bg); border: 1px solid var(--border); min-height: 44px; border-radius: 12px;
}
body.fold .demo-link { border-left: 1px solid var(--border); font-weight: 600; }
body.fold .iconbtn { min-width: 44px; }
body.fold .iconbtn .count { background: var(--uk); color: var(--onk); border-radius: 999px; }
body.fold .monogram, body.fold .avatar { border-radius: 50%; background: var(--hero); color: #FFFFFF; font-family: var(--font-display); font-stretch: 100%; font-weight: 800; }
body.fold .monogram-icon { border-radius: 8px; }
/* Dark look / Light look. The button keeps its id and its icon; it also says what it does. */
body.fold #themeToggle { width: auto; padding: 0 14px; gap: 8px; display: inline-flex; align-items: center; font-weight: 600; font-size: 14px; }
body.fold #themeToggle .theme-word { white-space: nowrap; }
body.fold #themeToggle .theme-word-dark { display: none; }
:root[data-theme="dark"] body.fold #themeToggle .theme-word-dark { display: inline; }
:root[data-theme="dark"] body.fold #themeToggle .theme-word-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.fold #themeToggle .theme-word-dark { display: inline; }
  :root:not([data-theme="light"]) body.fold #themeToggle .theme-word-light { display: none; }
}
@media (max-width: 560px) {
  body.fold #themeToggle { padding: 0; width: 44px; justify-content: center; }
  body.fold #themeToggle .theme-word { display: none !important; }
}

/* ---- Buttons ------------------------------------------------------------ */
body.fold .btn, body.fold-public .btn {
  min-height: 44px; padding: 9px 18px; border-radius: var(--r-ctl); font-weight: 700; font-size: 14px;
}
body.fold .btn-sm { min-height: 44px; padding: 6px 14px; }
body.fold .btn-primary, body.fold-public .btn-primary { background: var(--accent-fill); color: var(--on-accent); border: 0; }
body.fold .btn-primary:hover, body.fold-public .btn-primary:hover { background: var(--accent-fill-2); color: var(--on-accent); }
body.fold .btn-tonal { background: var(--bg-elevated); color: var(--text); }
body.fold .btn-tonal:hover { background: var(--border); color: var(--text); }
body.fold .btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
body.fold .btn-ghost:hover { background: var(--bg-elevated); color: var(--text); }
body.fold .btn-link { color: var(--good); font-weight: 700; }
body.fold .btn:focus-visible, body.fold a:focus-visible, body.fold button:focus-visible,
body.fold input:focus-visible, body.fold select:focus-visible, body.fold textarea:focus-visible,
body.fold-public a:focus-visible, body.fold-public button:focus-visible, body.fold-public input:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}

/* ---- Chips and pills: meaning by colour AND by words -------------------- */
body.fold .pill, body.fold .chip, body.fold .status, body.fold .delta, body.fold .stale-tag {
  border-radius: 999px; font-weight: 700; letter-spacing: 0; text-transform: none;
}
body.fold .pill { padding: 3px 10px; font-size: 12px; background: var(--lbg); color: var(--lk); }
body.fold .pill.yes, body.fold .pill.connected, body.fold .pill.published { background: var(--chip); color: var(--good); }
body.fold .pill.no, body.fold .pill.failed, body.fold .pill.high { background: var(--uk); color: var(--onk); }
body.fold .pill.med, body.fold .pill.info { background: var(--ik); color: var(--onk); }
body.fold .pill.pending { background: var(--lbg); color: var(--lk); box-shadow: inset 0 0 0 1px var(--lln); }
body.fold .status { background: var(--lbg); color: var(--lk); }
body.fold .status.review { background: var(--ibg); color: var(--ik); }
body.fold .status.approved, body.fold .status.scheduled { background: var(--ibg); color: var(--ik); }
body.fold .status.published { background: var(--chip); color: var(--good); }
body.fold .status.failed { background: var(--ubg); color: var(--uk); }
/* A drop in a number is grey with a minus sign, never red. */
body.fold .delta.down { background: var(--lbg); color: var(--lk); }
body.fold .delta.down svg { display: none; }
body.fold .delta.down::before { content: "\2212"; font-weight: 800; }
body.fold .delta.up { background: var(--chip); color: var(--good); }
body.fold .delta.flat { background: var(--lbg); color: var(--lk); }
body.fold .stat .value { font-family: var(--font-display); font-weight: 800; font-stretch: 100%; font-size: 30px; letter-spacing: -0.02em; }
body.fold .stat .label { font-size: 13px; font-weight: 600; color: var(--muted); }

/* ---- Forms and tables --------------------------------------------------- */
body.fold input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), body.fold select, body.fold textarea,
body.fold-public input:not([type=checkbox]):not([type=radio]), body.fold-public select, body.fold-public textarea {
  border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); min-height: 44px;
}
body.fold textarea, body.fold-public textarea { min-height: 96px; }
body.fold input[type=radio], body.fold-public input[type=radio] { border-radius: 50%; }
body.fold .ptable th, body.fold .table-card th, body.fold table th {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--muted);
}
body.fold .tabs a, body.fold .tabs button { min-height: 44px; }
body.fold .seg { background: var(--surface); }
body.fold .seg .on, body.fold .seg [aria-pressed="true"] { background: var(--accent-fill); color: var(--on-accent); border-radius: 10px; }
body.fold .seg button, body.fold .seg a { border-radius: 10px; min-height: 44px; }
body.fold .flash, body.fold .state { background: var(--surface); border: 1px solid var(--border); }
body.fold .flash.error { background: var(--ubg); border-color: var(--uln); color: var(--uk); }
body.fold .flash.success, body.fold .flash.ok { background: var(--chip); border-color: var(--good); color: var(--good); }
body.fold .modal, body.fold .pop, body.fold .bell-panel { border-radius: 16px; }
body.fold .modal { box-shadow: 0 12px 40px -12px rgba(0,0,0,.4) !important; }
body.fold .bell-panel { box-shadow: 0 12px 40px -12px rgba(0,0,0,.4) !important; }
body.fold #srToast { border-radius: 12px; }

/* ---- Number tiles and small marks --------------------------------------- */
body.fold .card.kpi { padding: 10px 12px; border-radius: 12px; }
body.fold .card.kpi .label { font-size: 13px; font-weight: 600; color: var(--muted); }
body.fold .card.kpi .value { font-family: var(--font-display); font-weight: 800; font-stretch: 100%; font-size: 30px; line-height: 1.15; letter-spacing: -0.02em; margin-top: 4px; }
body.fold .card.kpi .value.none { font: 600 15px/1.35 var(--font-body); letter-spacing: 0; }
body.fold .card.kpi .meta { margin-top: 4px; }
body.fold .card.kpi.is-fail { background: var(--ubg); border-color: var(--uln); }
body.fold .card.kpi.is-warn { background: var(--lbg); border-color: var(--lln); }
body.fold .card.kpi.is-ok .value { color: var(--good); }
body.fold .od-pill, body.fold .od-cthumb, body.fold .cd-chip { border-radius: 999px; }
body.fold .od-cthumb, body.fold .cd-chip { border-radius: 10px; }
body.fold .od-mark, body.fold .od-dot, body.fold .pill .dot, body.fold .legend .sw, body.fold .status::before { border-radius: 50%; }
body.fold .od-mark.bad, body.fold .od-dot.red, body.fold .od-dot.failed { background: var(--uk); }
body.fold .od-more, body.fold .cd-morebox { display: flex; flex-direction: column; gap: 8px; }
body.fold .cm-more { cursor: pointer; list-style: none; }
body.fold .cm-more::-webkit-details-marker { display: none; }
body.fold .li { border-radius: 12px; }

/* ---- Public pages (sign in, onboarding, portals) ------------------------ */
.public .p-art { background: var(--hero); color: #FFFFFF; --side-text: #FFFFFF; --side-muted: rgba(255,255,255,.88); }
.public .p-art h1 { font-family: var(--font-display); font-weight: 800; font-stretch: 100%; }
.public .p-art .p-eyebrow { font-family: var(--font-body); font-stretch: 100%; letter-spacing: 0; text-transform: none; font-size: 13px; color: #FFFFFF; }
.public .p-art .p-sub b, .public .p-art a { color: #FFFFFF; }
.public .p-card .flash, .public .p-card .fm { border-radius: 12px; box-shadow: none; border: 1px solid var(--border); }
.public .p-card .p-note { border-radius: 12px; box-shadow: none; border: 1px solid var(--border); }
body.fold-public .card, body.fold-public .rbox { border-radius: var(--r-card); box-shadow: none; }

/* Floating look switch for pages with no header (public pages) */
.cm-look-float {
  position: fixed; top: 12px; right: 12px; z-index: 200; min-height: 44px; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 8px; border-radius: 12px; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); font: 600 14px var(--font-body);
}
.cm-look-float svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.cm-look-float:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ==========================================================================
   Kit classes for new markup
   ========================================================================== */
.cm-box { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cm-box > h2, .cm-box-head h2 { margin: 0; padding: 2px 4px; font-family: var(--font-body); font-size: 15px; font-weight: 700; letter-spacing: 0; }
.cm-box-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 2px 4px; }
.cm-box-head a, .cm-more { font-size: 14px; font-weight: 700; color: var(--good); min-height: 44px; display: inline-flex; align-items: center; }
.cm-sub { font-size: 12px; color: var(--muted); }

.cm-card {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 56px; padding: 10px 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; color: var(--text);
  text-decoration: none; text-align: left; cursor: pointer; box-sizing: border-box; min-width: 0;
}
a.cm-card:hover, button.cm-card:hover { border-color: var(--muted); text-decoration: none; color: var(--text); }
.cm-card .cm-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cm-card .cm-title { font-weight: 700; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.cm-card .cm-meta { font-size: 12px; color: var(--muted); }
.cm-card .cm-go { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.cm-urgent { background: var(--ubg); border-color: var(--uln); }
.cm-important { background: var(--ibg); border-color: var(--iln); }
.cm-later { background: var(--lbg); border-color: var(--lln); }
.cm-done { background: var(--chip); border-color: var(--good); }

.cm-chip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; background: var(--bg-elevated); color: var(--text); }
.cm-chip.cm-urgent { background: var(--uk); color: var(--onk); border: 0; }
.cm-chip.cm-important { background: var(--ik); color: var(--onk); border: 0; }
.cm-chip.cm-later { background: var(--lk); color: var(--onk); border: 0; }
.cm-chip.cm-done { background: var(--chip); color: var(--good); border: 0; }

.cm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 12px; font-weight: 700; font-size: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; }
.cm-btn:hover { text-decoration: none; background: var(--bg-elevated); color: var(--text); }
.cm-btn-main { background: var(--good); color: var(--on-good); border: 0; font-weight: 800; }
.cm-btn-main:hover { background: var(--accent-fill-2); color: var(--on-good); }

.cm-hero { background: var(--hero); color: #FFFFFF; border-radius: 16px; padding: 18px 22px; display: flex; flex-direction: column; gap: 10px; }
body.fold .cm-hero h1, body.fold-public .cm-hero h1, .cm-hero h1 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1.08; letter-spacing: -0.02em; color: #FFFFFF; max-width: 24ch; }
.cm-hero .cm-hero-top { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; flex-wrap: wrap; }
.cm-hero .cm-hero-sub { font-size: 16px; line-height: 1.4; }
.cm-hero .cm-btn-main { background: #FFFFFF; color: #17705B; min-height: 52px; padding: 0 28px; font-size: 16px; }
.cm-hero .cm-btn { background: transparent; color: #FFFFFF; border: 2px solid rgba(255,255,255,.75); }
.cm-hero .cm-btn-main:hover { background: #FFFFFF; color: #17705B; }
.cm-hero .cm-chip { background: rgba(255,255,255,.18); color: #FFFFFF; }
.cm-hero .cm-chip.cm-urgent { background: var(--uk); color: var(--onk); }
.cm-hero .cm-chip.cm-important { background: var(--ik); color: var(--onk); }

.cm-num { display: block; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; color: var(--text); text-decoration: none; }
a.cm-num:hover { border-color: var(--muted); text-decoration: none; color: var(--text); }
.cm-num .cm-num-label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
.cm-num .cm-num-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cm-num .cm-num-big { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cm-num .cm-num-delta { font-size: 13px; font-weight: 600; color: var(--good); }
.cm-num .cm-num-delta.cm-drop { color: var(--lk); }

.cm-bar { display: block; height: 10px; border-radius: 5px; background: var(--bg-elevated); overflow: hidden; }
.cm-bar > span { display: block; height: 100%; background: var(--good); border-radius: 5px; }

.cm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cm-table th { text-align: left; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); }
.cm-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cm-table tr:last-child td { border-bottom: 0; }

.cm-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--bg); border-left: 1px solid var(--border); box-shadow: -12px 0 32px rgba(0,0,0,.14); overflow-y: auto; padding: 16px 20px 28px; z-index: 150; }

.cm-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cm-cols { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.cm-cols > .cm-side { flex: 1 1 250px; display: flex; flex-direction: column; gap: 12px; }
.cm-cols > .cm-main { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 720px) { .cm-grid-3 { grid-template-columns: minmax(0, 1fr); } .cm-hero h1 { font-size: 28px; } }

@media (prefers-reduced-motion: reduce) {
  body.fold *, body.fold-public *, .cm-look-float { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Touch size: small controls still get a 44px target (breaker pass). */
body.fold .sa-root .sa-chip, body.fold .help-btn { min-height: 44px; }
body.fold .sr-link { display: inline-flex; align-items: center; min-height: 44px; }
