/* Raqeb Vision — design system of 2026-11-05 (owner OK), on Raqeb's yellow #facc15:
   - yellow only for the main action and the active section; everything else white and charcoal;
   - text in charcoal, not black; one neutral ramp (100–800) for surfaces, lines and text;
   - each state colour in four steps (100 background · 300 · 500 · 800 text): a badge is 800 on 100;
   - IBM Plex Sans Arabic (self-hosted, OFL), two weights (400, 600); spacing in steps of 4;
   - radii 4 badges · 8 buttons and fields · 16 cards · 24 sheets; borders, not shadows;
   - line icons of one weight (Lucide, ISC: icons.svg), never emoji. */

@font-face { font-family: "Plex Arabic"; font-weight: 400; font-display: swap; src: url("fonts/plex-arabic-400.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+2010-2011, U+204F, U+2E41; }
@font-face { font-family: "Plex Arabic"; font-weight: 500; font-display: swap; src: url("fonts/plex-arabic-500.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+2010-2011, U+204F, U+2E41; }
@font-face { font-family: "Plex Arabic"; font-weight: 600; font-display: swap; src: url("fonts/plex-arabic-600.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+2010-2011, U+204F, U+2E41; }
@font-face { font-family: "Plex Arabic"; font-weight: 700; font-display: swap; src: url("fonts/plex-arabic-700.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+2010-2011, U+204F, U+2E41; }
@font-face { font-family: "Plex Arabic"; font-weight: 400; font-display: swap; src: url("fonts/plex-latin-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Arabic"; font-weight: 500; font-display: swap; src: url("fonts/plex-latin-500.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Arabic"; font-weight: 600; font-display: swap; src: url("fonts/plex-latin-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Arabic"; font-weight: 700; font-display: swap; src: url("fonts/plex-latin-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }


:root {
  /* neutral ramp, a little towards blue */
  --n100: #ffffff; --n200: #f8f9fa; --n300: #f3f4f6; --n400: #e6e8eb; --n500: #d3d8dd; --n600: #a6aeb6; --n700: #575f68; --n800: #1f2328;
  /* states: 100 background · 300 border · 500 mark · 800 text. A 500 mark passes 3:1 on white (UI-3,
     2026-11-24: the orange was #e8870e = 2.66:1, now #c26a00 = 3.92:1). */
  --ok-100: #e7f6ec; --ok-300: #a3dcb6; --ok-500: #1f9d4d; --ok-800: #146c35;
  --warn-100: #fdf2e3; --warn-300: #f8cf96; --warn-500: #c26a00; --warn-800: #8a4b00;
  --bad-100: #fdecee; --bad-300: #f3a6b1; --bad-500: #d92d43; --bad-800: #9c1530;
  --info-100: #e8effc; --info-300: #a5c0ec; --info-500: #2563c9; --info-800: #1a4790;
  --primary: var(--n800); --on-primary: #ffffff;
  /* Raqeb yellow: the main action, the active section and the logo mark, nothing else (2026-11-05, UI-3 2026-11-24). */
  --brand: #facc15; --on-brand: var(--n800);
  --secondary: var(--ok-500); --secondary-container: var(--ok-100); --on-secondary-container: var(--ok-800);
  --tertiary: var(--info-500); --tertiary-fixed: var(--info-100);
  --error: var(--bad-500); --error-container: var(--bad-100); --on-error-container: var(--bad-800);
  --surface: var(--n300); --card: var(--n100); --surface-low: var(--n200); --surface-mid: #eceef1; --surface-high: var(--n400);
  --ink: var(--n800); --ink-soft: var(--n700); --charcoal: var(--n800); --outline: var(--n500); --line: var(--n400);
  --radius: 4px; --radius-lg: 8px; --radius-xl: 16px; --radius-2xl: 24px;
  --field-h: 48px; --field-radius: 8px; --target: 44px;
  --shadow: 0 8px 24px rgba(31, 35, 40, 0.12);
  --cta-shadow: none;
  /* UI-3 (2026-11-24): every colour of the screens is a token here, so UI-4's dark block only
     redefines this list. A raw colour outside :root is a bug (plan, section 4, raw colours = 0). */
  --on-dark: #ffffff;                       /* text and icons on charcoal, red and blue fills */
  --edge: #7b838b;                          /* the edge of a field or an off switch: 3:1 on white (WCAG 1.4.11) */
  --hover: var(--n200); --focus-ring: rgba(24, 24, 27, 0.18);
  --scrim: rgba(31, 35, 40, 0.45);          /* the dim page under a sheet or the menu */
  --shadow-tip: 0 8px 24px rgba(0, 0, 0, 0.18); --shadow-knob: 0 1px 2px rgba(0, 0, 0, 0.25);
  --swatch-edge: rgba(0, 0, 0, 0.15);
  --pic-bg: #0b0d10;                        /* behind a camera picture while it loads */
  /* «Live»: a camera without a picture is a dark grey tile with white words (LiveLight drawing, 2026-11-24). */
  --nopic-bg: #2a2f36; --nopic-ink: #ffffff; --nopic-soft: #c9ced4; --nopic-line: #6b737c;
  --log-bg: var(--pic-bg); --log-ink: #d7dde6;
  /* The word on a hatched zone over a camera picture (UI-27, AnnotStyles drawing): the same on both themes,
     it sits on the picture, not on the page. #ffd28a on 80% near-black reads about 11:1. */
  --mark-bg: rgba(10, 12, 15, 0.8); --mark-ink: #ffd28a; --pic-chip-ink: #ffffff;
  /* «Not watched» (glossary): a minute nobody watched has its own look - stripes, a dashed edge
     and the eye-off icon - never the flat grey of «No picture», which is a camera we tried to see
     and could not. */
  --unwatched-bg: var(--n100); --unwatched-stripe: var(--n400); --unwatched-ink: var(--n800); --unwatched-edge: var(--n700);
  /* Reports, zones hour by hour: five blue steps, not yellow (yellow is the main action only). */
  --heat-0: var(--info-100); --heat-1: #c9daf6; --heat-2: var(--info-300); --heat-3: var(--info-500); --heat-4: var(--info-800);
  --heat-ink-light: var(--n800); --heat-ink-dark: var(--on-dark);
  /* Zone colours (UI-28, owner 2026-11-24): blue, teal, violet, pink, cyan, brown. Never yellow (the
     main action), red (destructive), green (success) or orange (a problem's warning). Each reads
     3.6:1 or more on a white AND a black picture; the smallest CIE76 distance between two is 26.9
     (normal sight), 16.5 deutan, 17.5 protan, 10.9 tritan (Machado 2009 simulation, 2026-11-24). */
  --zone-1: #3b82f6; --zone-2: #0f766e; --zone-3: #7c3aed; --zone-4: #db2777; --zone-5: #0891b2; --zone-6: #a0663a;
  --zone-halo: rgba(255, 255, 255, 0.7); --zone-label-bg: rgba(31, 35, 40, 0.88); --zone-label-ink: #ffffff;
  --zone-draft: #ffffff; --zone-draft-fill: rgba(255, 255, 255, 0.35); --zone-scrim: rgba(31, 35, 40, 0.18);
  --zone-grey: #a6aeb6; --click-in: #ffffff; --click-out: #1f2328;
  /* The branch TV (display.html): always dark, it hangs on a wall in a lit room. */
  --tv-bg: #0b0d10; --tv-ink: #f4f4f5; --tv-soft: #a1a1aa; --tv-tile: #18181b; --tv-edge: #27272a;
  --tv-bad: #7f1d1d; --tv-bad-edge: #b91c1c; --tv-grey: #71717a;
  /* «Settings › Look» (UI-18): each card is a small picture of its look, so they stay the same in
     the dark look too (dark.css does not redefine them). */
  --sample-light-bg: #ffffff; --sample-light-tile: #1f2328; --sample-dark-bg: #0b0d10; --sample-dark-tile: #2a2f36;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--surface); color: var(--ink); }
/* Arabic needs more room than Latin: 16 px text, line height 1.7, never letter-spacing (W3C alreq, report 2026-11-04). */
body { font: 16px/1.7 "Plex Arabic", "Segoe UI", Tahoma, system-ui, sans-serif; -webkit-font-smoothing: antialiased; min-height: 100dvh; }
[lang="en"] body, body:lang(en) { line-height: 1.55; }
a { color: inherit; }
h1 { font-size: 24px; line-height: 1.35; font-weight: 600; margin: 0; }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 10px; }
h3 { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
p { margin: 0 0 8px; }
.lead { font-size: 19px; font-weight: 600; margin: 0; }
.muted { color: var(--ink-soft); }
.small { font-size: 14px; }
.ok-text { color: var(--on-secondary-container); }
.bad-text { color: var(--on-error-container); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 14px; direction: ltr; unicode-bidi: isolate; }
.narrow { max-width: 640px; }
.grow { flex: 1 1 auto; min-width: 0; }
ul.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }

/* ── shell ─────────────────────────────────────────── */
/* The demo copy's line (OPS-29, 2026-11-24): fixed at the top of every page, in the info colours (800 on
   100, like a badge), never yellow; the page and the sticky menu start below it. */
.demo-line { position: fixed; inset-inline: 0; top: 0; z-index: 60; height: var(--demo-h); display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 0 16px; background: var(--info-100); color: var(--info-800); border-bottom: 1px solid var(--info-300); font-size: 14px;
  font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-line .ico-svg { width: 16px; height: 16px; flex: none; }
body:has(> .demo-line) { --demo-h: 32px; padding-top: var(--demo-h); }
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; }
.side { background: var(--card); border-inline-end: 1px solid var(--line); position: sticky; top: var(--demo-h, 0px); height: calc(100dvh - var(--demo-h, 0px)); overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px 10px; font-weight: 700; font-size: 17px; text-decoration: none; }
.brand .mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; font-size: 18px; box-shadow: var(--cta-shadow); }
.side > .brand { padding: 18px 20px 14px; font-size: 16px; font-weight: 600; }
.side > .brand .mark { width: 28px; height: 28px; border-radius: var(--radius); }
.nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px 16px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: var(--target); padding: 0 12px; border-radius: var(--radius-lg); font-size: 15px; text-decoration: none; color: var(--charcoal); }
.nav a:hover { background: var(--hover); }
.nav a.on { background: var(--brand); color: var(--on-brand); font-weight: 700; }
.nav a .ico { width: 22px; text-align: center; font-size: 16px; }
/* The ongoing alerts on «Alerts» (drawings 2026-11-24): a badge, 800 on 100 of red, with its icon. */
.count { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 7px 0 6px; border-radius: 11px; background: var(--bad-100); color: var(--bad-800); font-size: 12px; font-weight: 600; }
.count .ico-svg { width: 13px; height: 13px; }
.nav a .count { margin-inline-start: auto; }
.nav a .count .ico-svg, .nav a.on .count .ico-svg { color: var(--bad-800); }
.side .foot { margin-top: auto; padding: 12px 0; border-top: 1px solid var(--line); font-size: 13px; }
.side .foot .nav { padding: 0 12px 4px; }
.who-line { padding: 8px 24px 4px; color: var(--ink-soft); }
.who-line a { color: var(--ink-soft); }
.who-line .who { color: var(--ink); font-weight: 600; text-decoration: none; }
/* The header above each page: the branch picker (more than one branch) and the recordings search. */
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-height: 64px; padding: 10px 28px; background: var(--card); border-bottom: 1px solid var(--line); }
.branch-pick select { height: var(--target); padding: 0 12px; border: 1px solid var(--outline); border-radius: var(--radius-lg); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; max-width: 100%; }
.search-box { flex: 1 1 320px; max-width: 520px; display: flex; align-items: center; gap: 8px; height: var(--target); padding: 0 12px; border: 1px solid var(--outline); border-radius: var(--radius-lg); background: var(--card); color: var(--ink-soft); text-decoration: none; }
.search-box .ico-svg { width: 18px; height: 18px; }
.main { min-width: 0; }
.top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 20px 28px 8px; }
.top-title { flex: 1 1 auto; min-width: 0; }
.top .crumbs { font-size: 14px; color: var(--ink-soft); }
.top .crumbs a { text-decoration: none; }
.page { padding: 8px 28px 40px; display: grid; gap: 20px; max-width: 1400px; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .top, .page, .topbar { padding-inline: 16px; }
  .top { padding-top: 12px; }
  .search-box { flex-basis: 100%; max-width: none; }
  h1 { font-size: 21px; }
}

/* ── cards and grids ───────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card.flat { box-shadow: none; }
a.card { text-decoration: none; display: block; }
a.card:hover { border-color: var(--ink-soft); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.grid.cams { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.cols { display: grid; gap: 20px; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); align-items: start; }
@media (max-width: 1100px) { .cols { grid-template-columns: 1fr; } }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin-top: 12px; }
.stat { background: var(--surface-low); border-radius: var(--radius-lg); padding: 12px 14px; text-decoration: none; display: block; }
a.stat:hover { background: var(--surface-mid); }
.stat .v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat .k { font-size: 13px; color: var(--ink-soft); font-weight: 500; }
/* The trial's two numbers (D34, UI-22a 2026-11-24): first on «Reports», each with its count and target. */
.goals { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
.stat.goal { background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.stat.goal .v { font-size: 32px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.between { justify-content: space-between; }
.row.center { justify-content: center; }
.row.top-align { align-items: flex-start; }
.stack { display: grid; gap: 12px; }
.stack.tight { gap: 8px; }
.empty { text-align: center; padding: 32px 16px; color: var(--ink-soft); }
.empty h2 { color: var(--ink); }
.list-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; min-height: var(--target); padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; }
a.list-row:hover { border-color: var(--ink-soft); }
.list-row.plain { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding-inline: 0; }
.list-row.off { opacity: 0.55; }
.link-card h2 { margin: 0 0 4px; }
.trust { margin: 0; }
.danger-zone { border-color: var(--bad-300); }
.danger-zone > summary { color: var(--error); font-weight: 600; cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ── buttons, badges ───────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--target); padding: 0 16px; border-radius: var(--field-radius); border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; transition: transform 0.1s, opacity 0.15s, background 0.15s; white-space: nowrap; }
.btn:active { transform: scale(0.98); }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.btn.primary { background: var(--brand); color: var(--on-brand); box-shadow: var(--cta-shadow); }
.btn.primary:hover { opacity: 0.92; }
.btn.dark { background: var(--primary); color: var(--on-primary); }
.btn.ghost { background: var(--card); color: var(--primary); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-low); }
.btn.ghost.picked { border-color: var(--primary); background: var(--n300); }
.btn.danger { background: var(--card); color: var(--error); border-color: var(--bad-300); }
.btn.danger:hover { background: var(--bad-100); }
.btn.sm { min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn.big { min-height: 52px; font-size: 16px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.icon-btn { width: var(--target); padding: 0; }
form.inline { display: inline-flex; margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface-mid); color: var(--charcoal); white-space: nowrap; border: 1px solid transparent; }
.badge .ico { font-weight: 700; }
/* Five states, each a colour + an icon + a word (report 2026-11-04). Grey = we cannot see. */
.badge.bad { background: var(--error-container); color: var(--on-error-container); }
.badge.outline { background: transparent; border-color: var(--outline); color: var(--charcoal); }

/* ── notices ───────────────────────────────────────── */
.notice { border-radius: var(--radius-lg); padding: 12px 14px; font-size: 15px; border: 1px solid transparent; }
.notice.bad { background: var(--error-container); color: var(--on-error-container); }
.notice ul { margin: 0; padding-inline-start: 18px; }

/* ── fields: the label above, one column on a phone, the unit always visible ── */
.form { display: grid; gap: 18px; }
.fields { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); align-items: start; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; margin: 0; padding: 0; border: 0; }
.field > span:first-child, .field > legend { font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; padding: 0; }
.field .hint { font-size: 13px; color: var(--ink-soft); }
.inline-field { min-width: 180px; }
.field input[type=text], .field input[type=password], .field input[type=time], .field input[type=date], .field select, .field textarea {
  width: 100%; min-height: var(--field-h); padding: 0 14px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--card); border: 1px solid var(--edge); border-radius: var(--field-radius); outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.unit-field { display: flex; align-items: center; gap: 8px; }
.unit-field input { max-width: 140px; }
.unit-field .unit { color: var(--ink-soft); font-size: 15px; }
.pw { display: flex; gap: 8px; align-items: center; }
.pw input { flex: 1 1 auto; }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; min-height: var(--target); }
.check input { width: 20px; height: 20px; accent-color: var(--n800); }
/* A choice with its effect under it: the name stays one line wide on a phone (screens 2026-11-04). */
.check .sub { display: block; }
.days { display: flex; flex-wrap: wrap; gap: 6px; }
.days label { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; cursor: pointer; background: var(--card); }
.repeat { display: grid; gap: 12px; }
.repeat .item { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); align-items: end; padding: 12px; border: 1px dashed var(--line); border-radius: var(--radius-lg); background: var(--surface-low); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions-row { margin-top: 6px; }
.actions.sticky { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--surface) 40%); z-index: 5; }
.filters { gap: 12px; }
fieldset.chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
fieldset.chips legend { font-size: 15px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.chip-choice { position: relative; }
.chip-choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-choice span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; background: var(--card); }
.chip-choice input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ── «?» toggletip: a real button with a 44 px target; its text sits below the label ── */
.tip { position: relative; display: inline-flex; align-items: center; vertical-align: middle; }
.tip-btn { position: relative; width: 22px; height: 22px; padding: 0; border-radius: 50%; display: grid; place-items: center; font: inherit; font-size: 13px; font-weight: 700; line-height: 1;
  background: var(--surface-mid); color: var(--charcoal); border: 1px solid var(--line); cursor: pointer; }
.tip-btn::after { content: ""; position: absolute; inset: -11px; } /* the touch target: 44 × 44 */
.tip-btn:hover, .tip.open .tip-btn { background: var(--n800); color: var(--on-dark); border-color: var(--n800); }
.tip-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.tip-text:empty { display: none; }
.tip-text { position: absolute; z-index: 60; inset-inline-start: -10px; top: calc(100% + 10px);
  width: max-content; max-width: min(288px, 80vw); padding: 10px 12px; border-radius: 10px; background: var(--primary); color: var(--on-dark);
  font-size: 14px; font-weight: 400; line-height: 1.6; box-shadow: var(--shadow-tip); white-space: normal; text-align: start; }
.tip.flip .tip-text { inset-inline-start: auto; inset-inline-end: -10px; }
h1 .tip, h2 .tip, h3 .tip { margin-inline-start: 4px; }
.title-row { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ── a quiet «Advanced» section ── */
details.more { border-top: 1px dashed var(--line); padding-top: 12px; }
details.more > summary { cursor: pointer; font-size: 15px; font-weight: 600; color: var(--ink-soft); list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: var(--target); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+"; display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; }
details.more[open] > summary::before { content: "−"; }
details.more[open] > .fields, details.more[open] > .stack, details.more[open] > form { margin-top: 12px; }
details.group > summary, details.danger-zone > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; min-height: var(--target); }
details.group > summary::-webkit-details-marker, details.danger-zone > summary::-webkit-details-marker { display: none; }
details.group[open] > summary { margin-bottom: 12px; }
details.menu { position: relative; display: inline-block; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
/* «Pause» is the last button of its row: the menu hangs from its end side, inside the screen. */
.menu-list { position: absolute; z-index: 30; inset-inline-end: 0; top: calc(100% + 6px); display: grid; gap: 6px; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); min-width: 160px; }
/* On a phone the button may wrap to either edge, so a hanging menu can leave the screen: there the
   choices open in the flow, on their own line under the buttons (screens 2026-11-04). */
@media (max-width: 600px) {
  details.menu[open] { flex-basis: 100%; }
  .menu-list { position: static; display: flex; flex-wrap: wrap; margin-top: 6px; box-shadow: none; min-width: 0; }
}

/* ── tabs ──────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs a { display: inline-flex; align-items: center; min-height: var(--target); padding: 0 16px; text-decoration: none; font-size: 15px; color: var(--ink-soft); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a.on, .tabs a:hover { color: var(--primary); border-color: var(--n800); font-weight: 600; }

/* ── the wizard ────────────────────────────────────── */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.steps li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); }
[dir="rtl"] .steps li { padding: 6px 6px 6px 12px; }
.steps li .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-mid); font-weight: 700; color: var(--charcoal); }
.steps li.on { border-color: var(--primary); color: var(--primary); font-weight: 600; }
.steps li.on .n { background: var(--n800); color: var(--on-dark); }
.kind-cards { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.kind-cards legend { font-size: 15px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.kind-card { position: relative; }
.kind-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.kind-card span { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); font-size: 15px; }
.kind-card .ico { font-size: 20px; }
.kind-card input:checked + span { border-color: var(--primary); background: var(--n300); font-weight: 700; }
.kind-card input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }
.discover.busy [data-discover-status]::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-inline-end: 8px; border: 2px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.9s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── alerts ────────────────────────────────────────── */
.alert-card { background: var(--card); border: 1px solid var(--line); border-inline-start: 4px solid var(--line); border-radius: var(--radius-lg); padding: 12px 14px; display: grid; gap: 4px; }
.alert-card.open { border-inline-start-color: var(--error); }
.alert-card.seen { border-inline-start-color: var(--warn-500); }
.alert-card.resolved { border-inline-start-color: var(--secondary); }
.alert-card.unknown { border-inline-start-color: var(--edge); }
.alert-card .fact { font-weight: 600; font-size: 16px; }

/* ── tasks ─────────────────────────────────────────── */
.task-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 14px 16px; display: grid; gap: 4px; }
.task-card.on { border-color: var(--n800); }
.task-card h3 { margin: 0; font-size: 16px; }
.task-msg:empty { display: none; }
.switch-wrap { display: inline-flex; align-items: center; gap: 8px; min-height: var(--target); cursor: pointer; font-size: 14px; font-weight: 600; }
.switch { position: relative; display: inline-flex; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; inset: -9px; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--edge); transition: background 0.15s; }
.switch span::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--n100); box-shadow: var(--shadow-knob); transition: transform 0.15s; }
[dir="rtl"] .switch input:checked + span::after { transform: translateX(-20px); }
[dir="ltr"] .switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }
.switch input:disabled + span { opacity: 0.6; }
.soon-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.soon-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: var(--radius-lg); background: var(--surface-low); font-size: 14px; color: var(--charcoal); }
.soon-list .stack-tight { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }

