/* RoboSentinel tab (public/js/sentinel.js). Scoped to .rs-root; follows the app theme (dark default,
   [data-theme="light"] toggle). Status colours get their own tokens so warning text stays readable on white. */
.nav-item[hidden], .nav-group[hidden] { display: none !important; }

:root {
  --rs-bg: #0F1216; --rs-card: #171B21; --rs-card-2: #1D222A; --rs-card-3: #252B34; --rs-line: #2A313B; --rs-line-2: #3A434F;
  --rs-text: #E8EBEF; --rs-text-2: #B4BCC6; --rs-text-3: #8A94A0;
  --rs-ok: #4CC27A; --rs-ok-bg: #12301F;
  --rs-warn: #F0A445; --rs-warn-bg: #3A2A12;
  --rs-bad: #F07070; --rs-bad-bg: #3A1A1C;
  --rs-info: #6EA8FF; --rs-info-bg: #16263F;
  --rs-violet: #B49BFF; --rs-violet-bg: #261C40;
  --rs-grey: #AAB2BD; --rs-grey-bg: #252A31;
  --rs-ink: #E8EBEF; --rs-on-ink: #0F1216;
  --rs-scrim: rgba(0,0,0,.6);
  --rs-shadow: 0 1px 2px rgba(0,0,0,.4);
  --rs-shadow-lg: 0 12px 40px rgba(0,0,0,.6);
  --rs-shadow-hover: 0 4px 16px rgba(0,0,0,.45);
  --rs-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}
[data-theme="light"] {
  --rs-bg: #F3F5F8; --rs-card: #FFFFFF; --rs-card-2: #F7F8FA; --rs-card-3: #EDF0F4; --rs-line: #E2E6EC; --rs-line-2: #C9D0D9;
  --rs-text: #16191D; --rs-text-2: #4B5563; --rs-text-3: #6B7280;
  --rs-ok: #1B7F3B; --rs-ok-bg: #E7F5EC;
  --rs-warn: #A35A00; --rs-warn-bg: #FFF3E0;
  --rs-bad: #C62828; --rs-bad-bg: #FDECEC;
  --rs-info: #1559B6; --rs-info-bg: #E8F0FC;
  --rs-violet: #6D28D9; --rs-violet-bg: #F1EBFD;
  --rs-grey: #4B5563; --rs-grey-bg: #EEF0F3;
  --rs-ink: #1F2937; --rs-on-ink: #FFFFFF;
  --rs-scrim: rgba(16,24,40,.45);
  --rs-shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --rs-shadow-hover: 0 4px 14px rgba(16,24,40,.10);
  --rs-shadow-lg: 0 12px 40px rgba(16,24,40,.18);
}
/* The shell design system (public/css/theme.css, both themes) is the base: RoboSentinel follows its surfaces, text and
   status colours, so these pages match the rest of the dashboard. The values above stay as the fallback. */
:root, :root[data-theme] {
  --rs-bg: var(--surface-0, #F3F5F8); --rs-card: var(--surface-3, #FFFFFF); --rs-card-2: var(--surface-4, #F7F8FA); --rs-line: var(--surface-5, #E2E6EC);
  --rs-text: var(--text-primary, #16191D); --rs-text-2: var(--text-secondary, #4B5563); --rs-text-3: var(--text-muted, #6B7280);
  --rs-ok: var(--status-success); --rs-ok-bg: var(--status-success-bg); --rs-warn: var(--status-warning); --rs-warn-bg: var(--status-warning-bg);
  --rs-bad: var(--status-danger); --rs-bad-bg: var(--status-danger-bg); --rs-info: var(--status-info); --rs-info-bg: var(--status-info-bg);
}
.rs-root { font-family: var(--font-sans, inherit); }
/* One look (redesign section 06, approved 19 Oct): five type sizes plus body, and four radii by job: a mark (bars,
   ticks, swatches), a control (buttons, inputs, thumbnails), a card (every panel), a pill. Use these, never a raw px. */
:root, :root[data-theme] {
  --rs-fs-xs: 12px; --rs-fs-sm: 13.5px; --rs-fs-body: 14px; --rs-fs-md: 15px; --rs-fs-lg: 22px; --rs-fs-xl: 28px;
  --rs-r-mark: 4px; --rs-r-ctl: 8px; --rs-r-card: 14px; --rs-r-pill: 999px;
}
.main-content:has(> .rs-root) { background: var(--rs-bg); }
.rs-root { color: var(--rs-text); font-size: var(--rs-fs-body); line-height: 1.5; max-width: 1480px; margin: 0 auto; }

.rs-root button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; text-align: inherit; }
.rs-root :focus-visible { outline: 2px solid var(--rs-info); outline-offset: 2px; border-radius: var(--rs-r-ctl); }
.rs-num { font-variant-numeric: tabular-nums; }
.rs-mono { font-family: var(--rs-mono); font-size: var(--rs-fs-xs); }
.rs-muted { color: var(--rs-text-3); font-size: var(--rs-fs-sm); }
.rs-small { font-size: var(--rs-fs-sm); }
.rs-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* sub navigation */
.rs-tabs { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--rs-line); margin-bottom: 20px; flex-wrap: wrap; position: sticky; top: 0; z-index: 30; background: var(--rs-bg); padding-top: 4px; }
.rs-tabs .rs-tab { padding: 10px 14px; font-weight: 600; font-size: var(--rs-fs-body); color: var(--rs-text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 6px; align-items: center; }
.rs-tabs .rs-tab:hover { color: var(--rs-text); }
.rs-tabs .rs-tab.on { color: var(--rs-text); border-bottom-color: var(--rs-bad); }
.rs-tabs .rs-health { margin-left: auto; display: flex; gap: 8px; align-items: center; padding: 6px 0; }
.rs-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--rs-r-pill); background: var(--rs-bad); color: var(--rs-on-ink); font-size: var(--rs-fs-xs); font-weight: 700; display: inline-grid; place-items: center; }

/* layout */
.rs-grid { display: grid; gap: 16px; }
.rs-g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rs-g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rs-main-side { display: grid; grid-template-columns: minmax(0, 1fr) clamp(300px, 30%, 380px); gap: 16px; align-items: start; }
.rs-card { background: var(--rs-card); border: 1px solid var(--rs-line); border-radius: var(--rs-r-card); min-width: 0; box-shadow: var(--rs-shadow); }
.rs-card-h { padding: 14px 16px; border-bottom: 1px solid var(--rs-line); display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.rs-card-h h3 { font-size: var(--rs-fs-md); margin: 0; }
.rs-card-b { padding: 16px; }
.rs-card-b + .rs-card-b { border-top: 1px solid var(--rs-line); }
.rs-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.rs-head h2 { font-size: var(--rs-fs-lg); margin: 0; text-wrap: balance; letter-spacing: -.01em; font-weight: 700; }
.rs-crumbs { font-size: var(--rs-fs-sm); color: var(--rs-text-3); margin-bottom: 6px; }
.rs-crumbs button { color: var(--rs-info); }
.rs-scroll { overflow-x: auto; }

/* atoms */
.rs-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--rs-r-pill); font-size: var(--rs-fs-xs); font-weight: 600; white-space: nowrap; line-height: 1.6; }
.rs-pill.ok { background: var(--rs-ok-bg); color: var(--rs-ok); } .rs-pill.warn { background: var(--rs-warn-bg); color: var(--rs-warn); }
.rs-pill.bad { background: var(--rs-bad-bg); color: var(--rs-bad); } .rs-pill.info { background: var(--rs-info-bg); color: var(--rs-info); }
.rs-pill.violet { background: var(--rs-violet-bg); color: var(--rs-violet); } .rs-pill.grey { background: var(--rs-grey-bg); color: var(--rs-grey); }
.rs-pill.outline { box-shadow: inset 0 0 0 1px var(--rs-line); color: var(--rs-text-3); }
.rs-pill.ink { background: var(--rs-ink); color: var(--rs-on-ink); letter-spacing: .05em; font-size: var(--rs-fs-xs); }
.rs-pill.plan { box-shadow: inset 0 0 0 1px var(--rs-violet); color: var(--rs-violet); font-size: var(--rs-fs-xs); letter-spacing: .05em; text-transform: uppercase; }
.rs-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.rs-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--rs-r-ctl); border: 1px solid var(--rs-line) !important; background: var(--rs-card) !important; font-weight: 600; white-space: nowrap; }
.rs-btn:hover { border-color: var(--rs-text-3) !important; }
.rs-btn.sm { height: 28px; padding: 0 10px; font-size: var(--rs-fs-sm); }
.rs-btn.primary { background: var(--rs-bad) !important; border-color: var(--rs-bad) !important; color: var(--rs-on-ink); }
/* Approvals (sentinel-approvals.js): the request a push opened, outlined */
.rs-card.rs-focus { outline: 2px solid var(--rs-warn, #c98a00); outline-offset: 2px; }
.rs-btn[disabled] { opacity: .5; cursor: not-allowed; }
.rs-btn.g-real { background: var(--rs-ok-bg) !important; color: var(--rs-ok); border-color: var(--rs-ok) !important; }
.rs-btn.g-noise { background: var(--rs-grey-bg) !important; color: var(--rs-grey); border-color: var(--rs-grey) !important; }
.rs-btn.g-unsure { background: var(--rs-warn-bg) !important; color: var(--rs-warn); border-color: var(--rs-warn) !important; }
.rs-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.rs-chip { padding: 3px 12px; border-radius: var(--rs-r-pill); border: 1px solid var(--rs-line) !important; font-size: var(--rs-fs-sm); font-weight: 600; color: var(--rs-text-2); }
.rs-chip.on { background: var(--rs-ink) !important; border-color: var(--rs-ink) !important; color: var(--rs-on-ink); }
.rs-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; row-gap: 7px; margin: 0; }
.rs-kv dt { color: var(--rs-text-2); } .rs-kv dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rs-stat { padding: 14px 16px; } .rs-stat .n { font-size: var(--rs-fs-lg); font-weight: 700; font-variant-numeric: tabular-nums; } .rs-stat .l { color: var(--rs-text-2); font-size: var(--rs-fs-sm); }
.rs-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--rs-r-card); background: var(--rs-info-bg); color: var(--rs-text); margin-bottom: 16px; }
.rs-banner.warn { background: var(--rs-warn-bg); }
.rs-banner b { color: var(--rs-text); }
.rs-oos { align-items: center; border-left: 4px solid var(--rs-bad); background: var(--rs-bad-bg); }
.rs-oos.warn { border-left-color: var(--rs-warn); background: var(--rs-warn-bg); }
.rs-oos.info { border-left-color: var(--rs-info); background: var(--rs-info-bg); }
.rs-oos > div { flex: 1; }
.rs-oos-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--rs-bad); animation: rs-pulse 1.6s infinite; }
.rs-oos.warn .rs-oos-dot { background: var(--rs-warn); } .rs-oos.info .rs-oos-dot { background: var(--rs-info); animation: none; }
@keyframes rs-pulse { 0% { box-shadow: 0 0 0 0 var(--rs-bad-bg); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .rs-oos-dot { animation: none; } }
.rs-empty { padding: 28px 20px; text-align: center; color: var(--rs-text-3); }
.rs-skel { height: 76px; border-radius: var(--rs-r-card); background: linear-gradient(90deg, var(--rs-card) 0%, var(--rs-card-2) 50%, var(--rs-card) 100%); background-size: 200% 100%; animation: rs-shimmer 1.2s infinite; }
@keyframes rs-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* tables */
.rs-table { width: 100%; border-collapse: collapse; }
.rs-table th { text-align: left; font-size: var(--rs-fs-xs); color: var(--rs-text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 9px 14px; border-bottom: 1px solid var(--rs-line); white-space: nowrap; }
.rs-table td { padding: 10px 14px; border-bottom: 1px solid var(--rs-line); vertical-align: middle; }
.rs-table tr:last-child td { border-bottom: 0; }
.rs-table tr.click { cursor: pointer; } .rs-table tr.click:hover td { background: var(--rs-card-2); }
.rs-table tr.hl td { background: var(--rs-warn-bg); }

/* incidents */
.rs-inc { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--rs-line); width: 100%; align-items: flex-start; }
.rs-inc:last-child { border-bottom: 0; }
.rs-inc:hover { background: var(--rs-card-2); }
.rs-sev { width: 4px; align-self: stretch; border-radius: var(--rs-r-mark); flex: none; }
.rs-inc-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.rs-inc .t { font-weight: 700; }
.rs-inc .since { text-align: right; flex: none; display: grid; min-width: 96px; }
.rs-why { padding: 14px 16px; border-radius: var(--rs-r-card); background: var(--rs-bad-bg); display: grid; gap: 6px; }
.rs-why.warn { background: var(--rs-warn-bg); }
.rs-why .code { font-family: var(--rs-mono); font-weight: 700; color: var(--rs-bad); }
.rs-why.warn .code { color: var(--rs-warn); }
.rs-why p { margin: 0; }
.rs-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.rs-step { padding: 4px 10px; border-radius: var(--rs-r-ctl); border: 1px solid var(--rs-line); font-size: var(--rs-fs-xs); }
.rs-step.done { background: var(--rs-ok-bg); color: var(--rs-ok); border-color: transparent; }
.rs-step.cause { background: var(--rs-bad-bg); color: var(--rs-bad); border-color: transparent; }
.rs-video { aspect-ratio: 16 / 9; max-width: 100%; border-radius: var(--rs-r-ctl); border: 1px dashed var(--rs-line); display: grid; place-items: center; text-align: center; padding: 16px; color: var(--rs-text-2); background: repeating-linear-gradient(135deg, var(--rs-card) 0 12px, var(--rs-card-2) 12px 24px); }
.rs-root textarea { width: 100%; min-height: 80px; border: 1px solid var(--rs-line); border-radius: var(--rs-r-ctl); padding: 10px; font: inherit; background: var(--rs-card-2); color: var(--rs-text); resize: vertical; box-sizing: border-box; }

/* units */
.rs-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.rs-u { padding: 12px; border-radius: var(--rs-r-card); border: 1px solid var(--rs-line) !important; display: grid; gap: 5px; align-content: start; }
.rs-u:hover { background: var(--rs-card-2) !important; }
.rs-u .id { font-weight: 700; font-variant-numeric: tabular-nums; }
.rs-u.live { box-shadow: inset 4px 0 0 var(--rs-ok); }
.rs-u.idle { border-style: dashed !important; }
.rs-u .rs-pill { white-space: normal; }

/* ribbon */
.rs-ribbon { position: relative; height: 32px; border-radius: var(--rs-r-ctl); overflow: hidden; background: var(--rs-card-2); }
.rs-seg { position: absolute; top: 0; bottom: 0; min-width: 3px; }
.rs-seg:hover { outline: 2px solid var(--rs-text); outline-offset: -2px; }
.rs-seg.ok { background: var(--rs-ok-bg); } .rs-seg.info { background: var(--rs-info); opacity: .7; } .rs-seg.violet { background: var(--rs-violet); opacity: .75; }
.rs-seg.warn { background: var(--rs-warn); opacity: .75; } .rs-seg.bad { background: var(--rs-bad); } .rs-seg.grey { background: var(--rs-grey-bg); }
.rs-ticks { position: relative; height: 18px; margin-top: 4px; }
.rs-ticks span { position: absolute; transform: translateX(-50%); font-size: var(--rs-fs-xs); color: var(--rs-text-3); white-space: nowrap; }
.rs-ticks span:first-child { transform: none; } .rs-ticks span:last-child { transform: translateX(-100%); }
.rs-legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: var(--rs-fs-xs); color: var(--rs-text-2); }
.rs-legend i { display: inline-block; width: 11px; height: 11px; border-radius: var(--rs-r-mark); vertical-align: -1px; margin-right: 4px; }

