/* The customer portal, "Viewfinder" (John chose it 20 Oct 2026, direction A
 * of design/portal/redesign; every screen drawn in design/portal/viewfinder).
 *
 * A PHONE FIRST (PORTAL-PLAN.md section 4). Everything here is drawn at 360
 * to 430 pixels and then allowed to spread out; there is no breakpoint that
 * makes it fit a phone, only ones that let it use a bigger screen.
 *
 *   - One column, four tabs at the bottom where a thumb is. From 980px it
 *     is laid out for a desk (10 Nov 2026, direction A of
 *     design/portal/desktop): the sites down the left, a site's name, state,
 *     button and tabs along the top, lists beside what they open, and All
 *     sites as one board. The same pages: the bottom of this file.
 *   - Anything you press is at least 44px tall: a thumb, in a truck.
 *   - Dark, because the portal opens on video. Text is never thin or dim
 *     where it matters, so it still reads outdoors.
 *   - Color means what it means on the console: red is armed, amber is
 *     somebody having decided something, green is a thing that is fine,
 *     blue is hard hat and vest hours.
 *   - The one font is the staff site's own, vendored; no other request.
 *
 * It goes on the home screen and opens with no browser bars, so the safe
 * areas matter: content stays out from under the notch and the home bar.
 */

@font-face { font-family: "Familjen Grotesk"; font-weight: 400 700; font-display: swap; src: url("../fonts/familjen-600.7eb7ec31a3a1.woff2") format("woff2"); }

:root {
  --night: #0f1c2b; --panel: #16273a; --raise: #1d3248; --line: #29405a; --field: #0b1622;
  --paper: #eef3f7; --quiet: #9fb1c3; --link: #8fc7ff;
  --armed: #f0574f; --decided: #f2b544; --ok: #3cc985; --ppe: #5bb3f0;
  --armed-bg: rgba(240, 87, 79, .15); --decided-bg: rgba(242, 181, 68, .15);
  --ok-bg: rgba(60, 201, 133, .15); --ppe-bg: rgba(91, 179, 240, .15);
  --face: "Familjen Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 12px;
  --tap: 44px;
  --gutter: 16px;
  --gl: calc(var(--gutter) + env(safe-area-inset-left));
  --gr: calc(var(--gutter) + env(safe-area-inset-right));
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
/* No double-tap zoom: two quick taps while flicking down a long page zoomed
   it, and zoomed in, a phone leaves the tabs where the page was, part way
   up the screen. Pinching to zoom still works. */
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
body {
  margin: 0; background: var(--night); color: var(--paper);
  font: 16px/1.45 var(--face); font-variant-numeric: tabular-nums;
  min-height: 100vh; min-height: 100dvh;
  overflow-x: hidden;
  padding-bottom: calc(66px + env(safe-area-inset-bottom));
}
a { color: var(--link); }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.quiet { color: var(--quiet); }
.small { font-size: 14px; }
.warn { color: var(--armed); }
.right { text-align: right; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
img { display: block; }

/* ---------- the bar on top: which site, and is it armed ---------- */

.rail { display: none; }
.main { min-width: 0; }
.bar {
  position: sticky; top: 0; z-index: 20; background: var(--night);
  transform: translateZ(0);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px;
  padding: calc(8px + env(safe-area-inset-top)) var(--gr) 8px var(--gl);
}
.bar .title { font-size: 21px; font-weight: 700; line-height: 1.2; }

/* The site picker: a plain <details>, so it needs no script. */
.picker { position: relative; min-width: 0; }
.picker summary {
  list-style: none; display: flex; align-items: center; gap: 8px; min-height: var(--tap);
  cursor: pointer; font-size: 21px; font-weight: 700; line-height: 1.2;
}
.picker summary::-webkit-details-marker { display: none; }
.picker summary span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker summary svg { flex: 0 0 auto; width: 18px; height: 18px; fill: none; stroke: var(--quiet); stroke-width: 2; }
.picker.one summary { cursor: default; }
.picker-menu {
  position: absolute; left: 0; top: 52px; z-index: 30; width: 340px;
  background: var(--raise); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
}
.picker-menu a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 56px; padding: 6px 12px; border-radius: 8px; color: var(--paper); text-decoration: none;
}
.picker-menu a:hover, .picker-menu a[aria-current="page"] { background: var(--panel); }
.picker-menu small { display: block; color: var(--quiet); font-size: 13px; }

.state-pill {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
  font-size: 14px; font-weight: 700; padding: 5px 12px 5px 10px; border-radius: 999px; white-space: nowrap;
  color: var(--quiet); background: var(--panel);
}
.state-pill i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.state-pill.armed { color: var(--armed); background: var(--armed-bg); }
.state-pill.off, .state-pill.test { color: var(--decided); background: var(--decided-bg); }
.state-pill.ppe { color: var(--ppe); background: var(--ppe-bg); }

/* For a sign-in on the call list at more than one company. */
.company {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: var(--tap); padding: 0 var(--gr) 0 var(--gl); font-size: 15px; color: var(--quiet);
  border-bottom: 1px solid var(--line);
}
.company strong { color: var(--paper); }
.company a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; white-space: nowrap; }

/* ---------- the page ---------- */

main { display: block; padding: 6px var(--gr) 28px var(--gl); }
main.flush { padding-left: 0; padding-right: 0; }
main.flush > .notice, main.flush > .card { margin-left: var(--gl); margin-right: var(--gr); }
main > * + * { margin-top: 18px; }
main > .notice + .notice { margin-top: 8px; }
h1.page { font-size: 26px; line-height: 1.15; font-weight: 700; text-wrap: balance; }
.lead { color: var(--quiet); }
.back { margin: 0; }
.back a { display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); text-decoration: none; font-weight: 600; color: var(--quiet); }
h2.head { font-size: 19px; font-weight: 700; margin-bottom: 8px; }