/* ── cameras / live ────────────────────────────────── */
.cam-card { display: grid; gap: 8px; padding: 12px; }
.cam-card .pic, .cam .pic { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--pic-bg); border-radius: var(--radius-lg); }
.cam-card .pic.none, .cam-card .pic:not([src]) { background: var(--surface-mid); }
.nopic { aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--n300); color: var(--n700); padding: 16px; text-align: center; border-radius: var(--radius-lg); font-size: 28px; }
.nopic.big { font-size: 16px; }
.pic.big { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); background: var(--pic-bg); }
.cam { padding: 0; overflow: hidden; }
.cam .bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; }
.cam .pic { border-radius: 0; }
.cam .nopic { border-radius: 0; font-size: 15px; }
.cam .zones { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 14px; }
.chip { display: inline-block; margin: 2px; padding: 2px 10px; border-radius: 8px; background: var(--surface-low); font-size: 14px; }
.chip b { font-variant-numeric: tabular-nums; }
.chip.empty b { color: var(--warn-800); }
.meter-row { margin-bottom: 10px; }
.meter { height: 6px; background: var(--surface-mid); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.meter span { display: block; height: 100%; background: var(--secondary); border-radius: 3px; }
.meter.warn span { background: var(--warn-500); } /* VID-14: a clips bar at 90% of the cap or more */
#alerts li { padding: 8px 0; border-top: 1px solid var(--line); }

/* ── tables, heat grid (reports) ───────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: start; font-size: 13px; font-weight: 600; color: var(--ink-soft); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.heat { border-collapse: separate; border-spacing: 3px; }
.heat td, .heat th { padding: 0; text-align: center; border: 0; }
.heat th { font-size: 12px; color: var(--ink-soft); padding: 2px; }
.heat td.cell { width: 34px; height: 30px; border-radius: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.heat td.empty-cell { background: var(--surface-low); }
.heat td.name { text-align: start; padding-inline-end: 10px; white-space: nowrap; font-size: 14px; }


/* ── login ─────────────────────────────────────────── */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--surface); }
.auth .box { width: min(100%, 440px); background: var(--card); border-radius: var(--radius-2xl); padding: 28px 24px; box-shadow: var(--shadow); border: 1px solid var(--line); display: grid; gap: 16px; }
.auth .brand { padding: 0; }
.auth h1 { font-size: 22px; }

.pre { white-space: pre-wrap; background: var(--surface-low); border-radius: var(--radius-lg); padding: 12px 14px; font-size: 15px; }
.log { direction: ltr; text-align: left; white-space: pre-wrap; font: 12px/1.5 ui-monospace, Consolas, monospace; background: var(--log-bg); color: var(--log-ink); border-radius: var(--radius-lg); padding: 12px; max-height: 420px; overflow: auto; }