/* timeline */
.rs-day { padding: 7px 16px; background: var(--rs-card-2); border-bottom: 1px solid var(--rs-line); font-size: var(--rs-fs-xs); font-weight: 700; color: var(--rs-text-3); text-transform: uppercase; letter-spacing: .04em; }
.rs-tl { display: grid; grid-template-columns: 54px 14px minmax(0, 1fr) auto; gap: 0 10px; padding: 9px 16px; border-bottom: 1px solid var(--rs-line); width: 100%; align-items: start; }
.rs-tl:hover { background: var(--rs-card-2); }
.rs-tl .time { font-family: var(--rs-mono); font-size: var(--rs-fs-xs); color: var(--rs-text-3); padding-top: 2px; }
.rs-tl .mark { width: 11px; height: 11px; border-radius: 50%; margin-top: 5px; border: 2px solid currentColor; }
.rs-tl .what { min-width: 0; } .rs-tl .det { color: var(--rs-text-3); font-size: var(--rs-fs-sm); display: block; }
.c-ok { color: var(--rs-ok); } .c-warn { color: var(--rs-warn); } .c-bad { color: var(--rs-bad); } .c-info { color: var(--rs-info); } .c-violet { color: var(--rs-violet); } .c-grey { color: var(--rs-grey); }

/* review */
.rs-meter { height: 10px; border-radius: var(--rs-r-pill); background: var(--rs-grey-bg); position: relative; margin: 10px 0 6px; }
.rs-meter .fill { height: 100%; border-radius: var(--rs-r-pill); background: var(--rs-warn); }
.rs-meter .fill.good { background: var(--rs-ok); }
.rs-meter .target { position: absolute; top: -5px; width: 2px; height: 20px; background: var(--rs-text); }

