/* Poll Check. Light = collateral palette, dark = website palette, glitter last so it wins. */
  :root {
    --ground:      #FAFAF8;
    --ground-image: none;
    --surface:     #FFFFFF;
    --ink:         #0D1B2A;
    --muted:       #4A5568;
    --line:        rgba(13, 27, 42, .12);
    --accent:      #E27124;
    --accent-soft: rgba(226, 113, 36, .12);

    --header-bg:   #023160;
    --header-image: none;
    --header-ink:  #FAFAF8;
    --header-sub:  rgba(250, 250, 248, .72);

    --good: #2E7D4F;  --good-bg: #E7F2EB;
    --warn: #A96A12;  --warn-bg: #FAF0DF;
    --crit: #B23A48;  --crit-bg: #FAE8EA;
    --orange: #E27124; --red: #C0392B; --grey: #8A94A3;
    --b-green: #15803D; --b-orange: #E27124; --b-red: #DC2626; --b-blue: #245EA4; --b-tint: 14%; --b-line: 55%;
    --tl-num: #E27124; --tl-line: rgba(13, 27, 42, .12); --tl-muted: #64748B; --tl-now-bg: rgba(226, 113, 36, .07); --tl-now-line: rgba(226, 113, 36, .4); --tl-now-head: rgba(226, 113, 36, .1);
    --tg-bg: rgba(63, 208, 127, .14); --tg-line: rgba(21, 128, 61, .45); --tg-ink: #15803D;
    --tb-bg: rgba(36, 94, 164, .12);  --tb-line: rgba(36, 94, 164, .5);  --tb-ink: #245EA4;
    --tr-bg: rgba(220, 38, 38, .10);  --tr-line: rgba(220, 38, 38, .5);  --tr-ink: #DC2626;

    --display: "Inter", system-ui, sans-serif;
    --body:    "Source Sans Pro", system-ui, -apple-system, sans-serif;
    --mono:    "Inter", system-ui, sans-serif;

    --radius: 6px;
    --card-shadow: none;
    --tracking: -0.01em;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-mode]) {
      --ground: #080d14; --surface: #0f1d35; --ink: #FFFFFF;
      --muted: #cbd5e1;  --line: #1e2a3a;    --accent: #ea580c;
      --accent-soft: rgba(234, 88, 12, .16);
      --header-bg: #0a1628; --header-ink: #FFFFFF; --header-sub: #cbd5e1;
      --good: #6DBF8C; --good-bg: #16261C;
      --warn: #D8A455; --warn-bg: #2A2113;
      --crit: #E58592; --crit-bg: #2B1518;
      --orange: #F4A261; --red: #F07A85; --grey: #64748B;
      --b-green: #22C55E; --b-orange: #F97316; --b-red: #EF4444; --b-blue: #5B9CF6; --b-tint: 12%; --b-line: 80%;
    --tl-num: #E27124; --tl-line: rgba(148, 163, 184, .14); --tl-muted: #64748B; --tl-now-bg: rgba(226, 113, 36, .07); --tl-now-line: rgba(226, 113, 36, .4); --tl-now-head: rgba(226, 113, 36, .1);
    --tg-bg: rgba(20, 64, 42, .5);    --tg-line: rgba(63, 208, 127, .4);  --tg-ink: #3FD07F;
    --tb-bg: rgba(36, 94, 164, .28);  --tb-line: rgba(36, 94, 164, .65);  --tb-ink: #6AA9E9;
    --tr-bg: rgba(127, 29, 29, .42);  --tr-line: rgba(239, 68, 68, .5);   --tr-ink: #F87171;
      color-scheme: dark;
    }
  }

  :root[data-mode="light"] { color-scheme: light; }

  :root[data-mode="dark"] {
    --ground: #080d14; --surface: #0f1d35; --ink: #FFFFFF;
    --muted: #cbd5e1;  --line: #1e2a3a;    --accent: #ea580c;
    --accent-soft: rgba(234, 88, 12, .16);
    --header-bg: #0a1628; --header-ink: #FFFFFF; --header-sub: #cbd5e1;
    --good: #6DBF8C; --good-bg: #16261C;
    --warn: #D8A455; --warn-bg: #2A2113;
    --crit: #E58592; --crit-bg: #2B1518;
    --orange: #F4A261; --red: #F07A85; --grey: #64748B;
    --b-green: #22C55E; --b-orange: #F97316; --b-red: #EF4444; --b-blue: #5B9CF6; --b-tint: 12%; --b-line: 80%;
    --tl-num: #E27124; --tl-line: rgba(148, 163, 184, .14); --tl-muted: #64748B; --tl-now-bg: rgba(226, 113, 36, .07); --tl-now-line: rgba(226, 113, 36, .4); --tl-now-head: rgba(226, 113, 36, .1);
    --tg-bg: rgba(20, 64, 42, .5);    --tg-line: rgba(63, 208, 127, .4);  --tg-ink: #3FD07F;
    --tb-bg: rgba(36, 94, 164, .28);  --tb-line: rgba(36, 94, 164, .65);  --tb-ink: #6AA9E9;
    --tr-bg: rgba(127, 29, 29, .42);  --tr-line: rgba(239, 68, 68, .5);   --tr-ink: #F87171;
    color-scheme: dark;
  }

  :root[data-mode="glitter"] {
    --ground:      #EFE4FB;
    --ground-image: linear-gradient(170deg, #E6D8FA 0%, #F2E4FB 42%, #FDEBF6 100%);
    --surface:     #FFFFFF;
    --ink:         #3A1050;
    --muted:       #96579B;
    --line:        #F6CCE6;
    --accent:      #D6197D;
    --accent-soft: #FDE7F3;

    --header-bg:   #C4116E;
    --header-image: linear-gradient(100deg, #B60F66 0%, #E32C93 55%, #F468B8 100%);
    --header-ink:  #FFFFFF;
    --header-sub:  #FFD3EC;

    --good: #1E8E6A; --good-bg: #DFF4EC;
    --warn: #B4690E; --warn-bg: #FCEEDA;
    --crit: #D11149; --crit-bg: #FCE1EA;
    --orange: #F08A24; --red: #D11149; --grey: #B48BBE;
    --b-green: #1E8E6A; --b-orange: #F08A24; --b-red: #D11149; --b-blue: #3B7DD8; --b-tint: 14%; --b-line: 55%;
    --tl-num: #D6197D; --tl-line: #F6CCE6; --tl-muted: #96579B; --tl-now-bg: rgba(214, 25, 125, .06); --tl-now-line: rgba(214, 25, 125, .4); --tl-now-head: rgba(214, 25, 125, .1);
    --tg-bg: rgba(30, 142, 106, .14);  --tg-line: rgba(30, 142, 106, .45);  --tg-ink: #1E8E6A;
    --tb-bg: rgba(59, 125, 216, .12);  --tb-line: rgba(59, 125, 216, .5);   --tb-ink: #3B7DD8;
    --tr-bg: rgba(209, 17, 73, .10);   --tr-line: rgba(209, 17, 73, .5);    --tr-ink: #D11149;

    --display: "Fredoka", "Inter", system-ui, sans-serif;
    --radius: 16px;
    --card-shadow: 0 4px 18px rgba(198, 30, 130, .10);
    --tracking: 0em;
    color-scheme: light;
  }

  /* ---------- base ---------- */
  * { box-sizing: border-box; }

  body {
    background-color: var(--ground);
    background-image: var(--ground-image);
    background-attachment: fixed;
    color: var(--ink);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    padding: 0 0 72px;
    transition: background-color .3s ease, color .3s ease;
  }

  #sparkles {
    position: fixed; inset: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 0; opacity: 0; transition: opacity .45s ease;
  }
  :root[data-mode="glitter"] #sparkles { opacity: 1; }

  .page {
    position: relative; z-index: 1;
    max-width: 1720px; margin: 0 auto; padding: 0 28px;
    display: flex; flex-direction: column; gap: 22px;
  }

  h1, h2, .eyebrow, .poll-id, .btn { font-family: var(--display); letter-spacing: var(--tracking); }
  p { margin: 0; }

  /* ---------- header band ---------- */
  .band {
    position: relative; z-index: 1;
    background-color: var(--header-bg); background-image: var(--header-image);
    color: var(--header-ink); padding: 20px 0 22px; margin-bottom: 24px;
    transition: background-color .3s ease;
  }
  .band-inner {
    max-width: 1720px; margin: 0 auto; padding: 0 32px;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  }
  .brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
  .brand img { height: 24px; width: auto; display: block; }
  .brand .text { padding-left: 16px; border-left: 1px solid rgba(255,255,255,.28); }
  .eyebrow { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; color: var(--header-sub); }
  h1 { font-size: clamp(22px, 4vw, 30px); font-weight: 600; line-height: 1.1; margin: 4px 0 0; text-wrap: balance; }
  .band .subtitle { color: var(--header-sub); font-size: 13.5px; margin-top: 6px; font-variant-numeric: tabular-nums; }
  .band-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

  .btn {
    font-size: 13px; font-weight: 600; border-radius: 999px; padding: 9px 16px; cursor: pointer;
    border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.14); color: var(--header-ink);
    transition: background-color .2s ease;
  }
  .btn:hover { background: rgba(255,255,255,.22); }
  .btn:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }

  .modes {
    display: inline-flex; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28);
    border-radius: 999px; padding: 3px; gap: 2px;
  }
  .modes button {
    display: grid; place-items: center; background: transparent; border: 0; border-radius: 999px;
    width: 38px; height: 32px; cursor: pointer; color: var(--header-ink);
    transition: background-color .2s ease, transform .2s ease, color .2s ease;
  }
  .modes button svg { width: 16px; height: 16px; display: block; }
  .modes button:hover { background: rgba(255,255,255,.18); }
  .modes button[aria-pressed="true"] { background: #FFFFFF; color: var(--accent); transform: scale(1.02); }
  .modes button:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }

  /* ---------- sections ---------- */
  h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 12px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
  h2 > span:first-child { white-space: nowrap; }
  h2 .sub { text-transform: none; letter-spacing: 0; font-weight: 400; }

  .callout {
    background: var(--accent-soft); border-radius: var(--radius); padding: 14px 18px;
    font-size: 15px; color: var(--ink); transition: border-radius .3s ease;
  }
  .callout strong { font-family: var(--display); font-weight: 600; }

  /* ---------- badge ---------- */
  .badge {
    width: 28px; height: 26px; border-radius: 6px; flex: none;
    display: inline-grid; place-items: center;
    font-family: var(--display); font-size: 12px; font-weight: 700; letter-spacing: 0;
    border: 1px solid transparent;
  }
  .badge svg { width: 13px; height: 13px; }
  .badge { position: relative; }
  .badge .rnd {
    position: absolute; right: -6px; top: -6px; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 999px;
    font-size: 9px; line-height: 12px; background: var(--surface); border: 1px solid currentColor; color: inherit; font-weight: 700;
  }
  .badge.green  { color: var(--b-green);  background: color-mix(in srgb, var(--b-green) var(--b-tint), transparent);  border-color: color-mix(in srgb, var(--b-green) var(--b-line), transparent); }
  .badge.orange { color: var(--b-orange); background: color-mix(in srgb, var(--b-orange) var(--b-tint), transparent); border-color: color-mix(in srgb, var(--b-orange) var(--b-line), transparent); }
  .badge.blue   { color: var(--b-blue);   background: color-mix(in srgb, var(--b-blue) var(--b-tint), transparent);   border-color: color-mix(in srgb, var(--b-blue) var(--b-line), transparent); }
  .badge.red    { color: var(--b-red);    background: color-mix(in srgb, var(--b-red) var(--b-tint), transparent);    border-color: color-mix(in srgb, var(--b-red) var(--b-line), transparent); }
  .badge.hollow { background: transparent; border: 1.5px dashed color-mix(in srgb, var(--b-red) 85%, transparent); }

  /* ---------- poll rows ---------- */
  .list { display: flex; flex-direction: column; gap: 8px; }
  .row {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--card-shadow);
    transition: border-radius .3s ease, box-shadow .3s ease, border-color .2s ease;
  }
  .row.open { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
  .row-head {
    display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
    padding: 14px 18px; background: none; border: 0; color: var(--ink); cursor: pointer; font: inherit;
    border-radius: var(--radius);
  }
  .row-head:hover { background: var(--accent-soft); }
  .row-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .row-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
  .row-main .name { font-family: var(--display); font-size: 16.5px; font-weight: 600; line-height: 1.3; letter-spacing: var(--tracking); }
  .row-main .name .poll-id { margin-right: 8px; }
  .row-main .state { font-size: 14px; color: var(--muted); }
    .row-due { font-family: var(--mono); font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
  .row-due.today { color: var(--orange); font-weight: 600; }
  .chev { width: 18px; height: 18px; flex: none; color: var(--muted); transition: transform .2s ease; }
  .row.open .chev { transform: rotate(180deg); }

  .panel { border-top: 1px solid var(--line); padding: 16px 18px 18px; display: grid; gap: 14px; }
  .panel[hidden] { display: none; }
  .controls { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
  .field { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .field > label { font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: var(--tracking); }

  .toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
  .toggle button {
    border: 0; padding: 8px 16px; font-family: var(--display); font-size: 14px; font-weight: 600;
    background: var(--surface); color: var(--muted); cursor: pointer; transition: background-color .2s ease, color .2s ease;
  }
  .toggle button + button { border-left: 1px solid var(--line); }
  .toggle button:hover { color: var(--ink); }
  .toggle button.on { background: var(--accent); color: #FFFFFF; }
  .toggle button.on.good { background: var(--good); color: #FFFFFF; }
  .toggle button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

  .info { font-size: 14.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 18px; }
  .info b { color: var(--ink); font-weight: 600; }
  .round { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: calc(var(--radius) / 1.5); }
  .round.past { padding: 8px 14px; font-size: 14px; color: var(--muted); }
  .round .label { font-family: var(--display); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
  .round .label .plan { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 8px; }
  .done-line { font-size: 15px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
  .linkbtn { background: none; border: 0; padding: 0; font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
  .linkbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

  .notes-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; }
  .notes-row input[type="text"] {
    font-family: var(--body); font-size: 15px; color: var(--ink); background: var(--surface);
    border: 1px solid var(--line); border-radius: calc(var(--radius) / 2); padding: 9px 12px; width: 100%; min-width: 0;
  }
  .notes-row input[type="text"]::placeholder { color: var(--muted); opacity: .8; }
  .notes-row input[type="text"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
  .updated { font-family: var(--mono); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

  @media (max-width: 720px) {
    .brand .text { padding-left: 12px; }
    .row-head { padding: 12px 14px; gap: 12px; flex-wrap: wrap; }
    .row-main { flex-basis: calc(100% - 38px); }
    .row-due { margin-left: 38px; }
    .panel { padding: 14px; }
    .notes-row { grid-template-columns: 1fr; }
    .controls { gap: 14px; }
  }
  @media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

  /* ---------- add box, hidden list ---------- */
  .addbox, .hiddenlist { border-top: 1px solid var(--line); padding-top: 18px; }
  .addbox .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .addbox input { font-family: var(--body); font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) / 2); padding: 7px 10px; min-width: 0; }
  .addbox #addId { width: 110px; } .addbox #addName { flex: 1 1 260px; } .addbox #addDue { width: 160px; }
  .addbox input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
  .hiddenlist p { font-size: 14.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 18px; }
  .hiddenlist .linkbtn { font-size: 13px; }
  .action { font-family: var(--display); font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
  .action:hover { border-color: var(--accent); color: var(--accent); }
  .action:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
  .hint { font-size: 13.5px; color: var(--muted); }
  .hint.ok { color: var(--good); }
  .hint.bad { color: var(--b-red); }
  .empty { font-size: 15px; color: var(--muted); padding: 4px 0; }
  .row-head:disabled { cursor: default; }

  .hide-line { font-size: 13.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

  /* ---------- timeline (sizes and colors read off app.coefficient.org/console/home) ---------- */
  .tl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--tl-line); border-radius: 12px; box-shadow: var(--card-shadow); }
  .tl { min-width: 1000px; display: grid; grid-template-columns: repeat(var(--days), minmax(0, 1fr)); padding-bottom: 12px; }
  .tl .day { height: 35px; padding: 8px 12px; font-family: var(--display); font-size: 12px; font-weight: 400; color: var(--tl-muted); border-bottom: 1px solid var(--tl-line); border-left: 1px solid var(--tl-line); white-space: nowrap; letter-spacing: 0; }
  .tl .day:first-child { border-left: 0; }
  .tl .day b { font-weight: 600; margin-right: 6px; }
  .tl .day span { font-variant-numeric: tabular-nums; }
  .tl .day.today { color: var(--tl-num); background: var(--tl-now-head); }
  .tl .cell { border-left: 1px solid var(--tl-line); min-height: 45px; }
  .tl .cell.c1 { border-left: 0; }
  .tl .cell.today { background: var(--tl-now-bg); border-left: 1px solid var(--tl-now-line); }
  .tl .lane { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; position: relative; }
  .tl .lane:first-of-type .cell { padding-top: 12px; min-height: 57px; }
  .tl .lane .cells { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; grid-row: 1; }
  .tl .bar {
    grid-row: 1; align-self: center; margin: 0 5px 0 0; z-index: 1; min-width: 0; height: 38px;
    display: flex; align-items: center; gap: 10px; padding: 0 12px;
    border-radius: 5px; border: 1px solid transparent; cursor: pointer; text-align: left;
    font-family: var(--display); font-size: 13px; color: var(--ink); background: var(--surface);
  }
  .tl .lane:first-of-type .bar { margin-top: 12px; }
  .tl .bar.green  { background: var(--tg-bg); border-color: var(--tg-line); }
  .tl .bar.blue   { background: var(--tb-bg); border-color: var(--tb-line); }
  .tl .bar.red    { background: var(--tr-bg); border-color: var(--tr-line); }
  .tl .bar.hollowbar { background: transparent; border-style: dashed; }
  .tl .bar.cont { border-left-style: dashed; border-top-left-radius: 0; border-bottom-left-radius: 0; }
  .tl .bar.contr { border-right-style: dashed; margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
  .tl .bar:hover { filter: brightness(1.12); }
  .tl .bar:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
  .tl .bar .badge { width: 22px; height: 20px; font-size: 10.5px; border-radius: 5px; }
  .tl .bar .badge svg { width: 11px; height: 11px; }
  .tl .bar .poll-id { font-size: 12px; font-weight: 400; color: var(--tl-num); margin-right: 0; }
  .tl .bar .name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; display: flex; gap: 10px; align-items: baseline; }
  .tl .bar .name .nm { overflow: hidden; text-overflow: ellipsis; }
  .tl .bar .due { margin-left: auto; font-size: 11.5px; font-weight: 400; white-space: nowrap; font-variant-numeric: tabular-nums; padding-left: 10px; }
  .tl .bar.green .due { color: var(--tg-ink); } .tl .bar.blue .due { color: var(--tb-ink); } .tl .bar.red .due { color: var(--tr-ink); }
  .tl .bar .due.muted { color: var(--tl-muted); }
  .tl .bar.selected { border-width: 2px; border-style: solid; box-shadow: 0 0 0 3px color-mix(in srgb, var(--sel) 25%, transparent); }
  .tl .lane.has-editor .cell { background: color-mix(in srgb, var(--sel) 6%, transparent); }
  .tl .editor { grid-column: 1 / -1; position: relative; margin: 6px 10px 14px; background: var(--surface); border: 2px solid var(--sel); border-radius: var(--radius); padding: 16px 18px 18px; display: grid; gap: 14px; }
  .tl .editor::before { content: ''; position: absolute; top: -9px; left: var(--caret, 24px); width: 14px; height: 14px; background: var(--surface); border-left: 2px solid var(--sel); border-top: 2px solid var(--sel); transform: rotate(45deg); }
  .tl .editor .ed-head { display: flex; align-items: center; gap: 12px; }
  .tl .editor .ed-head .name { font-family: var(--display); font-size: 16px; font-weight: 600; flex: 1; min-width: 0; }
  .tl .editor .ed-head .name .poll-id { margin-right: 8px; }
  .tl .editor .ed-head .state-text { font-size: 14px; color: var(--muted); display: block; font-family: var(--body); font-weight: 400; margin-top: 2px; }
  .tl .editor .close { background: none; border: 1px solid var(--line); border-radius: 999px; width: 30px; height: 30px; display: grid; place-items: center; color: var(--muted); cursor: pointer; flex: none; }
  .tl .editor .close:hover { color: var(--ink); border-color: var(--muted); }
  .tl .editor .close svg { width: 14px; height: 14px; }
  .sel-green { --sel: var(--tg-ink); } .sel-orange { --sel: var(--b-orange); } .sel-blue { --sel: var(--tb-ink); } .sel-red { --sel: var(--tr-ink); }
  .tl .bar.contr { border-right-style: dashed; margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
  [hidden] { display: none !important; }

  @media (max-width: 720px) { .page, .band-inner { padding: 0 16px; } }

  /* ---------- status counts (click to filter) ---------- */
  .stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
  .stat { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--tl-line); border-radius: 10px; padding: 10px 14px; min-width: 0; cursor: pointer; text-align: left; font: inherit; color: var(--ink); transition: border-color .15s ease; }
  .stat:hover { border-color: var(--muted); }
  .stat:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
  .stat[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
  .stat .num { display: inline-grid; place-items: center; min-width: 52px; height: 38px; padding: 0 12px; border-radius: 5px; border: 1px solid transparent; font-family: var(--display); font-size: 20px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; flex: none; color: var(--ink); }
  .stat .lbl { font-family: var(--display); font-size: 13px; font-weight: 500; color: var(--muted); line-height: 1.25; }
  .stat .lbl small { display: block; font-size: 11.5px; font-weight: 400; color: var(--accent); margin-top: 2px; }
  .stat.all .num { background: color-mix(in srgb, var(--ink) 6%, transparent); border-color: var(--tl-line); }
  .stat.green .num { background: var(--tg-bg); border-color: var(--tg-line); color: var(--tg-ink); }
  .stat.blue .num { background: var(--tb-bg); border-color: var(--tb-line); color: var(--tb-ink); }
  .stat.red .num { background: var(--tr-bg); border-color: var(--tr-line); color: var(--tr-ink); }
  .stat.dashed .num { background: transparent; border: 1px dashed var(--tr-line); color: var(--tr-ink); }
  .stat.zero .num { opacity: .55; }
  @media (max-width: 900px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat.all { grid-column: 1 / -1; } }