/* «What to do» on an alert, and the escalation choice: one tap saves it (2026-11-04). */
.alert-card .todo { font-weight: 600; }
.escalate { display: grid; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--line); margin-top: 4px; }
.segmented { display: flex; flex-wrap: wrap; gap: 6px; }
.segmented .seg { min-height: var(--target); padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font: inherit; font-size: 14px; cursor: pointer; }
.field.wide { grid-column: 1 / -1; }

/* The branch screen: read from across a kitchen (2026-11-04). */
body.display { background: var(--tv-bg); color: var(--tv-ink); min-height: 100vh; padding: 2vw; }
.display-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.display-head h1 { font-size: 3vw; margin: 0; }
.display-head .muted, .display-foot.muted { color: var(--tv-soft); font-size: 2vw; }
.display-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(28vw, 1fr)); gap: 2vw; margin-top: 2vw; }
.tile { background: var(--tv-tile); border: 2px solid var(--tv-edge); border-radius: 24px; padding: 2.5vw; text-align: center; }
.tile .n { font-size: 10vw; font-weight: 800; line-height: 1.1; }
.tile .k { font-size: 2.6vw; font-weight: 600; }
.tile .s { font-size: 1.8vw; color: var(--tv-soft); }
.tile.bad { background: var(--tv-bad); border-color: var(--tv-bad-edge); }
.tile.grey .n { color: var(--tv-grey); }
.display-off { font-size: 4vw; text-align: center; margin-top: 20vh; color: var(--tv-soft); }
/* The TV's pairing code (UI-20): read from across the room, so the digits are the biggest thing. */
.tv-code-box { min-height: 90vh; display: grid; place-content: center; text-align: center; gap: 2vw; }
.tv-code-box h1 { font-size: 3vw; margin: 0; color: var(--tv-soft); font-weight: 600; }
.tv-code-how { font-size: 2.6vw; margin: 0; }
.tv-code-digits { font-size: 14vw; font-weight: 700; letter-spacing: 0.08em; margin: 0; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tv-code-soft { font-size: 2vw; margin: 0; color: var(--tv-soft); }
/* «Branch screens»: one paired TV per row; the pairing form under them (SettingsV2 drawing). */
.pair-head { margin: 16px 0 0; }
.pair-form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.pair-form .field { margin: 0; }
.pair-code input { font-size: 20px; letter-spacing: 0.2em; inline-size: 9ch; text-align: center; font-variant-numeric: tabular-nums; }

/* The incident file under an alert: the steps in order, text only (2026-11-04). */
.timeline { margin: 6px 0 0; padding-inline-start: 18px; display: grid; gap: 4px; }

/* Redesign of the camera screens (owner, 2026-11-04): short task rows in two columns, «What does
   it see?» as picture-word buttons, watching as a switch, deleting as one quiet line. */
.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 8px 0; }
.role-chip { position: relative; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: inherit; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-align: start; }
.role-chip:hover { border-color: var(--n800); }
.role-chip .ico { font-size: 22px; line-height: 1; }
.role-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.role-chip.on, .role-chip:has(input:checked) { border-color: var(--n800); background: var(--n300); box-shadow: inset 0 0 0 1px var(--n800); }
.role-chip:has(input:focus-visible), .role-chip:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.small-roles .role-chip { min-height: 40px; font-size: 13px; }
.small-roles .role-chip .ico { font-size: 16px; }
.roles-more { border-top: 0; padding-top: 0; }
.sees-line { margin: 0; font-size: 15px; }
.task-list { display: grid; gap: 10px; }
@media (min-width: 1000px) { .task-list { grid-template-columns: 1fr 1fr; align-items: start; } }
.task-row { padding: 12px 14px; gap: 0; }
.task-line { display: flex; gap: 12px; align-items: flex-start; }
.task-switch { flex: none; min-width: 64px; }
.task-switch .switch-wrap { flex-direction: column; gap: 2px; align-items: center; min-height: 0; font-size: 12px; }
.task-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.task-text h3 { margin: 0; font-size: 15px; }
.task-text p { margin: 0; }
.task-text .task-msg:empty { display: none; }
.task-row { position: relative; }
.task-row .task-text { padding-inline-end: 72px; }
details.task-change { border-top: 0; padding-top: 0; }
details.task-change > summary { position: absolute; inset-block-start: 8px; inset-inline-end: 10px; min-height: 32px; font-size: 13px; }
details.task-change[open] > form { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.task-change > summary::before { width: 16px; height: 16px; font-size: 12px; }
details.group > .task-list { margin-top: 4px; }
.watch-row { flex-wrap: wrap; gap: 8px; }
.watch-row .task-msg:empty { display: none; }
.narrow-field { max-width: 440px; }
.danger-line { margin-top: 4px; }
.danger-line > summary { list-style: none; display: inline-flex; align-items: center; min-height: var(--target); color: var(--error); font-size: 14px; cursor: pointer; }
.danger-line > summary::-webkit-details-marker { display: none; }
.danger-line form { margin-top: 6px; gap: 12px; align-items: center; }

/* Branch page (redesign 2026-11-04): facts in lines, not rows of chips; one way to connect. */
.facts-list { margin: 4px 0 0; display: grid; gap: 4px; }
.facts-line { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
#tasks .task-line { padding-block: 10px; }
#tasks .task-line + .task-line { border-top: 1px solid var(--line); }
details.connect { border-top: 0; padding-top: 4px; }
details.connect > summary { border: 1px solid var(--line); border-radius: var(--field-radius); padding: 0 14px; }
details.connect > summary::before { display: none; }
.danger-line form.form { margin-top: 8px; }

/* The alerts' period: one-tap choices (redesign 2026-11-04). */
.segmented a.seg { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }


/* ══ Design system 2026-11-05 — overrides that apply the rules above to every component ══ */
body { font-size: 16px; }
h1 { font-size: 24px; font-weight: 600; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
.lead { font-size: 18px; }
.small { font-size: 14px; }
b, strong { font-weight: 600; }
.ok-text { color: var(--ok-800); }
.bad-text { color: var(--bad-800); }
.warn-text { color: var(--warn-800); }

/* line icons from the sprite: one weight, the colour of the text */
.ico-svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ico-svg.sm { width: 16px; height: 16px; }
.ico-svg.lg { width: 28px; height: 28px; }

/* cards: a border, no shadow */
.card, .task-card.on { box-shadow: none; }
.card { border-radius: var(--radius-xl); }
.alert-card, .task-card { border-radius: var(--radius-xl); }
.alert-card.seen { border-inline-start-color: var(--warn-500); }
.alert-card.resolved { border-inline-start-color: var(--ok-500); }
.alert-card.unknown { border-inline-start-color: var(--edge); }
.task-card.on { border-color: var(--n800); }

/* buttons: 48 tall, radius 8, yellow only for the main action */
.btn { border-radius: var(--radius-lg); font-weight: 600; min-height: 48px; }
.btn.sm { min-height: 40px; border-radius: var(--radius-lg); }
.btn.primary { box-shadow: none; }
.btn.ghost { color: var(--n800); border-color: var(--n500); }
.btn.ghost:hover { background: var(--n200); }
.btn.danger { border-color: var(--bad-300); color: var(--bad-800); }
.btn.dark { background: var(--n800); color: var(--on-dark); }

/* badges: 800 on 100, radius 4 */
.badge { border-radius: var(--radius); padding: 2px 8px; font-size: 12px; font-weight: 600; line-height: 18px; }
.badge.ok { background: var(--ok-100); color: var(--ok-800); }
.badge.warn { background: var(--warn-100); color: var(--warn-800); }
.badge.bad { background: var(--bad-100); color: var(--bad-800); }
.badge.grey { background: var(--n300); color: var(--n700); }
.badge.info { background: var(--info-100); color: var(--info-800); }
.badge.outline { border-color: var(--n500); color: var(--n700); }
.notice { border-radius: var(--radius-lg); }
.notice.ok { background: var(--ok-100); color: var(--ok-800); border-color: var(--ok-300); }
.notice.bad { background: var(--bad-100); color: var(--bad-800); border-color: var(--bad-300); }
.notice.warn { background: var(--warn-100); color: var(--warn-800); border-color: var(--warn-300); }
.notice.info { background: var(--info-100); color: var(--info-800); border-color: var(--info-300); }

/* choices: charcoal when picked — yellow stays for the main action */
.switch span { background: var(--edge); }
.switch input:checked + span { background: var(--n800); }
.chip-choice input:checked + span, .segmented .seg.on { background: var(--n800); border-color: var(--n800); color: var(--on-dark); font-weight: 600; }
.role-chip.on, .role-chip:has(input:checked), .kind-card input:checked + span { border-color: var(--n800); background: var(--n300); box-shadow: inset 0 0 0 1px var(--n800); font-weight: 600; }
.role-chip .ico, .kind-card .ico { color: var(--n700); }
.role-chip .ico-svg, .kind-card .ico-svg { width: 22px; height: 22px; }
.tip-btn:hover, .tip.open .tip-btn { background: var(--n800); color: var(--on-dark); border-color: var(--n800); }
.check input, .days input { accent-color: var(--n800); }
.tabs a.on, .tabs a:hover { border-color: var(--n800); }
.steps li.done .n { background: var(--ok-100); color: var(--ok-800); }

/* the side menu: line icons; the active section in yellow, its words always --on-brand (dark on
   yellow in both looks: UI-4 turns --n800 light) */
.brand .mark { box-shadow: none; color: var(--on-brand); }
.brand .mark .ico-svg { width: 20px; height: 20px; }
.nav a { color: var(--n700); font-weight: 400; }
.nav a .ico-svg { color: var(--n700); }
.nav a.on { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.nav a.on .ico-svg { color: var(--on-brand); }

/* empty states: a picture-word, a title, one line, one button */
.empty .empty-ico { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: var(--n300); color: var(--n700); display: grid; place-items: center; }
.empty .empty-ico .ico-svg { width: 30px; height: 30px; }

/* a phone (D13, 2026-11-23): four sections and «More» in a bar at the bottom; the side menu goes */
.tabbar { display: none; }
@media (max-width: 900px) {
  .side { display: none !important; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; inset-inline: 0; bottom: 0; z-index: 45;
    background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); }
  .tabbar > a, .tabbar .tab-more > summary { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 52px; justify-content: center; text-decoration: none; font-size: 12px; color: var(--n700); cursor: pointer; }
  .tabbar .pill { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 999px; }
  .tabbar > a.on, .tabbar .tab-more.on > summary { color: var(--n800); font-weight: 600; }
  .tabbar > a.on .pill, .tabbar .tab-more.on > summary .pill { background: var(--brand); color: var(--on-brand); }
  .tabbar .count { position: absolute; top: 0; inset-inline-start: calc(50% + 6px); height: 20px; padding: 0 6px 0 5px; font-size: 11px; }
  .tabbar .count .ico-svg { width: 12px; height: 12px; }
  .tabbar .tab-more > summary { list-style: none; }
  .tabbar .tab-more > summary::-webkit-details-marker { display: none; }
  /* «More» is a sheet from the bottom over a dim page; a tap on the dim page closes it (app.js). */
  .tabbar .tab-more[open]::before { content: ""; position: fixed; inset: 0; background: var(--scrim); z-index: 58; }
  .more-sheet { position: fixed; inset-inline: 0; bottom: 0; z-index: 59; display: grid; gap: 2px; background: var(--card);
    padding: 16px 12px calc(16px + env(safe-area-inset-bottom, 0px)); border-radius: var(--radius-2xl) var(--radius-2xl) 0 0; }
  .more-sheet a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: var(--radius-lg); text-decoration: none; color: var(--n800); font-size: 15px; }
  .more-sheet a .ico-svg { color: var(--n700); }
  .more-sheet a.on { background: var(--brand); color: var(--on-brand); font-weight: 600; }
  .more-sheet a.on .ico-svg { color: var(--on-brand); }
  .page { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .actions.sticky { bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
}

/* a small decision on a phone: a sheet from the bottom over a dim page (the pause choices) */
@media (max-width: 600px) {
  details.menu[open]::before { content: ""; position: fixed; inset: 0; background: var(--scrim); z-index: 58; }
  details.menu[open] .menu-list { position: fixed; inset-inline: 0; bottom: 0; z-index: 59; margin: 0; display: grid; gap: 8px;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px)); border-radius: var(--radius-2xl) var(--radius-2xl) 0 0; border: 0; box-shadow: var(--shadow); }
  details.menu[open] .menu-list .btn { width: 100%; min-height: 48px; font-size: 15px; }
}

/* loading: grey shapes of the content, so the page does not jump (the live pictures) */
.skeleton { background: linear-gradient(90deg, var(--n300) 25%, var(--n200) 50%, var(--n300) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--radius-lg); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* A phone: «Change» under the text, not in the corner, so the text keeps its width (2026-11-05). */
@media (max-width: 600px) {
  .task-row .task-text { padding-inline-end: 0; }
  details.task-change { margin-inline-start: 64px; }
  details.task-change > summary { position: static; }
  .task-switch { min-width: 52px; }
}

/* «Drawing» above a camera's Now picture (2026-11-11). */
.look-pick { align-items: center; gap: 8px; margin-bottom: 12px; }
.look-pick .field { margin: 0; }
/* «Everything»: the kinds under the picture, each with its colour (2026-11-11). */
.look-legend { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.875rem; }
.look-legend li { display: inline-flex; align-items: center; gap: 6px; }
.look-legend .swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; border: 1px solid var(--swatch-edge); }

/* Reports: «Where people stand», one map per camera (2026-11-11). */
.heat-maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.heat-maps figure { margin: 0; }
.heat-maps .pic { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); background: var(--pic-bg); }
.heat-maps figcaption { margin-top: 6px; font-size: 0.875rem; color: var(--ink-soft); }
/* «Model» and the lines under the picture (2026-11-11). */
.look-info { margin: 10px 0 0; }
.things-form { align-items: flex-end; gap: 8px; margin-top: 12px; }
.things-form .field { flex: 1; min-width: 220px; margin: 0; }

/* A busy button keeps its words and shows a turning ring. */
.btn.is-busy::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-inline-end: 8px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin 0.9s linear infinite; vertical-align: -2px; }
@media (prefers-reduced-motion: reduce) { .btn.is-busy::before { animation: none; } }
/* The floor map on the owner's plan (2026-11-12). Sizes inside the SVG are metres: its viewBox is the plan. */
.floor-card { display: flex; flex-direction: column; gap: 12px; }
.floor-svg { width: 100%; max-height: 72vh; background: var(--surface-low); border: 1px solid var(--line); border-radius: var(--radius-lg); touch-action: none; }
.floor-svg .shape { fill: var(--n400); stroke: var(--n600); stroke-width: 0.02; }
.floor-svg .shape-floor { fill: var(--n100); stroke: none; }
.floor-svg .shape-wall { fill: var(--n800); stroke: none; }
.floor-svg .shape-door { fill: var(--n100); stroke: var(--warn-500); stroke-width: 0.08; }
.floor-svg .shape-window { fill: var(--info-300); stroke: var(--info-500); stroke-width: 0.08; }
.floor-svg .shape-table { fill: var(--warn-100); stroke: var(--warn-300); }
.floor-svg .shape-sofa { fill: var(--info-100); stroke: var(--info-300); }
.floor-svg .shape-cabinet { fill: var(--ok-100); stroke: var(--ok-300); }
.floor-svg .shape-chair { fill: var(--n300); stroke: var(--n500); }
.floor-svg .shape-name, .floor-svg .cam-name { font-size: 0.22px; fill: var(--ink); text-anchor: middle; dominant-baseline: middle; font-family: inherit; pointer-events: none; }
.floor-svg .cam-name { font-size: 0.18px; fill: var(--ink-soft); }
.floor-svg .cam { fill: var(--card); stroke: var(--n800); stroke-width: 0.05; }
/* «Live floor map» (UI-13, LiveMap drawing 2026-11-24): a charcoal dot per person (the posture is a
   word in «Zones now», not a colour), every camera's view in one pale blue, the zones as soft shading,
   an alert's zone outlined in its state colour, and an empty one that should be staffed hatched. */