/* details popup: centred, with a Full page link (was a right-side drawer) */
.rs-scrim { position: fixed; inset: 0; background: var(--rs-scrim); z-index: 900; }
.rs-drawer { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(680px, calc(100% - 32px)); max-height: min(85vh, 760px); background: var(--rs-card); border: 1px solid var(--rs-line); border-radius: var(--rs-r-card); z-index: 901; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.rs-drawer-h { padding: 14px 16px; border-bottom: 1px solid var(--rs-line); display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; }
.rs-drawer-h h3 { margin: 0; font-size: var(--rs-fs-md); }
.rs-drawer-b { padding: 16px; overflow-y: auto; display: grid; gap: 16px; align-content: start; }
.rs-label { font-size: var(--rs-fs-xs); font-weight: 700; color: var(--rs-text-3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }

@media (max-width: 880px) { .rs-main-side { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .rs-g2, .rs-g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-inc { flex-wrap: wrap; } .rs-inc .since { text-align: left; margin-left: 16px; }
  .rs-tl { grid-template-columns: 48px 12px minmax(0, 1fr); } .rs-tl .end { grid-column: 3; }
  /* phones: the tabs scroll sideways in one row (as in the mockup); health sits on its own line below */
  .rs-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; position: relative; }
  .rs-tabs::-webkit-scrollbar { display: none; }
  .rs-tabs .rs-tab { white-space: nowrap; flex: none; }
  .rs-tabs .rs-health { margin-left: 8px; flex: none; }
  .rs-tabs .rs-health .rs-pill:first-child { font-size: var(--rs-fs-xs); }
}
@media (prefers-reduced-motion: reduce) { .rs-skel { animation: none; } }

/* ---------- supervised unjam session (sentinel-unjam.js) ---------- */
.rs-uj { display: grid; gap: 16px; }
.rs-uj > .rs-card, .rs-uj-cols > .rs-card, .rs-uj-stats > .rs-card { padding: 14px 16px; }
.rs-uj .n.sm, .rs-uj .sm { font-size: .95rem; }
.rs-uj-banner { border-radius: var(--rs-r-card); padding: 14px 16px; display: grid; gap: 4px; border: 2px solid var(--rs-line); }
.rs-uj-banner .big { font-weight: 800; letter-spacing: .02em; font-size: 1.15rem; }
.rs-uj-banner.ask { border-color: var(--rs-warn); background: var(--rs-warn-bg); }
.rs-uj-banner.ok { border-color: var(--rs-ok); background: var(--rs-ok-bg); }
.rs-uj-banner.warn { border-color: var(--rs-warn); background: var(--rs-warn-bg); }
.rs-uj-banner.bad { border-color: var(--rs-bad); background: var(--rs-bad-bg); }
.rs-uj-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
.rs-uj-log, .rs-uj-raw { list-style: none; margin: 10px 0 0; padding: 0; max-height: 62vh; overflow-y: auto; display: grid; gap: 6px; }
.rs-uj-log li, .rs-uj-raw li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; align-items: start; }
.rs-uj-log li { padding: 8px 10px; border-radius: var(--rs-r-ctl); background: var(--rs-card-2); border-left: 3px solid var(--rs-line); }
.rs-uj-log li .time, .rs-uj-raw li .time { font-variant-numeric: tabular-nums; color: var(--text-secondary); font-size: .8rem; }
.rs-uj-log .k { display: inline-block; min-width: 64px; font-weight: 800; font-size: .72rem; letter-spacing: .04em; color: var(--text-secondary); margin-right: 6px; }
.rs-uj-log .k.plan { color: var(--rs-info); } .rs-uj-log .k.ask { color: var(--rs-warn); }
.rs-uj-log li.ask { border-left-color: var(--rs-warn); } .rs-uj-log li.yes { border-left-color: var(--rs-ok); }
.rs-uj-log li.no { border-left-color: var(--rs-bad); } .rs-uj-log li.tx { border-left-color: var(--rs-info); }
.rs-uj-log li.move { border-left-color: var(--rs-info); } .rs-uj-log li.done { border-left-color: var(--rs-ok); font-weight: 600; }
.rs-uj-raw li { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem; word-break: break-word; }
.rs-uj-raw li .pre { color: var(--rs-info); margin-right: 4px; }
.rs-uj-raw li.held { opacity: .7; } .rs-uj-raw li.released { opacity: .85; }
.rs-uj svg .thr { stroke: var(--rs-warn); stroke-dasharray: 4 3; stroke-width: 1; }
.rs-uj svg .val { fill: none; stroke: var(--rs-info); stroke-width: 1.6; }
.rs-uj svg .axis { stroke: var(--rs-line); stroke-width: 1; } .rs-uj svg .zero { stroke: var(--text-secondary); stroke-width: 1; }
.rs-uj svg .range { fill: var(--rs-info-bg); stroke: var(--rs-info); stroke-width: .6; } .rs-uj svg .est { fill: var(--rs-info); }
@media (max-width: 900px) { .rs-uj-cols { grid-template-columns: minmax(0, 1fr); } .rs-uj-log, .rs-uj-raw { max-height: 50vh; } }

/* ribbon: incident markers above, hour lines inside */
.rs-marks { position: relative; height: 24px; }
.rs-markpin { position: absolute; top: 0; transform: translateX(-50%); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: var(--rs-fs-xs); font-weight: 800; color: var(--rs-on-ink, #fff); background: var(--rs-warn); box-shadow: 0 0 0 2px var(--rs-card); z-index: 1; }
.rs-markpin.c-warn { background: var(--rs-warn); } .rs-markpin.c-bad { background: var(--rs-bad); }
.rs-markpin[class] { color: #fff; border: 0; } .rs-markpin.c-grey { background: var(--rs-grey); } .rs-markpin.c-info { background: var(--rs-info); }
.rs-markpin:hover { transform: translateX(-50%) scale(1.15); }
.rs-markpin::after { content: ''; position: absolute; left: 50%; top: 20px; width: 1px; height: 6px; background: currentColor; opacity: .5; }
.rs-ribbon { height: 40px; }
.rs-hour { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--rs-line); pointer-events: none; z-index: 1; }

/* side column: incidents with a severity edge */
.rs-sideinc { display: grid; gap: 2px; width: 100%; text-align: left; padding: 10px 14px; border-left: 3px solid var(--rs-grey); border-bottom: 1px solid var(--rs-line); }
.rs-sideinc:hover { background: var(--rs-card-2); }
.rs-sideinc b { font-size: var(--rs-fs-body); }

/* footage */
.rs-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.rs-tile { position: relative; aspect-ratio: 4 / 3; border-radius: var(--rs-r-ctl); overflow: hidden; background: #0d1117; border: 1px solid var(--rs-line) !important; padding: 0; }
/* camera frames are shown whole (contain): a 960x480 HD frame (2:1, S's cook HD) in a 352/240 box must not lose its sides */
.rs-tile img, .rs-tile video { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .2s; }
.rs-tile:hover img, .rs-tile:hover video { transform: scale(1.05); }
.rs-tile.off { opacity: .45; }
.rs-tile-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: var(--rs-fs-xs); line-height: 1.25; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.75)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-play { position: absolute; left: 50%; top: 42%; width: 30px; height: 30px; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.rs-play::after { content: ''; position: absolute; left: 12px; top: 9px; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #111; }
.rs-viewer { border-radius: var(--rs-r-card); overflow: hidden; background: #0d1117; display: grid; place-items: center; min-height: 200px; }
.rs-viewer video, .rs-viewer img { width: 100%; max-height: 70vh; object-fit: contain; display: block; }
.rs-drawer .rs-media { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
@media (prefers-reduced-motion: reduce) { .rs-tile img, .rs-tile video { transition: none; } }

/* orders as nine steps (sentinel-orders.js; design docs/design/robosentinel-orders) */
.rs-oi { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.rs-obanner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 16px; border-radius: var(--rs-r-card); border: 1px solid var(--rs-bad); background: var(--rs-bad-bg); }
.rs-obanner .rs-oi { color: var(--rs-bad); margin-top: 2px; }
.rs-obanner b { display: block; font-size: var(--rs-fs-md); } .rs-obanner span { color: var(--rs-text-2); }
.rs-ohero { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; padding: 24px; align-items: center; }
.rs-oring { position: relative; width: 260px; height: 260px; margin: 0 auto; }
.rs-oring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.rs-oseg { fill: none; stroke-width: 20; }
.rs-oseg.glow { filter: drop-shadow(0 0 6px var(--g)); }
.rs-oring .mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.rs-oring .big { font-size: 46px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.rs-oring .of { color: var(--rs-text-3); font-size: var(--rs-fs-sm); margin-top: 6px; } .rs-oring .left { font-weight: 700; margin-top: 8px; }
.rs-onow .t { display: flex; gap: 14px; align-items: center; margin-top: 6px; }
.rs-onow .badge { width: 56px; height: 56px; border-radius: var(--rs-r-card); display: grid; place-items: center; background: var(--kb); color: var(--k); flex: none; }
.rs-onow .badge .rs-oi { width: 30px; height: 30px; }
.rs-onow h3 { font-size: var(--rs-fs-lg); margin: 0; } .rs-onow p { margin: 2px 0 0; color: var(--rs-text-2); }
.rs-obar { height: 10px; border-radius: var(--rs-r-pill); background: var(--rs-card-2); overflow: hidden; margin-top: 18px; }
.rs-obar i { display: block; height: 100%; border-radius: var(--rs-r-pill); background: var(--k); }
.rs-obarl { display: flex; justify-content: space-between; color: var(--rs-text-3); font-size: var(--rs-fs-xs); margin-top: 6px; }
.rs-osteps-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 20px 2px 8px; }
.rs-osteps { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; }
.rs-ostep { position: relative; padding: 12px 8px 10px; border-radius: var(--rs-r-card); border: 1px solid var(--rs-line); background: var(--rs-card); text-align: center; }
.rs-ostep .no { position: absolute; top: 5px; left: 8px; font-size: var(--rs-fs-xs); font-weight: 700; color: var(--rs-text-3); }
.rs-ostep .ok { position: absolute; top: 4px; right: 6px; color: var(--rs-ok); } .rs-ostep .ok .rs-oi { width: 14px; height: 14px; stroke-width: 3; }
.rs-ostep .w { position: absolute; top: 4px; right: 8px; color: var(--rs-warn); font-weight: 800; font-size: var(--rs-fs-xs); }
.rs-ostep .ico { width: 38px; height: 38px; margin: 0 auto; border-radius: var(--rs-r-ctl); display: grid; place-items: center; background: var(--rs-card-2); color: var(--rs-text-3); }
.rs-ostep .nm { font-weight: 700; font-size: var(--rs-fs-xs); margin-top: 6px; line-height: 1.25; } .rs-ostep .tm { color: var(--rs-text-3); font-size: var(--rs-fs-xs); font-variant-numeric: tabular-nums; }
.rs-ostep .slow { display: inline-block; margin-top: 3px; font-size: var(--rs-fs-xs); font-weight: 700; color: var(--rs-warn); }
.rs-ostep.done .ico { background: var(--kb); color: var(--k); }
.rs-ostep.now, .rs-ostep.failed { border: 2px solid var(--k); background: var(--kb); transform: translateY(-3px); box-shadow: 0 0 0 4px color-mix(in srgb, var(--k) 18%, transparent); }
.rs-ostep.now .ico, .rs-ostep.failed .ico { background: var(--k); color: var(--rs-card); }
.rs-ostep.stopped { opacity: .45; } .rs-ostep.stopped .tm { text-decoration: line-through; }
.rs-ostep.skipped { opacity: .4; border-style: dashed; }
.rs-ocams { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.rs-ocam { border: 1px solid var(--rs-line, rgba(127,127,127,.25)); border-radius: 8px; padding: 8px; display: grid; gap: 4px; min-width: 0; }
.rs-oend { display: grid; grid-template-columns: 150px minmax(0, 1fr) 84px; gap: 12px; align-items: center; padding: 4px 0; font-size: var(--rs-fs-sm); }
.rs-oend .l { font-weight: 600; } .rs-oend .tr { height: 14px; border-radius: var(--rs-r-mark); background: var(--rs-card-2); position: relative; }
.rs-oend .tr i { position: absolute; inset: 0 auto 0 0; border-radius: var(--rs-r-mark); } .rs-oend .v { color: var(--rs-text-2); font-variant-numeric: tabular-nums; }
.rs-live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; animation: rs-blink 1.6s infinite; }
@keyframes rs-blink { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }
@media (max-width: 900px) { .rs-ohero { grid-template-columns: minmax(0, 1fr); } .rs-osteps { grid-template-columns: repeat(3, minmax(0, 1fr)); } .rs-oend { grid-template-columns: 110px minmax(0, 1fr) 70px; } }
@media (prefers-reduced-motion: reduce) { .rs-live::before { animation: none; } }

/* health procedures (sentinel-procedures.js) */
/* grouped compact rows (2026-10-19 layout pass): the groups flow in columns, each a short list; one shared "Not now" on top */
.rs-procs { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px 20px; align-items: start; }
.rs-pblock { grid-column: 1 / -1; padding: 10px 12px; border-radius: var(--rs-r-card); border-left: 4px solid var(--rs-bad); background: var(--rs-bad-bg); display: grid; gap: 2px; }
.rs-pgroup { display: grid; gap: 0; min-width: 0; } .rs-pgroup .rs-label { margin: 4px 0 4px; }
.rs-proc { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 8px 0; border-top: 1px solid var(--rs-line); }
.rs-pgroup .rs-proc:nth-child(2) { border-top: 0; }
.rs-proc > div { min-width: 0; display: grid; gap: 2px; }
.rs-proc > button { flex: none; }
.rs-pcode { font: 700 var(--rs-fs-xs)/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 3px 6px; border-radius: var(--rs-r-ctl); background: var(--rs-card-3, var(--rs-card-2)); color: var(--rs-text-2); }
.rs-pst { font-size: var(--rs-fs-xs); } .rs-pst.ok { color: var(--rs-ok); } .rs-pst.bad { color: var(--rs-bad); }
.rs-pinfo > summary, .rs-pchk > summary { cursor: pointer; font-size: var(--rs-fs-xs); color: var(--rs-text-3); list-style: none; }
.rs-pinfo > summary::-webkit-details-marker, .rs-pchk > summary::-webkit-details-marker { display: none; }
.rs-pinfo > summary::after, .rs-pchk > summary::after { content: ' \25B8'; } .rs-pinfo[open] > summary::after, .rs-pchk[open] > summary::after { content: ' \25BE'; }
.rs-pinfo[open] > div, .rs-pchk[open] > div { margin-top: 2px; }
.rs-prun { padding: 8px 0; border-top: 1px solid var(--rs-line); display: grid; gap: 2px; } .rs-prun:first-child { border-top: 0; }
.rs-prun[hidden], .rs-cev[hidden], .rs-proc[hidden] { display: none; }   /* a display rule would override the hidden attribute */
@media (max-width: 760px) { .rs-procs { grid-template-columns: minmax(0, 1fr); } }

/* sub-tabs inside a unit tab (Procedures, Video): one part at a time; the live run and who holds the unit stay on top */
.rs-subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.rs-subtabs button { padding: 5px 14px; border-radius: var(--rs-r-pill); border: 1px solid var(--rs-line) !important; font-size: var(--rs-fs-sm); font-weight: 600; color: var(--rs-text-2); background: var(--rs-card) !important; display: inline-flex; gap: 6px; align-items: center; }
.rs-subtabs button.on { background: var(--rs-ink) !important; border-color: var(--rs-ink) !important; color: var(--rs-on-ink); }
.rs-subtabs .n { font-size: var(--rs-fs-xs); font-weight: 700; padding: 0 6px; border-radius: var(--rs-r-pill); background: var(--rs-card-2); color: var(--rs-text-2); }
.rs-subtabs button.on .n { background: rgba(255,255,255,.18); color: inherit; }
/* Procedures: Run now | Automations | History */
[data-psub="run"] #rs-au-autos, [data-psub="run"] #rs-au-hist, [data-psub="run"] #rs-sessions-slot { display: none; }
[data-psub="auto"] #rs-proc-slot, [data-psub="auto"] #rs-au-hist, [data-psub="auto"] #rs-sessions-slot { display: none; }
[data-psub="hist"] #rs-proc-slot, [data-psub="hist"] #rs-au-autos { display: none; }
#rs-auto .rs-au-intro { display: none; }
/* Video: Cameras now | Camera tour | Clips | Camera check */
/* clips as moments (sentinel.js clipsCard): a row per moment, its cameras inside */
.rs-cev { border-top: 1px solid var(--rs-line); } .rs-cev:first-child { border-top: 0; }
.rs-cev > summary { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 9px 0; cursor: pointer; list-style: none; }
.rs-cev > summary::-webkit-details-marker { display: none; }
.rs-cev > summary .t { color: var(--rs-text-3); font-size: var(--rs-fs-sm); }
.rs-cev > summary b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-cev[open] > summary b { white-space: normal; }
.rs-cev > .rs-media { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); padding-bottom: 12px; }
@media (max-width: 640px) { .rs-cev > summary { grid-template-columns: minmax(0, 1fr) auto; } .rs-cev > summary .t { grid-column: 1 / -1; } }
.rs-input { height: 38px; padding: 0 10px; border-radius: var(--rs-r-ctl); border: 1px solid var(--rs-line); background: var(--rs-card); color: var(--rs-text); font: inherit; box-sizing: border-box; }

/* a full clean inside a procedure run (sentinel-procedures.js cleanView; design docs/design/robosentinel-procedures) */
.rs-clean { display: grid; gap: 6px; margin: 6px 0 4px; padding: 10px 12px; border: 1px solid var(--rs-line); border-radius: var(--rs-r-card); background: var(--rs-card-2); }
.rs-clean .rs-obar { margin-top: 2px; }
.rs-clsteps { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; }
.rs-clstep { position: relative; display: grid; gap: 2px; padding: 6px 6px 5px; border-radius: var(--rs-r-ctl); border: 1px solid var(--rs-line); background: var(--rs-card); font-size: var(--rs-fs-xs); text-align: center; }
.rs-clstep .n { font-size: var(--rs-fs-xs); color: var(--rs-text-3); } .rs-clstep .t { color: var(--rs-text-3); font-variant-numeric: tabular-nums; }
.rs-clstep.done { border-color: color-mix(in srgb, var(--k) 45%, transparent); } .rs-clstep.done b { color: var(--k); }
.rs-clstep.now { border: 2px solid var(--k); background: var(--kb); box-shadow: 0 0 0 3px color-mix(in srgb, var(--k) 18%, transparent); }
.rs-clstep.next { opacity: .6; }
@media (max-width: 900px) { .rs-clsteps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* linked evidence rows */
.rs-linkrow { align-items: center; padding: 8px 0; border-bottom: 0; }
.rs-linkrow + .rs-linkrow { border-top: 1px solid var(--rs-line); }
.rs-link { background: none; border: 0; padding: 0 2px; color: var(--rs-info); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
button.rs-linkrow:hover { background: none; } button.rs-linkrow:hover b { color: var(--rs-info); }
/* procedures in a side column (incident page): one card per row, the button never covers the title */
.rs-side-proc .rs-procs { grid-template-columns: minmax(0, 1fr); }
.rs-side-proc .rs-proc > button { flex: none; }

/* tab bar refresh, foldable cards, next steps */
.rs-refresh { width: 34px; height: 34px; border-radius: var(--rs-r-ctl); border: 1px solid var(--rs-line) !important; background: var(--rs-card) !important; display: inline-grid; place-items: center; color: var(--rs-text-2); margin-left: 8px; font-size: var(--rs-fs-md); }
.rs-refresh:hover { color: var(--rs-text); border-color: var(--rs-line-2) !important; }
.rs-fold > .rs-card-h { cursor: pointer; user-select: none; }
.rs-fold > .rs-card-h::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--rs-text-3); border-bottom: 2px solid var(--rs-text-3); transform: rotate(45deg); margin: 0 4px 4px auto; transition: transform .15s; }
.rs-fold.open > .rs-card-h::after { transform: rotate(-135deg); margin-bottom: -2px; }
.rs-fold:not(.open) > :not(.rs-card-h) { display: none; }
.rs-fold:not(.open) > .rs-card-h { border-bottom: 0; }
.rs-next { margin: 0; padding: 0; list-style: none; counter-reset: n; display: grid; gap: 12px; }
.rs-next li { counter-increment: n; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; }
.rs-next li::before { content: counter(n); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: var(--rs-fs-xs); font-weight: 700; background: var(--rs-card-3); color: var(--rs-text-2); }
.rs-next b { display: block; }
@media (max-width: 760px) { .rs-root { font-size: var(--rs-fs-body); } .rs-card-h, .rs-card-b { padding-left: 14px; padding-right: 14px; } }

.rs-linkrow { flex-wrap: wrap; }
.rs-linktitle { font-weight: 700; font-size: var(--rs-fs-sm); text-align: left; color: var(--rs-text); }
.rs-linktitle:hover { color: var(--rs-info); }
.rs-linkacts { margin-left: auto; gap: 6px; }
.rs-audopt { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--rs-line); border-radius: var(--rs-r-card); cursor: pointer; }
.rs-audopt:has(input:checked) { border-color: var(--rs-info); background: var(--rs-info-bg); }
.rs-audopt b { display: block; }

/* Video tab: the six-step pipeline */
.rs-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rs-steps6 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.rs-step6 { padding: 14px; }
.rs-stepn { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: var(--rs-fs-xs); font-weight: 700; background: var(--rs-ink); color: var(--rs-on-ink); }
@media (max-width: 1100px) { .rs-steps6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .rs-steps6, .rs-g3 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- look-and-feel pass 2026-10-15: tiles, filters, charts, More menu, stacked tables ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rs-nowrap { white-space: nowrap; }
.rs-more { position: relative; }
.rs-more > summary { list-style: none; cursor: pointer; }
.rs-more > summary::-webkit-details-marker { display: none; }
.rs-caret { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -3px 0 0 2px; }
.rs-menu { position: absolute; top: calc(100% + 4px); left: 0; min-width: 190px; background: var(--rs-card); border: 1px solid var(--rs-line); border-radius: var(--rs-r-card); box-shadow: var(--rs-shadow-lg); padding: 6px; z-index: 40; display: grid; }
.rs-menu .rs-tab { border: 0 !important; margin: 0; border-radius: var(--rs-r-ctl); padding: 9px 12px; width: 100%; }
.rs-menu .rs-tab:hover, .rs-menu .rs-tab.on { background: var(--rs-card-2); }

/* number tiles: each opens the list behind it */
.rs-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.rs-kpi { position: relative; display: grid; gap: 2px; align-content: start; text-align: left; padding: 14px 28px 14px 18px !important; border-radius: var(--rs-r-card); background: var(--rs-card) !important; border: 1px solid var(--rs-line) !important; box-shadow: var(--rs-shadow); transition: box-shadow .15s, transform .15s, border-color .15s; overflow: hidden; }
.rs-kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--rs-line-2); }
.rs-kpi.ok::before { background: var(--rs-ok); } .rs-kpi.warn::before { background: var(--rs-warn); } .rs-kpi.bad::before { background: var(--rs-bad); } .rs-kpi.info::before { background: var(--rs-info); }
.rs-kpi .l { font-size: var(--rs-fs-xs); font-weight: 600; color: var(--rs-text-2); }
.rs-kpi .n { font-size: var(--rs-fs-xl); font-weight: 750; line-height: 1.15; letter-spacing: -.01em; }
.rs-kpi .n small { font-size: var(--rs-fs-md); color: var(--rs-text-3); font-weight: 600; }
.rs-kpi.bad .n { color: var(--rs-bad); }
.rs-kpi .s { font-size: var(--rs-fs-xs); color: var(--rs-text-3); }
.rs-kpi:not([disabled]):hover { box-shadow: var(--rs-shadow-hover); transform: translateY(-1px); border-color: var(--rs-line-2) !important; }
.rs-kpi:not([disabled])::after { content: ''; position: absolute; right: 14px; top: 17px; width: 7px; height: 7px; border-right: 2px solid var(--rs-text-3); border-top: 2px solid var(--rs-text-3); transform: rotate(45deg); opacity: .55; }
.rs-kpi[disabled] { cursor: default; opacity: 1; }
.rs-kpi.on { border-color: var(--rs-info) !important; box-shadow: 0 0 0 3px var(--rs-info-bg); }

/* the filter bar */
.rs-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 12px; margin-bottom: 16px; background: var(--rs-card); border: 1px solid var(--rs-line); border-radius: var(--rs-r-card); box-shadow: var(--rs-shadow); }
.rs-segc { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--rs-r-ctl); background: var(--rs-card-2); border: 1px solid var(--rs-line); }
.rs-segc .rs-chip { border: 0 !important; border-radius: var(--rs-r-ctl); padding: 5px 11px; white-space: nowrap; }
.rs-segc .rs-chip.on { background: var(--rs-card) !important; color: var(--rs-text); box-shadow: var(--rs-shadow); }
.rs-chip .n { font-weight: 600; color: var(--rs-text-3); margin-left: 2px; font-variant-numeric: tabular-nums; }
.rs-chip.on .n { color: inherit; opacity: .75; }
.rs-fsel { display: inline-flex; align-items: center; height: 36px; border: 1px solid var(--rs-line); border-radius: var(--rs-r-ctl); background: var(--rs-card); overflow: hidden; }
.rs-fsel > span { padding: 0 4px 0 10px; font-size: var(--rs-fs-xs); font-weight: 600; color: var(--rs-text-3); white-space: nowrap; }
.rs-fsel select { height: 100%; border: 0; background: transparent; color: var(--rs-text); font: inherit; font-size: var(--rs-fs-sm); font-weight: 600; padding: 0 8px 0 2px; max-width: 220px; cursor: pointer; }
.rs-fsel select option { background: var(--rs-card); color: var(--rs-text); }
.rs-fsel.on { border-color: var(--rs-info); background: var(--rs-info-bg); }
.rs-fsel select:focus-visible { outline: none; } .rs-fsel:focus-within { box-shadow: 0 0 0 3px var(--rs-info-bg); border-color: var(--rs-info); }
.rs-fsearch { flex: 1 1 200px; min-width: 160px; }
.rs-fsearch input { width: 100%; height: 36px; border-radius: var(--rs-r-ctl); padding-left: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238A94A0' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 10px 50%; }
.rs-fsearch input:focus { outline: none; border-color: var(--rs-info); box-shadow: 0 0 0 3px var(--rs-info-bg); }
.rs-fmeta { display: inline-flex; gap: 8px; align-items: center; margin-left: auto; }

/* small links and chips inside rows */
.rs-unitchip { display: inline-flex; gap: 6px; align-items: baseline; padding: 2px 9px !important; border-radius: var(--rs-r-pill); background: var(--rs-info-bg) !important; color: var(--rs-info) !important; font-weight: 700; font-size: var(--rs-fs-xs); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rs-unitchip span { font-weight: 500; color: var(--rs-text-2); }
.rs-unitchip:hover { box-shadow: inset 0 0 0 1px var(--rs-info); }
.rs-pillbtn { padding: 0; border-radius: var(--rs-r-pill); } .rs-pillbtn:hover .rs-pill { box-shadow: inset 0 0 0 1px currentColor; }
.rs-link { font-weight: 700; color: var(--rs-info) !important; } .rs-link.bad { color: var(--rs-bad) !important; } .rs-link:hover { text-decoration: underline; }
.rs-sevtxt { display: grid; gap: 2px; padding-left: 10px; border-left: 3px solid var(--rs-line); }
.rs-quick { gap: 6px; }

/* bar charts: orders per day, delivered under failed */
.rs-bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; height: 132px; align-items: end; }
.rs-bars.wide { height: 180px; } .rs-bars.dense { gap: 2px; }
.rs-bar { display: grid; grid-template-rows: 16px minmax(0, 1fr) 16px; height: 100%; padding: 0 !important; border-radius: var(--rs-r-ctl); }
.rs-bar .v { font-size: var(--rs-fs-xs); color: var(--rs-text-2); text-align: center; font-weight: 600; }
.rs-bar .col { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-height: 0; background: linear-gradient(var(--rs-line), var(--rs-line)) bottom / 100% 1px no-repeat; }
.rs-bar .col i { display: block; width: 100%; max-width: 28px; margin: 0 auto; border-radius: 4px 4px 1px 1px; min-height: 0; }
.rs-bar .col i.d { background: var(--rs-ok); } .rs-bar .col i.f { background: var(--rs-bad); }
.rs-bar .col i.s { background: var(--rs-warn); }   /* out of stock: no burger, the unit is not broken */
.rs-bar .col i[style="height:0.0%"] { display: none; }
.rs-bar .x { font-size: var(--rs-fs-xs); color: var(--rs-text-3); text-align: center; white-space: nowrap; overflow: hidden; }
.rs-bar:hover { background: var(--rs-card-2) !important; } .rs-bar.on { background: var(--rs-info-bg) !important; }
.rs-hbar { display: grid; grid-template-columns: minmax(80px, 140px) minmax(0, 1fr) 32px; gap: 10px; align-items: center; width: 100%; padding: 6px 8px !important; border-radius: var(--rs-r-ctl); font-size: var(--rs-fs-sm); }
.rs-hbar .l { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-hbar .tr { height: 10px; border-radius: var(--rs-r-pill); background: var(--rs-card-2); overflow: hidden; } .rs-hbar .tr i { display: block; height: 100%; border-radius: var(--rs-r-pill); background: var(--rs-bad); }
.rs-hbar:hover, .rs-hbar.on { background: var(--rs-card-2) !important; } .rs-hbar.on .l { color: var(--rs-info); }

/* tech visits */
.rs-visit { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 14px; align-items: start; width: 100%; padding: 12px 16px !important; border-bottom: 1px solid var(--rs-line) !important; }
.rs-visit:last-child { border-bottom: 0 !important; } .rs-visit:hover { background: var(--rs-card-2) !important; }
.rs-visit .when { display: grid; } .rs-visit .what { display: grid; gap: 6px; min-width: 0; } .rs-visit .dur { font-weight: 700; color: var(--rs-text-2); }
.rs-bullets { margin: 0; padding-left: 18px; display: grid; gap: 6px; }

/* stock, sales and machine on the unit page */
.rs-plan { margin-bottom: 16px; }
.rs-plan-g { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rs-plan-c { padding: 16px; display: grid; gap: 6px; align-content: start; border-right: 1px solid var(--rs-line); min-width: 0; }
.rs-plan-c:last-child { border-right: 0; }
.rs-big { font-size: var(--rs-fs-lg); font-weight: 750; line-height: 1.25; } .rs-big small { font-size: var(--rs-fs-body); color: var(--rs-text-3); }
/* the next visit: plain text; urgency is the pill above it (red is for alerts, not headlines: mock audit 12) */
.rs-nvh { font-size: var(--rs-fs-md); font-weight: 650; line-height: 1.35; color: var(--rs-text); }
.rs-big.bad { color: var(--rs-bad); } .rs-big.warn { color: var(--rs-warn); }
.rs-trow { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: var(--rs-fs-sm); }

/* tables */
.rs-table thead th { background: var(--rs-card-2); }
.rs-table thead tr th:first-child { border-top-left-radius: var(--rs-r-card); } .rs-table thead tr th:last-child { border-top-right-radius: var(--rs-r-card); }
.rs-table tr.click:hover td:first-child { box-shadow: inset 3px 0 0 var(--rs-info); }

@media (max-width: 1100px) { .rs-plan-g { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rs-plan-c:nth-child(2) { border-right: 0; } .rs-plan-c:nth-child(-n+2) { border-bottom: 1px solid var(--rs-line); } }
@media (max-width: 760px) {
  .rs-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rs-kpi { padding: 12px 24px 12px 16px !important; } .rs-kpi .n { font-size: var(--rs-fs-lg); }
  .rs-filters { padding: 10px; gap: 8px; }
  .rs-fsel { flex: 1 1 140px; } .rs-fsel select { max-width: none; width: 100%; }
  .rs-fmeta { margin-left: 0; width: 100%; justify-content: space-between; }
  .rs-segc { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .rs-plan-g { grid-template-columns: minmax(0, 1fr); } .rs-plan-c { border-right: 0 !important; border-bottom: 1px solid var(--rs-line); } .rs-plan-c:last-child { border-bottom: 0; }
  .rs-visit { grid-template-columns: minmax(0, 1fr) auto; } .rs-visit .what { grid-column: 1 / -1; grid-row: 2; }
  .rs-quick { width: 100%; } .rs-quick .rs-btn { flex: 1 1 auto; justify-content: center; }
  .rs-table.rs-stack thead { display: none; }
  .rs-table.rs-stack, .rs-table.rs-stack tbody, .rs-table.rs-stack tr, .rs-table.rs-stack td { display: block; width: 100%; box-sizing: border-box; }
  .rs-table.rs-stack tr { padding: 10px 14px; border-bottom: 1px solid var(--rs-line); }
  .rs-table.rs-stack tr:last-child { border-bottom: 0; }
  .rs-table.rs-stack td { border: 0; padding: 3px 0; display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 8px; align-items: baseline; }
  .rs-table.rs-stack td::before { content: attr(data-label); font-size: var(--rs-fs-xs); font-weight: 600; color: var(--rs-text-3); }
  .rs-table.rs-stack td:first-child { grid-template-columns: minmax(0, 1fr); padding-bottom: 6px; } .rs-table.rs-stack td:first-child::before { display: none; }
  .rs-table tr.click:hover td:first-child { box-shadow: none; }
  .rs-menu { position: fixed; top: auto; left: 12px; right: 12px; }
}
@media (pointer: coarse) { .rs-btn, .rs-chip, .rs-fsel { min-height: 40px; } .rs-btn.sm { min-height: 34px; } }
@media (prefers-reduced-motion: reduce) { .rs-kpi { transition: none; } .rs-kpi:hover { transform: none; } }

/* ---------- Now: the Inbox (sentinel-now.js; design docs/design/robosentinel-v3, approved 2026-10-15) ---------- */
.rs-spark { display: block; width: 100%; height: 26px; margin-top: 6px; overflow: visible; }
.rs-ibx { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); background: var(--rs-card); border: 1px solid var(--rs-line); border-radius: var(--rs-r-card); box-shadow: var(--rs-shadow); overflow: hidden; min-height: 560px; }
.rs-queue { border-right: 1px solid var(--rs-line); display: flex; flex-direction: column; min-width: 0; }
.rs-qh { padding: 14px 16px 12px; border-bottom: 1px solid var(--rs-line); display: grid; gap: 10px; }
.rs-qh h3 { margin: 0; font-size: var(--rs-fs-md); }
.rs-qh .rs-segc { justify-self: start; flex-wrap: wrap; }
.rs-grp { padding: 7px 16px; font-size: var(--rs-fs-xs); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--rs-text-3); background: var(--rs-card-2); border-bottom: 1px solid var(--rs-line); }
.rs-q { display: grid; grid-template-columns: 4px minmax(0, 1fr); gap: 12px; width: 100%; padding: 11px 16px 11px 0 !important; border-bottom: 1px solid var(--rs-line) !important; text-align: left; }
.rs-q:hover { background: var(--rs-card-2) !important; } .rs-q.on { background: var(--rs-info-bg) !important; }
.rs-q .bar { border-radius: 0 3px 3px 0; background: var(--rs-line-2); }
.rs-q .bar.bad { background: var(--rs-bad); } .rs-q .bar.warn { background: var(--rs-warn); } .rs-q .bar.info { background: var(--rs-info); }
.rs-q .b { display: grid; gap: 2px; min-width: 0; } .rs-q b { font-size: var(--rs-fs-sm); }
.rs-q .top { display: flex; justify-content: space-between; gap: 8px; }
.rs-q .due { font-size: var(--rs-fs-xs); font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--rs-text-3); }
.rs-q .due.bad { color: var(--rs-bad); } .rs-q .due.warn { color: var(--rs-warn); } .rs-q .due.info { color: var(--rs-info); }
.rs-det { padding: 18px 22px 24px; min-width: 0; }
.rs-dt { font-size: var(--rs-fs-lg); margin: 2px 0 4px; letter-spacing: -.01em; text-wrap: balance; }
.rs-why2 { color: var(--rs-text-2); }
.rs-dgrid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; margin-top: 16px; }
.rs-back { display: none !important; margin-bottom: 10px; }
.rs-big2 { font-size: var(--rs-fs-xl); font-weight: 750; font-variant-numeric: tabular-nums; }
.rs-agebar { height: 10px; border-radius: var(--rs-r-pill); background: var(--rs-card-2); overflow: hidden; }
.rs-agebar i { display: block; height: 100%; border-radius: var(--rs-r-pill); background: var(--rs-ok); } .rs-agebar i.warn { background: var(--rs-warn); } .rs-agebar i.bad { background: var(--rs-bad); }
/* lanes: one row per unit across 24 h */
.rs-laneRow { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; align-items: center; padding: 9px 16px; border-top: 1px solid var(--rs-line); }
.rs-card-h + .rs-laneRow { border-top: 0; }
.rs-laneRow .rs-link { text-align: left; color: var(--rs-text) !important; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-lane { position: relative; height: 20px; border-radius: var(--rs-r-ctl); background: var(--rs-card-2); overflow: hidden; }
.rs-lane i { position: absolute; top: 0; bottom: 0; } .rs-lane i:hover { outline: 2px solid var(--rs-text); outline-offset: -2px; }
.rs-lane.empty { display: grid; place-items: center; font-size: var(--rs-fs-xs); color: var(--rs-text-3); background: repeating-linear-gradient(135deg, var(--rs-card-2) 0 8px, var(--rs-card) 8px 16px); }
.rs-ticks2 { display: flex; justify-content: space-between; font-size: var(--rs-fs-xs); color: var(--rs-text-3); }
/* the same problem over time */
.rs-recur { position: relative; height: 34px; border-bottom: 1px solid var(--rs-line); margin: 4px 6px 4px; }
.rs-recur .dot { position: absolute; bottom: 6px; width: var(--s); height: var(--s); transform: translateX(-50%); border-radius: 50%; background: var(--rs-warn); opacity: .85; padding: 0 !important; }
.rs-recur .dot.cur { background: var(--rs-card) !important; box-shadow: 0 0 0 3px var(--rs-warn); opacity: 1; }
.rs-recur .dot[data-go]:hover { opacity: 1; box-shadow: 0 0 0 2px var(--rs-text); }
/* units in the sidebar */
.nav-item.nav-unit { padding-left: 46px !important; font-size: 13px; gap: 8px; }
.rs-navdot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted, #98A2B3); flex: none; } .rs-navdot.live { background: var(--status-success, #079455); }
.rs-navid { margin-left: auto; font-size: 11.5px; color: var(--text-muted, #98A2B3); font-variant-numeric: tabular-nums; }
@media (max-width: 1180px) { .rs-dgrid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .rs-ibx { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .rs-queue { border-right: 0; }
  .rs-ibx .rs-det { display: none; padding: 14px; }
  .rs-ibx.showdet .rs-queue { display: none; } .rs-ibx.showdet .rs-det { display: block; }
  .rs-back { display: inline-flex !important; }
  .rs-laneRow { grid-template-columns: 96px minmax(0, 1fr); padding: 8px 12px; }
}

.rs-det .rs-procs { grid-template-columns: minmax(0, 1fr); } .rs-det .rs-proc > button { flex: none; }

/* ---------- v3 step 2: unit tabs, History, Settings ---------- */
.rs-utabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rs-line); margin: 4px 0 18px; overflow-x: auto; scrollbar-width: none; }
.rs-utabs::-webkit-scrollbar { display: none; }
.rs-utabs button { padding: 9px 14px; font-weight: 600; color: var(--rs-text-2); border-bottom: 2px solid transparent !important; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.rs-utabs button:hover { color: var(--rs-text); } .rs-utabs button.on { color: var(--rs-text); border-bottom-color: var(--rs-bad) !important; }
.rs-utab > .rs-card + .rs-card { margin-top: 16px; }
.rs-cal { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; }
.rs-cal > * { aspect-ratio: 1; border-radius: var(--rs-r-mark); background: var(--rs-card-2); display: block; padding: 0 !important; }
.rs-cal .v1 { background: var(--rs-violet-bg) !important; box-shadow: inset 0 0 0 1px var(--rs-violet); } .rs-cal .v2 { background: var(--rs-violet) !important; }
.rs-cal button:hover { box-shadow: 0 0 0 2px var(--rs-text); }
.rs-chain { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: var(--rs-fs-xs); }
.rs-chain span { padding: 1px 8px; border-radius: var(--rs-r-ctl); background: var(--rs-card-2); border: 1px solid var(--rs-line); font-weight: 600; }
.rs-chain b { color: var(--rs-text-3); font-weight: 400; }
.rs-hrow .end { gap: 6px; }
.rs-setgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.rs-setcard { display: grid; gap: 8px; padding: 16px !important; text-align: left; transition: box-shadow .15s, border-color .15s; }
.rs-setcard:hover { box-shadow: var(--rs-shadow-hover); border-color: var(--rs-line-2) !important; }
@media (max-width: 760px) { .rs-hrow .end { grid-column: 3; justify-self: start; margin-top: 4px; } .rs-cal { grid-template-columns: repeat(7, minmax(0, 1fr)); } }

.rs-unitchip { cursor: pointer; }

/* early warnings and RoboSentinel's own reading: purple (design docs/design/robosentinel-v3) */
.rs-q .bar.ai { background: var(--rs-violet); } .rs-q .due.ai { color: var(--rs-violet); }
.rs-aicard { border-color: color-mix(in srgb, var(--rs-violet) 35%, var(--rs-line)) !important; background: linear-gradient(180deg, var(--rs-violet-bg), var(--rs-card) 60%) !important; }
.rs-aicard > .rs-card-h h3 { color: var(--rs-violet); }
.rs-stepchart { display: block; width: 100%; height: auto; max-height: 230px; margin-bottom: 6px; }
.rs-stepchart .lbl { font: 11px var(--font-sans, Inter, sans-serif); fill: var(--rs-text-3); }

.rs-navdot.sold { background: var(--status-warning, #B54708); } .rs-navdot.out { background: var(--status-danger, #D92D20); } .rs-navdot.plan { background: var(--status-info, #1570EF); }
.rs-next li.done b { text-decoration: line-through; color: var(--rs-text-3); }

/* RoboSentinel AI reading (purple = written by RoboSentinel; a person decides) */
.rs-spark { display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -1px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.2 6.3L20.5 10.5 14.2 12.7 12 19l-2.2-6.3L3.5 10.5 9.8 8.3z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.2 6.3L20.5 10.5 14.2 12.7 12 19l-2.2-6.3L3.5 10.5 9.8 8.3z'/%3E%3C/svg%3E") center / contain no-repeat; }
.rs-conf { display: inline-flex; gap: 3px; align-items: center; } .rs-conf i { width: 14px; height: 6px; border-radius: var(--rs-r-mark); background: color-mix(in srgb, var(--rs-violet) 25%, transparent); } .rs-conf i.f { background: var(--rs-violet); } .rs-conf .rs-small { margin-left: 4px; }
.rs-ai-cause { margin: 0 0 12px; font-size: var(--rs-fs-md); line-height: 1.55; }
.rs-ai-stale { margin-bottom: 10px; padding: 8px 10px; border-radius: var(--rs-r-ctl); background: var(--rs-warn-bg); color: var(--rs-warn); font-size: var(--rs-fs-sm); font-weight: 600; }
.rs-cites { display: flex; flex-wrap: wrap; gap: 6px; }
.rs-cite { display: inline-flex; align-items: center; padding: 2px 9px !important; border-radius: var(--rs-r-ctl); border: 1px solid color-mix(in srgb, var(--rs-violet) 35%, var(--rs-line)) !important; background: var(--rs-card) !important; color: var(--rs-violet) !important; font-size: var(--rs-fs-xs); font-weight: 600; }
button.rs-cite:hover { border-color: var(--rs-violet) !important; }
.rs-draft { white-space: pre-line; padding: 12px; border-radius: var(--rs-r-card); border: 1px solid var(--rs-line); background: var(--rs-card-2); font-size: var(--rs-fs-sm); }
.rs-aifb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rs-line); }
.rs-aifb-why { display: inline-flex; gap: 6px; flex: 1 1 240px; } .rs-aifb-why .rs-input { flex: 1; height: 30px; }
.rs-aitag { color: var(--rs-violet); font-weight: 600; }
.rs-blist { margin: 0; padding-left: 18px; display: grid; gap: 10px; } .rs-blist li > span:first-child { display: block; margin-bottom: 4px; }

/* RoboSentinel panel (sentinel-automation.js) */
.rs-au-panel { display: grid; gap: 16px; }
.rs-au { display: grid; gap: 14px; }
.rs-au-auto { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--rs-line); border-radius: var(--rs-r-card); }
.rs-au-auto.dirty { border-color: var(--rs-warn); box-shadow: inset 3px 0 0 var(--rs-warn); }
.rs-au-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.rs-au-top > div:first-child { display: grid; gap: 3px; }
.rs-au-mode { display: inline-flex; border: 1px solid var(--rs-line); border-radius: var(--rs-r-pill); overflow: hidden; white-space: nowrap; }
.rs-au-seg { background: transparent; border: 0; padding: 5px 12px; font-size: var(--rs-fs-sm); font-weight: 600; color: var(--rs-text-2); cursor: pointer; }
.rs-au-seg + .rs-au-seg { border-left: 1px solid var(--rs-line); }
.rs-au-seg:disabled { color: var(--rs-text-3); cursor: not-allowed; opacity: .55; }
.rs-au-seg.on.off { background: var(--rs-grey-bg); color: var(--rs-text); } .rs-au-seg.on.ask { background: var(--rs-warn-bg); color: var(--rs-warn); }
.rs-au-seg.on.auto { background: var(--rs-ok-bg); color: var(--rs-ok); } .rs-au-seg.on:disabled { opacity: 1; cursor: default; }
.rs-au-sub { border-left: 2px solid var(--rs-line); padding-left: 14px; margin-left: 4px; display: grid; gap: 6px; }
.rs-au-times { gap: 6px; flex-wrap: wrap; align-items: center; }
.rs-au-time { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: var(--rs-r-pill); background: var(--rs-ink); color: var(--rs-on-ink); font-weight: 600; font-size: var(--rs-fs-sm); }
.rs-au-time.sug { background: transparent; color: var(--rs-text-2); border: 1px dashed var(--rs-text-3); }
.rs-au-x { background: none; border: 0; color: inherit; cursor: pointer; font-size: var(--rs-fs-body); line-height: 1; padding: 0 0 0 2px; }
.rs-au-limit { gap: 8px; flex-wrap: wrap; align-items: center; }
.rs-au-chart, .rs-au-trend { width: 100%; max-width: 420px; height: auto; display: block; }
.rs-au-trend .thr { stroke: var(--rs-warn); stroke-dasharray: 4 3; stroke-width: 1; }
.rs-au-trend path { fill: none; stroke-width: 1.6; } .rs-au-trend path.inMs { stroke: var(--rs-info); } .rs-au-trend path.outMs { stroke: var(--rs-violet); }
.rs-au-trend circle.inMs { fill: var(--rs-info); } .rs-au-trend circle.outMs { fill: var(--rs-violet); }
.rs-au-save { display: grid; gap: 6px; padding-top: 4px; }
.rs-au-run { padding: 8px 0; border-top: 1px solid var(--rs-line); display: grid; gap: 4px; }
.rs-au-run:first-child { border-top: 0; }
.rs-au-steps { display: flex; flex-wrap: wrap; gap: 4px; }
.rs-au-step { font-size: var(--rs-fs-xs); padding: 1px 8px; border-radius: var(--rs-r-ctl); background: var(--rs-grey-bg); color: var(--rs-grey); }
.rs-au-step.ok { background: var(--rs-ok-bg); color: var(--rs-ok); } .rs-au-step.bad { background: var(--rs-bad-bg); color: var(--rs-bad); }
.rs-au-step.warn { background: var(--rs-warn-bg); color: var(--rs-warn); } .rs-au-step.info { background: var(--rs-info-bg); color: var(--rs-info); }
.rs-au-live .rs-uj-log { max-height: none; }
@media (max-width: 700px) { .rs-au-top { grid-template-columns: minmax(0, 1fr); } }
.rs-au-trip { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 12px; border-radius: var(--rs-r-ctl); background: var(--rs-bad-bg); color: var(--rs-bad); font-size: var(--rs-fs-sm); }
.rs-au-trip span { color: var(--rs-text-2); }
.rs-au-lease .rs-card-b { display: grid; gap: 6px; }

/* the unit's Video tab, by function: cameras now, clips and footage, camera check (docs/unit-health/CAMERA_CHECK.md) */
.rs-vtab { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }   /* columns may shrink: a wide child scrolls inside, never widens the tab */
.rs-vgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .rs-vgrid { grid-template-columns: minmax(0, 1fr); } }
.rs-cc-look { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rs-cc-look select { max-width: 100%; }
.rs-cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
@media (max-width: 420px) { .rs-cc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rs-cc-item { border: 1px solid var(--rs-line); border-radius: var(--rs-r-ctl); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.rs-cc-item img { width: 100%; aspect-ratio: 352 / 240; object-fit: contain; background: #0d1117; display: block; }
.rs-cc-item.off img { opacity: .3; }
.rs-cc-b { padding: 6px 8px; display: flex; flex-direction: column; gap: 4px; font-size: var(--rs-fs-xs); min-width: 0; overflow-wrap: anywhere; }
.rs-cc-acts { display: flex; gap: 4px; flex-wrap: wrap; }
.rs-cc-video { display: block; width: 100%; max-width: 720px; border-radius: var(--rs-r-ctl); background: #0d1117; }

/* kiosk funnel (plan card) */
.rs-fstep { position: relative; display: flex; gap: 6px; align-items: baseline; padding: 2px 0 4px; }
.rs-fstep i { position: absolute; left: 0; bottom: 0; height: 3px; border-radius: var(--rs-r-mark); }
.rs-fstep i.g { background: var(--rs-text-2); } .rs-fstep i.b { background: var(--rs-info, #2b5c8a); } .rs-fstep i.w { background: var(--rs-warn); } .rs-fstep i.o { background: var(--rs-ok); }
/* every action on camera: a row per order or command, its moments by camera (scrolls inside the card on a phone) */
.rs-act { border-top: 1px solid var(--rs-line); padding: 8px 0; }
.rs-act summary { cursor: pointer; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rs-act-scroll { overflow-x: auto; margin-top: 8px; }
.rs-act-grid { display: grid; gap: 6px; align-items: center; min-width: max-content; }
.rs-act-h { font-size: var(--rs-fs-xs); color: var(--rs-muted, #667085); }
.rs-act-cell { display: flex; flex-direction: column; gap: 3px; }
.rs-act-cell img { width: 100%; max-width: 176px; aspect-ratio: 352 / 240; object-fit: contain; border-radius: var(--rs-r-ctl); background: #0d1117; }

/* to do on the cameras: one row per open item (each clears by itself) */
.rs-todo { border-top: 1px solid var(--rs-line); padding: 8px 0; display: flex; flex-direction: column; gap: 3px; }
.rs-todo:first-child { border-top: 0; padding-top: 0; }

/* the camera tour: state, report, summary video, and every stop's stills with the component outlines */
.rs-tour-err { color: #B42318; font-size: var(--rs-fs-sm); margin-bottom: 6px; }
.rs-tour-logs { margin: 6px 0; font: 12px/1.45 ui-monospace, Consolas, monospace; color: var(--rs-muted, #667085); }
.rs-tour-log { white-space: pre-wrap; overflow-wrap: anywhere; }
.rs-tour-report { white-space: pre-wrap; overflow-wrap: anywhere; font: 12.5px/1.5 ui-monospace, Consolas, monospace; background: var(--rs-bg2, #f6f7f9); border-radius: var(--rs-r-ctl); padding: 10px; margin: 8px 0; max-width: 100%; overflow-x: auto; }
.rs-tour-video { width: 100%; max-width: 760px; border-radius: var(--rs-r-ctl); background: #0d1117; margin: 6px 0; display: block; }
.rs-tour-stop { border-top: 1px solid var(--rs-line); padding: 6px 0; }
.rs-tour-stop summary { cursor: pointer; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rs-tour-shots { margin-top: 6px; }
.rs-ovl-wrap { position: relative; }
.rs-ovl { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rs-ovl-p { fill: rgba(64, 196, 255, .14); stroke: #40C4FF; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.rs-ovl-p.k-moving { fill: rgba(255, 179, 0, .16); stroke: #FFB300; }
.rs-ovl-p.k-food { fill: rgba(105, 240, 174, .14); stroke: #69F0AE; }
.rs-ovl-p.k-unknown { fill: none; stroke: rgba(255, 255, 255, .45); stroke-dasharray: 3 3; }

/* Firmware and settings (sentinel.js configCard): a board's settings fold into one line; a change reads as one clamped line */
.rs-cfg { border-top: 1px solid var(--rs-line); } .rs-cfg:first-of-type { border-top: 0; }
.rs-cfg > summary { cursor: pointer; padding: 8px 0; list-style: none; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.rs-cfg > summary::-webkit-details-marker { display: none; }
.rs-cfg > summary::before { content: '\25B8'; color: var(--rs-text-3); } .rs-cfg[open] > summary::before { content: '\25BE'; }
.rs-cfg-ch { margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rs-cfg-ch:hover { -webkit-line-clamp: unset; }

/* the camera world map (sentinel-worldmap.js; design docs/unit-health/world-map-mockup): a dark stage in both themes */
.wm { display: grid; gap: 16px; }
.wm-top { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.wm-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.wm-chip { padding: 4px 10px; border-radius: var(--rs-r-pill); font-size: var(--rs-fs-xs); font-weight: 600; background: var(--rs-card-2); color: var(--rs-text-2); display: inline-flex; gap: 6px; align-items: center; }
.wm-chip.ok { background: var(--rs-ok-bg); color: var(--rs-ok); } .wm-chip.warn { background: var(--rs-warn-bg); color: var(--rs-warn); } .wm-chip.info { background: var(--rs-info-bg); color: var(--rs-info); }
.wm-live { width: 8px; height: 8px; border-radius: 50%; background: var(--rs-bad); animation: rs-blink 1.2s infinite; }
.wm-seg { display: inline-flex; border: 1px solid var(--rs-line); border-radius: var(--rs-r-ctl); overflow: hidden; background: var(--rs-card); }
.wm-seg button { padding: 6px 14px; font-weight: 600; font-size: var(--rs-fs-sm); color: var(--rs-text-2); border-right: 1px solid var(--rs-line) !important; }
.wm-seg button:last-child { border-right: 0 !important; } .wm-seg button.on { background: var(--rs-ink) !important; color: var(--rs-on-ink); } .wm-seg button:disabled { opacity: .45; cursor: not-allowed; }
.wm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .wm-grid { grid-template-columns: minmax(0, 1fr); } }
.wm-stage { position: relative; border-radius: var(--rs-r-card); overflow: hidden; background: radial-gradient(1200px 700px at 40% 40%, #14223a 0%, #0b1220 60%); box-shadow: 0 20px 50px rgba(8, 16, 32, .25); color: #cfe6ff; min-height: 300px; }
.wm-stage:fullscreen { border-radius: 0; display: grid; place-items: center; }
.wm-viewport { overflow: hidden; touch-action: pan-y; cursor: grab; padding: 122px 0 56px; }
.wm-viewport:active { cursor: grabbing; }
.wm-pan { position: relative; width: 100%; transform-origin: 0 0; transition: transform .12s ease-out; }
.wm-img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.wm-ov { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wm-schem { position: relative; display: block; }
.wm-hud { position: absolute; left: 18px; top: 14px; max-width: calc(100% - 420px); font-size: var(--rs-fs-xs); letter-spacing: .06em; text-transform: uppercase; z-index: 2; pointer-events: none; }
.wm-hud b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--rs-fs-md); line-height: 1.3; letter-spacing: 0; text-transform: none; color: #fff; margin-top: 2px; }
.wm-tools { position: absolute; right: 14px; top: 14px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; z-index: 2; max-width: 55%; }
.wm-tog { font-size: var(--rs-fs-xs); color: #dfeeff; padding: 5px 10px; border-radius: var(--rs-r-pill); border: 1px solid rgba(120, 200, 255, .35) !important; background: rgba(17, 27, 46, .7) !important; }
.wm-tog[aria-pressed="false"] { opacity: .45; text-decoration: line-through; }
.wm-legend { position: absolute; left: 14px; bottom: 12px; display: flex; gap: 12px; flex-wrap: wrap; font-size: var(--rs-fs-xs); background: rgba(11, 18, 32, .65); padding: 7px 11px; border-radius: var(--rs-r-card); backdrop-filter: blur(6px); z-index: 2; max-width: 60%; }
.wm-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.wm-legend i.ring { border: 2px solid #8fb8d8; } .wm-legend i.dash { width: 16px; height: 0; border-top: 2px dashed #cfe6ff; border-radius: 0; vertical-align: 3px; }
.wm-zoom { position: absolute; right: 14px; bottom: 12px; display: flex; gap: 4px; align-items: center; z-index: 2; }
.wm-zoom button { width: 30px; height: 30px; border-radius: var(--rs-r-ctl); color: #dfeeff; border: 1px solid rgba(120, 200, 255, .35) !important; background: rgba(17, 27, 46, .75) !important; font-size: var(--rs-fs-md); }
.wm-hint { font-size: var(--rs-fs-xs); color: #8fb8d8; margin-right: 6px; }
.wm-replay { position: absolute; left: 18px; top: 80px; display: flex; gap: 4px; align-items: center; z-index: 2; background: rgba(11, 18, 32, .7); padding: 4px 6px; border-radius: var(--rs-r-pill); backdrop-filter: blur(6px); max-width: calc(100% - 36px); overflow-x: auto; }
.wm-play { width: 30px; height: 30px; border-radius: 50%; background: #FF9A3C !important; color: #0b1220; font-size: var(--rs-fs-xs); flex: none; }
.wm-rt { font-size: var(--rs-fs-xs); color: #8fb8d8; padding: 0 6px; white-space: nowrap; }
.wm-step { font-size: var(--rs-fs-xs); color: #cfe6ff; padding: 4px 10px; border-radius: var(--rs-r-pill); white-space: nowrap; }
.wm-step.on { background: #FF9A3C !important; color: #0b1220; font-weight: 700; }
/* the overlay */
.wm-rail { stroke: #5AD1FF; stroke-width: 5; vector-effect: non-scaling-stroke; stroke-linecap: round; fill: none; filter: drop-shadow(0 0 6px #5AD1FF); }
.wm-stop { cursor: pointer; outline: none; } .wm-stop circle { fill: #0b1220; stroke: #8fb8d8; stroke-width: 2; vector-effect: non-scaling-stroke; }
.wm-stop text { fill: #9fb9d0; font: 600 calc(14px * var(--u, 1)) system-ui, sans-serif; text-anchor: middle; paint-order: stroke; stroke: #0b1220; stroke-width: 4px; }
.wm-stop.toured circle { fill: #FF9A3C; stroke: #fff; stroke-width: 2.5; filter: drop-shadow(0 0 6px #FF9A3C); } .wm-stop.toured text { fill: #ffd4ad; }
.wm-stop.sel circle { stroke: #fff; stroke-width: 4; } .wm-stop.sel text { fill: #fff; }
.wm-stop.est circle { stroke-dasharray: 3 2; }
.wm-stop:focus-visible circle, .wm-cam:focus-visible circle { stroke: #fff; stroke-width: 4; }
.wm-tick { stroke: rgba(143, 184, 216, .35); stroke-width: 1; }
.wm-axis { fill: #6f8aa5; font: 12px system-ui, sans-serif; }
.wm-cam { cursor: pointer; outline: none; transition: opacity .2s; } .wm-cam circle { fill: var(--c); stroke: #fff; stroke-width: 2; filter: drop-shadow(0 0 8px var(--c)); }
.wm-cam text { fill: var(--c); font: 700 calc(16px * var(--u, 1)) system-ui, sans-serif; paint-order: stroke; stroke: #0b1220; stroke-width: 4px; }
.wm-wedge { fill: color-mix(in srgb, var(--c) 18%, transparent); stroke: var(--c); stroke-width: 1.5; } .wm-wedge.est { stroke-dasharray: 6 4; }
.wm-wedge { cursor: pointer; transition: opacity .2s; } .wm-wedge.sel { fill: color-mix(in srgb, var(--c) 32%, transparent); stroke-width: 2.5; } .wm-wedge.dim { opacity: .2; }
.wm-cam.dim, .wm-lane.dim { opacity: .25; }
.wm-shuttle { transition: transform .9s cubic-bezier(.4, 0, .2, 1); } .wm-shuttle rect { fill: #FF9A3C; stroke: #fff; stroke-width: 2; filter: drop-shadow(0 0 10px #FF9A3C); opacity: .92; }
.wm-lane { cursor: pointer; outline: none; transition: opacity .2s; } .wm-lane-bg { fill: rgba(255, 255, 255, .03); stroke: rgba(143, 184, 216, .12); }
.wm-lane.sel .wm-lane-bg { fill: color-mix(in srgb, var(--c) 14%, transparent); stroke: var(--c); }
.wm-lane text { fill: var(--c); font: 700 14px system-ui, sans-serif; } .wm-lane-dot { fill: var(--c); } .wm-lane-line { stroke: rgba(143, 184, 216, .2); stroke-dasharray: 2 4; }
.wm-v { stroke: #0b1220; stroke-width: 2; } .wm-v.seen { fill: #22C55E; } .wm-v.edge { fill: #F59E0B; } .wm-v.out { fill: #EF4444; } .wm-v.none, .wm-v.dark { fill: #475569; } .wm-v.unknown { fill: none; stroke: #475569; stroke-dasharray: 2 2; }
.wm.off-cams .wm-l-cams, .wm.off-cams .wm-l-wedges, .wm.off-wedges .wm-wedge, .wm.off-stops .wm-l-stops, .wm.off-shuttle .wm-l-shuttle { display: none; }
/* the cards */
.wm-side { display: grid; gap: 12px; max-height: 820px; overflow: auto; padding-right: 2px; }
.wm-card { background: var(--rs-card); border: 1px solid var(--rs-line); border-left: 4px solid var(--c); border-radius: var(--rs-r-card); padding: 12px 14px; display: grid; gap: 6px; cursor: pointer; transition: opacity .2s, box-shadow .2s; }
.wm-card.sel { box-shadow: 0 0 0 2px var(--c); } .wm-card.dim { opacity: .5; }
.wm-card header { display: flex; gap: 8px; align-items: center; } .wm-card header i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.wm-card header .rs-pill { margin-left: auto; } .wm-card .osd { font-size: var(--rs-fs-xs); color: var(--rs-text-3); }
.wm-card .meta, .wm-card .foot { font-size: var(--rs-fs-xs); color: var(--rs-text-3); }
.wm-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
/* the people check (23 Oct): one still per camera, a tap each */
.rs-pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.rs-pc-tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--rs-r-ctl); background: #0d1117; display: block; }
/* the oven carriage's track and the oven tour's moves (23 Oct) */
.wm-oven { cursor: pointer; outline: none; }
.wm-oven-track { stroke: #F472B6; stroke-width: 5; vector-effect: non-scaling-stroke; stroke-linecap: round; filter: drop-shadow(0 0 6px #F472B6); }
.wm-oven-end { fill: #0b1220; stroke: #F9A8D4; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.wm-oven text { fill: #FBCFE8; font: 600 calc(14px * var(--u, 1)) system-ui, sans-serif; text-anchor: middle; paint-order: stroke; stroke: #0b1220; stroke-width: 4px; }
.wm-oven.sel .wm-oven-track, .wm-oven:focus-visible .wm-oven-track { stroke-width: 8; }
.wm-carriage { cursor: pointer; transition: transform .9s cubic-bezier(.4, 0, .2, 1); } .wm-carriage rect { fill: #F472B6; stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 10px #F472B6); }
.wm-chip-btn { border: 0; cursor: pointer; } .wm-chip-btn.on { background: #F472B6; color: #fff; }
.wm-otable td { vertical-align: top; } .wm-otable tr.sel td { background: var(--rs-info-bg); }
.wm-omove { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--rs-text); cursor: pointer; text-align: left; min-height: 32px; }
.wm-oshots { display: flex; gap: 6px; flex-wrap: wrap; }
.wm-oshot { display: grid; gap: 2px; padding: 0; border: 0; background: none; cursor: pointer; font-size: var(--rs-fs-xs); color: var(--rs-text-2); text-align: center; }
.wm-oshot img { width: 132px; aspect-ratio: 352 / 240; object-fit: contain; border-radius: var(--rs-r-ctl); background: #0d1117; }
.wm-oshot.hd img { width: 176px; aspect-ratio: 2 / 1; } .wm-oshot em { font-style: normal; } .wm-oshot.hd em { color: var(--rs-info); font-weight: 600; }
.wm-report { white-space: pre-wrap; font-size: var(--rs-fs-xs); margin: 6px 0 0; }
@media (prefers-reduced-motion: reduce) { .wm-carriage { transition: none; } }
.wm-thumb { position: relative; display: grid; gap: 2px; padding: 0; text-align: center; font-size: var(--rs-fs-xs); color: var(--rs-text-2); }
.wm-thumb img, .wm-thumb > span { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--rs-r-ctl); background: #0d1117; display: grid; place-items: center; color: #6b7280; font-size: var(--rs-fs-xs); }
.wm-thumb.sel img { outline: 3px solid #FF9A3C; outline-offset: -1px; } .wm-thumb em { font-style: normal; }
.wm-thumb .v { position: absolute; top: 5px; right: 5px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; }
.wm-thumb .v.seen { background: #22C55E; } .wm-thumb .v.edge { background: #F59E0B; } .wm-thumb .v.out { background: #EF4444; } .wm-thumb .v.none, .wm-thumb .v.dark, .wm-thumb .v.unknown { background: #64748B; }
.wm-thumb.off img, .wm-shot.off img { opacity: .3; }
/* the stop panel, the table, the gauge */
.wm-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.wm-shot { display: grid; gap: 4px; padding: 0; text-align: left; } .wm-shot img, .wm-shot .none { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--rs-r-ctl); background: #0d1117; border: 2px solid var(--c) !important; display: grid; place-items: center; color: #6b7280; }
.wm-shot .cap { display: flex; gap: 6px; align-items: center; font-size: var(--rs-fs-sm); font-weight: 600; } .wm-shot .cap i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); } .wm-shot em { font-style: normal; font-size: var(--rs-fs-xs); color: var(--rs-info); }
.wm-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; } @media (max-width: 1000px) { .wm-bottom { grid-template-columns: minmax(0, 1fr); } }
.wm-scroll { overflow-x: auto; }
.wm-mx { border-collapse: separate; border-spacing: 6px; width: 100%; } .wm-mx th { font-size: var(--rs-fs-sm); text-align: left; font-weight: 700; white-space: nowrap; cursor: pointer; }
.wm-mx thead th button { font-weight: 600; color: var(--rs-text-2); } .wm-mx th.col button { color: #C2410C; }
.wm-mx tr.dim { opacity: .4; }
.wm-cell { width: 100%; min-width: 84px; padding: 8px 6px; border-radius: var(--rs-r-ctl); font-size: var(--rs-fs-xs); font-weight: 600; text-align: center; }
.wm-cell.seen { background: var(--rs-ok-bg) !important; color: var(--rs-ok); } .wm-cell.edge { background: var(--rs-warn-bg) !important; color: var(--rs-warn); }
.wm-cell.out { background: var(--rs-bad-bg) !important; color: var(--rs-bad); } .wm-cell.none, .wm-cell.dark, .wm-cell.unknown { background: var(--rs-card-2) !important; color: var(--rs-text-3); }
.wm-mx td.col .wm-cell { box-shadow: inset 0 0 0 2px #FF9A3C; }
.wm-gauge { position: relative; height: 74px; margin: 6px 18px 8px; }
.wm-gbar { position: absolute; left: 0; right: 0; top: 18px; height: 8px; border-radius: var(--rs-r-pill); background: linear-gradient(90deg, #cdeefe, #5AD1FF); }
.wm-g { position: absolute; top: 8px; transform: translateX(-50%); display: grid; justify-items: center; gap: 4px; padding: 0; }
.wm-g i { width: 14px; height: 14px; border-radius: 50%; background: var(--rs-card); border: 2px solid #8fb8d8; margin-top: 5px; }
.wm-g.toured i { width: 22px; height: 22px; margin-top: 1px; border: 3px solid #FF9A3C; background: rgba(255, 154, 60, .15); } .wm-g.sel i { background: #FF9A3C; }
.wm-g span { font-size: var(--rs-fs-xs); color: var(--rs-text-2); white-space: nowrap; margin-top: calc(var(--row, 0) * 18px); }
.wm-gm { position: absolute; top: 12px; width: 3px; height: 20px; background: #C2410C; transform: translateX(-50%); }
.wm-truth { line-height: 1.5; }
/* the still, large */
.wm-lb { position: fixed; inset: 0; z-index: 1000; background: rgba(5, 10, 20, .82); display: grid; place-items: center; padding: 20px; }
.wm-lb-in { background: #0b1220; color: #e5eefb; border-radius: var(--rs-r-card); overflow: hidden; max-width: min(1400px, 96vw); width: 100%; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.wm-lb-in header { display: flex; gap: 8px; align-items: center; padding: 10px 14px; flex-wrap: wrap; } .wm-lb-in .sp { flex: 1; }
.wm-lb-in header button { font-size: var(--rs-fs-lg); color: #e5eefb; width: 34px; height: 34px; }
.wm-lb-in img { display: block; width: 100%; max-height: 80vh; object-fit: contain; background: #000; } .wm-lb-in .none { padding: 80px 20px; text-align: center; color: #8fb8d8; }
@media (max-width: 900px) { .wm-hud { max-width: calc(100% - 36px); } .wm-tools { top: 60px; left: 14px; right: auto; justify-content: flex-start; max-width: calc(100% - 28px); } .wm-replay { top: 98px; } .wm-viewport { padding-top: 140px; } }
@media (max-width: 640px) { .wm-hud b { font-size: var(--rs-fs-body); } .wm-tools { max-width: calc(100% - 28px); left: 14px; top: 58px; justify-content: flex-start; } .wm-replay { top: 96px; } .wm-viewport { padding: 140px 0 120px; } .wm-hint { display: none; } .wm-legend { max-width: calc(100% - 28px); bottom: 52px; } }
@media (prefers-reduced-motion: reduce) { .wm-shuttle, .wm-pan { transition: none; } .wm-live { animation: none; } }
/* the Cameras tab: World map | Pin review */
.wm-thumb > span.none { font-size: var(--rs-fs-xs); text-align: center; padding: 4px; }
/* the world map from a camera: the model through the camera's pose, its real still blended over it */
.wm-segs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wm-seg-cam .lbl { padding: 6px 10px; font-size: var(--rs-fs-xs); color: var(--rs-text-3); border-right: 1px solid var(--rs-line); }
.wm-seg-cam button { box-shadow: inset 3px 0 0 var(--c); }
.wm-real { position: absolute; inset: 0; pointer-events: none; transition: opacity .15s; }
.wm-real img { width: 100%; height: 100%; object-fit: fill; display: block; }
.wm-part { fill: rgba(64, 196, 255, .10); stroke: #40C4FF; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.wm.off-parts .wm-l-parts { display: none; }
.wm-blend { position: absolute; left: 50%; bottom: 52px; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; z-index: 2; background: rgba(11, 18, 32, .75); padding: 6px 12px; border-radius: var(--rs-r-pill); font-size: var(--rs-fs-xs); white-space: nowrap; }
.wm-blend input { width: 180px; accent-color: #FF9A3C; }
.wm-tray { fill: rgba(255, 154, 60, .22); stroke: #FF9A3C; stroke-width: 2; vector-effect: non-scaling-stroke; }
.wm-part.k-food { fill: rgba(105, 240, 174, .12); stroke: #69F0AE; } .wm-part.k-moving { fill: rgba(255, 179, 0, .12); stroke: #FFB300; }
.wm-rot { position: relative; width: 100%; height: 100%; }
.wm-rot.px { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.wm-rot.px .wm-img { width: 100%; height: 100%; }
/* the incident's moment on camera (sentinel.js momentCard) */
.rs-mo-row { border-top: 1px solid var(--rs-line); padding: 10px 0; display: grid; gap: 6px; } .rs-mo-row:first-of-type { border-top: 0; }
.rs-mo-cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rs-mo-cell { display: grid; gap: 4px; align-content: start; }
.rs-mo-cell > img, .rs-mo-crop, .rs-mo-none { width: 100%; aspect-ratio: 352 / 240; border-radius: var(--rs-r-ctl); background: #0d1117; display: block; object-fit: contain; }
.rs-mo-crop { position: relative; overflow: hidden; } .rs-mo-crop img { position: absolute; max-width: none; }
.rs-mo-none { display: grid; place-items: center; color: #6b7280; font-size: var(--rs-fs-xs); }
@media (max-width: 640px) { .rs-mo-cells { grid-template-columns: minmax(0, 1fr); } }

/* Redesign step 1 (approved 2026-10-19): one navigation, a one-line header that stays put, five tabs, a sub-nav per tab */
.rs-tabs.slim { position: static; margin-bottom: 8px; border-bottom: 0; }
.rs-uhead { position: sticky; top: 0; z-index: 30; background: var(--rs-bg); padding: 6px 0 0; margin-bottom: 12px; }
.rs-uhead-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 44px; }
.rs-uhead-row h2 { font-size: var(--rs-fs-lg); margin: 0; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.rs-uhead-row .rs-uid { font-weight: 600; }
.rs-uhead-row .rs-usince { flex: 1 1 auto; }
.rs-ugroups { margin: 6px 0 0; }
.rs-ubar { display: inline-flex; gap: 8px; align-items: center; margin-left: auto; }
.rs-actions { position: relative; }
.rs-actions > summary { list-style: none; cursor: pointer; }
.rs-actions > summary::-webkit-details-marker { display: none; }
.rs-actions-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; background: var(--rs-card); border: 1px solid var(--rs-line); border-radius: var(--rs-r-card); box-shadow: var(--rs-shadow-lg); padding: 6px; z-index: 40; display: grid; }
.rs-actions-menu button { text-align: left; padding: 10px 12px; border-radius: var(--rs-r-ctl); font-weight: 600; color: var(--rs-text); min-height: 40px; }
.rs-actions-menu button:hover { background: var(--rs-card-2); }
.rs-usub { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--rs-r-card); background: var(--rs-card-2); margin: 0 0 14px; overflow-x: auto; max-width: 100%; }
.rs-usub button { padding: 7px 14px; border-radius: var(--rs-r-ctl); font-weight: 600; font-size: var(--rs-fs-sm); color: var(--rs-text-2); white-space: nowrap; }
.rs-usub button.on { background: var(--rs-card); color: var(--rs-text); box-shadow: var(--rs-shadow); }
@media (max-width: 640px) {
  .rs-uhead-row h2 { font-size: var(--rs-fs-md); }
  .rs-uhead-row .rs-usince { display: none; }
  .rs-ugroups { overflow-x: auto; }
}
.rs-au-env { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
/* the unit header stays put: main.main-content had overflow auto (and hidden on phones) without ever scrolling (the window
   scrolls), which made it the sticky container and the header scrolled away (MOCK_AUDIT 2026-10-20: top -664 px after a
   900 px scroll). clip still cuts sideways overflow but is not a scroll container, so sticky works. Only where the header is. */
.main-content:has(.rs-uhead) { overflow-x: clip; overflow-y: visible; }

/* step 1, the rest (MOCK_AUDIT): the unit page has no RoboSentinel row (refresh moves into its header); facts as pills;
   Actions is the primary button; on a phone Actions sits at the thumb and nothing of the shell stands above the unit */
.rs-root:has(.rs-uhead) > .rs-tabs.slim { display: none; }
.rs-upills { display: inline-flex; gap: 6px; flex-wrap: wrap; cursor: pointer; }
.rs-urefresh { margin-left: 4px; }
.rs-uhead .rs-actions > summary.rs-btn.primary { background: #16191d !important; color: #fff; border-color: transparent !important; }   /* ink, not red: red is only the logo and the alert count (section 06) */
:root[data-theme="dark"] .rs-uhead .rs-actions > summary.rs-btn.primary { background: #f3f5f8 !important; color: #16191d; }
@media (max-width: 640px) {
  body:has(.rs-uhead) #breadcrumb { display: none; }
  .rs-uhead-row { gap: 6px; }
  /* section 04: Actions and Watch at the thumb, a bar across the bottom */
  .rs-ubar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; margin: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--rs-card); border-top: 1px solid var(--rs-line); box-shadow: 0 -4px 16px rgba(16,24,40,.08); }
  .rs-ubar > .rs-uwatch, .rs-actions > summary { min-height: 48px; width: 100%; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--rs-r-card); font-size: var(--rs-fs-md); }
  .rs-actions { width: 100%; }
  .rs-actions-menu { top: auto; bottom: calc(100% + 8px); right: 0; left: auto; max-width: calc(100vw - 32px); }
  .rs-root:has(.rs-uhead) { padding-bottom: 80px; }
}

/* the operator copilot's first proof (PR-1): Answer a failure / Reload in progress, staff only */
.rs-lv { border-left: 4px solid var(--rs-warn); margin-bottom: 16px; }
.rs-lv.bad { border-left-color: var(--rs-bad); } .rs-lv.ok { border-left-color: var(--rs-ok); }
.rs-lv-steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.rs-lv-steps li { display: flex; gap: 10px; align-items: flex-start; }
.rs-lv-ic { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: var(--rs-fs-xs); background: var(--rs-card-2); color: var(--rs-text-2); }
.rs-lv-ic.ok { background: var(--rs-ok-bg); color: var(--rs-ok); } .rs-lv-ic.bad { background: var(--rs-bad-bg); color: var(--rs-bad); }
.rs-lv-p { margin-top: 8px; padding: 8px 10px; border-radius: var(--rs-r-card); background: var(--rs-card-2); }
.rs-lv-p b { display: block; } .rs-lv-p span { color: var(--rs-text-2); font-size: var(--rs-fs-sm); }
.rs-lv-p.bad { background: var(--rs-bad-bg); } .rs-lv-p.warn { background: var(--rs-warn-bg, #fdf3e2); }

/* Now: one Needs you card (open problems and known issues together, known ones marked) */
.rs-needs { margin-bottom: 16px; }
.rs-needs.bad { border-left: 4px solid var(--rs-bad); }
.rs-needs-k { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--rs-line); }
.rs-needs-k:first-child { border-top: 0; }
/* Black box (RS-PR4-01, public/js/sentinel-blackbox.js): one failed order, five swimlanes, every item with its source */
.bb { display: grid; gap: 14px; min-width: 0; }
.bb-head h2 { font-size: var(--rs-fs-lg); line-height: 1.3; margin: 6px 0 8px; font-weight: 700; letter-spacing: -.01em; color: var(--rs-text); }
.bb-kicker { display: flex; gap: 8px; align-items: center; font-size: var(--rs-fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--rs-text-3); }
.bb-cause { margin: 0 0 6px; color: var(--rs-text); }
.bb-src { font-family: var(--rs-mono); font-size: var(--rs-fs-xs); color: var(--rs-text-3); background: var(--rs-card-2); border: 1px solid var(--rs-line); border-radius: var(--rs-r-ctl); padding: 0 5px; overflow-wrap: anywhere; }
.bb-find { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.bb-find li { line-height: 1.5; color: var(--rs-text); }
.bb-find li.key > span { font-weight: 600; }
.bb-find li.warn > span { color: var(--rs-warn); }
.bb-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.bb-two p { margin: 0 0 8px; line-height: 1.5; }
.bb-gaps ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; line-height: 1.45; }
.bb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.bb-chip { border: 1px solid var(--rs-line); border-radius: var(--rs-r-pill); padding: 4px 12px; font-size: var(--rs-fs-xs); font-weight: 600; color: var(--rs-text-3); background: transparent; min-height: 32px; }
.bb-chip.on { color: var(--rs-text); background: var(--rs-card-2); border-color: var(--rs-line-2); }
.bb-chip span { color: var(--rs-text-3); font-weight: 500; margin-left: 2px; }
/* the overview: the whole window, one track per lane */
.bb-ov { display: grid; gap: 3px; margin-bottom: 14px; padding: 8px 0 18px; border-bottom: 1px solid var(--rs-line); }
.bb-ovrow { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 8px; }
.bb-ovname { font-size: var(--rs-fs-xs); color: var(--rs-text-3); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-ovtrack { position: relative; height: 14px; background: var(--rs-card-2); border-radius: var(--rs-r-mark); }
.bb-axis .bb-ovtrack { background: none; height: 6px; }
.bb-tick { position: absolute; top: 2px; width: 3px; height: 10px; margin-left: -1px; border-radius: var(--rs-r-mark); padding: 0; border: 0; background: var(--rs-grey); opacity: .85; }
.bb-tick.span { opacity: .45; }
.bb-tick:hover, .bb-tick:focus-visible { opacity: 1; outline: 2px solid var(--rs-info); outline-offset: 1px; }
.bb-tick.t-bad { background: var(--rs-bad); } .bb-tick.t-warn { background: var(--rs-warn); } .bb-tick.t-ok { background: var(--rs-ok); } .bb-tick.t-info { background: var(--rs-info); }
.bb-axt { position: absolute; top: 2px; transform: translateX(-50%); font-size: var(--rs-fs-xs); color: var(--rs-text-3); white-space: nowrap; }
.bb-fail { position: absolute; top: -88px; bottom: -2px; width: 0; border-left: 2px dashed var(--rs-bad); }
/* the timeline: a row per moment, a column per lane */
.bb-tl { display: grid; gap: 0; }
.bb-row { display: grid; grid-template-columns: var(--bb-cols, 92px repeat(5, minmax(0, 1fr))); gap: 6px; padding: 6px 0; border-top: 1px solid var(--rs-line); align-items: start; }
.bb-hrow { position: sticky; top: 0; z-index: 2; background: var(--rs-card); border-top: 0; font-size: var(--rs-fs-xs); font-weight: 700; color: var(--rs-text-3); text-transform: uppercase; letter-spacing: .05em; }
.bb-time { font-size: var(--rs-fs-xs); color: var(--rs-text-2); font-variant-numeric: tabular-nums; padding-top: 6px; }
.bb-time b { display: block; color: var(--rs-text); font-size: var(--rs-fs-xs); }
.bb-cell { display: grid; gap: 4px; min-width: 0; }
.bb-it { display: block; text-align: left; padding: 4px 8px; border-radius: var(--rs-r-ctl); border: 1px solid var(--rs-line); border-left: 3px solid var(--rs-grey); background: var(--rs-card-2); color: var(--rs-text); font-size: var(--rs-fs-xs); line-height: 1.35; min-width: 0; }
.bb-it:hover { border-color: var(--rs-line-2); }
.bb-it.on { box-shadow: 0 0 0 2px var(--rs-info); }
.bb-it.ctx { opacity: .7; }
.bb-it.t-bad { border-left-color: var(--rs-bad); } .bb-it.t-warn { border-left-color: var(--rs-warn); } .bb-it.t-ok { border-left-color: var(--rs-ok); } .bb-it.t-info { border-left-color: var(--rs-info); }
.bb-itl { font-size: var(--rs-fs-xs); color: var(--rs-text-3); font-variant-numeric: tabular-nums; margin-right: 6px; }
.bb-itw { overflow-wrap: anywhere; }
.bb-tag { font-size: var(--rs-fs-xs); font-weight: 700; color: var(--rs-info); text-transform: uppercase; letter-spacing: .04em; }
.bb-tag.bad { color: var(--rs-bad); }
.bb-thumb, .bb-big { position: relative; display: block; border-radius: var(--rs-r-ctl); overflow: hidden; background: #0d1117; aspect-ratio: 4 / 3; margin-top: 4px; }
.bb-thumb img, .bb-big img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bb-dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; border: 2px solid #fff; background: #FF9A3C; box-shadow: 0 0 0 2px rgba(0,0,0,.4); }
.bb-nopic { display: grid; place-items: center; height: 100%; font-size: var(--rs-fs-xs); color: #9aa3ad; }
.bb-gap { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--rs-text-3); font-size: var(--rs-fs-xs); font-style: italic; }
.bb-gap::before, .bb-gap::after { content: ''; flex: 1; border-top: 1px dashed var(--rs-line-2); }
.bb-det { margin: 2px 0 8px 98px; padding: 12px 14px; border: 1px solid var(--rs-line-2); border-radius: var(--rs-r-card); background: var(--rs-card); display: grid; gap: 8px; }
.bb-det p { margin: 0; line-height: 1.5; color: var(--rs-text); overflow-wrap: anywhere; }
.bb-deth { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bb-detf { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.bb-lines { margin: 0; max-height: 260px; overflow: auto; font-family: var(--rs-mono); font-size: var(--rs-fs-xs); line-height: 1.45; white-space: pre-wrap; background: var(--rs-card-2); border-radius: var(--rs-r-ctl); padding: 8px 10px; color: var(--rs-text-2); }
.bb-still { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 12px; align-items: start; }
.bb-map { display: grid; gap: 8px; }
.bb-rail { position: relative; height: 34px; margin: 4px 12px 0; border-top: 3px solid var(--rs-line-2); }
.bb-stop { position: absolute; top: -8px; transform: translateX(-50%); display: grid; justify-items: center; }
.bb-stop i { width: 10px; height: 10px; border-radius: 50%; background: var(--rs-card); border: 2px solid var(--rs-line-2); }
.bb-stop em { font-style: normal; font-size: var(--rs-fs-xs); color: var(--rs-text-3); white-space: nowrap; margin-top: 2px; }
.bb-stop.on i { background: #FF9A3C; border-color: #FF9A3C; } .bb-stop.on em { color: var(--rs-text); font-weight: 700; }
@media (max-width: 900px) { .bb-two { grid-template-columns: minmax(0, 1fr); } .bb-still { grid-template-columns: minmax(0, 1fr); } }
/* phone: one column; each item says its lane; empty lanes vanish */
@media (max-width: 720px) {
  .bb-head h2 { font-size: var(--rs-fs-md); }
  .bb-ovrow { grid-template-columns: 70px minmax(0, 1fr); }
  .bb-hrow { display: none; }
  .bb-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .bb-time { padding-top: 0; }
  .bb-time b { display: inline; margin-right: 6px; }
  .bb-cell.empty { display: none; }
  .bb-it .bb-itl::before { content: attr(data-lane) " \00B7  "; font-weight: 700; color: var(--rs-text-2); }
  .bb-det { margin-left: 0; }
}

/* the forecast (PR-2), in shadow */
.rs-fc { margin-bottom: 16px; }
.rs-fc-strip { position: relative; height: 26px; border-radius: var(--rs-r-ctl); background: var(--rs-card-2); margin: 4px 0 18px; }
.rs-fc-strip .rs-fc-l, .rs-fc-strip .rs-fc-r { position: absolute; top: 28px; font-size: var(--rs-fs-xs); color: var(--rs-text-3, #8a94a3); }
.rs-fc-strip .rs-fc-l { left: 0; } .rs-fc-strip .rs-fc-r { right: 0; }
.rs-fc-mark { position: absolute; top: 4px; width: 4px; height: 18px; border-radius: var(--rs-r-mark); background: var(--rs-text-2); transform: translateX(-2px); }
.rs-fc-mark.stock { background: var(--rs-bad); } .rs-fc-mark.buns { background: var(--rs-warn); } .rs-fc-mark.clean { background: var(--rs-violet, #7c5cff); }
.rs-fc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.rs-fc-card { border: 1px solid var(--rs-line); border-radius: var(--rs-r-card); padding: 10px 12px; display: grid; gap: 4px; }
.rs-fc-card.bad { border-left: 4px solid var(--rs-bad); } .rs-fc-card.warn { border-left: 4px solid var(--rs-warn); }

/* human minutes (PR-6 baseline) */
.rs-mins { margin-bottom: 16px; }

/* proposed rescues (PR-5) */
.rs-pr-card { margin-bottom: 16px; }
.rs-pr { border-top: 1px solid var(--rs-line, rgba(127,127,127,.25)); padding: 8px 0; }
.rs-pr > summary { cursor: pointer; list-style: none; }
.rs-pr ol, .rs-pr ul { margin: 6px 0 6px 18px; }

/* utilities (were inline styles; one place to change spacing) */
.rs-mt-0 { margin-top: 0; } .rs-mt-4 { margin-top: 4px; } .rs-mt-8 { margin-top: 8px; } .rs-mt-12 { margin-top: 12px; } .rs-mt-16 { margin-top: 16px; }
.rs-mb-0 { margin-bottom: 0; } .rs-mb-4 { margin-bottom: 4px; } .rs-mb-8 { margin-bottom: 8px; } .rs-mb-12 { margin-bottom: 12px; } .rs-mb-16 { margin-bottom: 16px; }
.rs-m0 { margin: 0; } .rs-gap-4 { gap: 4px; } .rs-gap-8 { gap: 8px; } .rs-gap-12 { gap: 12px; } .rs-gap-16 { gap: 16px; }
.rs-jb { justify-content: space-between; } .rs-je { justify-content: flex-end; } .rs-jc { justify-content: center; } .rs-wrap { flex-wrap: wrap; }
.rs-min0 { min-width: 0; } .rs-w100 { width: 100%; } .rs-cur-def { cursor: default; } .rs-left { text-align: left; } .rs-fw5 { font-weight: 500; }
.rs-fs-lg { font-size: var(--rs-fs-lg); } .rs-fs-md { font-size: var(--rs-fs-md); } .rs-c-bad { color: var(--rs-bad); }
.rs-bg-bad { background: var(--rs-bad); } .rs-bg-ok { background: var(--rs-ok); } .rs-bg-warn { background: var(--rs-warn); }
.rs-h90 { height: 90px; } .rs-h120 { height: 120px; } .rs-h220 { height: 220px; } .rs-h240 { height: 240px; }

/* Cameras in four parts (redesign section 03): stacked cards in a part, and the Watch tile grid */
.rs-camstack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }   /* a wide child scrolls inside, never widens the part */
.rs-camstack > :empty { display: none; }
.rs-wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.rs-wt { position: relative; margin: 0; border-radius: var(--rs-r-card); overflow: hidden; background: #0d1117; aspect-ratio: 352 / 240; min-width: 0; }
.rs-wt img { width: 100%; height: 100%; object-fit: contain; display: block; color: transparent; }   /* no alt text over a tile while it loads */
.rs-wt.off img { opacity: .25; } .rs-wt.off::after { content: 'The picture could not load'; position: absolute; inset: 0; display: grid; place-items: center; color: #cfd6df; font-size: var(--rs-fs-xs); }
.rs-wt-none { position: absolute; inset: 0 0 36px; display: grid; place-items: center; padding: 12px; text-align: center; color: #aab2bd; font-size: var(--rs-fs-xs); }
.rs-wt-age { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: var(--rs-r-pill); background: rgba(13,17,23,.72); color: #fff; font-size: var(--rs-fs-xs); }
.rs-wt figcaption { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: rgba(13,17,23,.82); color: #fff; font-size: var(--rs-fs-sm); min-width: 0; }
.rs-wt figcaption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* Watch beside Actions (cameras and phone mocks): Watch is the ink button, Actions the plain one, where a unit has cameras */
.rs-uhead .rs-uwatch { background: #16191d !important; color: #fff; border-color: transparent !important; }
:root[data-theme="dark"] .rs-uhead .rs-uwatch { background: #f3f5f8 !important; color: #16191d; }
.rs-uhead .rs-ubar:has(.rs-uwatch) .rs-actions > summary.rs-btn.primary { background: var(--rs-card) !important; color: var(--rs-text); border: 1px solid var(--rs-line-2, var(--rs-line)) !important; }
@media (max-width: 640px) {
  .rs-wgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .rs-wt figcaption { padding: 6px 8px; gap: 4px; font-size: var(--rs-fs-xs); }
  .rs-wt-age { top: 6px; right: 6px; padding: 1px 6px; }
}
/* a proposed rescue opened: its whole flow */
.rs-pr-full ul, .rs-pr-full ol { margin: 4px 0 4px 18px; }
.rs-pr-flow > li { margin: 6px 0; padding: 6px 8px; border-radius: var(--rs-r-ctl); }
.rs-pr-flow > li.rs-pr-end.ok { background: var(--rs-ok-bg); } .rs-pr-flow > li.rs-pr-end.stop { background: var(--rs-warn-bg); }
.rs-pr-flow > li.hl { outline: 2px solid var(--rs-info); }
.rs-pr-outs { margin-top: 2px; } .rs-pr-to { color: var(--rs-info); font-weight: 600; }
