/* Watchroom site styles. One hand-written stylesheet for every page (no Tailwind, no build).
   The look is neutral (docs/design/ui-refresh.md, revision 2): Graphite and Paper surfaces, ink for actions, thin rules
   instead of boxes, square corners, Watchroom red for alarms only, status colors that mean the same everywhere;
   Barlow Semi Condensed for titles, headers and chips, Inter for the rest, JetBrains Mono for times, IDs and codes.
   Mobile first: tables stop stacking at 640px; the console's sidebar is a top menu under 768px, a 64px icon rail
   under 1100px, and 248px wide from there. */

/* ---------- Fonts (self-hosted, SIL Open Font License; each family's license is beside it: public/fonts/OFL-*.txt) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/public/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/public/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/public/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("/public/fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("/public/fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("/public/fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/public/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

/* ---------- Tokens ----------
   Colors, fonts, spacing, radius and sizes come from the Watchroom UI Kit (design/tokens.json): styles/tokens.css,
   linked before this file, is design/generated/watchroom.css, copied by scripts/build-site.py so it can't drift.
   Its themes are html[data-theme] (Paper the base, Graphite the system's dark mode; Navy, Midnight and High Contrast
   chosen), set before paint by the head script in scripts/site_chrome.py. Red (alarm) is for alarms, the brand and
   destructive actions; trim (hi-vis lime) marks "you are here" on the black chrome. No shadows anywhere.
   Only what the kit leaves to the site is here. */
:root {
  /* The type scale (2b): px values as rem, line heights alongside. */
  --t-label: .75rem;           /* 12/16 field labels, table heads */
  --t-small: .8125rem;         /* 13/18 small text */
  --t-body: .9375rem;          /* 15/24 body */
  --t-value: 1rem;             /* 16/22 field values */
  --t-section: .8125rem;       /* 13/16 section headers (Display) */
  --t-title: 1.375rem;         /* 22/28 screen and console page titles (Display) */
  --t-xs: var(--t-small);
  --t-sm: var(--t-body);
  --t-md: var(--t-value);
  --t-lg: 1.125rem;
  --t-xl: var(--t-title);
  --t-2xl: 1.75rem;
  --t-3xl: clamp(2.25rem, 5vw, 3.5rem);
  /* Gutters 16 on phones, 20 on tablets, 24 on the website. */
  --gutter: var(--s4);
  --wide: 70rem;               /* 1120: landing and sign-in content */
  --console-max: 80rem;        /* 1280: console content */
  --read: 42rem;
  /* The kit's one radius, under the names the site's rules use. */
  --r-btn: var(--radius); --r-card: var(--radius); --r-field: var(--radius); --r-chip: var(--radius); --r-sheet: var(--radius);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
@media (min-width: 600px) { :root { --gutter: var(--s5); } }
@media (min-width: 1024px) { :root { --gutter: var(--s6); } }

/* ---------- Base ---------- */
*, ::before, ::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--t-body)/1.5rem var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: 0; line-height: 1.2; text-wrap: balance; }
h1 { font-size: var(--t-3xl); line-height: 1.05; }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-lg); }
h4 { font-size: var(--t-md); }
p, ul, ol, dl, figure, blockquote, table { margin: 0; }
ul, ol { padding-left: 1.25rem; }
img { display: block; max-width: 100%; height: auto; }
svg { flex: none; }
a { color: var(--link); text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--link-hover); }
code, kbd, .mono { font-family: var(--mono); font-weight: 500; font-size: .875rem; line-height: 1.25rem; }
strong, b { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
::selection { background: var(--btn); color: var(--on-btn); }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; border-radius: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--gutter); top: -3rem; z-index: 30; background: var(--surface); color: var(--ink); padding: .5rem .75rem; border: 1px solid var(--field-edge); border-radius: var(--r-field); }
.skip:focus { top: .5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, ::before, ::after { transition: none !important; animation: none !important; }
}

/* ---------- Layout ---------- */
.wrap { max-width: calc(var(--wide) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.read { max-width: var(--read); }
.section { padding-block: 3rem; }
.section.flush { padding-top: 0; }
.section + .section { border-top: 1px solid var(--line); }
.section h2 { text-transform: uppercase; letter-spacing: .01em; }
.stack > * + * { margin-top: 1rem; }
.stack-sm > * + * { margin-top: .5rem; }
.stack-lg > * + * { margin-top: 2rem; }
.split { display: grid; gap: var(--s4) var(--s6); }
.split > h2, .split > div > h2 { max-width: 20rem; }
@media (min-width: 900px) {
  .section { padding-block: 4rem; }
  .split { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .split > :first-child { grid-column: 1 / span 4; }
  .split > :last-child { grid-column: 5 / span 8; }
}

/* ---------- Text helpers ---------- */
.lead { font-size: var(--t-lg); line-height: 1.6; color: var(--ink-2); max-width: var(--read); }
.muted { color: var(--ink-2); }
.meta { font-size: var(--t-small); line-height: 1.125rem; font-weight: 500; color: var(--ink-2); }
.empty { font-size: var(--t-body); color: var(--ink-2); }
.loading { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-small); font-weight: 500; color: var(--ink-2); }
.kicker, .label { font-size: var(--t-label); line-height: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
/* An eyebrow: the small uppercase label above a section or page title (revision 2). */
.eyebrow { margin: 0; font: 700 var(--t-label)/1rem var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.eyebrow + h1, .eyebrow + h2 { margin-top: var(--s2); }
.strong { font-weight: 600; }
.break { overflow-wrap: anywhere; }
.end { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }

/* ---------- Top bar (the site header) ---------- */
.site-header { background: var(--top); color: var(--top-ink); border-bottom: 1px solid var(--top-line); }
.site-header .bar { display: flex; align-items: center; gap: var(--s4); height: 3.5rem; }
/* Signed-in pages: the app's red and lime chevron under the top bar, as under the home page's hero. */
.site-header.app-header { border-bottom: 0; }
.site-header.app-header::after { content: ""; display: block; height: var(--chevron-height); background: var(--chevron); }
.brand { display: inline-flex; align-items: center; gap: .625rem; text-decoration: none; font: 700 1.25rem/1 var(--display); letter-spacing: .01em; color: var(--top-ink); }
.top-agency { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: var(--s4); border-left: 1px solid var(--top-line); font: 600 1.0625rem/1.2 var(--display); color: var(--top-ink); }
@media (max-width: 767px) { .top-agency { display: none; } }
.brand svg { height: 1.25rem; width: auto; }
.brand:hover { color: var(--top-ink); }
.header-actions { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.header-actions > a:not(.btn) { color: var(--top-ink-2); text-decoration: none; font-size: var(--t-sm); font-weight: 500; }
.header-actions > a:not(.btn):hover { color: var(--top-ink); text-decoration: underline; }
.site-nav { display: flex; gap: var(--s5); margin-left: var(--s6); }
.site-nav a { color: var(--top-ink-2); text-decoration: none; font: 500 .9375rem/1 var(--sans); white-space: nowrap; }
.site-nav a:hover { color: var(--top-ink); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--top-ink); text-decoration: underline; text-decoration-color: var(--trim); text-decoration-thickness: 2px; text-underline-offset: .5em; }
/* Phones: still one row. The brand shows only its mark (the name stays for screen readers), and the links scroll
   sideways inside the bar on the narrowest screens rather than widening the page. */
@media (max-width: 639px) {
  .site-header .brand:has(+ .site-nav) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .site-nav { flex: 1 1 auto; min-width: 0; margin-left: .75rem; gap: .75rem; overflow-x: auto; scrollbar-width: none; }
  .site-nav a { font-size: .8125rem; padding-block: .5rem; }
}
/* Held empty until the sign-in state is known (scripts/site-user.js), at the height the pill will take. */
.header-actions[data-auth="pending"] { min-width: 4rem; min-height: 2.75rem; }
.who { display: none; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-sm); color: var(--top-ink-2); }
@media (min-width: 640px) { .who { display: inline; } }
.site-header .btn { color: var(--top-ink); border-color: var(--top-ink-2); background: transparent; }
.site-header .btn:hover { background: var(--top-2); border-color: var(--top-ink-2); color: var(--top-ink); }
.site-header .btn:active { background: var(--top-2); color: var(--top-ink); }
.site-header .btn:focus-visible { outline-color: var(--top-focus); }
.site-header :focus-visible { outline-color: var(--top-focus); }
.user-menu :focus-visible, .user-menu .field select:focus-visible { outline-color: var(--action); }  /* the menu is a light card in the light theme */

/* The user pill (console): my name, my role, and a menu. */
.user { position: relative; }
.user-pill { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; max-width: min(18rem, 58vw); padding: .25rem .375rem .25rem .75rem; border: 1px solid var(--top-edge); border-radius: var(--r-btn); background: var(--top-2); color: var(--top-ink); font: 600 var(--t-sm)/1.2 var(--sans); cursor: pointer; }
.user-pill:hover { border-color: var(--top-ink-2); }
.user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role { padding: .125rem .5rem; border-radius: var(--r-chip); font: 700 var(--t-section)/1rem var(--display); letter-spacing: .04em; text-transform: uppercase; background: var(--top-chip); color: var(--top-ink); }
.user-role[data-role="admin"] { background: var(--top-ink); color: var(--top); }
.user-pill svg { width: 1rem; height: 1rem; color: var(--top-ink-2); }
.user-menu { position: absolute; right: 0; top: calc(100% + .375rem); z-index: 25; width: min(18rem, calc(100vw - 2rem)); padding: .5rem; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r-card); animation: pop 150ms var(--ease); }
.user-menu .field { margin: .25rem .5rem .5rem; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.user-menu .label { padding: .5rem .5rem .25rem; }
.user-menu .who-full { padding: .25rem .5rem .5rem; font-size: var(--t-sm); color: var(--ink-2); overflow-wrap: anywhere; border-bottom: 1px solid var(--line); }
.menu-item { display: flex; align-items: center; width: 100%; min-height: 2.75rem; padding: .5rem; border: 0; border-radius: var(--r-field); background: none; color: var(--ink); font: 500 var(--t-sm) var(--sans); text-decoration: none; text-align: left; cursor: pointer; }
.menu-item:hover { background: var(--surface-2); color: var(--ink); }
.menu-links { padding: .25rem 0; border-bottom: 1px solid var(--line); }
.menu-links:empty { display: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--top); color: var(--top-ink-2); border-top: 1px solid var(--top-line); padding-block: 2.5rem 2rem; font-size: var(--t-sm); }
.site-footer :focus-visible { outline-color: var(--top-focus); }
.site-footer .input { background: var(--top-2); color: var(--top-ink); border-color: var(--top-edge); }
.site-footer .input:focus-visible { outline-color: var(--top-focus); border-color: var(--top-focus); }

/* ---------- Buttons (revision 2): rectangles, radius 2, 40 high (36 small), uppercase Display 14px 700 ----------
   Primary: solid ink (white on black, black on white). Secondary (.btn): a 1px ink outline. Outline icon (.btn-outline): transparent, icon left.
   Destructive (.btn-danger): alarm outline (it can't be undone) or .btn-danger-fill. Pressed 8% darker, focus a 2px
   ring with a 2px offset, disabled 40%, loading (aria-busy) a 16px spinner left of the kept label. The borders use
   --field-edge rather than line-strong so the edge reaches 3:1 (section 2's AA rule). */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); height: 2.5rem; padding: 0 var(--s4); border: 1px solid var(--ink); border-radius: var(--r-btn); background: transparent; color: var(--ink); font: 700 .875rem/1 var(--display); text-transform: uppercase; letter-spacing: .06em; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease); }