.floor-svg .person circle { fill: var(--n800); stroke: var(--n100); stroke-width: 0.04; }
.floor-svg .trail { fill: none; stroke: var(--n700); stroke-width: 0.05; stroke-dasharray: 0.12 0.1; stroke-linecap: round; display: none; }
.floor-svg.mode-trail .trail { display: inline; }
.floor-svg .heat { display: none; }
.floor-svg.mode-heat .heat { display: inline; }
.floor-svg .view { fill: var(--info-300); stroke: var(--info-500); stroke-width: 0.03; fill-opacity: 0.22; stroke-opacity: 0.7; }
.floor-svg .look { stroke: var(--info-500); stroke-width: 0.06; stroke-linecap: round; }
.floor-svg .zone { fill: var(--info-100); fill-opacity: 0.55; stroke: none; }
.floor-svg .zone.alert { stroke-width: 0.06; fill-opacity: 0.9; }
.floor-svg .zone.alert.warn { fill: var(--warn-100); stroke: var(--warn-500); }
.floor-svg .zone.alert.bad { fill: var(--bad-100); stroke: var(--bad-500); }
.floor-svg .zone.alert.info { fill: var(--info-100); stroke: var(--info-500); }
.floor-svg .zone.alert.hatched { fill: url(#zone-hatch); }
.floor-svg .hatch-bg { fill: var(--warn-100); }
.floor-svg .hatch-line { stroke: var(--warn-500); stroke-width: 0.05; }
.floor-svg .zone-name { font-size: 0.16px; fill: var(--ink); text-anchor: middle; dominant-baseline: middle; font-family: inherit; pointer-events: none;
  paint-order: stroke; stroke: var(--card); stroke-width: 0.06; stroke-linejoin: round; }
.floor-svg .zone-name.alert { fill: var(--warn-800); font-weight: 600; }
.map-modes { background: var(--card); border: 1px solid var(--line); }
.live-note { margin-inline-start: auto; }
.map-main { flex: 999 1 640px; min-width: 0; }
.rail-end { margin-inline-start: auto; }
.zone-rows li { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 16px; font-size: 14px; }
.zone-rows .n { min-width: 26px; height: 24px; display: inline-grid; place-items: center; padding: 0 6px; border-radius: var(--radius); background: var(--surface-mid); font-weight: 600; font-size: 13px; }
.zone-rows .n.grey { background: var(--n300); color: var(--ink-soft); }
.zone-rows .badge .ico-svg { width: 14px; height: 14px; }
.zone-rows .grow { flex: 1; min-width: 0; }
.zone-rows .end { font-size: 13px; color: var(--ink-soft); }
.map-key { list-style: none; display: grid; gap: 10px; font-size: 14px; }
.map-key li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.key-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--n800); flex: none; }
.key-cam { width: 16px; height: 12px; border: 2px solid var(--n800); border-radius: 3px; flex: none; }
.key-zone { width: 16px; height: 12px; border: 2px solid var(--warn-500); background: var(--warn-100); border-radius: 3px; flex: none; }
/* «Tie the cameras»: the camera picture and the plan side by side on a wide screen, one above the other on a phone. */
.link-panes { display: grid; gap: 16px; }
@media (min-width: 960px) { .link-panes { grid-template-columns: 1fr 1fr; align-items: start; } }
.link-pane { margin: 0; display: grid; gap: 6px; }
.link-pic { position: relative; }
.link-pic img { display: block; width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface-low); }
.link-marks { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.floor-svg[data-link], .floor-svg[data-scale] { cursor: crosshair; }
.mark circle { fill: var(--n800); stroke: var(--n100); stroke-width: 0.03; cursor: grab; }
.link-marks .mark circle { stroke-width: 3; }
.mark text { fill: var(--n100); text-anchor: middle; dominant-baseline: central; font-weight: 600; pointer-events: none; font-family: inherit; }
.mark.open circle { fill: var(--info-500); }
.mark.weak circle { fill: var(--bad-500); }
.floor-svg circle.mark { fill: var(--info-500); stroke: var(--n100); stroke-width: 0.03; }
.floor-svg .scale-line { stroke: var(--info-500); stroke-width: 0.05; }

/* Reports, zones hour by hour: five steps of one blue (UI-3, 2026-11-24). Text flips to white from
   step 3, where dark text would fall under 4.5:1 (contrast table in the UI-3 preview). */
.heat td.h0 { background: var(--heat-0); color: var(--heat-ink-light); }
.heat td.h1 { background: var(--heat-1); color: var(--heat-ink-light); }
.heat td.h2 { background: var(--heat-2); color: var(--heat-ink-light); }
.heat td.h3 { background: var(--heat-3); color: var(--heat-ink-dark); }
.heat td.h4 { background: var(--heat-4); color: var(--heat-ink-dark); }

/* «Not watched» (UI-3, 2026-11-24): stripes + a dashed edge + eye-off, so it never reads as the
   flat grey of «No picture» nor as «empty». UI-5 and the timelines use .badge.unwatched / .unwatched. */
.unwatched { background: repeating-linear-gradient(135deg, var(--unwatched-bg) 0 6px, var(--unwatched-stripe) 6px 8px); color: var(--unwatched-ink); }
.badge.unwatched { background: var(--unwatched-bg); color: var(--unwatched-ink); border: 1px dashed var(--unwatched-edge); }
.badge.unwatched .ico-svg { width: 14px; height: 14px; }
/* A word for screen readers where the cell shows only a colour and an icon (UI-5, the reports' hours). */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.heat td.unwatched .ico-svg { width: 14px; height: 14px; }

/* ── «Live» (UI-8, LiveLight drawing 2026-11-24) ───────────────────────────
   The grid of pictures and, beside it, the rail: «Ongoing», «Branches now», «Camera status». The
   grid's size (1 / 4 / 9) is in the address; a phone always shows one picture per row. */
.live-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.live-views { display: flex; gap: 2px; padding: 2px; border-radius: var(--radius-lg); background: var(--surface-mid); }
.live-views a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: 14px; }
.live-views a.on { background: var(--charcoal); color: var(--on-dark); font-weight: 600; }
.live-now { display: inline-flex; align-items: center; gap: 8px; }
.live-tools { margin-inline-start: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.grid-pick { display: flex; gap: 6px; }
.grid-pick a { width: var(--target); height: var(--target); display: grid; place-items: center; border: 1px solid var(--outline); border-radius: var(--radius-lg); background: var(--card); color: var(--ink-soft); }
.grid-pick a.on { background: var(--charcoal); border-color: var(--charcoal); color: var(--on-dark); }
.live-cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.live-grid { flex: 999 1 640px; min-width: 0; display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; }
.live-grid.g1 { grid-template-columns: minmax(0, 1fr); }
.live-grid.g9 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.live-rail { flex: 1 1 300px; max-width: 380px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 1100px) { .live-grid.g9 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .live-grid, .live-grid.g9 { grid-template-columns: minmax(0, 1fr); flex-basis: 100%; }
  .live-rail { max-width: none; }
  .grid-pick { display: none; }  /* one picture per row on a phone: there is nothing to pick */
}
.live-grid .cam { border-radius: var(--radius-lg); box-shadow: none; }
.live-grid .pic-link { display: block; position: relative; background: var(--pic-bg); }
.pic-mark { position: absolute; transform: translateX(-50%); max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 2px 8px; border-radius: 4px; background: var(--mark-bg); color: var(--mark-ink); font-size: 13px; font-weight: 600; line-height: 1.5; pointer-events: none; }
.live-grid .nopic.dark { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; aspect-ratio: 16 / 9; padding: 16px; border-radius: 0;
  background: var(--nopic-bg); color: var(--nopic-ink); font-size: 15px; text-decoration: none; text-align: center; }
.live-grid .nopic.dark .ico-svg { width: 28px; height: 28px; }
.live-grid .nopic.dark span { font-size: 13px; color: var(--nopic-soft); }
.live-grid .nopic.dark b { font-weight: 600; }
/* UI-9: the one fix on a camera without a picture, an outline on the dark cell (LiveLight drawing). */
.live-grid .nopic.dark form { margin: 8px 0 0; }
.live-grid .nopic.dark .btn.nopic-fix { min-height: 44px; padding: 0 14px; background: transparent; color: var(--nopic-ink); border: 1px solid var(--nopic-line); }
.live-grid .nopic.dark .btn.nopic-fix:hover { background: transparent; border-color: var(--nopic-soft); }
.rail-lines li .why { display: block; color: var(--n700); }
.cam-foot { display: grid; gap: 8px; padding: 10px 12px 12px; }
.cam-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cam-name > a { font-weight: 600; text-decoration: none; }
.cam-name .site { margin-inline-start: auto; }
.cam-foot .zones { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; }
.cam-foot .chip { margin: 0; display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 0 8px; border-radius: var(--radius); font-size: 12px; background: var(--surface-mid); }
.cam-foot .chip.warn { background: var(--warn-100); color: var(--warn-800); font-weight: 600; }
.cam-foot .chip.bad { background: var(--bad-100); color: var(--bad-800); font-weight: 600; }
.cam-foot .chip.info { background: var(--info-100); color: var(--info-800); font-weight: 600; }
.cam-foot .chip .ico-svg { width: 14px; height: 14px; }
.rail-card { padding: 0; border-radius: var(--radius-lg); box-shadow: none; }
.rail-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.rail-head h2 { margin: 0; font-size: 16px; }
.rail-head .link, .rail-lines .link { margin-inline-start: auto; font-size: 13px; color: var(--info-800); }
.rail-pad { padding: 10px 16px; margin: 0; }
/* UI-11 (LiveLight drawing, 2026-11-24): the alert nobody took yet, under the other branches' rows. */
.rail-others { border-bottom: 1px solid var(--line); }
.rail-others:last-child { border-bottom: 0; }
.rail-alert { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.rail-pic { display: block; position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--pic-bg); }
.rail-pic .zoom { position: absolute; inset: 0; }
.rail-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rail-pic.nopic { background: var(--n300); color: var(--n700); display: grid; place-items: center; text-decoration: none; }
.rail-pic .nopic-word { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.rail-pic .chip-time { position: absolute; top: 8px; inset-inline-start: 8px; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px;
  border-radius: var(--radius); background: var(--mark-bg); color: var(--pic-chip-ink); font-size: 12px; font-weight: 600; }
.rail-pic .ico-svg { width: 14px; height: 14px; }
.rail-alert-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 2px; }
.rail-alert-head .fact { font-weight: 600; font-size: 16px; color: inherit; text-decoration: none; }
.rail-alert-head .badge .ico-svg, .rail-alert .esc .ico-svg { width: 14px; height: 14px; }
.rail-alert .esc { display: flex; align-items: center; gap: 4px; color: var(--warn-800); font-weight: 500; }
.rail-alert .esc.done { color: var(--n700); }
.rail-alert .esc .end { margin-inline-start: auto; font-weight: 400; }
.esc-bar { height: 4px; border-radius: 4px; background: var(--n400); overflow: hidden; margin-top: -4px; }
.esc-bar > span { display: block; height: 100%; border-radius: 4px; background: var(--warn-500); }
.rail-alert .esc.bad { color: var(--bad-800); }
.esc-bar.bad > span { background: var(--bad-500); }
.rail-actions { display: flex; align-items: flex-start; gap: 8px; margin-top: 4px; }
.rail-actions .grow { flex: 1 1 auto; margin: 0; }
.rail-actions .grow .btn { width: 100%; }
.rail-actions .menu-list form { margin: 0; }
.rail-actions .menu-list .btn { width: 100%; }
.rail-actions .menu-list .muted { margin-top: -4px; }
.rail-list { list-style: none; margin: 0; padding: 0; }
.rail-list li + li { border-top: 1px solid var(--line); }
.rail-list a { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 16px; color: inherit; text-decoration: none; border-inline-start: 3px solid transparent; }
.rail-list a:hover { background: var(--hover); }
.rail-list a.on { border-inline-start-color: var(--charcoal); background: var(--surface-low); }
.rail-list .grow { flex: 1; min-width: 0; display: grid; }
.rail-list .fact { font-weight: 600; font-size: 14px; }
.rail-list .badge .ico-svg { width: 14px; height: 14px; }
.rail-list .small .ico-svg { width: 14px; height: 14px; vertical-align: -2px; }
[dir="rtl"] .fwd .ico-svg { transform: scaleX(-1); }
.rail-big b { font-size: 22px; font-weight: 600; }
.rail-lines { list-style: none; margin: 0; padding: 0 12px 12px; display: grid; gap: 6px; }
.rail-lines li { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: var(--radius); font-size: 13px; }
.rail-lines li.grey { background: var(--n300); color: var(--n800); }
.rail-lines li.bad { background: var(--bad-100); color: var(--bad-800); }
.rail-lines li .grow { flex: 1; min-width: 0; }
.rail-lines li a { color: inherit; }
.rail-lines .ico-svg { width: 16px; height: 16px; flex: none; }
/* ── the alerts list (UI-14, 2026-11-24; drawings AlertsV2, AlertsEnded) ─────────
   One row per problem; a grey camera-health strip above it; a side panel for the open alert.
   Borders, not shadows; the picked row is charcoal, never yellow (yellow = «Take» and the section). */
.nav a .count, .tabbar .count { background: var(--n800); color: var(--on-dark); gap: 2px; display: inline-flex; align-items: center; justify-content: center; }
.nav a .count.urgent, .tabbar .count.urgent { background: var(--bad-500); }  /* urgent: red, with its icon and number */
/* The menu badge is dark, or red when urgent (UI-14): its icon takes the badge's light ink, not the
   light pill's red of UI-6's `.count`, which stays for «Live». */
.nav a .count .ico-svg, .nav a.on .count .ico-svg, .tabbar .count .ico-svg { width: 12px; height: 12px; color: inherit; }
.tabs .tab-count { margin-inline-start: 8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--n800); color: var(--on-dark); font-size: 12px; font-weight: 600; display: inline-grid; place-items: center; }
.afilters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.afilters .pick select { min-height: var(--target); padding: 0 12px; border: 1px solid var(--edge); border-radius: var(--field-radius); background: var(--card); color: var(--ink); font: inherit; font-size: 14px; }
.afilters .acount { margin-inline-start: auto; font-size: 14px; }
.fchips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fchip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: 999px; background: var(--n800); color: var(--on-dark); font-size: 14px; text-decoration: none; }
.fchip .ico-svg { width: 14px; height: 14px; }
.clear-all { font-size: 14px; }
.health-strip { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--n300); color: var(--n700); font-size: 14px; }
.health-strip > span { flex: 1 1 auto; min-width: 0; }
.health-strip .ico-svg { width: 18px; height: 18px; }
.asplit { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; min-width: 0; }
.alist-box, .alist-card, .alist, .alist li { min-width: 0; }
.asplit.with-panel { grid-template-columns: minmax(0, 1fr) 400px; }
/* With the panel open the list keeps room for the title: narrower time, owner and picture columns. */
/* Only while the panel sits beside the list: below 1280 it covers the list, and the phone's row layout must win (UI-15). */
@media (min-width: 1280px) { .with-panel .ahead, .with-panel .arow, .with-panel .alist-card.ended .arow, .with-panel .ahead.ended { grid-template-columns: 96px minmax(0, 1fr) 104px 136px 64px; } }
.alist-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-xl); overflow: hidden; }
.alist { list-style: none; margin: 0; padding: 0; }
.ahead, .arow { display: grid; grid-template-columns: 104px minmax(0, 1fr) 128px 176px 72px; gap: 12px; align-items: center; padding: 0 16px; }
.ahead.ended, .alist-card.ended .arow { grid-template-columns: 104px minmax(0, 1fr) 128px 200px 72px; }
.ahead { position: sticky; top: 0; z-index: 2; min-height: 40px; background: var(--surface-low); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); }
.ahead a { display: inline-flex; align-items: center; gap: 4px; min-height: var(--target); text-decoration: none; color: inherit; }
.ahead a:hover { color: var(--ink); }
.ahead .c-time, .ahead .c-owner { flex-direction: row; }
.ahead .ico-svg { width: 14px; height: 14px; color: var(--ink); }
.arow { min-height: 64px; padding-block: 8px; border-bottom: 1px solid var(--line); border-inline-start: 2px solid transparent; text-decoration: none; color: inherit; }
.alist li:last-child .arow { border-bottom: 0; }
.arow:hover { background: var(--hover); }
.arow.on { background: var(--n300); border-inline-start-color: var(--n800); }
.arow:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
.arow .badge .ico-svg, .c-owner .ico-svg { width: 14px; height: 14px; vertical-align: -2px; margin-inline-end: 4px; }
.c-main, .c-time, .c-owner { display: flex; flex-direction: column; min-width: 0; }
.a-title { font-size: 15px; font-weight: 600; }
.a-place, .a-nth, .c-time .muted { font-size: 13px; }
.xn { display: inline-block; margin-inline-start: 6px; padding: 0 6px; border-radius: var(--radius); background: var(--n300); color: var(--n800); font-size: 12px; font-weight: 600; vertical-align: 1px; }
.c-time { font-size: 14px; font-variant-numeric: tabular-nums; }
.c-owner { font-size: 14px; }
.strong { font-weight: 600; }
.thumb { display: block; width: 64px; height: 40px; border-radius: var(--radius); overflow: hidden; background: var(--pic-bg); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.none { background: var(--n300); color: var(--n700); display: grid; place-items: center; }  /* grey = no picture */
.thumb.none .ico-svg { width: 18px; height: 18px; }
.aday-head { margin: 0; padding: 10px 16px; font-size: 14px; font-weight: 600; background: var(--surface-low); border-bottom: 1px solid var(--line); }
.aday-foot { margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); display: flex; gap: 6px; align-items: center; }
.aday-foot .ico-svg { width: 16px; height: 16px; }
.amore { display: flex; justify-content: center; padding-top: 12px; }
.empty .empty-ico.ok { background: var(--ok-100); color: var(--ok-800); }
.apanel { position: sticky; top: 16px; max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 16px; display: grid; gap: 12px; align-content: start; }
.apanel-title { margin: 0; font-size: 18px; line-height: 1.5; }
.apanel-title:focus { outline: none; }
.apanel-title:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
/* UI-15 (2026-11-24): the row is a box, its title link stretched over it, so «Undo» can sit in the row. */
.arow { position: relative; cursor: pointer; }
.arow:focus-within { outline: 3px solid var(--primary); outline-offset: -3px; }
.a-open { color: inherit; text-decoration: none; }
.a-open::after { content: ""; position: absolute; inset: 0; }
.a-open:focus-visible { outline: none; }
.row-undo { position: relative; z-index: 1; display: inline; }
.linkish { background: none; border: 0; padding: 0; min-height: 32px; font: inherit; font-size: 14px; color: var(--ink); text-decoration: underline; cursor: pointer; }
/* The alert's side panel (UI-15, drawing AlertsV2, spec C6): a border, not a shadow (change c). */
.apanel { padding: 0; gap: 0; }
.ap-head { padding: 16px; display: grid; gap: 4px; }
.ap-meta { display: flex; align-items: center; gap: 8px; }
.ap-meta .badge .ico-svg { width: 14px; height: 14px; vertical-align: -2px; margin-inline-end: 4px; }
.ap-close { margin-inline-start: auto; }
.ap-where { margin: 0; }
.ap-pic { position: relative; aspect-ratio: 16 / 9; background: var(--pic-bg); }
.ap-view, .ap-view img { width: 100%; height: 100%; }
.ap-view img { object-fit: cover; display: block; }
.ap-none { width: 100%; height: 100%; display: grid; place-content: center; justify-items: center; gap: 6px; background: var(--n300); color: var(--n700); font-size: 14px; text-align: center; padding: 16px; }  /* grey = no picture */
.ap-none .ico-svg { width: 24px; height: 24px; }
.ap-under { padding: 12px 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
/* «View recording» (VID-9): the kept clip plays in the picture's own place; without one, its status and the
   numbers for that time, scrolled inside the same 16:9 box. Picked, the button is charcoal (a choice, not yellow). */
.ap-rec-btn { min-height: 44px; }
.ap-rec-btn.on { background: var(--n800); border-color: var(--n800); color: var(--on-dark); }
.ap-rec { background: var(--card); overflow: auto; }
.ap-video { width: 100%; height: 100%; display: block; background: var(--pic-bg); }
.ap-rec-wait { padding: 12px 16px; display: grid; gap: 8px; align-content: start; }
.ap-rec-wait p { margin: 0; }
.ap-rec-wait .badge .ico-svg, .ap-nums .badge .ico-svg { width: 14px; height: 14px; }
.ap-nums { display: grid; gap: 4px; width: 100%; }
.ap-nums p { margin: 0; }
.ap-num-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ap-num-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; padding: 0 8px; border-radius: var(--radius); }
.ap-num-list li.now { border: 1px solid var(--line); font-weight: 600; }
.ap-switch { gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2px; }
.ap-switch .seg { border: 0; border-radius: 6px; min-height: 40px; }
.ap-actions { padding: 12px 16px; display: flex; gap: 8px; align-items: center; background: var(--card); }
.ap-actions form:first-child:has(.btn.primary) { flex: 1; }
.ap-actions .btn.primary { width: 100%; }
.ap-actions .ico-svg { width: 18px; height: 18px; }
.ap-more { margin-inline-start: auto; }
.ap-more .menu-list { min-width: 240px; box-shadow: none; }
.ap-more .menu-list p { margin: 0; }
/* «Assign» (OPS-11): the person and how long, in the same bordered popover as «⋯». */
.ap-assign .menu-list { min-width: 260px; box-shadow: none; }
.ap-assign-form { display: grid; gap: 10px; }
.ap-assign-form p { margin: 0; }
.menu-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-done { margin: 0 16px 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.ap-done .ico-svg { width: 16px; height: 16px; vertical-align: -3px; margin-inline-end: 6px; }
.ap-reasons { margin: 0 16px 12px; display: grid; gap: 6px; }
.ap-reasons .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-reasons .seg { min-height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font: inherit; font-size: 14px; cursor: pointer; color: var(--ink); }
.ap-reasons .seg.on { background: var(--n800); border-color: var(--n800); color: var(--on-dark); font-weight: 600; }  /* a picked choice is charcoal */
.ap-sec { padding: 12px 16px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.ap-sec p { margin: 0; }
.ap-h { margin: 0; font-size: 15px; font-weight: 600; }
.ap-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ap-steps li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.ap-steps .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2px dashed var(--n600); }
.ap-steps .done .dot { background: var(--n800); border: 0; color: var(--on-dark); }
.ap-steps .dot .ico-svg { width: 14px; height: 14px; }
.ap-steps .skip { color: var(--ink-soft); }
.ap-steps .skip .dot { border-style: solid; border-color: var(--n400); }
.ap-steps .when { text-align: end; }
.ap-sec .timeline { margin: 0; }
@media (max-width: 1279px) {
  .asplit.with-panel { grid-template-columns: minmax(0, 1fr); }
  /* The panel covers the list (full screen on a phone), with its close link at the top (spec, layout 390). */
  .apanel { position: fixed; inset: 0; inset-inline-start: auto; width: min(464px, 100vw); max-height: none; border-radius: 0; z-index: 60; }
}
@media (max-width: 700px) {
  .ahead { display: none; }
  .arow, .alist-card.ended .arow { grid-template-columns: auto minmax(0, 1fr) 56px; grid-template-areas: "sev main pic" "sev time pic" "sev owner pic"; gap: 2px 10px; min-height: 72px; }
  .c-sev { grid-area: sev; align-self: start; }
  .c-main { grid-area: main; }
  .c-time { grid-area: time; flex-direction: row; flex-wrap: wrap; gap: 0 6px; font-size: 13px; }
  .c-owner { grid-area: owner; flex-direction: row; flex-wrap: wrap; gap: 0 6px; font-size: 13px; }
  .c-pic { grid-area: pic; align-self: center; }
  .thumb { width: 56px; height: 56px; }
  .afilters .acount { margin-inline-start: 0; flex-basis: 100%; }
  .apanel { width: 100vw; padding-bottom: 76px; }
  /* «Take» stays at the bottom, in the thumb's reach (spec, layout 390). */
  .ap-actions { position: fixed; inset-inline: 0; bottom: 0; z-index: 61; border-top: 1px solid var(--line); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .ap-actions details.menu[open] { flex-basis: auto; }
  .ap-more .menu-list { position: absolute; display: grid; top: auto; bottom: calc(100% + 6px); min-width: 240px; }
}

/* ── the camera page's «Video» tab (UI-12a, CameraV2 drawing 2026-11-24) ── */
.cam-cols { grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr); }
@media (max-width: 1100px) { .cam-cols { grid-template-columns: 1fr; } }
.cam-main { padding: 0; overflow: hidden; border-radius: var(--radius-lg); box-shadow: none; }
.cam-stage { position: relative; background: var(--pic-bg); }
.cam-stage .pic.big { border-radius: 0; }
.cam-stage .nopic.dark { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; aspect-ratio: 16 / 9; padding: 16px; border-radius: 0;
  background: var(--nopic-bg); color: var(--nopic-ink); font-size: 15px; text-align: center; }
.cam-stage .nopic.dark .ico-svg { width: 28px; height: 28px; }
.cam-stage .nopic.dark [data-past-line] { color: var(--nopic-soft); font-size: 14px; min-height: 1.5em; }
.stage-chip { position: absolute; top: 12px; inset-inline-end: 12px; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px;
  border-radius: var(--radius); background: var(--card); color: var(--ink); font-size: 13px; font-weight: 600; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--bad-500); flex: none; }
.tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.tl-day { display: inline-flex; align-items: center; gap: 8px; }
.tl-day .ico-svg { width: 16px; height: 16px; color: var(--ink-soft); }
/* Labels in their own column, the tracks share one width so a minute sits at the same x on every row. */
.timeline { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr); column-gap: 12px; row-gap: 6px; align-items: center; padding: 12px 16px 4px; }
.tl-label { font-size: 12px; color: var(--ink-soft); }
/* Every cell has its row and column: the click layer spans rows 2-4, and auto-placement would push the tracks under it. */
.tl-label { grid-column: 1; } .tl-ticks, .tl-track { grid-column: 2; }
.tl-r1 { grid-row: 1; } .tl-r2 { grid-row: 2; } .tl-r3 { grid-row: 3; } .tl-r4 { grid-row: 4; }
.tl-ticks { position: relative; height: 18px; font-size: 12px; color: var(--ink-soft); }
.tl-tick { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--outline); padding-left: 4px; white-space: nowrap; overflow: hidden; }
.tl-track { position: relative; background: var(--surface-low); border-radius: 2px; }
.tl-hours { height: 8px; }
.tl-open { position: absolute; top: 0; bottom: 0; background: var(--n700); border-radius: 2px; }
.tl-people { height: 26px; }
.tl-alerts { height: 20px; }
.tl-track > span { position: absolute; top: 0; bottom: 0; }
.tl-q { box-shadow: inset -1px 0 0 var(--card); }
.tl-p0 { background: var(--heat-0); } .tl-p1 { background: var(--heat-1); } .tl-p2 { background: var(--heat-2); }
.tl-p3 { background: var(--heat-3); } .tl-p4 { background: var(--heat-4); }
.tl-nopic { background: var(--n500); }
.tl-closed { background: var(--surface-low); }
.tl-later { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.tl-gap { opacity: 0.95; }
.tl-alerts .tl-alert { top: 3px; bottom: 3px; min-width: 4px; border-radius: 2px; cursor: pointer; }
.tl-alert-critical { background: var(--bad-500); } .tl-alert-warning { background: var(--warn-500); } .tl-alert-info { background: var(--info-500); }
.tl-alert.ongoing { border-right: 3px solid var(--ink); }
/* The click layer over the three tracks: the cursor (a picked time) and «now» (dashed red). */
.tl-over { grid-column: 2; grid-row: 2 / span 3; align-self: stretch; position: relative; cursor: pointer; border-radius: 2px; }
.tl-over:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.tl-cursor, .tl-now { position: absolute; top: -4px; bottom: -4px; width: 0; pointer-events: none; }
.tl-cursor { border-left: 3px solid var(--ink); }
.tl-now { border-left: 2px dashed var(--bad-500); }
.tl-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 4px 16px 16px; padding-inline-start: 120px; }
.tl-legend li { display: inline-flex; align-items: center; gap: 6px; }
.tl-legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 2px; }
.cam-main [data-tl-msg] { margin: 0; padding: 0 16px; }
/* The ways to move on the timeline (UI-12b, CameraV2 drawing): the jumps at the start, the day, the
   calendar and the time at the end, the zoom after them. The zoomed-out minutes are clipped. */
