/* fonts-app.css */
/* fonts-app: IBM Plex Sans + IBM Plex Mono, self-hosted (SIL OFL 1.1, latin + latin-ext), 14 Nov 2026 - nothing loads from Google. */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/plex-sans-latin-ext-400.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/plex-sans-latin-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/plex-sans-latin-ext-500.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/plex-sans-latin-500.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/plex-sans-latin-ext-600.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/plex-sans-latin-600.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/plex-sans-latin-ext-700.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/plex-sans-latin-700.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/plex-mono-latin-ext-400.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/plex-mono-latin-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/plex-mono-latin-ext-500.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/plex-mono-latin-500.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/plex-mono-latin-ext-600.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/plex-mono-latin-600.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* style.css */
/* THE THREE LAYOUT WIDTHS (design picks ipad-6, 30 Nov 2026) - use these for every new or changed @media rule:
     phone    max-width: 700px            (phone stylesheets, the server's "narrow" cookie in base.html, phonebar.js)
     tablet   701px - 1099px              (an iPad in portrait or landscape, Split View at two thirds)
     computer min-width: 1100px
   An iPad at half Split View (678px on a 12.9-inch) is a phone. Older side-panel folds at 760/900/960/1000/1060px move
   onto these as each page is next changed. */
/* no browser box round a group of fields anywhere (30 Nov, user: "rather than having a box around the answer"); a class can still add its own */
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
:root {
  --navy: #0e1e38;         /* logo navy */
  --navy-2: #1b3354;
  --brand-green: #169b62;  /* logo green (large / decorative use) */
  --accent: #0f7a4c;       /* deeper logo green: buttons, links (readable with white text) */
  --accent-dark: #0b5e3a;
  --accent-soft: #e3f3eb;
  --link: #0f7a4c; --link-hover: #0b5e3a;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --text: #15202e;
  --muted: #4f5c6e;          /* readable on white and on the pale tints (contrast 4.5:1+) */
  --border: #dde3ec;
  /* one red/amber/green (design picks consistency-4, 30 Nov 2026): the status words follow marks.css --mk-*; the hex is only a
     fallback for a page without marks.css. White text on each reads (4.5:1+). */
  --ok: var(--mk-ok, #1a7f45);
  --warn: var(--mk-warn, #9a5b00);
  --bad: var(--mk-bad, #c62828);
  --vfr: var(--mk-ok, #1a7f45); --mvfr: #2563eb; --ifr: var(--mk-bad, #c62828); --lifr: #b026c9;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(11,31,58,.06), 0 4px 16px rgba(11,31,58,.06);
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  /* design system (docs/design-guide.md) */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px;
  --radius-sm: 8px; --radius-lg: 16px;
  --surface-2: #f7f9fc; --text-2: #3b4a5e;
  --control-h: 40px; --control-h-sm: 32px; --r-field: 2px; --r-control: 4px; --r-pop: 8px;
  --ring: 0 0 0 3px rgba(15,122,76,.28);
  /* ONE TYPE SCALE (design pick consistency-7, 30 Nov 2026): every layer sizes its headings from these, so a panel title is
     the same size on every page whichever stylesheet wins. page = the page's h1; section = a heading over a group of panels
     (and the flight-day steps); panel = a panel's own title, h2 or h3, first child or not; sub = a sub-section inside a
     panel; label = the small capitals over a figure. New heading rules use these, not a number. */
  --fs-page: 1.32rem; --fs-section: 1.15rem; --fs-panel: 1.05rem; --fs-sub: .92rem; --fs-label: .78rem;
  --fw-page: 700; --fw-panel: 600;
  /* THE TOKENS EVERY RULE USES (design picks consistency-8, 30 Nov 2026). A CSS file never writes its own corner, shadow or
     text size: it picks one of these. purpose.css (loaded last) narrows the corners to 2/4/4/8px and the floating shadows to
     its one plain shadow, so every rule written with a token follows. tests/e2e_csstokens.py keeps the raw count going down.
       corners  --radius-xs (hairline: fields, tags)  --radius-sm (controls, chips)  --radius (cards, panels)
                --radius-lg (sheets, dialogs, photos)  --radius-pill (pills, switches)  50% stays for dots and avatars
       shadows  --shadow-1 (a lifted control)  --shadow-2 (a menu, a toast, a pop-up)  --shadow-3 (a dialog, a drawer)
       text     --fs-xs .78  --fs-sm .85  --fs-md .92  --fs-base 1  --fs-lg 1.15  --fs-xl 1.32 (rem); big figures keep theirs
       spacing  --sp-1..7 = 4 8 12 16 24 32 48px (the same steps as --space-*; the .m-*/.mt-*/.mb-*/.row-* helpers below) */
  --radius-xs: 2px; --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgba(11,31,58,.08);
  --shadow-2: 0 4px 14px rgba(11,31,58,.14);
  --shadow-3: 0 12px 32px rgba(10,16,24,.24);
  --fs-xs: .78rem; --fs-sm: .85rem; --fs-md: .92rem; --fs-base: 1rem; --fs-lg: 1.15rem; --fs-xl: 1.32rem;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
  /* one card surface (design picks consistency-9): a local card class (.cp-card, .ft-card, .auth-card ...) takes these, so it
     looks like a .panel; its own rule only adds layout */
  --card-bg: var(--surface); --card-line: var(--border); --card-shadow: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text); background: var(--bg); line-height: 1.55; font-size: 16px;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
h2 { font-size: 1.4rem; }
h3 { font-size: var(--fs-lg, 1.15rem); }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
/* Page widths (design picks consistency-5, 30 Nov 2026): a page picks one of these on its .wrap instead of an inline
   max-width, so the content column only ever has a few widths. page-card: one card (sign-in code, QR scan, business card);
   page-narrow: short forms and sign-in; page-form: the usual form or record page; page-mid: busier record pages with side-by-side panels (1080px, so they do not
   stretch to the full side-rail width); page-wide: lists, tables and maps (the
   full content width, the same as a .wrap with no class). They hold in the framed and side-rail layouts too, as the inline
   widths did. */
html .wrap.page-card { max-width: 520px !important; }
html .wrap.page-narrow { max-width: 680px !important; }
html .wrap.page-form { max-width: 860px !important; }
html .wrap.page-mid { max-width: 1080px !important; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm, .85rem); }
.mono { font-family: var(--mono); font-size: var(--fs-sm, .85rem); }
.inline { display: inline; }
.right { text-align: right; }
.mt { margin-top: 1.5rem; }

/* ---------- top bar ---------- */
.topbar { background: #fff; color: var(--navy); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--border); box-shadow: 0 1px 8px rgba(18,48,77,.06); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; font-weight: 700; font-size: var(--fs-base, 1rem); }
.logo { width: 34px; height: 34px; color: var(--navy); flex: none; }
.brand-logo { height: 40px; width: auto; display: block; flex: none; }
@media (max-width: 420px) { .brand-logo { height: 40px; } }
.logo-img { height: 44px; width: auto; display: block; flex: none; }
.logo-full { display: block; width: 100%; height: auto; }
.auth-logo { max-width: 220px; margin: 0 auto 18px; }
.hero-logo { justify-self: center; width: 100%; max-width: 420px; background: #fff; border-radius: var(--radius-lg, 16px); padding: 28px 34px; box-shadow: var(--shadow-3, 0 12px 32px rgba(10,16,24,.24)); }
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-logo { background: #fff; border-radius: var(--radius-sm, 8px); padding: 10px 14px; width: 180px; flex: none; }
@media (max-width: 860px) { .hero-logo { max-width: 280px; order: -1; padding: 18px 22px; } }
.mainnav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mainnav a:not(.btn) { color: #3b4a5e; text-decoration: none; padding: 8px 10px; border-radius: var(--radius-sm, 8px); font-size: var(--fs-md, .92rem); font-weight: 500; }
.mainnav a:not(.btn):hover { color: var(--navy); background: var(--bg); }
.navtoggle, .burger { display: none; }
@media (max-width: 1180px) {
  .burger { display: block; width: 40px; height: 40px; cursor: pointer; position: relative; }
  .burger span, .burger span::before, .burger span::after {
    position: absolute; left: 9px; width: 22px; height: 2px; background: var(--navy); content: ""; }
  .burger span { top: 19px; } .burger span::before { top: -7px; left: 0; } .burger span::after { top: 7px; left: 0; }
  .mainnav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 10px 20px rgba(18,48,77,.08);
    flex-direction: column; align-items: stretch; padding: 8px 16px 16px; }
  .navtoggle:checked ~ .mainnav { display: flex; }
  .mainnav .btn, .mainnav form { margin-top: 6px; }
}

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent;
  background: var(--accent); color: var(--on-accent, #fff); padding: 8px 16px; min-height: var(--control-h); border-radius: var(--radius-sm, 8px); font: inherit; font-weight: 600;
  line-height: 1.2; text-decoration: none; cursor: pointer; font-size: var(--fs-md, .92rem); transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:focus-visible { outline: 2px solid transparent; box-shadow: var(--ring); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn:hover { background: var(--accent-dark); }   /* screen review v-42: a plain .btn is the one accent (it was navy, a second accent) */
.btn-accent { background: var(--accent); color: var(--on-accent, #fff); }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-outline { background: var(--surface, #fff); color: var(--navy-2); border-color: var(--border); }
.btn-outline:where(:not(.on, .active, [aria-pressed="true"], [aria-checked="true"])):hover { background: var(--surface-2); border-color: #c5cfdc; }
.btn-danger { background: #fff; color: var(--bad-text); border-color: #f0c6c6; }
.btn-danger:hover { background: #fdeeee; }
.btn-sm { padding: 5px 11px; min-height: var(--control-h-sm); font-size: var(--fs-sm, .85rem); border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
label { display: block; font-weight: 600; font-size: var(--fs-sm, .85rem); margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=url], input[type=tel], input[type=month], input[type=week],
input[type=number], input[type=search], input[type=time], input[type=datetime-local], input:not([type]), select, textarea {
  width: 100%; padding: 8px 12px; min-height: var(--control-h); border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); font: inherit; line-height: 1.4;
  background: var(--surface, #fff); color: var(--text); transition: border-color .15s, box-shadow .15s; }
/* iPhone and iPad Safari draw date and time boxes their own way: wider than the box they sit in, and a different height
   while empty. Drawn like the other boxes there (tapping still opens the phone's own picker). */
@supports (-webkit-touch-callout: none) {
  input:is([type=date], [type=time], [type=datetime-local], [type=month]) { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; }
  input:is([type=date], [type=time], [type=datetime-local], [type=month])::-webkit-date-and-time-value { text-align: left; min-height: 1.4em; margin: 0; }
  /* controls-11: the calendar / clock icon is in purpose.css (it has to beat the field backgrounds) */
  input:is([type=date], [type=time], [type=datetime-local], [type=month])[data-empty]:not(:focus)::before { content: attr(data-empty); color: var(--muted, #8e9aab); }
}
/* the date in words under the box, where the browser writes dates month first (controls-11) */
.dt-words { display: block; margin-top: 3px; color: var(--muted); font-size: var(--fs-sm, .85rem); font-weight: 400; }
.dt-words[hidden] { display: none; }
:is(input, select, textarea):hover:not(:focus):not(:disabled) { border-color: #c5cfdc; }
input:focus, select:focus, textarea:focus { outline: 2px solid transparent; border-color: var(--accent); box-shadow: var(--ring); }
::placeholder { color: var(--muted, #8e9aab); opacity: 1; }
/* map review 6: nothing fades while the theme switches, so no white flash on pills and fields */
html.theme-switching *, html.theme-switching *::before, html.theme-switching *::after { transition: none !important; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
:is(input, select, textarea):disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
input[type=file] { font: inherit; font-size: var(--fs-md, .92rem); max-width: 100%; }
/* Text boxes follow their row count (controls-5, 30 Nov 2026; was a flat 110px that made a one-line "Reason" a big block).
   No rows: three lines. rows="N": N lines (1lh = one line in the box's own type; 18px = padding and border). Never shorter
   than a single-line field. Short boxes (up to four rows) grow with what is typed, to 40% of the screen, then scroll;
   field-sizing does it where the browser can, static/js/controls.js where it can't. Long editors keep their rows. */
textarea { min-height: 88px; min-height: max(var(--control-h), calc(3 * 1lh + 18px)); resize: vertical; }
textarea[rows="1"] { min-height: max(var(--control-h), calc(1 * 1lh + 18px)); }
textarea[rows="2"] { min-height: max(var(--control-h), calc(2 * 1lh + 18px)); }
textarea[rows="3"] { min-height: max(var(--control-h), calc(3 * 1lh + 18px)); }
textarea[rows="4"] { min-height: max(var(--control-h), calc(4 * 1lh + 18px)); }
textarea[rows="5"] { min-height: max(var(--control-h), calc(5 * 1lh + 18px)); }
textarea[rows="6"] { min-height: max(var(--control-h), calc(6 * 1lh + 18px)); }
textarea[rows="7"] { min-height: max(var(--control-h), calc(7 * 1lh + 18px)); }
textarea[rows="8"] { min-height: max(var(--control-h), calc(8 * 1lh + 18px)); }
textarea[rows="9"] { min-height: max(var(--control-h), calc(9 * 1lh + 18px)); }
textarea[rows="10"] { min-height: max(var(--control-h), calc(10 * 1lh + 18px)); }
textarea[rows="11"] { min-height: max(var(--control-h), calc(11 * 1lh + 18px)); }
textarea[rows="12"] { min-height: max(var(--control-h), calc(12 * 1lh + 18px)); }
textarea[rows="13"] { min-height: max(var(--control-h), calc(13 * 1lh + 18px)); }
textarea[rows="14"] { min-height: max(var(--control-h), calc(14 * 1lh + 18px)); }
textarea[rows="15"] { min-height: max(var(--control-h), calc(15 * 1lh + 18px)); }
textarea[rows="16"] { min-height: max(var(--control-h), calc(16 * 1lh + 18px)); }
textarea[rows="17"] { min-height: max(var(--control-h), calc(17 * 1lh + 18px)); }
textarea[rows="18"] { min-height: max(var(--control-h), calc(18 * 1lh + 18px)); }
textarea:is(:not([rows]), [rows="1"], [rows="2"], [rows="3"], [rows="4"]):not([data-plain]) { field-sizing: content; max-height: max(40vh, 160px); }
.field { margin-bottom: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid-2 > *, .grid-3 > * { min-width: 0; }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; }

/* ---------- flashes ---------- */
.flashes { margin-top: 16px; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm, 8px); margin-bottom: 8px; font-weight: 500; }
.flash-success { background: #e5f6ec; color: #0e5c30; border: 1px solid #bfe6cf; }
.flash-error { background: #fdecec; color: #8f1f1f; border: 1px solid #f3c4c4; }
.flash-info, .flash-message { background: #e8f0fd; color: #183e85; border: 1px solid #c6d8f7; }

/* ---------- public site ---------- */
.hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(22,155,98,.55) 0%, transparent 60%),
  linear-gradient(160deg, var(--navy) 0%, #07101e 100%); color: #fff; padding: 96px 0 110px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: linear-gradient(to bottom, #000, transparent 85%); }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; }
.hero h1 em { font-style: normal; color: #6fd3a2; }
.hero p.lead { font-size: var(--fs-lg, 1.15rem); color: #c7d3e6; max-width: 560px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-badges { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 36px; color: #c7d3e6; font-size: var(--fs-md, .92rem); }
.hero-badges span::before { content: "\2713"; color: #6fd3a2; margin-right: 6px; font-weight: 700; }
.hero-art { width: 100%; max-width: 380px; justify-self: center; color: #fff; filter: drop-shadow(0 20px 40px rgba(0,0,0,.35)); }
.hero-art .prop { transform-origin: center; transform-box: fill-box; animation: spin .35s linear infinite; }
.hero-art .hover { animation: hover 4s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes hover { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .hero-art .prop, .hero-art .hover { animation: none; } }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { max-width: 240px; order: -1; } .hero { padding: 56px 0 72px; } }

.section { padding: 80px 0; }
.section-alt { background: #fff; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: var(--fs-xs, .78rem); margin-bottom: 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.service { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.section-alt .service { background: var(--bg); box-shadow: none; }
.service .ico { width: 44px; height: 44px; border-radius: var(--radius, 12px); background: var(--accent-soft); color: var(--accent-dark);
  display: grid; place-items: center; margin-bottom: 14px; }
.service .ico svg { width: 24px; height: 24px; }
.service p { color: var(--muted); margin: 0; font-size: var(--fs-md, .92rem); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding-top: 52px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 0; width: 38px; height: 38px;
  border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; }
.step p { color: var(--muted); font-size: var(--fs-md, .92rem); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding: 10px 0 10px 32px; position: relative; border-bottom: 1px solid var(--border); }
.checks li::before { content: "\2713"; position: absolute; left: 0; top: 9px; width: 22px; height: 22px; border-radius: 50%;
  background: #e5f6ec; color: var(--ok-text); display: grid; place-items: center; font-size: var(--fs-xs, .78rem); font-weight: 700; }
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; }
.contact-card { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 30px; }
.contact-card a { color: #fff; }
.contact-card .row { margin-bottom: 14px; }
.contact-card .row span { display: block; color: #9fb2cc; font-size: var(--fs-sm, .85rem); text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 860px) {  .contact-grid { grid-template-columns: 1fr; } }

.footer { background: var(--navy); color: #fff; padding: 28px 0; margin-top: 40px; }
.footer .muted { color: #9fb2cc; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
body.public .footer { margin-top: 0; }

/* ---------- auth pages ---------- */
.auth { min-height: calc(100vh - 160px); display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 420px; background: var(--card-bg, var(--surface)); border: 1px solid var(--card-line, var(--border)); border-radius: var(--radius, 12px); box-shadow: var(--card-shadow, none); padding: 34px; }   /* one card look (consistency-9) */
.auth-card h1 { font-size: 1.5rem; }

/* ---------- app (admin / portal) ---------- */
.page { padding-top: 32px; padding-bottom: 48px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1, 0 1px 2px rgba(11,31,58,.08)); padding: 22px; margin-bottom: 20px; }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; }
.layout-side { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.layout-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.layout-side > *, .layout-2 > * { min-width: 0; }
@media (max-width: 960px) { .layout-side, .layout-2 { grid-template-columns: 1fr; } }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
@media (max-width: 860px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: var(--fs-sm, .85rem); }
.stat.hot b { color: var(--accent-dark); }
.table-wrap { overflow-x: auto; }
.inv-scroll { overflow-x: auto; }   /* quote and invoice lines scroll on a small phone (dd57 a11y-9) */
table { width: 100%; border-collapse: collapse; font-size: var(--fs-md, .92rem); font-variant-numeric: tabular-nums; }
th { text-align: left; font-size: var(--fs-xs, .78rem); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); }
td { padding: 10px; border-bottom: 1px solid #edf0f5; vertical-align: top; transition: background .1s; }
table:not(.print-frame) > tbody > tr:hover > td { background: var(--surface-2); }
tr:last-child td, tbody tr:last-child > th { border-bottom: 0; }   /* a row-heading cell too, or a short stray line hangs under the first column (v-78) */
td.actions { white-space: nowrap; text-align: right; }
td.actions form { display: inline; }
.badge { display: inline-block; padding: 2px 9px; border-radius: var(--radius-pill, 999px); font-size: var(--fs-xs, .78rem); font-weight: 600; line-height: 1.5; background: #eef2f8; color: var(--navy-2); white-space: nowrap; vertical-align: middle; }
.badge-ok { background: #e5f6ec; color: #0e6a35; }
.badge-warn { background: #fff4dd; color: #8a5a00; }
.badge-bad { background: #fdecec; color: #a32020; }
.badge-accent { background: var(--accent-soft); color: var(--accent-dark); }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tabs a { padding: 6px 12px; border-radius: var(--radius-pill, 999px); background: #fff; border: 1px solid var(--border); text-decoration: none; color: var(--text); font-size: var(--fs-sm, .85rem); font-weight: 500; }
.tabs a.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.tabs a small { color: inherit; opacity: .65; margin-left: 4px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 12px 0; border-bottom: 1px solid #edf0f5; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.list li:last-child { border-bottom: 0; }
.notice { background: #fff8e6; border: 1px solid #f2d999; color: #6b4a00; border-radius: var(--radius-sm, 8px); padding: 14px 16px; margin-bottom: 16px; }
.chatlive-bar { display: flex; align-items: center; gap: 8px 12px; max-width: 1180px; margin: 12px auto; padding: 6px 8px 6px 14px; font-size: var(--fs-md, .92rem); line-height: 1.4; }   /* your live location in the chat (chatlive.js) */
.chatlive-bar > span { flex: 1; min-width: 0; }
@media (max-width: 1212px) { .chatlive-bar { margin: 8px 16px; } }
.chatlive-bar .btn { min-height: 44px; flex: none; }
.notice code { font-family: var(--mono); background: #fff; padding: 2px 8px; border-radius: var(--radius-sm, 8px); font-size: var(--fs-base, 1rem); border: 1px solid #f2d999; user-select: all; }
details.disclose summary { cursor: pointer; font-weight: 600; color: var(--navy-2); }
details.disclose[open] summary { margin-bottom: 12px; }
.progress { height: 8px; background: #edf0f5; border-radius: var(--radius-pill, 999px); overflow: hidden; margin: 8px 0 16px; }
.progress div { height: 100%; background: var(--ok); width: 0; transition: width .2s; }
.result-ok { color: var(--ok-text); font-weight: 700; }
.result-bad { color: var(--bad-text); font-weight: 700; }

/* project status tracker */
.tracker { display: flex; gap: 0; margin: 8px 0 4px; overflow-x: auto; }
.tracker div { flex: 1; min-width: 86px; text-align: center; font-size: var(--fs-xs, .78rem); color: var(--muted); position: relative; padding-top: 28px; }
.tracker div::before { content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 16px; height: 16px; border-radius: 50%; background: #dfe5ee; z-index: 1; border: 3px solid #fff; box-shadow: 0 0 0 1px #dfe5ee; }
.tracker div::after { content: ""; position: absolute; top: 13px; left: -50%; right: 50%; height: 3px; background: #dfe5ee; }
.tracker div:first-child::after { display: none; }
.tracker div.done { color: var(--text); font-weight: 600; }
.tracker div.done::before { background: var(--ok); box-shadow: 0 0 0 1px var(--ok); }
.tracker div.done::after { background: var(--ok); }
.tracker div.current::before { background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* portal file rows */
.file { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #edf0f5; }
.file:last-child { border-bottom: 0; }
.file .fi { width: 38px; height: 38px; border-radius: var(--radius-sm, 8px); background: #eef2f8; display: grid; place-items: center; color: var(--navy-2); flex: none; font-size: .7rem; font-weight: 700; }
.file .fmeta { flex: 1; min-width: 0; }
.file .fmeta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deliver { background: linear-gradient(135deg, #0e1e38, #0f4a37); color: #fff; border: 0; }
.deliver .muted { color: #b9c7db; }
.deliver .file { border-color: rgba(255,255,255,.12); }
.deliver .file .fi { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- weather ---------- */
.wx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.wx-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.wx-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.wx-card h3 { margin: 0; font-size: var(--fs-xl, 1.32rem); font-family: var(--mono); }
.wx-card .name { color: var(--muted); font-size: var(--fs-sm, .85rem); }
.cat { padding: 3px 10px; border-radius: var(--radius-sm, 8px); color: #fff; font-weight: 700; font-size: var(--fs-xs, .78rem); font-family: var(--mono); }
.cat-VFR { background: var(--vfr); } .cat-MVFR { background: var(--mvfr); } .cat-IFR { background: var(--ifr); } .cat-LIFR { background: var(--lifr); }
.wx-kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.wx-kv div { background: var(--bg); border-radius: var(--radius-sm, 8px); padding: 8px 10px; }
.wx-kv span { display: block; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.wx-kv b { font-size: var(--fs-md, .92rem); }
.raw { font-family: var(--mono); font-size: var(--fs-xs, .78rem); background: #0e1e38; color: #d7e3f4; padding: 10px 12px; border-radius: var(--radius-sm, 8px); white-space: pre-wrap; word-break: break-word; margin: 8px 0 0; }
.raw-label { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 10px; display: block; }
.now { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.now div { background: var(--bg); border-radius: var(--radius-sm, 8px); padding: 12px 14px; }
.now span { display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.now b { font-size: var(--fs-xl, 1.32rem); }
.gonogo { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--radius-sm, 8px); font-weight: 700; }
.gonogo.go { background: #e5f6ec; color: #0e6a35; } .gonogo.caution { background: #fff4dd; color: #8a5a00; } .gonogo.nogo { background: #fdecec; color: #a32020; }
.hourly td, .hourly th { text-align: center; padding: 7px 6px; font-size: var(--fs-sm, .85rem); white-space: nowrap; }
.hourly td:first-child, .hourly th:first-child { text-align: left; }
.hourly tr.day td { background: var(--bg); font-weight: 700; text-align: left; font-size: var(--fs-xs, .78rem); }
.lvl-ok { color: var(--ok-text); } .lvl-warn { color: var(--warn-text); font-weight: 700; } .lvl-bad { color: var(--bad-text); font-weight: 700; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }
.arrow { display: inline-block; transition: transform .2s; }
.kp-bars { display: flex; gap: 6px; align-items: flex-end; height: 70px; }
.kp-bars div { flex: 1; border-radius: 4px 4px 0 0; min-height: 4px; position: relative; }
.kp-bars div span { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: .7rem; color: var(--muted); }
.wx-mini { display: flex; gap: 12px; flex-wrap: wrap; }
.wx-mini .chip { background: var(--bg); border-radius: var(--radius-sm, 8px); padding: 10px 12px; flex: 1; min-width: 140px; }
.wx-mini .chip span { display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; }
.skeleton { color: var(--muted); padding: 20px 0; }

/* weather location finder */
.wx-find { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.wx-address { display: flex; gap: 8px; flex: 1; min-width: 260px; }
.wx-address input { flex: 1; }
.wx-results { list-style: none; margin: 12px 0 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); overflow: hidden; }
.wx-results li + li { border-top: 1px solid var(--border); }
.wx-results button { display: block; width: 100%; text-align: left; background: #fff; border: 0; padding: 10px 14px; font: inherit; cursor: pointer; }
.wx-results button:hover { background: var(--bg); }
.wx-results button span { display: block; font-size: var(--fs-xs, .78rem); margin-top: 2px; }
.wx-coords { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 10px; align-items: end; }
@media (max-width: 720px) { .wx-coords { grid-template-columns: 1fr; } }
code { font-family: var(--mono); font-size: .85em; background: var(--bg); padding: 1px 5px; border-radius: var(--radius-sm, 8px); }

.hero .eyebrow { color: #6fd3a2; }
.now span.arrow, .wx-kv span.arrow, .wx-mini .chip span.arrow { display: inline-block; font-size: inherit; color: inherit; text-transform: none; letter-spacing: 0; }

/* quotes & invoices */
.num { text-align: right; white-space: nowrap; }
.stat.hot-bad b { color: var(--bad-text); }
.line-editor td { padding: 6px 4px; vertical-align: middle; }
.line-editor input { padding: 8px 9px; }
/* phone (w-9): each line a small card with its labels - Description, Quantity, Unit, Price each */
@media (max-width: 700px) {
  html:root table.line-editor, html:root table.line-editor tbody { display: block; width: 100%; }
  html:root table.line-editor thead { display: none; }
  html:root table.line-editor tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; margin-bottom: 10px; background: var(--surface); }
  html:root table.line-editor td { display: block; padding: 0; width: auto; }
  html:root table.line-editor td[data-label]::before { content: attr(data-label); display: block; font-size: var(--fs-xs, .78rem); font-weight: 600; color: var(--muted); margin-bottom: 3px; }
  html:root table.line-editor td.le-desc { grid-column: 1 / -1; }
  html:root table.line-editor.line-editor > tbody > tr > td:not(.le-desc):not(.amount):not(.le-remove) { grid-column: auto; }   /* Quantity | Unit, Price each | ... (beats the stacked-table rule) */
  html:root table.line-editor td.amount { grid-column: 1; align-self: center; text-align: left; font-weight: 600; }
  html:root table.line-editor td.amount::before { display: inline; margin: 0 8px 0 0; }
  html:root table.line-editor td.le-remove { grid-column: 2; justify-self: end; align-self: center; }
  html:root table.line-editor input { width: 100%; }
}
.price-row { display: grid; grid-template-columns: 1fr 130px 130px auto; gap: 10px; align-items: start; padding: 12px 0; border-bottom: 1px solid #edf0f5; }
.price-row:last-child { border-bottom: 0; }
.pr-name { display: grid; gap: 6px; }
.pr-price, .pr-unit { display: flex; align-items: center; gap: 6px; }
.pr-actions { display: flex; gap: 6px; }
@media (max-width: 720px) { .price-row { grid-template-columns: 1fr 1fr; } .pr-name { grid-column: 1 / -1; } }
.status-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.accept-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border: 2px solid var(--accent); }
.paper { padding: 40px; }
@media (max-width: 720px) { .paper { padding: 20px; } }
.invoice { font-size: var(--fs-md, .92rem); color: var(--text, #1b2433); }   /* follows the theme: dark text on a dark panel at night was unreadable (17 Nov 2026) */
.invoice .pre { white-space: pre-line; }
.invoice .label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.inv-title { display: flex; align-items: center; gap: 14px; margin: 24px 0 2px; }
.inv-title h2 { margin: 0; font-size: 1.6rem; font-weight: 650; letter-spacing: -.01em; color: var(--text); }
.inv-lead { margin: 0 0 22px; font-size: var(--fs-base, 1rem); color: var(--muted); font-variant-numeric: tabular-nums; }
.inv-lead b { color: var(--text); font-size: var(--fs-xl, 1.32rem); font-weight: 650; letter-spacing: -.01em; margin-right: 2px; }
.inv-lead:empty { display: none; }
.stamp { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: var(--fs-md, .92rem); }   /* a dot and a word, like every other status (17 Nov 2026) */
.stamp::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stamp-ok { color: var(--ok-text); } .stamp-bad { color: var(--bad-text); }
.inv-meta { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 18px; }
.inv-facts th { text-transform: none; letter-spacing: 0; font-size: var(--fs-sm, .85rem); padding: 3px 14px 3px 0; border: 0; color: var(--muted); font-weight: 500; }
.inv-facts td { padding: 3px 0; border: 0; text-align: right; font-weight: 600; }
.inv-subject { padding: 0 0 10px; margin: 6px 0 0; border-bottom: 1px solid var(--border); }
.inv-lines { margin-top: 10px; }
.inv-lines th { background: none; color: var(--muted); padding: 10px 10px 8px; font-weight: 500; border-bottom: 1px solid var(--border-strong, var(--border)); }
.inv-lines td { font-variant-numeric: tabular-nums; }
.inv-lines :is(th, td):first-child { padding-left: 0; } .inv-lines :is(th, td):last-child { padding-right: 0; }
.inv-totals { width: auto; min-width: 280px; margin: 14px 0 0 auto; }
.inv-totals th { text-align: left; text-transform: none; letter-spacing: 0; font-size: var(--fs-md, .92rem); color: var(--muted); font-weight: 500; border: 0; padding: 5px 20px 5px 0; }
.inv-totals td { text-align: right; border: 0; padding: 5px 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv-totals .grand th, .inv-totals .grand td { border-top: 1px solid var(--text); font-size: var(--fs-lg, 1.15rem); font-weight: 650; color: var(--text); padding-top: 10px; }
.inv-box { margin-top: 24px; border: 1px solid var(--border); border-radius: var(--radius, 12px); padding: 14px 16px; }
.inv-notes { margin-top: 18px; font-size: var(--fs-sm, .85rem); color: var(--muted); }

@media print {
  .topbar, .footer, .flashes, .no-print { display: none !important; }
  body { background: #fff; }
  .page { padding: 0; }
  .wrap { max-width: none; padding: 0; }
  .layout-side { display: block; }
  .panel.paper { border: 0; box-shadow: none; padding: 0; margin: 0; }
  .inv-lines th, .inv-box { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: 16mm; }
}

/* operations tabs */
.ops-tabs { display: flex; align-items: center; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ops-tabs .ops-label { font-size: var(--fs-xs, .78rem); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-right: 10px; }
.ops-tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.ops-tabs a:hover { color: var(--navy); }
.ops-tabs a.on { color: var(--navy); border-bottom-color: var(--accent); }

/* document viewer */
.viewer-head { align-items: flex-end; }
.viewer-title { overflow-wrap: anywhere; }
.viewer-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn.disabled { opacity: .4; pointer-events: none; }
.viewer { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.viewer iframe { display: block; width: 100%; height: calc(100vh - 230px); min-height: 520px; border: 0; background: #525659; }
.viewer-media { background: #1b2433; display: grid; place-items: center; padding: 16px; min-height: 420px; }
.viewer-media img, .viewer-media video { max-width: 100%; max-height: calc(100vh - 260px); display: block; border-radius: var(--radius-sm, 8px); }
.viewer-none { text-align: center; padding: 60px 20px; }
.fi-big { width: 72px; height: 88px; margin: 0 auto 14px; border-radius: var(--radius-sm, 8px); background: var(--accent-soft); color: var(--accent-dark); display: grid; place-items: center; font-weight: 800; }
.viewer-hint { margin-top: 8px; }
@media (max-width: 720px) { .viewer iframe { height: 70vh; min-height: 0; } }
@media print { .ops-tabs { display: none !important; } }

/* email */
.checks-inline { display: grid; gap: 10px; }
.checks-inline label, .check-row { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin: 0 0 12px; }
.checks-inline input, .check-row input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }   /* one box size: 20px, 24px on touch (modern.css form controls) */
.btn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-pair.btn-trio { grid-template-columns: 1fr 1fr 1fr; }  /* View PDF, Download PDF, Print (_pdf_actions.html, w-3) */
@media (max-width: 420px) { .btn-pair.btn-trio { grid-template-columns: 1fr 1fr; } .btn-pair.btn-trio > :first-child { grid-column: 1 / -1; } }
.cp-pdfbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* portfolio */
.page-hero { background: radial-gradient(900px 400px at 85% -20%, rgba(22,155,98,.5) 0%, transparent 60%), linear-gradient(160deg, var(--navy) 0%, #07101e 100%); color: #fff; padding: 64px 0 56px; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: 10px; }
.page-hero .lead { color: #c7d3e6; font-size: var(--fs-lg, 1.15rem); max-width: 640px; margin: 0; }
.page-hero .eyebrow { color: #6fd3a2; }
.back-light { color: #c7d3e6; }
.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.pf-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; }
.pf-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(18,48,77,.14); }
.pf-card[hidden] { display: none; }
.pf-cover { position: relative; aspect-ratio: 16 / 10; background: #dfe7f0; overflow: hidden; }
.pf-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.pf-card:hover .pf-cover img { transform: scale(1.04); }
.pf-cover-empty { width: 100%; height: 100%; display: grid; place-items: center; color: var(--navy); opacity: .35; }
.pf-cover-empty .logo, .pf-cover-empty .logo-img { width: 64px; height: auto; }
.pf-cat { position: absolute; left: 12px; top: 12px; background: rgba(18,48,77,.85); color: #fff; font-size: var(--fs-xs, .78rem); font-weight: 600; padding: 4px 10px; border-radius: var(--radius-pill, 999px); backdrop-filter: blur(4px); }
.pf-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pf-body h3 { margin: 0; }
.pf-body p { margin: 0; }
.pf-summary { color: var(--muted); font-size: var(--fs-md, .92rem); margin-top: 6px !important; }
.pf-counts { display: flex; gap: 12px; flex-wrap: wrap; margin-top: auto; padding-top: 12px; font-size: var(--fs-xs, .78rem); color: var(--muted); }
.pf-intro { max-width: 760px; margin-bottom: 40px; }
.pf-lede { font-size: var(--fs-lg, 1.15rem); line-height: 1.55; }
.pf-text p { color: #3b4a5e; }
.pf-h { margin: 40px 0 16px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.g-item { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-sm, 8px); background: #dfe7f0; }
.g-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.g-item:hover img { transform: scale(1.05); }
.g-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 8px; color: #fff; font-size: var(--fs-sm, .85rem); background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 20px; }
@media (max-width: 520px) { .videos { grid-template-columns: 1fr; } }
.video { margin: 0; }
.video figcaption { margin-top: 8px; color: var(--muted); font-size: var(--fs-md, .92rem); }
.ratio { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius-sm, 8px); overflow: hidden; }
.ratio iframe, .ratio video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.reports { display: grid; gap: 10px; max-width: 760px; }
.report { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); padding: 12px 14px; }
.report-icon { width: 42px; height: 50px; border-radius: var(--radius-sm, 8px); background: #fdecec; color: var(--bad-text); display: grid; place-items: center; font-size: .72rem; font-weight: 800; flex: none; }
.report-meta { flex: 1; min-width: 0; }
.report-meta b { display: block; overflow-wrap: anywhere; }
.pf-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.pf-nav a { font-weight: 600; text-decoration: none; }
.cta-band { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta-band h2 { margin-bottom: 4px; }
.cta-band p { margin: 0; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(5,12,22,.94); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 92vw; max-height: 88vh; text-align: center; }
.lightbox img { max-width: 92vw; max-height: 80vh; object-fit: contain; display: block; margin: 0 auto; border-radius: var(--radius-sm, 8px); }
.lightbox figcaption { color: #c7d3e6; margin-top: 12px; font-size: var(--fs-md, .92rem); }
.lightbox button { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lightbox button:hover { background: rgba(255,255,255,.22); }
.lb-close { top: 16px; right: 16px; } .lb-prev { left: 16px; top: 50%; transform: translateY(-50%); } .lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; top: 28px; left: 24px; color: #9fb2cc; font-size: var(--fs-md, .92rem); }
@media (max-width: 600px) { .lb-prev, .lb-next { top: auto; bottom: 18px; transform: none; } }
/* portfolio admin */
.pf-thumb { width: 72px; height: 48px; object-fit: cover; border-radius: 6px; display: block; }
.pf-thumb-empty { background: var(--bg); border: 1px dashed var(--border); }
.dropzone { border: 2px dashed var(--border); border-radius: var(--radius, 12px); padding: 26px; text-align: center; background: var(--bg); transition: border-color .15s, background .15s; margin-bottom: 12px; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input[type=file] { position: absolute; left: -9999px; }
.dropzone label { cursor: pointer; font-weight: 500; margin: 0 0 10px; display: block; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; } .inline-form + .inline-form { margin-top: 8px; }   /* two rows of one form: a gap between them (the radio log on a phone) */
.inline-form input { flex: 1; min-width: 180px; }
.inline-form .check-row { margin: 0; align-items: center; }
.inline-form .check-row input { flex: none; min-width: 0; }   /* tick boxes in a row of fields stay box-sized */
.pm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.pm-card { position: relative; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); overflow: hidden; background: #fff; }
.pm-card.is-cover { border: 2px solid var(--accent); }
.pm-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.pm-badge { position: absolute; top: 8px; left: 8px; background: var(--accent); color: var(--on-accent, #fff); font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-pill, 999px); }
.pm-setcover { position: absolute; top: 8px; left: 8px; }
.pm-setcover .btn { padding: 4px 9px; font-size: var(--fs-xs, .78rem); opacity: .9; }
.pm-controls { display: flex; gap: 4px; padding: 8px 8px 0; }
.pm-controls .btn { padding: 3px 9px; }
.pm-caption { display: flex; gap: 4px; padding: 8px; }
.pm-caption input { padding: 6px 8px; font-size: var(--fs-sm, .85rem); }
.pm-caption .btn { padding: 4px 9px; font-size: var(--fs-xs, .78rem); }
.pm-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid #edf0f5; }
.pm-row:last-child { border-bottom: 0; }
.pm-row-media { width: 240px; flex: none; }
.pm-row-info { flex: 1; min-width: 0; }
.pm-row-info .pm-controls, .pm-row-info .pm-caption { padding-left: 0; }
@media (max-width: 600px) { .pm-row { flex-direction: column; } .pm-row-media { width: 100%; } }

/* backup */
.sync-status { background: var(--bg); border-radius: var(--radius-sm, 8px); padding: 12px 14px; margin: 12px 0; }
.sync-status.bad { background: #fdecec; color: #8f1f1f; }
.sync-counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 10px 0; }
.sync-counts div { background: var(--bg); border-radius: var(--radius-sm, 8px); padding: 8px 10px; }
.sync-counts b { display: block; font-size: var(--fs-lg, 1.15rem); }
.sync-counts span { font-size: var(--fs-xs, .78rem); color: var(--muted); }
.steps-list { padding-left: 20px; margin: 0 0 16px; }
.steps-list li { margin-bottom: 8px; font-size: var(--fs-md, .92rem); }
/* The shared row list (screen review v-39): no bullets, a fine rule between rows, one link style - for every short list of
   things on a page (related links, what's left to bill, my actions). Was a bulleted list with underlined links. */
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list > li { padding: 8px 0; border-top: 1px solid var(--border); line-height: 1.45; }
.plain-list > li:first-child { border-top: 0; }
html body .plain-list > li > a:not(.btn) { font-weight: 600; text-decoration: none; }
html body .plain-list > li > a:not(.btn):hover { text-decoration: underline; }
.plain-list > li > .mk { margin-left: 4px; }
.plain-list.pl-split > li { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; }   /* what left, its mark right */
.plain-list.pl-split > li > :first-child { min-width: 0; flex: 1 1 14rem; }
.plain-list.pl-split > li > .mk { margin-left: 0; flex: none; }
.row-list-h { font-size: var(--fs-xs, .78rem); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin: 14px 0 2px; }
.row-list-h:first-child { margin-top: 4px; }

/* grouped back-office menu */
.mainnav a.on, .nav-group.on > .nav-top { color: var(--navy) !important; background: var(--accent-soft); }
.nav-group { position: relative; }
.nav-top { display: inline-block; }
.caret { font-size: var(--fs-xs, .78rem); opacity: .85; margin-left: 1px; }
.nav-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 210px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px); box-shadow: 0 12px 30px rgba(18,48,77,.14); padding: 6px; z-index: 60; }
.nav-menu a { display: block; padding: 8px 12px !important; border-radius: var(--radius-sm, 8px); white-space: nowrap; }
.nav-menu a.on { background: var(--accent-soft); color: var(--navy) !important; font-weight: 600; }
@media (min-width: 1181px) {
  .nav-group:hover .nav-menu, .nav-group:focus-within .nav-menu { display: block; }
  .nav-menu { max-height: calc(100vh - 90px); overflow-y: auto; overscroll-behavior: contain; }     /* long menus scroll, never run off the screen */
  .mainnav > .nav-group:last-of-type .nav-menu, .nav-group.nav-right .nav-menu { left: auto; right: 0; }   /* the right-hand menus open leftwards */
  .nav-group::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; }
}
@media (max-width: 1180px) {
  .mainnav { max-height: calc(100vh - 64px); overflow-y: auto; }
  .nav-group .nav-top { display: block; padding: 8px 10px; }
  .nav-menu { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 6px 14px; min-width: 0; }
  .caret { display: none; }
}
.section-tabs-wrap { margin-top: 18px; }
.section-tabs-wrap .ops-tabs { margin-bottom: 0; overflow-x: auto; overflow-y: hidden; flex-wrap: nowrap; scrollbar-width: none; }
.section-tabs-wrap .ops-tabs::-webkit-scrollbar { display: none; }  /* still swipes sideways on phones, no bar */
.section-tabs-wrap .ops-tabs a { white-space: nowrap; }
.section-tabs-wrap + main .page { padding-top: 22px; }

.code-input { font-family: var(--mono); font-size: 1.4rem !important; letter-spacing: .3em; text-align: center; }
.qr { width: 220px; margin: 0 auto 8px; background: #fff; padding: 8px; border-radius: var(--radius-sm, 8px); border: 1px solid var(--border); }
.qr svg { width: 100%; height: auto; display: block; }
code.secret { word-break: break-all; user-select: all; }
.backup-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 16px 0 20px; }
.backup-codes code { font-size: var(--fs-lg, 1.15rem); text-align: center; padding: 8px; background: var(--bg); border-radius: var(--radius-sm, 8px); }

/* operations */
.meter { height: 7px; background: #edf0f5; border-radius: var(--radius-pill, 999px); overflow: hidden; margin-bottom: 3px; }
.meter div { height: 100%; background: var(--ok); }
.meter div.warn { background: var(--warn); } .meter div.bad { background: var(--bad); }
.chip-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-checks label { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-pill, 999px); padding: 6px 12px; font-weight: 500; margin: 0; cursor: pointer; }
.chip-checks input { accent-color: var(--accent); }
details.inline-edit summary { list-style: none; display: inline-flex; }
details.inline-edit summary::-webkit-details-marker { display: none; }
.inline-edit-form { display: grid; gap: 6px; margin-top: 8px; min-width: 220px; text-align: left; }
.inline-edit-form input, .inline-edit-form select { padding: 6px 8px; font-size: var(--fs-sm, .85rem); }
.grid-maint { display: grid; grid-template-columns: 140px 1fr 110px 140px auto; gap: 8px; }
@media (max-width: 900px) { .grid-maint { grid-template-columns: 1fr 1fr; } }
details.panel > summary { list-style: none; cursor: pointer; display: inline-flex; column-gap: 10px; }
details.panel > summary::-webkit-details-marker { display: none; }
/* screen review v-10 (30 Nov 2026): a fold-out says it opens. A folded panel's title carries the house chevron, and a plain
   fold-out line (no class, .small or .fold-line) is a link-coloured line with the chevron instead of the browser's bare
   triangle ("Update", "Add a note", "Owner and slot"). Buttons, the + add panels and the folds with their own sign keep theirs. */
details.panel:not(.add-panel, .collapse-panel, .jt-more, .more, .wc-hand-open) > summary { align-items: center; }
details.panel:not(.add-panel, .collapse-panel, .jt-more, .more, .wc-hand-open) > summary:not(.btn)::after,   /* a button summary (+ Log a Flight) has no chevron (owner q15) */
main details:is(:not([class]), .small, .fold-line) > summary:not(.btn, .cc-hbtn, [class*="btn"])::after {
  content: ""; flex: none; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px); margin-left: 6px; color: var(--muted); transition: transform .15s; }
details.panel:not(.add-panel, .collapse-panel, .jt-more, .more, .wc-hand-open)[open] > summary:not(.btn)::after,
main details:is(:not([class]), .small, .fold-line)[open] > summary:not(.btn, .cc-hbtn, [class*="btn"])::after { transform: rotate(-135deg) translate(-2px, -2px); }
main details:is(:not([class]), .small, .fold-line) > summary:not(.btn, .cc-hbtn, [class*="btn"]) {
  list-style: none; display: inline-flex; align-items: center; gap: 2px; cursor: pointer; color: var(--link); font-weight: 600; min-height: 32px; }
main details:is(:not([class]), .small, .fold-line) > summary:not(.btn, .cc-hbtn, [class*="btn"])::-webkit-details-marker { display: none; }
@media (prefers-reduced-motion: reduce) { details.panel > summary::after, main details > summary::after { transition: none; } }
.link-list { display: flex; flex-wrap: wrap; gap: 8px; }
.link-list span { display: contents; }

/* RAMS & site plan */
.plan-map { height: 460px; border-radius: var(--radius-sm, 8px); border: 1px solid var(--border); margin: 10px 0; z-index: 1; }
@media (max-width: 720px) { .plan-map { height: 340px; } }
.plan-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.plan-tools select, .plan-tools input { width: auto; flex: 1; min-width: 160px; }
.plan-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--fs-xs, .78rem); color: var(--muted); }
.plan-legend i { display: inline-block; width: 10px; height: 10px; border-radius: var(--radius-xs, 2px); margin-right: 5px; vertical-align: -1px; }
.sp-pin span { display: block; width: 18px; height: 18px; border-radius: 50%; border: 3px solid #fff; box-shadow: var(--shadow-2, 0 4px 14px rgba(11,31,58,.14)); }

.risk { text-align: center; border-radius: var(--radius-sm, 8px); min-width: 64px; font-size: var(--fs-xs, .78rem); }
.risk-lo { background: #c9ecd6; } .risk-md { background: #ffe7a8; } .risk-hi { background: #ffc9a3; } .risk-vh { background: #f6b0b0; }
.hz-view td { vertical-align: top; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 20px; }
.kv-grid span { display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.auth-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 12px 0 16px; }
.auth-facts dt { color: var(--muted); }
.auth-facts dd { margin: 0; }
.sticky-actions { position: sticky; bottom: 12px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; z-index: 5; box-shadow: 0 6px 24px rgba(18,48,77,.18); }
.issue-group { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* clients */
.cloud-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cloud-form input[type=text] { flex: 1; min-width: 160px; }
.cloud-form select { width: auto; }
.cloud-row { display: grid; grid-template-columns: 1fr 160px auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #edf0f5; font-size: var(--fs-md, .92rem); }
.cloud-row progress { width: 100%; }
.cloud-row.bad span { color: var(--bad-text); }
.book-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .book-grid { grid-template-columns: 1fr; } }
.quotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.quote { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.quote blockquote { margin: 0; font-size: var(--fs-base, 1rem); line-height: 1.55; flex: 1; }
.stars { color: #f5a623; letter-spacing: 2px; } .stars span { color: #dde3ec; }

.testimonial-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.testimonial-actions .check-row { margin: 0; }
.cal-panel { overflow-x: auto; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(110px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); overflow: hidden; min-width: 780px; }
@media (min-width: 701px) {    /* an iPad upright: seven equal days that fit the panel - Sunday was cut off (screen review v-7, 30 Nov 2026) */
  .cal { grid-template-columns: repeat(7, minmax(0, 1fr)); min-width: 0; }
  .cal > * { min-width: 0; }
}
.cal-h { background: var(--bg); padding: 6px 8px; font-size: var(--fs-xs, .78rem); font-weight: 700; text-transform: uppercase; color: var(--muted); }
.cal-d { background: #fff; min-height: 96px; padding: 6px; display: flex; flex-direction: column; gap: 3px; }
.cal-d.other { background: #fafbfd; } .cal-d.other .cal-n { color: #b3bdc9; }
.cal-d.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-n { font-size: var(--fs-xs, .78rem); font-weight: 700; color: var(--muted); }
.cal-e { display: block; font-size: var(--fs-xs, .78rem); padding: 2px 6px; border-radius: var(--radius-sm, 8px); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
/* a busy day's "+N More" (screen review v-59): a quiet link under the first three chips */
.cal-more { font-size: var(--fs-xs, .78rem); color: var(--muted); padding: 1px 6px; text-decoration: none; font-weight: 600; }
a.cal-more:hover, .cal-more > summary:hover { color: var(--text); text-decoration: underline; }
details.cal-more > summary { cursor: pointer; list-style: none; }
details.cal-more > summary::-webkit-details-marker { display: none; }
details.cal-more[open] { display: flex; flex-direction: column; gap: 3px; padding: 0; }
.cal-e.expiry { background: #fdecec; color: #a32020; } .cal-e.maintenance { background: #fff4dd; color: #8a5a00; }
.report-table tfoot th { border-top: 2px solid var(--navy); color: var(--text); font-size: var(--fs-md, .92rem); text-transform: none; letter-spacing: 0; }

/* website pages */
.prose { max-width: 760px; font-size: var(--fs-base, 1rem); }
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }
.service-hero { display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; }
.price-card { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius, 12px); padding: 18px 26px; text-align: center; }
.price-card span { display: block; color: #c7d3e6; font-size: var(--fs-sm, .85rem); }
.price-card b { font-size: 2rem; }

a.service:hover { border-color: var(--accent); }
.faq-list details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); padding: 14px 18px; margin-bottom: 10px; }
.faq-list summary { cursor: pointer; font-weight: 600; font-size: var(--fs-base, 1rem); }
.faq-list details p { margin: 10px 0 0; color: #3b4a5e; }
.cred-card { display: flex; gap: 16px; align-items: center; }
.cred-card .ico { width: 44px; height: 44px; border-radius: var(--radius, 12px); background: #e5f6ec; color: var(--ok-text); display: grid; place-items: center; flex: none; }
.cred-card .ico svg { width: 24px; height: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; max-width: 520px; font-size: var(--fs-sm, .85rem); }
.footer a { color: #cfd9e8; }

/* emergency */
.mainnav a.nav-emergency { color: var(--on-mk, #fff) !important; background: var(--bad); font-weight: 700; }
.mainnav a.nav-emergency:hover { background: #b02a2a; }
.em-title { color: var(--bad-text); }
.em-info { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.em-info > div { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); padding: 10px 14px; flex: 1; min-width: 220px; }
.em-info span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.em-call { background: var(--bad); color: var(--on-mk, #fff); font-weight: 800; font-size: var(--fs-lg, 1.15rem); border-radius: var(--radius-sm, 8px); padding: 14px 22px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; }
.em-call svg { flex: none; }
/* screen review v-3 (30 Nov 2026): on a phone Call 112 is the whole width, like every card under it */
@media (max-width: 600px) { .em-call { flex: 1 1 100%; } }
.em-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.em-card { display: block; background: #fff; border: 2px solid #f3c4c4; border-radius: var(--radius, 12px); padding: 18px; text-decoration: none; color: var(--text); }
.em-card:hover { background: #fff6f6; }
.em-card b { display: block; font-size: var(--fs-lg, 1.15rem); margin-bottom: 4px; }
.em-card span { color: var(--muted); font-size: var(--fs-md, .92rem); }
.em-steps { list-style: none; counter-reset: s; padding: 0; margin: 18px 0; }
.em-steps li { counter-increment: s; display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-radius: var(--radius, 12px);
  padding: 16px 18px; margin-bottom: 10px; font-size: var(--fs-xl, 1.32rem); line-height: 1.4; font-weight: 600; cursor: pointer; }
.em-steps li::before { content: counter(s); flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--bad); color: var(--on-mk, #fff); display: grid; place-items: center; font-weight: 800; }
.em-steps li.done { opacity: .45; } .em-steps li.done span { text-decoration: line-through; }
.em-steps li.done::before { content: "✓"; background: var(--ok); }
.em-steps li.em-head { counter-increment: none; display: block; background: none; border: 0; padding: 6px 2px 0; margin-bottom: 6px; font-size: var(--fs-md, .92rem); font-weight: 700; color: var(--muted); cursor: default; }
.em-steps li.em-head::before { content: none; }
.em-after { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.em-contacts { padding-left: 18px; font-size: var(--fs-base, 1rem); } .em-contacts li { margin-bottom: 6px; }
/* contracts: the cancellation fee rows (screen review v-19) - two narrow number boxes side by side on every screen */
table.ct-tiers { width: auto; }
table.ct-tiers th { white-space: nowrap; }
table.ct-tiers input { width: 6em; max-width: 100%; }
/* nearest aerodromes (screen review v-75): name, ICAO and distance on one line, the contact under it, Add Number on the right */
.aero-list { list-style: none; padding: 0; margin: 0 0 10px; }
.aero-list > li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.aero-list > li:first-child { border-top: 0; }
.aero-main { flex: 1 1 220px; min-width: 0; }
.aero-name, .aero-contact { display: block; }
.aero-contact { margin-top: 2px; overflow-wrap: anywhere; }
.aero-list > li > .btn { flex: none; }
@media (max-width: 640px) { .aero-list > li > .btn { margin-left: 0; } .aero-main { flex-basis: 100%; } }   /* Add Number under the row on a phone */

@media (max-width: 600px) { .em-steps li { font-size: var(--fs-lg, 1.15rem); } }

/* read & sign, permissions */

.perm-row { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #edf0f5; }
.perm-row:last-of-type { border-bottom: 0; }
.perm-row > div { min-width: 0; flex: 1; }

/* full-screen document viewing */
.doc-overlay { position: fixed; inset: 0; z-index: 200; background: #1b2433; display: flex; flex-direction: column; }
.doc-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.doc-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.doc-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.doc-body { flex: 1; min-height: 0; display: flex; }
.doc-body iframe { flex: 1; width: 100%; height: 100%; border: 0; background: #525659; }
.doc-body img { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; }
.viewer.is-max, .viewer:fullscreen { position: fixed; inset: 0; z-index: 200; border-radius: 0; border: 0; margin: 0; background: #1b2433; }
.viewer:-webkit-full-screen { width: 100%; height: 100%; }
.viewer.is-max iframe, .viewer:fullscreen iframe { height: 100vh !important; height: 100dvh !important; min-height: 0; }
.viewer.is-max .viewer-media, .viewer:fullscreen .viewer-media { height: 100vh; height: 100dvh; }
.viewer.is-max .viewer-media img, .viewer:fullscreen .viewer-media img { max-height: 96vh; }
.max-exit { position: fixed; top: 12px; right: 12px; z-index: 201; box-shadow: var(--shadow-2, 0 4px 14px rgba(11,31,58,.14)); }

/* ---- operations tools: airspace, planner, kit, batteries, risk register, audit ---- */
.bad-text { color: var(--bad-text); }
.ok-text { color: var(--ok-text); }
.btn-link { background: none; border: 0; padding: 2px 6px; color: var(--muted); cursor: pointer; font-size: var(--fs-base, 1rem); }
.btn-link:hover { color: var(--bad-text); }
.zone-list { list-style: none; margin: 4px 0 0; padding: 0; }
.zone-list li { padding: 6px 0; border-bottom: 1px solid #edf0f5; font-size: var(--fs-md, .92rem); }
.zone-list li:last-child { border-bottom: 0; }
.job-tools h4 { margin: 14px 0 6px; font-size: var(--fs-xs, .78rem); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tool-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; flex-wrap: wrap; }
.charge-btn { border: 0; background: var(--surface); padding: 4px 9px; font: inherit; font-size: var(--fs-xs, .78rem); cursor: pointer; color: var(--muted); }
.charge-btn + .charge-btn { border-left: 1px solid var(--border); }
.charge-btn.on { color: #fff; font-weight: 600; }
.import-table input, .import-table select { font-size: var(--fs-sm, .85rem); padding: 5px 7px; margin: 2px 0; }
.import-table td { vertical-align: top; }
.import-table tr.dup { background: #fff8e6; }
.kit-table { width: 100%; }
.kit-table .kit-section th { text-align: left; background: var(--bg); font-size: var(--fs-xs, .78rem); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 10px; }
.kit-table input[type=checkbox] { width: 20px; height: 20px; }
.kit-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-weight: 600; }
.kit-progress .meter { flex: 1; }
.list.compact li { padding: 4px 0; font-size: var(--fs-md, .92rem); }
.risk { display: inline-block; padding: 2px 8px; white-space: nowrap; }   /* "8 Medium" on one line (screen review v-36) */
.risk-low { background: #c9ecd6; } .risk-medium { background: #ffe7a8; } .risk-high { background: #ffc9a3; } .risk-very-high { background: #f6b0b0; }
.risk-table td { vertical-align: top; }
/* notification settings: the two switch columns narrow, the names get the rest of the width (screen review v-36) */
.ns-table :is(th, td):not(:first-child) { width: 72px; text-align: center; white-space: nowrap; padding-left: 4px; padding-right: 4px; }
.heatmap { display: grid; grid-template-columns: 22px repeat(5, 1fr); gap: 3px; max-width: 300px; }
.audit-preview { list-style: none; margin: 0; padding: 0; }
.audit-preview li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid #edf0f5; }
.audit-preview li > div { flex: 1; }
.dot { width: 11px; height: 11px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--muted); }
.st-ok .dot { background: var(--ok); } .st-warn .dot { background: var(--warn); } .st-bad .dot { background: var(--bad); } .st-info .dot { background: var(--accent); }
.audit-item { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid #edf0f5; }
.audit-item:last-child { border-bottom: 0; }
.audit-q { display: flex; gap: 10px; }
.audit-a { display: grid; gap: 6px; }
.audit-a input, .audit-a select { font-size: var(--fs-sm, .85rem); padding: 6px 8px; }
@media (max-width: 760px) { .audit-item { grid-template-columns: 1fr; } }
.planner-results { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.sun-strip { height: 14px; border-radius: 7px; margin: 6px 0 2px; background: var(--bg); }
@media print {
  .audit-a input, .audit-a select { border: 0; padding: 0; appearance: none; }
  .kit-table input[type=checkbox] { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .hm-cell, .risk, .sun-strip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
[hidden] { display: none !important; }
a.menu-emergency, .ops-tabs a.menu-emergency { color: var(--bad-text) !important; font-weight: 700; }
.nav-section { display: block; padding: 10px 12px 4px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.nav-section:first-child { padding-top: 4px; }
.nav-section + a { margin-top: 0; }
.nav-menu a + .nav-section { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }
.archive-note { background: var(--accent-soft); }
.mode-switch { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 2px; margin: 0 6px; background: var(--bg); }
.mode-switch button { border: 0; background: none; font: inherit; font-size: var(--fs-sm, .85rem); font-weight: 600; padding: 5px 12px; border-radius: var(--radius-pill); cursor: pointer; color: var(--muted); }
.mode-switch button.on { background: var(--accent); color: var(--on-accent, #fff); }
.small-head { font-size: var(--fs-label); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 6px; }
.small-head:first-of-type { margin-top: 4px; }
.wx-day { width: 100%; font-size: var(--fs-sm, .85rem); }
.wx-day td, .wx-day th { padding: 4px 6px; text-align: center; }
.wx-day td.st-ok { background: #d9f2e3; } .wx-day td.st-warn { background: #fff0c7; } .wx-day td.st-bad { background: #f9d0d0; }
@media print { .wx-day td { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.menu-legal { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 6px 12px 2px; font-size: var(--fs-xs, .78rem); }
.menu-legal a { color: var(--muted); text-decoration: none; }
.menu-legal a:hover { text-decoration: underline; }
.menu-logout { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--border); }
.menu-logout button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; font: inherit; font-size: var(--fs-md, .92rem);
  padding: 8px 12px; border-radius: var(--radius-sm, 8px); cursor: pointer; color: var(--bad-text); }
.menu-logout button:hover { background: #fdecec; }
.jsteps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.jstep { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border-radius: var(--radius-sm, 8px); border: 1px solid var(--border); background: var(--surface); }
.jstep-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jstep-body a { text-decoration: none; }
.jstep-body .small { color: var(--muted); line-height: 1.3; }
.jstep-body form { margin: 4px 0 0; }
.jstep-body .jstep-skip { font-weight: 500; }
.jstep-body .btn-link { padding: 0; font-size: var(--fs-xs, .78rem); color: var(--accent); }
.jstep-dot { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-xs, .78rem); font-weight: 700;
  background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.jstep.st-done { background: #f0faf4; border-color: #c4e8d2; } .jstep.st-done .jstep-dot { background: var(--ok); color: var(--on-mk, #fff); border-color: var(--ok); }
.jstep.st-partial .jstep-dot { background: #fff3d6; color: var(--warn-text); border-color: #f1d18a; }
.jstep.st-skipped { opacity: .6; }
.jstep.current { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.jstep.current .jstep-dot { background: var(--accent); color: var(--on-accent, #fff); border-color: var(--accent); }
@media print { .jstep { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .jstep-body form { display: none; } }
.add-project { display: grid; gap: 6px; margin-bottom: 4px; }
.add-project label[for] { margin: 0; }

/* ---------- phones & tablets: compact menu ---------- */
.mode-switch-mobile { display: none; }
@media (max-width: 1180px) {
  .topbar-inner { min-height: 56px; gap: 10px; }
  .mainnav { top: 56px; max-height: calc(100vh - 56px); flex-wrap: nowrap; gap: 0; padding: 6px 12px 12px; }
  .mainnav a:not(.btn) { padding: 9px 10px; font-size: var(--fs-md, .92rem); }
  .nav-group .nav-top { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; font-weight: 600; color: var(--navy); }
  .nav-group .caret { display: inline; opacity: .5; transition: transform .15s; }
  .nav-group.open .caret { transform: rotate(180deg); }
  .nav-menu { display: none; padding: 0 0 4px 10px; border-left: 2px solid var(--border); margin: 0 0 4px 12px; border-radius: 0; }
  .nav-group.open .nav-menu { display: block; }
  .nav-menu a { padding: 7px 10px !important; font-size: var(--fs-md, .92rem); }
  .nav-section { padding: 8px 10px 2px; font-size: .66rem; }
  .nav-menu a + .nav-section { margin-top: 2px; padding-top: 8px; }
  .menu-logout button { padding: 7px 10px; font-size: var(--fs-md, .92rem); }
  .mainnav > a, .mainnav > .nav-group { border-bottom: 1px solid #f0f2f6; }
  .mode-switch-mobile { display: inline-flex; margin: 0 0 0 auto; }
  .mode-switch-mobile button { padding: 4px 10px; font-size: var(--fs-xs, .78rem); }
}

/* ---------- phones: tighter layout ---------- */
@media (max-width: 600px) {
  body { font-size: 15px; }
  .wrap { padding: 0 14px; }
  .brand { font-size: var(--fs-base, 1rem); gap: 8px; }
  .logo { width: 28px; height: 28px; }
  .page { padding-top: 16px; padding-bottom: 32px; }
  .section-tabs-wrap { margin-top: 10px; }
  .section-tabs-wrap + main .page { padding-top: 14px; }
  .ops-tabs a { padding: 8px 10px; font-size: var(--fs-sm, .85rem); }
  .ops-tabs .ops-label { display: none; }
  h1, .page-head h1 { font-size: 1.4rem; }
  h2 { font-size: var(--fs-lg, 1.15rem); }
  h3 { font-size: var(--fs-base, 1rem); }
  .page-head { margin-bottom: 14px; gap: 10px; align-items: flex-start; }
  .page-head > div:last-child:not(:first-child), .page-head > .btn { width: 100%; }
  .page-head .btn { padding: 8px 12px; font-size: var(--fs-md, .92rem); }
  .panel { padding: 14px; margin-bottom: 14px; border-radius: var(--radius-sm, 8px); }
  .panel-head { margin-bottom: 10px; }
  .btn { padding: 9px 14px; }
  .btn-sm { padding: 5px 10px; font-size: var(--fs-sm, .85rem); }
  .stats { gap: 10px; margin-bottom: 14px; }
  .stat { padding: 12px; }
  .stat b { font-size: var(--fs-xl, 1.32rem); }
  .notice, .flash { padding: 10px 12px; font-size: var(--fs-md, .92rem); }
  table { font-size: var(--fs-sm, .85rem); }
  th { padding: 6px 8px; font-size: .7rem; }
  td { padding: 8px; }
  .table-wrap { margin: 0 -14px; padding: 0 14px; }
  .layout-side, .layout-2 { gap: 0; }
  .grid-2, .grid-3 { gap: 0 10px; }
  .field { margin-bottom: 10px; }
  /* 16px stops the iPhone zooming in when a box is tapped */
  input, select, textarea, .import-table input, .import-table select, .audit-a input, .audit-a select { font-size: 16px !important; }
  input[type=text], input[type=email], input[type=password], input[type=date], input[type=url], input[type=tel],
  input[type=number], input[type=search], input[type=time], input[type=datetime-local], input:not([type]), select, textarea { padding: 9px 10px; }
  .jsteps { grid-template-columns: 1fr 1fr; gap: 6px; }
  .jstep { padding: 7px; gap: 6px; }
  .jstep-dot { width: 20px; height: 20px; font-size: .7rem; }
  .jstep-body b { font-size: var(--fs-sm, .85rem); }
  .jstep-body .small { font-size: var(--fs-xs, .78rem); }
  .sync-counts, .planner-results { grid-template-columns: 1fr 1fr; gap: 6px; }
  .sync-counts b { font-size: var(--fs-base, 1rem); }
  .plan-map { height: 300px; }
  .file { flex-wrap: wrap; gap: 8px; }
  .chip-checks { gap: 6px; }
  .list li { padding: 9px 0; }
  .footer { font-size: var(--fs-sm, .85rem); }
}
@media (max-width: 700px) {
  .table-wrap:has(> table.stack) { margin: 0; padding: 0; overflow: visible; }
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); padding: 8px 10px; margin-bottom: 8px; background: var(--surface); }
  table.stack td { border: 0; padding: 3px 0; display: flex; gap: 12px; justify-content: space-between; align-items: baseline; text-align: right; }
  table.stack td::before { content: attr(data-label); flex: none; max-width: 42%; text-align: left; font-size: .68rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
  table.stack td:first-child { display: block; text-align: left; padding-bottom: 6px; margin-bottom: 3px; border-bottom: 1px solid #f0f2f6; }
  table.stack td:first-child::before, table.stack td[data-label=""]::before, table.stack td:not([data-label])::before { display: none; }
  table.stack td:empty { display: none; }
  table.stack td.actions { justify-content: flex-end; flex-wrap: wrap; }
  table.stack td.empty { display: block; text-align: center; }
  table.stack tr:has(td.empty) { border: 0; background: none; }
}
@media (max-width: 600px) {
  .hero { padding: 28px 0 40px; }
  .hero-art { max-width: 150px; }
  .nav-group .caret { font-size: var(--fs-xs, .78rem); }
}
.wx-mini-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- project page tabs ---------- */
.ptabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 0 0 18px; overflow-x: auto; scrollbar-width: none; }
.ptabs::-webkit-scrollbar { display: none; }
.ptabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.ptabs a:hover { color: var(--navy); }
.ptabs a.on { color: var(--navy); border-bottom-color: var(--accent); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--bg); border-radius: var(--radius-sm, 8px); margin-bottom: 14px; }
.seg button { border: 0; background: none; font: inherit; font-size: var(--fs-sm, .85rem); font-weight: 600; color: var(--muted); padding: 7px 12px; border-radius: var(--radius-sm, 8px); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--navy); box-shadow: 0 1px 3px rgba(18,48,77,.12); }
.glance { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; margin: 0 0 14px; font-size: var(--fs-md, .92rem); }
.glance dt { color: var(--muted); font-size: var(--fs-xs, .78rem); text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.glance dd { margin: 0; overflow-wrap: anywhere; }
.quick-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.danger-row { display: flex; justify-content: flex-end; margin-top: 4px; }
@media (max-width: 600px) {
  .ptabs { margin-bottom: 12px; }
  .ptabs a { padding: 8px 10px; font-size: var(--fs-md, .92rem); }
  .glance { grid-template-columns: 96px 1fr; }
  .seg { display: flex; }
  .seg button { flex: 1 1 auto; font-size: var(--fs-sm, .85rem); padding: 6px 8px; }
}
@media print { .ptab[hidden] { display: block !important; } }
.file-kind { margin: 14px 0 2px; font-size: var(--fs-xs, .78rem); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.panel-head + .file-kind { margin-top: 0; }
@media (max-width: 600px) {
  .file-table tr, .file-table td { display: block; width: 100%; }
  .file-table tr { padding: 8px 0; border-bottom: 1px solid #edf0f5; }
  .file-table tr:last-child { border-bottom: 0; }
  .file-table td { padding: 2px 0; border: 0; }
  .file-table td.actions { text-align: left; white-space: normal; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
  td.actions { white-space: normal; }
}
@media (max-width: 700px) { table.stack .badge { white-space: normal; } }

/* =====================================================================
   Night mode: dark, dimmed colours for low light (toggle in the top bar)
   ===================================================================== */
html[data-theme="night"] {
  color-scheme: dark;
  --navy: #c3d3e3; --navy-2: #9fbcd7;           /* used for headings, links and icons */
  --brand-green: #2fae75; --link: #6fd3a2; --link-hover: #9be3bf; --accent: #1c7a50; --accent-dark: #6fd3a2; --accent-soft: #11261c;
  --bg: #1c1c1e; --surface: #121820; --text: #c4ccd6; --muted: #8b98a8; --border: #243040;
  --ok: var(--mk-ok, #4fb37a); --warn: var(--mk-warn, #e3a33b); --bad: var(--mk-bad, #f27d76);
  --shadow: 0 1px 2px rgba(0,0,0,.4);
  --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 4px 14px rgba(0,0,0,.45); --shadow-3: 0 12px 32px rgba(0,0,0,.55);
  --surface-2: #17202a; --text-2: #a9b5c2; --ring: 0 0 0 3px rgba(111,211,162,.3);
}
html[data-theme="night"] :is(input, select, textarea):hover:not(:focus):not(:disabled), html[data-theme="night"] .btn-outline:hover { border-color: #58585c; }
html[data-theme="night"] ::placeholder { color: #9aa0a6; opacity: 1; }
html[data-theme="night"] body { background: var(--bg); }
/* backgrounds that used the dark navy colour */
/* v-42: a plain .btn is the accent at night too (flat grey read as switched off) */
html[data-theme="night"] .btn:not(:is(.btn-outline, .btn-danger, .btn-link, .btn-ghost)) { background: var(--accent); color: var(--on-accent, #fff); }
html[data-theme="night"] .btn:not(:is(.btn-outline, .btn-danger, .btn-link, .btn-ghost)):hover { background: #239160; }
html[data-theme="night"] .btn-accent { background: var(--accent); color: var(--on-accent, #fff); }
html[data-theme="night"] .btn-accent:hover { background: #239160; }
html[data-theme="night"] .footer, html[data-theme="night"] .contact-card { background: #242426; color: var(--text); }
html[data-theme="night"] .hero, html[data-theme="night"] .page-hero { background: linear-gradient(160deg, #242426 0%, #141415 100%); }
html[data-theme="night"] .step::before { background: #3a3a3c; border-color: #3a3a3c; color: #f2f2f2; }
html[data-theme="night"] .mode-switch button.on { background: var(--accent); color: var(--on-accent, #fff); }
/* white panels, menus and form fields */
html[data-theme="night"] :is(.topbar, .mainnav, .nav-menu, .btn-outline, .section-alt, .auth-card, .stat, .tabs a, .notice code,
  .wx-card, .wx-results button, .viewer, .report, .pm-card, .cal-d, .em-info > div, .em-card, .em-steps li, .doc-bar, .jstep, .seg button.on,
  table.stack tr, .charge-btn),
html[data-theme="night"] :is(input[type=text], input[type=email], input[type=password], input[type=date], input[type=url], input[type=tel], input[type=month], input[type=week],
  input[type=number], input[type=search], input[type=time], input[type=datetime-local], input:not([type]), select, textarea) {
  background: var(--surface); color: var(--text); border-color: var(--border);
}
html[data-theme="night"] .topbar { box-shadow: none; }
/* v-22: the chosen pill (Mine / Projects, Quotes / Invoices) is filled light with dark words in night, as it is filled dark in
   light; it sits after the dark-panel group above, which would otherwise make it look like the others */
html[data-theme="night"] body .tabs :is(a.on, a[aria-current="page"]) { background: var(--text, #f2f2f2); border-color: var(--text, #f2f2f2); color: var(--bg, #16181a); }
html[data-theme="night"] .btn-outline:where(:not(.on, .active, [aria-pressed="true"], [aria-checked="true"])):hover { background: #2c2c2e; }
html[data-theme="night"] .btn-danger { background: var(--surface); color: #f08a8a; border-color: #6a2a2a; }
html[data-theme="night"] :is(.btn-danger:hover, .em-card:hover, .menu-logout button:hover) { background: #2a1616; }
/* dividers */
html[data-theme="night"] :is(td, th, .list li, .zone-list li, .audit-preview li, .audit-item, .file-table tr, .kit-table td,
  .mainnav > a, .mainnav > .nav-group, table.stack td:first-child, .menu-logout, .nav-menu a + .nav-section) { border-color: var(--border); }
/* status colours: dark tints with light text */
html[data-theme="night"] .badge { background: #2c2c2e; color: #c7c7cc; }
html[data-theme="night"] :is(.badge-ok, .flash-success, .gonogo.go, .checks li::before, .cred-card .ico) { background: var(--tint-ok); color: var(--ok-text); }   /* Graphite tokens, not the old mint (design picks dark-7) */
html[data-theme="night"] :is(.badge-warn, .gonogo.caution, .cal-e.maintenance) { background: #33270e; color: #e8b75a; }
html[data-theme="night"] :is(.badge-bad, .flash-error, .gonogo.nogo, .cal-e.expiry, .report-icon, .sync-status.bad) { background: #381616; color: #f19090; }
html[data-theme="night"] :is(.flash-info, .flash-message) { background: var(--surface-2); color: var(--text); }
html[data-theme="night"] .badge-accent { background: var(--accent-soft); color: var(--accent-dark); }
html[data-theme="night"] .notice, html[data-theme="night"] .import-table tr.dup { background: #2b230f; color: #e6cd86; border-color: #4a3c16; }
html[data-theme="night"] :is(.file .fi, .progress, .meter, .tracker div::before, .tracker div::after, .wx-mini .chip, .sync-counts div, .seg, .ptab-count) { background: #2c2c2e; }
html[data-theme="night"] :is(.pf-cover, .g-item) { background: #2a2a2c; }
/* v-22: days from the months either side are dimmed in night too (body: beats the dark-panel group that paints every .cal-d) */
html[data-theme="night"] body .cal-d.other { background: var(--bg); }
html[data-theme="night"] body .cal-d.other .cal-n { color: var(--text-3, #6e6e73); }
html[data-theme="night"] body .cal-d.other .cal-e { opacity: .7; }
html[data-theme="night"] body .cal-e.expiry { color: #ffc2bd; }   /* v-22: renewal chips readable on their dark red (about 9:1) */
html[data-theme="night"] .jstep.st-done { background: var(--tint-ok); border-color: var(--tint-ok-b); }
html[data-theme="night"] .jstep.st-partial .jstep-dot { background: #33270e; border-color: #5a4515; }
html[data-theme="night"] :is(.risk-lo, .risk-low, .wx-day td.st-ok) { background: #1c4630; color: #cfeedd; }
html[data-theme="night"] :is(.risk-md, .risk-medium, .wx-day td.st-warn) { background: #4a3a12; color: #f3e2b4; }
html[data-theme="night"] :is(.risk-hi, .risk-high) { background: #553017; color: #f6d6bd; }
html[data-theme="night"] :is(.risk-vh, .risk-very-high, .wx-day td.st-bad) { background: #4d1d1d; color: #f6c9c9; }
html[data-theme="night"] .archive-note { background: var(--accent-soft); }
/* dim maps and photos a little; keep the logo and QR codes on white so they stay readable */
/* map review 4: only street maps dim at night - aerial, orthomosaics, height and thermal layers keep their true colours */
html[data-theme="night"] .leaflet-tile-pane :is(img.leaflet-tile[src*="tile.openstreetmap.org"], .mf-streets img.leaflet-tile) { filter: brightness(.6) contrast(1.1) saturate(.8); }
/* Night dimming is for drawn site graphics only (design picks dark-4, 30 Nov 2026): photos, thermal images, compare sliders
   and logos keep their true colours, as the map layers already do. Add class="dim-night" to a decorative picture to dim it. */
html[data-theme="night"] main img:is(.dim-night, [src$=".svg"]):not(.logo-img, .doc-logo, .qr img, .leaflet-tile, [data-true-colour]) { filter: brightness(.85); }
html[data-theme="night"] .qr { background: #fff; }

/* the day / night button */
.theme-toggle { border: 1px solid var(--border); background: var(--surface); color: var(--navy); width: 34px; height: 34px; border-radius: 50%;
  display: inline-grid; place-items: center; cursor: pointer; font-size: var(--fs-base, 1rem); line-height: 1; flex: none; padding: 0; }
.theme-toggle:hover { background: var(--bg); }
.theme-toggle .ico-sun { display: none; }
html[data-theme="night"] .theme-toggle .ico-sun { display: inline; }
html[data-theme="night"] .theme-toggle .ico-moon { display: none; }
@media (max-width: 1180px) { .theme-toggle { margin-left: auto; } .mode-switch-mobile { margin-left: 6px; } }
@media print { html[data-theme="night"] { color-scheme: light; } }
.theme-toggle { margin-left: auto; }
.topbar-inner > .mainnav { margin-left: 4px; }
@media (max-width: 420px) { .brand span { font-size: var(--fs-md, .92rem); white-space: nowrap; } .topbar-inner { gap: 8px; } .theme-toggle { width: 32px; height: 32px; } }
html[data-theme="night"] :is(.mainnav a:not(.btn), .pf-text p, .faq-list details p) { color: var(--text); }
html[data-theme="night"] .mainnav a.on, html[data-theme="night"] .nav-group.on > .nav-top { color: #f2f2f2 !important; background: var(--accent-soft); }
html[data-theme="night"] .mainnav a.nav-emergency { color: #fff !important; background: #8f2a2a; }

/* ---------- job flow: board, next step, readiness, actions ---------- */
.seg-link { padding: 7px 12px; border-radius: var(--radius-sm, 8px); font-size: var(--fs-sm, .85rem); font-weight: 600; color: var(--muted); text-decoration: none; }
.seg-link.on { background: var(--surface); color: var(--navy); box-shadow: 0 1px 3px rgba(18,48,77,.12); }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.board-col { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius, 12px); padding: 10px; min-height: 120px; }
.board-col header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; gap: 6px; }
.board-card { display: flex; flex-direction: column; gap: 3px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px); padding: 9px 10px; margin-bottom: 8px; text-decoration: none; color: var(--text); }
.board-card:hover { border-color: var(--accent); }


.board-next { color: var(--navy-2); font-weight: 600; }
.board-empty { margin: 6px 2px; }
@media (max-width: 600px) { .board { grid-auto-columns: 80%; } }
/* the sales pipeline's six columns: on a computer all six fit the page (Lost was cut mid-word); on an iPad three whole
   columns at a time, snapping, with a fade at the edge that has more (formfeel.js cue) (screen review v-15, 30 Nov 2026) */
@media (min-width: 1200px) { .board.pipeline { grid-auto-columns: minmax(0, 1fr); overflow-x: visible; } .board.pipeline > .board-col { min-width: 0; } }
@media (min-width: 701px) and (max-width: 1199px) { .board.pipeline { grid-auto-columns: calc((100% - 24px) / 3); scroll-snap-type: x proximity; } .board.pipeline > .board-col { scroll-snap-align: start; min-width: 0; } }
.next-step { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }

.next-step h2 { margin: 0 0 2px; font-size: var(--fs-lg, 1.15rem); }
.next-step .ns-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.next-step .ns-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
/* End this project (operation-2): a quiet link that opens Mark lost / Cancel project */
.next-step .ns-end { flex-basis: 100%; }
.next-step .ns-end > summary { list-style: none; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); }
.next-step .ns-end > summary::-webkit-details-marker { display: none; }
.next-step .ns-end-body { display: grid; gap: 8px; padding: 8px 0 2px; }
.next-step .ns-end-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.next-step .ns-end-row input, .next-step .ns-end-row select { flex: 1 1 200px; min-height: 44px; }
.next-step form { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0; }
.next-step .ns-also { margin: 6px 0 0; color: var(--muted); }
.next-step .ns-also a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.next-step form input, .next-step form select { width: auto; }
.ready-list { list-style: none; margin: 0; padding: 0; }
.ready-list li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid #edf0f5; font-size: var(--fs-md, .92rem); }
.ready-list li:last-child { border-bottom: 0; }
.ready-list li > div { flex: 1; min-width: 0; }
.ready-list .st-ok .dot, .ready-list li.st-ok .dot { background: var(--ok); }
.ready-badge { font-weight: 700; font-size: var(--fs-xs, .78rem); padding: 3px 10px; border-radius: var(--radius-pill, 999px); }
.ready-badge.st-ok { background: #e5f6ec; color: #0e6a35; } .ready-badge.st-warn { background: #fff4dd; color: #8a5a00; } .ready-badge.st-bad { background: #fdecec; color: #a32020; }
html[data-theme="night"] .ready-badge.st-ok { background: var(--tint-ok); color: var(--ok-text); }
html[data-theme="night"] .ready-badge.st-warn { background: #33270e; color: #e8b75a; }
html[data-theme="night"] .ready-badge.st-bad { background: #381616; color: #f19090; }
html[data-theme="night"] :is(.ready-list li, .board-col) { border-color: var(--border); }
.override-box { border: 1px solid #f3c4c4; background: #fff6f6; border-radius: var(--radius-sm, 8px); padding: 10px 12px; margin: 10px 0; }
html[data-theme="night"] .override-box { background: #2a1616; border-color: #4a2525; }
.overdue-text { color: var(--bad-text); }   /* v-12: an overdue action keeps its title in the normal colour; the Overdue dot + word says it */
.next-step > div, .next-step form { min-width: 0; max-width: 100%; }
.next-step form select, .next-step form input { max-width: 100%; min-width: 0; }
@media (max-width: 600px) { .next-step .ns-actions, .next-step form { width: 100%; } .next-step form select { flex: 1 1 100%; } }

/* ---------- form layout inside panels: boxes never spill out ---------- */
input, select, textarea { min-width: 0; max-width: 100%; }
.panel { container-type: inline-size; }
/* grid spans for a field or block (consistency-6): they stand in for an inline grid-column, so !important; written before the
   narrow-panel rule below so a one-column panel still stacks them */
.span-all { grid-column: 1 / -1 !important; } .span-2 { grid-column: span 2 !important; } .span-3 { grid-column: span 3 !important; }
/* narrow panels (e.g. the side column): one field per row so labels and boxes line up */
@container (max-width: 380px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .grid-2 > *, .grid-3 > * { grid-column: auto !important; }
}
/* medium panels: three across becomes two */
@container (min-width: 381px) and (max-width: 560px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 > [style*="span 3"], .grid-3 > [style*="span 2"] { grid-column: 1 / -1 !important; }
}
.not-required { margin: 4px 0 0; }
.not-required .check-row { font-weight: 600; }
.notam .badge { margin-right: 2px; }
details.inline { display: inline; }
details.inline summary { display: inline; cursor: pointer; color: var(--accent); }

/* =====================================================================
   On/off switches (input type=checkbox class="switch") for settings-type options
   ===================================================================== */
input.switch { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 40px !important; height: 23px !important; margin: 0 !important;
  border-radius: var(--radius-pill); background: #5e6977; border: 0; cursor: pointer; transition: background .18s; vertical-align: middle; }
input.switch::before { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff;
  box-shadow: var(--shadow-1, 0 1px 2px rgba(11,31,58,.08)); transition: transform .18s; }
input.switch:checked { background: var(--accent); }
input.switch:checked::before { transform: translateX(17px); }
input.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input.switch:disabled { opacity: .45; cursor: not-allowed; }
label:has(> input.switch) { align-items: center !important; cursor: pointer; }
.check-row.small input.switch { transform: scale(.85); transform-origin: left center; }
html[data-theme="night"] input.switch { background: #8e8e93; }
html[data-theme="night"] input.switch:checked { background: var(--accent); }
html[data-theme="night"] input.switch::before { background: #ececee; }
@media print { input.switch { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.notice-dismiss { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.notice-dismiss form { margin: 0; flex: none; }
.notice-x { border: 1px solid #e3c771; background: #fff; color: #6b4a00; border-radius: var(--radius-pill, 999px); padding: 4px 12px; font: inherit; font-size: var(--fs-xs, .78rem); font-weight: 600; cursor: pointer; }
.notice-x:hover { background: #fff3cf; }
html[data-theme="night"] .notice-x { background: transparent; color: inherit; border-color: currentColor; }

/* logo: light-lettered version in night mode */
.logo-night { display: none !important; }
html[data-theme="night"] .logo-day { display: none !important; }
html[data-theme="night"] .logo-night { display: block !important; }
/* an organisation's own uploaded logo has no night version: it sits on a light plate at night, like the footer's */
html[data-theme="night"] .brand-logo.org-logo:not(.on-dark) { background: #fff; border-radius: var(--radius-sm, 8px); padding: 3px 7px; box-sizing: content-box; }
html[data-theme="night"] :is(.hero-logo, .footer-logo) { background: var(--surface); box-shadow: 0 0 0 1px var(--border); }

/* =====================================================================
   Standard document header / footer - the same on every PDF, the on-screen
   quote / invoice, and anything printed from the browser
   ===================================================================== */
.doc-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 10px; border-bottom: 1.5px solid #169b62; margin-bottom: 20px; }
.doc-logo { height: 46px; width: auto; display: block; }
.doc-name { font-size: var(--fs-lg, 1.15rem); color: #0e1e38; }
@media screen { html[data-theme=night] .paper .doc-name { color: var(--text); } }   /* design picks dark-2: name readable on the dark paper when there is no logo; print keeps #0e1e38 on white */
.doc-title { font-size: var(--fs-sm, .85rem); color: #5d6b7e; text-align: right; }
.doc-foot { border-top: 1px solid #dde3ec; padding-top: 8px; margin-top: 28px; font-size: .72rem; line-height: 1.6; color: #5d6b7e; }
.doc-foot b { color: #0e1e38; }
html[data-theme=night] .paper :is(.doc-title, .doc-foot) { color: var(--muted); }   /* dd57 a11y-4 */
.invoice .doc-head { margin-bottom: 8px; }
html[data-theme="night"] .paper .doc-logo { background: #fff; border-radius: var(--radius-sm, 8px); padding: 4px 6px; box-sizing: content-box; }

/* on screen the print frame is invisible */
.print-frame, .print-frame > thead, .print-frame > tbody, .print-frame > tfoot, .print-frame > * > tr, .print-frame > * > tr > td { display: block; }
.print-frame { width: auto; border: 0; margin: 0; }
.print-frame > * > tr > td { padding: 0; border: 0; }
.print-frame > thead, .print-frame > tfoot, .print-head, .print-foot { display: none; }

@media print {
  @page { size: A4; margin: 12mm 14mm; }
  .print-frame { display: table; width: 100%; border-collapse: collapse; }
  .print-frame > thead { display: table-header-group; }
  .print-frame > tbody { display: table-row-group; }
  .print-frame > tfoot { display: table-footer-group; }
  .print-frame > * > tr { display: table-row; }
  .print-frame > * > tr > td { display: table-cell; }
  .print-space-top { height: 24mm; }
  .print-space-bottom { height: 16mm; }
  .print-head, .print-foot { display: block; position: fixed; left: 0; right: 0; background: #fff; }
  .print-head { top: 0; }
  .print-head .doc-head { margin: 0; }
  .print-foot { bottom: 0; }
  .print-foot .doc-foot { margin: 0; }
  .paper .doc-head, .paper .doc-foot { display: none; }   /* the page-level ones are used instead */
  .doc-head, .doc-foot { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Weather & airspace page: location bar, verdict strip, tabs + decision column ---------- */
.wx-bar .wx-find { gap: 8px; }
.wx-bar .wx-find select { width: auto; max-width: 100%; }
.wx-bar .wx-job { flex: 0 1 260px; }
.wx-bar .wx-address { flex: 1 1 260px; }
.wx-bar .disclose { margin-top: 8px; }
.wx-verdict .now { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.wx-verdict .now div { padding: 9px 11px; }
.wx-verdict .now b { font-size: var(--fs-lg, 1.15rem); }
.wx-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.wx-side { position: sticky; top: 84px; }
.wx-record .chip-checks { margin-top: 10px; }
.wx-main .ptabs { margin-bottom: 14px; }
@media (max-width: 960px) {
  .wx-layout { grid-template-columns: 1fr; gap: 0; }
  .wx-side { position: static; }
  .wx-bar .wx-job, .wx-bar .wx-address { flex: 1 1 100%; }
}
@media print { .wx-main .ptab[hidden] { display: block !important; } .wx-side { position: static; } }
.record-for { margin-top: 10px; }
.record-for summary { font-size: var(--fs-sm, .85rem); }
.record-form { margin-top: 10px; padding: 12px; border: 1px dashed var(--border); border-radius: var(--radius-sm, 8px); }
/* weather page on phones: a drop-down instead of the tab strip, tighter tiles, and a jump to the Record panel */
.wx-tab-pick { display: none; }
.wx-viewsw { display: none; }
@media (max-width: 700px) {   /* Forecast | Forecast Models on phones, where the Weather row's tabs don't show */
  .wx-viewsw { display: flex; margin: 0 0 14px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); overflow: hidden; }
  .wx-viewsw a { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 8px; text-decoration: none;
                 font-weight: 600; color: var(--muted); background: var(--card, var(--bg)); }
  .wx-viewsw a + a { border-left: 1px solid var(--border); }
  .wx-viewsw a.on { color: var(--text); background: var(--accent-soft, rgba(46, 125, 84, .12)); box-shadow: inset 0 -2px 0 var(--accent); }
}
@media (max-width: 700px) {
  .wx-main .ptabs { display: none; }
  .wx-tab-pick { display: flex; gap: 8px; align-items: center; margin: 4px 0 12px; position: sticky; top: calc(var(--bar-h, 56px) + 2px); z-index: 5;
                 background: var(--bg); padding: 6px 0; }
  .wx-tab-pick select { flex: 1; font-weight: 600; }
  .wx-tab-pick .wx-jump { flex: none; white-space: nowrap; }
  .wx-verdict .now { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .wx-verdict .now div { padding: 7px 8px; }
  .wx-verdict .now b { font-size: var(--fs-base, 1rem); }
  .wx-verdict .now span { font-size: .64rem; }
  .wx-verdict .panel-head { flex-wrap: wrap; gap: 6px; }
  .wx-bar .wx-find > * { flex: 1 1 100%; }
  .wx-bar #wx-gps { flex: 1 1 auto; }
  .wx-record { scroll-margin-top: 70px; }
  .page-head p.muted { font-size: var(--fs-sm, .85rem); }
}
.role-key { display: grid; gap: 6px; margin-top: 8px; font-size: var(--fs-md, .92rem); color: var(--muted); }
.role-key .badge { margin-right: 6px; }
.access-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; }
.access-item { display: flex; gap: 10px; align-items: flex-start !important; margin: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); font-weight: 500; }
.access-item input.switch { margin-top: 2px !important; }
.access-item span { display: flex; flex-direction: column; min-width: 0; }
.access-item small { color: var(--muted); font-size: var(--fs-xs, .78rem); line-height: 1.35; }
/* team member profile */
.tm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.tm-stats .stat { display: flex; flex-direction: column; gap: 2px; }
.tm-stats .stat > span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.tm-stats .stat b { font-size: var(--fs-lg, 1.15rem); }
.tm-stats .stat small { color: var(--muted); font-size: var(--fs-xs, .78rem); }
.tm-row { padding: 8px 0; border-bottom: 1px solid var(--border); }   /* a token, so night has a quiet line too (screen review v-51) */
.tm-row:last-child { border-bottom: 0; }
.danger-zone summary { cursor: pointer; color: var(--bad-text); }
.danger-zone[open] { border-color: #f0c6c6; }

/* weather tiles shaded by status (dashboard + weather page) */
:root { --tint-ok: #e3f5ea; --tint-ok-b: #b9e3c9; --tint-warn: #fff1d6; --tint-warn-b: #f0d494; --tint-bad: #fde5e5; --tint-bad-b: #f2b8b8; }
html[data-theme="night"] { --tint-ok: #12291c; --tint-ok-b: #1f4a31; --tint-warn: #2d2410; --tint-warn-b: #54421a; --tint-bad: #2e1616; --tint-bad-b: #5a2626; }
:is(.wx-mini .chip, .now > div).st-ok { background: var(--tint-ok); box-shadow: inset 0 0 0 1px var(--tint-ok-b); }
:is(.wx-mini .chip, .now > div).st-warn { background: var(--tint-warn); box-shadow: inset 0 0 0 1px var(--tint-warn-b); }
:is(.wx-mini .chip, .now > div).st-bad { background: var(--tint-bad); box-shadow: inset 0 0 0 1px var(--tint-bad-b); }
:is(.wx-mini .chip, .now > div).st-ok b { color: var(--ok-text); }
:is(.wx-mini .chip, .now > div).st-warn b { color: var(--warn-text); }
:is(.wx-mini .chip, .now > div).st-bad b { color: var(--bad-text); }
:is(.wx-mini .chip, .now > div) .cat { color: #fff; }
.wx-mini .chip small { display: block; font-size: .72rem; color: var(--muted); margin-top: 2px; }
@media print { :is(.wx-mini .chip, .now > div) { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
/* a panel that folds away (e.g. Team > Pilot access) */
details.collapse-panel > summary { list-style: none; cursor: pointer; display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px; }
.collapse-panel > summary::-webkit-details-marker { display: none; }
.collapse-panel > summary > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.collapse-title { font-size: var(--fs-xl, 1.32rem); color: var(--navy); }
.collapse-hint { flex: none; font-size: var(--fs-sm, .85rem); font-weight: 600; color: var(--link); border: 1px solid var(--border); border-radius: var(--radius-pill, 999px); padding: 4px 12px; }
.collapse-hint::after { content: " \25BE"; }
.collapse-panel[open] .collapse-hint::after { content: " \25B4"; }
.collapse-panel[open] > summary { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.collapse-panel > summary > span:first-child { flex: 1; }
.flash-warning { background: #fff4dd; color: #6b4a00; border: 1px solid #f2d999; }
html[data-theme="night"] .flash-warning { background: #2d2410; color: #f0cf86; border-color: #54421a; }
.sched-issues { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: var(--fs-sm, .85rem); }
.sched-issues li { padding: 5px 9px; border-radius: var(--radius-sm, 8px); background: var(--tint-warn); color: #6b4a00; }
.sched-issues li.bad { background: var(--tint-bad); color: #8f1f1f; }
html[data-theme="night"] .sched-issues li { color: #f0cf86; }
html[data-theme="night"] .sched-issues li.bad { color: #f19090; }
.sched-issues li.info { background: transparent; color: var(--muted, #5b6470); padding-left: 0; }   /* gl-124: times that don't clash, a quiet line */
html[data-theme="night"] .sched-issues li.info { color: var(--muted, #a7b0bb); }
/* who's on what */
.res-grid { border-collapse: separate; border-spacing: 2px; font-size: var(--fs-xs, .78rem); min-width: 900px; }
.res-grid th, .res-grid td { padding: 4px 5px; border: 0; vertical-align: top; text-align: center; }
/* the name column is a fixed 200px and the days keep their width: one long maintenance note never eats the fortnight (screen review v-14) */
.res-grid { --res-name: 200px; table-layout: fixed; width: max(100%, calc(var(--res-name) + var(--res-days, 14) * var(--res-day, 60px))); min-width: 0; }
.res-grid > thead > tr > th:first-child, .res-grid > tbody > tr > th { width: var(--res-name); }
.res-grid.res-week { --res-days: 7; }
@media (max-width: 640px) { .res-grid { --res-name: 130px; --res-day: 84px; } }   /* a day wide enough for a word of a project name (v-51)    /* a phone keeps two or three days beside the names */
.res-grid tbody th { text-align: left; white-space: normal; overflow-wrap: anywhere; font-size: var(--fs-sm, .85rem); padding-right: 10px;
  position: sticky; left: 0; z-index: 1; background: var(--surface, var(--card, #fff)); }
.res-grid tbody th .badge { max-width: 100%; white-space: normal; text-align: left; line-height: 1.3; margin-top: 2px; }
html:root .res-grid tbody th .res-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-width: 0; white-space: normal; overflow-wrap: break-word; }
html:root .res-grid tbody th .badge { white-space: normal; }
.res-grid tbody th .badge:has(.res-note) { display: block; width: fit-content; }   /* the note wraps to two lines, never cut mid-word (v-51) */
/* a project in a day cell: its name wraps to up to three lines instead of "Roo..." (v-51) */
html:root .res-grid > tbody > tr > td:not(#_) { padding-left: 4px; padding-right: 4px; }   /* a day cell gives its room to the project name (v-51) */
html:root .res-grid td .sc-chip { display: block; max-width: 100%; padding: 3px 4px; text-align: left; line-height: 1.25; font-size: var(--fs-xs); }
html:root .res-grid td .sc-chip .sc-dot { display: inline-block; vertical-align: middle; margin: -2px 3px 0 0; }
html:root .res-grid td .sc-chip .sc-name { display: inline; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; hyphens: auto; }
.res-grid td > a[title] { display: block; white-space: normal; overflow-wrap: break-word; hyphens: auto; text-align: left; line-height: 1.25; }
.res-grid .res-sec td { position: sticky; left: 0; }
.res-grid thead th { font-size: .72rem; color: var(--muted); text-transform: uppercase; }
.res-grid thead th.today { color: var(--accent); }
.res-grid td { background: var(--bg); border-radius: var(--radius-sm, 8px); height: 34px; min-width: 56px; overflow: hidden; }
.res-grid td.wkend { background: #eceff4; }
.res-grid td a { display: block; text-decoration: none; color: inherit; font-weight: 600; line-height: 1.2; }
.res-grid td.busy { background: var(--tint-ok); box-shadow: inset 0 0 0 1px var(--tint-ok-b); }
.res-grid td.due { background: var(--tint-warn); box-shadow: inset 0 0 0 1px var(--tint-warn-b); }
.res-grid td.clash { background: var(--tint-bad); box-shadow: inset 0 0 0 1px var(--tint-bad-b); }
.res-grid td.two { background: var(--tint-warn, color-mix(in srgb, #d98b17 12%, transparent)); box-shadow: inset 0 0 0 1px var(--tint-warn-b, color-mix(in srgb, #d98b17 35%, transparent)); }   /* two projects that day: allowed (19 Nov 2026) */
.res-grid td.two .sc-chip, .res-grid td.clash .sc-chip { margin-bottom: 4px; }
.res-grid .res-sec td { background: none; text-align: left; font-weight: 700; color: var(--navy); padding-top: 10px; height: auto; }
html[data-theme="night"] .res-grid td.wkend { background: var(--bg); }
/* daily ops sheet */
.ops-day { margin: 22px 0 10px; display: flex; align-items: baseline; gap: 10px; }

.ops-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 10px 0; }
.ops-grid > div { background: var(--bg); border-radius: var(--radius-sm, 8px); padding: 7px 10px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ops-grid span { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ops-grid b { font-size: var(--fs-md, .92rem); overflow-wrap: anywhere; }
.ops-grid a, .ops-grid small { font-size: var(--fs-sm, .85rem); }
.ops-wx { margin: 6px 0; }
.ops-wx-sum { margin-bottom: 6px; }
.wx-strip { display: flex; gap: 2px; flex-wrap: wrap; }
.wx-h { font-size: .7rem; font-weight: 600; padding: 3px 0; width: 28px; text-align: center; border-radius: var(--radius-sm, 8px); background: var(--bg); }
.wx-h.st-ok { background: var(--tint-ok); color: var(--ok-text); } .wx-h.st-warn { background: var(--tint-warn); color: var(--warn-text); } .wx-h.st-bad { background: var(--tint-bad); color: var(--bad-text); }
.ops-notams { margin: 8px 0; } .ops-notams ul { margin: 4px 0 0; padding-left: 18px; }
@media print { .ops-job, .wx-h, .ops-grid > div { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .ops-job { break-inside: avoid; } }
/* performance */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px; }
.kpi > span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kpi b { font-size: 1.5rem; }
.kpi small { color: var(--muted); font-size: var(--fs-xs, .78rem); }
.kpi.bad b { color: var(--bad-text); } .kpi.warn b { color: var(--warn-text); }
.kbars { display: grid; gap: 6px; }
.kbar { display: grid; grid-template-columns: 170px 1fr 34px; gap: 8px; align-items: center; font-size: var(--fs-sm, .85rem); }
.kbar i { display: block; height: 10px; border-radius: 5px; background: var(--accent); min-width: 4px; }
.kbar b { text-align: right; }
@media (max-width: 600px) { .kbar { grid-template-columns: 110px 1fr 28px; } }
/* job finances + time log */
.fin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.fin-grid > div { background: var(--bg); border-radius: var(--radius-sm, 8px); padding: 9px 11px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fin-grid span { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.fin-grid b { font-size: var(--fs-lg, 1.15rem); }
.fin-grid small { color: var(--muted); font-size: var(--fs-xs, .78rem); }
.fin-margin { background: var(--tint-ok) !important; } .fin-margin b { color: var(--ok-text); }
.fin-margin.neg { background: var(--tint-bad) !important; } .fin-margin.neg b { color: var(--bad-text); }
.time-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.time-form input[type=date] { width: auto; } .time-form input[type=number] { width: 90px; } .time-form select { width: auto; }
.time-form input[name=note] { flex: 1 1 160px; }
.linkish { background: none; border: 0; color: var(--bad-text); cursor: pointer; font-size: var(--fs-base, 1rem); padding: 0 4px; }
/* project activity timeline */
.note-form { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.note-form select { width: auto; } .note-form input { flex: 1 1 240px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.tl-day { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin: 14px 0 4px; }
.tl { display: flex; gap: 10px; padding: 5px 0 5px 2px; font-size: var(--fs-md, .92rem); border-left: 2px solid var(--border); margin-left: 5px; padding-left: 12px; position: relative; }
.tl-dot { position: absolute; left: -6px; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.tlk-money .tl-dot { background: var(--accent); } .tlk-client .tl-dot { background: var(--brand-green, #169b62); } .tlk-email .tl-dot { background: #6b7a90; }
.tlk-safety .tl-dot { background: var(--warn); } .tlk-flight .tl-dot { background: var(--navy); } .tlk-note .tl-dot { background: #8b5cf6; } .tlk-file .tl-dot { background: #64748b; }
.tl-time { color: var(--muted); font-size: var(--fs-xs, .78rem); margin-right: 6px; font-variant-numeric: tabular-nums; }
.visit-table td { vertical-align: middle; }
.visit-table tr.v-delivered td, .visit-table tr.v-cancelled td { opacity: .7; }
.visit-table .actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.visit-table .actions select { width: auto; padding: 4px 24px 4px 6px; font-size: var(--fs-xs, .78rem); }
/* competency matrix */
.comp-grid { border-collapse: separate; border-spacing: 3px; }
.comp-grid th, .comp-grid td { text-align: center; padding: 6px 8px; border: 0; font-size: var(--fs-sm, .85rem); }
.comp-grid tbody th { text-align: left; white-space: nowrap; }
.comp-grid thead th { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; vertical-align: bottom; }
.comp-grid thead th.ac { color: var(--navy); }
.comp-grid td { border-radius: var(--radius-sm, 8px); background: var(--bg); font-weight: 700; min-width: 70px; }
.comp-grid td.yes { background: var(--tint-ok); color: var(--ok-text); }
.comp-grid td.soon { background: var(--tint-warn); color: var(--warn-text); }
.comp-grid td small { display: block; font-weight: 500; font-size: .7rem; }
.comp-btn { background: none; border: 0; font: inherit; font-weight: 700; color: inherit; cursor: pointer; width: 100%; }
.comp-grid td.no .comp-btn { color: var(--muted); }
@media print { .comp-grid td { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
/* safety indicators */
.spi-table { font-size: var(--fs-sm, .85rem); min-width: 820px; }
.spi-table tbody th { text-align: left; white-space: nowrap; font-weight: 600; }
.spi-table td.cell-ok { background: var(--tint-ok); color: var(--ok-text); font-weight: 700; }
.spi-table td.cell-warn { background: var(--tint-warn); color: var(--warn-text); font-weight: 700; }
.spi-table td.cell-bad { background: var(--tint-bad); color: var(--bad-text); font-weight: 700; }
@media print { .spi-table td { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
/* stock + fleet usage */
.stock-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid #edf0f5; }
/* v-12: a low item is not a pink box; its name carries a red dot + 'Low' (templates/ops/_stock_rows.html) */
.stock-row .mk { margin-left: 8px; font-size: var(--fs-sm, .85rem); font-weight: 600; }
.stock-qty { display: flex; align-items: center; gap: 6px; flex: none; }
.stock-qty form { margin: 0; }
.stock-qty b { min-width: 46px; text-align: center; font-size: var(--fs-lg, 1.15rem); }
/* screen review v-40: the − / + steppers the size of the icon buttons beside them, a finger's size on touch */
html body .stock-qty .stk-step { min-width: 40px; min-height: 40px; padding: 0; justify-content: center; font-size: 1.3rem; font-weight: 600; line-height: 1; }
@media (pointer: coarse) { html body .stock-qty .stk-step { min-width: 44px; min-height: 44px; } }
/* the Standard Kit lists: each item's remove (an x, rowbin undo) on the right of its row */
.list.compact li:has(> form > .btn-icon) { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 2px 0; }
.list.compact li > form { margin: 0; flex: none; }
.usage-table { min-width: 760px; font-size: var(--fs-sm, .85rem); }
/* phone (w-7): cards, without the month columns - the chart above shows the months */
@media (max-width: 700px) { .usage-table { min-width: 0; } html:root table.usage-table .um { display: none; }
  .usage-table.stack tbody th { display: block; padding: 0 0 6px; margin-bottom: 3px; border-bottom: 1px solid var(--border); } }
/* the weekly review's money rows (w-7): the name over its two figures on a phone */
@media (max-width: 700px) { table.ws-money, table.ws-money tbody { display: block; width: 100%; }
  table.ws-money tr { display: grid; grid-template-columns: auto 1fr; gap: 0 12px; padding: 6px 0; border-bottom: 1px solid var(--border); }
  table.ws-money th { grid-column: 1 / -1; text-align: left; padding: 0; border: 0; }
  table.ws-money td { padding: 0; border: 0; } table.ws-money td.num { font-weight: 600; } }
.usage-table tbody th { text-align: left; white-space: nowrap; }
.usage-table td.num { position: relative; }
.ubar { display: block; height: 6px; width: var(--h); background: var(--accent); border-radius: 3px; margin: 0 0 3px auto; min-width: 2px; }
.inv-facts tr.inv-workdate td { color: inherit; }   /* a plain fact, not a green "good" mark (w-51) */
/* formatting toolbar + formatted text */
.rt-bar { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin: 0 0 4px; }
.rt-btn { border: 1px solid var(--border); background: var(--surface); color: var(--navy); border-radius: var(--radius-sm, 8px); padding: 3px 9px; font: inherit; font-size: var(--fs-xs, .78rem); cursor: pointer; line-height: 1.4; }
.rt-btn:hover { background: var(--bg); border-color: var(--accent); }

.rich > :first-child { margin-top: 0; } .rich > :last-child { margin-bottom: 0; }
.rich p { margin: 0 0 .6em; } .rich ul, .rich ol { margin: 0 0 .6em; padding-left: 1.3em; } .rich li { margin: .15em 0; }
.rich h4 { margin: .8em 0 .3em; font-size: var(--fs-base, 1rem); color: var(--navy); }
td.rich ul, td.rich ol { padding-left: 1.1em; }
/* settings as a gear in the top bar (full label in the phone menu) */
.nav-gear .gear { font-size: var(--fs-lg, 1.15rem); line-height: 1; }
.nav-gear .gear-label { display: none; }
@media (max-width: 1180px) { .nav-gear .gear-label { display: inline; } .nav-gear .gear { margin-right: 4px; } }
.att-group { font-size: var(--fs-xs, .78rem); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 4px; }
.att-group:first-of-type { margin-top: 4px; }
.att-list { list-style: none; margin: 0; padding: 0; }
.att-list li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid #edf0f5; font-size: var(--fs-md, .92rem); }
.att-list li:last-child { border-bottom: 0; }
.att-list li .dot { margin-top: 6px; flex: none; }
.att-list li.st-bad a { color: var(--bad-text, var(--bad)); font-weight: 600; }
.att-list li.st-warn a { color: var(--warn-text, #9a5b00); }                 /* amber items read amber, green ones green */
.att-list li.st-ok a { color: var(--ok-text, var(--ok)); }
.att-clear { color: var(--ok-text); font-weight: 600; margin: 4px 0; }
 html[data-theme="night"] .att-list li { border-bottom-color: var(--border); }
/* switches never stretch, whatever the row layout */
input.switch { flex: 0 0 40px !important; min-width: 40px; max-width: 40px; }
.zones-toggle { display: inline-flex !important; gap: 6px; align-items: center; margin: 0; white-space: nowrap; flex: none; }

/* quick search (Ctrl/Cmd+K) */
.search-btn + .theme-toggle { margin-left: 6px !important; }
.qs-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(10, 20, 40, .45); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.qs-overlay[hidden] { display: none; }
.qs { width: 100%; max-width: 640px; background: var(--surface); color: var(--text, inherit); border: 1px solid var(--border); border-radius: var(--radius, 12px); box-shadow: var(--shadow-3, 0 12px 32px rgba(10,16,24,.24)); overflow: hidden; }
.qs-input { width: 100%; border: 0 !important; border-bottom: 1px solid var(--border) !important; border-radius: 0 !important; padding: 16px 18px !important; font-size: var(--fs-base, 1rem); background: transparent; outline: none; box-shadow: none !important; }
.qs-results { list-style: none; margin: 0; padding: 6px; max-height: 55vh; overflow-y: auto; }
.qs-results li { display: grid; grid-template-columns: 92px 1fr; gap: 0 10px; padding: 9px 12px; border-radius: var(--radius-sm, 8px); cursor: pointer; }
.qs-results li.on { background: var(--bg); }
.qs-results li.qs-empty { display: block; cursor: default; color: var(--muted, #6b7280); }
.qs-kind { grid-row: span 2; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #6b7280); padding-top: 3px; }
.qs-title { font-weight: 600; }
.qs-sub { font-size: var(--fs-sm, .85rem); color: var(--muted, #6b7280); }
.qs-sub:empty { display: none; }
.qs-foot { margin: 0; padding: 8px 14px; border-top: 1px solid var(--border); font-size: var(--fs-xs, .78rem); color: var(--muted, #6b7280); }
.qs-foot kbd { border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); padding: 0 5px; font: inherit; margin-right: 2px; }
@media (max-width: 600px) { .qs-overlay { padding-top: 12px; } .qs-foot { display: none; } .qs-results li { grid-template-columns: 1fr; } .qs-kind { grid-row: auto; padding: 0; } }
@media print { .qs-overlay, .search-btn { display: none !important; } }
/* keep red / amber / green status shading when a page is printed */
@media print { * { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* saved (locked) debrief */
.db-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.db-facts span { display: block; font-size: var(--fs-xs, .78rem); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 4px; }
.db-big { font-size: var(--fs-md, .92rem); padding: 4px 12px; }
.db-lock { margin: 14px 0 0; }
.db-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.db-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 12px); padding: 14px 18px; margin-bottom: 16px; }
.db-grid .db-card { margin-bottom: 0; }
.db-card h3 { margin: 0 0 8px; font-size: var(--fs-base, 1rem); }
.db-card .rich > :first-child { margin-top: 0; } .db-card .rich > :last-child { margin-bottom: 0; }

.db-quote .rich { font-style: italic; border-left: 3px solid var(--border); padding-left: 12px; }
.db-note { border-top: 1px solid var(--border); padding: 8px 0; } .db-note p { margin: 0 0 4px; }
@media (max-width: 700px) { .db-grid { grid-template-columns: 1fr; } }

/* pipeline board */
.board-hint { margin: -4px 2px 8px; }
.pipeline .board-card .badge, .pipeline .board-card .mk { align-self: flex-start; margin-top: 3px; }


.pipeline .col-won { background: color-mix(in srgb, var(--ok) 7%, var(--bg)); }
.pipeline .col-lost { background: color-mix(in srgb, var(--bad) 6%, var(--bg)); }

/* ---- app-like layout for staff (Admin / Pilot logins) on phones and touch tablets - iOS and Android ---- */
.app-bar { display: none; }
nav.pbar { display: none !important; }
body:not(.has-app-bar) > .app-bar:not(.tbar) { display: none !important; }   /* phones only: base.html drops has-app-bar at 768px and wider */                      /* a SAR team's phone bar: only on phones (static/css/phone.css) */
@media (max-width: 1024px), (max-width: 1366px) and (pointer: coarse) {
  body.staff .footer { display: none; }                       /* the public website footer isn't needed in the app */
  body.has-app-bar { padding-bottom: calc(var(--app-bar-h, 64px) + env(safe-area-inset-bottom)); }
  .app-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -2px 12px rgba(10, 20, 40, .08);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .app-bar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; border-radius: var(--radius-sm, 8px);
    color: var(--muted); text-decoration: none; font-size: .68rem; font-weight: 600; -webkit-tap-highlight-color: transparent; }
  .app-bar a.on { color: var(--accent-dark, var(--accent)); }
  .app-bar a.on svg { background: var(--accent-soft); border-radius: var(--radius-pill, 999px); padding: 2px 12px; box-sizing: content-box; }
  .app-bar a.app-sos { color: var(--bad-text); }
  body.staff .topbar { padding-top: env(safe-area-inset-top); }
  body.staff .page { padding-top: 14px; }
  body.staff .page-head h1 { font-size: 1.5rem; }
}
@media (display-mode: standalone) { body.staff .footer { display: none; } }

/* tablets: a roomier bar, centred */
@media (min-width: 761px) and (max-width: 1024px), (min-width: 761px) and (max-width: 1366px) and (pointer: coarse) {
  .app-bar { padding-left: max(10%, env(safe-area-inset-left)); padding-right: max(10%, env(safe-area-inset-right)); }
  .app-bar a { font-size: var(--fs-xs, .78rem); flex-direction: row; justify-content: center; gap: 8px; padding: 8px 4px; }
  body.has-app-bar { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
}
/* touch screens (iOS + Android): 16px text in fields stops iOS zooming in; finger-sized buttons */
@media (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px; }
  .btn, .app-bar a, .nav-menu a { min-height: 44px; }
  .theme-toggle { width: 40px; height: 40px; }
  .btn-sm{ min-height: 44px; }   /* 44px on touch screens: site review 18 Nov 2026 (36px small buttons, 36px drop-downs) */
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]), select { min-height: 44px; }
  .notice-x { min-width: 44px; min-height: 44px; }
  input[type=checkbox]:not(.switch), input[type=radio] { width: 24px; height: 24px; }   /* one box size on touch (modern.css form controls) */
  a, button { -webkit-tap-highlight-color: rgba(23, 146, 75, .15); }
}
/* iPhone notch / Android cut-outs when the app is added to the home screen */
@media (display-mode: standalone) {
  body.staff .topbar { padding-top: env(safe-area-inset-top); }
  .topbar-inner { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* ---- flight day ---- */
.fd { max-width: 900px; }
.fd-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 14px; border-radius: var(--radius, 12px); border: 1px solid var(--border);
  background: var(--surface); margin-bottom: 10px; }
/* only no signal stays pinned, and only on a phone (18 Nov 2026: pinned on the deck it covered the page) */
@media (max-width: 760px) { .fd-status.off { position: sticky; top: calc(var(--bar-h, 56px) + 16px); z-index: 20; } }   /* under the measured top bar, taller from the home screen (phone-2) */
.fd-net { display: inline-flex; align-items: center; gap: 7px; }
.fd-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.fd-status.off { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); }
.fd-status.off .fd-dot { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 25%, transparent); }
.fd-queue { margin-left: auto; font: inherit; font-weight: 700; color: var(--warn-text); background: none; border: 0; padding: 0 4px;
  min-height: 44px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.fd-queue.bad { color: var(--bad-text, var(--bad)); }
.fd-pending .btn { margin-top: 6px; min-height: 44px; }
.fd-pending { list-style: none; margin: 0 0 12px; padding: 10px 14px; border: 1px dashed var(--warn); border-radius: var(--radius, 12px); font-size: var(--fs-sm, .85rem); }
.fd-pending li + li { margin-top: 4px; }
.rag-bad-text { color: var(--bad-text); font-weight: 600; }
.fd-jump { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.fd-jump a { flex: none; padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-pill, 999px); background: var(--surface); text-decoration: none; font-size: var(--fs-sm, .85rem); font-weight: 600; color: var(--navy); }
.fd-step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 12px); padding: 16px 18px; margin-bottom: 14px; scroll-margin-top: 140px; }
.fd-step h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--fs-section); margin: 0 0 12px; }
.fd-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-size: var(--fs-sm, .85rem); flex: none; }
html[data-theme="night"] .fd-n { background: #3a3a3c; }
.fd-sub { font-size: var(--fs-sub); margin: 14px 0 6px; }
.fd-ready { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fd-ready li { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 10px; padding: 8px 12px; border-radius: var(--radius-sm, 8px); background: var(--bg); font-size: var(--fs-md, .92rem); }

.fd-wx-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 6px 0 10px; }
.fd-wx-tiles > div { border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); padding: 8px 10px; background: var(--bg); }
.fd-wx-tiles span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.fd-wx-tiles b { font-size: var(--fs-lg, 1.15rem); }
.fd-wx-tiles .rag-ok { background: #e5f6ec; border-color: #bfe6cf; } .fd-wx-tiles .rag-warn { background: #fff4dd; border-color: #f2d899; } .fd-wx-tiles .rag-bad { background: #fdecec; border-color: #f3c2c2; }
html[data-theme="night"] .fd-wx-tiles .rag-ok { background: var(--tint-ok); } html[data-theme="night"] .fd-wx-tiles .rag-warn { background: var(--tint-warn); } html[data-theme="night"] .fd-wx-tiles .rag-bad { background: var(--tint-bad); }
.fd-hours { font-size: var(--fs-sm, .85rem); } .fd-hours th, .fd-hours td { text-align: center; padding: 4px 6px; } .fd-hours td.rag-bad { color: var(--bad-text); font-weight: 700; }
.fd-hours .fd-dir { white-space: nowrap; } .fd-hours .fd-dir i { display: inline-block; font-style: normal; margin-right: 2px; }
.fd-stale { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); border-radius: var(--radius-sm, 8px); padding: 8px 10px; font-weight: 600; font-size: var(--fs-sm, .85rem); }
.fd-notams { margin: 0; padding-left: 18px; font-size: var(--fs-md, .92rem); } .fd-notams li + li { margin-top: 6px; }
.fd-go { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--border); margin-top: 12px; padding-top: 12px; }
.fd-go p { margin: 0; }
.fd-kit { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.fd-kit label { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); background: var(--bg); font-weight: 500; }
.fd-kit input { margin-top: 2px; flex: none; }
.fd-check { border: 1px solid var(--border); border-radius: var(--radius, 12px); padding: 0 14px; margin-bottom: 8px; }
.fd-check summary { cursor: pointer; padding: 12px 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fd-check[open] summary { border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.fd-check form { padding-bottom: 14px; }
.fd-items { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.fd-docs { display: flex; flex-wrap: wrap; gap: 8px; }
.fd-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: var(--fs-md, .92rem); } .fd-list li { padding: 7px 0; border-top: 1px solid var(--border); }
.btn.disabled { opacity: .45; pointer-events: none; }
.fd-toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; transition: .25s;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius-pill, 999px); font-weight: 600; font-size: var(--fs-md, .92rem); z-index: 3000; max-width: 90vw; text-align: center; }
html[data-theme="night"] .fd-toast { background: #3a3a3c; }
.fd-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 760px) { .fd-status { top: calc(var(--bar-h, 56px) + 8px); } .fd-ready li { grid-template-columns: 1fr; gap: 2px; } .fd-step { padding: 14px; } }

/* pipeline + projects board as a scrolling list on phones (no sideways scrolling) */
@media (max-width: 760px) {
  .board { display: block; overflow: visible; }
  .board .board-col { min-height: 0; margin-bottom: 12px; }
  .board .board-col:has(.board-empty) { padding-bottom: 4px; }
  .board .board-col:has(.board-empty) .board-hint { display: none; }
  .board .board-empty { display: none; }
  .board .board-col:has(.board-empty) header { margin-bottom: 4px; }
}
@media (max-width: 1024px) { body.has-app-bar:has(.app-bar .app-sos) .fd-sos { display: none; } }

/* hourly drone forecast: a list on phones, the full table on tablets and up */
.hourly-cards, .hc-key { display: none; }
@media (max-width: 600px) {
  #wx-hourly table.hourly { display: none; }
  .hc-key { display: block; margin: 0 0 8px; }
  .hourly-cards { display: block; list-style: none; margin: 0; padding: 0; }
  .hourly-cards .hc-day { font-weight: 700; font-size: var(--fs-xs, .78rem); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px 2px 6px; }
  .hourly-cards .hc { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 2px 10px; padding: 9px 10px;
    border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); margin-bottom: 6px; background: var(--surface); }

  .hc-time { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
  .hc-time .dot { margin: 0; }
  .hc-wind { font-size: var(--fs-lg, 1.15rem); font-weight: 800; } .hc-wind small { font-size: var(--fs-xs, .78rem); font-weight: 600; color: var(--muted); }
  .hc-dir { font-size: var(--fs-sm, .85rem); color: var(--muted); white-space: nowrap; }
  /* the hour's detail: two tidy lines - wind by height (value first, height after), then the sky (owner, 27 Nov 2026).
     Its own class: .hc-more is helpclamp.js's More button, whose flex rule broke this line up. */
  .hc-detail { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 3px; font-size: var(--fs-sm, .85rem); color: var(--muted); line-height: 1.35; }
  .hc-hts, .hc-sky { display: flex; flex-wrap: wrap; gap: 2px 12px; }
  .hc-hts > span, .hc-sky > span { white-space: nowrap; }
  .hc-hts b { font-size: var(--fs-md, .92rem); font-weight: 800; }
  .hc-sky b { color: var(--text); font-weight: 700; }
  .hc-detail small { font-size: var(--fs-xs, .78rem); }
  .hc-why { color: var(--text); font-weight: 700; }
}

/* job dashboard */
.jd-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 6px; }
.jd-tiles > div { border: 1px solid var(--border); border-radius: var(--radius, 12px); padding: 10px 12px; background: var(--bg); min-width: 0; }
.jd-tiles span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.jd-tiles b { display: block; font-size: 1.45rem; line-height: 1.25; } .jd-tiles b.jd-small { font-size: var(--fs-base, 1rem); padding: 4px 0 2px; }
.jd-tiles small { display: block; color: var(--muted); font-size: var(--fs-xs, .78rem); overflow-wrap: anywhere; }
.jd-tiles .rag-ok { background: #e5f6ec; border-color: #bfe6cf; } .jd-tiles .rag-warn { background: #fff4dd; border-color: #f2d899; } .jd-tiles .rag-bad { background: #fdecec; border-color: #f3c2c2; }
html[data-theme="night"] .jd-tiles .rag-ok { background: var(--tint-ok); } html[data-theme="night"] .jd-tiles .rag-warn { background: var(--tint-warn); } html[data-theme="night"] .jd-tiles .rag-bad { background: var(--tint-bad); }
.jd-sub { margin: 18px 0 8px; font-size: var(--fs-base, 1rem); }
.jd-flights tfoot th { border-top: 2px solid var(--border); }

/* online / offline indicator (top bar) + no-signal strip */
.net-ind { position: relative; text-decoration: none; }
.net-ind[data-waiting]::after { content: attr(data-waiting); position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--warn); color: var(--on-accent, #fff); font: 600 10px/16px system-ui, sans-serif; text-align: center; }   /* entries waiting to send (dd4 field-offline-3) */
.net-dot { position: absolute; right: 3px; bottom: 3px; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); border: 2px solid var(--surface); }
.net-ind[data-state="ok"] .net-dot { background: var(--ok); }
.net-ind[data-state="warn"] .net-dot { background: var(--warn); }
.net-ind[data-state="offline"] .net-dot { background: var(--warn); }
.net-ind[data-state="offline"] { border-color: var(--warn); color: var(--warn-text); }
.net-ind[data-state="syncing"] .net-dot { background: var(--accent); animation: net-pulse 1s ease-in-out infinite alternate; }
@keyframes net-pulse { from { opacity: .35; } to { opacity: 1; } }
.offline-strip { position: sticky; top: calc(var(--bar-h, 56px) + 8px); z-index: 45; background: color-mix(in srgb, var(--warn) 16%, var(--surface)); color: var(--text);
  border-bottom: 1px solid color-mix(in srgb, var(--warn) 45%, var(--border)); text-align: center; font-size: var(--fs-sm, .85rem); font-weight: 600; padding: 5px 12px; }
.offline-strip a { margin-left: 6px; }
@media (display-mode: standalone) { .offline-strip { top: calc(var(--bar-h, calc(56px + env(safe-area-inset-top))) + 8px); } }   /* --bar-h: the measured top bar (appshell.js, design picks phone-2) */

/* On this phone */
.op-state { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.op-state .op-big { font-size: var(--fs-lg, 1.15rem); font-weight: 700; }
.op-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 12px; }
.op-counts div { border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); padding: 8px 12px; background: var(--bg); }
.op-counts span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.op-counts b { font-size: var(--fs-xl, 1.32rem); }
.op-group h2 { font-size: var(--fs-base, 1rem); margin: 0 0 8px; }
.op-list { list-style: none; margin: 0; padding: 0; }
.op-list li { border-top: 1px solid var(--border); }
.op-list a, .op-list .op-na { display: flex; justify-content: space-between; gap: 10px; padding: 10px 2px; text-decoration: none; color: var(--text); }
.op-list a:hover b { text-decoration: underline; }
.op-list small { color: var(--muted); display: block; font-size: var(--fs-xs, .78rem); }
.op-list .op-tag { flex: none; align-self: center; }

/* phones: staff top bar must fit the screen (drone mark instead of the wide logo, compact buttons) */
.brand-mark, html[data-theme="night"] .brand-mark.logo-night { display: none !important; height: 38px; width: auto; flex: none; }
@media (max-width: 520px) {
  body.staff .brand-logo:not(.org-logo), html[data-theme="night"] body.staff .brand-logo.logo-night { display: none !important; }
  .brand-logo.org-logo { height: 30px; max-width: 132px; object-fit: contain; }
  body.staff .brand-mark:not(.logo-night) { display: block !important; }
  html[data-theme="night"] body.staff .brand-mark.logo-day { display: none !important; }
  html[data-theme="night"] body.staff .brand-mark.logo-night { display: block !important; }
  body.staff .topbar-inner { gap: 6px; }
  body.staff .theme-toggle { width: 36px; height: 36px; }
  body.staff .search-btn + .theme-toggle { margin-left: 4px !important; }
  body.staff .mode-switch-mobile { margin-left: 4px !important; }
  body.staff .mode-switch-mobile button { padding: 4px 8px; font-size: var(--fs-xs, .78rem); }
  body.staff .burger { width: 36px; flex: none; }
}
@media (max-width: 360px) { body.staff .mode-switch-mobile button { padding: 3px 6px; font-size: .7rem; } body.staff .theme-toggle { width: 32px; height: 32px; } }
/* phones: the rules badge (also on each job) leaves the top bar, and the menu button can't be squeezed off-screen */
@media (max-width: 600px) {
  
  body.staff .topbar-inner > .burger { flex: none; margin-left: 2px; }
  body.staff .topbar-inner > .brand { flex: 0 1 auto; min-width: 0; }
  body.staff .top-icons > .net-ind { margin-left: auto !important; }
}
/* never scroll sideways on a phone */
@media (max-width: 1024px) { html, body { overflow-x: clip; max-width: 100%; } }

/* day / night + offline: stand-alone top-bar buttons on phones & tablets, inside the settings menu on computers */
.menu-tools { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--border); }
.menu-tools > * { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; font: inherit; font-size: var(--fs-md, .92rem);
  padding: 8px 12px; border-radius: var(--radius-sm, 8px); cursor: pointer; color: var(--text); text-decoration: none; }
.nav-menu .mi { flex: none; width: 16px; display: inline-grid; place-items: center; font-size: var(--fs-base, 1rem); line-height: 1; }   /* one icon column for the bottom rows */
.menu-tools > *:hover { background: var(--bg); }
.menu-tools small { margin-left: auto; color: var(--muted); font-size: var(--fs-xs, .78rem); }
.menu-theme .mt-day, html[data-theme="night"] .menu-theme .mt-night { display: none; }
html[data-theme="night"] .menu-theme .mt-day { display: inline; }
.net-dot-inline { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
[data-net-state="ok"] .net-dot-inline { background: var(--ok); }
[data-net-state="warn"] .net-dot-inline, [data-net-state="offline"] .net-dot-inline { background: var(--warn); }
[data-net-state="syncing"] .net-dot-inline { background: var(--accent); }
@media (min-width: 1025px) {
  body.staff #net-ind, body.staff #theme-toggle { display: none; }
  body.staff .search-btn[data-open-search] { margin-left: auto !important; }
}
/* touch tablets up to 1366px count as mobile: buttons back in the top bar, not in the menu */
@media (max-width: 1024px), (max-width: 1366px) and (pointer: coarse) {
  body.staff #net-ind, body.staff #theme-toggle { display: inline-grid; }
  .menu-tools { display: none; }
}

/* Ready to fly: headings coloured by status (linked or not) - green good, amber caution, red not ready */
:root { --ok-text: #12753c; --warn-text: #9a5b00; --bad-text: #b42424; }
html[data-theme="night"] { --ok-text: #6fd3a2; --warn-text: #e8b75a; --bad-text: #f08080; }
.ready-list li.st-ok > div > b, .ready-list li.st-ok > div > b a, .fd-ready li.rag-ok > b, .fd-ready li.rag-ok > b a { color: var(--ok-text); }
.ready-list li.st-warn > div > b, .ready-list li.st-warn > div > b a, .fd-ready li.rag-warn > b, .fd-ready li.rag-warn > b a { color: var(--warn-text); }
.ready-list li.st-bad > div > b, .ready-list li.st-bad > div > b a, .fd-ready li.rag-bad > b, .fd-ready li.rag-bad > b a { color: var(--bad-text); }

/* site photos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.photo-grid:empty { display: none; }
.photo-card { margin: 0; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); overflow: hidden; background: var(--surface); display: flex; flex-direction: column; }
.photo-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--bg); }
.photo-card figcaption { padding: 6px 8px 8px; display: flex; flex-direction: column; gap: 3px; font-size: var(--fs-sm, .85rem); }
.photo-card .badge { align-self: flex-start; }
.photo-card form { margin: 0; }
.photo-card.pending { opacity: .85; border-style: dashed; border-color: var(--warn); }
.fd-photo-btn { cursor: pointer; }
@media print { .photo-grid { grid-template-columns: repeat(3, 1fr); } }
.seg-radio { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.seg-radio label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin: 0; }
/* tablets (incl. iPad landscape, which is wider than 1024px): offline button starts the right-hand group with the others */
@media (max-width: 1024px), (max-width: 1366px) and (pointer: coarse) {
  body.staff #net-ind { margin-left: auto !important; }
  body.staff .search-btn[data-open-search] { margin-left: 6px !important; }
}
.view-strip { background: #7a1f1f; color: #fff; text-align: center; font-size: var(--fs-sm, .85rem); font-weight: 600; padding: 6px 12px; position: sticky; top: 0; z-index: 60; }
.view-strip .btn { color: #fff; border-color: #fff; margin-left: 8px; padding: 2px 10px; }
.demo-strip { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-bottom: 1px solid var(--border); text-align: center; font-size: var(--fs-sm, .85rem); font-weight: 600; padding: 5px 12px; }

/* ---- airspace map ---- */
body.map-page main .page, body.map-page .print-frame { width: 100%; }
.amap-wrap { position: relative; width: 100%; min-height: 320px; overflow: hidden; }
.amap, .amap.maplibregl-map { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
.amap-tools { position: absolute; top: 10px; left: 10px; z-index: 5; display: flex; flex-direction: column; gap: 6px; width: min(380px, calc(100% - 70px)); }
.amap-search input { width: 100%; box-shadow: var(--shadow-2, 0 4px 14px rgba(11,31,58,.14)); border-radius: var(--radius-sm, 8px); }
.amap-results li { padding: 8px 10px; border-radius: var(--radius-sm, 8px); cursor: pointer; font-size: var(--fs-md, .92rem); }
.amap-results li:hover { background: var(--bg); }
.amap-legend, .amap-save { position: absolute; z-index: 6; left: 10px; top: 104px; width: min(360px, calc(100% - 20px)); max-height: calc(100% - 160px); overflow: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 12px); padding: 12px 14px; box-shadow: var(--shadow-3, 0 12px 32px rgba(10,16,24,.24)); }
.amap-legend h3, .amap-save h3 { margin: 0 0 8px; font-size: var(--fs-base, 1rem); }
.amap-legend ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; font-size: var(--fs-md, .92rem); }
.amap-legend i { display: inline-block; width: 22px; height: 14px; border-radius: var(--radius-xs, 2px); margin-right: 8px; vertical-align: -2px; opacity: .75; }
.amap-legend i.dash { background: none; border: 2px dashed var(--muted); height: 10px; }
.amap-legend i.pin { width: 14px; height: 14px; border-radius: 50% 50% 50% 0; background: var(--navy); transform: rotate(-45deg); opacity: 1; }
.amap-notice { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; background: rgba(255, 248, 225, .96); color: #4a3800;
  border-top: 1px solid #f0d78c; padding: 6px 12px; font-size: var(--fs-xs, .78rem); line-height: 1.4; }
html[data-theme="night"] .amap-notice { background: rgba(51, 39, 14, .96); color: #f2dfae; border-color: #6b5520; }
.amap-notice a { color: inherit; }
.amap-pop { font-size: var(--fs-sm, .85rem); color: var(--text); }
.amap-kv th { text-align: left; color: var(--muted); font-weight: 600; padding: 2px 10px 2px 0; vertical-align: top; white-space: nowrap; }
.amap-kv td { padding: 2px 0; }
.amap-popup .maplibregl-popup-content { border-radius: var(--radius-sm, 8px); max-height: 60vh; overflow: auto; padding: 12px 14px; }
.amap-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.amap-areas li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.linkish-plain { background: none; border: 0; padding: 0; color: var(--link, var(--accent)); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
.linkish-plain.small { font-size: var(--fs-sm, .85rem); }   /* v-11: a small quiet action link keeps the small size (font: inherit would undo it) */
.maplibregl-ctrl-bottom-left { bottom: 36px; }
.maplibregl-ctrl-bottom-right { bottom: 36px; }
@media (max-width: 600px) { .amap-notice { font-size: var(--fs-xs, .78rem); } .amap-legend, .amap-save { top: 100px; } }.amap-wx { position: absolute; z-index: 5; left: 50%; transform: translateX(-50%); bottom: 58px; width: min(420px, calc(100% - 20px));
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 12px); padding: 8px 12px; box-shadow: var(--shadow-2, 0 4px 14px rgba(11,31,58,.14)); }
.amap-wx input[type=range] { width: 100%; margin: 6px 0 0; }
.amap-legend i.arrow { background: none; width: auto; height: auto; transform: rotate(-90deg); font-style: normal; opacity: 1; font-size: var(--fs-base, 1rem); }
@media (max-width: 600px) { .amap-wx { bottom: 64px; } }
/* airspace map: a toolbar of icon buttons on the left; each opens a small flyout beside it, and it can be hidden */
.amap-tools { width: min(380px, calc(100% - 70px)); }
.amap-ico .i { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.amap-ico small { font-size: .64rem; font-weight: 600; letter-spacing: .01em; line-height: 1; color: var(--muted); white-space: nowrap; }
.amap-ico.active small, .amap-ico.open small{ color: var(--accent); }

.amap-fly { position: absolute; z-index: 6; left: 82px; width: 268px; padding: 12px 14px; border-radius: var(--radius, 12px);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow-3, 0 12px 32px rgba(10,16,24,.24)); animation: amap-pop .14s ease-out; }
.amap-fly h4 { margin: 0 0 8px; font-size: var(--fs-xs, .78rem); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.amap-fly p { margin: 8px 0 0; }
@keyframes amap-pop { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.amap-chip { white-space: nowrap; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: var(--radius-pill, 999px);
  padding: 7px 6px; font: inherit; font-size: var(--fs-sm, .85rem); font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.amap-chip:hover { border-color: var(--accent); }
.amap-chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); }
.amap-legend, .amap-save { top: 62px; left: 82px; width: min(370px, calc(100% - 140px)); max-height: calc(100% - 130px);
  border-radius: var(--radius, 12px); box-shadow: var(--shadow-3, 0 12px 32px rgba(10,16,24,.24)); }
.amap-legend .panel-head, .amap-save .panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.amap-legend .panel-head h3, .amap-save .panel-head h3 { margin: 0; }
.amap-legend h3 { margin-top: 12px; }
@media (max-width: 700px) {
  .amap-tools { width: calc(100% - 64px); }
  .amap-legend, .amap-save { top: 62px; left: 10px; width: calc(100% - 20px); max-height: calc(100% - 140px); }
  .amap-fly { left: 80px; width: min(268px, calc(100% - 90px)); }
  .amap-chip { padding: 9px 10px; }
  .amap-wx { width: calc(100% - 20px); }
  .amap-notice { padding: 5px 10px; line-height: 1.35; }
  .maplibregl-ctrl-bottom-left, .maplibregl-ctrl-bottom-right { bottom: 46px; }
}
/* the reference-only notice shrinks to a small tab when tapped */
.amap-notice { cursor: pointer; padding-right: 40px; }
.amap-notice[hidden] { display: none; }
.amap-wrap.notice-small .amap-wx { bottom: 48px; }
.amap-wrap.notice-small .maplibregl-ctrl-bottom-left { bottom: 0; }
/* the box holding the search and controls is wider than they are: let drags on its empty space reach the map */
.amap-tools { pointer-events: none; }
.amap-wrap { overscroll-behavior: contain; }
/* forecast time slider: a shrink button, and a small tab to bring it back */
.amap-wx-hide { position: absolute; top: -3px; right: -4px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent;
  color: var(--muted); cursor: pointer; display: grid; place-items: center; padding: 0; }
.amap-wx-hide:hover { background: var(--bg); color: var(--text); }
.amap-wx-hide .i, .amap-wx-mini .i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.amap-wx-mini { position: absolute; z-index: 5; left: 50%; transform: translateX(-50%); bottom: 58px; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--text); border-radius: var(--radius-pill, 999px); padding: 6px 12px;
  font: inherit; font-size: var(--fs-sm, .85rem); font-weight: 700; cursor: pointer; box-shadow: var(--shadow-2, 0 4px 14px rgba(11,31,58,.14)); }
.amap-wx-mini[hidden] { display: none; }
.amap-wrap.notice-small .amap-wx-mini { bottom: 12px; }
@media (max-width: 700px) {
  /* phones: one slim line - time and slider; the layer details are in the legend */
  .amap-wx { padding: 6px 10px 4px; border-radius: var(--radius, 12px); }
  .amap-wx #amap-wx-info { display: none; }
  .amap-wx input[type=range] { margin-top: 2px; }
  .amap-wx-mini { bottom: 64px; }
}
/* the time slider is see-through (frosted) so it doesn't sit bright over the map */
.amap-wx { background: color-mix(in srgb, var(--surface) 62%, transparent); border-color: color-mix(in srgb, var(--border) 50%, transparent);
  backdrop-filter: blur(8px) saturate(1.2); -webkit-backdrop-filter: blur(8px) saturate(1.2); box-shadow: var(--shadow-2, 0 4px 14px rgba(11,31,58,.14)); }
.amap-wx-mini { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.amap-here-z i { display: inline-block; width: 10px; height: 10px; border-radius: var(--radius-xs, 2px); margin-right: 6px; vertical-align: -1px; }
.amap-popup .maplibregl-popup-content, .amap-legend, .amap-save, .amap-fly { cursor: pointer; }
.amap-save input { cursor: text; }
.amap-popup .maplibregl-popup-content a, .amap-legend a { cursor: pointer; }
/* NOTAMs on the airspace map */
.amap-legend i.notam { border: 2px dashed; height: 10px; opacity: 1; }
.amap-legend i.dot { width: 12px; height: 12px; border-radius: 50%; background: #e08a00; border: 2px solid #fff; box-shadow: 0 0 0 1px #e08a00; opacity: 1; margin-left: 5px; margin-right: 13px; }
.amap-legend i.ad { width: 20px; height: 20px; border-radius: 50%; background: #e08a00; color: #fff; font-style: normal; font-size: .7rem; font-weight: 700;
  display: inline-grid; place-items: center; border: 2px solid #fff; box-shadow: 0 0 0 1px #e08a00; opacity: 1; vertical-align: -5px; }
.amap-notam-text { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--fs-xs, .78rem); line-height: 1.45; background: var(--surface-2);
  border-radius: var(--radius-sm, 8px); padding: 6px 8px; margin: 4px 0 0; max-height: 9.5em; overflow: auto; color: var(--text); word-break: break-word; }
.amap-notam-date input { flex: 1; min-width: 0; padding: 5px 8px; border-radius: var(--radius-sm, 8px); }
@media (max-width: 700px) { .amap-notam-date input { font-size: 16px; } }
.amap-ico small { max-width: 52px; overflow: hidden; text-overflow: ellipsis; }
/* ---- airspace map tools: panel, go / no-go card, measure, clearer site, jobs */
.amap-panel .panel-head h3 { margin: 0; font-size: var(--fs-base, 1rem); }
.amap-form label { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 0; }
.amap-form input[type=range] { flex: 1; }
.amap-form input[type=number] { width: 80px; padding: 4px 8px; }
.amap-form select, .amap-form input:not([type]), .amap-form input[type=text] { flex: 1; min-width: 0; padding: 5px 8px; }
.amap-form p { margin: 0; }
.ck-verdict { display: grid; gap: 1px; border-radius: var(--radius, 12px); padding: 10px 12px; margin: 8px 0; color: #fff; }
.ck-verdict b { font-size: var(--fs-xl, 1.32rem); letter-spacing: .04em; line-height: 1.1; }
.ck-verdict span { font-weight: 600; font-size: var(--fs-md, .92rem); }
.ck-verdict small { font-size: var(--fs-xs, .78rem); }   /* no fading on a flight-safety line (go-live gl-61) */
.ck-verdict.go { background: #15803d; } .ck-verdict.caution { background: #8a5100; }   /* deeper amber: white text 6.4:1 (gl-61) */ .ck-verdict.no-go { background: var(--mk-bad, #c62828); }
.ck-items, .ck-list { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 7px; font-size: var(--fs-sm, .85rem); }
.ck-items i, .ck-list > li > i, .ck-wx i.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: 0; }
.amap-panel details { border-top: 1px solid var(--border); padding: 6px 0; }
.amap-panel summary { cursor: pointer; font-weight: 700; font-size: var(--fs-sm, .85rem); }
.ck-wx { width: 100%; font-size: var(--fs-sm, .85rem); border-collapse: collapse; margin-top: 4px; }
.ck-wx th, .ck-wx td { text-align: left; padding: 2px 4px; border-bottom: 1px solid var(--border); }
.amap-tool .i { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.amap-tool span { display: grid; gap: 1px; } .amap-tool b { font-size: var(--fs-md, .92rem); } .amap-tool small { color: var(--muted); font-size: var(--fs-xs, .78rem); line-height: 1.3; }
.ms-out { font-size: var(--fs-md, .92rem); margin: 6px 0; line-height: 1.6; }
.ms-quote { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 8px; display: grid; gap: 6px; }
.ms-line { display: grid; grid-template-columns: auto 1fr 74px; align-items: center; gap: 6px; font-size: var(--fs-sm, .85rem); margin: 0; }
.ms-line .muted { grid-column: 2 / 4; font-size: var(--fs-xs, .78rem); margin-top: -4px; }
.ms-line input[type=number] { padding: 3px 6px; }
.ms-line:has(#ms-title) { grid-template-columns: auto 1fr; } .ms-line #ms-title { padding: 4px 8px; }
.cl-best { padding-left: 20px; font-size: var(--fs-sm, .85rem); display: grid; gap: 6px; }
  .amap-pos a { color: #fff; font-weight: 700; }
 .amap-checks label { display: flex; gap: 8px; align-items: center; margin: 0; font-weight: 600; }
 .amap-when-row input { flex: 1; min-width: 0; padding: 5px 8px; } .amap-when-row select { padding: 5px 6px; }
.amap-chip.amap-stage { flex: 0 0 auto; border-color: var(--stage); } .amap-chip.amap-stage.on { background: var(--stage); border-color: var(--stage); color: #fff; }
@media (max-width: 700px) {
  .amap-wrap.tool-on .amap-wx, .amap-wrap.tool-on .amap-wx-mini, .amap-wrap.tool-on .amap-notice-mini { display: none; }
   .amap-form select, .amap-form input { font-size: 16px; }
}
.sun-past { background: #fff6e0; color: #6b4b00; border-radius: var(--radius-sm, 8px); padding: 6px 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
html[data-theme="night"] .sun-past { background: #3a2e10; color: #f2dfae; }
.sun-past[hidden] { display: none; }
/* map pop-outs always fit: never taller than the map, scroll inside */
@media (max-width: 700px) {
  .ck-wx { font-size: var(--fs-xs, .78rem); }
  .ms-line { grid-template-columns: auto 1fr 64px; }
}
/* ---- document vault */
.vault-head-links { display: flex; flex-wrap: wrap; gap: 6px; }
.vault-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.vault-filter input[type=search] { flex: 1 1 180px; min-width: 0; }
.vault-withdrawn td { opacity: .55; }
.vault-hash { font-size: .72rem; color: var(--muted); }
.vault-viewas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; padding: 8px 12px; border: 1px dashed var(--mk-warn, #c98200);
  border-radius: var(--radius-sm, 8px); background: color-mix(in srgb, var(--mk-warn, #c98200) 8%, transparent); font-size: var(--fs-sm, .85rem); }
.vault-viewas select { padding: 4px 8px; }
.wm-preview { width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); margin-top: 8px; background: #fff; }
.vault-missions { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.vault-missions li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vault-missions form { margin-left: auto; }
.vault-sync { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: -6px 0 14px; padding: 6px 12px;
  border-radius: var(--radius-sm, 8px); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.vault-sync[hidden] { display: none; }
.vault-log-filter { align-items: center; }
.vault-log-filter select, .vault-log-filter input { padding: 5px 8px; }
.vault-log-filter select { width: auto; flex: 1 1 170px; min-width: 0; }
.vault-log-filter label { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.vault-log-filter input[type=date] { width: auto; }
/* breadcrumbs: the path you took to this page */
.crumbs-wrap { margin-top: 10px; margin-bottom: -14px; position: relative; z-index: 1; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: var(--fs-sm, .85rem); color: var(--muted); }
.crumbs a { color: var(--link, var(--accent)); text-decoration: none; font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs a:hover { text-decoration: underline; }
@media (max-width: 700px) { .crumbs { font-size: var(--fs-xs, .78rem); } .crumbs a { max-width: 150px; } }
.flight-cond { display: inline-block; margin-top: 3px; font-size: var(--fs-xs, .78rem); font-weight: 600; text-decoration: none; padding: 1px 7px; border-radius: var(--radius-pill, 999px); }
.fc-ok { background: color-mix(in srgb, #2e9e5b 14%, transparent); color: #1d6b3d; }
.fc-warn { background: color-mix(in srgb, #e08a00 16%, transparent); color: #8a5300; }
.fc-bad { background: color-mix(in srgb, var(--mk-bad, #c62828) 14%, transparent); color: #a11d1d; }
html[data-theme="night"] .fc-ok { color: #86efac; } html[data-theme="night"] .fc-warn { color: #fcd34d; } html[data-theme="night"] .fc-bad { color: #fca5a5; }
/* Document control list: fits its box - buttons stack, long titles wrap */
#vault-list { width: 100%; }
#vault-list td:first-child { overflow-wrap: anywhere; }
#vault-list td.vault-actions { white-space: nowrap; width: 1%; }
#vault-list td.vault-actions .btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; white-space: nowrap; }   /* Open (eye) and Manage (pencil) side by side, 18 Nov 2026 */
#vault-list td.vault-actions .btn + .btn { margin-left: 4px; }
@media (max-width: 700px) { #vault-list td.vault-actions { width: auto !important; grid-column: 1 / -1; display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 8px; } #vault-list td.vault-actions .btn + .btn { margin: 0; } }
#vault-list .badge { white-space: normal; }

/* Ground school */
.gs-h2 { margin: 18px 0 10px; font-size: var(--fs-base, 1rem); }
.gs-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; margin-bottom: 8px; }
.gs-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); color: inherit; text-decoration: none; }
.gs-card:hover { border-color: var(--accent); }
.gs-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.gs-meter { display: block; height: 6px; background: #edf0f5; border-radius: var(--radius-pill, 999px); overflow: hidden; }
.gs-meter span { display: block; height: 100%; background: var(--ok); }
.gs-status { padding: 10px 14px; border-radius: var(--radius-sm, 8px); margin-bottom: 16px; background: #eef2f8; }
.gs-status.gs-ok { background: #e5f6ec; color: #0e6a35; }
.gs-status.gs-warn { background: #fff4dd; color: #8a5a00; }
.gs-status.gs-bad { background: #fdecec; color: #a32020; }
.gs-lessons { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.gs-lessons li { padding-left: 4px; }
.gs-lessons li .badge { margin-left: 4px; }
.gs-lessons li.done::marker { color: var(--ok-text); }
.gs-read { max-width: 820px; }
.gs-body { font-size: var(--fs-base, 1rem); line-height: 1.6; }
.gs-video { position: relative; aspect-ratio: 16 / 9; margin-bottom: 8px; border-radius: var(--radius); overflow: hidden; background: #000; }
.gs-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gs-doc { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.gs-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin: 18px 0; }
.gs-q { border: 1px solid var(--border); }
.gs-q legend { float: left; width: 100%; padding: 0; margin-bottom: 10px; font-weight: 600; }
.gs-q legend + * { clear: both; }
.gs-choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: 6px 0; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); cursor: pointer; font-weight: 400; }
.gs-choice input { margin-top: 3px; flex: none; width: auto; }
.gs-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

.gs-answers { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.gs-answers li { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); }
.gs-answers li.correct { border-color: var(--ok); }
.gs-answers li.picked:not(.correct) { border-color: var(--mk-bad, #c62828); }
.gs-why { margin: 10px 0 0; }
.gs-result { display: flex; align-items: center; gap: 18px; padding: 18px; border-radius: var(--radius); margin: 8px 0 18px; }
.gs-result h1 { margin: 0 0 4px; }
.gs-result p { margin: 0; }
.gs-result.pass { background: #e5f6ec; color: #0e6a35; }
.gs-result.fail { background: #fff4dd; color: #6b4a00; }
.gs-score { font-size: 2.4rem; line-height: 1; }
.gs-queue { padding: 8px 12px; border-radius: var(--radius-sm, 8px); background: #e5f6ec; color: #0e6a35; margin: 0 0 14px; }
.gs-queue.gs-queue-warn { background: #fff4dd; color: #6b4a00; }
.gs-edit { border-top: 1px solid #edf0f5; padding: 10px 0; }
.gs-edit summary { cursor: pointer; }
.gs-edit[open] summary { margin-bottom: 10px; }
.gs-edit form { margin-bottom: 8px; }
.gs-edit.gs-off summary { opacity: .6; }
.gs-add summary { color: var(--accent-dark); }
.gs-row { display: flex; flex-wrap: wrap; gap: 6px; }
.gs-row form { margin: 0; }
.gs-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 10px; margin: 8px 0 12px; }
.gs-warn-text { color: #8a5a00; }
.gs-jump { position: sticky; top: 0; z-index: 2; padding: 6px 0; background: var(--bg); }
.gs-grid td.gs-cell { text-align: center; font-size: var(--fs-sm, .85rem); }
.gs-grid td.gs-cell small { display: block; color: var(--muted); font-weight: 400; }
.gs-grid td.gs-ok { background: #e5f6ec; }
.gs-grid td.gs-warn { background: #fff4dd; }
.gs-grid td.gs-bad { background: #fdecec; }
html[data-theme="night"] :is(.gs-status.gs-ok, .gs-result.pass, .gs-queue, .gs-grid td.gs-ok) { background: var(--tint-ok); color: var(--ok-text); }
html[data-theme="night"] :is(.gs-status.gs-warn, .gs-result.fail, .gs-queue.gs-queue-warn, .gs-grid td.gs-warn) { background: #33280f; color: #f0c674; }
html[data-theme="night"] :is(.gs-status.gs-bad, .gs-grid td.gs-bad) { background: #3a1616; color: #f29b9b; }
html[data-theme="night"] :is(.gs-status, .gs-meter) { background: #2c2c2e; }

/* Flight record (flight edit page) */
.rec-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rec-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: var(--radius-sm, 8px); background: #f6f8fb; }
.rec-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: #b8c0cc; }
.rec-ok .rec-dot { background: var(--ok); }
.rec-warn { background: #fff4dd; }
.rec-warn .rec-dot { background: var(--mk-warn, #c98200); }
.rec-inline { display: inline; margin-left: 6px; }
.rec-snap { margin-top: 6px; }
.rec-snap summary { cursor: pointer; color: var(--navy-2); }
.rec-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 8px 0 0; font-size: var(--fs-md, .92rem); }
.rec-dl dt { color: var(--muted); } .rec-dl dd { margin: 0; overflow-wrap: anywhere; }
.rec-h3 { margin: 16px 0 4px; font-size: var(--fs-base, 1rem); }
html[data-theme="night"] .rec-list li { background: #2c2c2e; }
html[data-theme="night"] .rec-warn { background: #33280f; }
@media (max-width: 600px) { .rec-dl { grid-template-columns: 1fr; gap: 2px; } .rec-dl dt { margin-top: 6px; } }

/* Checklists page: a vertical list */
.cl-list li { align-items: flex-start; }
.cl-actions { display: flex; gap: 6px; flex: none; }
@media (max-width: 600px) { .cl-list li { flex-direction: column; align-items: stretch; } .cl-actions { justify-content: flex-end; } }

.nav-sep { display: block; height: 1px; margin: 6px 10px; background: var(--border); }

/* Occurrence reporting */
.occ-assess { margin: 12px 0; }
.occ-assess h3 { margin: 0 0 4px; font-size: var(--fs-base, 1rem); }
.occ-choice { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border); }
/* withdrawn evidence on an occurrence (gl-107): kept, faded, never deleted */
.occ-withdrawn { opacity: .62; }
.occ-withdrawn img { filter: grayscale(1); }
.occ-clock { padding: 12px 16px; border-radius: var(--radius, 12px); margin-bottom: 16px; }
.occ-due { background: #fff4dd; color: #6b4a00; }
.occ-overdue { background: #fdecec; color: #a32020; }
.occ-sent { background: #e5f6ec; color: #0e6a35; }
.occ-big { font-size: var(--fs-xl, 1.32rem); font-weight: 800; }
.occ-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
html[data-theme="night"] .occ-due { background: #33280f; color: #f0c674; }
html[data-theme="night"] .occ-overdue { background: #3a1616; color: #f29b9b; }
html[data-theme="night"] .occ-sent { background: var(--tint-ok); color: var(--ok-text); }
.module-row { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--border); }
.module-row:first-child { border-top: 0; }
.module-row .badge { margin-left: 6px; vertical-align: 1px; }
.module-main { min-width: 0; flex: 1; }
.module-why { margin-top: 3px; color: var(--muted); }
.module-row.is-on .module-why { color: var(--accent); }
.module-act { flex: none; }
.maint-strip { background: #8a5a00; color: #fff; text-align: center; font-size: var(--fs-sm, .85rem); font-weight: 600; padding: 6px 12px; }
.kill-strip { background: color-mix(in srgb, var(--mk-bad, #c62828) 14%, var(--surface)); border-bottom: 1px solid var(--border); text-align: center; font-size: var(--fs-sm, .85rem); padding: 5px 12px; }
.kill-strip a { color: inherit; font-weight: 600; text-decoration: underline; }
.plan-matrix td, .plan-matrix th { text-align: center; }
.plan-matrix td:first-child, .plan-matrix th:first-child { text-align: left; }
@media (max-width: 600px) { .module-row { flex-direction: column; } }
.auditor-terms { margin-top: 12px; padding: 12px; border: 1px dashed var(--border); border-radius: var(--radius-sm, 8px); }
.plain-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.org-chart { margin: 12px 0 20px; }
.org-top { display: flex; justify-content: center; margin-bottom: 18px; }
.org-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.org-box { border: 1.5px solid var(--accent); border-radius: var(--radius, 12px); padding: 12px 14px; background: var(--surface); display: flex; flex-direction: column; gap: 3px; text-align: center; }
.org-box small { color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-size: .7rem; }
.org-vacant { border-style: dashed; border-color: var(--mk-bad, #c62828); }
.signoffs ul { margin: 4px 0 0 18px; padding: 0; }
.gate-list { margin: 6px 0 4px 18px; padding: 0; }
.gate-list li.gate-block { color: var(--mk-bad, #c62828); }
.gate-list li.gate-warn { color: #8a5a00; }
.gate-list li.gate-ok { color: var(--muted); }
.gate-box { margin-bottom: 10px; }

/* ---- jurisdiction badge and regulatory page ---- */
.j-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; letter-spacing: .03em; line-height: 1; padding: 4px 7px; border-radius: var(--radius-pill, 999px);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent-dark); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); white-space: nowrap; }
.j-badge-lg { font-size: var(--fs-md, .92rem); padding: 6px 12px; }
.j-badge-other { background: color-mix(in srgb, #c77700 16%, var(--surface)); color: #9a5b00; border-color: color-mix(in srgb, #c77700 40%, transparent); }
.reg-facts { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 6px 14px; margin: 0; }
.reg-facts dt { font-weight: 600; color: var(--muted); }
.reg-facts dd { margin: 0; }
.j-dialog { max-width: 480px; border: 1px solid var(--border); border-radius: var(--radius, 12px); padding: 20px; background: var(--surface); color: inherit; }
.j-dialog::backdrop { background: rgba(10, 20, 35, .45); }
@media (max-width: 600px) { .reg-facts { grid-template-columns: 1fr; } .reg-facts dd { margin-bottom: 6px; } }

h1 .j-badge { font-size: var(--fs-xs, .78rem); vertical-align: middle; margin-left: 6px; }

/* ---- public homepage: hero photo, trust strip, safety grid, FAQ teaser ---------------------------------------------- */
.hero-shot { position: relative; display: block; justify-self: center; width: 100%; max-width: 460px; aspect-ratio: 4 / 3; border-radius: var(--radius-lg, 16px);
  overflow: hidden; box-shadow: var(--shadow-3, 0 12px 32px rgba(10,16,24,.24)); border: 1px solid rgba(255,255,255,.18); }
.hero-shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.hero-shot:hover img { transform: scale(1.03); }
.hero-shot-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 16px 12px; color: #fff; font-size: var(--fs-sm, .85rem);
  background: linear-gradient(transparent, rgba(8,18,34,.85)); }
@media (max-width: 860px) { .hero-shot { max-width: 520px; aspect-ratio: 16 / 9; } }   /* on phones the headline comes first */
@media (prefers-reduced-motion: reduce) { .hero-shot img { transition: none; } }
.trust-strip { background: var(--surface); border-bottom: 1px solid var(--border); }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; padding-top: 22px; padding-bottom: 22px; text-align: center; }
.trust-grid b { display: block; font-size: 1.6rem; font-weight: 800; color: var(--accent); line-height: 1.2; }
.trust-grid span { color: var(--muted); font-size: var(--fs-sm, .85rem); }

/* ---- the platform's own front page ------------------------------------------------------------------------------------ */
.pl-hero { max-width: 820px; position: relative; z-index: 1; }
.pl-cards .service h3 { margin-top: 0; }
.pl-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.pl-plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.pl-plan h3 { margin: 0 0 6px; color: var(--accent); }
.pl-adds li { font-size: var(--fs-md, .92rem); padding: 7px 0 7px 30px; }
.pl-adds li::before { top: 7px; }
.pl-price { font-size: 2rem; font-weight: 700; margin: 4px 0 6px; }
.pl-note { margin-top: 18px; max-width: 820px; }
.pl-more { margin-top: 20px; }
.pl-more summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.pl-modlist { columns: 2 320px; column-gap: 32px; margin-top: 12px; }
.pl-modlist li { break-inside: avoid; }

/* ---- Today: next flight, urgent items, the app grid ------------------------------------------------------------------- */
.home-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.home-main, .home-side { min-width: 0; }
@media (max-width: 960px) { .home-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .home .home-actions { display: none; } .home .page-head { margin-bottom: 10px; } }   /* the grid and app bar have these */
.next-flight { display: block; color: inherit; text-decoration: none; }
a.next-flight:hover { border-color: var(--accent); }

.next-flight h2 { margin: 4px 0 2px; font-size: var(--fs-lg, 1.15rem); }
.nf-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.nf-meta { margin: 0 0 10px; }
.nf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: var(--fs-xs, .78rem); font-weight: 600; padding: 3px 10px; border-radius: var(--radius-pill, 999px); background: var(--bg); border: 1px solid var(--border); }
.chip.st-ok { background: #e5f6ec; color: #0e6a35; border-color: transparent; }
.chip.st-warn { background: #fff4dd; color: #8a5a00; border-color: transparent; }
.chip.st-bad { background: #fdecec; color: #a32020; border-color: transparent; }
html[data-theme="night"] .chip.st-ok { background: var(--tint-ok); color: var(--ok-text); }
html[data-theme="night"] .chip.st-warn { background: #33270e; color: #e8b75a; }
html[data-theme="night"] .chip.st-bad { background: #381616; color: #f19090; }
.nf-go { display: inline-block; margin-top: 10px; font-weight: 600; color: var(--link); font-size: var(--fs-md, .92rem); }
.att-more summary { cursor: pointer; font-weight: 600; color: var(--link); padding: 8px 0 2px; font-size: var(--fs-md, .92rem); }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 16px 8px; margin: 4px 0 20px; }
.app-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--text); font-size: var(--fs-xs, .78rem);
  font-weight: 500; text-align: center; padding: 4px 2px; border-radius: var(--radius, 12px); -webkit-tap-highlight-color: transparent; }
.app-tile:hover .app-ico, .app-tile:focus-visible .app-ico { transform: translateY(-2px); }
.app-ico { position: relative; width: 58px; height: 58px; border-radius: var(--radius, 12px); display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--navy); transition: transform .15s ease; }
.tint-green .app-ico { background: var(--accent-soft); color: var(--accent-dark); border-color: transparent; }
.tint-blue .app-ico { background: #e7f0fd; color: #1d4f9c; border-color: transparent; }
.tint-red .app-ico { background: #fdecec; color: #a32020; border-color: transparent; }
html[data-theme="night"] .tint-blue .app-ico { background: #12233a; color: #8db8f2; }
html[data-theme="night"] .tint-red .app-ico { background: #381616; color: #f19090; }
.app-badge { position: absolute; top: -7px; right: -9px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--bad);
  color: #fff; font-size: var(--fs-xs, .78rem); font-weight: 700; line-height: 1; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--bg); font-variant-numeric: tabular-nums; }
/* the Chat tab's unread number (crew chat, live: static/js/chatcount.js) - like SAR Ops' bar */
.app-bar .app-count { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad, #d64545);
  color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--surface, #fff); }
.app-bar .app-count[hidden] { display: none; }
.app-dot { position: absolute; top: -3px; right: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 2px var(--bg); }
.app-name { line-height: 1.2; }
@media (min-width: 961px) { .app-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); } }
@media (max-width: 400px) { .app-grid { grid-template-columns: repeat(4, 1fr); gap: 14px 4px; } .app-ico { width: 54px; height: 54px; } .app-tile { font-size: var(--fs-xs, .78rem); } }
@media (prefers-reduced-motion: reduce) { .app-ico { transition: none; } }.mod-count { color: var(--muted); font-size: var(--fs-sm, .85rem); }

/* ---- charts (Apache ECharts, bundled) - colours validated for colour-blind separation on both surfaces --------------- */
:root { --viz-1: #2a78d6; --viz-2: #eb6834; --viz-3: #1baf7a; --viz-4: #eda100; --viz-5: #e87ba4; }
html[data-theme="night"] { --viz-1: #3987e5; --viz-2: #d95926; --viz-3: #199e70; --viz-4: #c98500; --viz-5: #d55181; }
.chart { margin: 0 0 18px; }
.chart figcaption { font-weight: 650; margin: 0 0 2px; letter-spacing: -.005em; }
.chart .chart-sub { color: var(--muted); font-size: var(--fs-sm, .85rem); margin: 0 0 6px; }
.chart-box { width: 100%; height: 260px; }
.chart details { margin-top: 4px; }
.chart details summary { cursor: pointer; color: var(--muted); font-size: var(--fs-sm, .85rem); min-height: 32px; display: inline-flex; align-items: center; }
/* one chart read-out for every chart (17 Nov 2026, static/js/charts.js): a glass card, figures lined up */
.ch-tip { min-width: 150px; padding: 9px 12px; border-radius: var(--radius, 12px); font: 500 12.5px/1.45 Inter, system-ui, sans-serif; color: var(--text);
  background: color-mix(in srgb, var(--surface) 86%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent); box-shadow: var(--shadow-3, 0 12px 32px rgba(10,16,24,.24)); }
.ch-tip b { display: block; font-weight: 650; margin-bottom: 4px; }
.ch-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; }
.ch-row i { width: 10px; height: 3px; border-radius: 2px; }
.ch-row span { color: var(--muted); } .ch-row em { font-style: normal; font-variant-numeric: tabular-nums; font-weight: 600; }
.chart table { font-size: var(--fs-sm, .85rem); }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 0 24px; }

/* ---- lone working card (Today and job pages) ------------------------------------------------------------------------- */
.lw-card { border: 2px solid var(--accent); }
.lw-card.lw-alert { border-color: var(--bad); }
.lw-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.lw-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: none; animation: lw-pulse 1.6s ease-in-out infinite; }
.lw-alert .lw-dot { background: var(--bad); }
@keyframes lw-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .lw-dot { animation: none; } }
.lw-safe { font-size: var(--fs-lg, 1.15rem); padding: 16px; }
.lw-extend { margin-top: 10px; align-items: center; }
.lw-start > summary { cursor: pointer; }
.work-type-form { margin: 0 0 12px; align-items: center; }
.pc-hint { margin-top: 3px; color: var(--muted); }

/* ---- the bell (top bar) ------------------------------------------------------------------------------------------------ */
.bell-wrap { position: relative; }
.bell-badge { position: absolute; top: -6px; right: -7px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad);
  color: #fff; font-size: .68rem; font-weight: 700; line-height: 1; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--surface); font-variant-numeric: tabular-nums; }
.bell-badge[hidden] { display: none; }
.bell-item.seen { opacity: .78; }
.bell-seen { color: var(--ok, #169b62); font-weight: 600; }
.bell-badge.bb-routine { background: var(--muted); }
html[data-theme="night"] .bell-badge { box-shadow: 0 0 0 2px var(--bg, #16181a); }
html[data-theme="night"] .bell-badge.bb-routine { background: var(--accent); color: var(--on-accent, #fff); }   /* v-23: grey with white words was hard to read at night */
.bell-badge.bb-attention { background: var(--warn); min-width: 10px; width: 10px; height: 10px; padding: 0; top: -2px; right: -2px; }
.bell-panel { position: absolute; right: -60px; top: 42px; width: min(380px, calc(100vw - 24px)); max-height: min(70vh, 560px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-3, 0 12px 32px rgba(10,16,24,.24)); z-index: 60; padding: 8px; }
@media (max-width: 640px) { .bell-panel { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; } }.bell-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: var(--radius-sm, 8px); color: var(--text); text-decoration: none; font-size: var(--fs-sm, .85rem); }
.bell-item:hover, .bell-item:focus-visible { background: var(--bg); }
.bell-item .dot { margin-top: 6px; flex: none; }
.bell-item.unread { background: var(--accent-soft); }
.bell-all { display: block; text-align: center; padding: 8px; font-weight: 600; font-size: var(--fs-sm, .85rem); }
.lw-overdue { background: var(--bad); color: var(--on-mk, #fff); border-radius: var(--radius-sm, 8px); padding: 10px 12px; margin: 0 0 12px; }
.lw-sound { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0 0; }
.lw-sound #lw-count { font-weight: 600; margin-right: auto; }
.lw-missed-bar { position: sticky; top: 0; z-index: 90; background: var(--bad); color: var(--on-mk, #fff); padding: 10px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.lw-missed-bar a { color: #fff; text-decoration: underline; font-weight: 700; }
.lw-missed-bar button { margin-left: auto; background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; }
.lw-planned { border: 2px solid var(--warn); }
.lw-plan { margin-top: 12px; }
.lw-plan .check-row { margin: 0; }

/* the bell: text in the item's own colour (urgent red, check amber) */
.bell-item.st-bad > span:last-child { color: var(--bad-text); font-weight: 600; }
.bell-item.st-warn > span:last-child { color: var(--warn-text); }
.bell-item .muted { font-weight: 400; }

/* ---- SAR phase 2 (sar/_p2_main.html, _p2_side.html, ground_phone.html) ---- */
.warn-text { color: var(--warn-text); }
.sighting { padding: 10px 0; border-bottom: 1px solid var(--border); }
.sighting:last-of-type { border-bottom: 0; }
.sighting.new { padding-left: 10px; }
.sighting.dismissed { opacity: .65; }

/* ---- Platform control: an organisation's modules, one collapsible section per module group ---- */
.pc-group { border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); margin: 8px 0; padding: 0 12px; }
.pc-group > summary { cursor: pointer; padding: 10px 0; }
.pc-grouprow { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 8px 10px; margin-bottom: 6px; border-radius: var(--radius-sm, 8px);
  background: var(--surface-2, rgba(127, 127, 127, .08)); }
.pc-grouprow label { display: inline-flex; gap: 6px; align-items: center; }

/* ---- top bar: on a computer the Pilot / Ops switch sits under the rules badge (IAA · CAA); on phones and tablets the
   wrappers step aside (display: contents) and everything is in the bar exactly as before ---- */
.j-tools { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; margin-right: 6px; }
.top-tools { display: flex; align-items: center; margin-left: auto; flex: none; }
.top-icons { display: flex; align-items: center; gap: 6px; }
@media (min-width: 1181px) { .top-icons .theme-toggle { margin-left: 0 !important; } }.me-links:has(+ .me-new){ border-bottom: 0; margin-bottom: 0; padding-bottom: 6px; }
.nav-menu .me-new { margin: 0 0 4px; border-bottom: 1px solid var(--border); border-radius: 0; padding: 6px 12px 8px !important; font-size: var(--fs-sm, .85rem); }
        /* phones and tablets keep it in the top bar */
.mainnav .nav-top { white-space: nowrap; }                           /* a menu's name and its arrow stay on one line */
@media (max-width: 1180px) {
  .j-tools, .top-tools, .top-icons { display: contents; }
}
/* computer: brand · org · rules tag  ...  Pilot/Ops · the menu · personal tools (bell, help, search, day/night) on the far right */
@media (min-width: 1181px) {
  .topbar-inner > .brand { order: 1; } .topbar-inner > .org-badge { order: 2; }
  .topbar-inner > .j-tools { display: contents; }
  
  .topbar-inner > .mainnav { order: 5; margin-left: auto; }
  .topbar-inner > .top-tools { order: 6; margin-left: 0; padding-left: 10px; border-left: 1px solid var(--border); }
  .topbar-inner > .mainnav { flex-wrap: nowrap; }             /* the menu never wraps a second row */
}
@media (min-width: 1181px) and (max-width: 1480px) {             /* mid-size screens: a little less air so everything fits on one row */
  .topbar-inner { gap: 10px; }
  .mainnav a:not(.btn), .mainnav .nav-top { padding-left: 7px !important; padding-right: 7px !important; }
  .topbar-inner > .top-tools { padding-left: 6px; }
  .top-icons { gap: 4px; }
}

/* ---- UTC times with a switch to local time (static/js/utc.js) ---- */
.utc-btn { font: 600 .68rem/1 var(--font, inherit); letter-spacing: .04em; padding: 3px 6px; margin-left: 4px; border-radius: var(--radius-pill); cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); vertical-align: 1px; }
.utc-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); }
.utc-btn:hover { border-color: var(--accent); color: var(--accent); }
.utc-btn[aria-pressed="true"]:hover { color: #fff; }
.utc-t { font-variant-numeric: tabular-nums; }

/* ---- Settings > Modules: the operating model tiles, then a card per group with a toggle on each module ---- */
.mod-h { font-size: var(--fs-base, 1rem); margin: 18px 0 8px; }
.mod-model { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.mod-tile { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto 1fr; grid-template-areas: "ico name" "ico act" "ico about";
  gap: 8px 12px; align-items: start; align-content: start;          /* rows hug their content: the toggles line up whatever the text length */
  padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius, 12px); background: var(--surface); }
.mod-tile.is-on { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.mod-tile-ico { grid-area: ico; font-size: 1.4rem; line-height: 1; }
.mod-tile-name { grid-area: name; line-height: 1.4rem; min-height: 1.4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mod-tile-act { grid-area: act; height: 30px; display: flex; align-items: center; }
.mod-tile-act form { margin: 0; }
.mod-tile-about { grid-area: about; margin: 0; }
.mod-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 20px 0 10px; }
.mod-tools input[type=search] { flex: 1 1 220px; min-width: 0; }

.mod-card { margin: 0; }
details.mod-card > summary { list-style: none; cursor: pointer; margin: 0; }
details.mod-card > summary::-webkit-details-marker { display: none; }
details.mod-card > summary::before { content: "\25B8"; color: var(--muted); transition: transform .15s ease; }
details.mod-card[open] > summary::before { transform: rotate(90deg); }
details.mod-card[open] > summary { margin-bottom: 6px; }
.mod-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.mod-card-head h2 { margin: 0; font-size: var(--fs-base, 1rem); }
.mod-bar { flex: 1 1 60px; height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; min-width: 40px; }
.mod-bar i { display: block; height: 100%; background: var(--accent); }
.mod-card .module-row { align-items: center; }
.mod-card .module-row:first-of-type { border-top: 0; }
.mod-switch { margin: 0; display: inline-flex; }
input.switch.switch-lg { transform: scale(1.15); transform-origin: left center; }
.mod-lock { font-size: var(--fs-xs, .78rem); font-weight: 600; color: var(--muted); white-space: nowrap; }
.mod-core > summary, .mod-history > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mod-core > summary::-webkit-details-marker, .mod-history > summary::-webkit-details-marker { display: none; }
.mod-core > summary::before, .mod-history > summary::before { content: "\25B8"; color: var(--muted); transition: transform .15s ease; }
.mod-core[open] > summary::before, .mod-history[open] > summary::before { transform: rotate(90deg); }
.mod-core > summary h2, .mod-history > summary h2 { margin: 0; font-size: var(--fs-base, 1rem); }
.mod-core[open] > summary, .mod-history[open] > summary { margin-bottom: 8px; }
@media (max-width: 600px) { .mod-card .module-row { flex-direction: row; } }
.mod-asked { font-size: var(--fs-xs, .78rem); font-weight: 600; color: var(--accent); white-space: nowrap; }
.module-row:has(.mod-asked), .module-row:has(button.btn-accent) { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.badge-beta { background: color-mix(in srgb, #7c3aed 14%, var(--surface)); color: #6d28d9; border: 1px solid color-mix(in srgb, #7c3aed 35%, transparent); }
html[data-theme="night"] .badge-beta { color: #c4b5fd; }
details.mod-card.mod-beta { border-color: color-mix(in srgb, #7c3aed 35%, var(--border)); }

/* ---- SAR incident: Flying panel ---- */
.sub-details { border-top: 1px solid var(--border); padding: 10px 0; }
.sub-details > summary { cursor: pointer; }
.sub-details[open] > summary { margin-bottom: 8px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 14px; }
.check-grid .check-row { display: flex; gap: 8px; align-items: center; }

/* ---- Mission board ---- */
.mission-kinds { margin: 4px 0 12px; }
.badge.kind-training { background: color-mix(in srgb, #2563eb 12%, var(--surface)); color: #1d4ed8; }
.badge.kind-exercise { background: color-mix(in srgb, #7c3aed 12%, var(--surface)); color: #6d28d9; }
.badge.kind-planned { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); }
.badge.kind-tasking { background: color-mix(in srgb, var(--mk-bad, #c62828) 12%, var(--surface)); color: var(--mk-bad, #c62828); }
html[data-theme="night"] .badge.kind-training { color: #93c5fd; } html[data-theme="night"] .badge.kind-exercise { color: #c4b5fd; }
html[data-theme="night"] .badge.kind-tasking { color: #fca5a5; }

/* ---- Legal policies: the reading view ---- */
.legal-doc { line-height: 1.65; }
.legal-doc h2 { margin: 6px 0 14px; }
.legal-doc h3 { margin: 22px 0 8px; font-size: var(--fs-base, 1rem); }
.legal-doc p, .legal-doc li { max-width: 72ch; }
.legal-meta { margin-bottom: 4px; }

.btn-xs { padding: 5px 11px; min-height: var(--control-h-sm); font-size: var(--fs-sm, .85rem); border-radius: var(--radius-sm); }   /* btn-xs is retired: it draws as btn-sm (design picks consistency-2, 30 Nov 2026) */
@media (pointer: coarse) { .btn-xs { min-height: 44px; } }

/* ---- SAR incident map ---- */
.sarmap-wrap { padding: 8px 12px 12px; }

.sarmap { width: 100%; border-radius: var(--radius-sm, 8px); overflow: hidden; border: 1px solid var(--border); }
   

/* ---- SAR phase 3 ---- */
.gridref { font-family: var(--mono); font-size: var(--fs-sm, .85rem); }

.review-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.review-buttons .btn { flex: 1 1 140px; min-height: 48px; font-size: var(--fs-base, 1rem); }

/* ---- SAR search briefing (QR) ---- */

.brief-qr-page { background: #fff; color: #111; }
.brief-qr { max-width: 560px; margin: 0 auto; padding: 24px 16px; text-align: center; }

.brief-qr-code svg { width: min(80vw, 420px); height: auto; }
.brief-qr-step { font-size: var(--fs-lg, 1.15rem); }
@media print { .no-print { display: none; } }

/* ---- QR codes ---- */
.qr-print { background: #fff; color: #111; padding: 10mm; }
.qr-print-bar { margin-bottom: 8px; }
.qr-labels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.qr-label { display: flex; gap: 8px; align-items: center; border: 1px dashed #bbb; padding: 4mm; break-inside: avoid; font-size: 11px; }
.qr-label-code svg { width: 26mm; height: 26mm; }
.qr-mini svg { width: 56px; height: 56px; vertical-align: middle; margin-right: 8px; }
.site-sign-flag { display: inline-block; background: #f5c400; color: #111; font-weight: 800; letter-spacing: .06em; padding: 6px 14px; border-radius: var(--radius-sm, 8px); }
.site-sign h1 { margin-top: 10px; }
.doc-state { font-size: 1.4rem; font-weight: 800; padding: 10px 14px; border-radius: var(--radius-sm, 8px); }
.doc-state.ok { background: #dcf3e4; color: #135a2b; } .doc-state.bad { background: #fde2e1; color: #7a1d18; }
.letter { max-width: 180mm; margin: 0 auto; padding: 16mm 12mm; font-size: 12pt; line-height: 1.5; }
.letter-qr { display: flex; gap: 14px; align-items: center; border: 1px solid #ccc; border-radius: var(--radius-sm, 8px); padding: 10px; margin: 12px 0; }
.letter-qr .brief-qr-code svg { width: 40mm; height: 40mm; }
@media (max-width: 600px) { .qr-labels { grid-template-columns: repeat(2, 1fr); } }
.qr-unreachable { color: var(--bad-text); text-align: left; display: flex; gap: 8px; align-items: baseline; }
.qr-unreachable::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); transform: translateY(-1px); }

.sales-qr { display: flex; gap: 12px; align-items: center; }
.sales-qr .qr-mini svg { width: 96px; height: 96px; }
.switch-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; }
.switch-row input.switch { margin-top: 2px !important; }
.switch-list .switch-row + .switch-row { border-top: 1px solid var(--border); }

/* ---- live drone video ---- */
.live-video video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius-sm, 8px); display: block; }
.live-video.on-air video { outline: 3px solid #d62828; }
.live-state { margin: 4px 0 0; }

/* ---- live drone telemetry ---- */

/* ---- SAR incident: tabbed sections ---- */

.menu-details { position: relative; display: inline-block; }
.menu-details > summary { list-style: none; cursor: pointer; }
.menu-details > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 180px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px); box-shadow: var(--shadow-3, 0 12px 32px rgba(10,16,24,.24)); padding: 6px; }
.menu-pop a { display: block; padding: 7px 10px; border-radius: var(--radius-sm, 8px); }
.menu-pop a:hover { background: var(--accent-soft); }

/* ---- Settings menu: four groups, two columns on a computer ---- */
@media (min-width: 1181px) {
  .nav-group.nav-right .nav-menu { min-width: 270px; }
  .nav-group.nav-right .nav-menu.nm-wide { column-count: 2; column-gap: 6px; min-width: 440px; }   /* two columns only when there's enough to fill them */
  .nav-group.nav-right .nav-menu.nm-wide > a, .nav-group.nav-right .nav-menu.nm-wide > .nav-section { break-inside: avoid; }
  .nav-group.nav-right .nav-menu.nm-wide > .nav-section { break-after: avoid; }
  .nav-group.nav-right .nav-menu.nm-wide > .ns-tools { break-before: column; border-top: 0; margin-top: 0; padding-top: 4px; }   /* the 2nd column's top lines up with the 1st's */
  .nav-group.nav-right .nav-menu > .menu-me, .nav-group.nav-right .nav-menu > .me-links, .nav-group.nav-right .nav-menu > .me-new,
  .nav-group.nav-right .nav-menu > .menu-tools, .nav-group.nav-right .nav-menu > .menu-logout { column-span: all; }
}

/* menu section headings (Plan / Fly / Log, Organisation ...) in the accent colour, so they stand apart from the links */
.nav-section { color: var(--accent); }
html[data-theme="night"] .nav-section { color: var(--accent); }

/* ---- SAR pre-flight: live conditions ---- */
  
   

.fitness-done { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }

.fitness-done details.inline { width: 100%; }

/* ---- position picker ---- */
.pos-modal { position: fixed; inset: 0; z-index: 200; background: rgba(10, 20, 35, .55); display: flex; align-items: center; justify-content: center; padding: 12px; }
.pos-modal[hidden] { display: none; }
.pos-box { background: var(--surface); border-radius: var(--radius, 12px); width: min(720px, 100%); max-height: calc(100vh - 24px); display: flex; flex-direction: column; gap: 8px; padding: 12px; box-shadow: var(--shadow-3, 0 12px 32px rgba(10,16,24,.24)); }
.pos-head, .pos-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.pos-search { display: flex; gap: 6px; flex-wrap: wrap; }
.pos-search input { flex: 1 1 240px; }
.pos-results { list-style: none; margin: 0; padding: 0; max-height: 140px; overflow: auto; }
.pos-results li { padding: 6px 8px; border-radius: var(--radius-sm, 8px); cursor: pointer; font-size: var(--fs-sm, .85rem); }
.pos-results li:hover { background: var(--accent-soft); }
.pos-note { margin: 0; }
.pos-map { height: min(46vh, 380px); border-radius: var(--radius-sm, 8px); overflow: hidden; border: 1px solid var(--border); }
.pos-btn { white-space: nowrap; }
.pos-row { display: flex; gap: 6px; align-items: center; } .pos-row .pos-text { flex: 1; min-width: 0; } .pos-one .pos-hint { display: block; min-height: 1em; }
.lic { font-size: var(--fs-xs, .78rem); color: var(--muted); font-family: var(--mono); }

/* =====================================================================
   Design system (docs/design-guide.md): type, links, tabs, More options, page index, save bar.
   Uses :where() where it adds a default, so page-specific rules still win.
   ===================================================================== */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm, 8px); }
:where(.page) h1 { font-size: clamp(1.55rem, 2.4vw, 1.95rem); font-weight: 700; letter-spacing: -0.02em; }
:where(.panel) > h2, :where(.panel) > form > h2, :where(.panel-head) h2, :where(.panel) > summary h2 { font-size: var(--fs-panel); font-weight: var(--fw-panel); letter-spacing: -0.005em; }
:where(.panel) h3 { font-size: var(--fs-base, 1rem); }
.page-head > div:first-child > p { color: var(--muted); }
.page-head .head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* links: underlined inside sentences, plain when they are the title of a row or card (underline on hover) */
a { text-underline-offset: 2px; text-decoration-thickness: 1px; }
:is(td, th, li, dd, h2, h3, .panel-head) > a:not(.btn), :is(td, li) > b > a, :is(td, li) > div > a:not(.btn) { text-decoration: none; font-weight: 600; }
:is(td, th, li, dd, h2, h3, .panel-head) > a:not(.btn):hover, :is(td, li) > b > a:hover, :is(td, li) > div > a:not(.btn):hover { text-decoration: underline; }
.mainnav a, .nav-menu a, .menu-pop a, .ptabs a, .tabs a { font-weight: inherit; }
.nav-menu a, .menu-pop a { text-decoration: none; }

/* Today: rows keep the date on one line; urgent items read as text with a coloured dot */
.up-list .right { flex: none; white-space: nowrap; }
.att-list a { color: var(--text); }
.att-list li.st-bad a { color: var(--text); }

/* incident sections: the same underline tabs as the job page (.ptabs) */

/* timeline: the day once, then times */
.tl-day td { background: var(--surface-2); font-weight: 700; font-size: var(--fs-xs, .78rem); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 10px; }
.tl-time { white-space: nowrap; font-weight: 600; }

/* status line under a page title: a badge, then facts separated by dots */

/* More options: rarely used fields, one click away */
details.more { margin: 4px 0 8px; }
details.more > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; color: var(--link); font-weight: 600; font-size: var(--fs-md, .92rem); padding: 4px 0; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
details.more[open] > summary::before { transform: rotate(45deg); }
details.more[open] > summary { margin-bottom: 10px; }
details.more > .more-body { border-left: 2px solid var(--border); padding-left: 14px; }

/* page index: "On this page" for long settings pages (static/js/pageindex.js) */
.with-index { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; align-items: start; }
.page-index { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; font-size: var(--fs-md, .92rem); }
.page-index .pi-title { font-size: var(--fs-xs, .78rem); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 0 0 8px; }
.page-index input { min-height: 34px; padding: 6px 10px; font-size: var(--fs-sm, .85rem); margin-bottom: 10px; }
.page-index ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.page-index li a { display: block; padding: 5px 12px; margin-left: -2px; border-left: 2px solid transparent; color: var(--text-2); text-decoration: none; font-weight: 500; }
.page-index li a:hover { color: var(--navy); }
.page-index li a.on { color: var(--navy); border-left-color: var(--accent); font-weight: 600; }
.page-index li[hidden] { display: none; }
.pi-none { color: var(--muted); font-size: var(--fs-sm, .85rem); padding: 6px 12px; }
.panel.pi-hit { box-shadow: var(--ring); }
@media (max-width: 1060px) {
  .with-index { grid-template-columns: 1fr; gap: 0; }
  .page-index { position: static; max-height: none; margin-bottom: 16px; }
  .page-index ol { display: flex; gap: 6px; overflow-x: auto; border: 0; padding-bottom: 4px; scrollbar-width: thin; }
  .page-index li a { white-space: nowrap; border: 1px solid var(--border); border-radius: var(--radius-pill, 999px); background: var(--surface); padding: 5px 12px; margin: 0; font-size: var(--fs-sm, .85rem); }
  .page-index li a.on { border-color: var(--accent); }
}

/* save bar: stays at the bottom of the screen while a long form is in view */
.save-bar { position: sticky; bottom: 0; z-index: 15; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  margin: 0 0 20px; padding: 12px 16px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 -4px 18px rgba(11,31,58,.08); }
.save-bar .muted { font-size: var(--fs-sm, .85rem); }
.save-bar.dirty { border-color: var(--accent); }
/* above the app bar: one rule for every bottom bar (mapchrome.css, design picks phone-3) */

/* empty states read as a hint, not an error */
/* One empty state (design picks consistency-3, 30 Nov 2026): a plain muted sentence saying what will appear, plus at most one
   add button (templates/_empty.html). A table cell with .empty stays centred; a paragraph reads like .empty-state, no dashed box. */
.empty { color: var(--muted); text-align: center; padding: 24px 12px; font-size: var(--fs-md, .92rem); }
p.empty, li.empty { text-align: left; padding: 12px 0; margin: 0; }
.empty-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 0; }
.empty-state p { margin: 0; color: var(--muted); max-width: 62ch; }

@media (prefers-reduced-motion: reduce) { details.more > summary::before, td, .btn { transition: none; } .btn:active { transform: none; } }
@media (max-width: 640px) {
  .save-bar { padding: 8px 10px; flex-wrap: nowrap; }
  .save-bar .muted { font-size: var(--fs-xs, .78rem); line-height: 1.3; }
  .save-bar .btn { flex: none; }
  .page-index ol { scrollbar-width: none; }
  .page-index ol::-webkit-scrollbar { display: none; }
}

/* job page: the type of work is a compact line under the tabs, not a full-width field */
.work-type-form { flex-wrap: nowrap; gap: 8px; }
.work-type-form label { margin: 0; white-space: nowrap; color: var(--muted); font-weight: 600; font-size: var(--fs-sm, .85rem); }
.work-type-form select { width: auto; max-width: 100%; min-height: var(--control-h-sm); padding: 4px 10px; font-size: var(--fs-sm, .85rem); }

/* people lists (incident roles): initials, name, role */
.people { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.people li { display: flex; gap: 10px; align-items: flex-start; }
.people li > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.people b { font-size: var(--fs-md, .92rem); }
.avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dark);
  font-size: var(--fs-xs, .78rem); font-weight: 700; letter-spacing: .02em; }

/* =====================================================================
   SAR incident page: command header, status strip, section rail, quick log
   ===================================================================== */

.inc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.inc-title { min-width: 0; flex: 1 1 420px; }
.inc-title h1 { margin: 0; overflow-wrap: anywhere; }
.inc-head .head-actions { flex: none; }
.inc-head .head-actions form.inline { display: inline; margin: 0; }
.menu-pop .menu-label { display: block; padding: 8px 10px 2px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.menu-pop a.menu-danger { color: var(--bad-text); border-top: 1px solid var(--border); border-radius: 0 0 6px 6px; margin-top: 4px; }

/* status strip */
.inc-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; margin: 0 0 20px; }
.inc-tile { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; color: var(--text); min-width: 0; transition: border-color .15s; }
.inc-tile:hover { border-color: var(--accent); color: var(--text); }
.it-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.it-value { font-size: var(--fs-xl, 1.32rem); line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.it-sub { font-size: var(--fs-xs, .78rem); color: var(--muted); }
.inc-tile.st-ok { background: var(--tint-ok, #e5f6ec); border-color: var(--tint-ok-b, #bfe6cf); }
.inc-tile.st-warn { background: var(--tint-warn, #fff4dd); border-color: var(--tint-warn-b, #f2d999); }
.inc-tile.st-bad { background: var(--tint-bad, #fdecec); border-color: var(--tint-bad-b, #f3c4c4); }
.inc-tile.st-ok .it-value { color: var(--ok-text); } .inc-tile.st-warn .it-value { color: var(--warn-text); } .inc-tile.st-bad .it-value { color: var(--bad-text); }

/* the section rail (a column on a computer, a row of tabs on smaller screens) */

/* quick log */
#log { padding: 14px 16px; }

.chip-btn { font: inherit; font-size: var(--fs-sm, .85rem); font-weight: 600; padding: 4px 12px; min-height: 30px; border-radius: var(--radius-pill, 999px); border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); cursor: pointer; }
.chip-btn:hover { border-color: var(--accent); color: var(--navy); }

#log details.more { margin: 6px 0 0; }

/* tech log tables (the old timeline rule that hid columns 2 and 4 under 640px is gone: it hit the tech log's lists, hiding
   the Defect heading and cell but only the Raised heading, so the headings no longer matched - screen review v-16) */
.tl-table td { padding: 7px 10px; }

/* Needs doing */

/* add-forms folded behind a button, fields labelled */
details.add { margin-top: 10px; }
details.add > summary { display: inline-flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; font-weight: 600; font-size: var(--fs-sm, .85rem); color: var(--link);
  padding: 5px 12px; border: 1px dashed var(--border); border-radius: var(--radius-pill, 999px); }
details.add > summary::-webkit-details-marker { display: none; }
details.add > summary::before { content: "+"; font-weight: 700; }
details.add[open] > summary::before { content: "\2212"; }
details.add > summary:hover { border-color: var(--accent); }
.add-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-items: end; margin-top: 10px; padding: 12px;
  background: var(--surface-2); border-radius: var(--radius-sm); }
.add-form label { margin: 0; font-size: var(--fs-xs, .78rem); color: var(--text-2); display: flex; flex-direction: column; gap: 4px; }
.add-form input:not([type=checkbox]):not([type=hidden]), .add-form select { min-height: 36px; padding: 6px 10px; font-size: var(--fs-md, .92rem); font-weight: 400; }
.add-form .span-all { grid-column: 1 / -1; }
.add-form .chip-checks label { flex-direction: row; }
.add-form > .btn { justify-self: start; }

.empty-line { color: var(--muted); font-size: var(--fs-sm, .85rem); margin: 0; }

@keyframes sbpulse { 70% { box-shadow: 0 0 0 9px rgba(210,59,59,0); } 100% { box-shadow: 0 0 0 0 rgba(210,59,59,0); } }

/* ---- Search & rescue page: New incident form and the incident list ---- */
.btn-lg { min-height: 48px; padding: 10px 24px; font-size: var(--fs-base, 1rem); border-radius: var(--radius, 12px); }
.nowrap { white-space: nowrap; }
.tasking { border-top: 4px solid var(--bad); padding: 22px 24px; }
.tasking.is-exercise { border-top-color: var(--warn); }
.tasking[hidden] { display: none; }

.tstep { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.tstep legend { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: var(--fs-base, 1rem); color: var(--navy); margin-bottom: 10px; padding: 0; }

.tstep + .tstep { border-top: 1px solid var(--border); padding-top: 16px; }


.tasking-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 16px; }
details.decline > summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: var(--fs-md, .92rem); }
details.decline[open] { flex-basis: 100%; }
details.decline[open] > summary { margin-bottom: 10px; }

@media (max-width: 600px) {  .tasking { padding: 16px; }  .tasking-foot .btn-lg { width: 100%; } }

/* ---- SAR aircraft crews: pilot in command + camera operator ---- */

.pos { flex: none; min-width: 58px; text-align: center; font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--radius-sm, 8px); }

/* ---- timeline: times entered late ---- */


/* ---- Weather & airspace: record this check ---- */
.pf-group { border: 0; padding: 0; margin: 14px 0 0; min-width: 0; display: grid; gap: 6px; }
.pf-group legend { font-size: var(--fs-xs, .78rem); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted); padding: 0; margin-bottom: 6px; }
.pf-group .qrow > legend { font-size: inherit; text-transform: none; letter-spacing: 0; font-weight: 600; color: inherit; margin: 0; }   /* a question row among the ticks (30 Nov) */
.pf-group .qrow.pf-q { border-top: 1px solid var(--border); padding-top: 12px; }
.pf-check { display: flex; align-items: center; gap: 10px; margin: 0; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font-weight: 500; font-size: var(--fs-md, .92rem); cursor: pointer; transition: border-color .15s, background .15s; }
.pf-check input { width: 18px; height: 18px; margin: 0; flex: none; }
.pf-check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pf-check.is-off { opacity: .45; cursor: not-allowed; }
.pf-none { border-style: dashed; }
.pf-seg { display: grid; grid-template-columns: 1fr; gap: 6px; }
.pf-seg label { margin: 0; cursor: pointer; }
.pf-seg input { position: absolute; opacity: 0; pointer-events: none; }
.pf-seg span { display: block; text-align: center; padding: 10px 12px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-weight: 700; background: var(--surface); }
.pf-seg input:focus-visible + span { box-shadow: var(--ring); }
.pf-go input:checked + span { border-color: var(--ok); background: var(--tint-ok); color: var(--ok-text); }
.pf-restrict input:checked + span { border-color: var(--warn); background: var(--tint-warn); color: var(--warn-text); }
.pf-nogo input:checked + span { border-color: var(--bad); background: var(--tint-bad); color: var(--bad-text); }
.wx-record .field { margin-top: 12px; }

/* ---- sign-in methods ---- */
.signin-providers { display: grid; gap: 8px; margin: 4px 0 0; }
.signin-btn { gap: 10px; color: var(--text); }
.signin-btn svg { flex: none; }
.signin-or { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--muted); font-size: var(--fs-sm, .85rem); }
.signin-or::before, .signin-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.signin-list { list-style: none; margin: 14px 0 8px; padding: 0; display: grid; gap: 10px; }
.signin-list li { display: flex; align-items: center; gap: 12px; }
.signin-list li > div { flex: 1; display: flex; flex-direction: column; }
.signin-list form { margin: 0; }
.signin-ico { width: 34px; height: 34px; border-radius: var(--radius-sm, 8px); display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); flex: none; }

/* ---- two pilots on one flight: time at the controls ---- */
.time-split { grid-column: 1 / -1; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.time-split[hidden] { display: none; }
.ts-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; font-size: var(--fs-md, .92rem); }
.time-split input[type=range] { width: 100%; min-height: 0; padding: 0; border: 0; background: transparent;
  height: 28px; }
.ts-labels { display: flex; justify-content: space-between; gap: 10px; font-size: var(--fs-sm, .85rem); font-variant-numeric: tabular-nums; }
.ts-b { text-align: right; }

/* ---- DJI live map, annotations and routes: map + side panel (computer, iPad), bottom sheet (phone) ---- */
.dl-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; height: calc(100dvh - var(--dl-top, 66px)); min-height: 420px; }   /* --dl-top: measured by phonemap.js (map review 70) */
@media (max-width: 1100px) and (min-width: 761px) { .dl-wrap { grid-template-columns: minmax(0, 1fr) 320px; } }
.dl-map { position: relative; min-height: 0; }
.dl-panel { overflow-y: auto; background: var(--surface); border-left: 1px solid var(--border); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.dl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.dl-grip { display: none; }
.dl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dl-row { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font: inherit; color: var(--text); cursor: pointer; }
.dl-row span { font-size: var(--fs-sm, .85rem); color: var(--muted); }
.dl-row.on { border-color: var(--accent); background: var(--accent-soft); }
.dl-row.stale b { color: var(--muted); }
.dl-detail { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.dl-dhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.dl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.dl-grid div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 6px 8px; display: flex; flex-direction: column; }
.dl-grid span { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.dl-grid b { font-size: var(--fs-base, 1rem); font-variant-numeric: tabular-nums; }
.dl-grid small { font-size: .72rem; color: var(--muted); }
.dl-video video { width: 100%; border-radius: var(--radius-sm); background: #000; aspect-ratio: 16 / 9; }
.dl-land { margin-top: auto; }
.dl-ac { position: relative; width: 34px; height: 34px; border: 0; background: none; padding: 0; cursor: pointer; }
.dl-arrow { position: absolute; inset: 3px; border-radius: 50%; background: #e34234; box-shadow: 0 0 0 3px #fff, 0 2px 8px rgba(0,0,0,.4); }
.dl-arrow::after { content: ""; position: absolute; left: 50%; top: -9px; transform: translateX(-50%); border: 7px solid transparent; border-bottom: 10px solid #e34234; }
.dl-ac.stale .dl-arrow { background: #8a94a3; }
.dl-ac.stale .dl-arrow::after { border-bottom-color: #8a94a3; }
.dl-ac.sel .dl-arrow { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--accent); }
.dl-lbl { position: absolute; top: 36px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .72rem; font-weight: 700; background: rgba(255,255,255,.92);
  color: #15202e; padding: 1px 6px; border-radius: var(--radius-sm, 8px); }
.dm-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.dm-form { display: grid; gap: 8px; }
.dm-form label { margin: 0; font-size: var(--fs-xs, .78rem); display: flex; flex-direction: column; gap: 4px; flex: 1; }
.dm-form label[hidden] { display: none; }
.dm-row { display: flex; gap: 8px; }
.dm-colours { display: flex; gap: 8px; }
.dm-colours label { flex-direction: row; flex: none; cursor: pointer; }
.dm-colours input { position: absolute; opacity: 0; }
.dm-colours span { width: 26px; height: 26px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border); }
.dm-colours input:checked + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.dm-actions { display: flex; gap: 8px; justify-content: flex-end; }
.dm-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.dm-item > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dm-item form { margin: 0; }
.dm-sw { width: 12px; height: 12px; border-radius: 50%; flex: none; }
@media (max-width: 760px) {
  .dl-wrap { display: block; height: calc(100dvh - var(--dl-top, 60px)); position: relative; }
  .dl-wrap > .dl-map, .dl-wrap > .dl-map.maplibregl-map { position: absolute; inset: 0; }   /* beats maplibre-gl.css, which loads later */
  .dl-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 42%; border-left: 0; border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0; box-shadow: 0 -8px 24px rgba(0,0,0,.18); padding-top: 6px; transition: max-height .2s ease; }
  body.dl-sheet-open .dl-panel { max-height: 70%; }
  .dl-grip { display: block; position: relative; width: 100%; height: 22px; padding: 0; border: 0; background: none; margin: -6px 0 2px; flex: none; cursor: grab; touch-action: none; }
  .dl-grip::before { content: ""; position: absolute; left: 50%; top: 50%; width: 40px; height: 5px; margin: -2.5px 0 0 -20px; border-radius: 3px; background: var(--border); }
  .dl-grip::after { content: ""; position: absolute; inset: -11px 0; }      /* a 44px touch target */
  .dl-grip:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  body.dl-sheet-min .dl-panel { max-height: 120px; overflow: hidden; }       /* folded down: the map, with the panel's first row (map review 15) */
  body.has-app-bar .dl-wrap { height: calc(100dvh - var(--dl-top, 60px) - 64px - env(safe-area-inset-bottom)); }
}
.dl-head { flex-wrap: wrap; }
.dl-head b { font-size: var(--fs-base, 1rem); }

/* =====================================================================
   Site-wide modern pass (like the incident page): summary numbers as tiles, label on top
   ===================================================================== */
.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { display: flex; flex-direction: column; justify-content: flex-start; gap: 2px; padding: 12px 14px; box-shadow: none; transition: border-color .15s; }
/* label, then the figure, then any note - whichever order the markup uses */
.stat > * { order: 4; } .stat > span:first-of-type { order: 1; } .stat > b { order: 2; } .stat > small { order: 3; }
a.stat:hover { border-color: var(--accent); }
.stat b { font-size: 1.45rem; }
.stat span { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted); }
.stat.hot { background: var(--tint-warn); border-color: var(--tint-warn-b); }
.stat.hot b { color: var(--warn-text); }
.stat.hot-bad { background: var(--tint-bad); border-color: var(--tint-bad-b); }
.sync-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.sync-counts > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.sync-counts > div b { font-size: var(--fs-xl, 1.32rem); font-variant-numeric: tabular-nums; }
.sync-counts > div span { font-size: var(--fs-xs, .78rem); color: var(--muted); }
/* a long explanation under a page title folds to one line */
details.intro { margin: -8px 0 18px; }
details.intro > summary { cursor: pointer; color: var(--link); font-weight: 600; font-size: var(--fs-md, .92rem); list-style: none; display: inline-flex; gap: 6px; align-items: center; }
details.intro > summary::-webkit-details-marker { display: none; }
details.intro > summary::before { content: "i"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: .72rem;
  font-weight: 800; background: var(--accent-soft); color: var(--accent-dark); font-style: italic; }
details.intro[open] > summary { margin-bottom: 8px; }
details.intro > div { border-left: 2px solid var(--border); padding-left: 14px; font-size: var(--fs-md, .92rem); color: var(--text-2); }
/* "+ Add ..." panels folded: the panel shows just its title until opened */
details.panel.add-panel > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; }
details.panel.add-panel > summary::-webkit-details-marker { display: none; }
details.panel.add-panel > summary h2 { margin: 0; font-size: var(--fs-base, 1rem); color: var(--link); }
details.panel.add-panel > summary h2::before { content: "+ "; }
details.panel.add-panel[open] > summary h2::before { content: "\2212\00a0"; }
details.panel.add-panel[open] > summary { margin-bottom: 14px; }
details.panel.add-panel:not([open]) { padding: 14px 22px; }
/* screen review v-32 (30 Nov 2026): a folded "+ Add ..." panel is a button, not a full-width empty card. Closed, the panel
   box goes and its title reads as an outline button; open, it is the panel (or the side drawer, adddrawer.js) with the form.
   When the page head already has the same add (pageactions.js marks it .add-headed), the folded copy is hidden: one way in.
   A fold-out whose summary is itself a button (+ Log a flight, Add Event) loses its empty box the same way. */
html:root body main details.panel.add-panel:not([open]):not(#_):not(#_) { background: none; border: 0; box-shadow: none; padding: 0; margin: 0 0 14px;
  container-type: normal; flex: none; width: auto; max-width: 100%; }   /* a panel's inline-size container gave a folded add in a flex row no width: one letter a line (v-32) */
html:root body main details.panel.add-panel:not([open]) > summary h2 { white-space: nowrap; }
html:root body main details.panel.add-panel:not([open]) > summary { display: inline-flex; width: auto; min-height: 40px; padding: 0 16px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); background: var(--surface); }
html:root body main details.panel.add-panel:not([open]) > summary:hover { border-color: var(--muted); }
html:root body main details.panel.add-panel:not([open]) > summary h2 { font-size: var(--fs-md, .92rem); font-weight: 600; color: var(--text); }
html:root body main details.panel.add-panel:not([open]) > summary > :not(h2) { display: none; }
html:root body main details.add-panel.add-headed:not([open]) { display: none; }
html:root body main details.panel:not([open]):has(> summary.btn):not(#_):not(#_), html:root body main .panel:has(> details:only-child:not([open]) > summary.btn):not(#_):not(#_) {
  background: none; border: 0; box-shadow: none; padding: 0; margin-bottom: 14px; }
.layout-stack > div:last-child:not(.panel):not(:has(> details[open])) { display: flex; flex-wrap: wrap; gap: 0 10px; }
/* list pages: the list full width, its "+ Add" panels side by side above it */
.layout-stack { display: flex; flex-direction: column; }
.layout-stack > div:last-child:not(.panel) { order: -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 16px; align-items: start; }
/* Platform admin > Control > Server keys: one card per group, one aligned row per key */
.key-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; align-items: start; }
.key-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); }
.key-card.key-all { background: var(--surface-2); }
.key-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.key-card-head h3 { margin: 0; font-size: var(--fs-md, .92rem); }
.key-note { margin: 6px 0 0; font-size: var(--fs-xs, .78rem); color: var(--muted); line-height: 1.4; }
.key-list { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--border); display: grid; gap: 6px; font-size: var(--fs-sm, .85rem); }
.key-list li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; }
.key-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.key-list code { font-size: .7rem; color: var(--muted); background: var(--bg); padding: 2px 6px; border-radius: var(--radius-sm, 8px); white-space: nowrap;
  max-width: 250px; overflow: hidden; text-overflow: ellipsis; justify-self: end; }
.key-list .key-set { font-size: var(--fs-xs, .78rem); white-space: nowrap; }

/* a two-column page whose side column is only a folded "+ Add" panel: one column, the add panel on top */
.layout-side:has(> :last-child > details.add-panel:only-child), .layout-side:has(> details.add-panel:last-child) { grid-template-columns: minmax(0, 1fr); }
.layout-side:has(> :last-child > details.add-panel:only-child) > :last-child, .layout-side > details.add-panel:last-child { order: -1; }
.layout-stack > details.add-panel { order: -1; }
/* phones: header buttons wrap; status tiles three across and compact */
.page-head .head-actions, .inc-head .head-actions { flex-wrap: wrap; }
@media (max-width: 640px) {
  .inc-head .head-actions { width: 100%; }
  .inc-head .head-actions > * { flex: 1 1 auto; }
  .inc-head .head-actions .btn{ justify-content: center; }
  .inc-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
  .inc-tile { padding: 7px 9px; border-radius: var(--radius-sm, 8px); }
  .it-label { font-size: .6rem; letter-spacing: .04em; }
  .it-value { font-size: var(--fs-base, 1rem); }
  .it-sub { display: none; }
}
.mission-kind-form { flex-wrap: nowrap; gap: 8px; align-items: center; margin: 4px 0; }
.mission-kind-form label { margin: 0; color: var(--muted); font-weight: 600; font-size: var(--fs-sm, .85rem); }
.mission-kind-form select { width: auto; min-height: var(--control-h-sm); padding: 4px 10px; font-size: var(--fs-sm, .85rem); }

/* ---- Field tools (templates/tools/) ---------------------------------------------------------------------------------- */
.ft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-4); }
.ft-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--card-bg, var(--surface)); border: 1px solid var(--card-line, var(--border)); border-radius: var(--radius, 12px); box-shadow: var(--card-shadow, none);
  color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.ft-card:hover, .ft-card:focus-visible { border-color: var(--accent); transform: translateY(-1px); }
.ft-card b { font-size: var(--fs-base, 1rem); color: var(--navy); }
html[data-theme="night"] .ft-card b { color: var(--text); }
.ft-card span { color: var(--muted); font-size: var(--fs-md, .92rem); }
.ft-out { display: grid; gap: var(--space-2); margin-top: var(--space-4); }
.ft-fmt { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--space-3); align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.ft-fmt span { font-size: var(--fs-xs, .78rem); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); grid-column: 1; }
.ft-fmt b { font-size: var(--fs-lg, 1.15rem); font-variant-numeric: tabular-nums; grid-column: 1; word-break: break-word; }
.ft-fmt small { color: var(--muted); grid-column: 1; }
.ft-fmt button { grid-column: 2; grid-row: 1 / span 3; }

.ft-verdict-head { display: flex; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }
.ft-verdict-head b { font-size: 1.6rem; letter-spacing: .04em; }
.ft-ok .ft-verdict-head b { color: var(--ok-text); } .ft-warn .ft-verdict-head b { color: var(--warn-text); } .ft-bad .ft-verdict-head b { color: var(--bad-text); }
.ft-verdict-head span { color: var(--muted); }
.ft-items { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: grid; gap: var(--space-2); }
.ft-items li { display: flex; gap: var(--space-3); align-items: flex-start; }
.ft-items li .badge { min-width: 52px; text-align: center; }
.ft-items li div { display: flex; flex-direction: column; } .ft-items li div span { color: var(--text-2); font-size: var(--fs-md, .92rem); }
.ft-pick { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ft-pick a { display: block; padding: 10px 12px; border-radius: var(--radius-sm); text-decoration: none; }
.ft-pick a:hover { background: var(--surface-2); }
.ft-bat-stats { grid-template-columns: repeat(2, 1fr); margin: var(--space-3) 0; }
.ft-bat-out .ft-verdict { padding: 0 0 0 12px; }
.ft-legend { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: var(--space-3); }
.ft-avail-wrap { padding: 0; overflow-x: auto; }
.ft-avail-tbl { border-collapse: separate; border-spacing: 0; width: 100%; }
.ft-avail-tbl th, .ft-avail-tbl td { text-align: center; padding: 6px 4px; white-space: nowrap; }
.ft-avail-tbl th[scope="row"] { text-align: left; padding-left: 14px; position: sticky; left: 0; background: var(--surface); z-index: 1;
  text-transform: none; letter-spacing: 0; font-size: var(--fs-md, .92rem); font-weight: 600; color: var(--text); }
.ft-avail-tbl tfoot th[scope="row"] { color: var(--muted); font-size: var(--fs-xs, .78rem); }
.ft-avail-tbl .wkend { background: var(--surface-2); }
.ft-avail-tbl tr.me th[scope="row"] { font-weight: 700; }
.av { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--radius-sm, 8px); border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); font-weight: 700; font: inherit; font-weight: 700; padding: 0; }
button.av { cursor: pointer; } button.av:focus-visible { outline: none; box-shadow: var(--ring); }
.av-available { background: color-mix(in srgb, var(--ok) 18%, var(--surface)); color: var(--ok-text); border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); }
.av-limited { background: color-mix(in srgb, var(--warn) 18%, var(--surface)); color: var(--warn-text); border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); }
.av-away { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad-text); border-color: color-mix(in srgb, var(--bad) 40%, var(--border)); }
.av.oncall, .av-oncall { box-shadow: inset 0 -3px 0 var(--accent); }
.ft-count { font-weight: 700; font-variant-numeric: tabular-nums; } .ft-count.low { color: var(--bad-text); }
.ft-feed { width: 100%; margin-top: var(--space-2); font-family: ui-monospace, monospace; font-size: var(--fs-sm, .85rem); }
tr.past td { color: var(--muted); }
@media (max-width: 760px) { .layout-2 { grid-template-columns: 1fr; } .ft-fmt b { font-size: var(--fs-base, 1rem); } }

/* kneeboard card: A5 portrait, black on white whatever the theme */
.kb-print { background: #e9ecf1; color: #111; margin: 0; padding: 16px; }
.kb-bar { max-width: 148mm; margin: 0 auto 12px; display: flex; gap: 12px; align-items: center; }
.kb-card { box-sizing: border-box; width: 148mm; min-height: 210mm; margin: 0 auto; padding: 8mm; background: #fff; color: #111; font-size: 10.5pt; line-height: 1.35;
  display: flex; flex-direction: column; gap: 4mm; box-shadow: var(--shadow-2, 0 4px 14px rgba(11,31,58,.14)); }
.kb-card h2 { font-size: 9pt; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 1.5mm; color: #333; border-bottom: 1px solid #999; padding-bottom: 1mm; }
.kb-head { display: flex; justify-content: space-between; gap: 4mm; border-bottom: 2px solid #111; padding-bottom: 2mm; }
.kb-head b { display: block; font-size: 14pt; } .kb-head span, .kb-op span { color: #444; font-size: 9pt; } .kb-op { text-align: right; font-size: 9.5pt; }
.kb-emerg { display: grid; grid-template-columns: auto 1fr; gap: 1mm 4mm; border: 2px solid #b00020; border-radius: 2mm; padding: 2mm 3mm; }
.kb-emerg span { color: #b00020; font-weight: 700; font-size: 9pt; text-transform: uppercase; align-self: center; } .kb-emerg b { font-size: 12pt; }
.kb-tbl { width: 100%; border-collapse: collapse; } .kb-tbl th, .kb-tbl td { text-align: left; padding: .8mm 0; vertical-align: top; border-bottom: 1px dotted #bbb; }
.kb-tbl th { font-weight: 600; width: 45%; padding-right: 3mm; } .kb-tbl td { font-variant-numeric: tabular-nums; font-family: ui-monospace, Menlo, monospace; font-size: 10pt; }
.kb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; } .kb-two .kb-tbl th { width: auto; }
.kb-pre { white-space: pre-wrap; margin: 0; }
.kb-notes { flex: 1; display: flex; flex-direction: column; } .kb-lines { flex: 1; min-height: 25mm; background: repeating-linear-gradient(#fff 0 7mm, #ccc 7mm calc(7mm + 1px)); }
.kb-foot { font-size: 8pt; color: #555; }
@media print { @page { size: A5 portrait; margin: 0; } .kb-print { background: #fff; padding: 0; } .kb-card { box-shadow: none; width: 148mm; min-height: 209mm; } .no-print { display: none !important; } }
@media (max-width: 600px) { .kb-print { padding: 0; } .kb-card { width: 100%; min-height: 0; padding: 16px; } .kb-two { grid-template-columns: 1fr; } }

/* DJI Pilot 2 card on job / mission pages (templates/dji/_mission.html) */
.dji-live { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: var(--space-2); margin-bottom: var(--space-3); }
.dji-live > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; }
.dji-live span { font-size: var(--fs-xs, .78rem); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.dji-live b { font-size: var(--fs-lg, 1.15rem); font-variant-numeric: tabular-nums; }
 .dji-live.stale { opacity: .7; }
.dji-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-2) 0 var(--space-3); }
.dji-routes { list-style: none; margin: 0 0 var(--space-2); padding: 0; display: grid; gap: 6px; }
.dji-routes li { display: flex; flex-direction: column; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.dji-url { word-break: break-all; }
.dm-job { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 8px 10px; margin: 0 0 var(--space-2); }
@media (max-width: 600px) { .dji-live { grid-template-columns: 1fr 1fr; } .dji-live > div:first-child { grid-column: 1 / -1; } }

/* ---- running a checklist (admin/checklist_run.html) --------------------------------------------------------------------- */
.cr-page { max-width: 820px; }
.cr-progress { position: sticky; top: calc(var(--bar-h, 56px) + 8px); z-index: 5; display: flex; align-items: center; gap: var(--space-4); padding: 12px 16px; margin-bottom: var(--space-4);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.cr-count { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.cr-count b { font-size: 1.6rem; font-variant-numeric: tabular-nums; line-height: 1; }
.cr-count span { color: var(--muted); font-size: var(--fs-md, .92rem); }
.cr-bar { flex: 1; height: 10px; background: var(--surface-2); border-radius: var(--radius-pill, 999px); overflow: hidden; border: 1px solid var(--border); }
.cr-bar div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.cr-bar.full div { background: var(--ok); }
.cr-context summary { display: flex; justify-content: space-between; gap: var(--space-3); cursor: pointer; list-style: none; }
.cr-context summary::-webkit-details-marker { display: none; }
.cr-context[open] summary { margin-bottom: var(--space-3); }
.cr-items { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: grid; gap: var(--space-2); }
.cr-item { display: flex; align-items: center; gap: var(--space-3); min-height: 56px; padding: 12px 16px; margin: 0; cursor: pointer; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .15s, background .15s; }
.cr-item:hover { border-color: var(--accent); }
.cr-item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cr-tick { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; transition: all .15s; }
.cr-item input:checked ~ .cr-tick { background: var(--ok); border-color: var(--ok); }
.cr-item input:checked ~ .cr-tick::after { content: ""; width: 7px; height: 13px; border: solid #fff; border-width: 0 3px 3px 0; transform: translateY(-2px) rotate(45deg); }
.cr-item input:focus-visible ~ .cr-tick { box-shadow: var(--ring); }
.cr-n { flex: none; min-width: 1.6em; color: var(--muted); font-variant-numeric: tabular-nums; font-size: var(--fs-sm, .85rem); }
.cr-text { flex: 1; line-height: 1.4; }
.cr-item:has(input:checked) { background: color-mix(in srgb, var(--ok) 8%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.cr-item:has(input:checked) .cr-text { color: var(--text-2); }
.cr-save { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
@media (max-width: 600px) { .cr-progress { top: var(--bar-h, 56px); gap: var(--space-3); padding: 10px 12px; } .cr-item { padding: 12px; } }

/* ---- Settings > Devices --------------------------------------------------------------------------------------------- */
.dv-stats { grid-template-columns: repeat(3, 1fr); }
.dv-h { font-size: var(--fs-lg, 1.15rem); margin: 0 0 var(--space-3); }
.dv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-4); }
.dv-card { margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }

.dv-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); }
.dv-scopes { border: 0; padding: 0; margin: 0; display: grid; gap: 4px; }
.dv-scopes legend { color: var(--muted); padding: 0; margin-bottom: 4px; }
.dv-actions { margin-top: auto; }
.dv-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: 12px 0; border-bottom: 1px solid var(--border); }
.dv-row:last-child { border-bottom: 0; }
.dv-row > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dv-revoke { color: var(--bad-text); border-color: color-mix(in srgb, var(--bad) 40%, var(--border)); }
.dv-code { font-size: var(--fs-lg, 1.15rem); letter-spacing: .04em; user-select: all; }
.dv-enrol code { word-break: break-all; }
@media (max-width: 760px) { .dv-stats { grid-template-columns: repeat(3, 1fr); } .dv-row { flex-direction: column; align-items: stretch; } }

/* ---- small Settings pages: retention, single sign-on, backup, legal --------------------------------------------------- */
.narrow-page, .rt-page { max-width: 820px; }
.legal-page { max-width: 900px; }
.btn-row { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.btn-row.spread { justify-content: space-between; }
.btn-stack { display: grid; gap: var(--space-2); }
.rt-years { width: 90px !important; flex: none; }
.rt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.rt-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.rt-tile span { font-size: var(--fs-sm, .85rem); color: var(--text-2); line-height: 1.3; }
.rt-tile b { font-size: 1.6rem; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: auto; }
.rt-tile small { color: var(--muted); font-size: var(--fs-xs, .78rem); }
.legal-text { min-height: 520px; font-family: var(--mono, ui-monospace, monospace); font-size: var(--fs-sm, .85rem); }
.seg-gap { margin: 0 0 var(--space-4); }
.page-head .btn-row select { width: auto; min-width: 0; }

/* action rows (status board, SAR page, incident header): chips and buttons centred on one line, even gaps, same height */
.head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.head-actions > form.inline { display: flex; margin: 0; }

/* All drones land: two steps - the red button opens a confirm box; only Send posts (incident header, far right) */

/* Holds (stop a launch) and Outstanding (reminders) on the incident page */

/* crew & kit checks on the incident Flying tab: a card per person, check name and detail in aligned columns */
.cc-list { display: grid; gap: var(--space-3); margin-bottom: var(--space-4); }
.cc-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); }


/* fit-to-fly declaration: labels above fields, two even columns, switches in one column */
.fitness-form .fit-hours { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 12px 16px; margin: 10px 0 6px; }
.fitness-form .fit-hours .field { margin: 0; }
.fitness-form .fit-hours input { width: 100%; }
.fitness-form .fit-checks { display: grid; gap: 6px; margin: 8px 0 12px; }
.fitness-form .fit-checks .check-row { margin: 0; }
@media (max-width: 480px) { .fitness-form .fit-hours { grid-template-columns: 1fr 1fr; } }
.sso-prov .panel-head h2 { display: flex; align-items: center; gap: 8px; }
.sso-uri { user-select: all; word-break: break-all; font-size: var(--fs-md, .92rem); }
.sso-steps { padding-left: 20px; display: grid; gap: 6px; }
/* incident header: the action row spans the width; All drones land sits apart at the far right */
.inc-head .head-actions { flex: 1 1 100%; }

.sb-custom-pop { min-width: 260px; padding: 12px 14px; display: grid; gap: 6px; right: 0; left: auto; }
.sb-custom-pop .check-row { margin: 0; }

/* Scene conditions (incident side column): daylight tile and one row per hour, green / amber / red against the wind limit */
.sc-day { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 12px; }
.sc-day span { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.sc-day b { font-size: var(--fs-xl, 1.32rem); font-variant-numeric: tabular-nums; }
.sc-day small { color: var(--text-2); }
.sc-sub { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 0 6px; font-size: var(--fs-md, .92rem); }
.sc-hours { display: grid; gap: 6px; }
.sc-hr { display: grid; grid-template-columns: 3.2em 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); font-variant-numeric: tabular-nums; }
.sc-t { grid-row: 1 / span 2; font-weight: 700; }
.sc-w { display: flex; align-items: center; gap: 6px; } .sc-w b { font-size: var(--fs-base, 1rem); } .sc-w small { color: var(--muted); }
.sc-arrow { display: inline-block; font-style: normal; font-weight: 700; width: 1em; text-align: center; color: var(--text-2); }
.sc-g { display: flex; flex-direction: column; align-items: flex-end; grid-row: 1 / span 2; } .sc-g small { color: var(--muted); font-size: .72rem; } .sc-g b { font-size: var(--fs-base, 1rem); }
.sc-x { display: flex; gap: 10px; color: var(--muted); }

.sc-hr.st-warn, .sc-day.st-warn { background: var(--tint-warn, color-mix(in srgb, var(--warn) 8%, var(--surface))); }
.sc-hr.st-bad, .sc-day.st-bad { background: var(--tint-bad, color-mix(in srgb, var(--bad) 8%, var(--surface))); }
.sc-hr.st-warn .sc-g b, .sc-hr.st-warn .sc-w b { color: var(--warn-text); } .sc-hr.st-bad .sc-g b, .sc-hr.st-bad .sc-w b { color: var(--bad-text); }
.sc-key { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); margin: 8px 0 10px; }
.sc-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: var(--fs-sm, .85rem); }
.sc-facts dt { font-weight: 600; } .sc-facts dd { margin: 0; color: var(--text-2); }
.sc-t { grid-column: 1; } .sc-w { grid-column: 2; grid-row: 1; } .sc-x { grid-column: 2; grid-row: 2; } .sc-g { grid-column: 3; }

/* ---- platform admin shell (templates/platform/base.html) --------------------------------------------------------------- */
.pf-shell { background: var(--bg); min-height: 100vh; }
.pf-top { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--border); }
.pf-top-inner { display: flex; align-items: center; gap: var(--space-4); min-height: 60px; flex-wrap: wrap; }
.pf-brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: var(--fs-base, 1rem); white-space: nowrap; }
.pf-brand b { color: var(--accent); font-weight: 800; }
.pf-nav[aria-label="Platform"] { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap;
  justify-content: flex-start; margin: 0; padding: 0; border-top: 0; }   /* not the portfolio page's prev / next bar of the same name */
.pf-nav[aria-label="Platform"] a { padding: 7px 9px !important; font-size: var(--fs-md, .92rem); }
@media (min-width: 861px) { .pf-top-inner { max-width: 1440px; } }
@media (min-width: 861px) and (max-width: 1180px) {                 /* tablets / small laptops: the menu gets its own row */
  .pf-nav[aria-label="Platform"] { order: 3; flex: 1 1 100%; padding-bottom: 6px; }
  .pf-top-inner { padding-top: 8px; }
}
@media (min-width: 861px) and (max-width: 1279px) {                 /* mid-size: the name block shrinks to "Account" so the menu fits */
  .pf-who b, .pf-who small { display: none; }
  a.pf-who::after { content: "Account"; font-weight: 600; font-size: var(--fs-sm, .85rem); }
}   /* the platform header uses the width it has, so its menu fits on one row */
.pf-nav::-webkit-scrollbar { display: none; }
.pf-nav a { padding: 8px 12px; border-radius: var(--radius-sm); color: var(--text-2); text-decoration: none; font-weight: 600; white-space: nowrap; }
.pf-nav a:hover { background: var(--surface-2); color: var(--text); }
.pf-nav a.on { background: var(--accent-soft); color: var(--accent-dark); }
html[data-theme="night"] .pf-nav a.on { color: #7fe0ae; }
.pf-me { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.pf-who { display: flex; flex-direction: column; line-height: 1.15; text-align: right; }
.pf-who small { color: var(--muted); font-size: var(--fs-xs, .78rem); }
.pf-shell main { padding-bottom: 48px; }
@media (max-width: 860px) {
  .pf-top-inner { padding-top: 8px; gap: 8px; }
  .pf-nav, .pf-nav[aria-label="Platform"] { order: 3; flex: 1 1 100%; padding-bottom: 6px; }   /* phones: the menu on its own row, swipe along it */
  .pf-who b, .pf-who small { display: none; }                     /* phones: just a small "Account" link */
  a.pf-who::after { content: "Account"; font-weight: 600; font-size: var(--fs-sm, .85rem); }
}
/* platform pages */
.pf-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pf-orgs { display: grid; gap: var(--space-3); }
.pf-org { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(70px, .6fr)) auto; gap: 12px; align-items: center; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none; }
.pf-org:hover { border-color: var(--accent); }

.pf-org-name b { display: block; font-size: var(--fs-base, 1rem); } .pf-org-name small { color: var(--muted); }
.pf-org-n { display: flex; flex-direction: column; } .pf-org-n b { font-variant-numeric: tabular-nums; } .pf-org-n small { color: var(--muted); font-size: var(--fs-xs, .78rem); text-transform: uppercase; letter-spacing: .04em; }
.pf-org-tags { display: grid; grid-auto-flow: column; grid-template-columns: 6.5rem 8.5rem; grid-auto-columns: max-content; gap: 6px; justify-content: end; align-items: center; }
.pf-org-tags > .badge:nth-child(-n+2) { justify-content: center; text-align: center; }   /* status and plan line up down the list */
.pf-filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: var(--space-3); }
.pf-filter input { max-width: 320px; }
.pf-danger { border-color: color-mix(in srgb, var(--bad) 40%, var(--border)); }
@media (max-width: 860px) { .pf-org { grid-template-columns: 1fr 1fr; } .pf-org-name { grid-column: 1 / -1; } .pf-org-tags { grid-column: 1 / -1; justify-content: flex-start; } }
.pf-reason { flex: 1 1 260px; max-width: 420px; }
.mod-core { margin-top: var(--space-5, 24px); }
.mod-tile { grid-template-rows: auto auto 1fr auto; grid-template-areas: "ico name" "ico act" "ico about" "ico more"; }
.mod-tile-more { grid-area: more; margin-top: 10px; font-weight: 600; min-width: 0; }   /* wraps between words in a narrow tile on a phone */

/* jumping to a section (#links, "What's included", the page index): stop below the pinned header and section tabs, so the
   section's own heading is in view */
html { scroll-padding-top: 120px; }
html:has(body.pf-shell) { scroll-padding-top: 80px; }
@media (max-width: 760px) { html { scroll-padding-top: 140px; } }

/* ---- lessons learned (ops/lessons.html, ops/lesson.html) ------------------------------------------------------------ */
.ll-list { display: grid; gap: var(--space-3); }
.ll-card { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none; }
.ll-card:hover { border-color: var(--accent); }

.ll-thumb { width: 72px; height: 54px; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); }
.ll-thumb-none { display: grid; place-items: center; font-size: 1.4rem; }
.ll-card.ll-nothumb { grid-template-columns: 1fr auto; }   /* a lesson with no picture: no grey box (w-42) */
.ll-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; } .ll-body b { font-size: var(--fs-base, 1rem); }
.ll-sum { color: var(--text-2); }
.ll-state { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.ll-links { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: grid; gap: 6px; }
.ll-links li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.ll-links li div { display: flex; flex-direction: column; min-width: 0; }
.ll-linkform { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ll-linkform select { flex: 1 1 200px; min-width: 0; }
.ll-linkform select[name="kind"] { flex: 0 0 auto; }
.ll-wx { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; }

.ll-map { aspect-ratio: 4 / 3; max-height: 60vh; min-height: 280px; width: 100%; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.ll-mapform { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.ll-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: var(--space-3); }
.ll-fig { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.ll-fig img, .ll-fig video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); background: #000; display: block; }
.ll-fig figcaption { display: flex; flex-direction: column; gap: 3px; font-size: var(--fs-sm, .85rem); }
.ll-fig-act { display: flex; gap: 4px; flex-wrap: wrap; }
.ll-cap { display: inline-block; } .ll-cap > summary { list-style: none; } .ll-cap > summary::-webkit-details-marker { display: none; }
.ll-cap form { display: flex; gap: 4px; margin-top: 4px; }
.ll-upload { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ll-upload p { flex-basis: 100%; margin: 0; }
/* the annotation window */
.ann-dlg { width: min(1100px, 96vw); max-height: 94vh; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); }
.ann-dlg::backdrop { background: rgba(0, 0, 0, .7); }
.ann-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.ann-spacer { flex: 1; }
.ann-cols { display: flex; gap: 6px; }
.ann-cols button { width: 28px; height: 28px; border-radius: 50%; background: var(--c); border: 2px solid var(--border); cursor: pointer; padding: 0; }
.ann-cols button.on { box-shadow: 0 0 0 3px var(--accent); }
.ann-stage { padding: 10px; display: grid; place-items: center; background: #111; max-height: calc(94vh - 120px); overflow: auto; }
.ann-stage canvas { max-width: 100%; max-height: calc(94vh - 140px); touch-action: none; cursor: crosshair; }
.ann-msg { padding: 6px 12px 10px; margin: 0; }
@media (max-width: 600px) { .ll-card { grid-template-columns: 56px 1fr; } .ll-state { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; } .ll-thumb { width: 56px; height: 42px; } .ll-card.ll-nothumb { grid-template-columns: 1fr; } }
/* live video on the DJI Pilot 2 mission card */
.dji-video { margin: 0 0 var(--space-3); }
.dji-vform { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dji-player { margin-top: 10px; }
.dji-player video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); display: block; }
.dji-player p { margin: 6px 0 0; }

/* ---- share live video (templates/_video_share.html, watch.html) ---------------------------------------------------------- */
.vs-box { margin-top: var(--space-3); border-top: 1px solid var(--border); padding-top: var(--space-3); }
.vs-box > summary { cursor: pointer; }
.vs-new { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 10px 12px; margin: 10px 0; }
.vs-pin { font-size: var(--fs-lg, 1.15rem); letter-spacing: .15em; }
.vs-url { width: 100%; font-family: var(--mono, ui-monospace, monospace); font-size: var(--fs-sm, .85rem); user-select: all; }
.vs-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.vs-row div { display: flex; flex-direction: column; min-width: 0; }
.vs-revoke { color: var(--bad-text); }
.vs-form { margin-top: 10px; }
.watch-page { background: #1c1c1e; color: #f2f2f2; min-height: 100vh; margin: 0; }
.watch-wrap { max-width: 1000px; margin: 0 auto; padding: 16px; display: grid; gap: 12px; align-content: start; }
.watch-logo { display: block; max-height: 44px; max-width: 200px; margin: 0 0 14px; }
.watch-contact { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.watch-card { max-width: 420px; margin: 12vh auto 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.watch-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.watch-head div { display: flex; flex-direction: column; }
.watch-video video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); display: block; }
.watch-map { height: 280px; border-radius: var(--radius); overflow: hidden; border: 1px solid #243040; }
.watch-foot { text-align: center; }

/* the organisation's own name and logo in the header (Settings > Your name and logo in the app) */
.org-badge { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 260px; padding: 4px 12px 4px 6px; margin-left: 4px;
  border-left: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 700; font-size: var(--fs-md, .92rem); line-height: 1.15; }
.org-badge img { height: 34px; width: auto; max-width: 90px; object-fit: contain; border-radius: var(--radius-sm, 8px); }
.org-badge span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (max-width: 760px) { .org-badge { max-width: 130px; font-size: var(--fs-xs, .78rem); padding-right: 6px; } .org-badge img { height: 28px; max-width: 60px; } }
.brand-set { display: grid; grid-template-columns: minmax(180px, auto) 1fr; gap: 16px; align-items: start; margin-bottom: 10px; }
.brand-prev { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px dashed var(--border); border-radius: var(--radius); }
.brand-prev img { height: 44px; width: auto; max-width: 120px; object-fit: contain; }
@media (max-width: 600px) { .brand-set { grid-template-columns: 1fr; } }
@media (max-width: 1440px) and (min-width: 761px) { .org-badge { max-width: 170px; font-size: var(--fs-sm, .85rem); } }
/* the organisation's badge is on: the platform wordmark is always its small icon, so the name and the menu share one line */
body.staff.has-org .brand-logo, html[data-theme="night"] body.staff.has-org .brand-logo.logo-night { display: none !important; }
body.staff.has-org .brand-mark:not(.logo-night) { display: block !important; }
html[data-theme="night"] body.staff.has-org .brand-mark.logo-day { display: none !important; }
html[data-theme="night"] body.staff.has-org .brand-mark.logo-night { display: block !important; }
body.has-org .mainnav { flex-wrap: nowrap; }

/* "Hide the platform logo": only the organisation's own name and logo in the header */
body.org-only .topbar .brand { display: none !important; }
body.org-only .org-badge { border-left: 0; margin-left: 0; padding-left: 0; }
/* phones: the organisation's logo alone in the header (no name, no platform logo); without a logo, the usual platform logo */
@media (max-width: 760px) {
  .org-badge span { display: none; }
  body.has-org:not(.has-org-logo) .org-badge { display: none; }
  body.org-only:not(.has-org-logo) .topbar .brand { display: flex !important; }
  body.has-org.has-org-logo .topbar .brand { display: none !important; }
  body.has-org.has-org-logo .org-badge { border-left: 0; margin-left: 0; padding: 0; flex: none; max-width: 84px; }
  body.has-org.has-org-logo .org-badge img { height: 32px; max-width: 84px; }
}
/* Platform control > Graduate Beta modules */
.grad-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--border); }
/* status board > Customise: show, where, order */
.sb-custom-pop { min-width: min(460px, 92vw); }
.sb-order { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 6px; max-height: 60vh; overflow: auto; }
.sb-order li { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.sb-order .sb-o-name { margin: 0; display: flex; align-items: center; gap: 8px; }
.sb-order select { width: auto; min-width: 0; }
.sb-o-move { display: flex; gap: 4px; }
.sb-top { margin-bottom: var(--space-4); }
.sb-top .panel { margin-bottom: 0; }
@media (max-width: 520px) { .sb-order li { grid-template-columns: 1fr auto; } .sb-order select { grid-column: 1; } .sb-o-move { grid-row: 1 / span 2; grid-column: 2; flex-direction: column; } }
/* Ranks: the rank x action matrix */
.rk-matrix .rk-group th { background: var(--surface-2, rgba(127,127,127,.08)); text-align: left; font-size: var(--fs-xs, .78rem); text-transform: uppercase; letter-spacing: .04em; }
/* Today: finish setting up */
.setup-card { margin-bottom: var(--space-4); }
.setup-bar { height: 8px; border-radius: 4px; background: rgba(127,127,127,.18); overflow: hidden; margin: 4px 0 10px; }
.setup-bar span { display: block; height: 100%; background: var(--accent, #0f7a4c); }
.setup-card .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #f2a900; vertical-align: middle; }
.setup-card .dot.bad { background: var(--mk-bad, #c62828); }
.setup-card .plain-list { list-style: none; padding-left: 0; }   /* the coloured dot is the marker */
/* Phones: a table not inside .table-wrap (which stacks or scrolls already) scrolls sideways instead of widening the page */

/* Platform: one organisation's pages as tabs */
.pf-org-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border, rgba(127,127,127,.25)); margin: 0 0 var(--space-4); }
.pf-org-tabs a { padding: 8px 14px; border-radius: 8px 8px 0 0; text-decoration: none; color: inherit; opacity: .75; }
.pf-org-tabs a.on { opacity: 1; font-weight: 600; border: 1px solid var(--border, rgba(127,127,127,.25)); border-bottom-color: var(--bg, #fff); margin-bottom: -1px; background: var(--bg, #fff); }
.input-suffix { display: flex; align-items: center; gap: 6px; }
.input-suffix input { flex: 1; min-width: 0; }
.input-suffix span { white-space: nowrap; opacity: .7; }
/* Settings: one page per section */
/* SAR inbound tasking */

.ti-req { padding: 12px 0; border-top: 1px solid rgba(127,127,127,.18); }
.ti-req.ti-new { padding-left: 12px; }
.ti-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.ti-facts { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 8px 0; }
.ti-facts dt { font-weight: 600; opacity: .75; }
.ti-facts dd { margin: 0; }

.ti-link { word-break: break-all; }
/* Phones and tablets: the open menu stops above the bottom app bar (and Safari's own toolbar - dvh is the space actually
   visible), so its last items (the end of Settings) can be scrolled to and tapped; dragging it doesn't move the page behind */
@media (max-width: 1180px) {
  .mainnav { max-height: calc(100vh - 56px); max-height: calc(100dvh - 56px); overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}
@media (max-width: 1024px), (max-width: 1366px) and (pointer: coarse) {
  body.has-app-bar .mainnav { max-height: calc(100vh - 56px - 64px - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 56px - 64px - env(safe-area-inset-bottom)); }
}
/* Platform control: early access as one table, one Save */
.ea-table th.ea-org, .ea-table td.ea-org { text-align: center; min-width: 110px; }
.ea-table th.ea-org { font-size: var(--fs-xs, .78rem); line-height: 1.2; }
.ea-table td:first-child { min-width: 260px; }
/* Platform control: the change log as readable lines */
.clog { list-style: none; margin: 0; padding: 0; }
.clog li { display: grid; grid-template-columns: 150px 1fr; gap: 2px 14px; padding: 9px 0; border-top: 1px solid rgba(127,127,127,.18); }
.clog li:first-child { border-top: 0; }
.clog-when { white-space: nowrap; font-variant-numeric: tabular-nums; font-size: var(--fs-sm, .85rem); opacity: .8; grid-row: span 2; }
.clog-chg { margin-left: 6px; font-size: var(--fs-sm, .85rem); }
.clog-chg s { opacity: .6; }
.clog-what { min-width: 0; overflow-wrap: anywhere; }
.clog-who { grid-column: 2; }
@media (max-width: 640px) { .clog li { grid-template-columns: 1fr; } .clog-when { grid-row: auto; } .clog-who { grid-column: 1; } }
/* Maintenance banner: three styles, an optional hide button, the preview on Platform control */
.maint-strip { display: flex; align-items: center; justify-content: center; gap: 10px; }
.maint-strip.maint-info { background: #1f5f99; }
.maint-strip.maint-warn { background: #8a5a00; }
.maint-strip.maint-bad { background: var(--mk-bad, #c62828); }
.maint-x { background: none; border: 0; color: inherit; font-size: var(--fs-lg, 1.15rem); line-height: 1; cursor: pointer; padding: 0 4px; opacity: .85; }
.bn-preview { border-radius: var(--radius-sm, 8px); margin: 4px 0 0; }
/* Two-pilot split: - and + either side of the slider, 10% a tap */
.ts-row { display: flex; align-items: center; gap: 10px; }
.ts-row input[type=range] { flex: 1; }
.ts-step { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface, #fff); color: inherit;
  font-size: var(--fs-xl, 1.32rem); font-weight: 700; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.ts-step:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.ts-step:disabled { opacity: .35; cursor: default; }
/* Sign-up: the field only bots fill in */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Ground school: course list filters and the bulk bar */
.gs-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.gs-filter .seg { display: flex; flex-wrap: wrap; gap: 4px; }
.gs-filter .seg a { padding: 6px 12px; border-radius: var(--radius-pill, 999px); border: 1px solid var(--border); text-decoration: none; color: inherit; font-size: var(--fs-sm, .85rem); }
.gs-filter .seg a.on { background: var(--accent); color: var(--on-accent, #fff); border-color: transparent; }
.gs-filter .seg a.on .muted { color: rgba(255,255,255,.8); }
.gs-filter input[type=search] { max-width: 240px; }
.gs-bulkbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
/* The organisation's manual: readable on screen, tidy when printed */
.manual h2.manual-h { margin: var(--space-5) 0 var(--space-3); }
.manual-toc ol { margin: 6px 0 0; padding-left: 20px; } .manual-toc ol ol { columns: 2; font-size: var(--fs-md, .92rem); }
.manual-mod { padding: 12px 0; border-top: 1px solid rgba(127,127,127,.18); } .manual-mod:first-of-type { border-top: 0; }
.manual-mod h4 { margin: 0 0 4px; font-size: var(--fs-base, 1rem); } .manual-mod p { margin: 0 0 6px; }
.manual-facts { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 0; }
.manual-facts dt { font-weight: 600; opacity: .7; } .manual-facts dd { margin: 0; }
.manual-avail { padding-left: 18px; } .manual-avail li { margin-bottom: 8px; }
.manual-steps { padding-left: 22px; margin: 6px 0 10px; } .manual-steps li { margin-bottom: 6px; line-height: 1.5; }
.manual-where { display: block; font-size: var(--fs-sm, .85rem); opacity: .7; } .manual-where::before { content: "Where: "; font-weight: 600; }
.manual-tip { margin: 6px 0 0; padding: 8px 12px; background: rgba(127,127,127,.08); border-radius: var(--radius-sm, 8px); font-size: var(--fs-md, .92rem); }
.manual-sec { margin: 16px 0 2px; font-size: var(--fs-xs, .78rem); text-transform: uppercase; letter-spacing: .06em; opacity: .65; }
.manual-mod h4 a { color: inherit; } .manual h3 .muted { font-weight: 400; }
@media print {
  .manual .panel { box-shadow: none; border: 0; padding: 0; break-inside: auto; }
  .manual-mod { break-inside: avoid; }
  .manual section { break-before: page; } .manual section#start { break-before: auto; }
}
/* Help centre */
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-4); }
a.help-card { text-decoration: none; color: inherit; display: block; } a.help-card:hover { border-color: var(--accent); }
.help-go { color: var(--accent); font-weight: 600; }
/* Platform: requests */
.pf-count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #f2a900; color: #000; font-size: .72rem; font-weight: 700; text-align: center; }
.req-grant { display: grid; gap: 4px; margin: 8px 0; }
.req-grant input[type=date] { width: auto; display: inline-block; margin-left: 6px; }
/* Airspace filings: the request text as it will be sent */
.af-text { white-space: pre-wrap; font-size: var(--fs-sm, .85rem); background: var(--surface-2, rgba(127,127,127,.08)); padding: 10px 12px; border-radius: var(--radius-sm, 8px); max-height: 320px; overflow: auto; }
/* Header: Help, and who's signed in at the top of the Settings menu */

.menu-me { display: flex; align-items: center; gap: 10px; padding: 8px 12px 6px; }
.me-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent, #fff);
  font-weight: 700; font-size: var(--fs-xs, .78rem); letter-spacing: .02em; }
.me-who { display: grid; min-width: 0; line-height: 1.25; }
.me-who b { font-size: var(--fs-md, .92rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-who > span { font-size: var(--fs-xs, .78rem); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px 12px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.nav-menu .me-links a { display: block; text-align: center; padding: 6px 8px !important; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); font-size: var(--fs-sm, .85rem); font-weight: 600; }
.nav-menu .me-links a.me-portal, .me-links .mr-row:has(.me-portal) { grid-column: 1 / -1; }
.me-links .me-reset { grid-column: 1 / -1; margin: 0; }
.me-links .me-reset button { width: 100%; min-height: 36px; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); color: var(--text); font: inherit; font-size: var(--fs-sm, .85rem); font-weight: 600; cursor: pointer; }
/* your own menu order: press and hold a page (or an area) in the side menu, then drag it (js/menuorder.js, 17 Nov 2026) */
.mrail .mr-link, .mrail .mr-item { -webkit-touch-callout: none; }
.mrail.mo-on, .mrail.mo-on * { user-select: none; -webkit-user-select: none; cursor: grabbing !important; }
.mrail .mo-lift { position: relative; z-index: 2; background: var(--surface-2); border-radius: var(--radius-sm, 8px); box-shadow: var(--shadow-3, 0 12px 32px rgba(10,16,24,.24)); outline: 2px solid var(--accent); outline-offset: -2px; }
.mrail .mo-pressing { background: var(--surface-2); border-radius: var(--radius-sm, 8px); transition: background .4s; }
.mo-tip { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 9999; padding: 10px 16px; border-radius: var(--radius-sm, 8px); background: var(--text); color: var(--bg); font-size: var(--fs-md, .92rem); box-shadow: var(--shadow-3, 0 12px 32px rgba(10,16,24,.24)); }
@media (prefers-reduced-motion: reduce) { .mrail .mo-pressing { transition: none; } }
/* First sign-in tour */
.tour { position: fixed; inset: 0; background: rgba(10,20,30,.45); z-index: 200; display: grid; place-items: center; padding: 16px; }
.tour-card { background: var(--bg, #fff); color: inherit; border-radius: var(--radius, 12px); padding: 20px 22px; max-width: 440px; box-shadow: var(--shadow-3, 0 12px 32px rgba(10,16,24,.24)); }
.tour-card h2 { margin: 2px 0 8px; }
/* Laptop widths: the full menu stays on one line (tighter spacing; the rules badge folds into a smaller pill) */
@media (min-width: 1181px) and (max-width: 1560px) {
  .mainnav { gap: 2px; }
  .mainnav a:not(.btn) { padding: 8px 7px; font-size: var(--fs-sm, .85rem); }
  .mainnav .caret { margin-left: 1px; }
}

/* Fleet health: small trend lines beside the latest figure */
.health-table td.trend { white-space: nowrap; } .health-table .spark { vertical-align: middle; margin-right: 6px; color: var(--accent, #2f7d5b); }
@media (max-width: 700px) { .health-table td.trend { white-space: normal; grid-column: 1 / -1; flex-wrap: wrap; } .health-table td.trend .spark { max-width: 100%; height: auto; } .health-table td.trend > .small { display: block; margin-top: 2px; } }   /* w-7, w-43: the figure under its line on a phone, never cut off */

/* The public status page */
.status-overall { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: var(--radius-sm, 8px); margin: 0 0 var(--space-4); font-size: var(--fs-lg, 1.15rem); }
.status-overall.status-ok { background: rgba(47,125,91,.12); } .status-overall.status-warn { background: rgba(217,150,20,.15); }
.status-overall.status-bad { background: rgba(200,50,50,.14); } .status-overall.status-info { background: rgba(40,110,200,.12); }
.status-list { list-style: none; margin: 0; padding: 0; } .status-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid rgba(127,127,127,.18); }
.status-list li:first-child { border-top: 0; } .status-name { flex: 1; } .status-state { font-size: var(--fs-md, .92rem); opacity: .8; }
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #2f7d5b; flex: none; }
.status-dot.status-warn { background: #d99614; } .status-dot.status-bad { background: #c83232; } .status-dot.status-info { background: #2a6ec8; }
.status-updates { padding-left: 18px; } .status-updates li { margin-bottom: 8px; }

/* Benchmarking: the group's middle half (band), median (line) and you (dot) */

/* Inside the phone app: every page's top bar sits below the clock and camera notch (the app draws edge to edge) */
html.in-app .topbar { padding-top: env(safe-area-inset-top); }

/* Phones (and the phone apps): the top bar always fits on one row with the menu button showing - Help and Night mode
   live in the menu here (Settings), the logo is capped, and the buttons are a little tighter */
@media (max-width: 600px) {
   body.staff .top-icons > #theme-toggle { display: none !important; }
  body.staff .topbar-inner { gap: 4px; }
  body.staff .top-icons { gap: 4px; }
  body.staff .brand img, body.staff .org-badge img { max-width: 84px; max-height: 34px; object-fit: contain; }
  body.staff .org-badge span { display: none; }
  body.staff .theme-toggle, body.staff .burger { width: 34px; height: 34px; }
}
@media (max-width: 600px) {          /* ...so the menu's Night mode button shows on phones (offline stays in the top bar) */
  body.staff .menu-tools { display: block; }
  body.staff .menu-tools > .menu-offline { display: none; }
}
/* ...and the phone menu opens below that taller top bar, not under the clock */
@media (max-width: 1024px), (max-width: 1366px) and (pointer: coarse) {
  html.in-app .mainnav { top: calc(56px + env(safe-area-inset-top)); max-height: calc(100dvh - 56px - env(safe-area-inset-top)); }
  html.in-app body.has-app-bar .mainnav { max-height: calc(100dvh - 56px - 64px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
}

/* ---- SAR: a tasking request waiting for a decision - one line under the top bar on every page (droneops/sar/tasking.py) ---- */
.tasking-strip { display: block; padding: 7px 0; text-decoration: none;
  background: color-mix(in srgb, var(--warn) 18%, var(--surface)); color: inherit; border-bottom: 1px solid color-mix(in srgb, var(--warn) 45%, var(--border));
  font-size: var(--fs-sm, .85rem); line-height: 1.3; }
.tasking-strip .ts-inner { display: flex; align-items: center; gap: 10px; min-width: 0; }   /* lines up with the page's content column */
.tasking-strip.is-urgent { background: var(--bad); color: var(--on-mk, #fff); border-bottom-color: var(--bad); }
.tasking-strip.is-live { background: #1b4f8a; color: #fff; border-bottom-color: #1b4f8a; }   /* same blue day and night */
.tasking-strip.is-exercise { background: color-mix(in srgb, var(--muted) 22%, var(--surface)); border-bottom-color: var(--border); }
.tasking-strip.is-live .ts-dot, .tasking-strip.is-exercise .ts-dot { animation: none; }
.tasking-strip:hover { filter: brightness(1.04); }
.ts-label { flex: none; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: var(--fs-xs, .78rem); }
.ts-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; animation: ts-pulse 1.4s ease-in-out infinite; }
@keyframes ts-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .ts-dot { animation: none; } }
.ts-text { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-more { flex: none; font-size: var(--fs-xs, .78rem); font-weight: 600; opacity: .9; }
.ts-open { flex: none; font-weight: 700; white-space: nowrap; }
/* Platform admin > Control > Kill switches: one fold per module group */

/* ---- accessibility: keyboard users always see where they are; a skip link straight past the menus ---- */
button:focus-visible, [role="button"]:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 300; background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: var(--radius-sm, 8px);
  border: 2px solid var(--accent); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 8px; }
main:focus { outline: none; }
/* ---- Notes: the same section on jobs, missions, taskings, incidents and occurrences (templates/_notes.html) ---- */
.note-add { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; margin-bottom: 10px; }
.note-add textarea { min-height: 44px; resize: vertical; }
.note-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.note-list li { border-left: 3px solid var(--border); padding: 4px 0 4px 10px; }
.note-meta { font-size: var(--fs-xs, .78rem); color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; }
.note-meta b { color: var(--text); }
.note-body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.note-del { display: inline; margin-left: auto; }
.note-empty { border-left: 0 !important; padding-left: 0 !important; }
@media (max-width: 600px) { .note-add { grid-template-columns: 1fr; } }
/* ---- What's new (droneops/platform/whatsnew.py) ---- */
.wn-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.wn-item:last-child { border-bottom: 0; }
.wn-item.wn-new { padding-left: 10px; }
.wn-body { white-space: pre-wrap; margin-top: 2px; }
.me-new { display: flex; justify-content: space-between; align-items: center; }
.me-new .pf-count, .me-new .wn-count { background: var(--accent); color: var(--on-accent, #fff); border-radius: var(--radius-pill, 999px); font-size: .72rem; font-weight: 700; padding: 1px 7px; }

a.pf-who { color: inherit; text-decoration: none; border-radius: var(--radius-sm); padding: 2px 6px; }
a.pf-who:hover { background: var(--surface-2); }

/* ---- long text with a More / Less button (templates/_more.html) ---- */
details.more-text > summary { list-style: none; cursor: pointer; display: inline; }
details.more-text > summary::-webkit-details-marker { display: none; }
details.more-text .mt-full, details.more-text[open] .mt-short { display: none; }
details.more-text[open] .mt-full { display: inline; }
details.more-text .mt-btn::before { content: "More"; color: var(--link); font-weight: 600; font-size: .85em; white-space: nowrap; }
details.more-text[open] .mt-btn::before { content: "Less"; }
details.more-text > summary:hover .mt-btn::before { text-decoration: underline; }

/* ---- occurrence report: read-only view, the Edit report fold, the sent-for-approval message ---- */
.occ-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 6px; }
.occ-facts dt { color: var(--muted); font-weight: 600; } .occ-facts dd { margin: 0; }
details.edit-report > summary { list-style: none; display: inline-flex; margin: 0 0 12px; }
details.edit-report > summary::-webkit-details-marker { display: none; }
details.edit-report[open] > summary { margin-bottom: 8px; }
.edit-old { color: var(--muted); text-decoration: line-through; }
dialog.occ-sent { max-width: 480px; border: 1px solid var(--border); border-radius: var(--radius, 12px); padding: 20px 22px; background: var(--surface); color: inherit; }
dialog.occ-sent::backdrop { background: rgba(10, 20, 35, .45); }
dialog.occ-sent form { text-align: right; margin-top: 12px; }

/* ---- the master switch (droneops/platform/sitelock.py) ---- */
.site-off-panel.is-off { border: 2px solid var(--bad); }
.site-off-state { color: var(--bad-text); }
.site-off-form { margin-top: 10px; }
.site-off-strip { background: var(--bad); color: var(--on-mk, #fff); text-align: center; padding: 8px 12px; font-weight: 600; }
.site-off-strip a { color: #fff; text-decoration: underline; }
/* ---- Platform admin > Change log ---- */
.clog-filter { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 12px; align-items: end; }
.clog-filter .field { margin: 0; }
.clog-filter-go { display: flex; gap: 6px; flex-wrap: wrap; }
.clog-pages { display: flex; justify-content: space-between; margin-top: 10px; }

/* ---- Platform admin > Status > System health (droneops/platform/health.py) ---- */
.pf-subtabs { margin: 0 0 12px; }
.hl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-bottom: 14px; align-items: start; }
.hl-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 14px 16px; }
.hl-card h2 { font-size: var(--fs-base, 1rem); margin: 0 0 8px; }
.hl-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0 0 8px; font-size: var(--fs-sm, .85rem); }
.hl-facts dt { color: var(--muted); } .hl-facts dd { margin: 0; overflow-wrap: anywhere; }
.hl-table { width: 100%; }
.hl-tests { display: grid; gap: 8px; }
.hl-test { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.hl-test:last-child { border-bottom: 0; }
.hl-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.hl-ok { color: var(--ok-text); } .hl-bad { color: var(--bad-text); }
.hl-trace { white-space: pre-wrap; font-size: .72rem; max-height: 220px; overflow: auto; background: var(--bg); padding: 8px; border-radius: var(--radius-sm, 8px); }
/* ---- Crew > Sign-in activity ---- */
.si-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.si-stats .stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; display: grid; gap: 2px; }
.si-stats .stat span { font-size: var(--fs-xs, .78rem); color: var(--muted); } .si-stats .stat b { font-size: 1.4rem; }
.si-stats .stat.st-warn b { color: var(--warn-text); }
.si-table td.num, .si-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.si-strip { display: inline-grid; grid-template-columns: repeat(30, 7px); gap: 2px; vertical-align: middle; }
.si-strip i { width: 7px; height: 14px; border-radius: var(--radius-xs, 2px); background: var(--border); }
.si-strip i.on { background: color-mix(in srgb, var(--accent) 55%, var(--surface)); }
.si-strip i.many { background: var(--accent); }
.si-late { color: var(--warn-text); font-weight: 600; }

/* ---- Modules: the groups down the side, one group shown at a time (a row of chips on a phone) ---- */
.mod-split { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 18px; }
.mod-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.mod-navlink { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm, 8px); color: var(--text); text-decoration: none; font-size: var(--fs-md, .92rem); }
.mod-navlink:hover { background: var(--surface-2); text-decoration: none; }
.mod-navlink.on { background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; }
.mod-navcount { color: var(--muted); font-size: var(--fs-xs, .78rem); font-weight: 500; font-variant-numeric: tabular-nums; }
.mod-navsep { height: 1px; background: var(--border); margin: 6px 4px; }
.mod-panes { min-width: 0; display: grid; gap: 14px; }
.mod-panes > .mod-tools { margin: 0; }
.mod-pane { margin: 0; }
.mod-pane[hidden] { display: none; }
.mod-pane h2 + .table-wrap, .mod-history h2 { margin-top: 0; }
.mod-pane-note { margin: 0 0 6px; }
.mod-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); column-gap: 24px; }
.mod-rows .module-row { flex-direction: row; padding: 10px 0; }
.mod-rows .module-row:nth-child(2) { border-top: 0; }
@media (max-width: 700px) { .mod-rows .module-row:nth-child(2) { border-top: 1px solid var(--border); } }
.module-about { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mod-core-list { columns: 2 280px; column-gap: 24px; margin: 0; padding-left: 18px; }
.mod-core-list li { break-inside: avoid; margin-bottom: 6px; }
@media (max-width: 760px) {
  .mod-split { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .mod-nav { top: 58px; z-index: 6; flex-direction: row; overflow-x: auto; gap: 6px; padding: 8px 0; background: var(--bg); scrollbar-width: none; }
  .mod-nav::-webkit-scrollbar { display: none; }
  .mod-navlink { flex: none; white-space: nowrap; border: 1px solid var(--border); border-radius: var(--radius-pill, 999px); padding: 6px 12px; background: var(--surface); }
  .mod-navsep { display: none; }
}
@media (max-width: 760px) {                       /* the operating model as a compact 2 x 2 on a phone - the description is a tap away */
  .mod-model { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mod-tile { padding: 10px; gap: 4px 8px; }
  .mod-tile-about { display: none; }
  .mod-tile-name { white-space: normal; font-size: var(--fs-md, .92rem); line-height: 1.2; }
}
/* ---- Side menu for long pages (static/js/splitnav.js, data-split): the sections' titles down the side, one shown at a time ---- */
.split { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; align-items: start; }
.split-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.split-link { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm, 8px); color: var(--text); text-decoration: none; font-size: var(--fs-md, .92rem); line-height: 1.25; }
.split-link:hover { background: var(--surface-2); text-decoration: none; }
.split-link.on { background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; }
.split-count { color: var(--muted); font-size: var(--fs-xs, .78rem); font-weight: 500; font-variant-numeric: tabular-nums; }
.split-all { margin-top: 6px; border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; color: var(--muted); font-size: var(--fs-sm, .85rem); }
.split-panes { min-width: 0; display: grid; gap: 14px; }
.split-panes > .split-pane { margin: 0; }
.split-pane[hidden] { display: none !important; }
.split-group { font-size: var(--fs-xs, .78rem); font-weight: 700; color: var(--muted); padding: 10px 10px 2px; }
.split-pick { display: none; }
/* screen review v-30 (30 Nov 2026): on a phone one row of chips that scrolls sideways (fading at the edge with more to see),
   group names as quiet words between the chips, Show all the same pill as the rest; a long menu (.split-many, splitnav.js)
   is one "Section" picker instead */
.split-nav.split-fade-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
.split-nav.split-fade-l { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); }
/* w-52: the arrow that says the chip row goes on (splitnav.js) */
.split { position: relative; }
.split-more { position: absolute; z-index: 2; width: 32px; height: 32px; padding: 0; border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); line-height: 1; display: grid; place-items: center; box-shadow: var(--shadow-1); cursor: pointer; }
.split-more[hidden] { display: none; }
.split-more svg { width: 20px; height: 20px; flex: none; }
.split-nav.split-fade-l.split-fade-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); }

@media (max-width: 760px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .split-nav { top: 58px; z-index: 6; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding: 8px 0; background: var(--bg); scrollbar-width: none; }
  .split-nav::-webkit-scrollbar { display: none; }
  .split-link { flex: none; white-space: nowrap; border: 1px solid var(--border); border-radius: var(--radius-pill, 999px); padding: 6px 12px; background: var(--surface); }
  .split-all { margin: 0; border-radius: var(--radius-pill, 999px); font-size: var(--fs-md, .92rem); color: var(--text); }
  .split-group { flex: none; align-self: center; padding: 0 2px 0 8px; white-space: nowrap; }
  .split-group:first-child { padding-left: 0; }
  .split-nav.split-many { overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .split-nav.split-many > :not(.split-pick) { display: none; }
  .split-many .split-pick { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0; }
  .split-pick-l { flex: none; font-weight: 600; font-size: var(--fs-sm, .85rem); color: var(--muted); }
  .split-pick select { flex: 1; min-width: 0; min-height: 44px; font-weight: 600; }
}
@media print { .split { display: block; } .split-nav { display: none; } }
/* clutter review: a split inside .layout-side (team member page) uses the chip row until the page is wide enough for three columns */
@media (min-width: 961px) and (max-width: 1279px) {
  .layout-side .split { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .layout-side .split-nav { position: static; flex-direction: row; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .layout-side .split-nav::-webkit-scrollbar { display: none; }
  .layout-side .split-link { flex: none; white-space: nowrap; border: 1px solid var(--border); border-radius: var(--radius-pill, 999px); padding: 6px 12px; background: var(--surface); }
  .layout-side .split-all { margin: 0; border-radius: var(--radius-pill, 999px); }
}
/* ---- Long lists (static/js/pager.js, data-pager): a search box above, 25 at a time with Show more below ---- */
.pager-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.pager-find { flex: 1 1 240px; min-width: 0; max-width: 420px; }
.pager-foot { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 12px 0 2px; }
.pager-foot[hidden], .pager-foot [hidden], [data-pager] [hidden] { display: none !important; }
/* long lists paged by the server (droneops/listpage.py, listpage.js, 18 Nov 2026): search bar, status chips as links,
   sort headers as links, 'Show 25 more' under the rows */
.lp-bar .pager-find { font-size: 16px; }
.lp-bar [hidden], .lp-chips[hidden] { display: none !important; }
@media (max-width: 700px) { div.lp-bar { display: none; } }   /* only Select and Columns in it, and a phone has neither */
.lp-tools { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.lp-tools:empty { display: none; }
.lp-csv { color: var(--link, var(--accent)); }
.lp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.lp-chips a { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-pill, 999px);
  background: var(--surface); color: var(--text-2); font-size: var(--fs-sm, .85rem); font-weight: 500; line-height: 1; text-decoration: none; }
.lp-chips a span { color: var(--muted); font-variant-numeric: tabular-nums; }
.lp-chips a:hover { border-color: var(--muted); color: var(--text); }
.lp-chips a[aria-current="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--text); font-weight: 600; }
.lp-chips a[aria-current="true"] span { color: var(--text-2); }
html[data-theme="night"] .lp-chips a[aria-current="true"] { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.lp-chips a:focus-visible, a.lp-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a.lp-sort { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; white-space: nowrap; }
.lp-foot { flex-direction: column; gap: 8px; }
.lp-foot .lp-more { min-height: 44px; min-width: 200px; justify-content: center; }
.lp-foot .lp-more[aria-busy="true"] { opacity: .7; pointer-events: none; }
table[data-lp][aria-busy="true"] tbody { opacity: .6; transition: opacity .15s; }
@media (pointer: coarse) { .lp-chips a { min-height: 44px; padding: 0 14px; } a.lp-sort { min-height: 44px; } .split-link { min-height: 44px; } }   /* split-link: design picks ipad-4 */
@media (max-width: 700px) { .lp-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px; } .lp-chips a { flex: none; } }
@media (max-width: 600px) { .lp-foot .lp-more { width: 100%; } .lp-bar .pager-find { flex: 1 1 120px; max-width: none; } .lp-bar .lp-go { flex: none; } }
@media print { .lp-foot .lp-more, .lp-foot .lp-csv, .lp-bar { display: none !important; } }
@media (max-width: 700px) {                      /* phone cards from tables: two fields to a line, the label above its value - about half the height */
  table.stack tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7px 14px; padding: 10px 12px; }
  table.stack td { display: block; text-align: left; padding: 0; min-width: 0; overflow-wrap: anywhere; }
  table.stack td::before { display: block; max-width: none; margin-bottom: 1px; font-size: .62rem; }
  table.stack td:first-child, table.stack td[data-wide], table.stack td.actions, table.stack td.empty, table.stack td[colspan] { grid-column: 1 / -1; }
  table.stack td:first-child { padding-bottom: 7px; margin-bottom: 1px; }
  table.stack td.actions { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
  table.stack td.actions:empty { display: none; }
  table.stack td[data-wide] input, table.stack td[data-wide] select, table.stack td[data-wide] textarea { width: 100%; }
}
@media (max-width: 700px) {
  /* a row's one button sits beside its title only when it is an icon (autoicons.js). A button with words ("My two-step
     login") is wider than the room kept for it and covered the details under the title, so it keeps its own row at the
     foot of the card (screen review v-18, 30 Nov 2026). */
  table.stack tr.one-act:has(> td.actions :is(.btn-icon, .ai-only)) { position: relative; }
  table.stack tr.one-act:has(> td.actions :is(.btn-icon, .ai-only)) > td:first-child { padding-right: 84px; min-height: 36px; }
  table.stack tr.one-act > td.actions:has(:is(.btn-icon, .ai-only)) { position: absolute; top: 9px; right: 10px; grid-column: auto; }
  /* the team list: each member's buttons on their own line at the foot of their card, under a divider, so Manage stays
     with the member it is for */
  table.stack.team-list > tbody > tr > td.actions { justify-content: flex-start; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 2px; }
}
/* ---- Callout answer: one tap (sar/respond.html) ---- */

@media (max-width: 600px) {                       /* the status board on a phone: compact incident cards, two at a time */
}
/* the flight log's form: the toggle says what it does; from Log flight, just the form */
.log-toggle .lt-close, details[open] > .log-toggle .lt-open { display: none; }
details[open] > .log-toggle .lt-close { display: inline; }
details[open] > .log-toggle { background: var(--surface); color: var(--text-2); border-color: var(--border); }
.flights-logging details#log > summary { display: none; }
.flights-logging details#log > form { margin-top: 0; }
.flight-more > summary { cursor: pointer; font-weight: 600; color: var(--accent-dark); padding: 4px 0; }
.flight-more[open] > summary { margin-bottom: 8px; }

/* ---- The page's main action (static/js/pageactions.js) ---- */
.page-head .head-actions .page-add { white-space: nowrap; }
.sticky-proxy { position: fixed; left: 12px; right: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 85; }
.sticky-proxy[hidden] { display: none; }
.sticky-proxy .btn { box-shadow: 0 8px 24px rgba(18, 48, 77, .3); min-height: 48px; font-size: var(--fs-base, 1rem); }
.empty-go { margin-left: 6px; vertical-align: middle; }
.om-pick { border: 0; padding: 0; margin: 0 0 14px; } .om-pick legend { font-weight: 700; margin-bottom: 4px; }
.om-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.om-card { display: grid; gap: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); padding: 10px 12px; cursor: pointer; background: var(--surface); }
.om-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.om-card input { position: absolute; opacity: 0; pointer-events: none; }
.om-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.om-list .om-card.is-current { border-color: var(--accent); background: var(--accent-soft); }

.scribble-panel textarea { width: 100%; min-height: 55vh; resize: vertical; font: 1rem/1.55 var(--mono, ui-monospace, monospace); border-radius: var(--radius-sm, 8px); padding: 12px; }
.gmaps { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; } .gmaps a { white-space: nowrap; }
.ico { flex: none; vertical-align: -0.22em; } .btn .ico { margin-right: 2px; }
/* Face ID / fingerprint offer after signing in, in the phone app (static/js/biometric.js) */
.bio-offer { position: fixed; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 1200; max-width: 460px; margin: 0 auto;
  background: var(--card, #fff); color: inherit; border: 1px solid var(--border); border-radius: var(--radius, 12px); box-shadow: var(--shadow); padding: 16px 18px; }
.bio-offer p { margin: 0 0 6px; }
.bio-offer-btns { display: flex; gap: 8px; margin-top: 10px; }
.bio-signin { margin-top: 6px; }

/* ---- callout categories (calloutflow, Beta): the picker on Start callout, the steps on the callout page ---- */
.cat-edit { font-weight: 500; margin-left: 8px; }
.cat-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-bottom: 12px; }
.cat-opt { position: relative; margin: 0; cursor: pointer; }
.cat-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cat-opt span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 10px 14px; border: 2px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.cat-opt small { color: var(--muted); font-size: var(--fs-xs, .78rem); }
.cat-opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.cat-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.cat-body { border-top: 1px solid var(--border); padding-top: 12px; }
.cat-q h3 { margin: 8px 0; }
.badge-cat { text-decoration: none; background: var(--accent-soft); color: var(--accent-dark); }

/* the workflow's stages on the callout page: done, now, still to come - each a button to move by hand */

.cat-edit-card legend h2 { margin: 0; }
.cat-edit-card textarea { font-size: var(--fs-sm, .85rem); }

/* a row's actions in one menu (Team): the menu's items, forms included, look the same; the risky one in red, last */
.menu-pop form { margin: 0; }
.menu-pop .menu-item { display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; border-radius: var(--radius-sm, 8px); background: none; color: var(--text); font: inherit; cursor: pointer; }
.menu-pop .menu-item:hover { background: var(--accent-soft); }
.menu-pop .menu-item.menu-danger { color: var(--bad-text); border-top: 1px solid var(--border); border-radius: 0 0 6px 6px; margin-top: 4px; }
.row-menu .menu-pop { min-width: 170px; }
.row-menu .menu-pop { text-align: left; }
.row-menu .menu-pop a { color: var(--text); text-decoration: none; }

/* a phone's top bar: just Field, notifications, search and the menu. The My view / Command switch moves into the menu,
   and the offline cloud shows only when something needs saying (no signal, or not saved yet) */
@media (max-width: 700px) {
  .mode-switch-mobile, body.staff .mode-switch-mobile { display: none !important; }
  .net-ind:not([data-state="offline"]):not([data-state="warn"]):not([data-waiting]) { display: none !important; }
}

/* ---- accessibility (WCAG 2.2 AA): targets at least 24 px; tab lists that are only a grouping don't change the layout ---- */
@media (pointer: coarse) { .check-row input[type="checkbox"], .check-row input[type="radio"] { width: 24px; height: 24px; flex: none; } }   /* the whole row is the target; 20px boxes on a computer (modern.css form controls) */
input[type="file"] { min-height: 28px; }

.pos-near { margin: 6px 0 0; min-height: 1.3em; color: var(--text); font-weight: 600; }
.pos-kind { margin-top: 8px; }
.pos-kind[hidden] { display: none; }
.pos-kind button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent, #fff); }

/* the Field view's "Your task" card (and the team lead's): my team, its lead, our task, Received, We're back - droneops/sar/field.py */
 

/* a fieldset that only groups (a read-only view disables everything inside) - no box of its own */
fieldset.contents { display: contents; border: 0; margin: 0; padding: 0; min-width: 0; }
/* Search management panel (templates/sar/_searchcycle.html) */
.sc-sec { border-top: 1px solid var(--border, #e5e7eb); padding: 8px 0; }
.sc-sec > summary { cursor: pointer; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.sc-scen { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dotted var(--border, #e5e7eb); }
.sc-scen.is-off { opacity: .6; }
.sc-segs { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.sc-share { margin: 6px 0; } .sc-share td, .sc-share th { padding: 2px 8px 2px 0; }
.sc-lv.sc-high { background: var(--mk-bad, #c62828); color: var(--on-mk, #fff); } .sc-lv.sc-medium { background: var(--mk-warn, #c98200); color: var(--on-mk, #fff); } .sc-lv.sc-low { background: #15803d; color: var(--on-mk, #fff); }
.sc-per { padding: 4px 0; } .sc-per p { margin: 2px 0 0; }
/* Duties (templates/sar/duty.html) */
 
/* the joint space (templates/sar/_joint_space.html) */

/* the section menu in one row: the open section's pages, the rest under More (templates/base.html) */
.sec-row { display: flex; align-items: flex-start; gap: 8px; }
.sec-row > .ops-tabs { flex: 1; min-width: 0; }
.sec-more { position: relative; flex: none; }
.sec-more > summary { list-style: none; cursor: pointer; padding: 8px 12px; border-radius: var(--radius-sm, 8px); font-weight: 600; font-size: var(--fs-sm, .85rem); white-space: nowrap; color: var(--text-2, inherit); }
.sec-more > summary::-webkit-details-marker { display: none; }
.sec-more[open] > summary { background: var(--accent-soft, #e6f4f1); }
.sec-more-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 60; min-width: 240px; max-height: 70vh; overflow-y: auto; padding: 8px;
  background: var(--surface, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: var(--radius, 12px); box-shadow: var(--shadow-3, 0 12px 32px rgba(10,16,24,.24)); }
.sec-more-group { padding: 6px 4px; } .sec-more-group + .sec-more-group { border-top: 1px solid var(--border, #e5e7eb); }
.sec-more-group b { display: block; font-size: .72rem; text-transform: none; color: var(--muted, #6b7280); margin: 0 6px 4px; }
.sec-more-group a { display: block; padding: 6px 8px; border-radius: var(--radius-sm, 8px); text-decoration: none; color: inherit; }
.sec-more-group a:hover { background: var(--accent-soft, #e6f4f1); }
/* the Incidents page's calmer live rows (templates/sar/_live_table.html calm) */

/* why an incident tab has a red dot - press and hold on a phone (static/js/sartabs.js) */


/* Inspection findings (templates/_job_findings.html, Beta module findings) */
.ifd-list { display: grid; gap: 12px; }
.ifd-item { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.ifd-item:first-child { border-top: 0; }
.ifd-item h3 { font-size: 15px; margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ifd-item p { margin: 2px 0 6px; }
.ifd-ref { font-family: var(--pp-mono, ui-monospace, monospace); font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.ifd-pic { position: relative; display: block; line-height: 0; border-radius: var(--radius-sm, 8px); overflow: hidden; background: var(--surface-2, #f1f3f6); }
.ifd-pic img { width: 100%; height: auto; display: block; }
.ifd-nopic { display: flex; align-items: center; justify-content: center; min-height: 90px; line-height: 1.3; }
.ifd-dot { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 3px solid #e0242c; border-radius: 50%;
  box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0,0,0,.4); pointer-events: none; }
.ifd-before { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.ifd-before .ifd-pic { width: 90px; flex: none; }
.ifd-before .ifd-dot { width: 12px; height: 12px; margin: -6px 0 0 -6px; border-width: 2px; }
.ifd-counts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.ifd-visit { margin: 0 0 10px; display: flex; gap: 8px; align-items: center; }
.ifd-visit select { width: auto; }
.ifd-form { margin-top: 8px; }
.ifd-stage { position: relative; line-height: 0; max-width: 720px; border-radius: var(--radius-sm, 8px); overflow: hidden; cursor: crosshair; }
.ifd-stage img { width: 100%; height: auto; display: block; }
.ifd-hint { margin: 6px 0; }
.ifd-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; max-height: 320px; overflow: auto; padding: 6px 0; }
.ifd-thumb { padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: none; cursor: pointer; line-height: 0; }
.ifd-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.ifd-thumb.on, .ifd-thumb:focus-visible { border-color: var(--accent); }
.ifd-all { margin-top: 10px; }
.ifd-view-img { display: block; width: 100%; max-height: 68vh; object-fit: contain; margin-top: 12px; border-radius: var(--radius-sm, 8px); background: var(--surface-2); }
@media (max-width: 640px) { .ifd-item { grid-template-columns: 1fr; } }

/* Map viewer for finished maps (templates/map_view.html) */
.mv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px; }
.mv-bar .seg { margin: 0; }
.mv-opacity { display: inline-flex; align-items: center; gap: 8px; }
.mv-opacity input { width: 120px; }
.mv-result { font-weight: 600; font-variant-numeric: tabular-nums; }
.mv-map { height: calc(100vh - 260px); min-height: 380px; border-radius: var(--radius, 12px); border: 1px solid var(--border); }
.mv-map.measuring { cursor: crosshair; }
.mv-map.measuring .leaflet-interactive { cursor: crosshair; }

/* Mapping flight plan (templates/flight_plan.html) */

.fp-map { height: calc(100vh - 290px); }

.fp-angle { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fp-angle input[type=range] { flex: 1; min-width: 140px; }
.fp-angle-out { margin: 4px 0 0; }
.fp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fp-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; }
.fp-stat b { display: block; font-size: var(--fs-base, 1rem); font-variant-numeric: tabular-nums; }
.fp-stat span { font-size: var(--fs-xs, .78rem); color: var(--muted); }
.fp-detail { grid-column: 1 / -1; margin: 4px 0 0; }
.fp-warn { margin-top: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: #fff6e0; border: 1px solid #f0d58a; color: #6b4a00; }
.fp-save-note { margin: 6px 0 10px; }
.fp-corner { background: #ffd400; border: 2px solid #111; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.7); cursor: move; }
@media (max-width: 900px) {  .fp-map { height: 60vh; } }
html[data-theme="night"] .fp-warn { background: #3a2f12; border-color: #6b5520; color: #f3dfa6; }
.fp-card-figs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fp-card-figs div { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 9px; }
.fp-card-figs b { display: block; font-variant-numeric: tabular-nums; }
.fp-card-figs span { font-size: var(--fs-xs, .78rem); color: var(--muted); }
.fp-card-warn { margin: 0 0 8px; padding: 6px 9px; border-radius: var(--radius-sm); background: #fff6e0; border: 1px solid #f0d58a; color: #6b4a00; }
html[data-theme="night"] .fp-card-warn { background: #3a2f12; border-color: #6b5520; color: #f3dfa6; }
.fp-card-flights { list-style: none; margin: 0; padding: 0; }
.fp-card-flights li { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--border); font-size: var(--fs-md, .92rem); }
.fp-card-flights li > span { flex: 1; }
.fp-card-flights i { width: 12px; height: 12px; border-radius: var(--radius-xs, 2px); flex: none; }
@media (max-width: 560px) { .fp-card-figs { grid-template-columns: repeat(2, 1fr); } }

/* Mapping flight plan v2: moved to flightplan.css (22 Nov 2026) to keep this file under its size budget */
/* your own menu in the top bar: your picture (or initials) and first name, apart from the Settings gear (10 Nov 2026) */
.nav-me-top { display: inline-flex; align-items: center; gap: 8px; }
.nav-me-top .me-av-top { width: 26px; height: 26px; min-width: 26px; font-size: .7rem; line-height: 26px; border-radius: 50%; overflow: hidden; }
.nav-me-top .me-av-top img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 1181px) and (max-width: 1360px) { .nav-me-top .me-top-name { display: none; } }
/* the hero's trust facts end in a link to the Credentials page (certificates, insurance, operator registration) */
.spi-table tbody th, .spi-table thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }

/* ---- the phone bar (16 Nov 2026, option B with Map): Today, Projects, a round + in the middle, Map, Menu ---- */
.app-bar .m-more { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; border-radius: var(--radius-sm, 8px); color: var(--muted);
  font-size: .68rem; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.app-bar .m-more svg { width: 22px; height: 22px; }
.app-bar .app-add { justify-self: center; align-self: center; width: 52px; height: 52px; margin-top: -20px; border-radius: 50%; border: 0; padding: 0;
  display: grid; place-items: center; background: var(--accent); color: var(--on-accent, #fff); box-shadow: var(--shadow-2, 0 4px 14px rgba(11,31,58,.14)); cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: transform .15s ease; }
.app-bar .app-add.on { transform: rotate(45deg); }
.app-add-sheet { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 61; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius, 12px); padding: 6px; box-shadow: var(--shadow-3, 0 12px 32px rgba(10,16,24,.24)); max-width: 420px; margin: 0 auto; }
.app-add-sheet a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: var(--radius-sm, 8px); color: var(--text); text-decoration: none; font-weight: 600; }
.app-add-sheet a:hover, .app-add-sheet a:focus-visible { background: var(--surface-2, var(--accent-soft)); }
.app-add-sheet a.app-add-sos { color: var(--bad-text); }
.app-add-sheet button.app-add-share { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 12px; border: 0; border-radius: var(--radius-sm, 8px);
  background: none; color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }      /* Share this page (Beta ninemenu) */
.app-add-sheet button.app-add-share:hover, .app-add-sheet button.app-add-share:focus-visible { background: var(--surface-2, var(--accent-soft)); }
body:not(.has-app-bar) .app-add-sheet { display: none !important; }
@media (prefers-reduced-motion: reduce) { .app-bar .app-add { transition: none; } }

/* Pocket tools: Calculators, Nearby help, Trip and receipt (18 Nov 2026) */
.pt-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 16px; margin: 12px 0 6px; }
.pt-out > div { border-top: 1px solid var(--border); padding-top: 6px; }
.pt-out dt { font-size: var(--fs-xs, .78rem); color: var(--muted); }
.pt-out dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.pt-sub { font-size: 14px; margin: 16px 0 6px; }
.pt-sub:first-of-type { margin-top: 4px; }
.pt-from, .pt-trip-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-112 { font-size: var(--fs-lg, 1.15rem); }
.pt-places { list-style: none; margin: 0; padding: 0; }
.pt-places li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--border); }
.pt-places li:first-child { border-top: 0; }
.pt-places li > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.pt-acts { display: flex; gap: 6px; flex-wrap: wrap; }

/* Export for DJI Fly on a quick mission plan (18 Nov 2026) */
.pl-fly-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.pl-fly-row .field { flex: 1 1 220px; margin: 0; }
.fp-fly-switch { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 6px; }
.ck-advice { margin-top: 4px; line-height: 1.45; }
/* weather extras (Beta wxplus) */
.wx-plus h3 { margin: 16px 0 6px; font-size: var(--fs-md, .92rem); }
.wx-day { margin: 0 0 12px; }
.wx-day-head { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin-bottom: 5px; }
.wx-hours { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 3px; }
@media (pointer: coarse) { .wx-hours { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; } }   /* a finger's size (screen review v-40) */
.wx-hr { min-height: 44px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); background: var(--surface, transparent); color: var(--text); font: inherit; font-size: var(--fs-xs, .78rem); cursor: pointer; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.wx-hr::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.wx-hr.st-warn::after { background: var(--warn); }
.wx-hr.st-bad::after { background: var(--bad); }
.wx-hr.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.wx-strip-pick:empty { display: none; }
.wx-cold { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: var(--fs-md, .92rem); }
.wx-cold .dot, .wx-day-head .dot { margin-right: 5px; }
.wx-note { margin-top: 6px; display: grid; gap: 8px; max-width: 640px; }
.wx-note-day select { margin-left: 6px; }
.wx-note .btn { justify-self: start; }
/* Speak up + change checks (Betas speakup, changecheck) */
.su-form { display: grid; gap: 12px; }   /* the page width, as the You Said, We Did block and the header (v-44) */
.su-kinds { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.su-kinds legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.su-kinds label { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); cursor: pointer; }
.su-kinds label:has(input:checked) { border-color: var(--accent); }
.su-anon { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }
.su-form .btn { justify-self: start; }
.su-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.su-list li { border-top: 1px solid var(--border); padding-top: 10px; }
.su-list li:first-child { border-top: 0; padding-top: 0; }
.su-list .dot, .su-head .dot, .cc-head .dot { margin-right: 6px; }
.su-list p { margin: 4px 0 0; }
.su-answer { color: var(--text); }
.su-head, .cc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 6px; }
.su-answer-form { display: grid; gap: 8px; }
.cc-form { display: grid; gap: 10px; }
.cc-form .btn { justify-self: start; }
.cc-jobs { margin: 6px 0 0; padding-left: 18px; }
.cc-answers dt { font-weight: 600; margin-top: 6px; } .cc-answers dd { margin: 2px 0 0; }
.spi-targets { width: 100%; }
.spi-targets th[scope=row] { font-weight: 500; text-align: left; }
.spi-targets input { width: 90px; min-height: 44px; text-align: right; }
.spi-targets .dot { margin-right: 4px; }
.spi-targets th, .spi-targets td { vertical-align: middle; }
/* Quality check, quality issues, processing queue (Betas qacheck, procqueue - 18 Nov 2026) */
.qa-box { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 12px 0; margin: 0 0 14px; }
.qa-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.qa-head h3 { margin: 0; }
.qa-list { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 10px; }
.qa-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.qa-row .qa-note { grid-column: 1 / -1; min-height: 44px; }
.qa-fact { display: block; margin-top: 2px; color: var(--muted); }
.qa-sub { font-weight: 600; margin-top: 6px; }
.qa-pick { display: inline-flex; gap: 4px; }
.qa-pick label { position: relative; min-height: 44px; min-width: 56px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); cursor: pointer; font-weight: 600; font-size: var(--fs-sm, .85rem); color: var(--muted); }
.qa-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.qa-pick label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.qa-pick .qa-pass:has(input:checked) { border-color: var(--mk-ok); color: var(--text); box-shadow: inset 0 0 0 1px var(--mk-ok); }
.qa-pick .qa-fail:has(input:checked) { border-color: var(--mk-bad); color: var(--text); box-shadow: inset 0 0 0 1px var(--mk-bad); }
.qa-pick .qa-na:has(input:checked) { border-color: var(--text); color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
@media (max-width: 600px) { .qa-row { grid-template-columns: 1fr; } .qa-pick { display: flex; } .qa-pick label { flex: 1; } }
.qi-counts { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; padding: 0; margin: 4px 0 0; }
.qi-filter { display: flex; gap: 14px; margin: 0 0 10px; }
.qi-filter a { min-height: 44px; display: inline-flex; align-items: center; }
.qi-filter a[aria-current] { font-weight: 700; color: var(--text); text-decoration: none; }
.pq-sum p { margin: 0 0 6px; }
.pq-sum .mk { margin-right: 8px; }
.pq-limit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.pq-limit input { flex: 0 0 90px; width: 90px; min-height: 44px; text-align: right; }
@media (max-width: 600px) { .pq-table .pq-wide { display: none; } }
.pq-hint { margin: 8px 0 0; flex-basis: 100%; }
.pq-hint .mk { white-space: normal; }   /* a whole sentence in the mark: it wraps on a phone, not cut off at the right (1 Dec 2026) */
.qi-page .fo-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.qa-row:not(:has(.qa-fail input:checked, .qa-na input:checked)) .qa-note:placeholder-shown:not(:focus) { display: none; }
/* Project limits, lessons from past jobs (Betas joblimits, lessonsback - 18 Nov 2026) */
.pmx-list { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 6px; }
.pmx-list .mk { margin-right: 6px; }
.pm-over { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.pm-lesson-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.pm-lesson-list p { margin: 0 0 2px; }
.pm-add summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.pm-limits-form .btn { justify-self: start; }
/* events and sports: the two people questions as Yes / No (go-live review gl-10) */
.limits-form .qrows { flex: 1 0 100%; min-width: 0; }   /* question rows (30 Nov): a full-width block in the flex form */
.limits-form .ynseg input { min-width: 0; }   /* not the .inline-form input width: the radio fills only its own label */
.pmx-list li { display: block; text-align: left; }
/* Repeat project form (19 Nov 2026, DroneBundle item 2): every N weeks or months, a count or an end date */
.rep-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 14px; align-items: end; }
.rep-form .field { margin: 0; }
.rep-every { display: flex; gap: 6px; } .rep-every input { width: 72px; flex: 0 0 72px; } .rep-every select { flex: 1; min-width: 0; }
.rep-go .btn { min-height: 44px; width: 100%; }

/* Conditions you must follow (critical review planning-7): permission conditions on the day pages */
.conditions-box { margin: 12px 0; }
.conditions-box h3 { margin: 0 0 6px; }
.conditions-box li { margin-bottom: 6px; }
/* the stockpile page (map review 81-83): map with Draw stockpile and Height colours on it, the piles in a panel beside
   it from 900px, under it below that */
.mv-volpage { display: grid; gap: 14px; }
@media (min-width: 900px) { .mv-volpage { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
.mv-mapwrap { position: relative; }
.mv-onmap { position: absolute; z-index: 1000; top: 62px; right: 10px;   /* under the map's own button row, which runs the full width on narrow maps */
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.mv-draw-pile { font-weight: 600; }
.mv-draw-pile.on { background: #fff; color: #111; }
.mv-relief-btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.mv-relief-btn input { margin: 0; accent-color: #fff; }
.mv-vchip { z-index: 1000; top: auto; bottom: 30px; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 20px); }
.mv-vchip[hidden] { display: none; }
.mv-vchip .mv-result { font-size: var(--fs-md, .92rem); }
.mv-rlegend { position: absolute; z-index: 1000; right: 10px; top: 114px; display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; gap: 2px 8px; align-items: center;
  padding: 8px 10px; border-radius: var(--radius-sm, 8px); font-size: var(--fs-xs, .78rem); color: var(--ov-text, #fff); background: var(--ov-bg, rgba(17,22,30,.62)); border: 1px solid var(--ov-edge, rgba(255,255,255,.2));
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.mv-rlegend[hidden] { display: none; }
.mv-ramp { grid-row: 1 / 3; width: 12px; height: 64px; border-radius: var(--radius-xs, 2px); background: linear-gradient(to top, rgb(96,146,98), rgb(196,164,116)); }
.mv-rlegend span:nth-child(2) { grid-row: 2; grid-column: 2; } .mv-rlegend span:nth-child(3) { grid-row: 1; grid-column: 2; }
.mv-vpanel { border: 1px solid var(--border); border-radius: var(--radius, 12px); padding: 12px 14px; background: var(--card, var(--surface)); }
.mv-vpanel h2 { font-size: var(--fs-base, 1rem); margin: 0 0 8px; }
.mv-vlist { list-style: none; margin: 0; padding: 0; max-height: 40vh; overflow: auto; }
.mv-vlist li { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.mv-vlist li:last-child { border-bottom: 0; }
.mv-vpanel .mv-vol { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.mv-vpanel .mv-vol[hidden] { display: none; }
[data-fullscreen]:fullscreen .mv-map { height: 100%; border-radius: 0; }
@media (min-width: 900px) { .mv-volpage .mv-vpanel { position: sticky; top: 90px; max-height: calc(100vh - 120px); overflow: auto; } }
/* the booking page's map (map review 129-131): a taller map, search on its own row, Pick on the map full screen */
.bk-search { display: grid; gap: 8px; }
.bk-search input[type=search] { width: 100%; min-height: 44px; }
.bk-search-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-search-btns .btn { min-height: 44px; }
.bk-mapwrap { position: relative; }
.bk-map { height: clamp(320px, 55vh, 560px); }
.bk-cross, .bk-pickbar { display: none; }
.bk-mapwrap.is-picking { position: fixed; inset: 0; z-index: 3000; background: #000; }
.bk-mapwrap.is-picking .bk-map { height: 100dvh; border-radius: 0; }
.bk-mapwrap.is-picking .bk-cross { display: block; position: absolute; z-index: 1001; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; pointer-events: none;
  background: linear-gradient(#fff, #fff) center / 2px 100% no-repeat, linear-gradient(#fff, #fff) center / 100% 2px no-repeat; filter: drop-shadow(0 0 2px rgba(0,0,0,.8)); }
.bk-mapwrap.is-picking .bk-pickbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; position: absolute; z-index: 1001; left: 10px; right: 10px;
  bottom: calc(16px + env(safe-area-inset-bottom)); padding: 8px 10px; border-radius: var(--radius, 12px); color: #fff; background: rgba(17,22,30,.62); border: 1px solid rgba(255,255,255,.2);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.bk-pickbar span { flex: 1 1 200px; font-size: var(--fs-md, .92rem); }
.bk-pickbar .bk-use { background: #fff; color: #10151c; font-weight: 600; }
body.bk-noscroll { overflow: hidden; }
/* Tools page items (21 Nov 2026): scan, call lead, card scan, sign on screen, share documents, day wrap, rules */
.tp-form fieldset.tp-where { border: 0; padding: 0; margin: 12px 0; }
.tp-form fieldset.tp-where legend { font-weight: 600; margin-bottom: 6px; }
.tp-photo { display: block; max-width: 100%; max-height: 320px; border-radius: var(--radius); border: 1px solid var(--border); margin: 8px 0; }
.tp-made-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.tp-qr { width: 168px; height: 168px; padding: 8px; background: #fff; border-radius: var(--radius); flex: none; }
.tp-qr svg { width: 100%; height: 100%; display: block; }
.tp-link { width: min(100%, 420px); }
.tp-table td { vertical-align: middle; }
.tp-doc-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.tp-doc-row:last-child { border-bottom: 0; }
.tp-pdf { width: 100%; height: min(70vh, 720px); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2, var(--surface)); }
.tp-list { list-style: none; padding: 0; margin: 0; }
.tp-list li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.tp-list li:last-child { border-bottom: 0; }
.tp-rows { display: grid; gap: 0; margin: 0; }
.tp-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.tp-rows > div:last-child { border-bottom: 0; }
.tp-rows dt { color: var(--muted); }
.tp-rows dd { margin: 0; text-align: right; font-weight: 600; }
.tp-wrap-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.tp-wrap-row:last-child { border-bottom: 0; }
.tp-wrap-row .tp-wrap-what { min-width: 0; }
.tp-search { width: 100%; }
.tp-rule[hidden] { display: none; }
.tools-hub .tl-group { margin: 28px 0 10px; font-size: 16px; }
.tools-hub .tl-group:first-of-type { margin-top: 8px; }
/* × in the top right of every pop-out (closex.js, 22 Nov 2026) */
.closex{position:absolute;top:8px;right:8px;z-index:5;width:32px;height:32px;display:grid;place-items:center;padding:0;margin:0;border:0;border-radius:var(--radius-sm, 8px);background:transparent;color:var(--muted);cursor:pointer;line-height:0}
.closex:hover{background:color-mix(in srgb,var(--text) 9%,transparent);color:var(--text)}
.closex:focus-visible{outline:2px solid var(--accent,currentColor);outline-offset:1px}
.has-closex>:is(h1,h2,h3,header,.hd,[class$="-head"],[class$="-h"]):first-of-type{padding-right:40px}
@media (pointer:coarse){.closex{width:40px;height:40px;top:4px;right:4px}}
/* Weather page: weather only (22 Nov 2026) - no record-the-check column */
.wx-layout.wx-solo { grid-template-columns: minmax(0, 1fr); }
.wx-tomap { margin: 0 0 12px; }

/* touch screens: tick chips big enough for a thumb (dd4 field-conditions-4) - after the phone rule above so it wins */
@media (pointer: coarse) {
  .chip-checks label { min-height: 48px; }
  .chip-checks { gap: 10px; }
}
/* Wind By Height on the flight day (owner, 25 Nov 2026) */
.fdh { display: block; margin-top: 12px; }
.fdh .fdh-hours { margin: 6px 0 4px; display: flex; flex-wrap: nowrap; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.fdh .fdh-hours button { flex: 0 0 auto; white-space: nowrap; }
.fdh-chart { height: 240px; width: 100%; }
.fdh-read { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0; }
.fdh-lv.lv-bad b { color: var(--bad-text, var(--bad)); }
.fdh-lv.lv-warn b { color: var(--warn-text, var(--warn)); }

/* two-step set-up (four viewpoints pilot-2): a phone gets a button that opens the authenticator app; a computer the QR code */
.ts-desk { display: none; }
@media (min-width: 700px) and (pointer: fine) { .ts-phone { display: none; } .ts-desk { display: block; } span.ts-desk { display: inline; } }

/* four viewpoints pilot-15: the mobile-data line by the photo upload shows on phones only */
@media (min-width: 700px) { .pl-wifi { display: none; } }

/* ---- Question rows (30 Nov 2026, user: "rather than having a box around the answer ... do that for all questions"):
   a short question with a few fixed answers is one row - the question on the left, the answers as one segmented switch on
   the right, a hairline between rows; on a phone the switch drops under the question. Markup:
     <fieldset class="qrow"><legend>Question?</legend><div class="ynseg"><label><input type="radio" ...> Yes</label>...</div>
       <p class="qrow-note">optional note under the row</p></fieldset>
   A <select> or a small input can stand in for the switch. .qrows wraps a list when the first row should have no line. */
.qrow, .cp-q { border: 0; margin: 0; min-width: 0; padding: 12px 0; border-top: 1px solid var(--border);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; row-gap: 4px; }
.qrow:first-of-type, .cp-q:first-of-type, .qrows > .qrow:first-child { border-top: 0; padding-top: 0; }
.qrow > legend, .cp-q > legend { float: left; width: auto; font-weight: 600; padding: 0; margin: 0; line-height: 1.35; }
.qrow > :not(legend):not(.ynseg):not(.cp-yn):not(select):not(input), .cp-q > .cp-known { grid-column: 1 / -1; }
.qrow-note, .cp-q .cp-known { font-size: var(--fs-sm, .85rem); color: var(--muted); margin: 0; }
.qrow > select, .cp-q > select { justify-self: end; max-width: 260px; }
.qrow > input[type="number"] { justify-self: end; width: 120px; }   /* a small number box stands in for the switch (flight volume, 3 Dec 2026) */
.ynseg, .cp-yn { display: inline-flex; flex-wrap: wrap; justify-self: end; border: 1px solid var(--border); border-radius: var(--radius-pill, 999px); padding: 3px; gap: 2px;
  background: var(--surface-2); }
.ynseg label, .cp-yn label { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 64px; min-height: 40px;
  margin: 0; padding: 0 16px; border: 0; border-radius: var(--radius-pill, 999px); cursor: pointer; font-weight: 600; color: var(--muted); white-space: nowrap; }
.ynseg input, .cp-yn input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ynseg label:has(input:checked), .cp-yn label:has(input:checked) { background: var(--accent); color: #fff; }
.ynseg label:has(input:focus-visible), .cp-yn label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.ynseg label:has(input:disabled), .cp-yn label:has(input:disabled) { cursor: default; opacity: .75; }
@media (max-width: 560px) {
  .qrow, .cp-q { grid-template-columns: 1fr; }
  .ynseg, .cp-yn { justify-self: start; }
  .qrow > select, .cp-q > select { justify-self: stretch; max-width: none; }
}
/* question-row fixes (30 Nov review):
   - a .qrow that is also a .field: html.ui-modern .field label (modern.css / mc.css, loaded later, same specificity) made the
     answers small and grey and the picked answer dark grey on the accent - these out-rank it
   - big buttons (glove): the 1.4x radio scale / 26px size must not move the invisible full-size answer inputs
   - narrow boxes (pre-flight side panel, Book at This Price) stack the row at every width
   - phones: the switch fills the row and long answers wrap inside their own part instead of the switch breaking onto two lines */
html body .ynseg.ynseg label, html body .cp-yn.cp-yn label { font-size: var(--fs-sm, .85rem); font-weight: 600; color: var(--muted); }
html body .ynseg.ynseg label:has(input:checked), html body .cp-yn.cp-yn label:has(input:checked) { color: #fff; }
html.glove :is(.ynseg, .cp-yn) input { transform: none !important; margin: 0 !important; width: 100% !important; height: 100% !important; }
.pf-group .qrow, .iq-book .qrow { grid-template-columns: minmax(0, 1fr); }
.pf-group .qrow .ynseg, .iq-book .qrow .ynseg { justify-self: start; }
.ynseg-many { border-radius: var(--radius, 12px); }
.ynseg-many label { border-radius: var(--radius, 12px); }
.fd-pilot .ynseg label { white-space: normal; text-align: center; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .ynseg, .cp-yn { display: flex; flex-wrap: nowrap; width: 100%; justify-self: stretch; border-radius: var(--radius, 12px); }
  .ynseg label, .cp-yn label { flex: 1 1 0; min-width: 0; white-space: normal; text-align: center; line-height: 1.2; padding: 6px 8px;
    border-radius: var(--radius, 12px); overflow-wrap: break-word; }
}

/* paper (design review dark-5, 30 Nov 2026): signature pads and white sheets are "paper" on purpose.
   Day look: white with dark ink, as before. Dark mode: a signature pad (canvas.sigpad, added by static/js/sigpad.js) becomes a
   dark signing field with light ink on screen only (sigpad.js reads --sig-ink; the saved PNG is always dark ink on clear), and
   sheets that must stay white (sketch board, email preview, watermark preview, saved signatures) keep white paper with a
   visible frame, dimmed a little so they don't glare. New sheets: class="paper-sheet". */
:root { --paper: #fff; --paper-ink: #15202e; --paper-edge: var(--border); }
html[data-theme="night"] { --paper-edge: #46556a; --sig-bg: #0f151c; --sig-ink: #e6edf3; --sig-edge: #6b7c90; }
.paper-sheet { background: var(--paper); color: var(--paper-ink); border: 1px solid var(--paper-edge); border-radius: var(--radius-sm, 8px); }
html[data-theme="night"] :is(.paper-sheet, .sk-stage, .sk-thumb, .bk-email, .wm-preview, .fr-sig, .fm-sig) { filter: brightness(.92); border-color: var(--paper-edge); box-shadow: 0 0 0 1px var(--paper-edge); }
html[data-theme="night"] canvas.sigpad { background: var(--sig-bg); border-color: var(--sig-edge); }
html[data-theme="night"] .efb-padbox { background: var(--sig-bg); }
@media print { html[data-theme="night"] canvas.sigpad { background: #fff; } }
/* every pad's Clear button is a full finger's size (ipad-12) */
:is(.fo-pad-clear, .wc-pad-clear, [data-sign-clear], [data-fdbag-clear], [data-pv-clear], #ct-clear) { min-height: 44px; }

/* Projects list on an iPad (design picks ipad-15, 30 Nov 2026): one compact card a project - the title with its status on
   the right, then client, flight date and pilot on one line, then the next step. No squeezed columns. 701-1279px, so an
   iPad on its side gets the cards too: its seven columns wrapped names and next steps onto two lines (screen review v-36).
   ("html" in front: these beat html.ui-modern's table cell padding and lines.) */
@media (min-width: 701px) and (max-width: 1279px) {
  html:root table.pj-one thead { display: none; }
  html:root table.pj-one, html:root table.pj-one tbody { display: block; width: 100%; }
  html:root table.pj-one tbody tr { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 16px; row-gap: 4px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
  html:root table.pj-one tbody tr:last-child { border-bottom: 0; }
  html:root table.pj-one tbody td { display: block; padding: 0; border: 0; background: none; font-size: var(--fs-sm, .85rem); color: var(--text-2, var(--muted)); }
  html:root table.pj-one tbody td:empty, html:root table.pj-one tbody td.pj-next:has(> .muted:only-child) { display: none; }
  html:root table.pj-one tbody td.pj-title { flex: 1 1 calc(100% - 172px); min-width: 0; font-size: var(--fs-md, .92rem); color: var(--text); }
  html:root table.pj-one tbody td { order: 3; }
  html:root table.pj-one tbody td.pj-title { order: 0; }
  html:root table.pj-one tbody td.pj-status { order: 1; flex: 0 0 156px; text-align: right; }
  html:root table.pj-one tbody td.pj-client { order: 2; }
  html:root table.pj-one tbody td.pj-next { order: 4; flex: 1 1 100%; }
  html:root table.pj-one tbody td.empty { flex: 1 1 100%; text-align: center; padding: 14px 0; }
  html:root table.pj-one tbody td::before { content: none; display: none; }
  html:root table.pj-one tbody :is(td.pj-pilot, td:not([class])[data-label])::before { content: attr(data-label) ": "; display: inline; color: var(--muted); }
}

/* keyboard hints only with a mouse or trackpad (design picks ipad-14, 30 Nov 2026): base.html marks a touch screen with no
   pointer html.keys-off, so an iPad without a keyboard shows no Ctrl K / ⌘K badges or menu-bar shortcuts */
html.keys-off :is(.fdl-k, .mr-find-k, .mb-item kbd, kbd.kb-hint) { display: none !important; }

/* notice kinds (design picks states-6, 30 Nov 2026): a plain .notice stays the amber "check this" box; .notice-ok is a green
   confirmation, .notice-bad a red problem, .notice-info a calm neutral note. Tokens only, so night follows. */
html:root .notice:is(.notice-ok, .notice-bad, .notice-info) code { background: transparent; border-color: currentColor; }
html:root .notice.notice-ok { background: var(--tint-ok); border-color: var(--tint-ok-b); color: var(--ok-text, #0e5c30); }
html:root .notice.notice-bad { background: var(--tint-bad); border-color: var(--tint-bad-b); color: var(--bad-text, #8f1f1f); }
html:root .notice.notice-info { background: var(--surface-2); border-color: var(--border); color: var(--text); }
html:root body.pro .notice.notice-ok { background: var(--tint-ok); border-color: var(--tint-ok-b); color: var(--ok-text, #4ade80); }
html:root body.pro .notice.notice-bad { background: var(--tint-bad); border-color: var(--tint-bad-b); color: var(--bad-text, #f87171); }
html:root body.pro .notice.notice-info { background: var(--surface-2); border-color: var(--border); color: var(--text); }

/* the map and flight day use the site's toasts now (design picks states-4): they sit where the old .fd-toast did, clear of the
   map's own controls and the phone's bottom bar */
html.ui-modern body:has(.amap-wrap, #fd-status) .flashes.m-toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
/* design picks clutter-4 / clutter-7 (30 Nov 2026): a record's "Kept as ..." note is one quiet line, not a panel; a page that
   belongs only to Beta modules says so once, at its foot, to whoever may switch modules (features_web.page_beta_note) */
.sv-kept { margin: 2px 2px 14px; }
.beta-note { margin-top: 8px; margin-bottom: 24px; }

/* ---- spacing helpers (design picks consistency-6, 30 Nov 2026) ------------------------------------------------------------
   One spacing scale (--sp-1..4 = 4 8 12 16px) instead of a style="margin:6px 0 0" on each tag. A template writes
   class="m-0 mt-2" where it used to write style="margin:6px 0 0". The margin helpers carry !important because they stand
   in for the inline style they replaced (an inline style beats every rule but an !important one); the row helpers do not,
   so a script's el.style.display = "none" and the hidden attribute's rule still win. tests/e2e_csstokens.py counts the
   inline styles left so the number only goes down. */
.m-0 { margin: 0 !important; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: var(--sp-1) !important; } .mt-2 { margin-top: var(--sp-2) !important; }
.mt-3 { margin-top: var(--sp-3) !important; } .mt-4 { margin-top: var(--sp-4) !important; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: var(--sp-1) !important; } .mb-2 { margin-bottom: var(--sp-2) !important; }
.mb-3 { margin-bottom: var(--sp-3) !important; } .mb-4 { margin-bottom: var(--sp-4) !important; }
.row-wrap { display: flex; gap: var(--sp-2); flex-wrap: wrap; }      /* buttons, chips or fields side by side, wrapping */
.row-flat { display: flex; gap: var(--sp-2); }                        /* the same on one line */
.row-split { display: flex; justify-content: space-between; gap: var(--sp-2); }   /* a title left, its action right */
.pre-line { white-space: pre-line !important; } .pre-wrap { white-space: pre-wrap !important; }
[hidden]:is(.row-wrap, .row-flat, .row-split) { display: none; }

/* ---- one card (design picks consistency-9, 30 Nov 2026) ------------------------------------------------------------------
   .panel is the box. A tile you tap is .panel.is-tile: the same box, the whole of it a link or button, the edge going to the
   accent on hover and focus. A tool's own card class (cp-card, ft-card, auth-card, sn-card, pt-card, mod-tile) draws its box
   from --card-bg / --card-line / --radius / --card-shadow and adds only its layout. */
.panel.is-tile { display: block; text-decoration: none; color: inherit; cursor: pointer; }
/* a tile keeps its box where purpose.css turns a show-only panel into a ruled section (the :not(#_) outranks that rule
   without stacking more :root selectors) */
body .panel.is-tile:not(#_) { background: var(--card-bg, var(--surface)); border: 1px solid var(--card-line, var(--border)); border-radius: var(--radius);
  box-shadow: var(--card-shadow, none); padding: var(--sp-3) var(--sp-4); }
body .panel.is-tile:not(#_):is(:hover, :focus-visible) { border-color: var(--accent); }

/* screen review v-32: the flight log's per-pilot hour cards have a heading */
.fl-hours-h { font-size: var(--fs-sm, .85rem); font-weight: 600; color: var(--muted); margin: 0 0 8px; }
/* screen review v-60: Your Account > My Logbook - the totals, then Download PDF, Spreadsheet (CSV), Other Formats */
.acct-lb-figs { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 4px 0 14px; }
.acct-lb-figs > div { display: flex; flex-direction: column-reverse; gap: 2px; min-width: 80px; }
.acct-lb-figs dt { font-size: var(--fs-sm, .85rem); color: var(--muted); font-weight: 500; }
.acct-lb-figs dd { margin: 0; font-size: var(--fs-xl, 1.32rem); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.acct-lb-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; }
.acct-lb-acts .acct-lb-more { flex-basis: 100%; font-size: var(--fs-sm, .85rem); }
.acct-lb-acts .acct-lb-more[open] > a { display: inline-block; margin: 4px 0 0 2px; }
/* v-10: a folded panel's one-line hint sits on the title's baseline, the chevron after it */
details.panel > summary { flex-wrap: wrap; align-items: baseline; row-gap: 2px; }
details.panel > summary .sb-hint { font-weight: 400; }
/* Safety Actions: one Done button a row, opening its What was done line (screen review v-33) */
details.act-done { display: inline-block; vertical-align: middle; }
details.act-done > summary { list-style: none; }
details.act-done > summary::-webkit-details-marker { display: none; }
details.act-done[open] > summary { display: none; }
.act-done-f { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.act-done-f .act-did { width: 12rem; max-width: 100%; }
/* One row of a dated list (compliance calendar, claims, issued kit): title left, date or action right, a rule between rows.
   Moved here from ops.css (screen review v-56): ops.css loads only with the radios/equipment modules, so on other teams the
   rows ran together and each date floated under the next title. */
.away-row { display: flex; justify-content: space-between; align-items: center; gap: 6px 14px; padding: 10px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.away-row:first-of-type, .cc-month + .away-row { border-top: 0; }
.away-row > div:first-child { min-width: 0; flex: 1 1 16rem; }
.away-row > .badge, .away-row > form { flex: none; }
.cc-month { font-size: var(--fs-xs, .78rem); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 2px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.cc-month:first-child, h2 + .cc-month { margin-top: 6px; }
html body .cc-list:not(#_) { display: block; }   /* the paged Coming Up list: rows touch, the rules part them */

/* Screen review v-41: one shared More / Export menu for a page's extra tools (a <details class="act-menu"> whose summary is a
   button and whose list holds links), and the phone "Filters" fold for a list's filter row (form[data-filters] > .f-more,
   finishfeel.js). */
.act-menu { position: relative; display: inline-block; }
.act-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.act-menu > summary::-webkit-details-marker { display: none; }
.act-menu > summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.act-menu[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.act-menu-list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 70; min-width: 230px; max-width: min(320px, calc(100vw - 32px)); display: flex; flex-direction: column; padding: 6px;
  background: var(--surface, #fff); border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); box-shadow: var(--shadow-2); }
.act-menu-list.left { right: auto; left: 0; }
.act-menu-list > a, .act-menu-list > button, .act-menu-list > form > button { display: flex; align-items: center; width: 100%; min-height: 40px; padding: 8px 10px; box-sizing: border-box; border: 0; border-radius: calc(var(--radius-sm) - 2px);
  background: none; color: var(--text); font: inherit; font-size: var(--fs-sm, .9rem); font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.act-menu-list > a:hover, .act-menu-list > button:hover, .act-menu-list > a:focus-visible { background: var(--surface-2, rgba(127, 127, 127, .1)); }
.act-menu-list hr { border: 0; border-top: 1px solid var(--border); margin: 4px 2px; }
.f-more { display: contents; }
@media (min-width: 701px) { html body .f-toggle:not(#_) { display: none; } }
html body form:not(.f-js) .f-toggle { display: none !important; }
.f-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent, #fff); font-size: 11px; font-weight: 700; box-sizing: border-box; }
@media (max-width: 700px) {
  form.f-js .f-toggle { display: inline-flex; align-items: center; }
  form.f-js:not(.f-open) .f-more { display: none !important; }
  form.f-js.f-open .f-more { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 0 100%; }
  form.f-js.f-open .f-more > * { flex: 1 1 140px; min-width: 0; }
  form.f-js.f-open .f-more select { width: 100%; }
}
/* the paged list's search row with its filters in it: one row, one Search button, Columns at the end (list_bar's caller) */
.lp-bar .f-more select { width: auto; max-width: 220px; min-width: 0; }
.lp-bar .f-more label.lp-check { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm, .85rem); white-space: nowrap; margin: 0; }
.row-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }   /* a row's small actions under its title (v-70) */
.act-menu.row-more .act-menu-list { min-width: 180px; }
/* a text action inside a table row that must not make the row taller than its neighbours (Record Payment, v-70) */
@media (pointer: fine) { table .btn.row-tight { min-height: 0; height: 26px; padding: 0 10px; font-size: var(--fs-xs, .8rem); line-height: 24px; } }
.act-menu.row-more > summary::after { display: none; }   /* an icon-only More: the dots are enough */
:is(h1, h2, h3, h4) abbr { text-decoration: none; border-bottom: 0; }   /* no dotted "link" look in a heading (v-78) */
.table-wrap + p, table + p.small, table + p.muted { margin-top: 12px; }   /* a footnote under a table has room to breathe (v-78) */
/* Processes: the same columns in Business, Operations and Building (v-78) */
@media (min-width: 701px) { table.pr-table { table-layout: fixed; width: 100%; } .pr-table .pr-c-l { width: 3em; } .pr-table .pr-c-d { width: 15em; } .pr-table .pr-c-s { width: 11em; }
  .pr-table td { overflow-wrap: anywhere; } .pr-table td.nowrap:not(:first-child) { white-space: normal; } }

/* screen review v-53: a header or toolbar button keeps its label on one line ("Day Route", "Minimum Equipment List");
   the row wraps the whole button to the next line instead of breaking the words inside it */
main :is(.page-head, .row-wrap, .btn-row, .head-actions, .page-head > div) > :is(a.btn, button.btn) { white-space: nowrap; }

/* screen review w-21: the DPIA reads as headed sections, not a monospace dump */
.dpia-text h3.dpia-step { font-size: var(--fs-base); margin: 18px 0 4px; }
.dpia-text p { max-width: 72ch; line-height: 1.55; margin: 0 0 8px; }
html body [data-step-last][hidden] { display: none; }   /* steps.js: finishing buttons on the last step only (w-23) */
/* w-31: Integrations' key scopes and webhook events, one option to a row with a switch on the right */
.int-opts { max-width: 640px; margin: 8px 0 14px; }
.int-opts > label.qrow { cursor: pointer; font-weight: 500; }
.int-opts > label.qrow > input.switch { justify-self: end; margin: 0; }
.int-name { max-width: 640px; }
@media (max-width: 560px) { .int-opts > label.qrow { grid-template-columns: minmax(0, 1fr) auto; } }
.int-opts.int-opts > label.qrow.qrow > span { grid-column: 1; }   /* the words beside the switch, not over it */
/* w-32: Surcharges' travel bands and licences as labelled rows; the currency and unit sit in the box */
.xb-table { display: grid; gap: 6px; max-width: 520px; margin: 6px 0; }
.xb-lic { max-width: 560px; }
.xb-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.xb-lic .xb-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.xb-head span { font-size: var(--fs-sm, .85rem); font-weight: 600; color: var(--muted); }
.xb-from { font-variant-numeric: tabular-nums; color: var(--muted); }
.xb-in { position: relative; display: flex; align-items: center; margin: 0; min-width: 0; }
.xb-in input { width: 100%; min-width: 0; }
.xb-in .xb-cur { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.xb-in .xb-cur + input { padding-left: 26px; }
.xb-in .xb-unit { position: absolute; right: 10px; color: var(--muted); pointer-events: none; }
.xb-in input:has(+ .xb-unit) { padding-right: 34px; }
.xb-beyond { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.xb-beyond .xb-in { width: 130px; }
.xb-vsave { margin-top: 10px; }

/* marks.css */
/* Status marks (14 Nov 2026): a coloured dot in front of a card's title says its state, instead of a coloured stripe down
   the left edge. The word next to it (Ready to fly, Not verified, Stop...) still says it in plain text. Loaded on every page. */
/* ONE red, ONE amber, ONE green (quiet ops Q1, the owner's pick 23 Nov 2026): these are the site's status colours, light
   and dark. Each reads as text on its background and as a dot. Every other "ok / warn / bad" name on team pages points
   here (static/css/plainer.css), and new styles use var(--mk-ok / --mk-warn / --mk-bad / --mk-info), never a hex. */
:root { --mk-ok: #1a7f45; --mk-warn: #9a5b00; --mk-bad: #c62828; --mk-info: #1f6fd1; --mk-none: #9aa3ad; --danger: var(--mk-bad); --on-mk: #fff; }   /* amber 5.4:1 on white (dd57 a11y-4) */
:root[data-theme="night"] { --mk-ok: #4fb37a; --mk-warn: #e3a33b; --mk-bad: #f27d76; --mk-info: #6ea8e0; --mk-none: #636366; --on-mk: #16181a; }   /* words on a status fill: near-black in Dark, 5.9-8.1:1 (ra a11y-colour-1) */

:is(.today-brief .tb-count, .db-card > h3, .fd-ready li > b, .ft-verdict-head > b, .ll-wx > b, .fc-result > h2, .jm-check-head > b,
    .fw-warn > b, .pack-check > b, .status-incident > h2, .fitness-done > b, .ob-verdict, .ns-label, .fd-clear, .sc-day > :first-child,
    .cp-figs .is-bad > dt, .cp-figs .is-warn > dt, .wr-sum-k, .m-toasts .flash)::before {
  content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: .06em;
  flex: none; background: var(--mk, var(--mk-none));
}

/* which colour */
:is(.today-brief.st-ok, .db-ok, .fd-ready li.rag-ok, .ft-ok, .ll-wx, .fc-ok, .jm-check-ok, .pack-check, .fitness-done, .ob-ok,
    .next-step.who-done, .fd-clear, .sc-day.st-ok, .wr-sum, .m-toasts .flash-success) { --mk: var(--mk-ok); }
:is(.today-brief.st-warn, .db-warn, .fd-ready li.rag-warn, .ft-warn, .ll-wx.st-warn, .fc-warn, .jm-check-warn, .fw-warn, .status-warn,
    .ob-warn, .next-step.who-client, .sc-day.st-warn, .cp-figs .is-warn, .wr-sum-medium, .m-toasts .flash-warning) { --mk: var(--mk-warn); }
:is(.fw-orange, .wr-sum-high) { --mk: var(--mk-warn); }
:is(.today-brief.st-bad, .db-bad, .fd-ready li.rag-bad, .ft-bad, .ll-wx.st-bad, .fc-bad, .jm-check-bad, .fw-red, .pack-check.bad,
    .status-bad, .fitness-done.bad, .sc-day.st-bad, .cp-figs .is-bad, .wr-sum-urgent, .m-toasts .flash-error) { --mk: var(--mk-bad); }
:is(.next-step.who-you, .db-navy, .m-toasts .flash-info) { --mk: var(--mk-info); }
.fd-ready li { border-left: 0; }

/* A plain dot + word anywhere (16 Nov 2026): <span class="mk mk-ok">Done</span>. */
.mk { white-space: nowrap; }
.fd .mk { white-space: normal; }   /* long Flight day status lines wrap (dd57 a11y-9) */
.mk::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: .08em; background: var(--mk, var(--mk-none)); }
.mk-ok { --mk: var(--mk-ok); } .mk-warn { --mk: var(--mk-warn); } .mk-bad { --mk: var(--mk-bad); } .mk-info { --mk: var(--mk-info); } .mk-none { --mk: var(--mk-none); }
/* the sign-in is about to end (dd57 a11y-10) */
.session-warn { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 3000; display: flex; gap: 12px; align-items: center;
  max-width: calc(100vw - 32px); padding: 10px 14px; border-radius: var(--radius-sm, 8px); background: var(--surface, #fff); color: var(--text, #111); border: 2px solid var(--mk-warn); box-shadow: var(--shadow-3, 0 12px 32px rgba(10,16,24,.24)); font-weight: 600; }
body.has-pbar .session-warn { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
/* dd18 learn-12: a short form's meaning on tap (static/js/a11y.js) */
button.jg { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.jg-pop { position: absolute; z-index: 60; max-width: 300px; margin-top: 4px; padding: 10px 12px; border-radius: var(--radius-sm, 8px); background: var(--panel, #fff);
  color: var(--text, #111); border: 1px solid var(--line, #ccc); box-shadow: var(--shadow-3, 0 12px 32px rgba(10,16,24,.24)); font-size: 14px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.jg-pop p { margin: 0 0 6px; }

/* forms this person can't save (droneops/formgate.py, ra accounts-19): read-only ones keep their values, lose their buttons */
form[hidden] {display:none !important}
form[data-cant-save="read"] button, form[data-cant-save="read"] [type=submit] {display:none !important}

/* ra auditor-12: an inspector's pages are read-only - the ways into adding or editing are put away (forms: droneops/formgate.py) */
body.read-only :is(.add-panel, .page-add, details.log-toggle-wrap, summary.log-toggle, .fdo-snz, .no-ro, [data-ro-hide], .empty-state .btn, a[href*="?edit="], a[href*="&edit="], a[href*="#action-form"], a[href$="/new"]) { display: none !important; }
.ro-pill { align-self: center; margin-right: 8px; }
/* map pins carry their stage letter (the pin is turned -45deg, so the letter turns back); a hollow key arrow = close to the limit (ra a11y-colour-12) */
.amap-pin > b { display: grid; place-items: center; width: 100%; height: 100%; transform: rotate(45deg); color: #fff; font: 700 11px/1 system-ui, sans-serif; pointer-events: none; }
.amap-legend i.arrow-hollow { color: transparent !important; -webkit-text-stroke: 1.5px #e09b00; }
/* a word beside a dot that means urgent or must do, not colour alone (ra a11y-colour-14) */
.setup-card .setup-must, .ha-needw, .att-word { font-size: var(--fs-xs, .78rem); margin-right: 4px; color: var(--mk-bad, #c62828); }
.ha-needw.w, .st-warn .att-word { color: var(--mk-warn, #9a5b00); }
.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; }   /* words for screen readers only, on every page */
/* a file box inside a button: hidden but still reachable by Tab; the button shows the focus (ra a11y-keyboard-1) */
input[type=file].sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; border: 0 !important; opacity: 0; }
label[data-filebtn], label:has(> input[type=file].sr-only) { position: relative; }
label[data-filebtn]:has(> input:focus-visible), label:has(> input[type=file].sr-only:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
label[data-filebtn]:focus-within { box-shadow: var(--ring); }
/* the announcement area is always on the page, empty until a message comes: it takes no space and catches no taps (ra a11y-keyboard-7) */
.flashes:empty { margin: 0; padding: 0; min-height: 0; pointer-events: none; }
/* main headings that look like the bold labels they replaced (ra a11y-keyboard-13) */
.efb-bar .efb-h1 { display: inline; margin: 0; font: inherit; font-weight: 700; color: var(--e-acc, inherit); }
.dl-head .dl-h1 { display: inline; margin: 0; font-size: var(--fs-base, 1rem); font-weight: 700; line-height: inherit; }
.client-help { margin-top: 18px; } .client-help p { margin: 4px 0; }   /* who to call, at the foot of client pages (ra a11y-keyboard-14) */
.ws-stop { margin: 6px 0 12px; }   /* Stop Updating after a box that updates by itself (waitswap.js) */
/* + quick actions: Undo Last Change while an undo is still in time (ra a11y-mobile-6) */
.app-add-sheet form.app-add-undo { margin: 0; }
.app-add-sheet form.app-add-undo button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 12px; border: 0; border-radius: var(--radius-sm, 8px);
  background: none; color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.app-add-sheet form.app-add-undo button:hover, .app-add-sheet form.app-add-undo button:focus-visible { background: var(--surface-2, var(--accent-soft)); }
/* the box you Tab to stops above the phone's bottom bar, however tall it really is (ra a11y-mobile-10) */
html:has(body.has-app-bar) { scroll-padding-bottom: calc(var(--app-bar-h, 64px) + env(safe-area-inset-bottom) + 8px); }
html:has(body.has-pbar) { scroll-padding-bottom: calc(var(--pbar-h, 70px) + 8px); }
/* the bottom bar's Menu is a real button now: it keeps the label's look (ra shared-2) */
.app-bar button.m-more { background: none; border: 0; font-family: inherit; cursor: pointer; -webkit-appearance: none; appearance: none; margin: 0; }
.app-bar button.m-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm, 8px); }
/* "Read It Instead": the written version of a spoken clip, on quotes and web reports (ra shared-4) */
.qv-read { margin-top: 8px; }
.qv-read > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.qv-read p { margin: 4px 0 0; white-space: pre-line; }
.qv-text, .fc-text { display: grid; gap: 6px; margin-top: 10px; }

/* Finding severity as dot + word (design picks dark-8, 30 Nov 2026): web report, walk-through. Four colours, like the photo and map pins. */
.sev-low { --mk: var(--mk-ok); } .sev-medium { --mk: var(--mk-warn); } .sev-urgent { --mk: var(--mk-bad); }
/* High keeps its own orange between amber and red, so the badge dot matches the orange High pin on the photo and map */
.sev-high { --mk: color-mix(in srgb, var(--mk-bad) 60%, var(--mk-warn)); }
.sev-urgent { color: var(--mk-bad); font-weight: 600; }
/* check-list dots on the project Airspace tab and flight conditions: <i class="mk-ok"> etc. take the theme's status colour */
:is(.ck-items, .ck-list) i:is(.mk-ok, .mk-warn, .mk-bad, .mk-info, .mk-none) { background: var(--mk); }
/* screen review v-50 (30 Nov 2026): an enquiry's state sits a clear gap after the name, in the normal weight, so the dot
   reads as the start of the state and not as part of the name */
.mk.enq-st { margin-left: 12px; font-size: var(--fs-sm, .85rem); font-weight: 500; }
.mk.enq-new { margin-right: 10px; font-size: var(--fs-sm, .85rem); font-weight: 500; }
.lib-marks { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 3px; font-size: var(--fs-sm, .85rem); }   /* a document's marks on their own line (v-50) */

/* mapchrome.css */
/* Map controls in the site's own look (15 Nov 2026, user: "the white doesn't suit the website - make it modern and in line
   with the website"). Every Leaflet and MapLibre map: zoom, the Print button, the north mark, attribution and the
   mission plan's hint bar sit on a see-through panel in the theme's own surface colour (dark in the night look, light by
   day) instead of the libraries' plain white boxes. Prefixed with :root so it wins over leaflet.css / maplibre-gl.css,
   which some pages load after this file. */
:root, .fd-body, .md-body, .fdm-body, .mph {   /* worked out again where a dark deck sets its own colours (19 Nov 2026: the
   "What's here" panel was day glass under the deck's light text) */
  --mc-glass: color-mix(in srgb, var(--surface, #fff) 84%, transparent);
  --mc-glass-hover: color-mix(in srgb, var(--surface-2, #f1f4f8) 94%, transparent);
  --mc-edge: color-mix(in srgb, var(--border, #e2e7ee) 80%, transparent);
  --mc-shadow: 0 2px 10px rgba(8, 12, 20, .22);
  /* buttons on top of a map, film or photo (15 Nov 2026, user liked the landing page's "Pause film" / "Scroll down"):
     smoked glass, white words, a thin white edge, round ends - the same in the day and night looks, because what's
     underneath is a picture, not the page */
  --ov-bg: rgba(12, 16, 22, .58);
  --ov-bg-hover: rgba(12, 16, 22, .76);
  --ov-edge: rgba(255, 255, 255, .42);
  --ov-text: #fff;
  --ov-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

/* the overlay button: use class="ov-btn" on any new button that sits on a map, film or photo */
:root .ov-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: var(--ov-bg); color: var(--ov-text); border: 1px solid var(--ov-edge); box-shadow: var(--ov-shadow);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
:root .ov-btn:hover, :root .ov-btn:focus-visible { background: var(--ov-bg-hover); color: var(--ov-text); }
:root .ov-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* zoom and other control groups */
:root .leaflet-bar, :root .maplibregl-ctrl-group { border: 1px solid var(--mc-edge); border-radius: 10px; overflow: hidden;
  background: var(--mc-glass); box-shadow: var(--mc-shadow); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
:root .leaflet-touch .leaflet-bar { border: 1px solid var(--mc-edge); }
:root .leaflet-bar a, :root .leaflet-touch .leaflet-bar a { width: 40px; height: 40px; line-height: 40px; background: transparent; color: var(--text, #15202e);
  border-bottom: 1px solid var(--mc-edge); font: 500 20px/40px var(--font, Inter, system-ui, sans-serif); }
:root .leaflet-bar a:last-child { border-bottom: 0; }
:root .leaflet-bar a:hover, :root .leaflet-bar a:focus-visible { background: var(--mc-glass-hover); color: var(--text, #15202e); }
:root .leaflet-bar a.leaflet-disabled { background: transparent; color: var(--muted, #8a94a3); opacity: .6; }
:root .maplibregl-ctrl-group button { background-color: transparent; }
:root .maplibregl-ctrl-group button + button { border-top: 1px solid var(--mc-edge); }
:root .maplibregl-ctrl-group button:not(:disabled):hover { background-color: var(--mc-glass-hover); }
html[data-theme="night"] .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1) brightness(1.4); }

/* the Print button (static/js/mapprint.js) */
:root .mp-btn { min-height: 40px; padding: 0 14px; border-radius: 10px; color: var(--text, #15202e); background: var(--mc-glass);
  border: 1px solid var(--mc-edge); box-shadow: var(--mc-shadow); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-weight: 600; }
:root .leaflet-bar.mp-ctrl, :root .maplibregl-ctrl-group.mp-ctrl { background: transparent; border: 0; box-shadow: none; overflow: visible; }
:root .mp-btn:hover { background: var(--mc-glass-hover); }

/* the north mark on the mission plan */
:root .fp-north { min-width: 40px; padding: 5px 8px; border-radius: 10px; background: var(--mc-glass); color: var(--text, #15202e);
  border: 1px solid var(--mc-edge); box-shadow: var(--mc-shadow); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

/* attribution: small and quiet */
:root .leaflet-control-attribution, :root .maplibregl-ctrl-attrib { background: var(--mc-glass); color: var(--muted, #5b6676); font-size: 10px;
  border-radius: 6px 0 0 0; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
:root .leaflet-control-attribution a, :root .maplibregl-ctrl-attrib a { color: inherit; }

/* the mission plan's hint (what to do next): a quiet panel, not a solid bar */
:root .fp-mapwrap .fp-hint:not(:empty) { background: var(--mc-glass); color: var(--text, #15202e); border: 1px solid var(--mc-edge); box-shadow: var(--mc-shadow);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-weight: 500; }
@media (max-width: 699px) {
  :root .fp-mapwrap .fp-hint:not(:empty) { background: var(--surface-2, #f6f8fb); box-shadow: none; border: 0; border-bottom: 1px solid var(--border, #e2e7ee);
    color: var(--muted, #5b6676); font-size: .82rem; padding: 8px 12px; }
}

/* ===== Buttons on top of a map, film or photo (15 Nov 2026) =========================================================
   The landing page's "Pause film" look everywhere a button sits on a picture: smoked glass, white words, a thin white
   edge, round ends. "html:root body" so it wins over the button styles of the modern looks. A button that is switched
   on turns white with dark words. Menus that open from these buttons stay as normal panels. */

/* text buttons */
html:root body :is(.mp-btn, .vp-ctl .vp-btn, .fps-me, .ar-start .btn, .max-exit, .efb-mapbtns button,
  .leaflet-control.mf-bar > .btn, .leaflet-control.mf-bar > button, .leaflet-control.mf-bar > label.btn, .leaflet-control.mf-bar > .mf-menu > summary,
  .leaflet-control.mf-key > summary) {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  background: var(--ov-bg); color: var(--ov-text); border: 1px solid var(--ov-edge); box-shadow: var(--ov-shadow);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-weight: 600; text-decoration: none; cursor: pointer; }
html:root body :is(.mp-btn, .vp-ctl .vp-btn, .fps-me, .ar-start .btn, .max-exit, .efb-mapbtns button,
  .leaflet-control.mf-bar > .btn, .leaflet-control.mf-bar > button, .leaflet-control.mf-bar > label.btn, .leaflet-control.mf-bar > .mf-menu > summary,
  .leaflet-control.mf-key > summary):is(:hover, :focus-visible) { background: var(--ov-bg-hover); color: var(--ov-text); border-color: rgba(255, 255, 255, .6); }
html:root body :is(.vp-ctl .vp-btn.on, .efb-mapbtns button[aria-pressed="true"], .mf-movebtn[aria-pressed="true"], .leaflet-control.mf-bar > .btn.on, .leaflet-control.mf-bar > .mf-menu[open] > summary,
  .leaflet-control.mf-key[open] > summary) { background: #fff; color: #0e1621; border-color: #fff; box-shadow: var(--ov-shadow); }
html:root body .ar-start .btn { min-height: 48px; padding: 0 22px; }
@media (pointer: coarse) { html:root body :is(.mp-btn, .vp-ctl .vp-btn, .efb-mapbtns button, .leaflet-control.mf-bar > .btn, .leaflet-control.mf-bar > .mf-menu > summary, .leaflet-control.mf-key > summary) { min-height: 44px; } }

/* the bars that hold them: no panel behind, just the buttons */
html:root body :is(.leaflet-control.mf-bar, .leaflet-bar.vp-ctl, .leaflet-bar.mp-ctrl, .maplibregl-ctrl-group.mp-ctrl) {
  background: transparent; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; overflow: visible; }
html:root body .leaflet-control.mf-bar { padding: 0; gap: 6px; }
html:root body .leaflet-control.mf-key { background: transparent; border: 0; box-shadow: none; }
html:root body .leaflet-control.mf-key[open] .mf-key-body { margin-top: 6px; background: var(--mc-glass); color: var(--text); border: 1px solid var(--mc-edge);
  border-radius: 12px; box-shadow: var(--mc-shadow); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
html:root body .leaflet-control.mf-key[open] > summary { border-bottom: 1px solid #fff; }

/* zoom, compass, find me and the layers button: one smoked group */
html:root body :is(.leaflet-bar:not(.mp-ctrl):not(.vp-ctl), .maplibregl-ctrl-group:not(.mp-ctrl), .leaflet-control-layers:not(.leaflet-control-layers-expanded)) {
  background: var(--ov-bg); border: 1px solid var(--ov-edge); border-radius: 14px; box-shadow: var(--ov-shadow); overflow: hidden;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
html:root body .leaflet-bar:not(.mp-ctrl):not(.vp-ctl) a { background: transparent; color: var(--ov-text); border-bottom: 1px solid rgba(255, 255, 255, .25); }
html:root body .leaflet-bar:not(.mp-ctrl):not(.vp-ctl) a:last-child { border-bottom: 0; }
html:root body .leaflet-bar:not(.mp-ctrl):not(.vp-ctl) a:is(:hover, :focus-visible) { background: rgba(255, 255, 255, .14); color: var(--ov-text); }
html:root body .leaflet-bar:not(.mp-ctrl):not(.vp-ctl) a.leaflet-disabled { background: transparent; color: rgba(255, 255, 255, .45); opacity: 1; }
html:root body .maplibregl-ctrl-group:not(.mp-ctrl) button { background-color: transparent; }
html:root body .maplibregl-ctrl-group:not(.mp-ctrl) button + button { border-top: 1px solid rgba(255, 255, 255, .25); }
html:root body .maplibregl-ctrl-group:not(.mp-ctrl) button:not(:disabled):hover { background-color: rgba(255, 255, 255, .14); }
html:root body .maplibregl-ctrl-group:not(.mp-ctrl) button .maplibregl-ctrl-icon { filter: invert(1) brightness(2); }
html:root body .leaflet-control-layers:not(.leaflet-control-layers-expanded) .leaflet-control-layers-toggle { filter: invert(1) brightness(2); background-color: transparent; }

/* the facts across the top of the mission plan map */
html:root body .fp-fig { background: var(--ov-bg); color: var(--ov-text); border: 1px solid var(--ov-edge); border-radius: 12px; box-shadow: var(--ov-shadow);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
html:root body .fp-fig span { color: rgba(255, 255, 255, .78); }
html:root body .fp-fig:is(:hover, :focus-visible) { background: var(--ov-bg-hover); }

/* the north mark */
html:root body .fp-north { background: var(--ov-bg); color: var(--ov-text); border: 1px solid var(--ov-edge); border-radius: 999px; }

/* photo viewer: back, next and close */
html:root body :is(.lb-prev, .lb-next, .lb-close, .lightbox button) { background: var(--ov-bg); color: var(--ov-text); border: 1px solid var(--ov-edge);
  box-shadow: var(--ov-shadow); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
html:root body :is(.lb-prev, .lb-next, .lb-close, .lightbox button):is(:hover, :focus-visible) { background: var(--ov-bg-hover); }

/* the mission plan map, tidied (15 Nov 2026, user: "overwhelming ... make it more compact"): on a computer or iPad
   - top left: the tools as ONE joined bar (Map, Draw, Add to the map, Check, Undo) with the next-step hint under it
   - top right: See a spot and Print joined; bottom right: the north mark above zoom
   - bottom left: Key and the figures as one slim strip; the key opens upwards
   36px tall with a mouse, 44px on touch. On phones the tools sit above the map and keep their normal look. */
/* top right on every screen: See a spot + Print joined; the north mark sits above zoom */
html:root body .fp-mapwrap .leaflet-top.leaflet-right { display: flex; align-items: flex-start; padding: 10px 10px 0 0; }
html:root body .fp-mapwrap .leaflet-top.leaflet-right > .leaflet-control { margin: 0; float: none; }
html:root body .fp-mapwrap .leaflet-top.leaflet-right > .vp-ctl { order: 1; }
html:root body .fp-mapwrap .leaflet-top.leaflet-right > .mp-ctrl { order: 2; }
html:root body .fp-mapwrap .leaflet-bottom.leaflet-right > .fp-north { margin: 0 10px 6px 0; }
html:root body .fp-mapwrap :is(.vp-ctl .vp-btn, .mp-btn) { min-height: var(--fpb-h, 44px); padding: 0 12px; font-size: .84rem; }
html:root body .fp-mapwrap .leaflet-right:has(.vp-ctl):has(.mp-ctrl) .vp-ctl .vp-btn { border-radius: 999px 0 0 999px; border-right: 0; }
html:root body .fp-mapwrap .leaflet-right:has(.vp-ctl):has(.mp-ctrl) .mp-btn { border-radius: 0 999px 999px 0; border-left: 1px solid rgba(255, 255, 255, .22); }
html:root body .fp-mapwrap .fp-north { display: grid; place-items: center; width: var(--fpb-h, 44px); height: var(--fpb-h, 44px); min-width: 0; padding: 0; border-radius: 50%;
    font-size: .7rem; line-height: 1; box-shadow: var(--ov-shadow); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

@media all {                       /* map review 14: the floating smoked tool row on phones too (was 700px and up) */
  .fp-mapwrap { --fpb-h: 36px; }
  /* the tools */
  html:root body .fp-toolbar.fp-float { display: flex; flex-wrap: nowrap; align-items: center; gap: 0; padding: 2px; border-radius: 999px; background: var(--ov-bg);
    border: 1px solid var(--ov-edge); box-shadow: var(--ov-shadow); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); max-width: calc(100% - 200px); width: max-content; }

  html:root body .fp-toolbar.fp-float .fp-tools { flex-wrap: nowrap; gap: 0; }
  html:root body :is(.fp-toolbar.fp-float > .fp-menu > summary, .fp-toolbar.fp-float .fp-tools > .fp-menu > summary, .fp-toolbar.fp-float .fp-tools > .btn) {
    min-height: var(--fpb-h); padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--ov-text); box-shadow: none;
    font-size: .84rem; font-weight: 600; gap: 4px; white-space: nowrap; }
  html:root body .fp-toolbar.fp-float .fp-tools > :is(.fp-menu, .btn) { position: relative; }
  html:root body .fp-toolbar.fp-float .fp-tools > :is(.fp-menu, .btn)::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 1px; background: rgba(255, 255, 255, .22); }
  html:root body :is(.fp-toolbar.fp-float > .fp-menu > summary, .fp-toolbar.fp-float .fp-tools > .fp-menu > summary, .fp-toolbar.fp-float .fp-tools > .btn):is(:hover, :focus-visible) {
    background: rgba(255, 255, 255, .14); color: var(--ov-text); }
  html:root body .fp-toolbar.fp-float .fp-tools > .btn:disabled { opacity: .45; background: transparent; }
  html:root body :is(.fp-toolbar.fp-float > .fp-menu[open] > summary, .fp-toolbar.fp-float .fp-tools > .fp-menu[open] > summary) { background: #fff; color: #0e1621; }
  html:root body .fp-toolbar.fp-float .fp-base-name { color: rgba(255, 255, 255, .75); opacity: 1; font-weight: 500; }

  html:root body .fp-toolbar.fp-float .fp-active { display: inline-flex; gap: 4px; margin-left: 4px; padding: 0 2px 0 10px; border-left: 1px solid rgba(255, 255, 255, .22); color: #fff; }
  html:root body .fp-toolbar.fp-float .fp-active[hidden] { display: none; }
  html:root body .fp-toolbar.fp-float .fp-active > .btn { min-height: calc(var(--fpb-h) - 4px); padding: 0 12px; border-radius: 999px; border: 0; box-shadow: none; }
  html:root body .fp-toolbar.fp-float .fp-active > .btn-accent { background: #fff; color: #0e1621; }
  html:root body .fp-toolbar.fp-float .fp-active > .btn-outline { background: transparent; color: #fff; }
  /* the next-step hint: just under the tools */
  html:root body .fp-mapwrap .fp-hint:not(:empty) { left: 10px; top: calc(var(--fpb-h) + 20px); bottom: auto; transform: none; max-width: min(460px, calc(100% - 200px));
    background: var(--ov-bg); color: #fff; border: 1px solid var(--ov-edge); border-radius: 12px; font-size: .84rem; padding: 6px 12px; }
  html:root body .fpw:not(.is-side-off) .fp-mapwrap .fp-hint:not(:empty) { left: 10px; }

  /* bottom left: Key + the figures as one strip */
  html:root body .fp-keybox.fp-float { left: 10px; bottom: 10px; background: transparent; border: 0; box-shadow: none; max-width: none; z-index: 601; }
  html:root body .fp-keybox.fp-float > summary { display: inline-flex; align-items: center; min-height: var(--fpb-h); padding: 0 14px; border-radius: 999px; background: var(--ov-bg);
    color: var(--ov-text); border: 1px solid var(--ov-edge); box-shadow: var(--ov-shadow); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: .84rem; }
  html:root body .fp-keybox.fp-float[open] > summary { background: #fff; color: #0e1621; border-color: #fff; border-bottom: 1px solid #fff; }
  html:root body .fp-keybox.fp-float .fp-key { position: absolute; left: 0; bottom: calc(100% + 6px); width: max-content; max-width: min(520px, 70vw); margin: 0;
    background: var(--mc-glass); color: var(--text); border: 1px solid var(--mc-edge); border-radius: 12px; box-shadow: var(--mc-shadow);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  html:root body .fp-mapwrap .fp-figs { top: auto; bottom: 10px; left: 72px; right: auto; width: max-content; max-width: calc(100% - 150px); flex-wrap: nowrap; gap: 0;
    overflow: hidden; border-radius: 999px; background: var(--ov-bg); border: 1px solid var(--ov-edge); box-shadow: var(--ov-shadow);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); pointer-events: auto; }
  html:root body .fp-mapwrap .fp-figs:empty { display: none; }
  html:root body .fp-mapwrap .fp-fig { flex-direction: row; align-items: baseline; gap: 4px; min-height: var(--fpb-h); padding: 0 12px; align-items: center;
    background: transparent; border: 0; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; white-space: nowrap; }
  html:root body .fp-mapwrap .fp-fig + .fp-fig { border-left: 1px solid rgba(255, 255, 255, .22); }
  html:root body .fp-mapwrap .fp-fig b { font-size: .88rem; }
  html:root body .fp-mapwrap .fp-fig span { font-size: .74rem; }
  html:root body .fp-mapwrap .fp-fig span br { display: none; }
  html:root body .fp-mapwrap .fp-fig:is(:hover, :focus-visible) { background: rgba(255, 255, 255, .14); }
  /* zoom: same height as the rest */
  html:root body .fp-mapwrap .leaflet-bar a { width: var(--fpb-h); height: var(--fpb-h); line-height: var(--fpb-h); }
}
/* 900px and up the settings panel sits over the right of the map: leave it room, and drop the background's name from the Map
   button (the Map menu shows which one) */
@media (min-width: 900px) {
  html:root body .fpw:not(.is-side-off) .fp-toolbar.fp-float { max-width: calc(100% - 520px); }
  html:root body .fpw:not(.is-side-off) .fp-toolbar.fp-float .fp-base-name { display: none; }
}
@media (min-width: 700px) and (pointer: coarse) { .fp-mapwrap { --fpb-h: 44px; } html:root body .fp-mapwrap .fp-figs { left: 80px; } }

/* Icons for the obvious actions (static/js/actionicons.js, 15 Nov 2026): icon beside the words on the page, icon only on a
   map, film or photo - square, same height as its neighbours; the name shows as a tip */
.ai-has { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.ai-has > svg.ai { width: 16px; height: 16px; flex: none; }
:is(.btn-xs, .btn-sm).ai-has > svg.ai { width: 14px; height: 14px; }
.ai-has.ai-only > .ai-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html:root body .ai-has.ai-only.ai-only.ai-only { padding-left: calc((var(--fpb-h, 40px) - 18px) / 2); padding-right: calc((var(--fpb-h, 40px) - 18px) / 2); width: auto; min-width: 0; height: auto; gap: 0; }
@media (pointer: coarse) { html:root body .ai-has.ai-only.ai-only.ai-only { padding-left: calc((var(--fpb-h, 44px) - 18px) / 2); padding-right: calc((var(--fpb-h, 44px) - 18px) / 2); } }
html:root body .ai-has.ai-only > svg.ai { width: 18px; height: 18px; margin: 0; }
html:root body .fp-mapwrap .leaflet-right:has(.vp-ctl):has(.mp-ctrl) .mp-btn.ai-only.ai-only.ai-only { padding: 0 12px 0 10px; }
.ib-tip { position: fixed; z-index: 9999; max-width: 220px; padding: 6px 10px; border-radius: 8px; background: #15191d; color: #fff;
  font-size: .8rem; line-height: 1.3; pointer-events: none; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
@media print { .ib-tip, svg.ai { display: none; } }

/* scale bar and map credits in the smoked look on every map (15 Nov 2026): the scale is a smoked box whose width is
   the distance; the credits a quiet smoked tag. On the mission plan the scale sits above the Key + figures strip,
   so the strip is the bottom line of the map. */
html:root body .leaflet-control-scale-line { background: var(--ov-bg); color: var(--ov-text); border: 2px solid rgba(255, 255, 255, .85); border-top: 0;
  border-radius: 0 0 4px 4px; font: 600 11px/1.5 var(--font, Inter, system-ui, sans-serif); padding: 1px 6px 0; text-shadow: none;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: none; }
html:root body .leaflet-control-attribution, html:root body .maplibregl-ctrl-attrib, html:root body .maplibregl-ctrl-attrib-inner {
  background: var(--ov-bg); color: rgba(255, 255, 255, .78); border: 0; box-shadow: none; }
html:root body .leaflet-control-attribution { margin: 0 6px 6px 0; padding: 1px 8px; border-radius: 999px; font-size: 10px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
html:root body .leaflet-control-attribution a, html:root body .maplibregl-ctrl-attrib a { color: inherit; }
html:root body .fp-mapwrap .leaflet-bottom.leaflet-left .leaflet-control-scale { margin: 0 0 calc(var(--fpb-h, 44px) + 18px) 10px; }
@media (max-width: 699px) { html:root body .fp-mapwrap .leaflet-bottom.leaflet-left .leaflet-control-scale { margin: 0 0 58px 8px; }
  html:root body .fp-mapwrap .leaflet-bottom.leaflet-right { bottom: 50px; } }

/* 17 Nov 2026: the next-step hint steps aside while one of the tool menus is open (it sat over the menu) */
html:root body .fp-mapwrap:has(.fp-menu[open]) .fp-hint:not(:empty) { display: none; }

/* the declination box (T.REX pick 3, Beta maplook): bottom left, above the scale */
:root .ml-decl { position: absolute; left: 10px; bottom: 34px; z-index: 450; max-width: 260px; padding: 6px 10px; border-radius: 10px;
  background: var(--mc-glass); color: var(--text, #15202e); border: 1px solid var(--mc-edge); box-shadow: var(--mc-shadow);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 12px; line-height: 1.35; pointer-events: none; }
:root .ml-decl b { display: block; font-weight: 600; }
:root .ml-decl span { display: block; }
:root .ml-decl .ml-decl-src { color: var(--muted, #8a94a3); font-size: 11px; }
:root .ml-decl[hidden] { display: none; }
/* on the airspace map the bottom left holds the Key and the wind bar: the box sits top right, under the map's menus */
:root #amap .ml-decl { left: auto; right: 10px; bottom: auto; top: 120px; text-align: right; }
/* 25 Nov 2026 (owner): the box now sits in the map's Key as its own section, not over the map */
:root body .ml-decl.ml-decl-inkey { position: static; z-index: auto; max-width: none; padding: 0; border: 0; border-radius: 0; background: none;
  box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; text-align: left; color: inherit; pointer-events: auto; font-size: inherit; }
:root body .ml-decl.ml-decl-inkey b { font-weight: 500; }
.ml-decl-sec[hidden] { display: none; }
.mf-key-body .ml-decl-sec { margin-top: 8px; } .mf-key-body .ml-decl-h { font-size: 12px; margin: 0 0 2px; }

/* a short hint or message on a map (smoked glass, top centre): djimap.js */
.map-chip { position: absolute; z-index: 3; top: 10px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 120px);
  padding: 8px 14px; border-radius: 18px; font-size: .9rem; font-weight: 600; color: #fff; pointer-events: none; text-align: center;
  background: rgba(17, 22, 30, .6); border: 1px solid rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.map-chip.map-chip-bad { background: rgba(120, 28, 28, .8); }
@media (max-width: 700px) { body.map-page .map-chip { top: calc(64px + env(safe-area-inset-top)); max-width: calc(100% - 80px); } }

/* map review 4: no hairline seams between map tiles; a dark edge so thin route and area lines read on bright aerial */
.leaflet-container img.leaflet-tile { outline: 1px solid transparent; }
.leaflet-overlay-pane path.lf-halo { filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, .75)); }

/* map review 5: every map button is a 44px touch target */
html:root body .maplibregl-ctrl-group:not(.mp-ctrl) button { width: 44px; height: 44px; }
html:root body .maplibregl-ctrl-group:not(.mp-ctrl) button .maplibregl-ctrl-icon { background-size: 24px; }
html:root body .leaflet-bar:not(.mp-ctrl):not(.vp-ctl) a, html:root body .leaflet-touch .leaflet-bar:not(.mp-ctrl):not(.vp-ctl) a { width: 44px; height: 44px; line-height: 44px; }
:root .mp-btn { min-height: 44px; }

/* map review 7: maps and sticky action bars stay clear of the phone's bottom bar. --app-bar-h is the bar's height (0 without one) */
:root { --app-bar-h: 0px; }
@media (max-width: 1024px), (max-width: 1366px) and (pointer: coarse) { body.has-app-bar { --app-bar-h: calc(var(--app-bar-m, 64px) + env(safe-area-inset-bottom)); } }   /* --app-bar-m: the bar measured (phonebar.js) */
/* design picks phone-3 (30 Nov 2026): every bar that sticks to the bottom of the page (Save rows, bulk actions, picks) sits
   the same 8px above the bottom bar, from this one rule; phones' floating pill sets its own --app-bar-h (phoneclean.css) */
@media (max-width: 1024px), (max-width: 1366px) and (pointer: coarse) {
  html body:is(.has-app-bar, .has-pbar) :is(.save-bar, .ff-save, .sticky-actions, .pl-bulk, .pvs-bar, .fl-pick) { bottom: calc(var(--app-bar-h) + 8px); }
}
body.has-pbar { --app-bar-h: var(--pbar-h, 70px); }
body:is(.has-app-bar, .has-pbar) .leaflet-container, body:is(.has-app-bar, .has-pbar) .maplibregl-map { scroll-margin-bottom: calc(var(--app-bar-h) + 12px); }
@media (max-width: 767px) {
  body:is(.has-app-bar, .has-pbar) .mv-map { height: calc(100dvh - 56px - var(--app-bar-h) - 140px); min-height: 300px; }
  body:is(.has-app-bar, .has-pbar) :is(.nb-map, .sc-map, .pano) { height: min(60vh, calc(100dvh - 56px - var(--app-bar-h) - 120px)); min-height: 280px; }
  body.has-app-bar .mv-page { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}

/* map review 10: a legend that also went into the map's Key shows only on paper */
@media screen { .plan-map:has(.mf-key) + .plan-legend, .nb-mapcard:has(.mf-key) .nb-key { display: none; } }

/* map review 11: credits stay small - a capped line, the (i) a 44px smoked round; on phones Leaflet credits trim to one line */
html:root body .maplibregl-ctrl-attrib-inner { font-size: 10px; max-width: min(60vw, 360px); }
html:root body .maplibregl-ctrl-attrib.maplibregl-compact { min-height: 44px; min-width: 44px; border-radius: 22px; }
html:root body .maplibregl-ctrl-attrib-button { width: 44px; height: 44px; border-radius: 22px; background-color: transparent; background-position: center; filter: invert(1); }
@media (max-width: 700px) { html:root body .leaflet-control-attribution { max-width: 60vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }

/* map review 12: the MapLibre bar (glchrome.js) - Full screen and the Map | Aerial pill, smoked glass */
.gl-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: none !important; box-shadow: none !important; }
.gl-seg { display: inline-flex; min-height: 44px; border-radius: 999px; overflow: hidden; background: var(--ov-bg); border: 1px solid var(--ov-edge);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.gl-seg button { min-height: 44px; padding: 0 14px; border: 0; background: transparent; color: var(--ov-text); font: inherit; font-weight: 600; cursor: pointer; }
.gl-seg button.on { background: rgba(255, 255, 255, .2); }
.gl-seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

@media (max-width: 699px) {
  .fp-mapwrap { --fpb-h: 44px; }
  html:root body .fp-toolbar.fp-float { position: absolute; top: 8px; left: 8px; right: auto; max-width: calc(100% - 16px); flex-wrap: wrap; border-radius: 22px; }
  html:root body .fp-toolbar.fp-float .fp-tools { flex-wrap: wrap; }   /* wraps rather than scrolls, so its menus can open */
  html:root body .fp-mapwrap .fp-hint:not(:empty) { position: absolute; left: 8px; right: 8px; top: auto; bottom: 60px; max-width: none; transform: none; border-radius: 12px; }
  /* the Map bar fits one row on a phone (map review U7): no scroll fade over More */
}

/* map review 16: the labelled draw group (drawbar.js); Geoman's own icons, where still used, read on the dark glass */
.db-box { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.db-group { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: min(480px, calc(100vw - 120px)); }
.db-sep { width: 1px; align-self: stretch; margin: 4px 2px; background: rgba(255, 255, 255, .3); }
:root .ov-btn.db-b.on { background: #fff; color: #0e1621; }
.db-toggle { display: none; }
@media (max-width: 699px) {
  .db-toggle { display: inline-flex; }
  .db-group { display: none; flex-direction: column; align-items: flex-end; }
  .db-box.db-open .db-group { display: flex; }
  .db-sep { width: auto; height: 1px; margin: 2px 0; }
}
html:root body .leaflet-pm-toolbar .control-icon { filter: invert(1) brightness(2); }

/* map review 17: maps use the screen on iPads and computers. .map-tall for a big map in a page; .map-fill to the bottom of the
   window (set --map-top from the page when needed) */
.map-tall { height: max(60dvh, 420px); }
.map-fill { height: calc(100dvh - var(--map-top, 180px) - var(--app-bar-h, 0px) - 16px); min-height: 320px; }
.plan-map.plan-edit { height: max(60dvh, 420px); }

.fd-sitemap { height: min(45vh, 420px); }   /* flight day: the site map card */
/* map review 38 + 40: the planner's map - a sensible height that leaves room for the bottom bar, the start chip on it,
   and on phones the map panel first */
.pl-mapwrap { position: relative; }
.plan-map.pl-map { height: clamp(320px, 60dvh, 560px); }
.pl-mapwrap .pl-empty { position: absolute; z-index: 500; left: 50%; top: 22px; transform: translateX(-50%); }
@media (max-width: 700px) {
  #plan-form { display: flex; flex-direction: column; }
  #plan-form > .layout-side.planner { order: -1; }
  .plan-map.pl-map { height: clamp(320px, calc(100dvh - var(--app-bar-h, 64px) - 180px), 560px); }
}
/* map review 51: a segmented choice on a map - one smoked pill, the chosen part filled white; .ph-long words drop on phones */
.ov-seg { display: inline-flex; gap: 0; padding: 3px; border-radius: 999px; background: var(--ov-bg); border: 1px solid var(--ov-edge); box-shadow: var(--ov-shadow);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ov-seg .ov-btn { background: transparent; border-color: transparent; box-shadow: none; min-height: 40px; padding: 0 14px; -webkit-backdrop-filter: none; backdrop-filter: none; }
.ov-seg .ov-btn[aria-checked="true"], .ov-seg .ov-btn[aria-pressed="true"] { background: #fff; color: #10151c; }
@media (max-width: 700px) { .ph-long { display: none; } }
/* a map wrapper taken full screen (glchrome data-fullscreen): the map fills it */
[data-fullscreen]:fullscreen { background: #000; }
[data-fullscreen]:fullscreen > :is(.er-map, .bg-map, .dp-map, .ch-map, .tw-map) { height: 100% !important; border-radius: 0; }
/* narrow phones: the page's own top-left tools drop under the glass chrome row (Full screen, Map | Aerial) */
@media (max-width: 560px) {
  .bg-mapwrap .bg-tools, .dp-mapwrap .dp-pick, .tw-mapwrap .tw-reset, .ch-mapwrap .ch-goto-onmap { top: 62px !important; }
  .dp-mapwrap .dp-chip, .dp-mapwrap .dp-level { top: 114px; }
  .bg-mapwrap:has(.bg-onkey:not([hidden])) .bg-said { top: 114px; }
}

/* map review lesson: the start chip sits on the map */
.ll-mapwrap { position: relative; }
.ll-mapwrap .ll-empty { top: 60px; }
.ll-mapwrap .ll-empty[hidden] { display: none; }
/* MapLibre's credits button (22 Nov 2026): the site's button sizing made it a big grey pill with its icon tiled; a 24px circle,
   one icon, opening to a slim pill */
html:root body .maplibregl-ctrl-attrib-button { width: 24px; height: 24px; min-width: 0; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 50%;
  background-color: transparent; background-repeat: no-repeat; background-position: center; background-size: 20px; box-shadow: none; filter: invert(1); }
html:root body .maplibregl-ctrl-attrib.maplibregl-compact { min-height: 24px; padding: 0 24px 0 0; border-radius: 12px; }
html:root body .maplibregl-ctrl-attrib.maplibregl-compact-show { padding: 2px 28px 2px 10px; }
html:root body .maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show) { min-width: 0; width: 24px; box-sizing: border-box; padding: 0; }
html:root body .maplibregl-compact:not(.maplibregl-compact-show) .maplibregl-ctrl-attrib-inner { display: none; }

/* a phone, a map inside a scrolling page: "Use two fingers to move the map" shows for a moment when one finger drags it
   (maps-8, 24 Nov 2026; mapframe.js and the booking page) */
.mf-twohint { position: absolute; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center;
  background: rgba(15, 20, 28, .55); color: #fff; font-size: 15px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s; }
.mf-twohint.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .mf-twohint { transition: none; } }

/* a zone's name and heights on tap (phones; static/js/airmap.js): a small smoked-glass label, not a card */
.amap-zonetip .maplibregl-popup-content { padding: 5px 9px; border-radius: 8px; font-size: .74rem; line-height: 1.3; color: var(--ov-text, #fff);
  background: var(--ov-bg, rgba(17, 22, 30, .78)); border: 1px solid var(--ov-edge, rgba(255, 255, 255, .18)); box-shadow: var(--ov-shadow, 0 2px 10px rgba(0, 0, 0, .2));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.amap-zonetip .maplibregl-popup-content div + div { margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(255, 255, 255, .18); }
.amap-zonetip .maplibregl-popup-content b { display: block; font-weight: 600; }
.amap-zonetip .maplibregl-popup-content span { display: block; color: rgba(255, 255, 255, .78); }
.amap-zonetip .maplibregl-popup-tip { display: none; }

/* Map popups follow the theme (design picks dark-1, 30 Nov 2026): every MapLibre popup card without its own look
   (airspace zones, NOTAMs, plans, obstacles, signal, flight areas, site twin) is the page surface, so it is a dark card
   on the dark map at night and inside the dark deck frames (md-body, fdm-body) in Day mode. Glass tips (amap-zonetip, lgl-tip, bg-pop) and themed cards keep their own rules. */
.maplibregl-popup:not(.amap-zonetip, .lgl-tip, .bg-pop) .maplibregl-popup-content {
  background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.maplibregl-popup:not(.amap-zonetip, .lgl-tip, .bg-pop) .maplibregl-popup-close-button { color: var(--muted); }
.maplibregl-popup:not(.amap-zonetip, .lgl-tip, .bg-pop) .maplibregl-popup-close-button:hover { background: var(--surface-2); color: var(--text); }
.maplibregl-popup-anchor-top:not(.amap-zonetip, .lgl-tip, .bg-pop) .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-left:not(.amap-zonetip, .lgl-tip, .bg-pop) .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-right:not(.amap-zonetip, .lgl-tip, .bg-pop) .maplibregl-popup-tip { border-bottom-color: var(--surface); }
.maplibregl-popup-anchor-bottom:not(.amap-zonetip, .lgl-tip, .bg-pop) .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-left:not(.amap-zonetip, .lgl-tip, .bg-pop) .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-right:not(.amap-zonetip, .lgl-tip, .bg-pop) .maplibregl-popup-tip { border-top-color: var(--surface); }
.maplibregl-popup-anchor-left:not(.amap-zonetip, .lgl-tip, .bg-pop) .maplibregl-popup-tip { border-right-color: var(--surface); }
.maplibregl-popup-anchor-right:not(.amap-zonetip, .lgl-tip, .bg-pop) .maplibregl-popup-tip { border-left-color: var(--surface); }

/* screen review v-45: the map's time panel and the Back pill wear the same smoked glass as the other map buttons, in day and
   night alike - not a half-clear grey wash with pale grey words, nor a faded Back that looks switched off */
html:root body .amap-wrap .amap-wx { background: var(--ov-bg-hover); color: var(--ov-text); border-color: var(--ov-edge);
  -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2); }
html:root body .amap-wrap .amap-wx :is(.muted, .small, .amap-wx-fly, p) { color: rgba(255, 255, 255, .84); }
html:root body .amap-wrap .amap-wx b, html:root body .amap-wrap .amap-wx strong, html:root body .amap-wrap .amap-wx #amap-wx-when { color: var(--ov-text); }
html:root body .amap-wrap .amap-wx button:not(.btn) { color: var(--ov-text); }
html:root body .amap-wrap .amap-wx .amap-wx-strip span.is-on { outline-color: #fff; }
html:root body .pm-back, html:root body .pm-back:visited, html:root body .pm-back:hover { background: var(--ov-bg); color: var(--ov-text); border: 1px solid var(--ov-edge); box-shadow: var(--ov-shadow);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 1; }
html:root body .pm-back:hover { background: var(--ov-bg-hover); }
html:root body .amap-wrap .amap-wx-mini { background: var(--ov-bg); color: var(--ov-text); border-color: var(--ov-edge); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

/* modern.css */
/* The modern look (Settings > In the app > Look: Modern). Loaded after every other sheet and scoped to html.ui-modern, so
   switching back to Classic removes all of it. Themes: Day, Ops dark - "Night ops" (html[data-theme=night]), Night red
   (night red was removed 25 Oct 2026) and Daylight (html.sunlight). A live callout's pages are
   always Night ops or Daylight (droneops/display.py, the Daylight switch in the header). Looks: docs/mockups/callout-looks.html A and C. Design: docs plan "UI/UX modernisation plan". */

/* ---- tokens --------------------------------------------------------------------------------------------------------- */
html.ui-modern {
  --accent: #0f766e; --accent-dark: #115e59; --accent-soft: #e2f3f1; --brand-green: #0f9d8a;
  --link: #0f766e; --link-hover: #115e59;
  --bg: #f2f4f7; --surface: #ffffff; --surface-2: #f6f8fa; --border: #e1e6ed; --text: #0f1722; --text-2: #364355; --muted: #566274;
  --ok: #138a4a; --warn: #b9770e; --bad: #d03838; --info: #2563eb;
  --ok-text: #0f7a40; --warn-text: #9a6207; --bad-text: #b42323;
  --radius: 14px; --radius-sm: 10px; --radius-lg: 18px;
  --shadow: 0 1px 2px rgba(15,23,34,.05), 0 6px 24px rgba(15,23,34,.06);
  --shadow-float: 0 12px 40px rgba(10,16,24,.22);
  --ring: 0 0 0 3px rgba(15,118,110,.32);
  --rail-w: 84px; --top-h: 56px;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
html.ui-modern[data-theme="night"] {
  color-scheme: dark;
  --navy: #dbe5ef; --navy-2: #b9c8d8;
  /* Night ops (look A): deep green-slate, the team's teal, bright status colours */
  --accent: #0f8f84; --accent-dark: #5eead4; --accent-soft: #0e3b36; --brand-green: #2dd4bf;
  --link: #2dd4bf; --link-hover: #99f6e4;
  --bg: #1c1c1e; --surface: #242426; --surface-2: #2c2c2e; --border: #2a3633; --text: #e6eeeb; --text-2: #c3d0cc; --muted: #93a39f;
  --ok: #4ade80; --warn: #fbbf24; --bad: #f87171; --info: #7db4f5;
  --ok-text: #4ade80; --warn-text: #fbbf24; --bad-text: #fb8f8f;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.25);
  --ring: 0 0 0 3px rgba(94,234,212,.35);
}
/* night red: the dark theme seen through a red filter - preserves night vision on a hillside (the root element can carry a
   filter without breaking anything fixed on the page) */

/* ---- type and base ---------------------------------------------------------------------------------------------------- */
html.ui-modern body { background: var(--bg); color: var(--text); font-size: 15px; letter-spacing: -0.005em; -webkit-font-smoothing: antialiased; }
html.ui-modern h1 { font-size: clamp(1.45rem, 2.4vw, 1.85rem); font-weight: 750; letter-spacing: -0.02em; }
html.ui-modern h2 { font-size: var(--fs-lg, 1.15rem); font-weight: 700; letter-spacing: -0.01em; }
html.ui-modern h3 { font-size: var(--fs-base, 1rem); font-weight: 700; }
html.ui-modern .muted { color: var(--muted); }
html.ui-modern .footer .muted { color: #9fb2cc; }   /* footer small print readable on the dark footer (a11y-4, 24 Nov 2026) */
html.ui-modern :is(.mono, .it-value, .tl-time, .mc-face b, .ts-since, time) { font-variant-numeric: tabular-nums; }
html.ui-modern .page-head { margin-bottom: 18px; align-items: flex-end; }
html.ui-modern .page-head p.muted { margin-top: 2px; max-width: 70ch; }

/* ---- top bar ---------------------------------------------------------------------------------------------------------- */
html.ui-modern .topbar { background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border); box-shadow: none; }
html.ui-modern[data-theme="night"] .topbar { background: color-mix(in srgb, #242426 92%, transparent); }
html.ui-modern .theme-toggle { border-radius: 10px; }

/* ---- the side rail (computers; built by modern.js from the menu) ------------------------------------------------------- */
.mrail { display: none; }
@media (min-width: 1100px) {
  html.ui-modern body.has-rail { padding-left: var(--rail-w); }
  html.ui-modern body.has-rail .mainnav, html.ui-modern body.has-rail .burger { display: none !important; }
  html.ui-modern .mrail { display: flex; flex-direction: column; gap: 4px; position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail-w); z-index: 60;
    padding: 12px 8px; background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; }
  html.ui-modern[data-theme="night"] .mrail { background: #242426; }
  html.ui-modern .mrail .mr-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 4px; border-radius: var(--radius, 12px); border: 0;
    background: none; color: var(--muted); font: 600 .68rem/1.15 inherit; text-align: center; text-decoration: none; cursor: pointer; width: 100%; }
  html.ui-modern .mrail .mr-item svg { width: 22px; height: 22px; }
  html.ui-modern .mrail .mr-item:hover { background: var(--surface-2); color: var(--text); }
  html.ui-modern .mrail .mr-item.on { background: var(--accent-soft); color: var(--accent-dark); }
  html.ui-modern .mrail .mr-item.mr-sos { color: var(--bad); }
  html.ui-modern .mrail .mr-spacer { flex: 1; }
  html.ui-modern .mr-fly { position: fixed; left: var(--rail-w); top: 0; bottom: 0; width: 280px; z-index: 59; background: var(--surface); border-right: 1px solid var(--border);
    box-shadow: var(--shadow-float); padding: 18px 12px; overflow-y: auto; animation: m-fly .16s ease-out; }
  html.ui-modern .mr-fly[hidden] { display: none; }
  html.ui-modern .mr-fly h3 { margin: 0 8px 10px; font-size: var(--fs-base, 1rem); }
  html.ui-modern .mr-fly .nav-menu { display: block !important; position: static !important; box-shadow: none !important; border: 0 !important; background: none !important;
    padding: 0 !important; min-width: 0 !important; width: auto !important; columns: 1 !important; transform: none !important; opacity: 1 !important; visibility: visible !important; }
  html.ui-modern .mr-fly .nav-menu a { display: block; padding: 8px 10px; border-radius: var(--radius-sm, 8px); color: var(--text); text-decoration: none; font-size: var(--fs-md, .92rem); }
  html.ui-modern .mr-fly .nav-menu a:hover { background: var(--surface-2); }
  html.ui-modern .mr-fly .nav-menu a.on { background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
  html.ui-modern .mr-fly .nav-menu .nav-section, html.ui-modern .mr-fly .nav-menu .menu-label { display: block; margin: 12px 10px 4px; font-size: .7rem; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  @keyframes m-fly { from { transform: translateX(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ---- the group's pages strip and breadcrumbs: quieter ---------------------------------------------------------------- */
html.ui-modern .crumbs-wrap { display: none; }
html.ui-modern .section-tabs-wrap { margin-top: 14px; }
html.ui-modern .ops-tabs { gap: 4px; padding: 4px; border-radius: var(--radius, 12px); background: var(--surface); border: 1px solid var(--border); box-shadow: none; overflow-x: auto; }
html.ui-modern .ops-tabs .ops-label { font-size: .68rem; letter-spacing: .07em; color: var(--muted); padding: 0 8px; }
html.ui-modern .ops-tabs a { border-radius: var(--radius-sm, 8px); padding: 6px 12px; border: 0; font-weight: 600; font-size: var(--fs-sm, .85rem); color: var(--text-2); white-space: nowrap; }
html.ui-modern .ops-tabs a.on { background: var(--accent-soft); color: var(--accent-dark); }

/* ---- cards ------------------------------------------------------------------------------------------------------------ */
html.ui-modern .panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
html.ui-modern .panel-head { gap: 10px; margin-bottom: 10px; }
html.ui-modern .panel-head h2 { margin: 0; }

/* ---- buttons ---------------------------------------------------------------------------------------------------------- */
html.ui-modern .btn { border-radius: var(--radius-sm); font-weight: 650; letter-spacing: -0.005em; transition: background .12s, transform .06s, box-shadow .12s; }
html.ui-modern .btn:active { transform: translateY(1px); }
html.ui-modern .btn-accent { background: var(--accent); color: var(--on-accent, #fff); box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 2px 8px color-mix(in srgb, var(--accent) 30%, transparent); }
html.ui-modern .btn-accent:hover { background: var(--accent-dark); color: #fff; }
html.ui-modern[data-theme="night"] .btn-accent:hover { background: #12a597; color: #fff; }
html.ui-modern .btn-outline { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
html.ui-modern .btn-outline:where(:not(.on, .active, [aria-pressed="true"], [aria-checked="true"])):hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: var(--surface-2); }
html.ui-modern .btn-danger { background: var(--bad); color: var(--on-mk, #fff); border-color: var(--bad); }
html.ui-modern :is(.btn, a, button, input, select, textarea, summary):focus-visible { outline: 2px solid transparent; box-shadow: var(--ring); }   /* transparent, so High Contrast mode still draws it */

/* ---- badges and chips: pill, tinted, same meaning everywhere --------------------------------------------------------- */
html.ui-modern .badge { border-radius: var(--radius-pill, 999px); padding: 2px 9px; font-size: .72rem; font-weight: 650; letter-spacing: .01em; background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border); }
html.ui-modern .badge-ok { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok-text); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
html.ui-modern .badge-warn { background: color-mix(in srgb, var(--warn) 16%, var(--surface)); color: var(--warn-text); border-color: color-mix(in srgb, var(--warn) 32%, transparent); }
html.ui-modern .badge-bad { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad-text); border-color: color-mix(in srgb, var(--bad) 32%, transparent); }
html.ui-modern .badge-beta { background: color-mix(in srgb, #8b5cf6 16%, var(--surface)); color: #7c3aed; border-color: color-mix(in srgb, #8b5cf6 30%, transparent); }
html.ui-modern[data-theme="night"] .badge-beta { color: #c4b5fd; }
html.ui-modern .chip-btn { border-radius: var(--radius-pill, 999px); }

/* ---- forms ------------------------------------------------------------------------------------------------------------ */
html.ui-modern :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea) {
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); transition: border-color .12s, box-shadow .12s, background .12s; }
html.ui-modern :is(input:where(:not(.switch, [type=checkbox], [type=radio])), select, textarea):focus { border-color: var(--accent); background: var(--surface); }
html.ui-modern .field label, html.ui-modern legend { font-weight: 650; font-size: var(--fs-sm, .85rem); color: var(--text-2); }

/* ---- tables ----------------------------------------------------------------------------------------------------------- */
html.ui-modern table th { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
html.ui-modern table:not(.print-frame) > tbody > tr:hover > * { background: color-mix(in srgb, var(--accent) 4%, transparent); }
html.ui-modern .table-wrap { border-radius: var(--radius-sm); }

/* ---- tabs on the callout page ---------------------------------------------------------------------------------------- */

/* ---- status tiles: big numbers, readable from across the room -------------------------------------------------------- */
html.ui-modern .inc-tile { border-radius: var(--radius, 12px); border: 1px solid var(--border); background: var(--surface); padding: 12px 14px; box-shadow: none; }
html.ui-modern .inc-tile .it-label { font-size: .66rem; font-weight: 750; letter-spacing: .08em; color: var(--muted); }
html.ui-modern .inc-tile .it-value { font-size: 1.55rem; font-weight: 750; letter-spacing: -0.02em; font-family: var(--mono); }
html.ui-modern .inc-tile.st-ok { border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); background: color-mix(in srgb, var(--ok) 7%, var(--surface)); }
html.ui-modern .inc-tile.st-warn { border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); background: color-mix(in srgb, var(--warn) 9%, var(--surface)); }
html.ui-modern .inc-tile.st-bad { border-color: color-mix(in srgb, var(--bad) 50%, var(--border)); background: color-mix(in srgb, var(--bad) 8%, var(--surface)); }
html.ui-modern .mc-clock b { font-family: var(--mono); }

/* ---- callout overview: phase stepper and the live map (templates/sar/incident.html) ---------------------------------- */
.phase-steps { display: none; }
html.ui-modern .phase-steps { display: flex; gap: 6px; margin: 10px 0 2px; flex-wrap: wrap; list-style: none; padding: 0; }
html.ui-modern .phase-steps li { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs, .78rem); font-weight: 650; color: var(--muted);
  padding: 4px 10px 4px 6px; border-radius: var(--radius-pill, 999px); background: var(--surface-2); border: 1px solid var(--border); }
html.ui-modern .phase-steps li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
html.ui-modern .phase-steps li.done { color: var(--text-2); } html.ui-modern .phase-steps li.done::before { background: var(--ok); }
html.ui-modern .phase-steps li.now { color: var(--on-accent, #fff); background: var(--accent); border-color: var(--accent); }
html.ui-modern .phase-steps li.now::before { background: #fff; animation: m-pulse 1.6s ease-in-out infinite; }
@keyframes m-pulse { 50% { opacity: .35; } }

/* ---- the team cards ---------------------------------------------------------------------------------------------------- */

/* ---- live callout: a floating pill instead of a full-width strip --------------------------------------------------------- */
html.ui-modern .tasking-strip { position: fixed; z-index: 80; right: 18px; bottom: 18px; left: auto; max-width: min(520px, calc(100vw - 36px));
  border-radius: var(--radius-pill, 999px); box-shadow: var(--shadow-float); }
html.ui-modern .tasking-strip .ts-inner { padding: 8px 16px; gap: 10px; }
html.ui-modern .tasking-strip .ts-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1099px) { html.ui-modern body.has-app-bar .tasking-strip { bottom: calc(72px + env(safe-area-inset-bottom)); right: 12px; left: auto; max-width: calc(100vw - 24px); } }
@media (min-width: 1100px) { html.ui-modern body.has-rail .tasking-strip { left: auto; } }
@media (max-width: 1099px) {                      /* tablets: number, time since tasked, more - the title is a tap away */
  html.ui-modern .tasking-strip:is(.is-live, .is-exercise) :is(.ts-what, .ts-ago) { display: none; }
  html.ui-modern .tasking-strip:is(.is-live, .is-exercise) .ts-ref { margin-right: 6px; }
  html.ui-modern .tasking-strip:is(.is-live, .is-exercise) .ts-text { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
}

/* ---- page banners: small, in the page, dismissible (modern.js) --------------------------------------------------------- */
html.ui-modern :is(.kill-strip, .demo-strip, .view-strip) { margin: 12px auto 0; max-width: 1200px; width: calc(100% - 32px); border-radius: var(--radius, 12px); padding: 8px 40px 8px 14px;
  position: relative; font-size: var(--fs-sm, .85rem); }
html.ui-modern .m-dismiss { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; font-size: var(--fs-lg, 1.15rem); color: inherit; cursor: pointer; opacity: .7; }

/* ---- toasts instead of flash bars (modern.js) ---------------------------------------------------------------------------- */
html.ui-modern .flashes.m-toasts { position: fixed; z-index: 1300; left: 50%; bottom: 22px; transform: translateX(-50%); width: min(460px, calc(100vw - 24px));
  display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; pointer-events: none; }
@media (max-width: 1099px) { html.ui-modern body.has-app-bar .flashes.m-toasts { bottom: calc(80px + env(safe-area-inset-bottom)); } }
html.ui-modern .m-toasts .flash { pointer-events: auto; margin: 0; border-radius: var(--radius, 12px); box-shadow: var(--shadow-float); padding: 12px 40px 12px 14px; position: relative;
  animation: m-toast .2s ease-out; border: 1px solid var(--border); background: var(--surface); color: var(--text); }


html.ui-modern .m-toasts .flash.m-out { opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; }
@keyframes m-toast { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---- loading and empty states ------------------------------------------------------------------------------------------ */
html.ui-modern .skeleton { color: transparent !important; border-radius: var(--radius-sm, 8px); min-height: 1.2em;
  background: linear-gradient(90deg, var(--surface-2) 0%, color-mix(in srgb, var(--border) 70%, var(--surface-2)) 50%, var(--surface-2) 100%);
  background-size: 200% 100%; animation: m-shimmer 1.3s linear infinite; }
@keyframes m-shimmer { to { background-position: -200% 0; } }
html.ui-modern :is(p.empty, .empty-line, td.empty) { color: var(--muted); }

/* ---- the phone: bottom bar, the menu as a sheet --------------------------------------------------------------------- */
@media (max-width: 1099px) {
  html.ui-modern .app-bar { background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--border); }
  html.ui-modern .app-bar a.on { color: var(--accent-dark); }
  html.ui-modern .app-bar a.on svg { background: var(--accent-soft); border-radius: var(--radius-sm, 8px); padding: 3px 10px; box-sizing: content-box; }
  html.ui-modern .navtoggle:checked ~ .mainnav { border-radius: 18px 18px 0 0; box-shadow: var(--shadow-float); }
}

/* ---- the field view: dark by default, huge targets -------------------------------------------------------------------- */

/* ---- the start-a-callout steps (modern.js) ---------------------------------------------------------------------------- */
html.ui-modern .m-steps-bar { display: flex; gap: 6px; margin: 8px 0 14px; }
html.ui-modern .m-steps-bar span { flex: 1; height: 5px; border-radius: 3px; background: var(--border); }
html.ui-modern .m-steps-bar span.on { background: var(--accent); }
html.ui-modern .m-steps-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; }
html.ui-modern form.m-stepped .tstep[data-m-hidden] { display: none; }

/* ---- motion: none for people who ask for less -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) { html.ui-modern *, html.ui-modern *::before, html.ui-modern *::after { animation: none !important; transition: none !important; } html.ui-modern { scroll-behavior: auto !important; } }
/* the phone bottom bar's More (opens the whole menu) */
html.ui-modern .app-bar .m-more { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; border-radius: var(--radius-sm, 8px); color: var(--muted);
  font-size: .68rem; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; }
html.ui-modern .app-bar .m-more svg { width: 22px; height: 22px; }

/* the day / night / red button stays in the top bar on every width - teams switch it at night without opening a menu */
@media (min-width: 1025px) { html.ui-modern body.staff #theme-toggle { display: inline-grid; margin-left: 6px !important; } }
html.ui-modern[data-theme="night"] #theme-toggle { color: var(--text, #e6edf3); }
/* the small live map on the callout overview: just the map - the full map has the tools and video */

/* phones: the live pill is a slim one-liner, and the phase steps scroll sideways on one row */
@media (max-width: 700px) {
  /* a small chip at the bottom right: dot, callout number, time since tasked - the page underneath stays usable */
  html.ui-modern .tasking-strip.is-live, html.ui-modern .tasking-strip.is-exercise { max-width: calc(100vw - 24px); }
  html.ui-modern .tasking-strip .ts-inner { padding: 5px 12px 5px 10px; gap: 7px; font-size: var(--fs-xs, .78rem); }
  html.ui-modern .tasking-strip .ts-more { display: none; }
  html.ui-modern .tasking-strip .ts-label { font-size: .68rem; }
  html.ui-modern .tasking-strip:is(.is-live, .is-exercise) :is(.ts-lw, .ts-what, .ts-ago) { display: none; }
  html.ui-modern .tasking-strip:is(.is-live, .is-exercise) .ts-text { flex: 0 1 auto; font-variant-numeric: tabular-nums; }
  html.ui-modern .tasking-strip:is(.is-live, .is-exercise) .ts-ref { margin-right: 6px; }
  html.ui-modern .phase-steps { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  html.ui-modern .phase-steps li { flex: none; font-size: var(--fs-xs, .78rem); padding: 4px 9px; }
}
html.ui-modern .tasking-strip[hidden] { display: none !important; }

/* ==== display choices (droneops/display.py) ======================================================================== */
/* Daylight (look C): bright sun or rain - white, black outlines, hi-vis yellow for what's active, no soft greys or shadows */
html.ui-modern.sunlight, html.ui-modern.has-accent.sunlight {
  color-scheme: light;
  --bg: #f7f7f2; --surface: #ffffff; --surface-2: #f0f0ea; --border: #1b1b1b; --text: #0d0d0d; --text-2: #1a1a1a; --muted: #3f3f3f;
  --accent: #0d0d0d; --accent-dark: #0d0d0d; --accent-soft: #ffe14d; --on-accent: #ffe14d; --link: #1d4ed8; --link-hover: #1e3a8a;
  --ok: #146c2e; --warn: #8a5a00; --bad: #c1121f; --info: #1d4ed8; --ok-text: #146c2e; --warn-text: #7a4f00; --bad-text: #c1121f;
  --shadow: none; --shadow-float: 0 0 0 2px #000; --ring: 0 0 0 3px #1d4ed8;
}
html.ui-modern.sunlight body { font-weight: 500; }

html.ui-modern.sunlight :is(.badge, .small, small, .muted) { color: #000 !important; }
html.ui-modern.sunlight .badge { border: 1.5px solid #000; }
html.ui-modern.sunlight a { text-decoration-thickness: 2px; }
html.ui-modern.sunlight .topbar { background: #fff; backdrop-filter: none; }
html.ui-modern.sunlight :is(.btn-accent, .btn-primary):not(:disabled) { color: #ffe14d; }   /* black buttons, hi-vis lettering */

/* the Daylight / Night ops switch in a live callout's header (templates/base.html) */

/* the organisation's accent colour (Settings > In the app > Look) */
html.ui-modern.has-accent { --accent: var(--org-accent); --accent-dark: color-mix(in srgb, var(--org-accent) 78%, black);
  --accent-soft: color-mix(in srgb, var(--org-accent) 12%, white); --link: var(--org-accent); --link-hover: color-mix(in srgb, var(--org-accent) 78%, black);
  --brand-green: var(--org-accent); --ring: 0 0 0 2px var(--surface), 0 0 0 4px var(--org-accent); }   /* solid (dd57 a11y-3) */
html.ui-modern.has-accent[data-theme="night"] { --accent: color-mix(in srgb, var(--org-accent) 85%, white); --accent-dark: color-mix(in srgb, var(--org-accent) 45%, white);
  --accent-soft: color-mix(in srgb, var(--org-accent) 22%, #1c1c1e); --link: color-mix(in srgb, var(--org-accent) 45%, white);
  --link-hover: color-mix(in srgb, var(--org-accent) 30%, white); --ring: 0 0 0 2px var(--surface), 0 0 0 4px var(--org-accent); }
.accent-swatches { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 6px 0; }
.accent-sw { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: var(--fs-md, .92rem); }
.accent-sw span { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.accent-sw input[type=color] { width: 30px; height: 26px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); background: none; }

/* text size (per device) */
html.ui-modern.ts-small { font-size: 93.75%; } html.ui-modern.ts-small body { font-size: 14px; }
html.ui-modern.ts-large { font-size: 112.5%; } html.ui-modern.ts-large body { font-size: 17px; }

/* glove mode: cold or wet hands - big targets, wide gaps (on by itself in the field view) */

html.ui-modern.glove .btn-sm, html.ui-modern.glove .btn-xs { min-height: 48px; padding: 10px 16px; font-size: var(--fs-base, 1rem); }
html.ui-modern.glove :is(input:not([type=checkbox]):not([type=radio]):not([type=color]), select, textarea) { min-height: 54px; font-size: var(--fs-base, 1rem); }
html.ui-modern.glove input[type=checkbox], html.ui-modern.glove input[type=radio] { transform: scale(1.4); margin: 6px 10px 6px 4px; }
html.ui-modern.glove .btn-row, html.ui-modern.glove .chips{ gap: 12px !important; }
html.ui-modern.glove .check-row { min-height: 48px; align-items: center; }
html.ui-modern.glove .theme-toggle { width: 44px; height: 44px; }
/* the phone.css glove sizes that matter, here because phone.css loads only with the phone bar (dd4 field-conditions-3) */
html.glove main :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea) { min-height: 52px; }
html.glove .app-bar:not(.tbar) > :is(a, .m-more) { min-height: 62px; }
html.glove :is(.fo-yn, .fo-kinds, .chip-checks) { gap: 12px; }
html.glove :is(.fo-yn, .fo-kinds, .chip-checks) label { min-height: 56px; }

/* the Display menu (the theme button, modern look) */
.m-display { position: fixed; z-index: 120; width: 290px; max-width: calc(100vw - 24px); padding: 14px; border-radius: var(--radius, 14px);
  background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-float); }
.m-display h4 { margin: 0 0 8px; font-size: var(--fs-xs, .78rem); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.m-display .md-group { display: grid; gap: 4px; margin-bottom: 14px; }
.m-display .md-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin-bottom: 14px; }
.m-display button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: var(--radius-sm, 8px); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font: 600 .9rem/1.2 inherit; cursor: pointer; text-align: left; }
.m-display .md-seg button { justify-content: center; text-align: center; }
.m-display button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); }
.m-display .md-sub { font-weight: 500; font-size: var(--fs-xs, .78rem); opacity: .8; margin-left: auto; }
.m-display .md-note { font-size: var(--fs-xs, .78rem); color: var(--muted); margin: -6px 0 0; }
/* a page inside a frame (the command view's map): just the page */
html.ui-modern.in-frame :is(.topbar, .app-bar, .tasking-strip, .kill-strip, .demo-strip, footer, .ops-tabs) { display: none !important; }
html.ui-modern.in-frame body { padding: 0 !important; }
/* the command view's map: its own bar (updated, Draw a sector) floats bottom-left - the command view's header has the rest */

/* pinned pages in the side rail, and the pin star in each menu */
html.ui-modern .mr-pins { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
html.ui-modern .mr-pins:empty { display: none; }
html.ui-modern .mr-pin-label { font: 700 .58rem/1 inherit; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; padding: 8px 0 2px; border-top: 1px solid var(--border); }
html.ui-modern .mr-fly .mr-row { display: flex; align-items: center; gap: 4px; }
html.ui-modern .mr-fly .mr-row > a { flex: 1; min-width: 0; }
html.ui-modern .mr-star { flex: none; width: 30px; height: 30px; border: 0; border-radius: var(--radius-sm, 8px); background: none; color: var(--border); font-size: var(--fs-base, 1rem); cursor: pointer; opacity: .55; }
html.ui-modern .mr-row:hover .mr-star, html.ui-modern .mr-star:focus-visible { opacity: 1; color: var(--muted); }
html.ui-modern .mr-star.on { opacity: 1; color: #f2b23d; }

/* the menu's position on a computer screen (Display menu; like a taskbar): right or bottom - top is the menu bar */
@media (min-width: 1100px) {
  html.ui-modern.rail-right body.has-rail { padding-left: 0; padding-right: var(--rail-w); }
  html.ui-modern.rail-right .mrail { left: auto; right: 0; border-right: 0; border-left: 1px solid var(--border); }
  html.ui-modern.rail-right .mr-fly { left: auto; right: var(--rail-w); border-right: 0; border-left: 1px solid var(--border); }
  html.ui-modern.rail-right body.has-rail .tasking-strip { right: calc(var(--rail-w) + 18px); }

  html.ui-modern.rail-bottom body.has-rail { padding-left: 0; padding-bottom: 72px; }
  html.ui-modern.rail-bottom .mrail { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 68px; flex-direction: row; align-items: center; justify-content: center;
    padding: 6px 12px; border-right: 0; border-top: 1px solid var(--border); overflow-x: auto; overflow-y: hidden; }
  html.ui-modern.rail-bottom .mrail .mr-item { width: auto; min-width: 74px; padding: 6px 8px; }
  html.ui-modern.rail-bottom .mrail .mr-spacer { flex: 0 0 18px; border-left: 1px solid var(--border); height: 40px; margin-left: 9px; }
  html.ui-modern.rail-bottom .mr-pins { flex-direction: row; margin: 0 0 0 8px; padding-left: 8px; border-left: 1px solid var(--border); }
  html.ui-modern.rail-bottom .mr-pin-label { display: none; }
  html.ui-modern.rail-bottom .mr-fly { top: auto; bottom: 76px; max-height: min(70vh, 640px); border-radius: var(--radius, 12px); border: 1px solid var(--border); box-shadow: var(--shadow-float); }
  html.ui-modern.rail-bottom body.has-rail .tasking-strip { bottom: 86px; }
  html.ui-modern.rail-bottom .m-toasts { bottom: 86px !important; }
}

/* the live callout pill floats bottom right: leave room for it at the end of every page */
html.ui-modern body:has(.tasking-strip) main { padding-bottom: 72px; }
/* the callout tiles on a phone: three across, values that fit */
@media (max-width: 560px) { html.ui-modern .inc-tile .it-value { font-size: var(--fs-base, 1rem); letter-spacing: 0; } html.ui-modern .inc-tile .it-label { font-size: .62rem; } }

/* live callout cards: the disciplines as a row of small coloured icons (names on hover), tighter tiles */

/* the section's tabs: light underlined tabs (not another boxed panel); they scroll sideways on a phone with a fade at the edge */
html.ui-modern .section-tabs-wrap .ops-tabs { background: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 0 0 0 2px; gap: 2px;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
html.ui-modern .section-tabs-wrap .ops-tabs .ops-label { padding-left: 0; }
html.ui-modern .section-tabs-wrap .ops-tabs a { border-radius: 0; padding: 9px 12px 8px; margin-bottom: -1px; border-bottom: 2px solid transparent; }
html.ui-modern .section-tabs-wrap .ops-tabs a:hover { color: var(--text); background: none; }
html.ui-modern .section-tabs-wrap .ops-tabs a.on { background: none; color: var(--accent-dark); border-bottom-color: var(--accent); }
/* ...or, on a page with its own side menu, one switcher */
.tab-switch { position: relative; display: inline-block; }
.tab-switch > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); cursor: pointer; font-size: var(--fs-sm, .85rem); }
.tab-switch > summary::-webkit-details-marker { display: none; }
.tab-switch .ts-label { font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.tab-switch .ts-cur { display: inline-flex; align-items: center; gap: 6px; }
.tab-switch .ts-caret { color: var(--muted); font-size: var(--fs-xs, .78rem); }
.tab-switch-menu { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; min-width: 220px; max-height: 60vh; overflow-y: auto; padding: 6px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-3, 0 12px 32px rgba(10,16,24,.24)); display: grid; gap: 2px; }
.tab-switch-menu a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: var(--fs-md, .92rem); }
.tab-switch-menu a:hover { background: var(--surface-2); }
.tab-switch-menu a.on { background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }

/* every page's top the same way: title and one line about it on the left, its buttons on the right (under it on a phone,
   the main one first and full width so it's easy to hit) */
html.ui-modern .page-head h1 { font-size: clamp(1.45rem, 1.1rem + 1vw, 1.9rem); letter-spacing: -0.01em; }
html.ui-modern .page-head .head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 560px) {
  html.ui-modern .page-head { flex-direction: column; align-items: stretch; }
  html.ui-modern .page-head .head-actions { width: 100%; }
  html.ui-modern .page-head .head-actions > .btn-accent { order: -1; flex: 1 1 100%; justify-content: center; }
}
@media (max-width: 560px) {
  html.ui-modern .inc-tile .it-label { white-space: normal; overflow: visible; line-height: 1.15; }
}

/* the side rail: full names (two lines at most when narrow); dragged wider, icon and name side by side */
@media (min-width: 1100px) {
  html.ui-modern .mrail .mr-item span:not(.mr-av) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; max-width: 100%; }
  html.ui-modern.rail-wide .mrail { padding: 12px 10px; }
  html.ui-modern.rail-wide .mrail .mr-item { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 9px 12px; font-size: var(--fs-sm, .85rem); text-align: left; }
  html.ui-modern.rail-wide .mrail .mr-item svg { flex: none; width: 20px; height: 20px; }
  html.ui-modern.rail-wide .mrail .mr-item span:not(.mr-av) { display: block; white-space: nowrap; text-overflow: ellipsis; -webkit-line-clamp: unset; }
  html.ui-modern.rail-wide .mr-pin-label { text-align: left; padding-left: 12px; }
  /* the edge to drag */
  html.ui-modern body.has-rail .mr-resize { position: fixed; z-index: 61; top: 0; bottom: 0; left: calc(var(--rail-w) - 4px); width: 8px; cursor: col-resize; touch-action: none; }
  html.ui-modern body.has-rail .mr-resize::after { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; background: transparent; transition: background .15s; }
  html.ui-modern body.has-rail .mr-resize:hover::after, html.ui-modern body.has-rail .mr-resize:focus-visible::after, html.ui-modern.rail-resizing .mr-resize::after { background: var(--accent); }
  html.ui-modern.rail-right body.has-rail .mr-resize { left: auto; right: calc(var(--rail-w) - 4px); }
  html.ui-modern.rail-resizing, html.ui-modern.rail-resizing * { cursor: col-resize !important; user-select: none; }
  html.ui-modern.rail-bottom .mr-resize { display: none; }
}
@media (max-width: 1099px) { .mr-resize { display: none; } }
/* initials bubbles: sized in em so they grow with the text size (Display menu) and stay centred; a profile picture
   (droneops/web/avatars.py, My account > Profile picture) fills the circle instead */

.av-edit { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; } .avatar.av-big { font-size: 1.4rem; }
/* Settings (templates/admin/settings.html): a home of group cards with a search, and each group's page with the groups
   listed down the left - the same shape as My account */
.set-search input { width: 100%; max-width: 520px; font-size: var(--fs-base, 1rem); padding: 10px 14px; border-radius: var(--radius-sm, 8px); }
.set-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 16px; }
/* the eight groups in even rows (v-78): four across on a computer, two on an iPad, one on a phone; no empty last slot */
@media (min-width: 561px) { .set-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .set-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.set-card { display: grid; gap: 6px; align-content: start; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius, 12px); background: var(--surface-2, var(--surface));
  color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.set-card:hover, .set-card:focus-visible { border-color: var(--accent); transform: translateY(-1px); }
.set-card[hidden] { display: none; }
.set-card b { font-size: var(--fs-base, 1rem); }
.set-ic { width: 40px; height: 40px; border-radius: var(--radius-sm, 8px); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.set-has { color: var(--accent); }
.set-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.set-groups { position: sticky; top: 70px; display: grid; gap: 2px; }
.set-groups a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--radius-sm, 8px); color: inherit; text-decoration: none; }
.set-groups a:hover { background: var(--surface-2, var(--surface)); }
.set-groups a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.set-groups .set-home { color: var(--muted, inherit); font-size: var(--fs-md, .92rem); margin-bottom: 6px; }
.set-head h2 { margin: 0; font-size: 1.4rem; }
.set-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.set-link { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); color: inherit; text-decoration: none; }
.set-link:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 760px) {
  .set-layout { grid-template-columns: 1fr; gap: 12px; }
  .set-groups { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .set-groups a { border: 1px solid var(--border); border-radius: var(--radius-pill, 999px); padding: 6px 12px; }
}
.set-main .with-index { display: block; } .set-main .with-index > .page-index { display: none; }
:is(.mr-av).has-photo { padding: 0; overflow: hidden; } .mr-av.has-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
html.ui-modern .mr-av { line-height: 1; overflow: hidden; }

/* ==== the callout map's alerts (static/js/droneops.js drawFloat): a see-through panel inside the map, full wording, three at
   most, collapsing to a pill; drag by its header to another corner. The text stays at full strength - only the panel's
   background lets the map show through. ======================================================================================= */

   /* overdue leave-station and SITREP timers are in the panel */

                       /* under the scale bar */
                      /* clear of the zoom buttons */
                    /* above the teams key */

/* checkboxes: the app's own box (25 Oct 2026) - moved to the form controls at the end of this file with the round choices (30 Nov 2026) */

/* the menu's two sides (11 Nov 2026, droneops/web/areas.py sides): Operations | Business */
.mainnav .nav-sides { display: inline-flex; border: 1px solid var(--border, #d0d7e2); border-radius: var(--radius-sm, 8px); overflow: hidden; margin-right: 8px; align-self: center; }
.mainnav .nav-sides a { padding: 5px 10px; font-size: var(--fs-sm, .85rem); text-decoration: none; color: inherit; }
.mainnav .nav-sides a.on { background: var(--accent, #2c6a8c); color: #fff; }
.mainnav .nav-group.nav-other { display: none; }
html.ui-modern .mr-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; margin: 8px 0 2px; border-radius: var(--radius-sm, 8px); background: var(--surface-2, rgba(127,127,127,.12)); }
html.ui-modern .mr-sides a { text-align: center; padding: 6px 4px; border-radius: var(--radius-sm, 8px); font-size: var(--fs-sm, .85rem); font-weight: 600; text-decoration: none; color: inherit; }
html.ui-modern .mr-sides a.on { background: var(--surface, #fff); box-shadow: var(--shadow-1, 0 1px 2px rgba(11,31,58,.08)); }
html.ui-modern:not(.rail-wide) .mr-sides, html.ui-modern.rail-bottom .mr-sides { grid-template-columns: 1fr; font-size: .7rem; }

/* The app's own form controls, one look on every page (design picks controls-1..4, 30 Nov 2026).
   Kept at the end of modern.css (was its own controls.css, folded in 30 Nov 2026: no new stylesheet link in base.html
   before launch, gl-135), so it still comes straight after the rest of modern.css; the stand-alone pages that don't use
   base.html (iPad stand, freelancer page, site sign) link modern.css for it. "html:root" weighs the same as the old "html.ui-modern", so page rules win as before,
   and works on pages without that class. Colours come from the theme tokens, so the night theme follows.
   Pieces: tick boxes, round choices (radios), one box size, tick rows (static/js/controls.js adds .ck-row),
   the upload button (static/js/controls.js filePick), the browser's own file button where no script runs. */

/* ---- tick boxes: the app's own box (25 Oct 2026, from modern.css) - Safari on an iPhone in dark mode drew an unticked one
   as a solid black square. Only boxes people see and tick: never a switch, or a hidden checkbox that drives a menu. */
html:root input[type="checkbox"]:where(:not(.switch):not([role="switch"]):not(.navtoggle):not([hidden]):not(.sr-only):not(.visually-hidden)) {   /* :where - low weight, so :checked below wins */
  -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 20px; height: 20px; margin: 0;
  border: 2px solid var(--muted, #8a96a3); border-radius: 5px; background: var(--surface, #fff); vertical-align: middle; cursor: pointer; }
html:root input[type="checkbox"]:not(.switch):not([role="switch"]):not(.navtoggle)::before { content: ""; position: absolute; inset: 0; margin: auto; width: 10px; height: 10px;
  transform: scale(0); clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); background: #fff; transition: transform .1s ease; }
html:root input[type="checkbox"]:not(.switch):not([role="switch"]):not(.navtoggle):checked { background: var(--accent, #0f7a4c); border-color: var(--accent, #0f7a4c); }
html:root input[type="checkbox"]:not(.switch):not([role="switch"]):not(.navtoggle):checked::before { transform: scale(1); }
html:root input[type="checkbox"]:not(.switch):not([role="switch"]):not(.navtoggle):indeterminate::before { transform: scale(1); clip-path: inset(40% 0); }
html:root input[type="checkbox"]:not(.switch):not([role="switch"]):not(.navtoggle):focus-visible { outline: 2px solid var(--accent, #0f7a4c); outline-offset: 2px; }
html:root input[type="checkbox"]:not(.switch):not([role="switch"]):not(.navtoggle):disabled { opacity: .5; cursor: default; }

/* ---- round choices (radios): drawn like the tick boxes, so the two sit together; a dot in the accent colour. Low weight
   (no position, no margin change), so radios a page hides or draws itself (Yes/No rows, choice cards) stay as they were. */
input[type="radio"]:where(:not([hidden]):not(.sr-only):not(.visually-hidden)) {
  -webkit-appearance: none; appearance: none; flex: none; width: 20px; height: 20px; box-sizing: border-box;
  border: 2px solid var(--muted, #8a96a3); border-radius: 50%; background: var(--surface, #fff); vertical-align: middle; cursor: pointer; }
input[type="radio"]:where(:not([hidden]):not(.sr-only):not(.visually-hidden)):checked { border-color: var(--accent, #0f7a4c); background: var(--accent, #0f7a4c);
  box-shadow: inset 0 0 0 4px var(--surface, #fff); }
input[type="radio"]:where(:not([hidden])):focus-visible { outline: 2px solid var(--accent, #0f7a4c); outline-offset: 2px; }
input[type="radio"]:where(:not([hidden])):disabled { opacity: .5; cursor: default; }
@media (pointer: coarse) { input[type="radio"]:where(:not([hidden]):not(.sr-only):not(.visually-hidden)):checked { box-shadow: inset 0 0 0 5px var(--surface, #fff); } }
@media (prefers-reduced-motion: reduce) { html:root input[type="checkbox"]::before { transition: none; } }
@media print { html:root input:is([type="checkbox"], [type="radio"]) { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* ---- one box size: 20px, 24px on touch screens (was 18, 20, 22 or 24 by page) */
@media (pointer: coarse) {
  html:root input[type="checkbox"]:where(:not(.switch):not([role="switch"]):not(.navtoggle)) { width: 24px; height: 24px; }
  input[type="radio"]:where(:not([hidden])) { width: 24px; height: 24px; }
  html:root input[type="checkbox"]:not(.switch):not([role="switch"]):not(.navtoggle)::before { width: 12px; height: 12px; }
}

/* ---- tick rows: a box in a plain label (static/js/controls.js adds .ck-row to labels still laid out as a plain block):
   box on the left, text beside it in ordinary weight, wrapping under the text rather than under the box. Links and bold
   words in the text are kept in one piece (.ck-text). */
label.ck-row { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; text-align: left; cursor: pointer; }
label.ck-row > input:is([type="checkbox"], [type="radio"]) { margin: 1px 0 0; }
.ck-text { flex: 1 1 auto; min-width: 0; }
label:is(.ck-row, .check-row):has(> input:disabled) { color: var(--muted, #4f5c6e); cursor: default; }

/* ---- a list of longer choices (one answer from several lines): full-width option rows, the chosen one highlighted.
   Either the list (.choice-list round the labels) or each row (label.choice) - the second where headings sit between rows.
   Was ten home-made card styles; the instant quote, share-in, form fill and stage-finish lists use it now.
   For two to four short answers use the Yes/No row (.qrow/.ynseg, end of style.css). */
.choice-list { display: grid; gap: 8px; margin: 0 0 12px; padding: 0; border: 0; }
:is(.choice-list > label, label.choice) { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 14px; min-height: 44px; box-sizing: border-box;
  border: 1px solid var(--border, #dde3ec); border-radius: var(--radius-sm, 8px); background: var(--surface, #fff); color: var(--text, #15202e); font-weight: 500; font-size: var(--fs-md, .92rem); cursor: pointer; }
:is(.choice-list > label, label.choice):hover { border-color: var(--accent, #0f7a4c); }
:is(.choice-list > label, label.choice):has(> input:checked) { border-color: var(--accent, #0f7a4c); background: var(--accent-soft, #e3f3eb); }
:is(.choice-list > label, label.choice):has(> input:focus-visible) { outline: 2px solid var(--accent, #0f7a4c); outline-offset: 2px; }
:is(.choice-list > label, label.choice):has(> input:disabled) { color: var(--muted, #4f5c6e); cursor: default; }
:is(.choice-list > label, label.choice) > input:is([type="radio"], [type="checkbox"]) { margin: 1px 0 0; }
:is(.choice-list > label, label.choice) .muted { font-weight: 400; }
.choice-hint { display: block; color: var(--muted, #4f5c6e); font-weight: 400; font-size: var(--fs-sm, .85rem); }

/* ---- the upload button (controls.js filePick): a Title Case button ("Choose a File", "Choose a Photo", "Take a Photo"),
   then a chip with the chosen file's name and an x to take it off again. The real file box stays in the form, out of
   sight but reachable by Tab; its focus shows on the button. */
.fp { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 100%; vertical-align: middle; position: relative; }
.fp[hidden] { display: none; }
/* :not(#_) outranks every class-weight input rule (box sizes, glove mode) with no important flags (their count in the look layers may only go down) */
.fp > input[type="file"].fp-input:not(#_) { position: absolute; left: 0; top: 0; width: 1px; height: 1px; min-height: 0;
  padding: 0; margin: 0; border: 0; opacity: 0; overflow: hidden; clip-path: inset(50%); pointer-events: none; }
.fp-btn { margin: 0; }
.fp:has(> .fp-input:focus-visible) > .fp-btn:first-of-type { outline: 2px solid var(--accent, #0f7a4c); outline-offset: 2px; }
.fp.fp-drag > .fp-btn { border-color: var(--accent, #0f7a4c); background: var(--accent-soft, #e3f3eb); }
.fp-chip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; min-width: 0; padding: 2px 2px 2px 12px; box-sizing: border-box;
  border: 1px solid var(--border, #dde3ec); border-radius: var(--radius-pill, 999px); background: var(--surface-2, #f7f9fc); color: var(--text, #15202e); font-size: var(--fs-sm, .85rem); font-weight: 500; }
.fp-chip[hidden] { display: none; }
.fp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fp-x { flex: none; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0; margin: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--muted, #4f5c6e); font-size: var(--fs-lg, 1.15rem); line-height: 1; cursor: pointer; }
.fp-x:hover, .fp-x:focus-visible { background: var(--surface, #fff); color: var(--text, #15202e); outline: none; }
.fp-x:focus-visible { box-shadow: inset 0 0 0 2px var(--accent, #0f7a4c); }
.fp-input:disabled ~ .fp-btn { opacity: .5; cursor: not-allowed; }
@media (pointer: coarse) { .fp-x { width: 40px; height: 40px; } }
@media print { .fp-btn, .fp-x { display: none; } }

/* where no script runs: the browser's own file button at least looks like the app's outline button */
input[type="file"]::file-selector-button { min-height: 32px; margin: 0 10px 0 0; padding: 0 14px; vertical-align: middle; border-radius: var(--radius-sm, 8px); cursor: pointer;
  border: 1px solid var(--border, #dde3ec); background: var(--surface, #fff); color: var(--text, #15202e); font: inherit; font-weight: 600; font-size: var(--fs-sm, .85rem); }
input[type="file"]::file-selector-button:hover { border-color: var(--accent, #0f7a4c); }

/* drop-downs on the pages that don't load plainer.css (stand-alone pages): the same arrow, a little in from the edge */
html:root select:where(:not([multiple]):not([size])) { -webkit-appearance: none; appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px; }
@media print { html:root select:where(:not([multiple]):not([size])) { background-image: none; padding-right: 8px; } }

/* ---- sliders (controls-9, 30 Nov 2026): one slider on every page in the team accent, not the system blue. A thin track that
   shows in both themes and a round handle, 20px (24px on touch screens), with room around it to take a finger.
   A page sets --range-c for another colour (the sun slider); sliders on the map buttons (.ov-btn, white on smoked glass)
   and data-plain ones keep the browser's own. Width: up to 320px unless the page lays the slider out itself. */
input[type="range"]:where(:not(.ov-btn *):not([data-plain])) {
  -webkit-appearance: none; appearance: none; box-sizing: border-box; width: min(100%, 320px); min-width: 0; min-height: 32px; margin: 0; padding: 0;
  border: 0; background: transparent; accent-color: var(--range-c, var(--accent, #0f7a4c)); cursor: pointer; vertical-align: middle; }
input[type="range"]:where(:not(.ov-btn *):not([data-plain]))::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px; background: var(--range-track, color-mix(in srgb, var(--text, #15202e) 22%, transparent)); }
input[type="range"]:where(:not(.ov-btn *):not([data-plain]))::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%;
  background: var(--range-c, var(--accent, #0f7a4c)); border: 2px solid var(--surface, #fff); box-shadow: 0 0 0 1px var(--range-c, var(--accent, #0f7a4c)); }
input[type="range"]:where(:not(.ov-btn *):not([data-plain]))::-moz-range-track {
  height: 6px; border-radius: 3px; background: var(--range-track, color-mix(in srgb, var(--text, #15202e) 22%, transparent)); }
input[type="range"]:where(:not(.ov-btn *):not([data-plain]))::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--range-c, var(--accent, #0f7a4c)); }
input[type="range"]:where(:not(.ov-btn *):not([data-plain]))::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: var(--range-c, var(--accent, #0f7a4c)); border: 2px solid var(--surface, #fff);
  box-shadow: 0 0 0 1px var(--range-c, var(--accent, #0f7a4c)); }
input[type="range"]:where(:not(.ov-btn *):not([data-plain])):focus-visible { outline: 2px solid var(--accent, #0f7a4c); outline-offset: 2px; }
input[type="range"]:where(:not(.ov-btn *):not([data-plain])):disabled { opacity: .5; cursor: default; }
@media (pointer: coarse) {
  input[type="range"]:where(:not(.ov-btn *):not([data-plain])) { min-height: 44px; }
  input[type="range"]:where(:not(.ov-btn *):not([data-plain]))::-webkit-slider-thumb { width: 24px; height: 24px; margin-top: -9px; }
  input[type="range"]:where(:not(.ov-btn *):not([data-plain]))::-moz-range-thumb { width: 20px; height: 20px; }
}
@media (forced-colors: active) { input[type="range"]:where(:not(.ov-btn *)) { -webkit-appearance: auto; appearance: auto; } }

/* ---- link boxes (controls-8, 30 Nov 2026; templates/_linkbox.html): a link to send on, in quiet mono text on the grey
   surface with no field border, so it never looks like a box to type in, and a Copy Link button beside it (Share on phones).
   Read-only fields in general (purpose.css) sit on the same grey. */
.linkbox { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; max-width: 100%; min-width: 0; }
.linkbox > .linkbox-url { flex: 1 1 160px; width: auto; min-width: 0; margin: 0; font-family: var(--pp-mono, ui-monospace, "SF Mono", Menlo, monospace); font-size: var(--fs-sm, .85rem);
  background: var(--surface-2, #f2f5f9); border-color: transparent; color: var(--text, #15202e); text-overflow: ellipsis; cursor: text; }
.linkbox > .btn { flex: none; margin: 0; }
.linkbox > .linkbox-share[hidden] { display: none; }
@media print { .linkbox > .btn { display: none; } .linkbox > .linkbox-url { border: 0; padding: 0; background: none; } }

/* ---- Remove buttons (controls-7; static/js/controls.js removeTick): "Remove the Logo" as a button; once pressed, a quiet
   line "Will be removed when you save." with Keep It. */
.rmtick { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 0; }
.rmtick-note { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--bad-text, #a3262a); font-weight: 600; }
.rmtick-note[hidden], .rmtick-btn[hidden] { display: none; }
.rmtick-note .btn { font-weight: 600; }

/* ---- required and optional (controls-10; static/js/controls.js reqMarks): the quiet word beside a label, and the line
   under a field that still needs something when Save is pressed (in place of the browser's grey bubble). */
.ff-req, .ff-opt { color: var(--muted, #4f5c6e); font-weight: 400; font-size: .85em; }
/* the red edge on a field that still needs something: purpose.css (it has to beat the page-wide field borders) */
:is(input, select, textarea).ff-bad:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad, #c62828) 25%, transparent); }
.ff-err { margin: 4px 0 0; color: var(--bad-text, #a3262a); font-size: var(--fs-sm, .85rem); font-weight: 600; }
.ff-err::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--bad, #c62828); vertical-align: 1px; }