.btn svg { width: 1.25rem; height: 1.25rem; }
.btn:hover { background: var(--surface-2); color: var(--ink); }
.btn:active { background: var(--surface-3); }
.btn:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.btn:disabled:not([aria-busy="true"]), fieldset:disabled .btn, .btn-primary:disabled:not([aria-busy="true"]), .btn-danger-fill:disabled {
  background: transparent; border: 1px dashed var(--line-strong); color: var(--ink-3); cursor: not-allowed; }
/* Not a control at all (the landing page's "coming soon"): readable text in a dashed frame, not a faded button. */
.btn[aria-disabled="true"] { color: var(--ink-2); border-style: dashed; background: transparent; cursor: default; }
/* Busy: the spinner takes the padding it needs (16 + 8), so the width never changes; full strength while it works. */
.btn[aria-busy="true"] { padding-inline: var(--s1); }
.btn-sm[aria-busy="true"], .btn-outline[aria-busy="true"] { padding-inline: 0; }
.btn[aria-busy="true"]:disabled { opacity: 1; cursor: progress; }
.btn[aria-busy="true"]::before, .loading::before { content: ""; width: 1rem; height: 1rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* The main action is the brand red everywhere: the console's main button, the public pages' calls to action and
   the sign-up paths. */
.btn-primary, .btn-accent, .site-header .btn-accent, a.choice { background: var(--alarm-fill); border-color: var(--alarm-fill); color: var(--on-alarm); }
.btn-primary:hover, .btn-accent:hover, .site-header .btn-accent:hover, a.choice:hover { background: color-mix(in srgb, var(--alarm-fill) 85%, #000); border-color: color-mix(in srgb, var(--alarm-fill) 85%, #000); color: var(--on-alarm); }
.btn-primary:active, .btn-accent:active { background: color-mix(in srgb, var(--alarm-fill) 75%, #000); }
.btn-outline { height: 2.25rem; padding: 0 var(--s3); background: transparent; }
.btn-outline:active { background: color-mix(in srgb, var(--ink) 12%, transparent); }
.btn-danger { background: transparent; color: var(--alarm-ink); border-color: var(--alarm); }
.btn-danger:hover { color: var(--on-alarm); border-color: var(--alarm-fill); background: var(--alarm-fill); }
.btn-danger:active { color: var(--on-alarm); background: color-mix(in srgb, var(--alarm-fill) 92%, #000); }
.btn-danger-fill, .btn-danger-fill:hover { background: var(--alarm-fill); border-color: var(--alarm-fill); color: var(--on-alarm); }
.btn-danger-fill:active { background: color-mix(in srgb, var(--alarm-fill) 92%, #000); color: var(--on-alarm); }
.btn-sm { height: 2.25rem; padding: 0 var(--s3); }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; min-height: 0; color: var(--link); font: 500 var(--t-body) var(--sans); text-transform: none; letter-spacing: 0; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.btn-link:hover { color: var(--link-hover); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }

/* ---------- Chips (2b): 24 high, radius 6, Display 13px uppercase; filled for statuses, outlined for neutral.
   Always text: the color only helps. Fills and their inks are the same in both themes. ---------- */
.badge, .chip { display: inline-flex; align-items: center; gap: var(--s1); height: 1.5rem; padding: 0 var(--s2); border: 1px solid var(--field-edge); border-radius: var(--r-chip); background: transparent; color: var(--ink-2);
  font: 700 var(--t-section)/1 var(--display); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.chip-mono { font: 500 var(--t-small)/1 var(--mono); text-transform: none; letter-spacing: 0; }
.badge-ok, .chip-ok { background: var(--ok); border-color: var(--ok); color: var(--on-status-avl); }
.badge-warn, .chip-warn { background: var(--warn); border-color: var(--warn); color: var(--on-status-enr); }
.badge-danger, .chip-danger, .chip-p1 { background: var(--alarm-fill); border-color: var(--alarm-fill); color: var(--on-alarm); }
.chip-p2 { border-color: var(--status-enr); color: var(--warn-ink); }
.badge-info, .chip-info { background: var(--info); border-color: var(--info); color: var(--on-status-oos); }

/* ---------- Older public helpers (pricing.html, the privacy policy): an intro, a warm tint ---------- */
.section.tint, .intro.tint { background: var(--tint, var(--surface)); }
.section.tint + .section, .section + .section.tint { border-top: 0; }
main > .section .split > h2::before, main > .section .split > div > h2:first-child::before {
  content: ""; display: block; width: 2.5rem; height: var(--border-mark); margin-bottom: var(--s3); background: var(--ink); }
.intro { padding-block: 3rem 3.5rem; }
.intro h1 { max-width: 20ch; }
.intro .lead { margin-top: 1.25rem; }
.intro .actions { margin-top: 1.75rem; }
.intro-date { margin-top: 1rem; }
@media (min-width: 1000px) { .intro { padding-block: 4.5rem 5rem; } }

/* ---------- Labeled facts: label above or beside, value under ---------- */
.specs { display: grid; grid-template-columns: minmax(7.5rem, 11rem) 1fr; font-size: var(--t-sm); }
.specs dt, .specs dd { padding: .625rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.specs dt { font-size: var(--t-label); line-height: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding-right: var(--s4); padding-top: var(--s3); }
.specs dd { color: var(--ink); font-size: var(--t-value); line-height: 1.375rem; font-weight: 600; }
@media (max-width: 639px) { .specs { grid-template-columns: 6.5rem 1fr; } }

/* ---------- Feature rows (landing page): thin rules between, no boxes ---------- */
.features { display: grid; gap: 0 var(--s8); list-style: none; padding: 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
.feature { padding: var(--s5) 0; border-top: 1px solid var(--line); }
.feature h3 { font-size: 1.125rem; line-height: 1.375rem; text-transform: uppercase; letter-spacing: .02em; }
.feature p { margin-top: .25rem; color: var(--ink-2); font-size: var(--t-sm); }

/* ---------- Rows: a term beside its text, thin rules between (no boxes, no icons) ---------- */
.rows { margin: 0; border-bottom: 1px solid var(--line); }
.rows > div { display: grid; gap: .25rem var(--s6); padding: var(--s5) 0; border-top: 1px solid var(--line); }
@media (min-width: 640px) { .rows > div { grid-template-columns: 10rem 1fr; } }
.rows dt { font: 700 1.0625rem/1.5rem var(--display); text-transform: uppercase; letter-spacing: .02em; }
.rows dd { margin: 0; color: var(--ink-2); }
.ruled { list-style: none; padding: 0; margin: 0; border-bottom: 1px solid var(--line); }
.ruled li { padding: var(--s3) 0; border-top: 1px solid var(--line); }
.list-title { font: 700 var(--t-section)/1rem var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: var(--s3); }

/* ---------- The plan (pricing): one ruled box; a number nobody has set yet is outlined, never passed off as real ---------- */
.plan { align-self: start; border: 1px solid var(--line-strong); border-radius: var(--r-card); padding: var(--s6); display: grid; gap: var(--s3); }
.plan .plan-name { font-size: var(--t-title); line-height: 1.75rem; text-transform: none; }
.plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .625rem; }
.plan-amount { font: 700 3rem/1 var(--display); }
.plan-per { flex-basis: 100%; color: var(--ink-2); }
.plan-trial { font-weight: 600; }
.plan .btn { margin-top: var(--s2); }
.placeholder { outline: 2px dashed var(--warn); outline-offset: 2px; }

/* ---------- Steps: a numbered sequence ---------- */
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; border-bottom: 1px solid var(--line); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; gap: 0 var(--s3); padding: var(--s5) 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(step, decimal-leading-zero); color: var(--ink-3); font: 700 1.5rem/1.5rem var(--display); font-variant-numeric: tabular-nums; grid-row: span 2; }
.steps li strong { display: block; }
.steps li span { color: var(--ink-2); font-size: var(--t-sm); }

/* ---------- Tables: 44px rows, a sticky header ---------- */
.table-wrap { overflow: auto; max-height: 75vh; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--bg); }
.table-wrap:has(> table[hidden]) { display: none; }  /* a list with no rows yet: its empty line says so */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
.table th, .table td { text-align: left; vertical-align: middle; padding: var(--s1) var(--s4); line-height: 1.25rem; border-bottom: 1px solid var(--line); }
.table td { height: 2.75rem; }
.table tbody tr:last-child td { border-bottom: 0; }
.table thead th { position: sticky; top: 0; z-index: 1; height: 2.5rem; padding-block: .75rem; line-height: 1rem; background: var(--surface-2); font-size: var(--t-label); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.table tbody tr:hover td { background: var(--surface); }
.table td.end, .table th.end { text-align: right; }
.table .row { flex-wrap: nowrap; }
@media (max-width: 639px) {
  .table-wrap:has(.table.stack) { max-height: none; overflow: visible; }
  .table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table.stack tr { display: block; padding: .75rem .875rem; border-bottom: 1px solid var(--line); }
  .table.stack tbody tr:last-child { border-bottom: 0; }
  .table.stack th, .table.stack td { display: block; height: auto; border: 0; padding: .2rem 0; text-align: left; }
  .table.stack td.end { text-align: left; }
  .table.stack td[data-label]:empty { display: none; }   /* no label over nothing */
  .table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: var(--t-label); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
  .table.stack .row { flex-wrap: wrap; justify-content: flex-start; margin-top: .5rem; }
}

/* ---------- Screenshot slots ---------- */
.shot { margin: 0; }
.shot .frame { border: 1px solid var(--line-strong); overflow: hidden; background: var(--surface); }
.shot img { width: 100%; height: auto; }
.shot-16x10 .frame { max-width: 50rem; border-radius: var(--r-card); }
.shot-phone .frame { max-width: 20rem; margin-inline: auto; border-radius: var(--r-card); }
.shot figcaption { margin-top: var(--s3); font-size: var(--t-small); line-height: 1.125rem; font-weight: 500; color: var(--ink-2); text-align: center; }

/* ---------- Notices and banners: a colored left edge, plain words ---------- */
.notice { border: 1px solid var(--line); border-left: 4px solid var(--action); border-radius: var(--r-field); background: var(--surface); padding: .875rem 1.125rem; font-size: var(--t-sm); }
.notice-warn { border-left-color: var(--warn); }
.notice-danger { border-left-color: var(--alarm); }
.notice-ok { border-left-color: var(--ok); }

/* ---------- Forms: labels above, 12px uppercase; inputs on surface-3 ---------- */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; font-size: var(--t-label); line-height: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.form > * + * { margin-top: 1.25rem; }
.form-top { margin-top: 1.5rem; }
.field { display: block; font-size: var(--t-label); line-height: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.field input, .field select, .field textarea, .input { display: block; width: 100%; margin-top: var(--s2); min-height: 2.75rem; padding: .625rem var(--s3); background: var(--surface-3); color: var(--ink); border: 1px solid var(--field-edge); border-radius: var(--r-field);
  font: 600 var(--t-value)/1.375rem var(--sans); text-transform: none; letter-spacing: 0; }
.field input[type="file"] { padding: .5rem; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible, .input:focus-visible { outline: 2px solid var(--action); outline-offset: 1px; border-color: var(--action); }
.field input::placeholder, .field textarea::placeholder, .input::placeholder { color: var(--ink-3); opacity: 1; }
.field input.mono, .field .mono, .input.mono { font-family: var(--mono); font-weight: 500; }
.input-sm { display: inline-block; width: auto; min-height: 2.25rem; margin: 0; padding: .25rem .5rem; font-size: var(--t-sm); }
.help { display: block; margin-top: var(--s1); font-size: var(--t-small); line-height: 1.125rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink-2); }
.choices { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: .5rem; }
.choices label { display: inline-flex; align-items: center; gap: .5rem; font-size: var(--t-sm); min-height: 2.25rem; color: var(--ink); }
:where(input[type="radio"], input[type="checkbox"]) { accent-color: var(--action); width: 1.125rem; height: 1.125rem; }
.inline-form { display: grid; gap: .75rem; }
@media (min-width: 640px) { .inline-form { grid-template-columns: 1fr auto; align-items: end; } .inline-form.three { grid-template-columns: 1fr auto auto; } }
.cols-2 { display: grid; gap: var(--s3) var(--s4); }
@media (min-width: 600px) { .cols-2 { grid-template-columns: 1fr 1fr; } }
.masked { -webkit-text-security: disc; } /* Active911 code fields: hidden like a password, but not one to password managers */
.msg { font-size: var(--t-sm); font-weight: 400; color: var(--ink-2); }
/* A field's own error, under it (the sign-up form). */
.field-error { display: block; margin-top: var(--s1); font-size: var(--t-small); line-height: 1.125rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--alarm-ink); }
.field [aria-invalid="true"] { border-color: var(--alarm); }
/* Sign-up's two ways in: big rectangles, a title and one line each. */
.choices-big { display: grid; gap: var(--s3); }
.choice { display: grid; gap: var(--s1); padding: var(--s5); border: 1px solid var(--field-edge); border-radius: var(--r-card); background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color 150ms var(--ease), background-color 150ms var(--ease); }
.choice:hover { border-color: var(--ink); background: var(--surface-2); color: var(--ink); }
.choice-title { font: 700 1.125rem/1.375rem var(--display); text-transform: uppercase; letter-spacing: .02em; }
.choice-text { font-size: var(--t-sm); color: var(--ink-2); }
/* The sign-up paths are calls to action: red (with .btn-primary). */
a.choice .choice-text { color: var(--on-alarm); }
a.choice:focus-visible { outline-color: var(--alarm-fill); }
.eyebrow a { color: inherit; }
.msg:empty { display: none; }
.msg[data-kind="error"] { color: var(--alarm-ink); }
.msg[data-kind="ok"] { color: var(--ok-ink); }
/* A page-level message: a banner with its edge in the message's color. */
.banner:not(:empty) { padding: .75rem 1rem; border: 1px solid var(--line); border-left: 4px solid var(--action); border-radius: var(--r-field); background: var(--surface); color: var(--ink); }
.banner[data-kind="error"] { border-left-color: var(--alarm); color: var(--ink); }
.banner[data-kind="ok"] { border-left-color: var(--ok); color: var(--ink); }
.after, .after-form { margin-top: 1rem; }

/* ---------- Cards: every panel of an account page or the console ---------- */
.app-main { padding-block: 2rem 4rem; }
.app-main.narrow { max-width: 28rem; }
.app-main h1 { font-size: var(--t-title); line-height: 1.75rem; }
.app-main .lead { margin-top: .5rem; }
.panel { padding: var(--s6) 0 0; border-top: 1px solid var(--line); }
.panel + .panel, * + .panel, .panel + form { margin-top: var(--s8); }
.app-main .panel:first-of-type { margin-top: var(--s6); }
/* A card's header: Display 13/16 uppercase, ink-3 (2b "section header"). */
.panel > h2, .subhead { font: 700 var(--t-section)/1rem var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.subhead { margin-top: var(--s6); }
.panel > p.meta { margin-top: var(--s2); }
.panel > p.meta + * { margin-top: var(--s4); }
.panel > form, .panel > .table-wrap { margin-top: var(--s4); }

/* Sign-in: a centered card on bg. */
.auth { display: grid; place-items: start center; padding-block: 3rem 4rem; }
.auth-card { width: min(25rem, 100%); padding: var(--s6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.auth-card h1 { font-size: var(--t-title); line-height: 1.75rem; }
.auth-card .lead { font-size: var(--t-md); margin-top: .375rem; }
.auth-foot { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: var(--t-sm); }

/* ---------- Prose (the privacy policy) ---------- */
.prose { max-width: var(--read); }
.prose > * + * { margin-top: 1rem; }
.prose h2 { font-size: var(--t-xl); margin-top: 2.5rem; }
.prose h3 { font-size: var(--t-lg); margin-top: 2rem; }
.prose li + li { margin-top: .375rem; }

/* ---------- Agency tools (report template editor, devices) ---------- */
.editor-row { display: grid; gap: .75rem; padding-block: 1rem; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .editor-row { grid-template-columns: 3fr 2fr auto; align-items: start; } }
.section-edit { border-top: 1px solid var(--line); padding-block: 1rem; }
.section-edit > summary { cursor: pointer; font-weight: 600; min-height: 2.25rem; }
.problems { padding-left: 1.25rem; color: var(--alarm-ink); font-size: var(--t-sm); }
.problems li + li { margin-top: .25rem; }
.pair-code { font: 500 2.5rem/1.1 var(--mono); letter-spacing: .08em; }
.qr { display: block; width: 12rem; height: 12rem; image-rendering: pixelated; border-radius: var(--r-field); background: #fff; padding: .5rem; }
/* The preview is paper: black on white in both themes, like the printed report. */
.paper { background: #fff; color: #111; border: 1px solid var(--line-strong); border-radius: var(--r-field); padding: 1.5rem; font-size: var(--t-sm); }
.paper .meta { color: #555; }
.paper-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; border-bottom: 2px solid #111; padding-bottom: .5rem; }
.paper-top img { max-height: 3.5rem; width: auto; }
.paper-title { font-size: var(--t-xl); font-weight: 700; }
.paper-section { margin-top: 1.25rem; }
.paper-h { font-size: var(--t-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.paper-grid { display: grid; gap: .5rem 1rem; margin-top: .5rem; }
@media (min-width: 640px) { .paper-grid { grid-template-columns: 1fr 1fr; } }
.paper-l { font-size: var(--t-label); color: #555; }
.paper .blank { border-bottom: 1px solid #888; min-height: 1.25rem; }

/* ---------- Signed-in areas (/agency, /account): a flat sidebar beside the pages ----------
   248 wide from 1100px; a 64px icon rail from 768px (labels kept for screen readers, a tooltip for the mouse, the
   label shown beside a focused icon); under 768px a top menu. The area's name sits in the top bar from 768px, in the
   menu's head below that. */
.console-page { min-height: calc(100vh - 3.5rem - 6px); }
.console-page > .banner { margin: var(--s4) var(--gutter) 0; }
.console-page > .field { margin: var(--s4) var(--gutter) 0; max-width: 24rem; }
.console { display: grid; }
.console-nav { background: var(--top); color: var(--top-ink); border-bottom: 1px solid var(--top-line); }
.console-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s3) var(--gutter); }
.console-org .chrome-title { color: var(--top-ink-2); }
.console-org .strong { color: var(--top-ink); font: 600 1.0625rem/1.3 var(--display); }
.console-nav .btn { color: var(--top-ink); border-color: var(--top-edge); background: transparent; }
.console-nav .btn:hover { background: var(--top-2); color: var(--top-ink); }
.console-nav :focus-visible { outline-color: var(--top-focus); }
.console-body { display: none; padding-bottom: var(--s3); }
.console-body[data-open="true"] { display: block; }
.console-list { list-style: none; padding: 0; margin: 0; }
.console-list a { position: relative; display: flex; align-items: center; gap: var(--s3); min-height: 2.75rem; padding: var(--s2) var(--gutter); color: var(--top-ink-2); text-decoration: none; font: 500 var(--t-body)/1.25rem var(--sans); transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.console-list a svg { width: 1.25rem; height: 1.25rem; }
.console-list a:hover { background: var(--top-2); color: var(--top-ink); }
.console-list a[aria-current="page"] { background: var(--top-2); color: var(--top-ink); font-weight: 600; }
.console-list a[aria-current="page"]::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--border-mark); background: var(--trim); }
.nav-label { flex: 1; min-width: 0; }
.nav-count { min-width: 1.75rem; height: 1.25rem; padding: 0 var(--s2); white-space: nowrap; border-radius: var(--r-chip); background: var(--top-chip); color: var(--top-ink); font: 700 var(--t-label)/1.25rem var(--display); text-align: center; font-variant-numeric: tabular-nums; }
.nav-count[data-alarm] { background: var(--alarm-fill); color: var(--on-alarm); }
.console-main { min-width: 0; width: 100%; max-width: calc(var(--console-max) + 2 * var(--gutter)); padding: var(--s6) var(--gutter) var(--s10); }
.console-main > h1 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1; text-transform: uppercase; }
.console-main > h1:focus { outline: none; }
.console-main > h1:focus-visible { outline: 2px solid var(--action); outline-offset: 4px; }
.console-main > h1 + .after, .console-main > .tabs + .after { margin-top: var(--s5); }
.console-main .panel:first-child { margin-top: 0; }
.console-main .panel.first { margin-top: 0; padding-top: 0; border-top: 0; }   /* the page's first visible panel (shell.js) */
#section > * + * { margin-top: var(--s8); }
/* A title over several sections of one page (Settings: App defaults). */
.verify { margin-bottom: var(--s5); }
@media (min-width: 768px) {
  .console { grid-template-columns: 4rem minmax(0, 1fr); min-height: calc(100vh - 3.5rem); }
  .console-nav { border-bottom: 0; border-right: 1px solid var(--top-line); }
  .console-nav > div { position: sticky; top: 0; z-index: 40; }
  .console-head { display: none; }
  .console-body { display: block; padding-block: var(--s3); }
  /* The rail: icons only, the label for screen readers, the count as a small badge under the icon. */
  .console-list a { flex-direction: column; justify-content: center; gap: 2px; padding: var(--s2) 0; min-height: 3.25rem; }
  .console-list .nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .console-list a:focus-visible .nav-label { left: calc(100% + var(--s2)); top: 50%; width: auto; height: auto; overflow: visible; clip: auto; transform: translateY(-50%); z-index: 20;
    padding: var(--s1) var(--s2); border-radius: var(--r-chip); background: var(--top); border: 1px solid var(--top-edge); color: var(--top-ink); }
  .console-list .nav-count { min-width: 1.25rem; height: 1rem; padding: 0 .25rem; font-size: .6875rem; line-height: 1rem; }
  .console-main { padding: var(--s6) var(--s6) var(--s10); }
}
@media (min-width: 1100px) {
  .console { grid-template-columns: 15.5rem minmax(0, 1fr); }
  .console-nav > div { max-height: 100vh; overflow-y: auto; }
  .console-list a:focus-visible { outline-offset: -2px; }
  .console-list a { flex-direction: row; justify-content: flex-start; gap: var(--s3); padding: var(--s2) var(--s5); min-height: 2.75rem; }
  .console-list a:focus-visible .nav-label { position: static; transform: none; padding: 0; border: 0; background: none; box-shadow: none; color: inherit; }
  .console-list .nav-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  .console-list .nav-count { position: static; min-width: 1.75rem; height: 1.25rem; padding: 0 var(--s2); font-size: var(--t-label); line-height: 1.25rem; }
}

/* Tabs under a page's title (Map data, Reports): links on a rule, the current one underlined in ink. A page's section
   links (Settings) are the same row, lighter. Scrolls sideways on a phone rather than wrapping. */
.tabs { display: flex; flex-wrap: wrap; gap: 0 var(--s6); margin-top: var(--s4); border-bottom: 1px solid var(--line); }
.tabs a { flex: none; padding: var(--s3) 0 calc(var(--s3) - 2px); border-bottom: 2px solid transparent; color: var(--ink-2); text-decoration: none; font: 700 var(--t-small)/1rem var(--display); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.tabs a:focus-visible { outline-offset: -2px; }
.part[id], .panel[id] { scroll-margin-top: var(--s4); }

/* Map data: the map, then the tab's lists. */
.map-box .map-frame { height: min(60vh, 34rem); }
@media (max-width: 767px) { .map-box .map-frame { height: 45vh; min-height: 16rem; } }
.pane { margin-top: var(--s6); }
#section > .map-hint { margin-top: var(--s2); }
.map-hint:empty { display: none; }

/* Integrations: a connection's page under the list. */
.detail-head { display: grid; gap: var(--s1); }
.detail-head .back { justify-self: start; font-size: var(--t-small); font-weight: 500; color: var(--ink-2); }
.detail-head .back::before { content: "\2190\00a0"; }
.detail-head .eyebrow { margin-top: var(--s3); }
.detail-title { font-size: var(--t-xl); line-height: 1.75rem; text-transform: uppercase; letter-spacing: .02em; }
.status-cell { display: grid; gap: 2px; justify-items: start; }
/* Devices: each member's devices under their name and count. */
.member-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); color: var(--ink); }
.member-head .count { font: 500 var(--t-small)/1 var(--mono); color: var(--ink-2); letter-spacing: 0; text-transform: none; }
.member-head + .table-wrap { margin-top: var(--s3); }
.narrow-field { max-width: 24rem; }
/* A form stays a readable width on a wide page. */
.console-main .panel > form, .console-main .panel > .stack, .console-main .part > form { max-width: 56rem; }
.btn-link.strong { font-weight: 600; text-align: left; }
.rule + .rule { padding-top: var(--s4); border-top: 1px solid var(--line); }
/* Overview: the setup steps, done or to do. */
.setup { list-style: none; padding: 0; border-top: 1px solid var(--line); counter-reset: step; }
.setup li { display: flex; align-items: center; gap: var(--s3); min-height: 3rem; padding-block: var(--s1); border-bottom: 1px solid var(--line); }
.setup li::before { flex: none; width: 1.5rem; font: 700 1rem/1 var(--display); color: var(--ink-3); font-variant-numeric: tabular-nums; content: ""; }
.setup li:not([data-done])::before { counter-increment: step; content: counter(step); }
.setup-text { flex: 1; min-width: 0; }
.setup li[data-done] .setup-text { color: var(--ink-2); }
.panel + .stats, .stats + .panel { margin-top: var(--s8); }
ul.plain { list-style: none; padding: 0; }
ul.plain li + li { border-top: 1px solid var(--line); padding-top: .5rem; }

/* Count tiles (Overview): the number large, the label as a field label, an edge in its color. */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.stat { display: grid; gap: var(--s1); align-content: start; min-height: 6rem; padding: var(--s4); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); color: var(--ink); text-decoration: none; transition: background-color 150ms var(--ease); }
.stat:hover { background: var(--surface); color: var(--ink); }
.stat[data-tone="alarm"] .stat-n { color: var(--alarm-ink); }
.stat[data-tone="warn"] .stat-n { color: var(--warn-ink); }
.stat[data-tone="error"] .stat-n { color: var(--ink-3); }
.stat[data-tone="error"] .stat-s { color: var(--alarm-ink); }
.stat-n { font: 700 2.25rem/1 var(--display); font-variant-numeric: tabular-nums; }
.stat-l { font: 700 var(--t-section)/1rem var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.stat-s { font-size: var(--t-small); line-height: 1.125rem; font-weight: 500; color: var(--ink-2); }

.dialog { border: 1px solid var(--line-strong); border-radius: var(--r-sheet); background: var(--surface); color: var(--ink); padding: var(--s6); width: min(30rem, calc(100vw - 2rem)); }
.dialog.dialog-wide { width: min(45rem, calc(100vw - 2rem)); }
.dialog[open] { animation: pop 200ms var(--ease); }
.dialog::backdrop { background: rgb(0 0 0 / .6); }
.dialog > h2 { font-size: var(--t-title); line-height: 1.75rem; }
details > summary { cursor: pointer; }
.end-actions { justify-content: flex-end; gap: .5rem; }
@media (min-width: 1100px) { .table .end-actions { flex-wrap: nowrap; } }
@media (max-width: 639px) { .end-actions { justify-content: flex-start; } }
.nowrap { white-space: nowrap; }

/* The map in the console (scripts/admin/map.js shows maps/frame.html in a sandboxed frame). */
.dialog .map-frame { height: 45vh; }
.map-frame { display: block; width: 100%; height: 60vh; min-height: 20rem; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface-3); }

/* ---------- From the Watchroom UI Kit (design/components.css): copy changes there, not here ---------- */
/* Switch: a setting that takes effect at once. On is the action color, never green (green means available). */
.switch { appearance: none; position: relative; flex: none; width: 44px; height: 24px; margin: 0; border: 1px solid var(--field-edge); border-radius: var(--radius); background: var(--surface-3); cursor: pointer; transition: background-color 150ms var(--ease), border-color 150ms var(--ease); }
.switch::before { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 1px; background: var(--ink-3); transition: transform 150ms var(--ease); }
.switch:checked { background: var(--action); border-color: var(--action); }
.switch:checked::before { transform: translateX(20px); background: var(--bg); }
.switch:disabled { border-style: dashed; cursor: not-allowed; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 56px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
/* Segmented: one of a few; the chosen one is filled like a primary button. */
.segmented { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--field-edge); border-radius: var(--radius); background: var(--surface-2); }
.segmented button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 14px; border: 0; border-radius: 1px; background: transparent; color: var(--ink-2); font: 500 13px/1 var(--sans); cursor: pointer; }
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--btn); color: var(--on-btn); font-weight: 600; }
.segmented .n { font: 500 12px/1 var(--mono); color: var(--ink-3); }
.segmented [aria-pressed="true"] .n { color: inherit; }
/* Unit status chips, in the app's eight status colors. */
.status { --f: var(--status-oos); --o: var(--on-status-oos); background: var(--f); border-color: var(--f); color: var(--o); }
.status[data-s="dsp"] { --f: var(--status-dsp); --o: var(--on-status-dsp); }
.status[data-s="enr"] { --f: var(--status-enr); --o: var(--on-status-enr); }
.status[data-s="ons"] { --f: var(--status-ons); --o: var(--on-status-ons); }
.status[data-s="sta"] { --f: var(--status-sta); --o: var(--on-status-sta); }
.status[data-s="stg"] { --f: var(--status-stg); --o: var(--on-status-stg); }
.status[data-s="avl"] { --f: var(--status-avl); --o: var(--on-status-avl); }
.status[data-s="closed"] { --f: var(--status-closed); --o: var(--on-status-closed); }
.lamp { display: inline-block; flex: none; width: 10px; height: 10px; background: var(--f, var(--status-oos)); }
/* Codes and numbers as an unboxed mono strip, split by short rules. */
.strip { display: flex; flex-wrap: wrap; align-items: center; gap: 0; }
.strip > * + * { margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--line-strong); }
.strip > .code { font: 500 13px/18px var(--mono); color: var(--ink-2); }
/* A title on the black chrome, after a 16 x 3 trim mark. */
.chrome-title { display: flex; align-items: center; gap: var(--s2); margin: 0; color: var(--top-ink-2); font: 700 13px/16px var(--display); text-transform: uppercase; letter-spacing: .08em; }
.chrome-title::before { content: ""; flex: none; width: 16px; height: var(--border-mark); background: var(--trim); }
/* Toast: something finished away from where you're looking (a dialog that closed). The inverse of the page. */
.toasts { position: fixed; left: 50%; bottom: var(--s4); z-index: 60; display: grid; gap: var(--s2); width: min(var(--dialog), calc(100vw - 2rem)); transform: translateX(-50%); pointer-events: none; }
.toast { display: flex; align-items: center; gap: var(--s4); min-height: 48px; max-width: var(--dialog); padding: 10px var(--s3) 10px var(--s4); background: var(--ink); color: var(--bg); border-radius: var(--radius); font: 500 15px/20px var(--sans); pointer-events: auto; }
.toast .btn-link { margin-left: auto; color: var(--bg); font-weight: 600; }
.toast[data-kind="error"] { background: var(--alarm-fill); color: var(--on-alarm); }
.toast[data-kind="error"] .btn-link { color: var(--on-alarm); }

/* ---------- Public pages ----------
   Shared by every public page: the header's call to action, the big buttons, the black and red grounds, the chevron
   band (the kit's red and white stripes). Nothing here reaches the signed-in pages (they use none of these classes). */
.header-cta { margin-left: auto; }
.header-cta + .header-actions { margin-left: 0; }
@media (max-width: 639px) { .header-cta { display: none; } .header-cta + .header-actions { margin-left: auto; } }

.btn-lg { height: 3rem; padding: 0 var(--s5); font-size: 1rem; }
.section.flat, .section + .section.flat, .section.flat + .section { border-top: 0; }



/* Big links, one to a row. */
.go { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.go a { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s5) 0; border-bottom: 1px solid var(--line-strong); color: var(--ink); text-decoration: none; font: 700 clamp(1.25rem, 3.5vw, 2rem)/1.1 var(--display); text-transform: uppercase; overflow-wrap: anywhere; }
.go .ic { width: 1.75rem; height: 1.75rem; color: var(--alarm); transition: transform 150ms var(--ease); }
.go a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--trim); text-decoration-thickness: 3px; }
.go a:hover .ic { transform: translateX(4px); }

/* Facts (security): an icon on a black square beside one plain statement. */
.facts { display: grid; gap: 0 var(--s8); margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .facts { grid-template-columns: 1fr 1fr; } }
.facts li { display: flex; align-items: center; gap: var(--s4); padding: var(--s5) 0; border-bottom: 1px solid var(--line); font: 600 1.125rem/1.35 var(--sans); }
.facts .ic { width: 3rem; height: 3rem; padding: .75rem; background: var(--top); color: var(--trim); }
.notes { display: grid; gap: var(--s8); }
@media (min-width: 760px) { .notes { grid-template-columns: 1fr 1fr; } }
.notes h2 { font: 700 1.25rem/1.2 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.notes p { margin-top: var(--s2); color: var(--ink-2); }

/* Sign in and sign up: the form on a card that sits across the black band and its chevron. */
.auth-page .auth { padding-block: 0; }
.auth-page .auth-card, .auth-sheet { background: var(--bg); border: 1px solid var(--line-strong); }
.auth-sheet { width: min(34rem, calc(100% - 2 * var(--gutter))); max-width: none; margin-inline: auto; padding: var(--s6) var(--s5); }
@media (min-width: 640px) { .auth-sheet { padding: var(--s8); } }

/* The footer. */

/* ---------- Home and features (2026-11-08: "let it look like ESO or FirstDue") ----------
   Clean, light, calm public-safety software: white and light-gray grounds, lots of room, sentence-case headings in
   the kit's condensed face at 600, Inter for the rest, the kit red as the one accent (eyebrows, links, the main
   buttons). Real screens of the app and the console in plain frames on soft gray panels. No shadows. */
.btn-lg, .header-cta { text-transform: none; letter-spacing: 0; font: 600 .9375rem/1 var(--sans); }
.btn-lg { height: 3rem; padding: 0 var(--s6); }
.btn-outline-red { background: transparent; border-color: var(--alarm-fill); color: var(--alarm); }
.btn-outline-red:hover { background: color-mix(in srgb, var(--alarm-fill) 8%, transparent); border-color: var(--alarm-fill); color: var(--alarm); }

.es-eyebrow { font: 600 .9375rem/1.2 var(--sans); color: var(--alarm); }
.es-eyebrow + .es-h1, .es-eyebrow + .es-h2 { margin-top: var(--s3); }
.es-h1 { font: 600 clamp(2.5rem, 5vw, 4rem)/1.05 var(--display); letter-spacing: -.005em; color: var(--ink); max-width: 16ch; }
.es-h2 { font: 600 clamp(1.875rem, 3.4vw, 2.625rem)/1.1 var(--display); letter-spacing: -.005em; color: var(--ink); }
.es-h3 { font: 600 1.375rem/1.2 var(--display); color: var(--ink); }
.es-lead { margin-top: var(--s5); max-width: 38rem; font-size: 1.1875rem; line-height: 1.6; color: var(--ink-2); }
.es-lead + .actions, .es-h1 + .actions { margin-top: var(--s8); }
.es-section { padding-block: 5rem; }
@media (min-width: 900px) { .es-section { padding-block: 7rem; } }
.es-gray { background: var(--surface); }

/* Device frames: the real screens, in a phone, a browser window or a plain panel. A border carries the edge. */
.dev { margin: 0; }
.dev img { display: block; width: 100%; height: auto; }
.dev-phone { width: 100%; max-width: 17rem; padding: .4375rem; background: #0B0B0B; border: 1px solid #3A3A3A; border-radius: 2.25rem; }
.dev-phone img { border-radius: 1.8rem; }
.dev-browser { overflow: hidden; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px; }
.dev-browser::before { content: ""; display: block; height: 1.75rem; border-bottom: 1px solid var(--line); background:
  radial-gradient(circle, var(--line-strong) 0 4px, transparent 5px) .875rem 50% / 1rem 1rem no-repeat,
  radial-gradient(circle, var(--line-strong) 0 4px, transparent 5px) 1.75rem 50% / 1rem 1rem no-repeat,
  radial-gradient(circle, var(--line-strong) 0 4px, transparent 5px) 2.625rem 50% / 1rem 1rem no-repeat, var(--surface); }
.dev-panel { overflow: hidden; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px; }
/* A soft gray stage behind a screenshot. */
.es-stage { display: grid; place-items: center; gap: var(--s5); padding: var(--s6); background: var(--surface); border-radius: 14px; }
.es-gray .es-stage { background: var(--bg); }
.es-phones { display: flex; justify-content: center; align-items: flex-start; gap: var(--s5); width: 100%; }
.es-phones .dev-phone { width: 46%; }
.es-phones .dev-phone + .dev-phone { margin-top: var(--s10); }
@media (min-width: 900px) { .es-stage { padding: var(--s10); } }


/* Plain facts in a row, where other sites put customer logos (we have none to show). */


/* Every feature: a card with its real screen, a title, a line and Learn more. */
.es-head { margin-bottom: var(--s10); }
.lineup { display: grid; gap: var(--s8) var(--s6); margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .lineup { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .lineup { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.unit-card { position: relative; display: grid; align-content: start; gap: var(--s2); }
.unit-shot { overflow: hidden; aspect-ratio: 16 / 10; margin-bottom: var(--s3); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; transition: border-color 150ms var(--ease); }
.es-gray .unit-shot { background: var(--bg); }
.unit-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.unit-shot.is-phone { display: grid; place-items: start center; padding-top: var(--s5); }
.unit-shot.is-phone img { width: 46%; height: auto; border: 5px solid #0B0B0B; border-bottom: 0; border-radius: 1.1rem 1.1rem 0 0; }
.unit-shot.is-panel { display: grid; place-items: start center; padding: var(--s3); }
.unit-shot.is-panel img { object-fit: contain; object-position: top center; }
.unit-card h3 { font: 600 1.25rem/1.2 var(--display); }
.unit-card h3 a { color: var(--ink); text-decoration: none; }
.unit-card h3 a::after { content: ""; position: absolute; inset: 0; }
.unit-card p { color: var(--ink-2); line-height: 1.55; }
.unit-more { margin-top: var(--s1); font-weight: 600; color: var(--alarm); }
.unit-more::after { content: " \2192"; }
.unit-card:hover .unit-shot, .unit-card:focus-within .unit-shot { border-color: var(--alarm-fill); }
.unit-card:hover h3 a { color: var(--alarm); }
.unit-card:focus-within { outline: 2px solid var(--action); outline-offset: 4px; border-radius: 4px; }
.unit-card h3 a:focus-visible { outline: none; }

/* Data and security: a title and paragraph beside plain facts with checks. */
.es-two { display: grid; gap: var(--s8) var(--s10); align-items: start; }
@media (min-width: 900px) { .es-two { grid-template-columns: 1fr 1fr; } }
.es-two > div > p { margin-top: var(--s4); font-size: 1.0625rem; line-height: 1.7; color: var(--ink-2); }
.es-two .es-more { display: inline-block; margin-top: var(--s5); font-weight: 600; color: var(--alarm); text-decoration: none; }
.es-two .es-more:hover { text-decoration: underline; }
.es-checks { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.es-checks li { display: flex; gap: var(--s3); padding: var(--s4) 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.es-checks li::before { content: ""; flex: none; width: 1.25rem; height: 1.25rem; margin-top: .125rem; border-radius: 50%; background: var(--alarm-fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / .75rem no-repeat; }

/* The closing panel: calm, gray, the two red buttons. */
.es-cta { padding: var(--s10) var(--s6); background: var(--surface); border-radius: 14px; text-align: center; }
.es-cta .es-h2 { max-width: 20ch; margin-inline: auto; }
.es-cta p { max-width: 36rem; margin: var(--s4) auto 0; font-size: 1.0625rem; line-height: 1.65; color: var(--ink-2); }
.es-cta .actions { justify-content: center; margin-top: var(--s6); }
@media (min-width: 900px) { .es-cta { padding: 5rem var(--s10); } }

/* A feature page: breadcrumb, title and lead, the screen on a stage, how it works beside what an admin sets up. */
.es-crumb { font-size: .9375rem; color: var(--ink-2); }
.es-crumb a { color: var(--alarm); text-decoration: none; font-weight: 600; }
.es-crumb a:hover { text-decoration: underline; }
.es-crumb + .es-h1 { margin-top: var(--s4); }
.fp-body { display: grid; gap: var(--s8) var(--s10); }
@media (min-width: 900px) { .fp-body { grid-template-columns: 7fr 5fr; } }
.fp-body > div p { font-size: 1.125rem; line-height: 1.7; color: var(--ink-2); }
.fp-body > div p + p { margin-top: var(--s4); }
.fp-body > div p:first-of-type { color: var(--ink); }
.fp-admin { align-self: start; padding: var(--s6); border: 1px solid var(--line-strong); border-top: 3px solid var(--alarm-fill); border-radius: 0 0 10px 10px; }
.fp-admin h2 { font: 600 1.25rem/1.2 var(--display); margin-bottom: var(--s3); }
.fp-admin p { line-height: 1.65; color: var(--ink-2); }
.fp-admin .dev { margin-top: var(--s5); }

/* The footer: the company, its pages and the legal link, in columns. */
.foot-wide { display: grid; gap: var(--s8); padding-bottom: var(--s6); }
.foot-wide .brand { margin-bottom: var(--s3); }
.foot-about p { max-width: 22rem; color: var(--top-ink-2); line-height: 1.6; }
.foot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6); }
@media (min-width: 760px) { .foot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .foot-wide { grid-template-columns: 4fr 8fr; } }
.foot-grid h2 { margin-bottom: var(--s3); font: 600 .9375rem/1.2 var(--sans); color: var(--top-ink); }
.foot-grid ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s2); }
.foot-grid a, .foot-about a { color: var(--top-ink-2); text-decoration: none; }
.foot-grid a:hover, .foot-about a:hover { color: var(--top-ink); text-decoration: underline; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2) var(--s6); padding-top: var(--s5); border-top: 1px solid var(--top-line); font-size: var(--t-small); color: var(--top-ink-2); }
.foot-legal a { color: var(--top-ink-2); }

/* ---------- The product bar (layouts 4 and 5 combined, 2026-11-08) ----------
   Under the black top bar on every public page: the Product menu (a details element, no script) grouped by phone,
   console, and reports and integrations, then the other pages. */
@media (min-width: 900px) { .mega > .wrap { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Numbered markers on the real screens, and their key ---------- */
.pin-img { position: relative; }
.pin { position: absolute; z-index: 2; display: grid; place-items: center; width: 1.875rem; height: 1.875rem; margin: -.9375rem 0 0 -.9375rem; border: 2px solid #FFFFFF; border-radius: 50%; background: var(--alarm-fill); color: var(--on-alarm); font: 700 .875rem/1 var(--sans); text-decoration: none; }
.pin:hover, .pin:focus-visible { background: #111111; color: #FFFFFF; }
@media (max-width: 639px) { .pin { width: 1.375rem; height: 1.375rem; margin: -.6875rem 0 0 -.6875rem; border-width: 1.5px; font-size: .6875rem; } }
.legend-grid { display: grid; gap: var(--s5) var(--s8); margin: 0; padding: 0; list-style: none; counter-reset: lg; text-align: left; }
@media (min-width: 640px) { .legend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .legend-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.legend-grid li { display: grid; grid-template-columns: 1.875rem 1fr; gap: .125rem var(--s3); scroll-margin-top: var(--s8); }
.legend-grid li::before { counter-increment: lg; content: counter(lg); display: grid; place-items: center; width: 1.875rem; height: 1.875rem; border-radius: 50%; background: var(--alarm-fill); color: var(--on-alarm); font: 700 .875rem/1 var(--sans); grid-row: span 2; }
.legend-grid a, .legend-grid strong { font-weight: 600; color: var(--ink); text-decoration: none; }
.legend-grid a:hover { color: var(--alarm); text-decoration: underline; }
.legend-grid span { color: var(--ink-2); line-height: 1.5; }
.legend-grid li:target { outline: 2px solid var(--alarm-fill); outline-offset: 6px; border-radius: 4px; }

/* The home hero: the console and the phone, both marked, big and centered. */
.mk-hero { padding-block: 4rem 0; text-align: center; }
.mk-hero .es-h1, .mk-hero .es-lead { margin-inline: auto; }
.mk-hero .actions { justify-content: center; }
.mk-art { position: relative; max-width: 68rem; margin: var(--s10) auto 0; padding-bottom: 2.5rem; }
.mk-art .dev-browser { width: 82%; margin-left: auto; }
.mk-art .mk-phone { position: absolute; left: 0; bottom: 0; width: 25%; max-width: 13.5rem; }
.mk-art .dev-phone { padding: .375rem; border-radius: 1.75rem; }
.mk-art .dev-phone img { border-radius: 1.4rem; }
.mk-key { padding-block: var(--s10) 0; }
@media (min-width: 900px) { .mk-hero { padding-block: 5.5rem 0; } }
/* A feature page's screen with its markers: the key sits beside it on wide screens. */
.mk-feature { display: grid; gap: var(--s8); align-items: start; margin-top: var(--s10); }
.mk-feature .legend-grid { grid-template-columns: 1fr; }
@media (min-width: 1000px) { .mk-feature { grid-template-columns: 8fr 4fr; gap: var(--s10); } .mk-feature.is-phone { grid-template-columns: 5fr 7fr; } }
.mk-feature .es-stage { margin: 0; }

/* ---------- The other public pages (about, security, contact, 404, sign-in and sign-up), in the same light style ---------- */
.es-page-head { padding-block: 4rem 1rem; }
@media (min-width: 900px) { .es-page-head { padding-block: 5.5rem 1.5rem; } }
.es-page-head .es-h1 { max-width: 20ch; }
.es-email { display: inline-block; margin-top: var(--s6); font: 600 clamp(1.375rem, 4vw, 2rem)/1.2 var(--display); color: var(--alarm); text-decoration: none; overflow-wrap: anywhere; }
.es-email:hover { text-decoration: underline; }
.facts .ic { background: var(--surface); color: var(--alarm); border-radius: 10px; }
.facts li { border-bottom-color: var(--line); }
.auth-page { min-height: 70vh; padding-block: 4rem 5rem; background: var(--surface); }
.auth-page .auth-card, .auth-sheet { border-radius: 12px; border-color: var(--line); }

.mk-feature .es-phones .dev-phone { width: 72%; max-width: 19rem; }

/* Sentence case on the rest of the public pages too: link rows, notes, the sign-in and sign-up card. */
.go a { font: 600 clamp(1.125rem, 2.5vw, 1.5rem)/1.2 var(--display); text-transform: none; }
.notes h2 { font: 600 1.25rem/1.2 var(--display); text-transform: none; letter-spacing: 0; }
.auth-page .btn { text-transform: none; letter-spacing: 0; font: 600 .9375rem/1 var(--sans); }
.choice-title { font: 600 1.1875rem/1.3 var(--display); text-transform: none; letter-spacing: 0; }

/* Phones: the console's sidebar markers are too close together to read, so the key carries them. */
@media (max-width: 639px) { .mk-art .dev-browser .pin { display: none; } }

/* pins:start (written by the page generator; one rule per marker) */
.pin-home-1 { left: 12%; top: 25.3%; }
.pin-home-2 { left: 12%; top: 30.2%; }
.pin-home-3 { left: 12%; top: 35%; }
.pin-home-4 { left: 12%; top: 40%; }
.pin-home-5 { left: 12%; top: 45%; }
.pin-home-6 { left: 67.8%; top: 17.6%; }
.pin-home-7 { left: 94%; top: 54.8%; }
.pin-live-calls-1 { left: 90%; top: 12.6%; }
.pin-live-calls-2 { left: 67.8%; top: 17.6%; }
.pin-live-calls-3 { left: 67.8%; top: 28.7%; }
.pin-live-calls-4 { left: 74.4%; top: 42.6%; }
.pin-live-calls-5 { left: 94%; top: 54.8%; }
.pin-alerts-1 { left: 29%; top: 8.5%; }
.pin-alerts-2 { left: 27%; top: 27%; }
.pin-alerts-3 { left: 37.4%; top: 63.7%; }
.pin-alerts-4 { left: 64.3%; top: 82%; }
.pin-responding-1 { left: 47.8%; top: 35.5%; }
.pin-responding-2 { left: 66.7%; top: 58.1%; }
.pin-responding-3 { left: 47.8%; top: 65.9%; }
.pin-responding-4 { left: 42.2%; top: 79.5%; }
.pin-hydrants-1 { left: 47.3%; top: 10%; }
.pin-hydrants-2 { left: 27.3%; top: 28.6%; }
.pin-hydrants-3 { left: 44.7%; top: 28.6%; }
.pin-hydrants-4 { left: 54.7%; top: 28.6%; }
.pin-hydrants-5 { left: 23.4%; top: 87.8%; }
.pin-pre-plans-1 { left: 34.5%; top: 28.2%; }
.pin-pre-plans-2 { left: 27%; top: 45.4%; }
.pin-pre-plans-3 { left: 57%; top: 45.4%; }
.pin-pre-plans-4 { left: 81.5%; top: 45.4%; }
.pin-stations-and-units-1 { left: 13.3%; top: 5.9%; }
.pin-stations-and-units-2 { left: 13.9%; top: 40.4%; }
.pin-stations-and-units-3 { left: 58.9%; top: 44.2%; }
.pin-stations-and-units-4 { left: 80.6%; top: 40.4%; }
.pin-reports-1 { left: 38.5%; top: 26.9%; }
.pin-reports-2 { left: 45%; top: 46.9%; }
.pin-reports-3 { left: 88.7%; top: 46.9%; }
.pin-reports-4 { left: 89.5%; top: 62.3%; }
.pin-truck-tablets-1 { left: 31.5%; top: 37.4%; }
.pin-truck-tablets-2 { left: 28.8%; top: 55.8%; }
.pin-truck-tablets-3 { left: 35.5%; top: 71%; }
.pin-truck-tablets-4 { left: 70.5%; top: 63.2%; }
.pin-cad-integrations-1 { left: 92.8%; top: 12.6%; }
.pin-cad-integrations-2 { left: 33.1%; top: 19%; }
.pin-cad-integrations-3 { left: 54.9%; top: 33.4%; }
.pin-cad-integrations-4 { left: 6.9%; top: 52.8%; }
/* pins:end */