.tl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.tl-jumps, .tl-when { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tl-when { margin-inline-start: auto; }
.tl-bar .btn { gap: 6px; }
.tl-bar .btn .ico-svg { width: 16px; height: 16px; }
.tl-bar .btn[disabled] { opacity: 0.45; cursor: default; }
.tl-time { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--card); font-size: 13px; color: var(--ink-soft); }
.tl-time input { min-height: 36px; padding: 0; border: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); }
.tl-time:focus-within { outline: 3px solid var(--primary); outline-offset: 2px; }
.tl-zoom .seg { min-height: 40px; }
.tl-at { margin: 0; padding: 8px 16px 0; min-height: 1.5em; }
.tl-ticks, .tl-track { overflow: hidden; }
/* The calendar floats over the page (fixed, placed by timeline.js), so the card does not clip it. */
.tl-cal { position: fixed; z-index: 40; width: 300px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.tl-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.tl-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.tl-cal-wd { padding: 4px 0; font-size: 12px; color: var(--ink-soft); }
.tl-cal-day { position: relative; display: grid; place-items: center; min-height: 40px; border-radius: var(--radius); color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums; }
a.tl-cal-day:hover { background: var(--surface-low); }
a.tl-cal-day:focus-visible { outline: 3px solid var(--primary); outline-offset: 1px; }
.tl-cal-day.on { background: var(--n800); color: var(--on-dark); font-weight: 600; }
.tl-cal-day.later { opacity: 0.4; }
.tl-cal-dot { position: absolute; bottom: 5px; inset-inline-start: calc(50% - 3px); width: 6px; height: 6px; border-radius: 50%; background: var(--warn-500); }
.tl-cal-day.on .tl-cal-dot { background: var(--on-dark); }
.tl-cal-key { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; }
.tl-cal-key .tl-cal-dot { position: static; }
.look-more { padding: 12px 20px; border-radius: var(--radius-lg); box-shadow: none; }
/* «Today's events» beside the picture (UI-12c). Each row is one 44 px button; the one under the
   timeline's cursor is charcoal-edged (a picked choice is charcoal, design system 2026-11-05). On a
   wide screen the list scrolls inside its card, so the card stays beside the picture; on a phone it
   grows with the page (no scroll inside a scroll). */
.cam-events h2 { margin: 0; }
.ev-list { list-style: none; margin: 8px 0 0; padding: 0; }
.ev { display: flex; flex-direction: column; align-items: stretch; gap: 2px; width: 100%; min-height: 44px; padding: 8px; border: 0; border-inline-start: 3px solid transparent;
  border-radius: var(--radius); background: transparent; color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.ev:hover { background: var(--surface-low); }
.ev:focus-visible { outline: 3px solid var(--primary); outline-offset: 1px; }
.ev.on { background: var(--surface-low); border-inline-start-color: var(--n800); }
.ev-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ev-name { overflow-wrap: anywhere; }
.ev-count { font-variant-numeric: tabular-nums; }
.cam-events [data-ev-more] { margin-top: 8px; }
@media (min-width: 1101px) { .ev-list { max-height: 420px; overflow-y: auto; } }
/* A finger drags the timeline's cursor sideways; up and down still scroll the page (UI-12c). */
.tl-over { touch-action: pan-y; }
@media (max-width: 640px) {
  .timeline { grid-template-columns: 56px minmax(0, 1fr); column-gap: 8px; padding: 10px 12px 4px; }
  .tl-tick:nth-child(even) { visibility: hidden; }  /* every 6 hours on a phone: the labels would touch */
  .tl-legend { padding-inline-start: 12px; }
  .tl-tick { overflow: visible; }
  .tl-bar { padding: 10px 12px; }
  .tl-when { margin-inline-start: 0; }
  /* A small decision on a phone is a sheet from the bottom (design system, 2026-11-05). */
  .tl-cal { inset-inline: 0 !important; top: auto !important; bottom: 0; z-index: 59; width: auto; border-radius: var(--radius-2xl) var(--radius-2xl) 0 0; padding: 16px 16px 24px;
    box-shadow: 0 0 0 100vmax var(--scrim); }  /* over the tab bar, on a dim page; a tap on it closes (timeline.js) */
}

/* «Settings» (UI-18, SettingsV2 drawing 2026-11-24): the tabs are pills, the picked one charcoal. */
.tabs.pills { border-bottom: 0; gap: 4px; }
.tabs.pills a { min-height: 40px; padding: 0 12px; border: 0; border-radius: var(--radius-lg); margin: 0; color: var(--ink); }
.tabs.pills a:hover { background: var(--hover); color: var(--ink); font-weight: 400; }
.tabs.pills a.on { background: var(--n800); color: var(--on-dark); font-weight: 600; }
table.recipients tr.off td { color: var(--ink-soft); }
table.recipients td:last-child { text-align: end; }
.screen-row { align-items: center; }
.theme-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; } /* not .look-pick: that is the camera page's drawing picker (merge, 2026-11-24) */
.look-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; text-align: start; }
.look-card:hover { background: var(--hover); }
.look-card.on { border: 2px solid var(--n800); padding: 11px; }
.look-sample { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; height: 64px; padding: 6px; border-radius: var(--radius); border: 1px solid var(--swatch-edge); }
.look-sample i { border-radius: 3px; }
.look-sample.light { background: var(--sample-light-bg); }
.look-sample.light i { background: var(--sample-light-tile); }
.look-sample.dark { background: var(--sample-dark-bg); }
.look-sample.dark i { background: var(--sample-dark-tile); }
.look-sample.auto { background: linear-gradient(to left, var(--sample-dark-bg) 50%, var(--sample-light-bg) 50%); }
.look-sample.auto i { background: transparent; }
.look-sample i:nth-child(3) { grid-column: 2; }
.look-word { display: inline-flex; align-items: center; gap: 8px; }
.look-word .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--edge); }
.look-card.on .look-word .dot { border: 5px solid var(--n800); }
/* A phone keeps the name, the channel and the actions; the language opens with «Edit» (UI-18). */
@media (max-width: 600px) { table.recipients th:nth-child(3), table.recipients td:nth-child(3) { display: none; } }
/* The recipients list (OPS-9): on a phone, the name, the channel and «Edit»; the row opens the rest. */
table.people tr.off td { color: var(--ink-soft); }
table.people td:last-child { text-align: end; }
@media (max-width: 600px) { table.people th:nth-child(n+3):not(:last-child), table.people td:nth-child(n+3):not(:last-child) { display: none; } }