.card, .site { background: var(--panel); border-radius: var(--radius); padding: 16px; }
.card h2 { font-size: 18px; font-weight: 700; margin: 0 0 10px; }
.card > * + * { margin-top: 10px; }
.card > h2 + * { margin-top: 0; }

.notice {
  padding: 12px 14px; border-radius: 10px; background: var(--decided-bg); color: var(--paper);
  border-left: 3px solid var(--decided); font-weight: 600;
}
.notice.bad, .notice.error { background: var(--armed-bg); border-left-color: var(--armed); }
.notice.success { background: var(--ok-bg); border-left-color: var(--ok); }
.notice.first { margin-top: 0; }
.notice a { color: var(--paper); }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 50px; margin-top: 18px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--raise); color: var(--paper);
  font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; text-decoration: none; text-align: center;
}
.btn.primary { background: var(--paper); color: var(--night); border-color: var(--paper); }
/* The one button in the portal that switches monitoring off. */
.btn.danger { background: var(--armed); color: #1c0806; border-color: var(--armed); }
.btn.ghost { margin-top: 0; }
.btn.spaced { margin-top: 14px; }
.btn.first-btn { margin: 0 0 8px; }
.btn.inline { display: inline-flex; width: auto; margin-top: 0; min-height: var(--tap); font-size: 16px; }
a.tap { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; }
.center { text-align: center; }
.after { margin-top: 10px; }
.after a, .card p a[href^="tel:"] { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; }
.err { color: var(--armed); font-weight: 600; margin: 4px 0 6px; }

.pill { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; background: var(--raise); color: var(--quiet); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.bad { background: var(--armed-bg); color: var(--armed); }
.pill.quiet-pill { background: var(--raise); color: var(--quiet); }
/* Whose schedule: the whole site, or a camera on its own (30 Oct 2026). */
.camera-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.camera-pick .pill { padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }

/* ---------- rows: a list you can press ---------- */

.rows { list-style: none; margin: 0; padding: 0; }
.rows li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 8px 0; border-top: 1px solid var(--line);
}
.rows li:last-child { border-bottom: 1px solid var(--line); }
.card .rows li:first-child { border-top: 0; }
.card .rows li:last-child { border-bottom: 0; }
.rows a.go, .rows .go {
  display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; min-height: 56px;
  color: var(--paper); text-decoration: none;
}
.rows li:has(> a.go) { padding: 0; }
/* A site's cameras: the name, its state and online in columns every row
   shares, so the pills line up whatever the length of each name. */
.cam-rows { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 12px; }
.cam-rows li { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; justify-content: initial; }
.cam-rows li > * { justify-self: start; }
.cam-rows .cam-name { min-width: 0; overflow-wrap: anywhere; }
.go .grow { flex: 1; min-width: 0; }
.go b { display: block; font-size: 16px; }
.go small { display: block; color: var(--quiet); font-size: 14px; }
.go > svg { flex: 0 0 auto; width: 18px; height: 18px; fill: none; stroke: var(--quiet); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
button.go { color: var(--paper); }
.go .ico { width: 36px; height: 36px; border-radius: 9px; background: var(--panel); display: grid; place-items: center; flex: 0 0 auto; }
.go .ico svg { width: 20px; height: 20px; fill: none; stroke: var(--paper); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
form.row-form { margin: 0; }
form.row-form button { width: 100%; text-align: left; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

/* ---------- the viewfinder ---------- */

.stage { min-width: 0; }
.player { position: relative; aspect-ratio: 16 / 9; width: 100%; background: #000; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.player video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.corners { position: absolute; inset: 12px; pointer-events: none; }
.corners b { position: absolute; width: 22px; height: 22px; border: 0 solid rgba(255, 255, 255, .85); }
.corners b:nth-child(1) { left: 0; top: 0; border-width: 2px 0 0 2px; }
.corners b:nth-child(2) { right: 0; top: 0; border-width: 2px 2px 0 0; }
.corners b:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 2px 2px; }
.corners b:nth-child(4) { right: 0; bottom: 0; border-width: 0 2px 2px 0; }
.hud {
  position: absolute; left: 22px; right: 22px; top: 18px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .85); pointer-events: none;
}
.hud .cam { font-size: 17px; font-weight: 700; }
.hud .cam small { display: block; font-weight: 500; font-size: 13px; opacity: .85; }
.livetag { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; background: rgba(0, 0, 0, .55); padding: 3px 8px; border-radius: 4px; text-shadow: none; white-space: nowrap; }
.livetag i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25 } }
.step {
  position: absolute; top: 50%; transform: translateY(-50%); width: var(--tap); height: 64px;
  display: grid; place-items: center; background: rgba(0, 0, 0, .4); color: #fff; text-decoration: none;
}
.step svg { width: 22px; height: 22px; stroke: #fff; stroke-width: 2.4; fill: none; }
.step.prev { left: 0; border-radius: 0 8px 8px 0; }
.step.next { right: 0; border-radius: 8px 0 0 8px; }
.veil {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px;
  background: rgba(8, 14, 22, .62); font-weight: 600;
}
.veil p { color: var(--quiet); margin: 4px 0 14px; font-size: 15px; font-weight: 400; }
.veil .btn { width: auto; display: inline-flex; margin-top: 0; }
/* The camera starting. Its own name: the sign-in mark's circles were once
   `.ring` too, and spun round the corner of the mark for ever. */
.spinner { width: 30px; height: 30px; margin: 0 auto 10px; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
.under { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px var(--gr) 0 var(--gl); font-size: 14px; color: var(--quiet); }
.toggle { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); color: var(--paper); font-weight: 600; text-decoration: none; white-space: nowrap; }
.toggle .sw { width: 38px; height: 22px; border-radius: 11px; background: var(--line); position: relative; flex: 0 0 auto; }
.toggle .sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.toggle.on .sw { background: #3a8ee6; }
.toggle.on .sw::after { left: 19px; }
.sharpnote { padding: 0 var(--gr) 0 var(--gl); font-size: 14px; color: var(--decided); }
.sharpnote a { color: var(--paper); font-weight: 700; }
.sharpnote.quiet { color: var(--quiet); }
.live-say { padding: 0 var(--gr) 0 var(--gl); min-height: 1.4em; font-size: 14px; }

/* The cameras, under the thumb: a filmstrip that scrolls sideways inside
   itself, never the page. */
.film {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  list-style: none; margin: 0; padding: 8px var(--gr) 6px var(--gl); scroll-padding-inline: var(--gl);
}
.film::-webkit-scrollbar { display: none; }
.film li { flex: 0 0 136px; scroll-snap-align: start; min-width: 0; }
.thumb { display: block; color: var(--paper); text-decoration: none; }
.thumb .shot { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--panel); outline: 2px solid transparent; outline-offset: 2px; }
.thumb .shot img { width: 100%; height: 100%; object-fit: cover; }
.thumb .shot .none { position: absolute; inset: 0; display: grid; place-items: center; color: var(--quiet); font-size: 12px; text-align: center; padding: 6px; }
.thumb b { display: block; margin-top: 6px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb small { display: block; color: var(--quiet); font-size: 12px; }
.thumb[aria-current="true"] .shot { outline-color: #fff; }
.thumb.offline .shot img { filter: grayscale(1) brightness(.4); }
.thumb.offline .shot::after { content: "Offline"; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.thumb.offline small { color: var(--decided); }

/* A site without live view: the answer where the picture would be. */
.statusframe { position: relative; aspect-ratio: 16 / 9; width: 100%; background: var(--panel); display: grid; place-items: center; text-align: center; padding: 30px; }
.statusframe .word { font-size: 52px; font-weight: 700; line-height: .95; letter-spacing: -.02em; text-wrap: balance; }
.statusframe.armed .word { color: var(--armed); }
.statusframe.off .word, .statusframe.test .word { color: var(--decided); }
.statusframe.ppe .word { color: var(--ppe); }
.statusframe p { color: var(--quiet); margin-top: 8px; }

/* Whether it is armed, and the one button that changes it. */
.side { display: grid; gap: 22px; padding: 18px var(--gr) 0 var(--gl); }
.side > * { min-width: 0; }
.arming { padding: 14px 16px; border-radius: 12px; background: var(--panel); display: grid; gap: 12px; border-left: 4px solid var(--line); }
.arming.armed { border-left-color: var(--armed); }
.arming.off, .arming.test { border-left-color: var(--decided); }
.arming.ppe { border-left-color: var(--ppe); }
.arming .word { display: block; font-size: 19px; font-weight: 700; }
.arming p { font-size: 15px; color: var(--quiet); }
.arming .btn { margin-top: 0; }
.arming .coming { color: var(--paper); font-weight: 600; }

/* ---------- what happened: a feed with pictures ---------- */

.feed { list-style: none; margin: 0; padding: 0; }
.feed > li { border-top: 1px solid var(--line); }
.feed > li.dayhead { border-top: 0; padding: 18px 0 6px; font-size: 14px; font-weight: 700; color: var(--quiet); }
.feed > li.dayhead:first-child { padding-top: 4px; }
.ev { display: grid; grid-template-columns: 104px 1fr; gap: 12px; padding: 12px 0; color: var(--paper); text-decoration: none; }
.ev .shot { aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--panel); display: grid; place-items: center; }
.ev .shot img { width: 100%; height: 100%; object-fit: cover; }
.ev .shot svg { width: 26px; height: 26px; fill: none; stroke: var(--quiet); stroke-width: 1.8; stroke-linecap: round; }
.ev time, .ev .when { display: block; font-size: 13px; color: var(--quiet); }
.ev b { display: block; font-size: 16px; line-height: 1.3; }
.ev p { font-size: 14px; color: var(--quiet); }
.ev .open-now { color: var(--armed); font-weight: 700; }
.report-link { display: inline-flex; align-items: center; min-height: var(--tap); margin: -8px 0 4px 116px; font-weight: 700; font-size: 15px; }
.filter { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-left: calc(-1 * var(--gl)); margin-right: calc(-1 * var(--gr)); padding: 0 var(--gr) 0 var(--gl); }
.filter::-webkit-scrollbar { display: none; }
.filter a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--paper); text-decoration: none; font-weight: 600; white-space: nowrap; }
.filter a[aria-current="page"] { background: var(--paper); color: var(--night); border-color: var(--paper); }
.tally p + p { margin-top: 4px; }
.events { list-style: none; margin: 0; padding: 0; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* One incident, opened from the feed. */
.big { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: 10px; overflow: hidden; background: var(--panel); display: grid; place-items: center; color: var(--quiet); }
.big img { width: 100%; height: 100%; object-fit: cover; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 15px; }
.facts dt { color: var(--quiet); }

/* ---------- a site ---------- */

.site { border-left: 4px solid var(--line); }
.site.armed { border-left-color: var(--armed); }
.site.ppe { border-left-color: var(--ppe); }
.site.test, .site.off { border-left-color: var(--decided); }
.site h1 { font-size: 24px; line-height: 1.2; }
.state { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; }
.state .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--quiet); flex: 0 0 auto; }
.state .word { font-size: 20px; font-weight: 700; line-height: 1.25; }
.site.armed .dot { background: var(--armed); } .site.armed .word { color: var(--armed); }
.site.ppe .dot { background: var(--ppe); } .site.ppe .word { color: var(--ppe); }
.site.test .dot, .site.off .dot { background: var(--decided); }
.site.test .word, .site.off .word { color: var(--decided); }
.detail { color: var(--paper); }
.next { margin-top: 6px; font-weight: 600; }
.meta { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--quiet); font-size: 15px; }

