/* The console shell: tokens, layout and components of the redesigned admin.
   Loaded after admin.css, only when the console shell renders (templates/console/base.html).
   Everything new is prefixed c-; classic pages shown inside this shell keep their admin.css classes
   and pick up the new palette through the bridge at the end of the tokens block. */

/* ---- fonts (local files, SIL Open Font License; see static/fonts) ---- */
@font-face { font-family:"Inter"; font-style:normal; font-weight:100 900; font-display:swap; src:url("fonts/inter-cyrillic-ext.woff2") format("woff2");
  unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family:"Inter"; font-style:normal; font-weight:100 900; font-display:swap; src:url("fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family:"Inter"; font-style:normal; font-weight:100 900; font-display:swap; src:url("fonts/inter-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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:"Inter"; font-style:normal; font-weight:100 900; font-display:swap; src:url("fonts/inter-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:"Space Grotesk"; font-style:normal; font-weight:300 700; font-display:swap; src:url("fonts/space-grotesk-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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:"Space Grotesk"; font-style:normal; font-weight:300 700; font-display:swap; src:url("fonts/space-grotesk-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; }

/* ---- tokens ---- */
:root {
  color-scheme:light;
  --c-font:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --c-font-display:"Space Grotesk","Inter",system-ui,sans-serif;

  --c-ground:#F2F3F6; --c-surface:#FFFFFF; --c-inset:#ECEEF2;
  --c-line:#E2E5EB; --c-line-strong:#CBD0D9;
  --c-ink:#141821; --c-ink-quiet:#4B5261; --c-ink-soft:#3F4654;
  --c-blue:#2B50E0; --c-blue-strong:#2443C4; --c-on-blue:#FFFFFF; --c-link:#2443C4; --c-link-hover:#16308F;
  --c-blue-tint:#EAF0FF; --c-choice:#F4F7FF; --c-seg-on:#FFFFFF; --c-subtle:#F7F8FA; --c-amber-tint:#FFF8EC; --c-amber-line:#E8C98F;
  --c-danger:#A61B1B; --c-danger-line:#E3B4B4; --c-danger-tint:#FDE8E8;
  --c-ok:#0F6B3F; --c-warn:#8A4B00;
  --c-control:#FFFFFF; --c-control-line:#CBD0D9; --c-switch-off:#737B8C;
  --c-tip:#141821; --c-tip-ink:#FFFFFF; --c-tip-line:#141821;
  --c-meter-todo:#D9DDE5; --c-meter-done:#1E9E61; --c-meter-now:#2B50E0;
  --c-focus:#2B50E0;
  --c-shadow:0 12px 32px rgba(20,24,33,.18);

  /* The rail is dark in both themes. */
  --c-rail:#111520; --c-rail-line:#111520; --c-rail-ink:#C9CEDA; --c-rail-quiet:#8E96A8; --c-rail-strong:#FFFFFF;
  --c-rail-hover:#181E2C; --c-rail-active:#1F2638; --c-rail-block:#1A2030; --c-rail-avatar:#2A3145; --c-rail-focus:#AFC0FF;
  --c-count:#FFC24D; --c-on-count:#3A2500;
  --c-tab:#4B5261; --c-tab-current:#2443C4;
  /* The band of a run in progress is dark in both themes too. */
  --c-band:#141821; --c-band-line:#141821; --c-band-block:#1D2333; --c-band-ink:#FFFFFF; --c-band-quiet:#C9CEDA; --c-band-label:#AFC0FF;
  --c-band-dot:#6E8BFF; --c-band-todo:#2E3547; --c-band-now:#FFFFFF; --c-band-btn:#FFFFFF; --c-band-btn-hover:#E4E8F2; --c-band-btn-ink:#141821;

  /* Pill tones: background / text. */
  --c-neutral-bg:#ECEEF2; --c-neutral-fg:#3F4654;
  --c-teal-bg:#E2F3F5; --c-teal-fg:#0B5E6B;
  --c-blue-bg:#EAF0FF; --c-blue-fg:#1F3DB8;
  --c-green-bg:#E5F4EC; --c-green-fg:#0F6B3F;
  --c-amber-bg:#FFF1DB; --c-amber-fg:#8A4B00;
  --c-red-bg:#FDE8E8; --c-red-fg:#A61B1B;
  --c-brown-bg:#F5EAE3; --c-brown-fg:#7A3A12;
  --c-violet-bg:#EFEAFB; --c-violet-fg:#56389A;
  --c-outline-line:#B4BBC8; --c-outline-fg:#3F4654;
}
@media (prefers-color-scheme:dark) {
  :root {
    color-scheme:dark;
    --c-ground:#0F1218; --c-surface:#171B24; --c-inset:#1F2430;
    --c-line:#2A3040; --c-line-strong:#3A4257;
    --c-ink:#E8EAF0; --c-ink-quiet:#A7AFBF; --c-ink-soft:#C9CEDA;
    --c-blue:#7C96FF; --c-blue-strong:#9DB2FF; --c-on-blue:#0B1020; --c-link:#9DB2FF; --c-link-hover:#C3CFFF;
    --c-blue-tint:#1B2750; --c-choice:#1B2338; --c-seg-on:#2F3850; --c-subtle:#1B202B; --c-amber-tint:#2B2110; --c-amber-line:#5C4520;
    --c-danger:#FFA3A3; --c-danger-line:#7A3434; --c-danger-tint:#3B1717;
    --c-ok:#7EDCA6; --c-warn:#FFC878;
    --c-control:#1F2430; --c-control-line:#3A4257; --c-switch-off:#6B7488;
    --c-tip:#262C3A; --c-tip-ink:#E8EAF0; --c-tip-line:#3A4257;
    --c-meter-todo:#2E3547; --c-meter-done:#4FD08B; --c-meter-now:#7C96FF;
    --c-focus:#9DB2FF;
    --c-shadow:0 12px 32px rgba(0,0,0,.5);
    --c-rail-line:#2A3040;
    --c-tab:#A7AFBF; --c-tab-current:#9DB2FF;
    --c-band:#1D2333; --c-band-line:#2F3850; --c-band-block:#2A3145; --c-band-dot:#7C96FF; --c-band-todo:#3A4257;
    --c-band-btn:#E8EAF0; --c-band-btn-hover:#FFFFFF; --c-band-btn-ink:#0F1218;

    --c-neutral-bg:#262C3A; --c-neutral-fg:#C9CEDA;
    --c-teal-bg:#0F2F35; --c-teal-fg:#8FDCE8;
    --c-blue-bg:#1B2750; --c-blue-fg:#AFC0FF;
    --c-green-bg:#16301F; --c-green-fg:#7EDCA6;
    --c-amber-bg:#3A2A0E; --c-amber-fg:#FFC878;
    --c-red-bg:#3B1717; --c-red-fg:#FFA3A3;
    --c-brown-bg:#33231A; --c-brown-fg:#F0B893;
    --c-violet-bg:#2A2147; --c-violet-fg:#C9B6FF;
    --c-outline-line:#5B6375; --c-outline-fg:#C9CEDA;
  }
}
/* Bridge: classic pages inside this shell read the new palette through their old token names. */
:root {
  --bg:var(--c-ground); --card:var(--c-surface); --ink:var(--c-ink); --muted:var(--c-ink-quiet); --line:var(--c-line);
  --accent:var(--c-blue); --on-accent:var(--c-on-blue); --ok:var(--c-ok); --warn:var(--c-warn); --bad:var(--c-danger);
  --radius:10px; --radius-lg:14px;
}

/* ---- base ---- */
body { font:14px/1.45 var(--c-font); background:var(--c-ground); color:var(--c-ink); -webkit-text-size-adjust:100%; }
.c-main :is(h1, h2), .c-display { font-family:var(--c-font-display); font-weight:600; letter-spacing:-.01em; }
.c-main h1 { font-size:28px; line-height:1.2; }
.c-main h2 { font-size:18px; line-height:1.3; }
.c-main a { color:var(--c-link); }
.c-main a:hover { color:var(--c-link-hover); }
.c-sr { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.c-icon { flex:none; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }

/* One focus ring everywhere; lighter on the dark rail so it stays visible. */
:focus-visible { outline:3px solid var(--c-focus); outline-offset:2px; }
.c-rail, .c-topbar { --c-focus:var(--c-rail-focus); }
.c-skip { position:absolute; left:12px; top:-80px; z-index:100; display:inline-flex; align-items:center; min-height:44px; padding:0 16px;
  border-radius:10px; background:var(--c-surface); color:var(--c-ink); font-weight:600; text-decoration:none; box-shadow:var(--c-shadow); }
.c-skip:focus { top:12px; }

/* ---- shell ---- */
.c-shell { display:grid; grid-template-columns:240px minmax(0,1fr); min-height:100vh; min-height:100dvh; }
.c-rail { position:sticky; top:0; z-index:20; box-sizing:border-box; height:100vh; height:100dvh; overflow-y:auto; padding:20px 14px;
  display:flex; flex-direction:column; gap:18px; background:var(--c-rail); border-right:1px solid var(--c-rail-line);
  color:var(--c-rail-ink); font-size:14px; line-height:1.4; }
.c-main { --pad-x:32px; --pad-top:28px; --pad-bottom:40px;
  box-sizing:border-box; width:100%; max-width:1240px; margin:0 auto; padding:var(--pad-top) var(--pad-x) var(--pad-bottom); }
.c-main:focus { outline:none; }
/* admin.css styles every <header> as the classic top bar; inside the console a header is a plain block. */
.c-main header { display:block; padding:0; background:transparent; border:0; }
.c-main .c-pagehead { display:flex; flex-direction:column; flex-wrap:nowrap; align-items:stretch; gap:2px; }
.c-pagehead > p { margin:0; color:var(--c-ink-quiet); }
.c-topbar, .c-tabbar { display:none; }

.c-brand { display:flex; align-items:center; gap:10px; min-height:38px; padding:4px 8px; border-radius:8px; color:var(--c-rail-strong); text-decoration:none;
  font-family:var(--c-font-display); font-size:17px; font-weight:600; letter-spacing:-.01em; }
.c-brand:hover { text-decoration:none; }
.c-brand__mark { width:30px; height:30px; flex:none; display:flex; align-items:center; justify-content:center; border-radius:9px; background:#2B50E0; }
.c-brand__mark svg { fill:#FFFFFF; }

.c-nav { display:flex; flex-direction:column; gap:18px; }
.c-nav ul { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:2px; }
.c-nav li + li { margin-top:0; }
.c-nav__label { display:block; padding:0 10px 6px; font-size:11px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--c-rail-quiet); }
.c-nav__item { display:flex; align-items:center; gap:10px; min-height:44px; padding:0 10px; border-radius:8px; color:var(--c-rail-ink); font-weight:500; text-decoration:none; }
.c-nav__item:hover { background:var(--c-rail-hover); color:var(--c-rail-strong); text-decoration:none; }
.c-nav__item[aria-current=page] { background:var(--c-rail-active); color:var(--c-rail-strong); }
.c-nav__text { flex:1 1 auto; min-width:0; }
.c-count { min-width:22px; height:22px; box-sizing:border-box; padding:0 6px; display:inline-flex; align-items:center; justify-content:center;
  border-radius:11px; background:var(--c-count); color:var(--c-on-count); font-size:12px; font-weight:600; line-height:1; }
.c-rail__new { width:100%; }
.c-rail__new[aria-current=page] { box-shadow:0 0 0 2px var(--c-rail), 0 0 0 4px var(--c-rail-focus); }

.c-live { display:flex; align-items:center; gap:8px; min-height:44px; padding:0 12px; border-radius:8px; background:#1B2750; color:#FFFFFF; font-size:13px; font-weight:600; text-decoration:none; }
.c-live:hover { background:#22306A; text-decoration:none; }
.c-live__dot { width:8px; height:8px; flex:none; border-radius:50%; background:#6E8BFF; animation:c-pulse 1.6s ease-in-out infinite; }
@keyframes c-pulse { 50% { opacity:.35; } }
@media (prefers-reduced-motion:reduce) { .c-live__dot { animation:none; } }

.c-rail__foot { margin-top:auto; display:flex; flex-direction:column; gap:12px; }
.c-allow { --allow-bg:var(--c-rail-block); --allow-quiet:var(--c-rail-quiet); --allow-ink:var(--c-rail-strong); --allow-info:#AFC0FF;
  position:relative; padding:12px; border-radius:10px; background:var(--allow-bg); display:flex; flex-direction:column; gap:2px; }
.c-allow__label { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:12px; color:var(--allow-quiet); }
.c-allow__value { font-size:14px; font-weight:600; color:var(--allow-ink); }
.c-allow__note { font-size:12px; color:var(--allow-quiet); }
.c-allow .c-info { position:static; }
.c-allow .c-info__btn { margin:-6px -4px -6px 0; color:var(--allow-info); }
.c-allow .c-info > .c-info__tip { top:auto; bottom:calc(100% + 8px); left:0; right:0; width:auto; max-width:none; transform:none; }

/* On the dark rail the hint needs its own lighter surface to stand out. */
.c-rail .c-info__tip { background:#262C3A; border-color:#3A4257; color:#E8EAF0; }

.c-user { display:flex; align-items:center; gap:10px; padding:0 0 0 4px; }
.c-avatar { width:34px; height:34px; flex:none; display:flex; align-items:center; justify-content:center; border-radius:50%;
  background:var(--c-rail-avatar); color:#FFFFFF; font-size:12px; font-weight:600; }
.c-user__who { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; }
.c-user__name { font-size:13px; font-weight:600; color:var(--c-rail-strong); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.c-user__role { font-size:12px; color:var(--c-rail-quiet); }
.c-rail__switch { align-self:flex-start; display:inline-flex; align-items:center; min-height:32px; padding:0 8px; border-radius:6px; font-size:12px; color:var(--c-rail-quiet); text-decoration:underline; text-underline-offset:3px; }
.c-rail__switch:hover { color:var(--c-rail-strong); }

/* Buttons that are only an icon (log out, the "i" hint): no chrome from admin.css, a full 44 px target. */
button.c-iconbtn { width:44px; height:44px; min-height:0; flex:none; padding:0; border:0; border-radius:8px; background:transparent; color:inherit;
  display:inline-flex; align-items:center; justify-content:center; cursor:pointer; }
button.c-iconbtn:hover:not(:disabled) { background:rgba(127,137,160,.18); }

/* ---- banners (flash, error, simulation) ---- */
.c-banner { padding:12px 16px; border:1px solid var(--c-line); border-left:4px solid var(--c-ink-quiet); border-radius:10px; background:var(--c-surface); color:var(--c-ink); overflow-wrap:anywhere; }
.c-banner--ok { border-left-color:var(--c-ok); }
.c-banner--warn { border-left-color:var(--c-warn); }
.c-banner--err { border-left-color:var(--c-danger); }

/* ---- card ---- */
.c-card { min-width:0; background:var(--c-surface); border:1px solid var(--c-line); border-radius:14px; }
.c-card--pad { padding:24px; }
.c-card__head { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:16px 20px; }
.c-card__head > :is(h2, h3) { margin:0; font-family:var(--c-font-display); font-size:18px; font-weight:600; letter-spacing:-.01em; }
.c-card__aside { margin-left:auto; font-size:13px; font-weight:500; }
.c-card__body { padding:16px 20px; border-top:1px solid var(--c-line); }
.c-stack { display:flex; flex-direction:column; gap:16px; }
.c-stack > * { margin:0; }
.c-cluster { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.c-quiet { color:var(--c-ink-quiet); }
.c-small { font-size:13px; }
.c-label { font-size:11px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--c-ink-quiet); }

/* ---- status pill ---- */
.c-pill { --pill-bg:var(--c-neutral-bg); --pill-fg:var(--c-neutral-fg);
  display:inline-flex; align-items:center; gap:6px; box-sizing:border-box; min-height:24px; padding:2px 9px; border-radius:12px;
  background:var(--pill-bg); color:var(--pill-fg); font-size:12px; font-weight:600; line-height:1.3; white-space:nowrap; vertical-align:middle; }
.c-pill__dot { width:6px; height:6px; flex:none; border-radius:50%; background:currentColor; }
.c-pill[data-state=scheduled] { --pill-bg:var(--c-teal-bg); --pill-fg:var(--c-teal-fg); }
.c-pill[data-state=in_progress], .c-pill[data-phone=in_run] { --pill-bg:var(--c-blue-bg); --pill-fg:var(--c-blue-fg); }
.c-pill[data-state=published], .c-pill[data-phone=ready] { --pill-bg:var(--c-green-bg); --pill-fg:var(--c-green-fg); }
.c-pill[data-state=to_check], .c-pill[data-phone=held] { --pill-bg:var(--c-amber-bg); --pill-fg:var(--c-amber-fg); }
.c-pill[data-state=failed] { --pill-bg:var(--c-red-bg); --pill-fg:var(--c-red-fg); }
.c-pill[data-state=skipped] { --pill-bg:var(--c-brown-bg); --pill-fg:var(--c-brown-fg); }
.c-pill[data-state=quarantined] { --pill-bg:var(--c-violet-bg); --pill-fg:var(--c-violet-fg); }
.c-pill[data-tone=blue] { --pill-bg:var(--c-blue-bg); --pill-fg:var(--c-blue-fg); }
.c-pill[data-state=cancelled] { --pill-bg:transparent; --pill-fg:var(--c-outline-fg); border:1px solid var(--c-outline-line); }

/* ---- buttons ---- */
.c-btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; box-sizing:border-box; min-height:44px; max-width:100%; padding:0 16px;
  border:1px solid transparent; border-radius:10px; font:600 14px/1.2 var(--c-font); text-align:center; text-decoration:none; cursor:pointer; }
.c-btn:hover { text-decoration:none; }
.c-btn--primary, .c-main a.c-btn--primary { padding:0 20px; background:var(--c-blue); border-color:var(--c-blue); color:var(--c-on-blue); }
.c-btn--primary:hover:not(:disabled) { background:var(--c-blue-strong); border-color:var(--c-blue-strong); }
.c-rail .c-btn--primary { background:#2B50E0; border-color:#2B50E0; color:#FFFFFF; }
.c-rail .c-btn--primary:hover { background:#3A5DEB; border-color:#3A5DEB; }
.c-btn--secondary, .c-main a.c-btn--secondary { background:var(--c-control); border-color:var(--c-control-line); color:var(--c-ink); }
.c-btn--secondary:hover:not(:disabled) { border-color:var(--c-ink-quiet); }
.c-btn--risky, .c-main a.c-btn--risky { background:var(--c-control); border-color:var(--c-danger-line); color:var(--c-danger); }
.c-btn--risky:hover:not(:disabled) { background:var(--c-danger-tint); border-color:var(--c-danger); }
.c-btn--quiet, .c-main a.c-btn--quiet { padding:0 8px; background:transparent; border-color:transparent; color:var(--c-ink-quiet); font-weight:500; }
.c-btn--quiet:hover:not(:disabled) { border-color:transparent; color:var(--c-ink); text-decoration:underline; text-underline-offset:3px; }
/* Disabled keeps readable text instead of fading the whole button. */
.c-btn:disabled, .c-btn[aria-disabled=true] { opacity:1; background:var(--c-inset); border-color:transparent; color:var(--c-ink-quiet); cursor:not-allowed; }

/* ---- field ---- */
.c-field { display:flex; flex-direction:column; gap:6px; min-width:0; }
.c-field__label, legend.c-field__label { display:block; padding:0; font-size:13px; font-weight:500; color:var(--c-ink); }
.c-field__help { margin:0; font-size:12px; color:var(--c-ink-quiet); }
input.c-input, select.c-input, textarea.c-input { display:block; box-sizing:border-box; width:100%; min-height:44px; padding:0 12px;
  border:1px solid var(--c-control-line); border-radius:10px; background:var(--c-control); color:var(--c-ink); font:400 14px/1.4 var(--c-font); }
textarea.c-input { min-height:96px; padding:10px 12px; resize:vertical; }
:is(input, select, textarea).c-input:hover { border-color:var(--c-ink-quiet); }
:is(input, select, textarea).c-input::placeholder { color:var(--c-ink-quiet); opacity:1; }

/* ---- either-or choice (segmented) ---- */
.c-seg { margin:0; padding:0; border:0; min-width:0; }
.c-seg > legend { padding:0 0 6px; }
/* The choices share a row in equal parts while their longest words fit side by side; in less room they stack.
   A word is never cut: the classic stylesheet lets a label break anywhere, a choice takes that back. */
.c-seg__track { display:flex; flex-wrap:wrap; gap:4px; padding:4px; border-radius:10px; background:var(--c-inset); }
label.c-seg__option { flex:1 1 0; display:flex; align-items:center; justify-content:center; gap:8px; min-height:40px; box-sizing:border-box; padding:0 10px; border-radius:7px;
  color:var(--c-ink-soft); font-size:14px; font-weight:500; text-align:center; overflow-wrap:normal; cursor:pointer; }
label.c-seg__option:has(input:checked) { background:var(--c-seg-on); color:var(--c-ink); font-weight:600; box-shadow:0 1px 2px rgba(20,24,33,.12); }
label.c-seg__option:has(input:focus-visible) { outline:3px solid var(--c-focus); outline-offset:2px; }
.c-seg__option input { flex:none; margin:0; accent-color:var(--c-blue); }
.c-seg__option input:focus-visible { outline:none; }
/* Choices named in several words keep 11em each, which is two lines of them; with less they stack. */
.c-seg--long label.c-seg__option { flex-basis:11em; }

/* ---- switch and checkbox ---- */
label.c-switch, label.c-check { display:inline-flex; align-items:center; gap:12px; min-height:44px; color:var(--c-ink); font-size:14px; font-weight:500; cursor:pointer; }
.c-switch__input { position:absolute; width:1px; height:1px; margin:0; opacity:0; }
.c-switch__track { width:44px; height:26px; flex:none; box-sizing:border-box; padding:3px; border-radius:13px; background:var(--c-switch-off); display:flex; transition:background .12s; }
.c-switch__track::after { content:""; width:20px; height:20px; border-radius:50%; background:#FFFFFF; transition:transform .12s; }
.c-switch__input:checked + .c-switch__track { background:var(--c-blue); }
.c-switch__input:checked + .c-switch__track::after { transform:translateX(18px); }
.c-switch__input:focus-visible + .c-switch__track { outline:3px solid var(--c-focus); outline-offset:2px; }
.c-switch__input:disabled + .c-switch__track { opacity:.55; }
@media (prefers-reduced-motion:reduce) { .c-switch__track, .c-switch__track::after { transition:none; } }
.c-check input { width:18px; height:18px; margin:0; accent-color:var(--c-blue); }

/* ---- choice card ---- */
label.c-choice { display:flex; gap:12px; padding:12px 14px; border:1px solid var(--c-control-line); border-radius:12px; background:var(--c-surface); color:var(--c-ink); font-size:14px; cursor:pointer; }
label.c-choice:hover { border-color:var(--c-ink-quiet); }
label.c-choice:has(input:checked) { padding:11px 13px; border:2px solid var(--c-blue); background:var(--c-choice); }
label.c-choice:has(input:focus-visible) { outline:3px solid var(--c-focus); outline-offset:2px; }
.c-choice input { width:18px; height:18px; flex:none; margin:2px 0 0; accent-color:var(--c-blue); }
.c-choice input:focus-visible { outline:none; }
.c-choice__text { display:flex; flex-direction:column; min-width:0; }
.c-choice__title { font-weight:600; }
.c-choice__note { font-size:13px; color:var(--c-ink-quiet); }

/* ---- table ---- */
.c-table-wrap { max-width:100%; overflow-x:auto; border:1px solid var(--c-line); border-radius:14px; background:var(--c-surface); }
table.c-table { width:100%; border-collapse:collapse; font-size:14px; }
.c-table th { padding:10px 16px; border-bottom:1px solid var(--c-line); background:transparent; color:var(--c-ink-quiet);
  font-size:11px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; text-align:left; white-space:nowrap; }
.c-table td { padding:12px 16px; border-bottom:1px solid var(--c-line); vertical-align:middle; }
.c-table tbody tr:last-child > td { border-bottom:0; }
.c-table tbody tr:hover > td { background:var(--c-ground); }

/* ---- list row ---- */
.c-row { display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; min-height:48px; box-sizing:border-box; padding:14px 20px; border-top:1px solid var(--c-line); color:var(--c-ink); }
.c-row__lead { flex:0 0 116px; }
.c-row__main { flex:1 1 260px; min-width:0; display:flex; flex-direction:column; gap:2px; }
.c-row__title { font-weight:600; overflow-wrap:anywhere; }
.c-row__note { font-size:13px; color:var(--c-ink-quiet); overflow-wrap:anywhere; }
.c-main a.c-row { color:var(--c-ink); text-decoration:none; }
.c-main a.c-row:hover { background:var(--c-ground); }

/* ---- scale: steps of a run, or shares of a total ---- */
.c-meter { display:flex; gap:4px; min-width:0; }
.c-meter > span { flex:1 1 0; height:6px; border-radius:3px; background:var(--c-meter-todo); }
.c-meter > .is-done { background:var(--c-meter-done); }
.c-meter > .is-now { background:var(--c-meter-now); }
.c-meter--share { gap:3px; }
.c-meter--share > span { flex:var(--share,1) 1 0; height:10px; }
.c-meter > .is-green { background:#1E9E61; }
.c-meter > .is-blue { background:var(--c-blue); }
.c-meter > .is-grey { background:#A6ADBB; }
.c-meter > .is-amber { background:#D98A1F; }

/* ---- the "i" hint ---- */
.c-info { position:relative; display:inline-flex; vertical-align:middle; margin-left:2px; }
/* A small round button whose touch target is extended to 44 px without pushing the text around it. */
button.c-info__btn { position:relative; width:28px; height:28px; margin:-4px 0; border-radius:50%; color:var(--c-link); }
button.c-info__btn::after { content:""; position:absolute; inset:-8px; }
.c-info__tip { position:absolute; top:calc(100% + 6px); left:50%; z-index:60; box-sizing:border-box; width:max-content; max-width:min(320px, calc(100vw - 32px));
  transform:translateX(calc(-50% + var(--shift, 0px))); padding:12px 14px; border:1px solid var(--c-tip-line); border-radius:10px;
  background:var(--c-tip); color:var(--c-tip-ink); font:400 13px/1.45 var(--c-font); letter-spacing:0; text-transform:none; text-align:left; white-space:normal;
  box-shadow:var(--c-shadow); display:none; visibility:hidden; opacity:0; }
.c-info[data-flip] > .c-info__tip { top:auto; bottom:calc(100% + 6px); }
/* A closed hint takes no room: left in the layout it would widen a narrow page it sticks out of. */
.c-info[data-open] > .c-info__tip, html:not(.js) .c-info:is(:hover, :focus-within) > .c-info__tip { display:block; visibility:visible; opacity:1; }

/* ---- phone layout: top bar, bottom tabs, More ---- */
@media (max-width:1000px) and (min-width:751px) { .c-shell { grid-template-columns:208px minmax(0,1fr); } .c-main { --pad-x:20px; --pad-top:24px; --pad-bottom:32px; } }
@media (max-width:750px) {
  body { font-size:15px; }
  .c-shell { display:block; }
  .c-rail { display:none; }
  .c-main { --pad-x:16px; --pad-top:16px; --pad-bottom:calc(68px + 28px + env(safe-area-inset-bottom, 0px)); }
  :is(input, select, textarea).c-input { font-size:16px; }

  .c-topbar { position:sticky; top:0; z-index:30; display:flex; align-items:center; gap:10px; height:60px; box-sizing:border-box; padding:0 8px 0 12px;
    background:var(--c-rail); border-bottom:1px solid var(--c-rail-line); color:var(--c-rail-strong); }
  .c-topbar .c-brand { flex:1 1 auto; min-width:0; padding:4px; }
  .c-topbar .c-live { min-height:36px; padding:0 10px; }

  .c-tabbar { position:fixed; left:0; right:0; bottom:0; z-index:30; display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); align-items:center;
    box-sizing:content-box; height:68px; padding:0 6px env(safe-area-inset-bottom, 0px); background:var(--c-surface); border-top:1px solid var(--c-line); }
  .c-tab { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; height:56px; min-width:0; border-radius:10px;
    color:var(--c-tab); font-size:11px; font-weight:500; line-height:1.2; text-decoration:none; white-space:nowrap; cursor:pointer; }
  .c-tab:hover { text-decoration:none; }
  .c-tab[aria-current=page], .c-tab.is-current { color:var(--c-tab-current); font-weight:600; }
  .c-tab--new { justify-self:center; width:52px; height:52px; border-radius:16px; background:var(--c-blue); color:var(--c-on-blue); }
  .c-tab--new[aria-current=page] { color:var(--c-on-blue); box-shadow:0 0 0 2px var(--c-surface), 0 0 0 4px var(--c-blue); }
}

/* Menus built on <details>: they open without JavaScript; console.js adds Esc and click-away. */
.c-menu > summary { list-style:none; }
.c-menu > summary::-webkit-details-marker { display:none; }
.c-menu[open] > summary { margin-bottom:0; }
.c-menu > summary.c-avatar-btn { width:44px; height:44px; display:flex; align-items:center; justify-content:center; border-radius:50%; cursor:pointer; }
.c-sheet { position:fixed; left:8px; right:8px; bottom:calc(68px + 8px + env(safe-area-inset-bottom, 0px)); z-index:40; box-sizing:border-box;
  max-height:calc(100dvh - 60px - 68px - 24px); overflow-y:auto; padding:8px; border:1px solid var(--c-line); border-radius:16px;
  background:var(--c-surface); color:var(--c-ink); box-shadow:var(--c-shadow); display:flex; flex-direction:column; gap:8px; }
.c-sheet--account { top:64px; bottom:auto; left:auto; right:8px; width:min(280px, calc(100vw - 16px)); padding:14px; gap:12px; }
.c-sheet ul { list-style:none; margin:0; padding:0; }
.c-sheet li + li { margin-top:0; }
.c-sheet__item { display:flex; align-items:center; gap:12px; min-height:48px; padding:0 12px; border-radius:10px; color:var(--c-ink); font-size:15px; font-weight:500; text-decoration:none; }
.c-sheet__item:hover { background:var(--c-ground); text-decoration:none; }
.c-sheet__item[aria-current=page] { background:var(--c-blue-tint); color:var(--c-tab-current); font-weight:600; }
.c-sheet .c-allow { --allow-bg:var(--c-inset); --allow-quiet:var(--c-ink-quiet); --allow-ink:var(--c-ink); --allow-info:var(--c-link); }
.c-sheet__who { display:flex; flex-direction:column; }
.c-sheet__name { font-weight:600; overflow-wrap:anywhere; }
.c-sheet__role { font-size:13px; color:var(--c-ink-quiet); }
.c-sheet .c-btn { width:100%; }

/* ==== Flow pages: a task in steps (New posts). Every component below is shown on /ui/kit. ==== */

/* ---- flow: the page frame, its header and steps ---- */
.c-main:has(> .c-flow) { max-width:none; }
.c-flow { display:flex; flex-direction:column; gap:20px; min-height:calc(100vh - var(--pad-top) - var(--pad-bottom)); min-height:calc(100dvh - var(--pad-top) - var(--pad-bottom)); }
.c-flow > *, .c-flow__panel > * { margin-top:0; margin-bottom:0; }
.c-flow__panel { flex:1 1 auto; display:flex; flex-direction:column; gap:20px; }
.c-main header.c-flowhead { display:flex; flex-wrap:wrap; align-items:center; gap:12px 32px; }
.c-main .c-flowhead h1 { font-size:22px; }
.c-flowhead__cancel { margin-left:auto; }
.c-flowhead > button.c-flowhead__back, .c-flowhead__count, .c-flowhead__bar { display:none; }
ol.c-steps { list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.c-steps li + li { margin-top:0; }
.c-steps__item { display:flex; align-items:center; gap:8px; color:var(--c-ink-quiet); font-weight:500; }
.c-steps__mark { width:26px; height:26px; box-sizing:border-box; flex:none; display:flex; align-items:center; justify-content:center;
  border:1px solid var(--c-line-strong); border-radius:50%; font-size:13px; line-height:1; }
.c-steps__mark > .c-icon { display:none; stroke-width:2.4; }
.c-steps__item[aria-current=step] { color:var(--c-ink); font-weight:600; }
.c-steps__item[aria-current=step] > .c-steps__mark { background:var(--c-blue); border-color:var(--c-blue); color:var(--c-on-blue); }
.c-steps__item[data-state=done] > .c-steps__mark { background:var(--c-green-bg); border-color:transparent; color:var(--c-green-fg); }
.c-steps__item[data-state=done] .c-steps__num { display:none; }
.c-steps__item[data-state=done] .c-icon { display:block; }
.c-steps__line { width:36px; height:1px; background:var(--c-line-strong); }

/* ---- columns of cards ---- */
.c-columns { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) minmax(0,1fr); gap:20px; }
/* Three columns need about 300 px for the first one (a video with its two choices side by side): a window
   narrower than 1400 px gets two columns and the accounts under them. */
@media (max-width:1399px) {
  .c-columns { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .c-columns > :nth-child(3) { grid-column:1 / -1; }
}
.c-columns--review { grid-template-columns:minmax(0,3fr) minmax(300px,1fr); align-items:start; }
@media (max-width:1240px) {
  .c-columns--review { grid-template-columns:minmax(0,1fr); }
  .c-columns--review > :nth-child(n) { grid-column:auto; }
}
@media (max-width:940px) { .c-columns { grid-template-columns:minmax(0,1fr); } .c-columns > :nth-child(3) { grid-column:auto; } }
.c-card__top { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.c-card__top > :is(h2, h3) { margin:0; }
.c-main :is(h1, h2)[tabindex="-1"]:focus { outline:none; }
.c-stack[data-gap=tight] { gap:12px; }
.c-stack[data-gap=none] { gap:2px; }
.c-prewrap { white-space:pre-wrap; overflow-wrap:anywhere; }
.c-emptynote { padding:24px 0; text-align:center; color:var(--c-ink-quiet); }
.c-tag { display:inline-flex; align-items:center; min-height:22px; padding:0 8px; border-radius:6px; background:var(--c-neutral-bg); color:var(--c-neutral-fg); font-size:12px; font-weight:600; }
.c-field__top { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.c-field__count { font-size:12px; color:var(--c-ink-quiet); }
.c-seg__legend, .c-seg > legend.c-seg__legend { padding:0 0 6px; font-size:12px; font-weight:500; color:var(--c-ink-quiet); }

/* ---- file drop area and a chosen video ---- */
.c-drop { display:flex; flex-direction:column; align-items:center; gap:8px; padding:18px 16px; border:1.5px dashed var(--c-outline-line); border-radius:12px;
  background:var(--c-subtle); color:var(--c-ink-quiet); text-align:center; }
.c-drop__title { font-weight:500; color:var(--c-ink); }
.c-drop__note { font-size:12px; }
.c-drop[data-over] { border-color:var(--c-blue); background:var(--c-choice); }
.c-drop:not([data-compact]) > .c-btn > .c-icon { display:none; }
.c-drop[data-compact] { padding:0; border:0; background:transparent; }
.c-drop[data-compact] > :is(.c-icon, .c-drop__title, .c-drop__note) { display:none; }
.c-drop[data-compact] > .c-btn { width:100%; border:1.5px dashed var(--c-outline-line); background:var(--c-subtle); }
.c-drop[data-compact][data-over] > .c-btn { border-color:var(--c-blue); background:var(--c-choice); }
.c-media { display:flex; flex-direction:column; gap:12px; padding:12px; border:1px solid var(--c-line); border-radius:12px; }
.c-media__row { display:flex; align-items:center; gap:12px; }
.c-media__text { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; }
.c-media__name { font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.c-media__meta { font-size:13px; color:var(--c-ink-quiet); }
.c-media__row > button.c-iconbtn { color:var(--c-ink-quiet); }
.c-thumb { width:40px; height:56px; flex:none; display:block; overflow:hidden; border-radius:6px; background:#1C2230; }
.c-thumb > video, .c-thumb > img { display:block; width:100%; height:100%; max-width:none; object-fit:cover; }
.c-media label.c-seg__option { padding:0 6px; }

/* ---- a post as the phone shows it ---- */
.c-previewbox { display:flex; flex-wrap:wrap; gap:16px; padding:16px; border:1px solid var(--c-line); border-radius:12px; background:var(--c-subtle); }
.c-previewbox__side { flex:1 1 160px; min-width:0; }
.c-phoneframe { position:relative; width:150px; height:266px; flex:none; box-sizing:border-box; overflow:hidden; padding:12px; border-radius:14px;
  background:#1C2230; color:#FFFFFF; display:flex; flex-direction:column; justify-content:flex-end; gap:4px; }
.c-phoneframe > video { position:absolute; inset:0; width:100%; height:100%; max-width:none; object-fit:cover; }
.c-phoneframe::after { content:""; position:absolute; inset:45% 0 0; background:linear-gradient(rgba(12,15,22,0), rgba(12,15,22,.78)); pointer-events:none; }
.c-phoneframe__who, .c-phoneframe__text { position:relative; z-index:1; overflow-wrap:anywhere; }
.c-phoneframe__who { font-size:12px; font-weight:600; }
.c-phoneframe__text { font-size:11px; line-height:1.35; color:#E3E6EC; white-space:pre-wrap; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:5; overflow:hidden; }
button.c-phoneframe__play { position:absolute; z-index:2; top:50%; left:50%; width:48px; height:48px; min-height:0; margin:-24px 0 0 -24px; padding:0; border:0; border-radius:50%;
  background:#FFFFFF; color:#141821; display:flex; align-items:center; justify-content:center; cursor:pointer; --c-focus:#AFC0FF; }
.c-phoneframe[data-playing] > .c-phoneframe__play:not(:hover, :focus-visible) { opacity:0; }
.c-phoneframe--player { padding:0; justify-content:center; }
/* Focus sits on the <video> or inside its controls; the frame around it shows the ring for both. */
.c-phoneframe--player:focus-within { outline:3px solid var(--c-focus); outline-offset:2px; }
.c-phoneframe--player > video:focus-visible { outline:none; }
.c-phoneframe--player::after { content:none; }
.c-phoneframe--player > video { position:static; object-fit:contain; }
.c-phoneframe__wait { padding:12px; font-size:12px; color:#E3E6EC; text-align:center; }

/* ---- a plain list of facts per item (saved captions) ---- */
.c-list { overflow:hidden; border:1px solid var(--c-line); border-radius:12px; }
.c-list__row { display:flex; flex-direction:column; gap:4px; padding:14px 16px; }
.c-list__row + .c-list__row { border-top:1px solid var(--c-line); }
.c-list__row[data-tone=warn] { background:var(--c-amber-tint); }
.c-list__top { display:flex; align-items:baseline; justify-content:space-between; gap:10px; overflow-wrap:anywhere; }
.c-list__flag { font-size:12px; font-weight:600; color:var(--c-warn); white-space:nowrap; }
.c-list__text { white-space:pre-wrap; overflow-wrap:anywhere; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; }
.c-main a.c-list__link { align-self:flex-start; display:inline-flex; align-items:center; min-height:44px; font-size:13px; font-weight:600; }

/* ---- search field, and a group of choices under one heading (a phone and its accounts) ---- */
.c-search { display:flex; align-items:center; gap:8px; min-height:44px; box-sizing:border-box; padding:0 12px; border:1px solid var(--c-control-line); border-radius:10px;
  background:var(--c-control); color:var(--c-ink-quiet); }
.c-search:hover { border-color:var(--c-ink-quiet); }
.c-search:focus-within { outline:3px solid var(--c-focus); outline-offset:2px; }
.c-search > input { flex:1 1 auto; width:auto; min-width:0; min-height:40px; padding:0; border:0; border-radius:0; background:transparent; color:var(--c-ink); font:400 14px/1.4 var(--c-font); }
.c-search > input:focus-visible { outline:none; }
.c-search > input::placeholder { color:var(--c-ink-quiet); opacity:1; }
fieldset.c-group { min-width:0; margin:0; padding:0; border:1px solid var(--c-line); border-radius:12px; background:var(--c-surface); }
fieldset.c-group[data-off] { background:var(--c-subtle); }
legend.c-group__legend { float:left; width:100%; padding:0; }
.c-group__legend + * { clear:both; }
.c-group__head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px 8px; padding:10px 12px; color:var(--c-ink); font-size:13px; font-weight:600; }
/* The name keeps room for a word; a state that leaves it less goes under the name. */
.c-group__name { flex:1 1 7.5em; min-width:0; overflow-wrap:anywhere; }
/* A name and the note beside it share a line while both fit; a long username keeps the line and the note goes under it. */
label.c-group__row { display:flex; flex-wrap:wrap; align-items:center; gap:0 12px; min-height:44px; box-sizing:border-box; padding:5px 12px; border-top:1px solid var(--c-line);
  color:var(--c-ink); font-size:14px; cursor:pointer; }
label.c-group__row:has(input:disabled) { color:var(--c-ink-quiet); cursor:default; }
.c-group__row > input { width:18px; height:18px; flex:none; margin:0; accent-color:var(--c-blue); }
.c-group__main { flex:1 1 auto; min-width:0; max-width:calc(100% - 30px); font-weight:500; overflow-wrap:anywhere; }
.c-group__aside { margin-left:auto; font-size:12px; color:var(--c-ink-quiet); white-space:nowrap; }
/* An account Instagram restricted: why its posts will be skipped, on its own line under the name. */
.c-group__alert { flex:1 0 100%; padding:0 0 4px 30px; font-size:12px; line-height:1.4; color:var(--c-red-fg); white-space:normal; }
.c-group__alert[data-tone=amber] { color:var(--c-amber-fg); }
.c-group__note { clear:both; margin:0; padding:8px 12px 10px; border-top:1px solid var(--c-line); font-size:12px; color:var(--c-ink-quiet); }

/* ---- action bar: the totals and the next step, always in reach ---- */
.c-main footer.c-actionbar, .c-actionbar { position:sticky; bottom:0; z-index:15; margin:auto calc(-1 * var(--pad-x)) calc(-1 * var(--pad-bottom)); padding:16px var(--pad-x);
  display:flex; flex-wrap:wrap; align-items:center; gap:16px 28px; background:var(--c-surface); border-top:1px solid var(--c-line); }
.c-main .c-actionbar--static { position:static; margin:0; border:1px solid var(--c-line); border-radius:14px; }
.c-actionbar__dock { display:contents; }
.c-actionbar__msg { order:-2; flex:1 1 100%; }
.c-actionbar__msg:not(:has(p:not([hidden]))) { display:none; }
.c-message > p { margin:0; }
.c-actionbar__total { order:-1; display:flex; flex-direction:column; }
.c-actionbar__big { font-family:var(--c-font-display); font-size:22px; font-weight:600; line-height:1.2; letter-spacing:-.01em; }
/* The next step and its note. The note stands beside the button while it has 10em there; with less it goes under the
   button (the lines of this box run from the bottom up) instead of being pressed into a column of single words. */
.c-actionbar__go { order:1; flex:1 1 200px; min-width:0; margin-left:auto; display:flex; flex-wrap:wrap-reverse; align-items:center; justify-content:flex-end; gap:6px 16px; }
.c-actionbar__go > .c-btn { flex:none; }
.c-actionbar__note { flex:1 1 10em; min-width:0; text-align:right; }
.c-actionbar__summary { flex:1 1 240px; min-width:0; }
.c-actionbar__summary > strong { color:var(--c-ink); }
.c-usage { flex:0 1 260px; min-width:0; display:flex; flex-direction:column; gap:6px; font-size:13px; }
.c-usage__line { display:flex; flex-wrap:wrap; align-items:center; gap:0 4px; }
.c-usage__bar { display:block; height:6px; overflow:hidden; border-radius:3px; background:var(--c-meter-todo); }
.c-usage__bar > span { display:block; width:0; height:100%; border-radius:3px; background:var(--c-meter-done); transition:width .15s; }
.c-usage[data-state=over] .c-usage__bar > span { background:#D98A1F; }
.c-usage__warn { font-weight:500; color:var(--c-warn); }
@media (prefers-reduced-motion:reduce) { .c-usage__bar > span { transition:none; } }
fieldset.c-start { flex:0 1 auto; min-width:0; }
.c-start > legend { float:left; width:100%; }
.c-start > legend + * { clear:both; }
.c-start__body { display:flex; flex-direction:column; align-items:flex-start; gap:10px; }
.c-start .c-seg__track { display:inline-grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); }
.c-start .c-seg__option { padding:0 14px; white-space:nowrap; }
.c-start__when { display:flex; flex-direction:column; gap:10px; max-width:420px; }
.c-start__inputs { display:flex; flex-wrap:wrap; gap:10px; }
.c-start__inputs > .c-input { width:auto; flex:1 1 180px; min-width:0; }
.c-start__inputs > select.c-input { flex:1 1 130px; }

/* ---- matrix: one cell per post, and what the selected cell holds ---- */
.c-matrix-wrap { margin:-10px; overflow-x:auto; }
table.c-matrix { width:100%; border-collapse:separate; border-spacing:10px; font-size:14px; }
.c-matrix :is(th, td) { max-width:none; padding:0; border:0; background:transparent; color:var(--c-ink); font-size:14px; font-weight:400; text-align:left; white-space:normal; vertical-align:top; }
.c-matrix thead th { padding:4px 4px 2px; vertical-align:bottom; }
.c-matrix tbody th { width:172px; min-width:150px; vertical-align:middle; }
.c-matrix__lead { display:flex; align-items:center; gap:12px; }
.c-matrix__lead > .c-thumb { width:44px; height:62px; }
.c-matrix__video { min-width:0; }
.c-matrix__name { display:block; font-weight:600; overflow-wrap:anywhere; }
.c-matrix__sub { display:block; font-size:12px; color:var(--c-ink-quiet); overflow-wrap:anywhere; }
.c-matrix__foot { padding-top:14px; border-top:1px solid var(--c-line); }
button.c-cell { display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-start; gap:8px; box-sizing:border-box; width:100%; min-width:150px; min-height:132px;
  padding:13px; border:1px solid var(--c-control-line); border-radius:12px; background:var(--c-surface); color:var(--c-ink); font:400 14px/1.45 var(--c-font); text-align:left; cursor:pointer; }
button.c-cell:hover:not(:disabled) { border-color:var(--c-ink-quiet); }
button.c-cell[aria-pressed=true] { padding:12px; border:2px solid var(--c-blue); background:var(--c-choice); }
.c-cell__who { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.c-cell__text { font-size:13px; white-space:pre-wrap; overflow-wrap:anywhere; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; }
.c-cell__check { margin-top:auto; display:flex; align-items:center; gap:6px; color:var(--c-ink-quiet); font-size:12px; font-weight:500; }
.c-cell__check > .c-icon, .c-checks__item > .c-icon { stroke-width:2.2; }
.c-cell__check[data-tone=ok] { color:var(--c-ok); }
.c-cell__check[data-tone=warn] { color:var(--c-warn); }
.c-selected { display:flex; flex-wrap:wrap; gap:16px; }
dl.c-facts { flex:1 1 130px; min-width:0; margin:0; display:flex; flex-direction:column; gap:10px; }
.c-facts dt { font-size:12px; color:var(--c-ink-quiet); }
.c-facts dd { margin:0; font-weight:500; overflow-wrap:anywhere; }
.c-checks { display:flex; flex-direction:column; gap:8px; padding:14px; border:1px solid var(--c-line); border-radius:12px; background:var(--c-subtle); }
.c-checks__title { font-size:13px; font-weight:600; }
ul.c-checks__list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.c-checks__list li + li { margin-top:0; }
.c-checks__item { display:flex; align-items:flex-start; gap:8px; font-size:13px; overflow-wrap:anywhere; }
.c-checks__item > .c-icon { margin-top:3px; color:var(--c-ink-quiet); }
.c-checks__item[data-tone=ok] > .c-icon { color:var(--c-ok); }
.c-checks__item[data-tone=warn] > .c-icon { color:var(--c-warn); }

/* ---- flow pages on a phone: one step per screen, the next step docked at the bottom ---- */
@media (max-width:750px) {
  body:has(.c-flow) :is(.c-topbar, .c-tabbar) { display:none; }
  .c-main:has(> .c-flow) { --pad-bottom:16px; }
  /* Room for the docked bar, with a message in it, under the last card. */
  .c-flow { gap:12px; min-height:0; padding-bottom:calc(216px + env(safe-area-inset-bottom, 0px)); }
  .c-flow__panel { gap:12px; }
  .c-main header.c-flowhead { display:grid; grid-template-columns:44px minmax(0,1fr) auto; align-items:center; gap:8px 4px; margin-left:-10px; }
  .c-main .c-flowhead h1 { font-size:17px; }
  .c-flowhead .c-steps, .c-flowhead__cancel { display:none; }
  .c-flowhead > button.c-flowhead__back { display:inline-flex; }
  .c-flowhead__count { display:inline; font-size:13px; color:var(--c-ink-quiet); }
  .c-flowhead__bar { grid-column:1 / -1; display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:4px; margin-left:10px; }
  .c-flowhead__bar > span { height:4px; border-radius:2px; background:var(--c-meter-todo); }
  .c-flowhead__bar > .is-on { background:var(--c-blue); }
  .c-columns, .c-columns--review { grid-template-columns:minmax(0,1fr); gap:12px; }
  .c-columns > :nth-child(n) { grid-column:auto; }
  .c-card--pad { padding:16px; }
  .c-flow[data-mstep="1"] form [data-mstep]:not([data-mstep="1"]),
  .c-flow[data-mstep="2"] form [data-mstep]:not([data-mstep="2"]),
  .c-flow[data-mstep="3"] form [data-mstep]:not([data-mstep="3"]) { display:none; }

  .c-main footer.c-actionbar, .c-actionbar { position:static; margin:0; padding:0; border:0; background:transparent; flex-direction:column; flex-wrap:nowrap; align-items:stretch; gap:12px; }
  .c-actionbar > :is(.c-usage, fieldset.c-start) { flex:none; padding:16px; border:1px solid var(--c-line); border-radius:14px; background:var(--c-surface); }
  .c-start__body { align-items:stretch; }
  .c-start .c-seg__track { display:grid; }
  /* Beside the time zone a date with wide digits loses its minutes: the date takes the row. */
  .c-start__inputs > input.c-input { flex-basis:100%; }
  .c-actionbar__dock { position:fixed; left:0; right:0; bottom:0; z-index:30; display:flex; flex-direction:column; gap:10px;
    padding:12px 16px calc(16px + env(safe-area-inset-bottom, 0px)); background:var(--c-surface); border-top:1px solid var(--c-line); }
  .c-actionbar__msg { order:0; flex:none; max-height:30vh; overflow-y:auto; }
  .c-actionbar__total { order:0; flex-direction:row; align-items:baseline; justify-content:space-between; gap:10px; }
  .c-actionbar__big { font-size:19px; }
  .c-actionbar__go { order:0; flex:none; margin:0; }
  .c-actionbar__go > .c-btn { width:100%; min-height:52px; border-radius:14px; font-size:16px; }
  .c-actionbar__note, .c-actionbar__back { display:none; }
  .c-actionbar__summary { flex:none; }
  .c-search { min-height:48px; border-radius:12px; }
  .c-search > input { min-height:44px; font-size:16px; }
  fieldset.c-group { border-radius:14px; }
  .c-group__head { padding:12px 16px; font-size:14px; }
  label.c-group__row { gap:0 14px; min-height:52px; padding:6px 16px; }
  .c-group__main { max-width:calc(100% - 36px); }
  .c-group__row > input { width:22px; height:22px; }
  .c-group__alert { padding-left:36px; }
  .c-group__note { padding:8px 16px 12px; font-size:13px; }

  .c-matrix-wrap { margin:0; overflow:visible; }
  table.c-matrix, .c-matrix tbody, .c-matrix tr, .c-matrix :is(th, td) { display:block; }
  .c-matrix thead { display:none; }
  .c-matrix tbody tr + tr { margin-top:16px; padding-top:16px; border-top:1px solid var(--c-line); }
  .c-matrix tbody th { width:auto; margin-bottom:10px; }
  .c-matrix td + td { margin-top:8px; }
  button.c-cell { min-width:0; min-height:0; }
  .c-cell__who { position:static; width:auto; height:auto; margin:0; overflow:visible; clip-path:none; white-space:normal; font-weight:600; overflow-wrap:anywhere; }
}

/* ==== Run board: one batch, its phones and its posts (/batches/{id}). Every component below is shown on /ui/kit. ==== */

/* ---- board header: where you are, the state of the thing, the next step ---- */
.c-board > .c-board__steps { margin-bottom:-4px; }
.c-main header.c-boardhead { display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:12px 24px; }
.c-boardhead__main { min-width:0; display:flex; flex-direction:column; gap:4px; }
.c-boardhead__title { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; }
.c-main .c-boardhead h1:focus { outline:none; }
.c-boardhead__meta { margin:0; color:var(--c-ink-quiet); }
a.c-iconbtn { width:44px; height:44px; flex:none; display:inline-flex; align-items:center; justify-content:center; border-radius:8px; text-decoration:none; }
.c-main a.c-iconbtn { color:var(--c-ink); }
a.c-iconbtn:hover { background:rgba(127,137,160,.18); }
.c-boardhead > a.c-boardhead__back { display:none; }
/* admin.css lays out every nav inside a header as the classic menu. */
.c-main :is(nav, div).c-crumbs { display:flex; flex-wrap:wrap; align-items:center; gap:6px; font-size:13px; color:var(--c-ink-quiet); }
.c-main .c-crumbs a { display:inline; min-height:0; padding:0; border-radius:0; }
.c-pill--lg { min-height:26px; padding:2px 10px; border-radius:13px; font-size:13px; }
.c-pill--lg > .c-pill__dot { width:7px; height:7px; }
/* The actions of the page: beside the title on a wide screen, docked at the bottom of a phone. */
.c-headactions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:10px; }
.c-headactions:not(:has(> :not([hidden]))) { display:none; }
.c-headactions__count { display:none; }

/* ---- notice: something stands in the way, and the way out ---- */
.c-notice { display:flex; flex-wrap:wrap; align-items:center; gap:12px 20px; padding:16px 20px; border:1px solid var(--c-line); border-radius:14px; background:var(--c-surface); color:var(--c-ink); }
.c-notice[data-tone=warn] { border-color:var(--c-amber-line); background:var(--c-amber-tint); }
.c-notice > .c-icon { align-self:flex-start; margin-top:1px; color:var(--c-warn); }
.c-notice__text { flex:1 1 320px; min-width:0; display:flex; flex-direction:column; gap:2px; overflow-wrap:anywhere; }
.c-notice__title { font-weight:600; }
.c-notice__body { font-size:13px; color:var(--c-ink-soft); }
.c-notice__more, .c-callout__more { font-size:13px; color:var(--c-ink-soft); }
:is(.c-notice__more, .c-callout__more) > summary { display:inline-block; min-height:24px; padding:4px 0; font-weight:500; color:var(--c-link); }
:is(.c-notice__more, .c-callout__more)[open] > summary { margin-bottom:2px; }
:is(.c-notice__more, .c-callout__more) > p { margin:0; }
.c-callout { display:flex; flex-direction:column; gap:6px; padding:12px 14px; border:1px solid var(--c-amber-line); border-radius:12px; background:var(--c-amber-tint); overflow-wrap:anywhere; }
.c-callout > p { margin:0; }
.c-small[data-tone=warn] { color:var(--c-warn); font-weight:500; }

/* ---- progress of a set: the scale, what its colours count, one line of advice ---- */
.c-progress { display:flex; flex-wrap:wrap; align-items:center; gap:14px 32px; padding:18px 20px; }
.c-progress__main { flex:2 1 320px; min-width:0; display:flex; flex-direction:column; gap:10px; }
.c-progress__lead { margin:0; color:var(--c-ink-quiet); }
.c-progress__lead > strong { color:var(--c-ink); font-weight:600; }
.c-progress__note { flex:1 1 260px; min-width:0; display:flex; flex-direction:column; gap:8px; font-size:13px; color:var(--c-ink-quiet); }
.c-progress__line { margin:0; display:flex; align-items:flex-start; gap:10px; }
.c-progress__mark { flex:none; display:flex; margin-top:1px; }
ul.c-legend { list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:6px 20px; font-size:13px; }
.c-legend li + li { margin-top:0; }
.c-legend__item { display:flex; align-items:center; gap:8px; }
.c-legend__item > strong { margin-right:-4px; font-weight:600; }
.c-legend__dot { width:8px; height:8px; flex:none; border-radius:2px; background:var(--c-meter-todo); }
.c-legend__dot.is-green { background:#1E9E61; }
.c-legend__dot.is-blue { background:var(--c-blue); }
.c-legend__dot.is-grey { background:#A6ADBB; }
.c-legend__dot.is-amber { background:#D98A1F; }

/* ---- lanes: one row per phone, its posts in the order they run ---- */
.c-lane { display:flex; flex-wrap:wrap; gap:12px 16px; padding:16px 20px; border-top:1px solid var(--c-line); }
.c-lane__head { flex:0 0 128px; min-width:0; display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.c-main .c-lane__name { margin:0; font:600 14px/1.45 var(--c-font); letter-spacing:0; overflow-wrap:anywhere; }
.c-lane__count { font-size:12px; color:var(--c-ink-quiet); }
.c-lane__order { display:none; }
ol.c-lane__posts { flex:1 1 420px; min-width:0; list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap:10px; }
.c-lane__posts > li { display:flex; min-width:0; margin:0; }
button.c-post { display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-start; gap:6px; box-sizing:border-box; width:100%; min-height:124px;
  padding:12px; border:1px solid var(--c-control-line); border-radius:12px; background:var(--c-surface); color:var(--c-ink); font:400 14px/1.45 var(--c-font); text-align:left; cursor:pointer; }
button.c-post:hover:not(:disabled) { border-color:var(--c-ink-quiet); }
button.c-post:is([data-state=pending], [data-state=scheduled]) { border-style:dashed; border-color:var(--c-outline-line); }
button.c-post[data-state=in_progress] { border-color:var(--c-blue); }
button.c-post[aria-pressed=true] { padding:11px; border:2px solid var(--c-blue); background:var(--c-choice); }
.c-post__who { font-weight:600; overflow-wrap:anywhere; }
.c-post__file { font-size:12px; color:var(--c-ink-quiet); overflow-wrap:anywhere; }
.c-post__state { margin-top:auto; align-self:stretch; display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.c-post__state > .c-meter { align-self:stretch; }
.c-post__note { font-size:12px; color:var(--c-ink-quiet); }
.c-post__note[data-tone=now] { font-weight:600; color:var(--c-blue-fg); }
@media (min-width:1241px) { .c-card--sticky { position:sticky; top:20px; } }

/* ---- track: the steps of one piece of work, top to bottom ---- */
ol.c-track { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:14px; }
.c-track li + li { margin-top:0; }
.c-track__step { display:flex; gap:12px; color:var(--c-ink-quiet); }
.c-track__mark { width:24px; height:24px; box-sizing:border-box; flex:none; display:flex; align-items:center; justify-content:center; border:1.5px solid var(--c-outline-line); border-radius:50%; }
.c-track__mark > .c-icon { display:none; stroke-width:2.6; }
.c-track__text { min-width:0; display:flex; flex-direction:column; }
.c-track__name { font-weight:500; }
.c-track__note { font-size:13px; color:var(--c-ink-quiet); }
.c-track__note:empty { display:none; }
.c-track__step:is([data-state=done], [data-state=now]) { color:var(--c-ink); }
.c-track__step:is([data-state=done], [data-state=now]) .c-track__name { font-weight:600; }
.c-track__step[data-state=done] > .c-track__mark { border-color:transparent; background:var(--c-green-bg); color:var(--c-green-fg); }
.c-track__step[data-state=done] > .c-track__mark > .c-icon { display:block; }
.c-track__step[data-state=now] > .c-track__mark { border:2px solid var(--c-blue); }
.c-track__step[data-state=now] > .c-track__mark::after { content:""; width:10px; height:10px; border-radius:50%; background:var(--c-blue); }

/* ---- more: detail a person opens when they need it ---- */
details.c-more { padding-top:6px; border-top:1px solid var(--c-line); }
.c-more > summary { padding:11px 0; font-weight:500; line-height:22px; color:var(--c-ink-quiet); }
.c-more[open] > summary { margin-bottom:0; color:var(--c-ink); }
.c-more__body { display:flex; flex-direction:column; align-items:flex-start; gap:10px; font-size:13px; color:var(--c-ink-quiet); }
.c-more__body > p { margin:0; }
.c-more__body > pre { align-self:stretch; box-sizing:border-box; max-height:240px; margin:0; padding:10px 12px; border-radius:8px; background:var(--c-inset); color:var(--c-ink); font-size:12px; }

/* ---- the board on a phone: its own header, lanes as cards, the next step docked at the bottom ---- */
@media (max-width:750px) {
  .c-board > .c-board__steps { display:none; }
  .c-flow.c-board { padding-bottom:calc(148px + env(safe-area-inset-bottom, 0px)); }
  .c-flow.c-board:not(:has(.c-headactions > :not([hidden]))) { padding-bottom:0; }
  /* Only a page that is a board, or one post, takes the screen over; elsewhere the header simply wraps. */
  :is(.c-board, .c-postpage) > header.c-boardhead { display:grid; grid-template-columns:44px minmax(0,1fr); align-items:center; gap:2px 4px; margin-left:-10px; }
  :is(.c-board, .c-postpage) > .c-boardhead > a.c-boardhead__back { display:inline-flex; }
  :is(.c-board, .c-postpage) > .c-boardhead > .c-boardhead__main { display:contents; }
  :is(.c-board, .c-postpage) :is(nav, div).c-crumbs { display:none; }
  :is(.c-board, .c-postpage) .c-boardhead__title { flex-wrap:nowrap; justify-content:space-between; }
  :is(.c-board, .c-postpage) .c-boardhead h1 { font-size:17px; }
  :is(.c-board, .c-postpage) .c-boardhead__meta { grid-column:1 / -1; margin-left:10px; font-size:13px; }
  .c-board .c-headactions { position:fixed; left:0; right:0; bottom:0; z-index:30; flex-direction:column-reverse; flex-wrap:nowrap; align-items:stretch; gap:6px;
    padding:14px 16px calc(18px + env(safe-area-inset-bottom, 0px)); background:var(--c-surface); border-top:1px solid var(--c-line); }
  .c-board .c-headactions > .c-btn { width:100%; }
  .c-board .c-headactions > .c-btn--primary { min-height:52px; border-radius:14px; font-size:16px; }
  .c-board .c-headactions > :is(.c-btn--secondary, a.c-btn--secondary):not(:disabled) { border-color:transparent; background:transparent; color:var(--c-link); }
  .c-headactions__count { display:inline; margin-left:-4px; }
  .c-notice, .c-progress { padding:16px; }
  .c-notice > .c-btn { width:100%; }
  .c-progress__lead > strong { display:block; font-family:var(--c-font-display); font-size:22px; line-height:1.25; letter-spacing:-.01em; }

  .c-card.c-lanes { border:0; background:transparent; }
  .c-lanes > .c-card__head { padding:0 0 10px; }
  .c-lanes__aside { display:none; }
  .c-lane { display:block; padding:0; overflow:hidden; border:1px solid var(--c-line); border-radius:14px; background:var(--c-surface); }
  .c-lane + .c-lane { margin-top:12px; }
  .c-lane__head { flex-direction:row; align-items:center; justify-content:space-between; gap:10px; padding:12px 16px; }
  .c-lane__count { font-size:13px; }
  .c-lane__order { display:inline; }
  ol.c-lane__posts { display:block; counter-reset:post; }
  .c-lane__posts > li { border-top:1px solid var(--c-line); counter-increment:post; }
  button.c-post, button.c-post[aria-pressed=true] { display:grid; grid-template-columns:18px minmax(0,1fr) auto; align-items:center; gap:0 12px; min-height:56px;
    padding:8px 16px; border:0; border-radius:0; background:transparent; }
  button.c-post[aria-pressed=true] { background:var(--c-choice); box-shadow:inset 3px 0 0 var(--c-blue); }
  button.c-post::before { content:counter(post); grid-row:1 / span 2; font-size:13px; color:var(--c-ink-quiet); }
  button.c-post:focus-visible { outline-offset:-3px; }
  .c-post__who { grid-column:2; font-weight:500; }
  .c-post__file { grid-column:2; grid-row:2; font-size:13px; }
  .c-post__state { grid-column:3; grid-row:1 / span 2; align-self:center; margin:0; align-items:flex-end; gap:4px; }
  .c-post__state > .c-meter { width:84px; align-self:flex-end; }
}

/* ==== Home: what needs a person, the run in progress, the period (/). Every component below is shown on /ui/kit. ==== */

.c-stack[data-gap=wide] { gap:20px; }
.c-nowrap { white-space:nowrap; }
p.c-row { margin:0; }

/* ---- split: a main column and a narrower one beside it; one column when there is no room ---- */
.c-split { display:flex; flex-wrap:wrap; align-items:flex-start; gap:20px; }
.c-split__main { flex:2 1 520px; min-width:0; }
.c-split__side { flex:1 1 320px; min-width:0; }
/* Two cards on the left, one column on the right that runs beside both: a short first card leaves no hole under it. */
.c-split--rows { display:grid; grid-template-columns:minmax(0,2fr) minmax(300px,1fr); grid-template-rows:auto 1fr; }
.c-split--rows > .c-split__main { grid-column:1; }
.c-split--rows > .c-split__side { grid-column:2; grid-row:1 / span 2; }
@media (max-width:1180px) {
  .c-split--rows { display:flex; flex-direction:column; flex-wrap:nowrap; align-items:stretch; }
  .c-split--rows > .c-split__main, .c-split--rows > .c-split__side { flex:none; }
}

/* ---- band: the one thing going on right now (a run in progress, the first day) ---- */
.c-band { --c-focus:var(--c-rail-focus); display:flex; flex-wrap:wrap; gap:20px 28px; padding:20px 24px; border:1px solid var(--c-band-line); border-radius:16px;
  background:var(--c-band); color:var(--c-band-ink); }
.c-band__lead { flex:1 1 200px; min-width:0; display:flex; flex-direction:column; justify-content:center; gap:6px; }
.c-band__label { display:flex; align-items:center; gap:8px; font-size:12px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--c-band-label); }
.c-band__dot { width:8px; height:8px; flex:none; border-radius:50%; background:var(--c-band-dot); animation:c-pulse 1.6s ease-in-out infinite; }
.c-band[data-ended] .c-band__dot { animation:none; background:var(--c-band-quiet); }
/* The lock and its hint are about phones in use: gone once the run has ended. */
.c-band[data-ended] .c-band__note > .c-icon, .c-band[data-ended] .c-info { display:none; }
@media (prefers-reduced-motion:reduce) { .c-band__dot { animation:none; } }
.c-main .c-band__title { margin:0; font-size:20px; line-height:1.3; }
.c-band__meta { font-size:13px; color:var(--c-band-quiet); }
.c-band__narrow { display:none; }
/* One grid for all rows, so the names, the scales and the steps line up whatever their length. */
ol.c-band__rows { flex:3 1 420px; min-width:0; list-style:none; margin:0; padding:0; display:grid; grid-template-columns:fit-content(34%) fit-content(26%) minmax(60px,1fr) auto;
  align-content:center; gap:12px 14px; }
.c-band__rows li + li, .c-band__steps li + li { margin-top:0; }
.c-band__row { grid-column:1 / -1; display:grid; grid-template-columns:subgrid; align-items:center; font-size:13px; }
.c-band__phone { min-width:0; color:var(--c-band-quiet); overflow-wrap:anywhere; }
.c-band__who { min-width:0; font-weight:600; overflow-wrap:anywhere; }
.c-band__step { white-space:nowrap; }
.c-band .c-meter > span { background:var(--c-band-todo); }
.c-band .c-meter > :is(.is-done, .is-run) { background:var(--c-band-dot); }
.c-band .c-meter > .is-now { background:var(--c-band-now); }
.c-band .c-meter > .is-ok { background:#4FD08B; }
.c-band .c-meter > .is-amber { background:#E5A23C; }
.c-band__posts { display:none; }
.c-band__aside { flex:1 1 220px; min-width:0; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:10px; }
.c-band__note { margin:0; display:flex; align-items:flex-start; gap:8px; font-size:13px; color:var(--c-band-quiet); }
.c-band__note > .c-icon { margin-top:2px; }
.c-band button.c-info__btn { color:var(--c-band-label); }
.c-band .c-info__tip { background:#262C3A; border-color:#3A4257; color:#E8EAF0; }
.c-btn.c-band__btn, .c-main a.c-band__btn { background:var(--c-band-btn); border-color:var(--c-band-btn); color:var(--c-band-btn-ink); }
.c-main a.c-band__btn:hover { background:var(--c-band-btn-hover); border-color:var(--c-band-btn-hover); color:var(--c-band-btn-ink); }
.c-band--first { gap:28px 48px; padding:36px 40px; }
.c-band__intro { flex:1 1 300px; min-width:0; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:14px; }
.c-main .c-band__intro > h2 { margin:0; font-size:30px; line-height:1.15; }
.c-band__intro > p { margin:0; font-size:15px; color:var(--c-band-quiet); }
.c-band__intro > .c-btn { min-height:48px; padding:0 22px; border-radius:12px; font-size:15px; }
ol.c-band__steps { flex:1.3 1 360px; min-width:0; list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
.c-band__steps > li { display:flex; align-items:center; gap:16px; padding:16px 18px; border-radius:12px; background:var(--c-band-block); }
.c-band__num { width:32px; height:32px; flex:none; display:flex; align-items:center; justify-content:center; border-radius:50%; background:#2B50E0; color:#FFFFFF; font-weight:600; }
.c-band__text { min-width:0; display:flex; flex-direction:column; }
.c-band__text > strong { font-weight:600; }
.c-band__text > span { font-size:13px; color:var(--c-band-quiet); }

/* ---- a count beside a heading, and an icon tile at the start of a row ---- */
.c-badge { min-width:24px; height:24px; box-sizing:border-box; padding:0 7px; display:inline-flex; align-items:center; justify-content:center; border-radius:12px;
  background:var(--c-amber-bg); color:var(--c-amber-fg); font-size:12px; font-weight:600; line-height:1; }
.c-tile { width:36px; height:36px; flex:none; display:flex; align-items:center; justify-content:center; border-radius:9px; background:var(--c-neutral-bg); color:var(--c-neutral-fg); }
.c-tile[data-tone=teal] { background:var(--c-teal-bg); color:var(--c-teal-fg); }
.c-tile[data-tone=green] { width:40px; height:40px; border-radius:50%; background:var(--c-green-bg); color:var(--c-green-fg); }
.c-tile[data-tone=green] > .c-icon { stroke-width:2.2; }

/* ---- rows: an icon and two lines; a name and its state; nothing to show ---- */
.c-row--top { flex-wrap:nowrap; align-items:flex-start; gap:12px; }
.c-row--top > .c-row__main { flex:1 1 auto; }
.c-row--pair { flex-wrap:nowrap; justify-content:space-between; gap:10px; padding-top:8px; padding-bottom:8px; }
.c-row__name { min-width:0; font-weight:500; overflow-wrap:anywhere; }
.c-calm { flex-wrap:nowrap; gap:14px; padding-top:28px; padding-bottom:28px; }
.c-calm > .c-row__main { flex:1 1 auto; }

/* ---- short list: things to act on, each with its one action; a phone shows the first ones and offers the rest ---- */
ul.c-shortlist { list-style:none; margin:0; padding:0; }
.c-shortlist > li + li { margin-top:0; }
.c-shortlist .c-row__lead { flex-basis:124px; }
.c-row__act { margin:0; }
.c-row__go > .c-icon, .c-shortlist__more { display:none; }

/* ---- the counts of a period: a small select, the legend as a grid, the latest items ---- */
form.c-period { margin:0; display:flex; align-items:center; gap:8px; }
select.c-input--compact { width:auto; min-height:36px; padding:0 8px; font-size:13px; }
.c-stats > .c-card__top { align-items:center; }
.c-stats__rate { padding-top:12px; border-top:1px solid var(--c-line); }
.c-stats > details.c-more { padding-top:0; border-top:0; }
.c-stats > .c-more > summary { padding:4px 0; }
.c-stats__rate > strong { color:var(--c-ink); }
ul.c-legend--list { align-self:stretch; flex-direction:column; flex-wrap:nowrap; gap:2px; }
.c-legend--list > .c-legend__item > strong { margin-right:0; }
.c-legend__name { flex:1 1 auto; min-width:0; padding:3px 0; color:var(--c-ink-quiet); }
.c-main a.c-legend__name { color:var(--c-ink-quiet); text-decoration:underline; text-decoration-color:var(--c-line-strong); text-underline-offset:3px; }
.c-main a.c-legend__name:hover { color:var(--c-ink); text-decoration-color:currentColor; }
.c-feed { gap:8px 14px; padding-top:10px; padding-bottom:10px; }
.c-feed__thumb { width:32px; height:44px; }
/* A username is one word: it stays on one line and is cut with an ellipsis, never broken in the middle. */
.c-main a.c-feed__who { flex:0 0 clamp(130px, 26%, 240px); min-width:0; display:block; min-height:44px; line-height:44px; font-weight:600; color:var(--c-ink);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.c-feed__text { flex:1 1 200px; min-width:0; color:var(--c-ink-quiet); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.c-feed__when { flex:0 0 auto; min-width:96px; font-size:13px; color:var(--c-ink-quiet); white-space:nowrap; }
.c-feed__link { font-size:13px; font-weight:500; }

/* ---- Home on a phone: the band in short, then one card per thing to act on ---- */
@media (max-width:750px) {
  .c-stack[data-gap=wide], .c-split { gap:12px; }
  .c-split__main, .c-split__side { flex-basis:100%; }
  .c-home__head, .c-band__more, .c-card__rest,
  .c-shortlist > .c-row:not(:first-child) .c-row__gotext { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
  .c-home .c-card__head { padding:14px 16px; }
  .c-home .c-row { padding-left:16px; padding-right:16px; }
  select.c-input--compact { min-height:44px; font-size:16px; }

  .c-band { flex-direction:column; flex-wrap:nowrap; gap:10px; padding:16px; }
  .c-band__lead { flex:none; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:baseline; gap:10px; }
  .c-band__label { grid-column:1 / -1; }
  .c-main .c-band__title { font-size:19px; }
  .c-band__wide, ol.c-band__rows { display:none; }
  .c-band__narrow { display:inline; }
  .c-band__posts { display:flex; gap:4px; }
  .c-band__posts > span { height:6px; }
  .c-band__aside { flex:none; flex-direction:row; align-items:center; justify-content:space-between; }
  .c-band__btn { flex:none; padding:0 14px; }
  .c-band--first { gap:20px; padding:24px 20px; }
  .c-band__intro, ol.c-band__steps { flex:none; }
  .c-main .c-band__intro > h2 { font-size:24px; }
  .c-band__intro > .c-btn { align-self:stretch; }
  .c-band__steps > li { padding:12px 14px; }

  .c-card.c-needs { border:0; background:transparent; }
  .c-main .c-needs > .c-card__head { padding:6px 2px 10px; }
  .c-needs > .c-card__head > h2 { font-size:20px; }
  .c-main .c-shortlist > .c-row { position:relative; flex-direction:column; flex-wrap:nowrap; align-items:flex-start; gap:8px; min-height:0; padding:16px; border:1px solid var(--c-line); border-radius:14px; background:var(--c-surface); }
  .c-shortlist > .c-row + .c-row { margin-top:12px; }
  .c-shortlist .c-row__lead, .c-shortlist .c-row__main { flex:none; }
  .c-shortlist .c-row__note { font-size:14px; }
  .c-shortlist > .c-row > .c-btn, .c-shortlist .c-row__act, .c-shortlist .c-row__act > .c-btn { align-self:stretch; width:100%; }
  .c-shortlist > .c-row:first-child .c-btn { min-height:48px; border-radius:12px; }
  /* After the first item a card is one link: the whole card opens it. */
  .c-main .c-shortlist > .c-row:not(:first-child):has(> a.c-row__go) { padding-right:48px; }
  .c-shortlist > .c-row:not(:first-child) > a.c-row__go { position:absolute; inset:0; width:auto; min-height:0; padding:0 14px 0 0; justify-content:flex-end; border:0; border-radius:14px;
    background:transparent; color:var(--c-ink-quiet); }
  .c-shortlist > .c-row:not(:first-child) > a.c-row__go:focus-visible { outline-offset:-3px; }
  .c-shortlist > .c-row:not(:first-child) > a.c-row__go > .c-icon { display:block; }
  html.js .c-shortlist:not([data-open]) > .c-row:nth-child(n+3) { display:none; }
  html.js .c-shortlist:not([data-open]) + button.c-shortlist__more { display:flex; width:100%; margin-top:4px; color:var(--c-link); font-weight:600; }
  .c-main .c-needs > .c-calm { border:1px solid var(--c-line); border-radius:14px; background:var(--c-surface); padding:20px 16px; }

  .c-main .c-feed { display:grid; grid-template-columns:32px minmax(0,1fr) auto; align-items:center; gap:0 12px; }
  .c-feed__thumb { grid-row:1 / span 2; }
  .c-main a.c-feed__who { grid-column:2; min-height:28px; line-height:28px; }
  .c-feed__when { grid-column:3; grid-row:1; min-width:0; }
  .c-feed__text { grid-column:2 / -1; grid-row:2; }
  .c-feed__link { grid-column:2 / -1; grid-row:3; padding:6px 0; }
}

/* ==== Posts and one post: the list with its filters, the decision on a post (/reels, /reels/{id}). Every component below is shown on /ui/kit. ==== */

/* ---- chips: one-click filters with their counts ---- */
.c-main nav.c-chips { display:flex; flex-wrap:wrap; gap:8px; }
.c-main a.c-chip { display:inline-flex; align-items:center; gap:8px; flex:none; min-height:44px; box-sizing:border-box; padding:0 16px; border:1px solid var(--c-control-line); border-radius:22px;
  background:var(--c-control); color:var(--c-ink); font-weight:500; text-decoration:none; white-space:nowrap; }
.c-main a.c-chip:hover { border-color:var(--c-ink-quiet); color:var(--c-ink); }
.c-main a.c-chip[aria-current=true] { border-color:var(--c-ink); background:var(--c-ink); color:var(--c-surface); font-weight:600; }
.c-chip__count { font-weight:500; color:var(--c-ink-quiet); }
.c-chip[aria-current=true] > .c-chip__count { color:inherit; }
.c-chip__count[data-tone=amber] { min-width:22px; height:22px; box-sizing:border-box; padding:0 6px; display:inline-flex; align-items:center; justify-content:center; border-radius:11px;
  background:var(--c-amber-bg); color:var(--c-amber-fg); font-size:12px; font-weight:600; line-height:1; }
.c-chip[aria-current=true] > .c-chip__count[data-tone=amber] { color:var(--c-amber-fg); }

/* ---- filters: a search and the lists that narrow it, on one line while there is room ---- */
form.c-filters { margin:0; display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
label.c-filters__search { flex:3 1 260px; min-width:0; }
/* admin.css pushes an input inside a label down. */
label.c-search > input { margin-top:0; }
select.c-filters__select { flex:1 1 170px; width:auto; }

/* ---- listing: one row per item under a header row; the whole row opens the item ---- */
.c-listing { overflow:hidden; }
.c-listing__head, .c-main a.c-listing__row { display:grid; grid-template-columns:30px minmax(0,2fr) minmax(0,1.2fr) 124px 124px 176px; align-items:center; gap:14px; padding:0 16px; }
.c-listing__head { min-height:40px; font-size:12px; font-weight:600; color:var(--c-ink-quiet); }
ul.c-listing__rows { list-style:none; margin:0; padding:0; }
.c-listing__rows > li { margin:0; border-top:1px solid var(--c-line); }
.c-main a.c-listing__row { min-height:60px; box-sizing:border-box; padding-top:8px; padding-bottom:8px; color:var(--c-ink); text-decoration:none; }
.c-main a.c-listing__row:hover { background:var(--c-ground); color:var(--c-ink); }
a.c-listing__row:focus-visible { outline-offset:-3px; }
.c-listing__thumb { width:30px; height:42px; border-radius:5px; }
.c-listing__main { min-width:0; display:flex; flex-direction:column; }
.c-listing__title { font-weight:600; }
.c-listing__title, .c-listing__text, .c-listing__cell { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.c-listing__text, .c-listing__cell { font-size:13px; color:var(--c-ink-quiet); }
.c-listing__state { min-width:0; }
.c-listing__state .c-pill[data-state=pending], .c-post__state .c-pill[data-state=pending] { max-width:124px; white-space:normal; }
@media (max-width:1000px) {
  .c-listing__head, .c-listing__file { display:none; }
  .c-main a.c-listing__row { grid-template-columns:30px minmax(0,1fr) auto; grid-template-areas:"thumb main state" "thumb number when"; gap:4px 12px; padding:12px 16px; }
  .c-listing__thumb { grid-area:thumb; align-self:start; }
  .c-listing__main { grid-area:main; }
  .c-listing__state { grid-area:state; align-self:start; }
  .c-listing__batch { grid-area:number; }
  .c-listing__when { grid-area:when; text-align:right; }
}

/* ---- pager: the page you are on, and the ones beside it ---- */
.c-main nav.c-pager { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:12px; }
.c-pager > :first-child { justify-self:start; }
.c-pager > :last-child { justify-self:end; }
.c-pager__where { font-size:13px; color:var(--c-ink-quiet); }

/* ---- empty: nothing to list, and what to do about it ---- */
.c-empty { display:flex; flex-direction:column; align-items:center; gap:10px; padding:48px 24px; text-align:center; }
.c-main .c-empty > h2 { margin:6px 0 0; }
.c-empty > p { max-width:46ch; margin:0; color:var(--c-ink-quiet); }
.c-empty > .c-btn { margin-top:8px; }

/* ---- fold: a card that stays closed until someone needs it ---- */
details.c-fold > summary { display:flex; align-items:center; gap:10px; min-height:52px; padding:0 20px; border-radius:14px; font-weight:600; line-height:1.4; list-style:none; }
.c-fold > summary::-webkit-details-marker { display:none; }
.c-fold > summary > .c-icon { color:var(--c-ink-quiet); }
details.c-fold[open] > summary { margin-bottom:0; }
.c-fold[open] > summary > .c-icon { transform:rotate(90deg); }
.c-fold__body { padding:4px 20px 20px; }
.c-fieldrow { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap:12px 16px; }
input.c-input[type=file] { padding:7px 8px; font-size:13px; }
textarea.c-input.c-input--code { font:400 13px/1.5 ui-monospace,Consolas,monospace; }

/* ---- lead: the one sentence a page is about; a line with an icon ---- */
.c-lead { font-size:16px; line-height:1.45; color:var(--c-ink); overflow-wrap:anywhere; }
.c-lockline { display:flex; align-items:flex-start; gap:8px; }
.c-lockline > .c-icon { margin-top:2px; }

/* ---- readout: a figure that matters, with its label and one line of advice ---- */
.c-readout { display:flex; flex-direction:column; gap:4px; padding:14px; border:1px solid var(--c-line); border-radius:12px; background:var(--c-subtle); overflow-wrap:anywhere; }
.c-readout__title { font-weight:600; }
.c-readout__label { display:block; font-size:12px; color:var(--c-ink-quiet); }
.c-readout__value { display:block; font-family:var(--c-font-display); font-size:20px; font-weight:600; line-height:1.3; letter-spacing:-.01em; }
.c-readout__note { font-size:13px; color:var(--c-ink-quiet); }
.c-readout__pair { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px; padding:6px 0; }

/* ---- choices: a decision as a set of choice cards under one question ---- */
fieldset.c-choices { min-width:0; margin:0; padding:0; border:0; display:flex; flex-direction:column; gap:8px; }
legend.c-choices__title { float:left; width:100%; padding:0; font-size:15px; font-weight:600; color:var(--c-ink); }
.c-choices__title + * { clear:both; }
.c-main a.c-choices__link { align-self:flex-start; display:inline-flex; align-items:center; gap:6px; min-height:28px; margin-top:-6px; font-size:13px; font-weight:500; }

/* ---- actions of one item: a button per action, a small form that opens in place, the risky ones apart ---- */
form.c-act { margin:0; display:inline-flex; max-width:100%; }
details.c-reveal { min-width:0; }
details.c-reveal > summary.c-btn { line-height:1.2; list-style:none; }
.c-reveal > summary::-webkit-details-marker { display:none; }
details.c-reveal[open] { flex:1 1 100%; }
details.c-reveal[open] > summary { margin-bottom:10px; }
.c-reveal__body { box-sizing:border-box; padding:14px; border:1px solid var(--c-line); border-radius:12px; background:var(--c-subtle); }
.c-cardfoot { display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; padding-top:16px; border-top:1px solid var(--c-line); }
/* The main action of a task page: in its place on a wide screen, fixed to the bottom edge of a phone. */
.c-dock { display:contents; }
.c-dock > .c-btn { align-self:flex-start; }

/* ---- the page of one post ---- */
.c-flow.c-postpage { box-sizing:border-box; width:100%; max-width:1176px; margin:0 auto; }
.c-postpage__cols > .c-split__main { flex:3 1 480px; }
.c-postpage__cols > .c-split__side { flex:2 1 340px; }
.c-postsum { display:none; }
.c-main .c-phoneframe a { color:#AFC0FF; }
.c-main .c-phoneframe a:hover { color:#FFFFFF; }
.c-phoneframe--player > video[hidden] + .c-phoneframe__wait { margin:auto; }

@media (max-width:750px) {
  /* The filters scroll sideways inside their own strip; the page never does. */
  .c-main nav.c-chips { flex-wrap:nowrap; margin:-6px calc(-1 * var(--pad-x)); padding:6px var(--pad-x); overflow-x:auto; scrollbar-width:none; }
  .c-chips::-webkit-scrollbar { display:none; }
  label.c-filters__search { flex-basis:100%; }
  select.c-filters__select { flex:1 1 140px; }
  .c-empty { padding:36px 20px; }
  .c-fold__body { padding:4px 16px 16px; }
  details.c-fold > summary { padding:0 16px; }

  .c-flow.c-postpage { padding-bottom:0; }
  .c-flow.c-postpage:has(.c-dock) { padding-bottom:calc(92px + env(safe-area-inset-bottom, 0px)); }
  .c-flow .c-dock { position:fixed; left:0; right:0; bottom:0; z-index:30; display:flex; flex-direction:column; padding:14px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    background:var(--c-surface); border-top:1px solid var(--c-line); }
  .c-flow .c-dock > .c-btn { align-self:stretch; width:100%; min-height:52px; border-radius:14px; font-size:16px; }
  .c-postsum { display:flex; gap:14px; }
  .c-postsum > .c-thumb { width:54px; height:96px; border-radius:8px; }
  .c-postsum__text { min-width:0; display:flex; flex-direction:column; gap:4px; }
  .c-postsum__caption { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; }
  .c-postpage label.c-choice { padding:14px 16px; border-radius:14px; }
  .c-postpage label.c-choice:has(input:checked) { padding:13px 15px; }
  .c-postpage .c-choice input { width:22px; height:22px; margin-top:1px; }
  .c-actions { flex-direction:column; align-items:stretch; }
  .c-actions > form.c-act, .c-actions > details.c-reveal > summary.c-btn { display:flex; }
  .c-actions .c-btn { width:100%; }
  .c-readout__value { font-size:19px; }
}

/* ==== Phones, one account, On hold, Run history (/phones, /accounts/{name}, /quarantine, /runs, /runs/{id}). Every component below is shown on /ui/kit. ==== */

/* ---- a pill for a state that is neither a post nor a phone (a run, the health of an account, a task), and the same word as plain text ---- */
.c-pill[data-tone=green] { --pill-bg:var(--c-green-bg); --pill-fg:var(--c-green-fg); }
.c-pill[data-tone=amber] { --pill-bg:var(--c-amber-bg); --pill-fg:var(--c-amber-fg); }
.c-pill[data-tone=red] { --pill-bg:var(--c-red-bg); --pill-fg:var(--c-red-fg); }
.c-pill[data-tone=violet] { --pill-bg:var(--c-violet-bg); --pill-fg:var(--c-violet-fg); }
.c-outcome[data-tone=amber] { font-weight:500; color:var(--c-warn); }
.c-outcome[data-tone=red] { font-weight:500; color:var(--c-danger); }

/* ---- gauge: how full something is ---- */
:root { --c-gauge:#6B7385; --c-gauge-full:#D98A1F; }
@media (prefers-color-scheme:dark) { :root { --c-gauge:#8E96A8; --c-gauge-full:#E5A23C; } }
.c-gauge { display:block; height:6px; overflow:hidden; border-radius:3px; background:var(--c-meter-todo); }
.c-gauge > span { display:block; height:100%; border-radius:3px; background:var(--c-gauge); }
.c-gauge[data-state=full] > span { background:var(--c-gauge-full); }

/* ---- strip: one figure on one line, its label before it and the detail behind "Details" ---- */
.c-strip { display:flex; flex-wrap:wrap; align-items:center; gap:4px 16px; padding:12px 20px; }
.c-strip__label { display:inline-flex; align-items:center; font-size:13px; color:var(--c-ink-quiet); }
.c-strip__value { font-weight:600; }
.c-strip__note { font-size:13px; color:var(--c-ink-quiet); }
.c-strip:is([data-state=stale], [data-state=unknown]) .c-strip__note { font-weight:500; color:var(--c-warn); }
details.c-strip__more { margin-left:auto; }
details.c-strip__more[open] { flex:1 1 100%; margin-left:0; }

/* ---- index: a list that opens one of its things; beside that thing on a wide screen ---- */
.c-split--aside { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,2.4fr); align-items:start; }
.c-main nav.c-index { min-width:0; display:flex; flex-direction:column; gap:10px; }
.c-main a.c-index__item { display:flex; flex-direction:column; gap:8px; padding:16px; border:1px solid var(--c-line); border-radius:14px; background:var(--c-surface);
  color:var(--c-ink); text-decoration:none; }
.c-main a.c-index__item:hover { border-color:var(--c-ink-quiet); color:var(--c-ink); }
.c-main a.c-index__item[aria-current=true] { padding:15px; border:2px solid var(--c-blue); }
.c-index__top { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.c-index__name { min-width:0; font-weight:600; overflow-wrap:anywhere; }
.c-index__note { font-size:13px; color:var(--c-ink-quiet); overflow-wrap:anywhere; }
.c-index__gauge { display:flex; align-items:center; gap:10px; font-size:12px; color:var(--c-ink-quiet); white-space:nowrap; }
.c-index__gauge > .c-gauge { flex:1 1 auto; }
.c-index__gauge[data-tone=warn] { font-weight:600; color:var(--c-warn); }
@media (max-width:1100px) {
  .c-split--aside { grid-template-columns:minmax(0,1fr); }
  /* The list beside one thing is a way to its neighbours: without room the breadcrumb leads back to the full list. */
  .c-main .c-split--aside > nav.c-index--aside { display:none; }
  /* A list of the sections below it: one line each, the name and the state. */
  .c-main nav.c-index--jump { gap:0; overflow:hidden; border:1px solid var(--c-line); border-radius:14px; background:var(--c-surface); }
  .c-main .c-index--jump > a.c-index__item { justify-content:center; min-height:48px; padding:4px 16px; border:0; border-radius:0; }
  .c-index--jump > .c-index__item + .c-index__item { box-shadow:inset 0 1px 0 var(--c-line); }
  .c-index--jump > a.c-index__item:focus-visible { outline-offset:-3px; }
  .c-main .c-index--jump :is(.c-index__note, .c-index__gauge) { display:none; }
}

/* ---- panels: readouts side by side; a readout that warns; a link that ends a readout ---- */
.c-panels { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap:16px; align-items:start; }
.c-readout[data-tone=warn] { border-color:var(--c-amber-line); background:var(--c-amber-tint); }
.c-readout > .c-label { margin-bottom:2px; }
.c-readout > .c-gauge { margin:4px 0; }
.c-readout > :is(.c-cluster, form) { margin-top:8px; }
.c-main a.c-readout__link { align-self:flex-start; display:inline-flex; align-items:center; min-height:28px; font-size:13px; font-weight:500; }

/* ---- table: a row that starts with its name; cells that hold a sentence; rows that stack on a phone ---- */
.c-table tbody th { padding:12px 16px; border-bottom:1px solid var(--c-line); color:var(--c-ink); font-size:14px; font-weight:600; letter-spacing:0; text-transform:none; white-space:normal; vertical-align:middle; }
.c-table tbody tr:last-child > th { border-bottom:0; }
.c-table tbody tr:hover > th { background:var(--c-ground); }
.c-table td.c-table__text { min-width:200px; max-width:56ch; overflow-wrap:anywhere; }
@media (max-width:750px) {
  table.c-table--stack, .c-table--stack :is(tbody, tr, th, td) { display:block; }
  .c-table--stack thead { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip-path:inset(50%); }
  .c-table--stack tbody tr { padding:12px 16px; border-bottom:1px solid var(--c-line); }
  .c-table--stack tbody tr:last-child { border-bottom:0; }
  .c-table--stack tbody :is(th, td), .c-table--stack td.c-table__text { min-width:0; max-width:none; padding:3px 0; border:0; }
  .c-table--stack tbody tr:hover > :is(th, td) { background:transparent; }
  .c-table--stack td[data-label]::before { content:attr(data-label) " · "; font-size:12px; color:var(--c-ink-quiet); }
  .c-table--stack td:empty { display:none; }
}

/* ---- card: a foot with what the action does and the action; folded rows at its end ---- */
.c-card__foot { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 16px; padding:14px 20px; border-top:1px solid var(--c-line);
  border-radius:0 0 13px 13px; background:var(--c-subtle); }
.c-card__foot > :first-child { flex:1 1 260px; min-width:0; }
details.c-card__more { padding:0; border-top:1px solid var(--c-line); }
.c-card__more > summary { padding:11px 20px; }
details.c-more--plain { padding-top:0; border-top:0; }

/* ---- captions: a numbered list a person edits; the one a post takes next is marked ---- */
ol.c-captions { list-style:none; margin:0; padding:0; }
.c-captions > li + li { margin-top:0; }
.c-captions__row { display:flex; align-items:center; gap:12px; min-height:52px; box-sizing:border-box; padding:4px 8px 4px 20px; border-top:1px solid var(--c-line); }
.c-captions__row[data-next] { background:var(--c-choice); }
.c-captions__num { flex:0 0 20px; font-size:13px; color:var(--c-ink-quiet); }
.c-captions__text { flex:1 1 auto; min-width:0; padding:8px 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.c-captions__tag { flex:none; font-size:12px; color:var(--c-ink-quiet); white-space:nowrap; }
.c-captions__row > :last-child:not(button) { margin-right:12px; }
.c-captions__row > button.c-iconbtn { color:var(--c-ink-quiet); }
.c-captions__empty { margin:0; padding:16px 20px; border-top:1px solid var(--c-line); }
.c-captions__empty[data-tone=warn] { color:var(--c-warn); font-weight:500; }

/* ---- a listing in a narrow column keeps its short form at any width ---- */
.c-listing--compact .c-listing__file { display:none; }
.c-main .c-listing--compact a.c-listing__row { grid-template-columns:30px minmax(0,1fr) auto; grid-template-areas:"thumb main state" "thumb number when"; gap:4px 12px; padding:12px 20px; }
.c-listing--compact .c-listing__thumb { grid-area:thumb; align-self:start; }
.c-listing--compact .c-listing__main { grid-area:main; }
.c-listing--compact .c-listing__state { grid-area:state; align-self:start; justify-self:end; }
.c-listing--compact .c-listing__batch { grid-area:number; }
.c-listing--compact .c-listing__when { grid-area:when; text-align:right; }

/* ---- check row: a day with its result, and what was seen under it ---- */
.c-checkrow__top { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px 10px; }

/* ---- hold card: one stopped thing, the items it holds and the one action that frees them ---- */
.c-holdcard__top { display:flex; gap:16px; padding:20px; }
.c-holdcard__thumb { width:54px; height:96px; border-radius:8px; }
.c-holdcard__text { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.c-main .c-holdcard__text > h2 { margin:0; font-size:20px; overflow-wrap:anywhere; }
.c-holdcard__text > p { margin:0; overflow-wrap:anywhere; }
.c-holdcard .c-row__lead { flex-basis:190px; font-weight:600; overflow-wrap:anywhere; }

/* ---- reason: a numbered cause with one line of explanation ---- */
.c-reason { display:flex; gap:12px; }
.c-reason__mark { width:28px; height:28px; flex:none; display:flex; align-items:center; justify-content:center; border-radius:50%; background:var(--c-violet-bg); color:var(--c-violet-fg);
  font-size:13px; font-weight:600; }
.c-reason__text { min-width:0; display:flex; flex-direction:column; }
.c-reason__text > span { font-size:13px; color:var(--c-ink-quiet); }

/* ---- log: what a run wrote, line by line ---- */
pre.c-log { box-sizing:border-box; max-height:480px; margin:0; padding:12px 14px; overflow:auto; border-radius:10px; background:var(--c-inset); color:var(--c-ink);
  font:400 12px/1.6 ui-monospace,Consolas,monospace; white-space:pre-wrap; overflow-wrap:anywhere; }
pre.c-log:empty { display:none; }

@media (max-width:750px) {
  .c-strip { padding:12px 16px; }
  details.c-strip__more { flex:1 1 100%; margin-left:0; }
  .c-card__head, .c-card__body, .c-card__foot { padding-left:16px; padding-right:16px; }
  .c-card__foot > .c-btn, .c-card__foot > form.c-act, .c-card__foot > form.c-act > .c-btn { width:100%; }
  .c-captions__row { padding-left:16px; }
  .c-holdcard__top { padding:16px; }
  .c-holdcard .c-row { padding-left:16px; padding-right:16px; }
  .c-holdcard .c-row__lead { flex-basis:100%; }
  .c-holdcard .c-row > .c-btn { width:100%; }
  pre.c-log { max-height:60vh; }
}

/* ==== Warm-up, Settings, Users and tokens, Help, Login (/warm-up, /settings, /users, /testing, /login). Every component below is shown on /ui/kit. ==== */

/* ---- setting row: what a setting is and does, and its control beside it; one column when there is no room ---- */
.c-setrow { display:flex; flex-wrap:wrap; align-items:center; gap:10px 32px; padding:16px 24px; }
.c-setrow + .c-setrow { border-top:1px solid var(--c-line); }
.c-setrow__text { flex:1 1 260px; min-width:0; display:flex; flex-direction:column; gap:2px; }
.c-setrow__title, label.c-setrow__title, legend.c-setrow__title { display:block; padding:0; color:var(--c-ink); font-size:14px; font-weight:600; }
.c-setrow__note { margin:0; font-size:13px; color:var(--c-ink-quiet); }
.c-setrow__note[data-tone=warn] { font-weight:500; color:var(--c-warn); }
.c-setrow__control { flex:1 1 260px; min-width:0; }
select.c-setrow__control, input.c-setrow__control { width:auto; }
/* A control with its own parts under it (a switch, then how long): the parts keep their height. */
.c-setrow__control.c-stack > * { flex:none; }
.c-setrow--stack { flex-direction:column; flex-wrap:nowrap; align-items:stretch; gap:10px; }
.c-setrow--stack > .c-setrow__text { flex:none; }
.c-setrow--flush { flex-wrap:nowrap; gap:16px; padding:0; }
.c-setrow--flush > .c-setrow__text { flex:1 1 auto; }
/* A number with its unit, read as one phrase: "for up to [120] seconds". */
.c-unit { display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:13px; color:var(--c-ink-quiet); }
input.c-input--short { flex:none; width:104px; }
/* The word beside a switch follows it without a script. */
.c-switch__state { min-width:26px; }
.c-switch__state::after { content:"Off"; }
.c-switch__input:checked ~ .c-switch__state::after { content:"On"; }
fieldset.c-checkgroup { min-width:0; margin:0; padding:0; border:0; display:flex; flex-direction:column; gap:2px; }
.c-checkgrid { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap:0 24px; margin-top:6px; }
/* The format of a text field, for the person who needs it. */
.c-format > summary { padding:6px 0; font-size:13px; }
.c-format .c-more__body { padding-bottom:4px; }
.c-format .c-more__body code, .c-prose code, .c-alert code { padding:1px 5px; border-radius:5px; background:var(--c-inset); color:var(--c-ink); font:400 12.5px/1.5 ui-monospace,Consolas,monospace; overflow-wrap:anywhere; }

/* ---- section: a part of a long page with its own heading; an anchor lands with the heading in view ---- */
.c-section { scroll-margin-top:20px; }
.c-section__head { padding:20px 24px 4px; }
.c-section__head > h2 { margin:0; }
.c-section__head > p { margin:2px 0 0; font-size:13px; color:var(--c-ink-quiet); }

/* ---- contents: the sections of a long page; beside it on a wide screen, a strip above it on a narrow one ---- */
.c-toclayout { display:grid; grid-template-columns:196px minmax(0, 860px); align-items:start; gap:20px 28px; }
.c-toclayout__main { min-width:0; }
.c-main nav.c-toc { position:sticky; top:20px; min-width:0; display:flex; flex-direction:column; gap:2px; }
.c-toc__label { padding:14px 12px 6px; font-size:11px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--c-ink-quiet); }
.c-toc__label:first-child { padding-top:0; }
.c-main a.c-toc__item { display:flex; align-items:center; min-height:44px; box-sizing:border-box; padding:4px 12px; border:1px solid transparent; border-radius:8px;
  color:var(--c-ink-quiet); font-weight:500; line-height:1.3; text-decoration:none; }
.c-main a.c-toc__item:hover { color:var(--c-ink); }
.c-main a.c-toc__item[aria-current=true] { border-color:var(--c-line); background:var(--c-surface); color:var(--c-ink); font-weight:600; }
@media (max-width:1000px) {
  .c-toclayout { grid-template-columns:minmax(0, 1fr); gap:12px; }
  .c-main nav.c-toc { top:0; z-index:14; flex-direction:row; gap:8px; margin:0 calc(-1 * var(--pad-x)); padding:8px var(--pad-x); overflow-x:auto; scrollbar-width:none;
    background:var(--c-ground); border-bottom:1px solid var(--c-line); }
  .c-toc::-webkit-scrollbar { display:none; }
  .c-toc__label { display:none; }
  .c-main a.c-toc__item { flex:none; padding:4px 16px; border-color:var(--c-control-line); border-radius:22px; background:var(--c-control); color:var(--c-ink); white-space:nowrap; }
  .c-main a.c-toc__item[aria-current=true] { border-color:var(--c-ink); background:var(--c-ink); color:var(--c-surface); }
  .c-section { scroll-margin-top:76px; }
}

/* ---- save bar: the state of a long form and its one button, in reach while the form is on screen ---- */
.c-savebar { position:sticky; bottom:12px; z-index:12; display:flex; flex-wrap:wrap; align-items:center; gap:10px 12px; padding:12px 14px 12px 20px;
  border:1px solid var(--c-line-strong); border-radius:14px; background:var(--c-surface); box-shadow:var(--c-shadow); }
.c-savebar > :first-child { flex:1 1 180px; min-width:0; }

/* ---- track with numbers: an order of things, one of them the subject of the page ---- */
.c-track--numbered > .c-track__step { color:var(--c-ink); }
.c-track--numbered .c-track__mark { width:26px; height:26px; border:0; background:var(--c-inset); color:var(--c-ink-soft); font-size:13px; font-weight:600; line-height:1; }
.c-track--numbered .c-track__name { font-weight:600; }
.c-track--numbered > .c-track__step[data-state=now] > .c-track__mark { border:0; background:var(--c-blue); color:var(--c-on-blue); }
.c-track--numbered > .c-track__step[data-state=now] > .c-track__mark::after { content:none; }
.c-track--numbered > .c-track__step[data-state=off] > .c-track__mark { box-sizing:border-box; border:1.5px dashed var(--c-outline-line); background:transparent; color:var(--c-ink-quiet); }
.c-track--numbered > .c-track__step[data-state=off] .c-track__name { font-weight:500; color:var(--c-ink-quiet); }

/* ---- table: the row whose form is open beside it; a cell of actions; a table that ends a card ---- */
.c-table tbody tr[data-current] > :is(th, td), .c-table tbody tr[data-current]:hover > :is(th, td) { background:var(--c-choice); }
.c-table tbody tr[data-current] > :first-child { box-shadow:inset 3px 0 0 var(--c-blue); }
.c-table td.c-table__act { text-align:right; white-space:nowrap; }
.c-table-wrap--flush { border:0; border-top:1px solid var(--c-line); border-radius:0; background:transparent; }
.c-table-wrap--flush + .c-card__body { border-top:1px solid var(--c-line); }
/* A foot that holds only buttons: they stand together at its end. */
.c-card__foot--end { justify-content:flex-end; }
.c-card__foot--end > :first-child { flex:none; }
/* A secret shown once: one tap selects all of it. */
code.c-secret { min-width:0; padding:9px 12px; border:1px solid var(--c-amber-line); border-radius:8px; background:var(--c-surface); color:var(--c-ink);
  font:400 13px/1.5 ui-monospace,Consolas,monospace; overflow-wrap:anywhere; user-select:all; }

/* ---- alert: something went wrong and the page says so in place ---- */
.c-alert { display:flex; gap:10px; padding:12px 14px; border:1px solid var(--c-danger-line); border-radius:10px; background:var(--c-danger-tint); color:var(--c-danger);
  font-size:14px; overflow-wrap:anywhere; }
.c-alert > .c-icon { margin-top:1px; }
.c-alert__text { flex:1 1 auto; min-width:0; display:block; }
/* The server words its messages in lower case; a sentence on a page starts with a capital. */
.c-alert__text::first-letter { text-transform:uppercase; }

/* ---- note: what you should see at this point; prose: a section of running text; faq: questions that open ---- */
p.c-note { margin:0; padding:12px 14px; border-left:3px solid var(--c-blue); border-radius:4px 10px 10px 4px; background:var(--c-subtle); }
.c-prose { gap:12px; }
.c-prose :is(p, li) { max-width:76ch; line-height:1.55; }
.c-main .c-prose > h3 { margin:8px 0 0; font:600 15px/1.4 var(--c-font); letter-spacing:0; }
.c-prose :is(ul, ol) { margin:0; padding-left:22px; }
.c-prose li + li { margin-top:6px; }
.c-prose .c-pill { vertical-align:baseline; }
/* ---- helpvideo: the recorded walkthrough of Help; shot: a still of one step, which opens full size ---- */
.c-helpvideo { overflow:hidden; border:1px solid var(--c-line); border-radius:12px; background:#12161C; }
/* Focus sits on the <video> or inside its controls; the frame around it shows the ring for both. */
.c-helpvideo:focus-within { outline:3px solid var(--c-focus); outline-offset:2px; }
.c-helpvideo > video { display:block; width:100%; height:auto; aspect-ratio:8 / 5; }
.c-helpvideo > video:focus-visible { outline:none; }
.c-shot { display:grid; gap:6px; margin:4px 0 0; }
.c-shot > a { display:block; border-radius:10px; }
.c-shot img { display:block; width:100%; height:auto; border:1px solid var(--c-line); border-radius:10px; background:var(--c-inset); }
.c-shot > figcaption { font-size:13px; line-height:1.45; color:var(--c-ink-quiet); }
.c-faq > details.c-more { padding-top:0; }
.c-faq > details.c-more:first-child { border-top:0; }
.c-faq .c-more > summary { color:var(--c-ink); }
.c-faq .c-more__body { padding-bottom:12px; font-size:14px; }

/* ---- Login: no shell, the page alone; the left half is dark in both themes, like the rail ---- */
.c-login { display:flex; flex-wrap:wrap; min-height:100vh; min-height:100dvh; font-size:15px; }
.c-login__brand { --c-focus:var(--c-rail-focus); flex:1 1 400px; min-width:0; box-sizing:border-box; padding:48px 56px; display:flex; flex-direction:column; justify-content:space-between; gap:48px;
  background:var(--c-rail); border-right:1px solid var(--c-rail-line); color:#FFFFFF; }
.c-login__logo { display:flex; align-items:center; gap:12px; font-family:var(--c-font-display); font-size:20px; font-weight:600; letter-spacing:-.01em; }
.c-login__logo > .c-brand__mark { width:36px; height:36px; border-radius:10px; }
.c-login__pitch { display:flex; flex-direction:column; gap:20px; max-width:440px; }
.c-login__line { margin:0; font-family:var(--c-font-display); font-size:40px; font-weight:600; letter-spacing:-.02em; line-height:1.1; }
.c-login__bars { display:grid; grid-template-columns:repeat(6, minmax(0, 1fr)); gap:6px; max-width:320px; }
.c-login__bars > span { height:8px; border-radius:4px; background:#2E3547; }
.c-login__bars > .is-done { background:#4FD08B; }
.c-login__bars > .is-now { background:#6E8BFF; }
.c-login__foot { font-size:13px; color:var(--c-rail-quiet); }
main.c-login__main { flex:1 1 400px; min-width:0; max-width:none; box-sizing:border-box; margin:0; padding:48px 32px; display:flex; align-items:center; justify-content:center; }
form.c-login__form { width:100%; max-width:380px; display:flex; flex-direction:column; gap:20px; }
.c-login__form > h1 { margin:0; font-family:var(--c-font-display); font-size:30px; font-weight:600; letter-spacing:-.01em; line-height:1.2; }
.c-login__form .c-field__label { font-size:14px; }
.c-login__form input.c-input { min-height:48px; padding:0 14px; border-radius:12px; font-size:16px; }
.c-login__form > .c-btn { min-height:48px; border-radius:12px; font-size:16px; }
.c-login__form > p { margin:0; }

/* ==== The steps recorder and the publishing setup (/phones/{id}/recorder, /phones/{id}/publishing). Every component below is shown on /ui/kit. ==== */

/* ---- shot: a picture of a phone screen whose words can be chosen ---- */
.c-shot { position:relative; display:inline-block; align-self:flex-start; max-width:100%; line-height:0; }
.c-shot > img { display:block; max-width:100%; height:auto; border:1px solid var(--c-line-strong); border-radius:10px; cursor:crosshair; }
button.c-shot__word { position:absolute; min-height:0; padding:0; border:1.5px solid #6E8BFF; border-radius:3px; background:rgba(110,139,255,.2); cursor:pointer; }
button.c-shot__word:hover:not(:disabled) { border-color:#FFFFFF; background:rgba(110,139,255,.45); }

/* ---- table whose cells are edited in place; the picture beside the steps it yields ---- */
.c-table--edit td { padding:8px 12px; }
.c-table--edit td input.c-input { display:inline-block; width:min(210px, 100%); min-height:40px; vertical-align:middle; }
.c-table--edit td input.c-input--short { width:92px; }
.c-table--edit td.c-table__act > button.c-iconbtn { width:40px; height:40px; color:var(--c-ink-quiet); }
.c-table--edit code { font:400 13px/1.5 ui-monospace,Consolas,monospace; }
.c-more__body > .c-field { align-self:stretch; }
.c-recorder__screen { flex:1 1 320px; max-width:470px; }
.c-recorder__steps { flex:2 1 480px; min-width:0; }

@media (max-width:860px) {
  .c-login { flex-direction:column; flex-wrap:nowrap; }
  .c-login__brand { flex:none; padding:20px 20px 22px; gap:14px; border-right:0; }
  .c-login__pitch { gap:12px; }
  .c-login__line { font-size:24px; }
  .c-login__bars { max-width:200px; }
  .c-login__bars > span { height:6px; }
  main.c-login__main { flex:1 1 auto; align-items:flex-start; padding:28px 20px 40px; }
}
@media (max-width:750px) {
  /* A choice among more than three short values: on a phone the lit segment alone marks the choice. */
  .c-seg--dense label.c-seg__option { padding:0 4px; white-space:nowrap; }
  .c-seg--dense .c-seg__option input { position:absolute; width:1px; height:1px; opacity:0; }
  .c-main nav.c-toc { top:60px; }
  .c-section { scroll-margin-top:136px; }
  .c-setrow { padding:14px 16px; }
  .c-setrow--flush { padding:0; }
  .c-section__head { padding:16px 16px 2px; }
  .c-savebar { bottom:calc(68px + 8px + env(safe-area-inset-bottom, 0px)); padding:10px 12px 10px 16px; }
  .c-savebar > .c-btn--primary { flex:1 1 auto; }
  .c-table--stack td.c-table__act { padding-top:8px; text-align:left; }
  .c-recorder__screen { max-width:none; }
  /* A table edited in place has no room for columns: each row is its number, its first field and its buttons, then the rest. */
  table.c-table--edit, .c-table--edit tbody { display:block; }
  .c-table--edit thead { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip-path:inset(50%); }
  .c-table--edit tbody tr { display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px; padding:10px 12px; border-bottom:1px solid var(--c-line); }
  .c-table--edit tbody tr:last-child { border-bottom:0; }
  .c-table--edit tbody td { display:block; max-width:none; padding:0; border:0; }
  .c-table--edit tbody td:first-child { min-width:20px; }
  .c-table--edit tbody td.c-table__act { margin-left:auto; }
  .c-table--edit tbody td[data-cell=action] { order:1; flex:1 1 100%; }
  .c-table--edit tbody tr:hover > td { background:transparent; }
}