/* Demo copy: the drawn screen of a page not built yet (preview.html, 2026-11-24). */
.preview-note { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.preview-shot { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--card); }

/* ── the zone editor v2 (UI-28, ZonesV2 drawings 2026-11-24) ─────────────────────────────────────
   The picture first at the reading start, the panel 360 px at the end; the picture and its SVG are
   never mirrored. The toolbar is a charcoal pill with visible labels; the active tool is white, not
   yellow (a picked choice is never yellow). Borders, not shadows: «raised» is a border. */
.zed { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.zed-card { position: relative; padding: 0; overflow: hidden; }
.zed-stage { position: relative; background: var(--pic-bg); aspect-ratio: 16 / 9; user-select: none; -webkit-user-select: none; }
.zed-pic, .zed-heat, .zed-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.zed-heat { opacity: 0.75; pointer-events: none; }
.zed-svg { touch-action: none; cursor: crosshair; outline: none; }
.zed-svg:focus-visible { outline: 3px solid var(--on-dark); outline-offset: -5px; }
.zed-stage.busy .zed-svg { cursor: progress; }
.zed-scrim { fill: var(--zone-scrim); pointer-events: none; }
.zed-z .zed-fill { fill: var(--zc); fill-opacity: 0.28; cursor: pointer; outline: none; transition: fill-opacity 0.15s; }
.zed-z.thing .zed-fill { fill-opacity: 0.32; }
.zed-z .zed-hatch { pointer-events: none; }
.zed-hatch-line { stroke: var(--zone-halo); stroke-width: 2; stroke-opacity: 0.35; }
.zed-z .zed-halo { fill: none; stroke: var(--zone-halo); stroke-width: 4; stroke-linejoin: round; pointer-events: none; }
.zed-z .zed-edge { fill: none; stroke: var(--zc); stroke-width: 2; stroke-linejoin: round; pointer-events: none; }
.zed-z.hover .zed-fill, .zed-z .zed-fill:focus { fill-opacity: 0.42; }
.zed-z.hover .zed-edge, .zed-z .zed-fill:focus ~ .zed-edge { stroke-width: 3; }
.zed-z.sel .zed-edge { stroke: var(--zone-draft); stroke-width: 3; }
/* The other zones fade in their own colour, never grey: grey means «No picture». */
.zed-z.faded .zed-fill { fill-opacity: 0.12; }
.zed-z.faded .zed-edge { stroke-opacity: 0.5; }
.zed-z.glass .zed-fill { fill-opacity: 0.12; }
.zed-z.problem .zed-edge { stroke: var(--warn-500); stroke-dasharray: 8 5; }
.zed-stage.grey .zed-z .zed-fill { fill-opacity: 0; }
.zed-stage.grey .zed-z .zed-edge { stroke: var(--zone-grey); stroke-dasharray: none; }
.zed-ghost { fill: none; stroke: var(--zone-draft); stroke-width: 2; stroke-dasharray: 7 5; pointer-events: none; }
.zed-preview { fill: var(--zone-draft-fill); stroke: var(--zone-draft); stroke-width: 2; stroke-dasharray: 6 4; pointer-events: none; }
.zed-drawline { fill: none; stroke: var(--zone-draft); stroke-width: 2; stroke-dasharray: 6 4; pointer-events: none; }
.zed-pt { fill: var(--zone-draft); stroke: var(--n800); stroke-width: 2; pointer-events: none; }
.zed-pt.first { fill: var(--n800); stroke: var(--zone-draft); }
.zed-click.in { fill: var(--click-in); stroke: var(--click-out); stroke-width: 2; }
.zed-click.out { fill: var(--click-out); stroke: var(--click-in); stroke-width: 2; }
.zed-hit { fill: transparent; cursor: grab; }
.zed-handle .zed-knob { fill: var(--zone-draft); stroke: var(--n800); stroke-width: 2; pointer-events: none; }
.zed-handle.picked .zed-knob { fill: var(--n800); stroke: var(--zone-draft); }
.zed-mid-dot { fill: var(--zone-draft); fill-opacity: 0.85; stroke: var(--n800); stroke-width: 1.5; pointer-events: none; }
.zed-cross { fill: none; stroke: var(--zone-draft); stroke-width: 3; pointer-events: none; }
.zed-chips { position: absolute; inset: 0; pointer-events: none; }
.zed-chip { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 6px; max-width: 46%; padding: 3px 10px; border-radius: 999px;
  background: var(--zone-label-bg); color: var(--zone-label-ink); font-size: 13px; font-weight: 600; line-height: 20px; white-space: nowrap; border: 1px solid transparent; }
.zed-chip bdi { overflow: hidden; text-overflow: ellipsis; }
.zed-chip .ico-svg { width: 14px; height: 14px; flex: none; }
.zed-chip.sel { border-color: var(--zone-label-ink); }
.zed-chip.tiny { padding: 3px 6px; }
.zed-chip.problem > .ico-svg:last-of-type { color: var(--warn-300); }
.zed-pword { font-weight: 400; color: var(--warn-300); overflow: hidden; text-overflow: ellipsis; }
.zed-chip.ghost { pointer-events: auto; cursor: pointer; background: var(--n100); color: var(--n800); border: 1px dashed var(--n800); min-height: 32px; font: inherit; font-size: 13px; font-weight: 600; }
.zed-chip.ghost::after { content: ""; position: absolute; inset: -6px; } /* a 44 px target */
.zed-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; border: 1px solid var(--zone-label-ink); }
.zed-n { display: inline-flex; align-items: center; gap: 2px; padding-inline-start: 6px; border-inline-start: 1px solid var(--n600); }
.zed-tools { position: absolute; top: 12px; inset-inline: 12px; margin-inline: auto; width: max-content; max-width: calc(100% - 24px); display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px;
  border-radius: var(--radius-lg); background: var(--zone-label-bg); color: var(--zone-label-ink); }
.zed-tool { display: inline-flex; align-items: center; gap: 6px; min-height: var(--target); padding: 0 10px; border: 1px solid transparent; border-radius: var(--radius-lg); background: transparent; color: inherit; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.zed-tool .ico-svg { width: 18px; height: 18px; }
.zed-tool:hover:not([disabled]) { border-color: var(--n600); }
.zed-tool[aria-pressed="true"] { background: var(--n100); color: var(--n800); }
.zed-tool[disabled] { opacity: 0.45; cursor: not-allowed; }
.zed-tool.hint { border-color: var(--n100); }
.zed-tool:focus-visible { outline: 2px solid var(--n100); outline-offset: 1px; }
.zed-switch { position: relative; }
.zed-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.zed-switch .zed-knob { position: relative; width: 30px; height: 18px; border-radius: 9px; background: var(--n700); flex: none; }
.zed-switch .zed-knob::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--n100); transition: inset-inline-start 0.15s; }
.zed-switch input:checked + .zed-knob { background: var(--n100); }
.zed-switch input:checked + .zed-knob::after { inset-inline-start: 14px; background: var(--n800); }
.zed-switch input:focus-visible + .zed-knob { outline: 2px solid var(--n100); outline-offset: 2px; }
.zed-sep { width: 1px; align-self: stretch; margin: 6px 4px; background: var(--n700); }
.zed-tip .tip-btn { background: transparent; color: var(--zone-label-ink); border-color: var(--n600); }
.zed-phone { display: none; }
.zed-mini { position: absolute; bottom: 12px; inset-inline: 12px; margin-inline: auto; width: max-content; max-width: calc(100% - 24px); display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px;
  border-radius: var(--radius-lg); background: var(--zone-label-bg); color: var(--zone-label-ink); }