/* Today, drawn as one bar with a marker at now. */
.today-bar { display: grid; gap: 4px; }
.today-bar .track { position: relative; display: flex; height: 12px; border-radius: 3px; overflow: hidden; background: var(--field); }
.today-bar .now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--paper); }
.ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--quiet); }

/* The week ahead. */
.week { display: grid; gap: 8px; }
.day { display: grid; grid-template-columns: 58px 1fr; align-items: center; gap: 10px; }
.day .d { font-size: 14px; color: var(--quiet); }
.day.today .d { color: var(--link); font-weight: 700; }
.strip { display: flex; height: 14px; border-radius: 3px; overflow: hidden; background: var(--line); }
.strip i { display: block; min-width: 1px; }
.strip i.armed, .track i.armed, .legend i.armed { background: var(--armed); }
.strip i.ppe, .track i.ppe, .legend i.ppe { background: var(--ppe); }
.strip i.off, .track i.off, .legend i.off { background: var(--line); }
.strip i.test, .track i.test, .legend i.test { background: var(--decided); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 0; font-size: 13px; color: var(--quiet); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 8px; border-radius: 2px; display: inline-block; }

/* ---------- who we call ---------- */

.people { list-style: none; margin: 0; padding: 0; counter-reset: call; }
.people li { counter-increment: call; position: relative; padding: 14px 0 14px 46px; border-top: 1px solid var(--line); }
.card .people li:first-child { border-top: 0; }
.people li::before {
  content: counter(call); position: absolute; left: 0; top: 14px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; border: 2px solid var(--line); color: var(--paper); font-size: 14px; font-weight: 700;
}
.people .who strong { font-size: 17px; }
.people .who .quiet { display: block; font-size: 14px; }
.people .how a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; font-size: 17px; }
.people .flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.people .flags .pill { font-size: 12px; }
.people.manage li { background: var(--panel); border: 0; border-radius: var(--radius); padding: 14px 16px 14px 60px; margin-bottom: 10px; }
.people.manage li::before { left: 16px; top: 16px; }
.people.manage .btn { margin-top: 10px; }
/* Changing the order: Up and Down side by side, the person just moved outlined. */
.people .moves { display: flex; gap: 8px; margin-top: 10px; }
.people.manage .moves .btn { margin-top: 0; flex: 1; min-height: var(--tap); font-size: 16px; }
.people.manage li.moved { box-shadow: inset 0 0 0 2px var(--decided); }

/* ---------- forms ---------- */

label { display: block; font-weight: 600; margin: 16px 0 6px; }
input[type=email], input[type=password], input[type=text], input[type=tel], input[type=date], input[type=datetime-local], input[type=time], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  /* 16px or larger, or an iPhone zooms the whole page when the box is tapped. */
  font: inherit; font-size: 17px; color: var(--paper);
  background: var(--field); border: 1px solid var(--line); border-radius: 10px;
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--link); outline-offset: 1px; border-color: var(--link); }
/* A time or date box on an iPhone is drawn by Safari at a width of its own,
   whatever the page says, so two side by side ran off the card on an iPhone
   18 Pro Max (John, 11 Nov 2026). Without Safari's own look it takes the
   width it is given, and tapping it still opens the iPhone's picker. Its
   value sits on the left like every other box. */
input[type=date], input[type=datetime-local], input[type=time] {
  -webkit-appearance: none; appearance: none; display: block; min-width: 0;
}
input[type=date]::-webkit-date-and-time-value,
input[type=datetime-local]::-webkit-date-and-time-value,
input[type=time]::-webkit-date-and-time-value { text-align: left; }
select { appearance: auto; }
/* Dots as it is typed, without being a password box: a phone offers to save
   a password box over the password they signed in with. */
input.pin { -webkit-text-security: disc; letter-spacing: .25em; font-size: 20px; }
.card[id], form[id] { scroll-margin-top: calc(84px + env(safe-area-inset-top)); }