.zed-mbtn { display: inline-flex; align-items: center; gap: 6px; min-height: var(--target); min-width: var(--target); justify-content: center; padding: 0 10px; border: 1px solid transparent; border-radius: var(--radius-lg); background: transparent; color: inherit; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.zed-mbtn .ico-svg { width: 18px; height: 18px; }
.zed-mbtn.on { background: var(--n100); color: var(--n800); }
.zed-mbtn[disabled] { opacity: 0.45; cursor: not-allowed; }
.zed-mbtn:focus-visible { outline: 2px solid var(--n100); outline-offset: 1px; }
.zed-mini-hint { font-size: 13px; padding: 0 8px; color: var(--warn-300); }
.zed-undo { position: absolute; bottom: 12px; inset-inline: 12px; margin-inline: auto; width: max-content; max-width: calc(100% - 24px); display: flex; align-items: center; gap: 10px; padding-block: 6px; padding-inline: 14px 6px;
  border-radius: var(--radius-lg); background: var(--zone-label-bg); color: var(--zone-label-ink); font-size: 14px; }
.zed-undo > .ico-svg { width: 18px; height: 18px; }
.zed-undo .btn.ghost { background: transparent; color: var(--zone-label-ink); border-color: var(--n600); }
.zed-x { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: var(--radius-lg); background: transparent; color: inherit; cursor: pointer; }
.zed-x .ico-svg { width: 18px; height: 18px; }
.zed-nopic { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; text-align: center; background: var(--nopic-bg); color: var(--nopic-ink); }
.zed-nopic > .ico-svg { width: 36px; height: 36px; color: var(--nopic-soft); }
.zed-nopic .small { color: var(--nopic-soft); max-width: 40ch; }
.zed-foot { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; padding: 10px 16px; }
.zed-foot p { margin: 0; }
.zed-status { display: inline-flex; align-items: center; gap: 6px; min-height: 22px; }
.zed-status .ico-svg { width: 16px; height: 16px; }
.zed-status.ok { color: var(--ok-800); }
.zed-status.bad { color: var(--bad-800); }
.zed-spin { width: 14px; height: 14px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin 0.9s linear infinite; }
.zed-panel { position: sticky; top: 12px; display: grid; gap: 14px; }
.zed-panel [data-list-view], .zed-panel [data-detail-view] { display: grid; gap: 14px; }
.zed-head { display: flex; align-items: center; gap: 8px; margin: 0; }
.zed-head h2 { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.zed-head .ico-svg { width: 18px; height: 18px; }
.zed-sugg { display: grid; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.zed-sugg p:empty { display: none; }
.zed-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.zed-row { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 6px; border-radius: var(--radius-lg); }
.zed-row.hover { background: var(--hover); }
.zed-row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-size: 15px; text-align: start; cursor: pointer; }
.zed-row bdi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.zed-row .ico-svg { width: 16px; height: 16px; flex: none; }
.zed-row .badge { display: inline-flex; align-items: center; gap: 4px; }
.zed-row .badge .ico-svg { width: 13px; height: 13px; }
.zed-sw { width: 16px; height: 16px; border-radius: var(--radius); background: var(--zc); flex: none; }
.zed-sw.floor { background-image: repeating-linear-gradient(45deg, transparent 0 3px, var(--zone-halo) 3px 4px); }
.zed-ghost-sw { width: 16px; height: 16px; border-radius: var(--radius); border: 1.5px dashed var(--n800); flex: none; }
.zed-icon-btn { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: var(--radius-lg); background: transparent; color: var(--n800); cursor: pointer; }
.zed-icon-btn:hover { background: var(--hover); }
.zed-icon-btn .ico-svg { width: 18px; height: 18px; }
.zed-template { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.zed-template select { flex: 1; min-height: var(--field-h); padding: 0 12px; border: 1px solid var(--edge); border-radius: var(--field-radius); background: var(--card); color: var(--ink); font: inherit; }
.zed-problem { display: flex; align-items: center; gap: 6px; margin: 0; padding: 6px 10px; border-radius: var(--radius); background: var(--warn-100); color: var(--warn-800); }
.zed-problem .ico-svg { width: 16px; height: 16px; }
.zed-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.zed-task { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.zed-task b { display: block; font-size: 15px; }
.zed-task-sum { text-decoration: none; display: block; line-height: 1.5; }
.zed-task-sum:hover { text-decoration: underline; }
.zed-adv { display: grid; gap: 12px; }
.zed-choice { border: 0; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; }
.zed-choice legend { font-size: 15px; font-weight: 600; padding: 0; margin-bottom: 4px; display: inline-flex; gap: 6px; align-items: center; }
.zed-choice label { display: flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; }
.zed-choice input { width: 20px; height: 20px; accent-color: var(--n800); }
.zed-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.zed-swatch { width: 44px; height: 44px; border-radius: var(--radius-lg); border: 2px solid var(--card); outline: 1px solid var(--swatch-edge); cursor: pointer; }
.zed-swatch.on { outline: 3px solid var(--n800); }
.zed-menu { position: fixed; z-index: 70; min-width: 180px; padding: 4px; display: grid; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.zed-menu-item { min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--radius); background: transparent; color: var(--ink); font: inherit; font-size: 15px; text-align: start; cursor: pointer; }
.zed-menu-item:hover, .zed-menu-item:focus-visible { background: var(--hover); }
.zed-menu-item[disabled] { opacity: 0.45; cursor: not-allowed; }
@media (max-width: 1100px) { .zed { grid-template-columns: 1fr; } .zed-panel { position: static; } }
/* A phone: the picture stays at the top while the list scrolls; the tools are four labelled
   buttons and «More» (spec §1; labels stay visible on the phone bar). */
@media (max-width: 700px) {
  .zed-main { position: sticky; top: 0; z-index: 5; }
  .zed-card { border-radius: 0; margin-inline: -16px; }
  .zed-desk { display: none; }
  .zed-phone { display: inline-flex; }
  .zed-tools { position: static; width: auto; max-width: none; margin: 0; border-radius: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--n800); }
  .zed-tool { flex-direction: column; gap: 2px; min-height: 48px; padding: 4px; font-size: 12px; justify-content: center; }
  .zed-tip { display: none; }
  .zed-mini, .zed-undo { bottom: 8px; }
  .zed-chip { font-size: 12px; padding: 2px 8px; }
}
@media (prefers-reduced-motion: reduce) { .zed-spin { animation: none; } .zed-z .zed-fill, .zed-switch .zed-knob::after { transition: none; } }

/* Recordings › Search (UI-17, SearchV2 drawing 2026-11-24): a fixed form in one row, then the runs found.
   A run we cannot judge keeps its «Not watched» / «No picture» badge and a softer time, never a found row's look. */
.search-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 12px; align-items: end; margin-bottom: 16px; }
.search-results { padding: 0; }
.search-head { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.search-head h2 { margin: 0; }
.search-list { list-style: none; margin: 0; padding: 0; }
.search-hit { display: grid; grid-template-columns: minmax(140px, auto) 1fr auto; gap: 8px 16px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.search-hit:last-child { border-bottom: 0; }
.search-when, .search-what { display: grid; gap: 2px; min-width: 0; }
.search-when b { font-variant-numeric: tabular-nums; }
.search-hit.unknown .search-when b { font-weight: 500; color: var(--ink-soft); }
.search-alert { display: inline-flex; align-items: center; gap: 4px; color: var(--warn-800); font-weight: 600; }
@media (max-width: 600px) {
  .search-hit { grid-template-columns: 1fr auto; padding: 12px 16px; }
  .search-what { grid-column: 1 / -1; grid-row: 2; }
  .search-head { padding: 12px 16px; }
}

/* «Branches › Camera status» (UI-16, BranchesV2 drawing 2026-11-24): one row per camera, its state
   now, why, the last 30 working days and the uptime. Rows wrap on a phone instead of scrolling sideways.
   A day is a column of its opening-hour minutes: picture (green), no picture (grey, 3:1 on white) and
   «Not watched» with its own stripes (.unwatched above), never the flat grey. */
.health { padding: 0; }
.health-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 16px; border-bottom: 1px solid var(--line); }
.health-head .legend { margin-inline-start: auto; display: flex; flex-wrap: wrap; gap: 12px; }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-inline-end: 4px; vertical-align: middle; }
.hrow { display: grid; grid-template-columns: minmax(140px, 1.2fr) 140px minmax(160px, 2fr) minmax(150px, 1.6fr) 104px; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.hrow:last-child { border-bottom: 0; }
.hrow.hhead { padding-block: 8px; font-weight: 600; }
.hrow.plain { display: block; }
.hname, .hwhy, .hshare { display: grid; gap: 2px; min-width: 0; }
.hrow .end { text-align: end; justify-items: end; }
.strip { display: flex; gap: 2px; height: 22px; }
.strip .day { flex: 1; min-width: 3px; display: flex; flex-direction: column-reverse; border-radius: 2px; overflow: hidden; background: var(--surface-mid); }
.strip .day.closed { background: transparent; border: 1px dashed var(--line); }
.strip i { display: block; }
.strip i.picture, .sw.picture { background: var(--ok-500); }
.strip i.no_picture, .sw.no_picture { background: var(--edge); }
.sw.unwatched { border: 1px dashed var(--unwatched-edge); }
.rec-row .badge { margin-inline-start: 8px; }
@media (max-width: 900px) {
  .hrow { grid-template-columns: 1fr auto; grid-template-areas: "name status" "why why" "strip share"; gap: 6px 12px; }
  .hrow.hhead { display: none; }
  .hrow > :nth-child(1) { grid-area: name; } .hrow > :nth-child(2) { grid-area: status; }
  .hrow > :nth-child(3) { grid-area: why; } .hrow > :nth-child(4) { grid-area: strip; } .hrow > :nth-child(5) { grid-area: share; }
  .health-head .legend { margin-inline-start: 0; }
}

/* The paired branch TV's wall (UI-21, TvWall drawing 2026-11-23): light, read across a room. Sizes are in
   vw from the 1920 px drawing (40 px = 2.1vw), so any TV shows the same layout. */
body.tv-wall { background: var(--surface); color: var(--ink); height: 100vh; overflow: hidden; margin: 0; }
.tvw { box-sizing: border-box; height: 100%; padding: 1.7vw 2.1vw; display: flex; flex-direction: column; gap: 1.25vw; }
.tvw-head { display: flex; align-items: center; gap: 1.25vw; }
.tvw-name { display: flex; flex-direction: column; }
.tvw-name h1 { margin: 0; font-size: 2.1vw; font-weight: 700; line-height: 1.3; }
.tvw-date { font-size: 1.15vw; color: var(--ink-soft); }
.tvw-head .badge.tvw-chip { font-size: 1.25vw; padding: 0.4vw 1vw; gap: 0.5vw; }
.tvw-chip .ico-svg { width: 1.45vw; height: 1.45vw; }
.tvw-clock { margin-inline-start: auto; font-size: 3.3vw; font-weight: 600; white-space: nowrap; line-height: 1.1; }
.tvw-clock small { font-size: 2.1vw; }
.tvw-off { font-size: 1.25vw; display: flex; align-items: center; gap: 0.6vw; margin: 0; }
.tvw-body { flex: 1; min-height: 0; display: flex; gap: 1.25vw; }
.tvw-cams { flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 1vw; }
.tvw-cam { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.tvw-cam[hidden] { display: none; }
.tvw-pic { position: relative; aspect-ratio: 16 / 9; background: var(--pic-bg); }
.tvw-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.tvw-pic .pic-mark { font-size: 1vw; }
.tvw-nopic { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6vw;
  background: var(--nopic-bg); color: var(--nopic-ink); font-size: 1.45vw; }
.tvw-nopic[hidden] { display: none; }
.tvw-nopic .ico-svg { width: 2.5vw; height: 2.5vw; color: var(--nopic-soft); }
.tvw-nums { position: absolute; inset: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1vw 3vw;
  background: var(--surface-low); text-align: center; }
.tvw-nums div { display: flex; flex-direction: column; }
.tvw-nums b { font-size: 6vw; font-weight: 700; line-height: 1.1; }
.tvw-nums span { font-size: 1.45vw; color: var(--ink-soft); }
.tvw-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4vw 1vw; padding: 0.75vw 1vw; font-size: 1.25vw; color: var(--ink-soft); }
.tvw-foot .tvw-cam-name { font-size: 1.45vw; font-weight: 600; color: var(--ink); }
.tvw-foot .badge { font-size: 1.1vw; }
.tvw-none { grid-column: 1 / -1; font-size: 1.45vw; color: var(--ink-soft); }
.tvw-next { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.6vw; margin: 0; font-size: 1.05vw; color: var(--ink-soft); }
.tvw-next[hidden] { display: none; }
.tvw-dots { display: flex; gap: 0.3vw; }
.tvw-dots span { width: 1.9vw; height: 0.3vw; border-radius: 999px; background: var(--n500); }
.tvw-dots span.on { background: var(--charcoal); }
.tvw-side { flex: 0 0 27vw; display: flex; flex-direction: column; gap: 1vw; }
.tvw-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25vw; display: flex; flex-direction: column; gap: 0.75vw; }
.tvw-card h2 { margin: 0; font-size: 1.45vw; font-weight: 600; }
.tvw-alert { display: flex; flex-direction: column; gap: 0.4vw; padding: 0.95vw; border-radius: var(--radius-lg); }
.tvw-alert.bad { background: var(--bad-100); color: var(--bad-800); }
.tvw-alert.warn { background: var(--warn-100); color: var(--warn-800); }
.tvw-alert.info { background: var(--info-100); color: var(--info-800); }
.tvw-level { display: inline-flex; align-items: center; gap: 0.4vw; font-size: 1.15vw; font-weight: 700; }
.tvw-level .ico-svg, .tvw-calm .ico-svg { width: 1.45vw; height: 1.45vw; }
.tvw-fact { font-size: 1.55vw; font-weight: 600; line-height: 1.35; color: var(--ink); }
.tvw-meta { font-size: 1.15vw; }
.tvw-calm { display: flex; align-items: center; gap: 0.5vw; margin: 0; font-size: 1.25vw; color: var(--ok-800); }
.tvw-more { margin: 0; font-size: 1.15vw; color: var(--ink-soft); }
/* The TV lost the server (tv.js, 30 s): every picture and number turns grey, never an old one as «now». */
.tv-lost .tvw-pic img, .tv-lost .tvw-pic .pic-mark, .tv-lost .tvw-nums { display: none; }
.tv-lost .tvw-nopic[hidden] { display: flex; }
.tvw-lost { position: fixed; inset-inline: 0; bottom: 0; margin: 0; padding: 0.6vw 2.1vw; background: var(--warn-100); color: var(--warn-800); font-size: 1.25vw; }
.tvw-lost[hidden] { display: none; }
@media (max-width: 900px) {
  body.tv-wall { height: auto; overflow: auto; }
  .tvw { padding: 16px; gap: 12px; }
  .tvw-body { flex-direction: column; }
  .tvw-cams { grid-template-columns: 1fr; }
  .tvw-side { flex: none; }
  .tvw-name h1 { font-size: 20px; } .tvw-date, .tvw-foot, .tvw-meta, .tvw-level, .tvw-more, .tvw-calm, .tvw-next, .tvw-off, .tvw-head .badge.tvw-chip { font-size: 14px; }
  .tvw-clock { font-size: 28px; } .tvw-clock small { font-size: 16px; }
  .tvw-foot .tvw-cam-name, .tvw-card h2, .tvw-fact, .tvw-nopic { font-size: 16px; }
  .tvw-nums b { font-size: 40px; } .tvw-nums span { font-size: 14px; }
  .tvw-pic .pic-mark { font-size: 12px; }
  .tvw-dots span { width: 24px; height: 4px; }
  .tvw-chip .ico-svg, .tvw-level .ico-svg, .tvw-calm .ico-svg, .tvw-nopic .ico-svg { width: 18px; height: 18px; }
  .tvw-lost { font-size: 14px; padding: 8px 16px; }
}

/* ── «Reports › Overview» (UI-22b, drawing ReportsV2, 2026-11-24) ──
   Every number links to its list, so it reads as a card; the comparison line sits under it with an
   arrow (and a word for screen readers), neutral grey: up is not always good, so no colour judges it. */
.period { display: flex; align-items: center; gap: 6px; margin: 16px 0 0; font-weight: 600; color: var(--ink-soft); }
a.stat.goal { color: inherit; text-decoration: none; }
a.stat.goal:hover { border-color: var(--ink-soft); }
.stats.fit { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat .trend .ico, .stat .trend svg { vertical-align: middle; }
.stat .k .badge { vertical-align: middle; }
.day-strip { display: grid; gap: 8px; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-top: 8px; }
.day-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: inherit; min-height: var(--target); }
.day-card:hover { border-color: var(--ink-soft); }
.day-card.on { border-color: var(--n800); border-width: 2px; }  /* the picked day: charcoal, never yellow */
@media (max-width: 900px) { .day-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* «Share a clip» on the camera page and the shared clip's own page (VID-11, 2026-11-24). */
.share-links, .share-links ul { list-style: none; margin: 0; padding: 0; }
.share-links .list-row { gap: 8px; align-items: center; }
.share-url { word-break: break-all; margin: 4px 0; }
.share-video { width: 100%; max-height: 70vh; display: block; background: var(--pic-bg); border-radius: var(--radius-lg); }