fieldset.lengths { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.lengths legend { font-weight: 600; padding: 0; margin: 0 0 8px; }
.lengths .grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.len { position: relative; }
/* The radio is still there for the keyboard, a screen reader and the
   browser's own "choose one"; the label is what a thumb presses. */
.len input { position: absolute; opacity: 0; left: 12px; top: 50%; width: 1px; height: 1px; margin: 0; }
.len label {
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; margin: 0;
  min-height: 62px; padding: 6px; cursor: pointer;
  background: var(--field); border: 1px solid var(--line); border-radius: 10px;
}
.len label b { font-size: 16px; }
.len label span { font-size: 12px; font-weight: 400; color: var(--quiet); }
.len input:checked + label { background: var(--paper); color: var(--night); border-color: var(--paper); }
.len input:checked + label span { color: var(--night); }
.len input:focus-visible + label { outline: 3px solid var(--link); outline-offset: 2px; }
.lengths .len.wide { grid-column: 1 / -1; }
.lengths .len.wide label { min-height: var(--tap); }
.lengths .until label { margin-top: 12px; }
/* The time box only once "Until a set time" is chosen. A browser that
   cannot say whether it is chosen shows it always: the page has no script. */
@supports selector(:has(*)) {
  .lengths .until { display: none; }
  .lengths:has(#len-until:checked) .until { display: block; }
}
details.later { margin-top: 14px; }
details.later summary { display: flex; align-items: center; min-height: var(--tap); color: var(--link); font-weight: 600; cursor: pointer; }
details.later label { margin-top: 6px; }

/* A tick or a choice with its words: the whole row is the thing to press. */
label.check {
  display: flex; align-items: flex-start; gap: 12px; min-height: var(--tap); margin: 10px 0 0; padding: 12px 14px;
  font-weight: 400; cursor: pointer; border: 1px solid var(--line); border-radius: 10px; background: var(--field);
}
label.check input { flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--link); }
label.check:has(input:checked) { border-color: var(--link); }
fieldset.choice, fieldset.hours { border: 0; margin: 16px 0 0; padding: 0; min-width: 0; }
fieldset.choice legend, fieldset.hours legend { font-weight: 600; padding: 0; }
.hour-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.hour-row .wide { grid-column: 1 / -1; }
.hour-row .also { margin: 12px 0 0; }
.hour-row label { margin-top: 10px; }
.explain { color: var(--quiet); }
/* The six other days: three across on a phone, which fits the narrowest
   (four needed 412px where a 375px phone has 343), all six on a computer. */
.daypick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
label.small-check { margin: 8px 0 0; align-items: center; justify-content: center; font-weight: 700; }
.days { list-style: none; margin: 0; padding: 0; }
.days li { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; background: var(--panel); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 10px; }
.days .btn { width: auto; min-width: 96px; margin-top: 0; min-height: var(--tap); }
.dayword { color: var(--quiet); }
.dayword.armed { color: var(--armed); font-weight: 600; }
.dayword.off { color: var(--decided); font-weight: 600; }
.dayword.ppe { color: var(--ppe); font-weight: 600; }

/* ---------- a temporary disarm ---------- */

.disarm-line { padding: 12px 0; border-top: 1px solid var(--line); }
.disarm-line:first-of-type { border-top: 0; padding-top: 0; }
.disarm-line .what { font-size: 17px; }
.disarm-line .btn { margin-top: 10px; }

/* ---------- a report, as sent ---------- */

.letter { background: var(--panel); border-radius: var(--radius); padding: 18px 16px; }
.letter h1 { font-size: 22px; line-height: 1.25; margin-bottom: 4px; text-wrap: balance; }
.letter h2 { font-size: 17px; font-weight: 700; margin: 22px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.prose { white-space: pre-line; font-size: 17px; line-height: 1.55; }
.closing { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.letter figure { margin: 0 0 16px; }
.letter img, .letter video, .shots img { display: block; width: 100%; height: auto; border-radius: 8px; background: var(--field); }
/* Every picture holds its place before it arrives (27 Nov 2026). On a weak
   cellular link the report's pictures came in while John was scrolling,
   each one pushing the page down from nothing, and his phone drew the tabs
   half way up the screen. A picture whose size was recorded says it
   (width and height); any other is a camera's 16:9 until it is here. */
.letter img:not([width]) { aspect-ratio: auto 16 / 9; object-fit: contain; }
.letter video { aspect-ratio: 16 / 9; object-fit: contain; background: #000; }
.shots img { aspect-ratio: 16 / 9; object-fit: cover; }
.letter figcaption { font-size: 14px; color: var(--quiet); margin-top: 5px; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps .at { flex: 0 0 auto; min-width: 72px; font-weight: 700; }
.zone-note { font-size: 14px; color: var(--quiet); margin: -4px 0 6px; }
.todo { margin: 0; padding-left: 22px; }
.todo li { margin-bottom: 8px; }
.letter .small { margin-top: 18px; }

/* ---------- PPE ---------- */

.ppe-week { padding: 12px 0; border-top: 1px solid var(--line); }
.ppe-week h3, h3.sub { font-size: 15px; margin: 0 0 8px; }
h3.sub { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 0; }
.figures > div { background: var(--raise); border-radius: 10px; padding: 10px 12px; }
.figures dt { font-size: 13px; color: var(--quiet); }
.figures dd { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.15; }
.figures .good dd { color: var(--ok); }
.figures .bad dd { color: var(--armed); }
.shots { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.shots li { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center; }
.noimg { height: 63px; display: grid; place-items: center; background: var(--raise); border-radius: 8px; }

/* ---------- before signing in ---------- */

/* The gate: the viewfinder's corners around the dealer-less mark, and the
   form below it. On a wide screen the gate becomes the left half. */
.gate {
  position: relative; color: var(--paper); text-align: center;
  padding: calc(40px + env(safe-area-inset-top)) var(--gr) 20px var(--gl);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.gate-frame { position: relative; padding: 26px 34px; }
.gate-mark { width: 52px; height: 52px; margin: 0 auto 8px; display: block; }
.gate-mark .ring { fill: none; stroke: rgba(255, 255, 255, .35); stroke-width: 2; }
.gate-mark .ring.two { stroke: rgba(255, 255, 255, .6); }
.gate-mark .lens { fill: var(--link); }
.gate-mark .glint { fill: #fff; opacity: .85; }
.gate-name { font-size: 15px; color: var(--quiet); }
.gate-title { font-size: 26px; font-weight: 700; line-height: 1.2; margin-top: 4px; }
.gate-list { display: none; }
.signin { padding: 8px var(--gr) 32px var(--gl); }
.signin .card { padding: 22px 18px 18px; }
.signin h1 { font-size: 26px; margin-bottom: 6px; }
.signin .btn.primary { min-height: 52px; }
.signin .small { margin-top: 16px; }
body:has(> .gate) { padding-bottom: 0; }

/* ---------- the tabs: at the bottom, where a thumb is ---------- */

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: flex; background: var(--night); border-top: 1px solid var(--line);
  padding: 0 calc(4px + env(safe-area-inset-right)) env(safe-area-inset-bottom) calc(4px + env(safe-area-inset-left));
  /* A layer of its own, so a phone moves it with the screen rather than
     painting it again as the page scrolls: without one, a phone could leave
     the tabs drawn part way down a long report, or the page's pictures
     drawn over them. */
  transform: translateZ(0); will-change: transform;
}
.tabs a {
  flex: 1 1 0; min-width: 0; min-height: 58px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--quiet); text-decoration: none; font-size: 12px; font-weight: 600;
}
.tabs a[aria-current="page"] { color: var(--paper); }
.tabs svg, .rail nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.tabs svg .fill, .rail svg .fill { fill: currentColor; stroke: none; }

@media print {
  .bar, .tabs, .rail, .back, .printhint, .pager { display: none; }
  body { background: #fff; color: #000; padding: 0; }
  .letter, .card { background: #fff; padding: 0; }
  .sr { position: static; width: auto; height: auto; clip: auto; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .livetag i, .spinner { animation: none; }
}

/* The menu of sites never runs off a narrow phone. */
@media (max-width: 400px) {
  .picker-menu { width: calc(100vw - 32px); }
}

/* ---------- a bigger screen is allowed to breathe ---------- */

@media (min-width: 700px) {
  .statusframe .word { font-size: 88px; }
  h1.page { font-size: 30px; }
}

/* ---------- a list beside what it opens (Activity, Reports) ---------- */

/* On a phone the two are one column, the list or the thing opened; on a
   computer they stand side by side and the opened one stays in view. */
.split > * + * { margin-top: 18px; }
.split-list > * + *, .split-open > * + * { margin-top: 18px; }
.acts > .btn + .btn { margin-top: 10px; }

/* ---------- All sites, today: one board (10 Nov 2026) ---------- */

.board-key { margin: 0 0 10px; }
.legend i.ahead { background: repeating-linear-gradient(115deg, var(--quiet) 0 2px, transparent 2px 5px); }
.board { display: grid; }
.board-axis { display: none; }
.board-row { display: grid; border-top: 1px solid var(--line); }
.board-row:last-child { border-bottom: 1px solid var(--line); }
.board-name { display: grid; gap: 1px; padding: 12px 0 4px; color: var(--paper); text-decoration: none; }
.board-name b { font-size: 17px; }
.board-name .word { font-size: 14px; font-weight: 700; color: var(--quiet); }
.board-name .word.armed { color: var(--armed); }
.board-name .word.ppe { color: var(--ppe); }
.board-name .word.off, .board-name .word.test { color: var(--decided); }
.board-name .quiet { font-size: 13px; }
.lane { position: relative; min-height: 92px; }
.lane .track { position: absolute; left: 0; right: 0; bottom: 24px; height: 14px; display: flex; border-radius: 3px; overflow: hidden; background: var(--field); }
.lane .track i { display: block; min-width: 1px; }
/* What is still to come today is the schedule, not something that happened. */
.lane .ahead { position: absolute; top: 0; bottom: 0; right: 0; background: repeating-linear-gradient(115deg, rgba(15, 28, 43, .7) 0 3px, transparent 3px 7px); }
.lane .now { position: absolute; top: 8px; bottom: 18px; width: 2px; margin-left: -1px; background: var(--paper); z-index: 2; }
.lane .now small { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 2px; font-size: 11px; color: var(--quiet); white-space: nowrap; }
.at-pin {
  position: absolute; bottom: 46px; z-index: 3; width: 56px; aspect-ratio: 16 / 10; transform: translateX(-50%);
  display: grid; place-items: center; border-radius: 4px; background: var(--raise);
  box-shadow: 0 0 0 1.5px var(--night); text-decoration: none;
}
.at-pin img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.at-pin svg { width: 20px; height: 20px; fill: none; stroke: var(--quiet); stroke-width: 1.8; stroke-linecap: round; }
/* A stem down to the moment on the day it began. */
.at-pin::after { content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 8px; margin-left: -1px; background: rgba(238, 243, 247, .7); }
.at-pin:hover { box-shadow: 0 0 0 1.5px var(--night), 0 0 0 3px var(--quiet); }
.at-pin.looked-at { box-shadow: 0 0 0 1.5px var(--night), 0 0 0 3px var(--armed); }
.at-pin[aria-current="true"] { box-shadow: 0 0 0 1.5px var(--night), 0 0 0 3px var(--paper); }
.at-pin.disarm { width: 26px; aspect-ratio: 1; border-radius: 50%; background: var(--decided); }
.at-pin.disarm svg { stroke: var(--night); width: 16px; height: 16px; stroke-width: 2.4; }
.at-pin.disarm::after { background: var(--decided); }
.dock { display: grid; gap: 24px; margin-top: 22px; }
.dock-open > * + * { margin-top: 14px; }
.big.disarm { background: var(--decided-bg); }
.big.disarm svg { width: 56px; height: 56px; fill: none; stroke: var(--decided); stroke-width: 1.6; stroke-linecap: round; }
.dock-cams .film { padding-left: 0; padding-right: 0; }

/* ---------- a computer (10 Nov 2026, John chose direction A of design/portal/desktop) ----------

   The same pages as a phone, laid out for a desk: the sites down the left,
   each with whether it is armed and whether an operator is working an alarm
   there; a site's name, state, one button and tabs along the top; lists
   beside what they open. Phones never see any of it. */

@media (max-width: 979.98px) {
  .desk, .desk-only { display: none !important; }
}

@media (min-width: 980px) {
  .phone-only { display: none !important; }

  body { display: grid; grid-template-columns: 272px minmax(0, 1fr); padding-bottom: 0; font-size: 15px; }
  .tabs, .company { display: none; }

  /* The rail: who this is from, the sites, the company's own pages. */
  .rail {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100dvh;
    padding: 20px 12px 14px; background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto;
  }
  .rail .brand { padding: 0 10px 12px; }
  .rail .brand strong { display: block; font-size: 17px; }
  .rail .brand span { font-size: 13px; color: var(--quiet); }
  .rail nav { display: grid; gap: 2px; }
  .rail .sub { font-size: 13px; font-weight: 600; color: var(--quiet); padding: 16px 10px 4px; }
  .rail a.all, .rail .sites a { display: grid; gap: 1px; padding: 8px 10px; border-radius: 8px; color: var(--paper); text-decoration: none; }
  .rail a.all b { font-weight: 700; }
  .rail .sites .name { display: flex; align-items: center; gap: 9px; min-width: 0; }
  .rail .sites .name b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rail .mark { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--quiet); }
  .rail .mark.armed { background: var(--armed); }
  .rail .mark.ppe { background: var(--ppe); }
  .rail .mark.off, .rail .mark.test { background: var(--decided); }
  .rail .said { font-size: 13px; color: var(--quiet); padding-left: 18px; }
  .rail .said.looked-at { color: var(--armed); font-weight: 600; }
  .rail a:hover { background: rgba(255, 255, 255, .04); }
  .rail a[aria-current="page"] { background: var(--raise); }
  .rail .page {
    display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 0 10px; border-radius: 8px;
    color: var(--quiet); text-decoration: none; font: inherit; font-weight: 600; text-align: left;
    background: none; border: 0; cursor: pointer;
  }
  .rail .page:hover, .rail .page[aria-current="page"] { color: var(--paper); }
  .rail nav svg { width: 20px; height: 20px; }
  .rail nav form { margin: 0; }
  .rail .foot { margin-top: auto; padding: 18px 10px 0; font-size: 13px; color: var(--quiet); display: grid; gap: 4px; }
  .rail .foot a { color: var(--link); font-weight: 600; }

  /* The top of a site's page: its name, what it is doing, its button, its tabs. */
  .desk { padding: 20px 32px 0; border-bottom: 1px solid var(--line); }
  .desk-top { display: flex; align-items: center; gap: 24px; }
  .desk-name { min-width: 0; }
  .desk-name h1 { font-size: 28px; font-weight: 700; line-height: 1.15; }
  .desk-name p { font-size: 14px; color: var(--quiet); margin-top: 2px; }
  .desk-state { margin-left: auto; text-align: right; line-height: 1.25; }
  .desk-state strong { display: block; font-size: 22px; font-weight: 700; color: var(--quiet); }
  .desk-state.armed strong { color: var(--armed); }
  .desk-state.ppe strong { color: var(--ppe); }
  .desk-state.off strong, .desk-state.test strong { color: var(--decided); }
  .desk-state span { font-size: 13px; color: var(--quiet); }
  .desk-top .btn { width: auto; flex: 0 0 auto; margin: 0; min-height: 40px; padding: 0 22px; font-size: 15px; }
  .desk-tabs { display: flex; gap: 4px; margin: 12px -12px 0; }
  .desk-tabs a {
    padding: 8px 12px 10px; margin-bottom: -1px; border-bottom: 3px solid transparent;
    color: var(--quiet); font-weight: 600; text-decoration: none;
  }
  .desk-tabs a:hover { color: var(--paper); }
  .desk-tabs a[aria-current="page"] { color: var(--paper); border-bottom-color: var(--paper); }
  /* Said once, on top: not again in the page, nor the picker it replaces. */
  .has-desk .bar, .has-desk main .arming { display: none; }

  .bar { position: static; transform: none; padding: 18px 32px 12px; }
  .picker summary, .bar .title { font-size: 26px; }
  .picker-menu { top: 56px; }
  main { padding: 4px 32px 48px; max-width: 1040px; }
  .has-desk main { padding-top: 22px; }
  main.wide { max-width: 1480px; }
  main.flush { padding: 0 32px 40px; max-width: 1480px; }
  .has-desk main.flush { padding-top: 22px; }
  .lead { max-width: 64ch; }

  /* With a mouse, nothing needs to be thumb sized, nor a button the width
     of the page. */
  .btn { min-height: 44px; font-size: 16px; }
  main .btn { display: inline-flex; width: auto; min-width: 220px; vertical-align: top; }
  main .btn + .btn { margin-left: 10px; }
  .rows li, .rows a.go, .rows .go { min-height: 48px; }

  .cams { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 0 28px; align-items: start; }
  .cams .player, .cams .statusframe { border-radius: 10px; }
  .cams .under, .cams .sharpnote, .cams .live-say, .cams .film, .cams .side { padding-left: 0; padding-right: 0; }
  .cams .film { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); overflow: visible; }
  .cams .side { padding-top: 0; }
  .step { opacity: 0; transition: opacity .15s; }
  .player:hover .step, .step:focus-visible { opacity: 1; }
  .two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
  .two > * { min-width: 0; }
  .lengths .grid { grid-template-columns: repeat(6, 1fr); }
  .daypick { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .filter { margin: 0; padding: 0; flex-wrap: wrap; }

  /* A list beside what it opens. */
  .split { display: grid; grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); gap: 36px; align-items: start; }
  .split > * + * { margin-top: 0; }
  .split.reports { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); }
  .split-open { position: sticky; top: 20px; max-height: calc(100dvh - 40px); overflow-y: auto; }
  .split-open .big { max-height: 58vh; }
  /* Opening another beside the list (portal-pane.js). */
  .pane-loading .split-open { opacity: .55; transition: opacity .15s .1s; }
  .split-open .letter { max-width: 780px; }
  .acts { display: flex; flex-wrap: wrap; gap: 10px; }
  .acts > .btn, .acts > .btn + .btn { width: auto; margin: 0; padding: 0 22px; }
  .feed > li.event[id] { scroll-margin-top: 20px; }
  .feed > li.chosen .ev { background: var(--raise); border-radius: 8px; margin: 0 -10px; padding-left: 10px; padding-right: 10px; }
  .rows li.chosen a.go { background: var(--raise); border-radius: 8px; margin: 0 -10px; padding: 0 10px; }
  .letter h2.title { font-size: 24px; line-height: 1.25; margin: 0 0 4px; padding: 0; border: 0; text-wrap: balance; }

  /* All sites: each site's name beside its day. */
  .board-axis, .board-row { grid-template-columns: 250px minmax(0, 1fr); }
  .board-axis { display: grid; }
  .board-axis .ticks { padding-bottom: 4px; }
  .board-name { align-content: center; padding: 12px 16px 12px 14px; border-left: 3px solid transparent; }
  .board-name:hover { background: rgba(255, 255, 255, .03); }
  .board-row.chosen .board-name { border-left-color: var(--paper); background: rgba(255, 255, 255, .04); }
  .dock { grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 32px; padding-top: 22px; border-top: 1px solid var(--line); align-items: start; }
  .dock-cams .film { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; overflow: visible; }
  .dock-cams .acts { margin-top: 14px; }

  /* The call list, a card each, two or three across. */
  .people.manage { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
  .people.manage li { margin-bottom: 0; }

  /* The standing week, said and drawn. */
  .days li, .days-ticks { grid-template-columns: minmax(220px, 320px) minmax(0, 1fr) 112px; }
  .days li { gap: 20px; }
  .days .strip { height: 22px; }
  .days .btn { justify-self: end; }
  .days-ticks { display: grid; gap: 20px; padding: 0 16px 6px; }

  /* Before signing in. The page is not a site's, so none of the above:
     no rail, no cap on the width, and the card centered on the screen.
     Signing in: what the portal is for on the left, the form on the right,
     the two together in the middle of the screen. */
  body:has(> .gate) { display: block; }
  .gate { justify-content: center; padding: 64px 32px 24px; }
  main.signin { display: flex; justify-content: center; max-width: none; padding: 8px 32px 48px; }
  .signin .card { width: 440px; padding: 30px 28px 24px; }
  .signin .btn.primary { display: flex; width: 100%; min-width: 0; }
  body:has(> .gate.full) {
    display: grid; grid-template-columns: minmax(0, 440px) 440px; column-gap: clamp(48px, 6vw, 88px);
    justify-content: center; align-content: center; align-items: center;
    min-height: 100vh; min-height: 100dvh; padding: 48px 32px;
  }
  .gate.full { align-items: flex-start; text-align: left; padding: 0; gap: 0; }
  .gate.full .asi-env-chip { align-self: flex-start; margin: 0 0 14px; }
  .gate.full .gate-frame { display: flex; align-items: center; gap: 12px; padding: 0; }
  .gate.full .corners { display: none; }
  .gate.full .gate-mark { width: 40px; height: 40px; margin: 0; }
  .gate.full .gate-name { font-size: 16px; font-weight: 600; color: var(--paper); }
  .gate.full .gate-title { font-size: 40px; line-height: 1.1; margin-top: 28px; text-wrap: balance; }
  .gate.full .gate-list { display: grid; gap: 14px; list-style: none; margin: 28px 0 0; padding: 0; color: var(--quiet); font-size: 17px; }
  .gate-list li { display: flex; align-items: center; gap: 12px; }
  .gate-list svg { width: 24px; height: 24px; flex: 0 0 auto; fill: none; stroke: var(--link); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .gate-list svg .fill { fill: var(--link); stroke: none; }
  body:has(> .gate.full) main.signin { padding: 0; }
  .gate.full + .signin .card { width: 100%; }
}
/* Wide enough, the picture and its words side by side under the board. */
@media (min-width: 1280px) {
  .dock-open { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr); gap: 0 24px; align-content: start; }
  .dock-open > .big { grid-row: span 6; align-self: start; }
  .dock-open > * + * { margin-top: 0; }
  .dock-open > :not(.big) + :not(.big) { margin-top: 14px; }
}
@media (min-width: 980px) and (prefers-reduced-motion: reduce) { .step { transition: none; } }

/* ---------- help requests (get_help.py) ---------- */

textarea { resize: vertical; line-height: 1.45; }
.help-list { margin-top: 20px; }
.thread { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.thread li { background: var(--panel); border-radius: var(--radius); padding: 12px 14px; border-left: 3px solid var(--line); }
.thread li.dealer { border-left-color: var(--link); background: var(--raise); }
.thread .who { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 14px; }
.thread .who time { color: var(--quiet); font-size: 13px; margin-left: auto; }
.thread p { margin: 6px 0 0; overflow-wrap: anywhere; }
.help-state { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--raise); color: var(--quiet); }
.help-state.taken { background: var(--ppe-bg); color: var(--ppe); }
.help-state.open { background: var(--decided-bg); color: var(--decided); }
