/* RoadSense: Liquid Glass, following Apple's layering.
   - CONTENT (panels, tables, stat cards): solid, on Apple's grouped background, as Apple keeps content. (The
     colourful wallpaper is only on the landing page; see "CONTENT IS SOLID" at the end of this file.)
   - CONTROL glass (sidebar, top bar, buttons, dropdown lists, the date picker, dialogs, pills, the player): clearer,
     and in Chrome and Edge it bends the light at its rim (an SVG displacement map that glass.js makes for each
     control's size). Other browsers get the same frosted glass without the bending.
   Every glass control is made the same way, as Apple's are: one material (blur 12px, saturate 170%, a touch of
   brightness), one bright white rim with a faint outer edge, and four sizes (44px fields and buttons, 36px small
   buttons and status pills, 32px controls in a table row, 28px chips). Corners step down in a fixed order: 30px for
   the sidebar, sheets and dialogs, 24px for menus and the date picker, 22px for panels and cards, capsules inside.
   The palette is white, grey and ink. The only colours are the school-zone logo mark, the signal red of the
   10 km/h sign, and the soft wallpaper. The variable names are the same as before, because some templates use them. */
@font-face {
  font-family: "RS Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-var.woff2") format("woff2-variations"), url("fonts/inter-var.woff2") format("woff2");
}
/* on a Mac, iPhone or iPad the system font is SF Pro itself (base.html marks these with .apple before the first
   paint; elsewhere "the system font" would be Segoe UI or Roboto, so Inter is asked for by name instead) */
html.apple {
  --head: -apple-system, BlinkMacSystemFont, "SF Pro Display", "RS Inter", "Helvetica Neue", Arial, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "RS Inter", "Helvetica Neue", Arial, sans-serif;
}
@property --rf { syntax: "*"; inherits: false; }   /* a control's own refraction map; never passed on to what is inside it */
:root {
  --asphalt: #171b1f;
  --asphalt-2: #2a3036;
  --paper: #eef1f6;
  --focus: rgba(18, 24, 30, .42);      /* keyboard focus: a soft ink ring, never a blue one */
  --focus-halo: rgba(18, 24, 30, .08);   /* under the wallpaper, and what shows if it cannot be drawn */
  --ink: #12161a;
  --muted: #444d56;
  --zone: #d4e600;
  --zone-soft: rgba(212, 230, 0, .24);
  --signal: #d92c3f;
  --signal-soft: rgba(217, 44, 63, .12);
  --ok: #1f8a4c;
  --ok-soft: rgba(31, 138, 76, .14);

  /* content layer: frosted white glass, opaque enough to read on */
  --surface: linear-gradient(170deg, rgba(255, 255, 255, .76), rgba(255, 255, 255, .58));
  --surface-line: rgba(255, 255, 255, .7);
  --surface-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(255, 255, 255, .35),
                    0 1px 2px rgba(18, 24, 30, .05), 0 18px 40px -26px rgba(30, 44, 80, .38);
  --field: rgba(236, 239, 244, .72);
  --line: rgba(18, 24, 30, .12);

  /* control and navigation layer: the glass */
  --glass: linear-gradient(160deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, .3));
  --glass-strong: linear-gradient(160deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .55));
  --blur: blur(26px) saturate(180%) brightness(1.05);
  /* light lands on the rim: bright top-left, faint along the sides, bright again bottom-right */
  --rim: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, .5) 30%, rgba(18, 24, 30, .1) 58%, rgba(255, 255, 255, .95) 100%);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 0 0 1px rgba(255, 255, 255, .2),
                  inset 0 14px 18px -16px rgba(255, 255, 255, .9), 0 24px 48px -26px rgba(18, 24, 30, .3),
                  0 2px 6px -2px rgba(18, 24, 30, .12);
  --glass-shadow-sm: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 0 0 1px rgba(255, 255, 255, .3),
                     inset 0 -6px 10px -8px rgba(255, 255, 255, .6), 0 10px 20px -12px rgba(2, 6, 30, .5);

  /* One motion system: everything moves on a spring (see springify.py, which made these curves).
     bouncy  moves, pops and presses; overshoots about 10% and settles
     snappy  sizes and layout; barely overshoots
     smooth  colour, opacity and shadows; no overshoot */
  --spring-bouncy: linear(0, 0.0288, 0.1035, 0.2081, 0.3292, 0.4559, 0.5798, 0.6948, 0.7969, 0.8839, 0.9548, 1.0099, 1.0503, 1.0775, 1.0934, 1.1001, 1.0996, 1.0938, 1.0843, 1.0726, 1.06, 1.0473, 1.0353, 1.0244, 1.0151, 1.0073, 1.0011, 0.9964, 0.9932, 0.9911, 0.9901, 0.9899, 0.9903, 0.9911, 0.9922, 0.9934, 0.9947, 0.996, 0.9971, 1);
  --spring-snappy: linear(0, 0.0191, 0.0682, 0.1373, 0.2181, 0.3044, 0.3917, 0.4763, 0.5561, 0.6295, 0.6957, 0.7542, 0.8052, 0.8489, 0.8857, 0.9163, 0.9414, 0.9615, 0.9773, 0.9895, 0.9987, 1.0053, 1.0099, 1.0128, 1.0145, 1.0151, 1.015, 1.0144, 1.0135, 1.0123, 1.011, 1.0097, 1.0084, 1.0072, 1.006, 1.005, 1.004, 1.0032, 1.0025, 1);
  --spring-smooth: linear(0, 0.0206, 0.0714, 0.1399, 0.2172, 0.2972, 0.3759, 0.4507, 0.5202, 0.5835, 0.6404, 0.691, 0.7356, 0.7745, 0.8084, 0.8376, 0.8628, 0.8843, 0.9026, 0.9182, 0.9315, 0.9426, 0.9521, 0.96, 0.9667, 0.9723, 0.9769, 0.9808, 0.9841, 0.9868, 0.9891, 0.991, 0.9925, 0.9938, 0.9949, 0.9958, 0.9965, 0.9971, 0.9977, 1);
  /* THE open/close spring, one for the whole app (a record, a menu tab, your name, logging in and out): a damped
     spring with a response of .52 s and a damping ratio of .76, like iOS's zoom; it leaves fast, overshoots ~2.5%
     and settles. --zoom-time is how long it runs. */
  --spring-zoom: linear(0, 0.0168, 0.0607, 0.1235, 0.1983, 0.2799, 0.3637, 0.4467, 0.5263, 0.6009, 0.6693, 0.7309, 0.7856, 0.8332, 0.8741, 0.9086, 0.9374, 0.9608, 0.9796, 0.9942, 1.0053, 1.0135, 1.0191, 1.0227, 1.0247, 1.0254, 1.0251, 1.024, 1.0225, 1.0206, 1.0186, 1.0165, 1.0143, 1.0123, 1.0104, 1.0086, 1.007, 1.0056, 1.0044, 1.0033, 1.0024, 1.0017, 1.0011, 1.0006, 1);
  --zoom-time: .7s;
  --spr: var(--spring-bouncy);
  --spring: var(--spring-bouncy);

  /* corner radii are concentric: an inner radius is the outer radius less the padding */
  --r-shell: 30px;
  --pad-shell: 12px;
  --r-panel: 22px;
  --r-tile: 18px;
  --r-pop: 24px;       /* menus and the date picker */
  --r-field: 14px;

  /* Apple's own font, SF Pro, on Apple devices (it is part of the system there); everywhere else Inter, made to the
     same proportions and shipped with the website (static/fonts, SIL Open Font License), so a Windows laptop reads
     the same. SF Pro itself may not be shipped with a website. */
  --head: "SF Pro Display", "RS Inter", "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --body: "SF Pro Text", "RS Inter", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink);
  font: 400 1rem/1.5 var(--body); -webkit-font-smoothing: antialiased;
}
/* The wallpaper: soft, blurred colour behind every page, fixed while the page scrolls, so the glass above it has
   light to catch. It is calm on the working screens and a little brighter on the landing page. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 50vmax at 0% 0%, rgba(120, 170, 255, .36), rgba(120, 170, 255, 0) 70%),
    radial-gradient(52vmax 46vmax at 100% 0%, rgba(255, 190, 215, .3), rgba(255, 190, 215, 0) 70%),
    radial-gradient(62vmax 56vmax at 100% 100%, rgba(255, 208, 160, .3), rgba(255, 208, 160, 0) 70%),
    radial-gradient(58vmax 56vmax at 0% 100%, rgba(175, 150, 255, .3), rgba(175, 150, 255, 0) 70%),
    radial-gradient(42vmax 34vmax at 55% 48%, rgba(150, 230, 215, .22), rgba(150, 230, 215, 0) 70%),
    var(--paper);
}
body:has(.hero)::before, html.app-close body::before {
  background:
    radial-gradient(38vmax 38vmax at 8% 6%, rgba(120, 170, 255, .55), rgba(120, 170, 255, 0) 70%),
    radial-gradient(34vmax 34vmax at 96% 4%, rgba(255, 190, 215, .5), rgba(255, 190, 215, 0) 70%),
    radial-gradient(40vmax 40vmax at 92% 96%, rgba(255, 205, 150, .5), rgba(255, 205, 150, 0) 70%),
    radial-gradient(40vmax 40vmax at 4% 98%, rgba(175, 150, 255, .5), rgba(175, 150, 255, 0) 70%),
    radial-gradient(28vmax 24vmax at 52% 50%, rgba(150, 230, 215, .4), rgba(150, 230, 215, 0) 70%),
    #ffffff;
}
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.12; margin: 0 0 .5rem; letter-spacing: -.022em; }
h1 { font-size: 2.05rem; letter-spacing: -.03em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1rem; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: rgba(18, 22, 26, .35); }
a:hover { color: var(--signal); text-decoration-color: currentColor; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 6px var(--focus-halo); }
/* Scrollbars as on a Mac or an iPhone: a plain grey capsule with no track and no arrows, shown only while you scroll
   and gone about a second after you stop (glass.js fades it in and out with --sb-a). Pointing at the edge where it
   lives brings it back, and under the pointer it widens and darkens a little. A list that can slide sideways shows it
   for a moment when the page opens, so you know there is more. Chrome, Edge and Safari draw it from the
   ::-webkit-scrollbar parts below; they ignore those parts wherever scrollbar-color is set, so that (for Firefox,
   which has no such parts) is given only to browsers without them. */
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-width: thin; scrollbar-color: rgba(18, 24, 30, .3) transparent; }
  html[data-theme=dark] { scrollbar-color: rgba(255, 255, 255, .28) transparent; }
}
/* each box that scrolls fades its own bar: the page's value must not pass down to the lists inside it */
body * { --sb-a: 0; }   /* (not body itself: the page's bar takes its colours from it) */
::-webkit-scrollbar { width: 14px; height: 14px; background: transparent; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-track-piece, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-thumb {
  border: 4px solid transparent; border-radius: 999px; background-clip: padding-box;
  background-color: rgba(0, 0, 0, calc(.42 * var(--sb-a, 0)));
}
::-webkit-scrollbar-thumb:hover { border-width: 2px; background-color: rgba(0, 0, 0, .5); }
::-webkit-scrollbar-thumb:active { border-width: 2px; background-color: rgba(0, 0, 0, .58); }

/* ---------- the content layer: frosted glass panels ---------- */
.panel, .stat, .facts > div, .page-head, .hero, .auth-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  box-shadow: var(--surface-shadow);
}

/* ---------- the control layer: glass with a rim ---------- */
.side, .public-top, .flash {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: var(--rf, blur(26px)) saturate(180%) brightness(1.05); backdrop-filter: var(--rf, blur(26px)) saturate(180%) brightness(1.05);
  border: 0;
  box-shadow: var(--glass-shadow);
}
/* The rim is drawn as a 1px ring that follows the corner radius. */
.side::before, .public-top::before, .flash::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--rim); pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

/* ---------- buttons: one glass control for every action ----------
   Every button looks the same. Colour is kept for meaning only: a destructive action has a red label.
   glass.js reads what is behind each button and sets data-tone to light or dark, so the fill and
   the label always keep their contrast, and a highlight on the rim follows the pointer. */
.btn, button.zoombtn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; padding: 0 1.3rem; border: 1px solid rgba(255, 255, 255, .8); border-radius: 999px;
  /* the same liquid pill as the menu: see-through, a bright rim top and bottom, a blue glow on the left and a pink one on the right */
  background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(214, 224, 238, .2) 46%, rgba(255, 255, 255, .6)), rgba(196, 210, 232, .16);
  color: var(--ink);
  -webkit-backdrop-filter: var(--rf, blur(12px)) brightness(1.06) saturate(170%); backdrop-filter: var(--rf, blur(12px)) brightness(1.06) saturate(170%);
  box-shadow: inset 0 1.5px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .85), inset 0 -7px 10px -7px #fff,
              inset 7px 0 10px -8px rgba(90, 160, 255, .7), inset -7px 0 10px -8px rgba(255, 120, 170, .6),
              0 0 0 1px rgba(18, 28, 60, .1), 0 12px 20px -10px rgba(22, 44, 78, .5);
  font: 600 1rem var(--body); letter-spacing: -.005em; text-decoration: none; cursor: pointer;
  transition: transform .45s var(--spring-bouncy), background .2s var(--spring-smooth), box-shadow .2s var(--spring-smooth), color .2s var(--spring-smooth);
}
/* the specular highlight: it sits where the pointer is */
.btn::after, button.zoombtn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(90px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 70%);
  transition: opacity .2s var(--spring-smooth);
}
.btn:hover, button.zoombtn:hover {
  background: linear-gradient(180deg, #fff, rgba(226, 234, 246, .3) 46%, rgba(255, 255, 255, .8)), rgba(196, 210, 232, .2); color: var(--ink);
}
.btn:hover::after, button.zoombtn:hover::after { opacity: 1; }
/* pressing is handled by the press spring in glass.js (swell, stretch toward the pointer, bounce back) */
.btn-danger, .btn-danger:hover { color: #b81d30; }
/* over a dark background the glass turns light-on-dark */
.btn[data-tone=dark], button.zoombtn[data-tone=dark] {
  background: linear-gradient(180deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .06) 46%, rgba(255, 255, 255, .22)); color: #fff; border-color: rgba(255, 255, 255, .38);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .9), inset 0 0 0 1px rgba(255, 255, 255, .5), inset 0 -7px 10px -7px rgba(255, 255, 255, .6),
              inset 7px 0 10px -8px rgba(120, 190, 255, .7), inset -7px 0 10px -8px rgba(255, 150, 190, .6), 0 12px 20px -10px rgba(0, 0, 0, .65);
}
.btn[data-tone=dark]:hover, button.zoombtn[data-tone=dark]:hover { background: linear-gradient(180deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .2)); color: #fff; }
.btn-danger[data-tone=dark], .btn-danger[data-tone=dark]:hover { color: #ffb0b9; }
/* no glass on glass: a button on the sidebar or the top bar does not blur again */
.side .btn, .public-top .btn { -webkit-backdrop-filter: none; backdrop-filter: none; }
.btn-sm, button.zoombtn { min-height: 36px; padding: 0 1rem; font-size: .9rem; }
/* in a table row, a button is the row's size: 32px, like the record pill beside it */
td .btn-sm { min-height: 32px; padding: 0 .85rem; font-size: .86rem; }
button.zoombtn { margin-top: .6rem; }
.inline { display: inline; margin: 0; }
.panel .btn + .btn { margin-left: .5rem; }

/* ---------- forms (content: solid fields, easy to read) ---------- */
label { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .95rem; }
.hint { font-weight: 400; color: var(--muted); font-size: .9rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date],
input[type=url], input[type=number], select, textarea {
  width: 100%; min-height: 44px; padding: .5rem .9rem; border: 1px solid rgba(18, 24, 30, .07); border-radius: 12px;
  background: var(--field); font: 400 1rem var(--body); color: var(--ink);
  box-shadow: none;
  transition: background-color .18s var(--spring-smooth), border-color .18s var(--spring-smooth), box-shadow .18s var(--spring-smooth);
}
/* Text boxes belong to the content layer: flat, calm grey, rounded rectangles (capsules are for
   buttons and dropdowns). Nothing is sunk into the page; they come alive only when focused. */
input::placeholder, textarea::placeholder { color: #66707a; }
/* background-color, not background: the shorthand would also wipe the arrow drawn on a select */
input:hover, select:hover, textarea:hover { border-color: rgba(18, 24, 30, .16); }
input:hover, textarea:hover { background-color: #eff0f3; }
input:focus, textarea:focus { border-color: rgba(255, 255, 255, .95); outline: none; }
/* a dropdown is a glass button: clicked (and closed again) it keeps its glass, as a button does; only the keyboard
   gives it the focus halo (:focus-visible), so it never looks stuck pressed after the list closes */
select:focus { outline: none; }
input:focus, textarea:focus { background-color: #ffffff; }
select {
  -webkit-appearance: none; appearance: none; padding: .5rem 2.6rem .5rem 1.15rem; border-radius: 999px; font-weight: 500; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .8); background-color: rgba(246, 247, 249, .8);
  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 1.5l5 5 5-5' fill='none' stroke='%2312161a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"), linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(214, 224, 238, .2) 46%, rgba(255, 255, 255, .6));
  background-repeat: no-repeat, no-repeat; background-position: right 1.05rem center, 0 0; background-size: auto, 100% 100%;
  background-color: rgba(196, 210, 232, .16);
  -webkit-backdrop-filter: var(--rf, blur(12px)) brightness(1.06) saturate(170%); backdrop-filter: var(--rf, blur(12px)) brightness(1.06) saturate(170%);
  /* the same liquid pill as the buttons and the menu */
  box-shadow: inset 0 1.5px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .85), inset 0 -7px 10px -7px #fff,
              inset 7px 0 10px -8px rgba(90, 160, 255, .7), inset -7px 0 10px -8px rgba(255, 120, 170, .6),
              0 0 0 1px rgba(18, 28, 60, .1), 0 12px 20px -10px rgba(22, 44, 78, .5);
}
select:hover { background-color: rgba(196, 210, 232, .24); }
/* The opened list of a dropdown is a control, so it is glass (Chrome and Edge 135 or newer;
   other browsers keep their own list). */
@supports (appearance: base-select) {
  select, ::picker(select) { -webkit-appearance: base-select; appearance: base-select; }
  select { align-items: center; padding-right: 1.05rem; background-image: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(214, 224, 238, .2) 46%, rgba(255, 255, 255, .6)); background-repeat: no-repeat; background-position: 0 0; background-size: 100% 100%; }
  ::picker(select) {
    --list-blur: 28;                                /* read by glass.js for the glass layer behind it */
    margin: 6px 0; padding: 6px; border: 1px solid rgba(255, 255, 255, .8); border-radius: var(--r-pop); overflow-x: hidden;
    position-try-order: normal;                     /* open below the field when there is room, above only when there is not */
    /* a real height limit, never "shrink to whatever is left": otherwise Chrome squeezes the list into the few
       pixels under a field low on the screen instead of opening it above. Half the screen always fits on one
       side of the field; a longer list scrolls inside. */
    max-height: min(26rem, calc(50vh - 2.5rem)); min-height: 0;
    background: linear-gradient(160deg, rgba(244, 248, 253, .78), rgba(226, 234, 246, .6));
    -webkit-backdrop-filter: var(--rf, blur(28px)) saturate(170%); backdrop-filter: var(--rf, blur(28px)) saturate(170%);
    box-shadow: inset 0 1.5px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .55), inset 7px 0 12px -9px rgba(120, 190, 255, .55), inset -7px 0 12px -9px rgba(255, 150, 190, .45),
                0 24px 44px -18px rgba(22, 44, 78, .55), 0 2px 8px -2px rgba(22, 44, 78, .16);
    color: var(--ink); font: 400 1rem var(--body);
    opacity: 0; transform: scale(.9, .5); transform-origin: top center; border-radius: 28px;
    /* closing is quick; opening is a spring, so the list grows out of the field like Apple's menus */
    /* it waits a moment before it goes, so the lens is seen landing on the choice */
    transition: opacity .2s var(--spring-smooth) .2s, transform .2s var(--spring-bouncy) .2s, border-radius .2s var(--spring-smooth) .2s, -webkit-backdrop-filter .2s var(--spring-smooth) .2s, backdrop-filter .2s var(--spring-smooth) .2s, display .2s var(--spring-smooth) allow-discrete .2s, overlay .2s var(--spring-smooth) allow-discrete .2s;
  }
  ::picker(select):popover-open {
    opacity: 1; transform: none; border-radius: var(--r-pop);
    transition: opacity .2s var(--spring-smooth), transform .6s var(--spring-bouncy), border-radius .6s var(--spring-smooth), -webkit-backdrop-filter .4s var(--spring-smooth), backdrop-filter .4s var(--spring-smooth), display .2s var(--spring-smooth) allow-discrete, overlay .2s var(--spring-smooth) allow-discrete;
  }
  @starting-style { ::picker(select):popover-open { opacity: 0; transform: scale(.9, .5); border-radius: 28px; -webkit-backdrop-filter: var(--rf, blur(0)); backdrop-filter: var(--rf, blur(0)); } }
  /* The options are pills like the sidebar tabs: hovering lights one softly, the chosen one is the full glass pill. */
  select option {
    padding: .5rem .95rem; margin: 0; border-block: 2px solid transparent; background-clip: padding-box; border-radius: 999px; gap: .6rem; cursor: default; color: #232b33;
    transition: background .2s var(--spring-smooth), box-shadow .25s var(--spring-smooth), color .2s var(--spring-smooth), transform .4s var(--spring-bouncy);
  }
  select:not(.has-lens) option:hover, select:not(.has-lens) option:focus-visible {
    outline: none; color: var(--ink);
    background: linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(255, 255, 255, .4));
    box-shadow: inset 0 1.5px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .7), 0 8px 14px -10px rgba(22, 44, 78, .45);
  }
  select option:active { transform: scale(.97); }
  select option:checked { font-weight: 650; color: var(--ink); }
  select:not(.has-lens) option:checked {
    background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .36) 55%, rgba(255, 255, 255, .62));
    box-shadow: inset 0 1.5px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .85), inset 0 -6px 9px -7px #fff,
                inset 7px 0 10px -8px rgba(120, 190, 255, .75), inset -7px 0 10px -8px rgba(255, 150, 190, .65),
                0 0 0 1px rgba(10, 20, 60, .06), 0 12px 20px -10px rgba(22, 44, 78, .6);
  }
  select option::checkmark { order: 1; margin-left: auto; color: var(--ink); }
  /* The glass lens: the same capsule as the sidebar's. select.js moves it with springs. */
  select .sel-ref { position: absolute; inset: 0; visibility: hidden; pointer-events: none; }
  select .sel-clip { position: absolute; left: 0; top: 0; right: 0; height: 0; overflow: hidden; pointer-events: none; z-index: -1; border-radius: 16px; }
  select .sel-lens {
    position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; border-radius: 999px;
    transform-origin: 50% 50%; will-change: transform;
    /* It sits BEHIND the labels, so nothing ever covers the text. No backdrop filter: inside a dropdown list
       Chrome can draw the filtered copy shifted, which garbles the label. */
    background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .34) 55%, rgba(255, 255, 255, .62));
    box-shadow: inset 0 1.5px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .85), inset 0 -7px 10px -7px #fff,
                inset 7px 0 10px -8px rgba(120, 190, 255, .7), inset -7px 0 10px -8px rgba(255, 150, 190, .6),
                0 0 0 1px rgba(10, 20, 60, .08), 0 14px 24px -10px rgba(2, 6, 30, .6);
  }
  /* hovering only warms an option, as it does on the sidebar; the lens moves when you press */
  select.has-lens option:hover { background: rgba(255, 255, 255, .45); box-shadow: none; }
  select.has-lens option:active, select.has-lens option:focus, select.has-lens option:focus-visible, select.has-lens option:checked { background: transparent; box-shadow: none; outline: none; }
  /* icons: the arrow turns over as the list opens, and the tick springs in on the option the lens is heading for */
  select::picker-icon {
    display: block; content: ""; flex: none; width: 12px; height: 8px; margin-left: auto; background: #12161a;
    -webkit-mask: 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 1.5l5 5 5-5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: 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 1.5l5 5 5-5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: rotate .6s var(--spring-bouncy);
  }
  select:open::picker-icon { rotate: 180deg; }
  /* In Chrome and Edge the list's glass is a layer just behind it that can bend the light (glass.js), so the list
     itself is clear: same tint and rim, no blur of its own. */
  select.rf-ghost::picker(select) { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: inset 0 1.5px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .55), inset 7px 0 12px -9px rgba(120, 190, 255, .55), inset -7px 0 12px -9px rgba(255, 150, 190, .45); }
  .sel-glass[popover] {
    position: fixed; inset: auto; margin: 0; padding: 0; border: 0; overflow: hidden; pointer-events: none;
    transform-origin: 0 0; opacity: 0; border-radius: var(--r-pop);
    background: linear-gradient(160deg, rgba(244, 248, 253, .78), rgba(226, 234, 246, .6));
    -webkit-backdrop-filter: var(--rf, blur(28px)) saturate(170%); backdrop-filter: var(--rf, blur(28px)) saturate(170%);
    box-shadow: 0 24px 44px -18px rgba(22, 44, 78, .55), 0 2px 8px -2px rgba(22, 44, 78, .16);
  }
  .sel-glass::backdrop { background: transparent; }
  select.has-lens option::checkmark { visibility: hidden; display: inline-block; }
  select.has-lens option[data-goal]::checkmark { visibility: visible; animation: sel-tick .6s var(--spring-bouncy) both; }
  @keyframes sel-tick { from { scale: .2; rotate: -30deg; opacity: 0; } to { scale: 1; rotate: 0deg; opacity: 1; } }
  /* after a choice the list waits for the chosen icon's move to finish, then closes */
  select.sel-commit::picker(select) {
    transition: opacity .2s var(--spring-smooth) .62s, transform .2s var(--spring-bouncy) .62s, border-radius .2s var(--spring-smooth) .62s, -webkit-backdrop-filter .2s var(--spring-smooth) .62s, backdrop-filter .2s var(--spring-smooth) .62s, display .2s var(--spring-smooth) allow-discrete .62s, overlay .2s var(--spring-smooth) allow-discrete .62s;
  }
  /* the open list hangs from the field's resting place, not from the field itself, so pressing and pulling the field
     (its jelly, glass.js) never stretches or moves the list (select.js keeps the marker in place) */
  select.has-lens::picker(select) { position-anchor: var(--sel-anchor); }
  /* its scroll bar, the Apple way (select.js): none when every option fits, a thin grey capsule with no arrows
     on a clear track when the list is longer than its room */
  select:not(.sel-scrolls)::picker(select) { overflow-y: hidden; }
  select.sel-scrolls::picker(select) { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, .34) transparent; }
  html[data-theme=dark] select.sel-scrolls::picker(select) { scrollbar-color: rgba(255, 255, 255, .36) transparent; }
  .sel-anchor { position: fixed; left: 0; top: 0; width: 0; height: 0; pointer-events: none; opacity: 0; }
  select:open .sel-lens { animation: sel-lens-open .01s; }            /* select.js listens for this to know the list opened */
  @keyframes sel-lens-open { from { opacity: .999; } }
  /* the options arrive one after another */
  /* (they only fade in, they do not slide: the lens sits on them from the first frame, so the two always line up) */
  select.has-lens option { --i: 8; }                                  /* select.js numbers the first eight */
  select:open option { transition: opacity .3s var(--spring-smooth) calc(var(--i, 0) * 30ms + 70ms), color .2s var(--spring-smooth); }
  @starting-style { select:open option { opacity: 0; } }
}
textarea { min-height: 120px; resize: vertical; }
.field { margin-bottom: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
/* side by side, a label that wraps to two lines must not push its box lower than its neighbour's: each label sits
   right on its box, and the boxes line up */
.grid-2 > .field { display: flex; flex-direction: column; }
.grid-2 > .field > label:first-child { margin-top: auto; }
.check { display: flex; gap: .65rem; align-items: flex-start; font-weight: 400; margin-bottom: .75rem; }

/* check boxes are small glass squares; when ticked they fill with ink and draw a tick that springs in */
input[type=checkbox] {
  -webkit-appearance: none; appearance: none; display: inline-grid; place-content: center; flex: none; margin: 0;
  width: 22px; height: 22px; border-radius: 7px; border: 1px solid rgba(18, 24, 30, .2); cursor: pointer;
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(236, 239, 243, .75));
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(18, 24, 30, .1), 0 6px 10px -8px rgba(18, 24, 30, .4);
  transition: background .2s var(--spring-smooth), border-color .2s var(--spring-smooth), transform .4s var(--spring-bouncy);
}
input[type=checkbox]::after {
  content: ""; width: 11px; height: 6px; border-left: 2.2px solid #fff; border-bottom: 2.2px solid #fff;
  transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform .35s var(--spring-bouncy);
}
input[type=checkbox]:checked { background: linear-gradient(180deg, #3a4148, #171b1f); border-color: #171b1f; }
input[type=checkbox]:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
input[type=checkbox]:active { transform: scale(.88); transition-duration: .09s; }
audio { display: block; width: 100%; height: 44px; border-radius: 999px; }
video { max-width: 100%; border-radius: 16px; }

/* ---------- messages (control layer: a glass toast, tinted by meaning, nearly opaque for reading) ---------- */
.flash { padding: .8rem 1.1rem; border-radius: var(--r-panel); margin-bottom: .9rem; font-weight: 500; }
.flash-ok { background: linear-gradient(135deg, rgba(250, 252, 250, .97), rgba(226, 244, 233, .95)); color: #0e3a22; }
.flash-error { background: linear-gradient(135deg, rgba(255, 252, 252, .97), rgba(252, 232, 235, .95)); color: #6e0e1a; }

/* ---------- landing and auth ---------- */
.public-top {
  background: var(--glass);
  position: sticky; top: 14px; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: min(1180px, calc(100% - 28px)); margin: 14px auto 0; padding: .55rem .6rem .55rem 1.2rem;
  border-radius: 999px;
}
.brand { font: 700 1.35rem var(--head); letter-spacing: -.03em; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: .65rem; }
.brand:hover { color: var(--ink); }
/* The logo: an asphalt tile with a road running to the horizon and sensing waves rising from it. */
.brand { gap: .6rem; }
.mark {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 11px;
  background: linear-gradient(160deg, #3a434c, #14181c 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 0 0 1px rgba(255, 255, 255, .07),
              0 0 0 1px rgba(10, 14, 20, .18), 0 8px 16px -8px rgba(10, 14, 20, .7);
  transition: transform .45s var(--spring-bouncy);
}
.mark svg { overflow: visible; }
.mark .m-road { stroke: #f4f7fa; stroke-width: 2.2; }
.mark .m-dash, .mark .m-arc { stroke: var(--zone); stroke-width: 2.2; }
.mark .m-dot { fill: var(--zone); }
.mark .m-arc, .mark .m-dash { transform-box: view-box; }
.mark .m-a1, .mark .m-a2 { transform-origin: 16px 12.6px; transition: opacity .3s var(--spring-smooth); }
.mark .m-a2 { opacity: .8; }
.brand:hover .mark { transform: translateY(-1px) rotate(-3deg); }
.brand:hover .mark .m-a2 { opacity: 1; }
.brand:active .mark { transform: scale(.92); transition-duration: .12s; }
.brand-name { display: inline-flex; white-space: nowrap; }
.bn-road { font-weight: 760; }
.bn-sense { font-weight: 480; color: #3a434c; }
.brand-name .ch { display: inline-block; }
/* the move it plays when clicked (glass.js adds .brand-play, and plays it again on the page that opens) */
.brand-play .mark { animation: brand-tile .75s linear both; }
@keyframes brand-tile { 0% { transform: scale(1) rotate(0deg); } 3.704% { transform: scale(0.933) rotate(-3.356deg); } 7.407% { transform: scale(0.888) rotate(-5.603deg); } 11.111% { transform: scale(0.865) rotate(-6.765deg); } 14.815% { transform: scale(0.861) rotate(-6.972deg); } 18.519% { transform: scale(0.872) rotate(-6.421deg); } 22.222% { transform: scale(0.893) rotate(-5.343deg); } 25.926% { transform: scale(0.921) rotate(-3.966deg); } 29.63% { transform: scale(0.95) rotate(-2.501deg); } 33.333% { transform: scale(0.978) rotate(-1.116deg); } 37.037% { transform: scale(1.001) rotate(0.066deg); } 40.741% { transform: scale(1.019) rotate(0.971deg); } 44.444% { transform: scale(1.031) rotate(1.57deg); } 48.148% { transform: scale(1.037) rotate(1.872deg); } 51.852% { transform: scale(1.038) rotate(1.914deg); } 55.556% { transform: scale(1.035) rotate(1.752deg); } 59.259% { transform: scale(1.029) rotate(1.448deg); } 62.963% { transform: scale(1.021) rotate(1.066deg); } 66.667% { transform: scale(1.013) rotate(0.663deg); } 70.37% { transform: scale(1.006) rotate(0.285deg); } 74.074% { transform: scale(0.999) rotate(-0.036deg); } 77.778% { transform: scale(0.994) rotate(-0.28deg); } 81.481% { transform: scale(0.991) rotate(-0.439deg); } 85.185% { transform: scale(0.99) rotate(-0.518deg); } 88.889% { transform: scale(0.989) rotate(-0.525deg); } 92.593% { transform: scale(0.99) rotate(-0.478deg); } 96.296% { transform: scale(0.992) rotate(-0.392deg); } 100% { transform: none; } }
.brand-play .m-dash { animation: brand-dash .8s var(--spring-snappy) both; }
.brand-play .m-d2 { animation-delay: .08s; } .brand-play .m-d3 { animation-delay: .16s; }
@keyframes brand-dash { from { transform: translateY(-4px); opacity: 0; } to { transform: none; opacity: 1; } }
.brand-play .m-a1, .brand-play .m-a2 { animation: brand-ping .9s var(--spring-bouncy) both; }
.brand-play .m-a1 { animation-delay: .18s; } .brand-play .m-a2 { animation-delay: .3s; }
@keyframes brand-ping { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.brand-play .m-dot { animation: brand-dot .6s .1s var(--spring-bouncy) both; transform-box: fill-box; transform-origin: center; }
@keyframes brand-dot { from { transform: scale(.2); } to { transform: none; } }
.brand-play .ch { animation: brand-letter .6s linear both; animation-delay: calc(var(--i, 0) * 38ms + 120ms); }
@keyframes brand-letter { 0% { transform: translateY(0px) scale(1); } 3.704% { transform: translateY(-2.397px) scale(1.029); } 7.407% { transform: translateY(-4.002px) scale(1.048); } 11.111% { transform: translateY(-4.832px) scale(1.058); } 14.815% { transform: translateY(-4.98px) scale(1.06); } 18.519% { transform: translateY(-4.587px) scale(1.055); } 22.222% { transform: translateY(-3.816px) scale(1.046); } 25.926% { transform: translateY(-2.833px) scale(1.034); } 29.63% { transform: translateY(-1.786px) scale(1.021); } 33.333% { transform: translateY(-0.797px) scale(1.01); } 37.037% { transform: translateY(0.047px) scale(0.999); } 40.741% { transform: translateY(0.694px) scale(0.992); } 44.444% { transform: translateY(1.121px) scale(0.987); } 48.148% { transform: translateY(1.337px) scale(0.984); } 51.852% { transform: translateY(1.367px) scale(0.984); } 55.556% { transform: translateY(1.251px) scale(0.985); } 59.259% { transform: translateY(1.034px) scale(0.988); } 62.963% { transform: translateY(0.762px) scale(0.991); } 66.667% { transform: translateY(0.474px) scale(0.994); } 70.37% { transform: translateY(0.203px) scale(0.998); } 74.074% { transform: translateY(-0.026px) scale(1); } 77.778% { transform: translateY(-0.2px) scale(1.002); } 81.481% { transform: translateY(-0.314px) scale(1.004); } 85.185% { transform: translateY(-0.37px) scale(1.004); } 88.889% { transform: translateY(-0.375px) scale(1.005); } 92.593% { transform: translateY(-0.341px) scale(1.004); } 96.296% { transform: translateY(-0.28px) scale(1.003); } 100% { transform: none; } }
.public-top nav { display: flex; gap: .5rem; }

.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; padding: 3.75rem clamp(1.4rem, 5vw, 4.5rem); width: min(1180px, calc(100% - 28px)); margin: 2.25rem auto 2.5rem; border-radius: 36px; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.3rem); line-height: 1.03; letter-spacing: -.04em; margin-bottom: 1.25rem; }
.hero p.lead { font-size: 1.2rem; line-height: 1.5; max-width: 34rem; color: #2f373e; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.75rem; }
.sign-wrap { display: flex; flex-direction: column; align-items: center; }
/* The 10 km/h sign is content, so it is a solid sign with a little gloss, not glass. */
.sign {
  position: relative; width: min(300px, 70vw); aspect-ratio: 1; border-radius: 50%;
  border: 24px solid var(--signal);
  background: radial-gradient(circle at 32% 24%, #fff, #f6f7f8 60%, #e9ecef);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: inset 0 3px 4px rgba(255, 255, 255, .95), inset 0 -14px 28px rgba(217, 44, 63, .12),
              0 0 0 1px rgba(255, 255, 255, .8), 0 36px 60px -30px rgba(217, 44, 63, .6), 0 14px 30px -16px rgba(22, 44, 78, .4);
}
.sign b { font: 700 clamp(5rem, 14vw, 7.4rem)/.9 var(--head); letter-spacing: -.06em; }
.sign span { font: 600 1.25rem var(--head); letter-spacing: -.01em; color: #2f373e; }
.pole { display: none; }
.centerline { height: 0; border-top: 3px dashed rgba(255, 255, 255, .5); margin: 0 5vw; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; width: min(1180px, calc(100% - 28px)); margin: 0 auto; padding: 2.5rem 0 4rem; }
.facts > div { padding: 1.4rem 1.5rem 1.5rem; border-radius: var(--r-panel); }
.facts h3 { font-size: 1.2rem; }
.facts p { color: #2f373e; margin: 0; }

.auth-wrap { display: grid; place-items: start center; padding: 3.5rem 1rem 4rem; }
.auth-card { width: min(100%, 460px); border-radius: var(--r-shell); padding: 2.1rem; }
.auth-card.wide { width: min(100%, 660px); }
.auth-card h1 { font-size: 1.9rem; margin-bottom: 1.1rem; }
.auth-card .btn[type=submit] { width: 100%; margin-top: .25rem; }
.auth-foot { margin: 1.25rem 0 0; color: var(--muted); }
/* "Forgot password?", "Create an account": quiet text actions, the way Apple's sign-in sheets show them (no underline;
   it appears on hover, so they still read as links) */
.auth-foot a { color: var(--ink); font-weight: 600; text-decoration: none; text-underline-offset: 3px;
  transition: color .25s var(--spring-smooth), text-decoration-color .25s var(--spring-smooth); }
.auth-foot a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(18, 22, 26, .35); }
/* ...made of the same liquid glass as every other button (its light, its press, its wave), small and quiet beside
   the words that lead to it */
.auth-foot { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.auth-foot a.auth-link, .notice a.auth-link { text-decoration: none; font-weight: 600; }
.auth-foot a.auth-link:hover, .notice a.auth-link:hover { text-decoration: none; }
.notice a.auth-link { margin: .45rem 0 0; }
td.actions { white-space: nowrap; width: 1%; padding-right: .4rem; text-align: right; }   /* exactly as wide as its buttons, side by side */
/* the buttons sit against the end of the row, so the trash cans line up from row to row whatever the button beside
   them says (Verify or Unverify, Deactivate or Reactivate), as trailing controls do in an Apple list */
td.actions .btn.btn-pair { min-width: 6.6rem; }
td.actions .icon-gap { width: 32px; height: 32px; }                 /* where a trash can would be, so the rows still line up */
td.actions > * { display: inline-flex; vertical-align: middle; margin: .15rem .4rem .15rem 0; }
td.actions > :last-child { margin-right: 0; }
/* the trash can (Apple's), and a round icon-only button for it in a table row */
.trash { flex: none; display: block; }
.btn.btn-icon { width: 32px; min-width: 32px; padding: 0; }
.btn.btn-icon .trash { width: 17px; height: 17px; }
.trash .t-lid { transform-box: view-box; transform-origin: 4.4px 5.4px; }    /* hinged at its left end */
.trash .t-can { transform-box: view-box; transform-origin: 12px 21px; }
/* pressed or pointed at: the lid lifts and tilts open, then drops back with a small bounce; the can dips under it */
.ico-play .trash .t-lid { animation: trash-lid .75s both; }
.ico-play .trash .t-can { animation: trash-can .75s both; }
@keyframes trash-lid {
  0% { translate: 0 0; rotate: 0deg; animation-timing-function: var(--spring-snappy); }
  34% { translate: 0 -2.2px; rotate: -17deg; animation-timing-function: var(--spring-bouncy); }
  100% { translate: 0 0; rotate: 0deg; }
}
@keyframes trash-can {
  0% { scale: 1 1; animation-timing-function: var(--spring-snappy); }
  34% { scale: 1.04 .95; animation-timing-function: var(--spring-bouncy); }
  100% { scale: 1 1; }
}
@media (prefers-reduced-motion: reduce) { .ico-play .trash * { animation: none !important; } }
/* A delete that asks first: the lid lifts open as the button is pressed and stays open while the question is on
   the screen; cancel and it drops shut with a little bounce (the same spring as the lift) */
.trash .t-lid { transition: translate .55s var(--spring-bouncy), rotate .55s var(--spring-bouncy); }
.trash .t-can { transition: scale .5s var(--spring-bouncy); }
.lid-open .trash .t-lid { translate: 0 -2.2px; rotate: -17deg; transition-timing-function: var(--spring-snappy); transition-duration: .3s; }
.lid-open .trash .t-can { scale: 1.03 .96; transition-timing-function: var(--spring-snappy); transition-duration: .3s; }
@media (prefers-reduced-motion: reduce) { .trash .t-lid, .trash .t-can { transition: none; } }
.btn-google { width: 100%; gap: .6rem; margin-bottom: .2rem; }
.btn-google svg { flex: none; }
.auth-or { display: flex; align-items: center; gap: .75rem; margin: 1.1rem 0 1rem; color: var(--muted); font-size: .88rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; }
/* The sidebar is the navigation layer: a pane of glass that floats inside the window. */
.side {
  position: sticky; top: 14px; height: calc(100vh - 28px); margin: 14px 0 14px 14px;
  border-radius: var(--r-shell); padding: 1.2rem var(--pad-shell) .8rem; display: flex; flex-direction: column;
  color: var(--ink);
}
.side .brand { padding: .1rem .75rem 1.1rem; }
/* in the sidebar the logo sits in a liquid-glass pill, like your name at the foot; it stretches when held and dragged,
   as every glass button does (glass.js), and still plays its own move when clicked */
.side .btn.brand-pill {
  justify-content: flex-start; gap: .6rem; min-height: 54px; margin: 0 0 1rem; padding: .4rem 1.1rem .4rem .45rem;
  font: 700 1.35rem var(--head); letter-spacing: -.03em; overflow: hidden;   /* (the press wave stays inside the glass, as on every button) */
}
.side .btn.brand-pill .mark { flex: none; }
/* the same pill for the logo in the top bar of the public pages (home, log in, sign up) */
.public-top .btn.brand-pill {
  justify-content: flex-start; gap: .55rem; min-height: 40px; padding: .2rem 1rem .2rem .25rem;
  font: 700 1.25rem var(--head); letter-spacing: -.03em; overflow: hidden;   /* (the press wave stays inside the glass) */
}
.public-top .btn.brand-pill .mark { flex: none; width: 32px; height: 32px; border-radius: 10px; }
@media (max-width: 480px) {          /* a phone: the logo pill and the two buttons fit on one line, words unbroken */
  .public-top .btn { white-space: nowrap; }
  .public-top .btn.brand-pill { font-size: 1.1rem; gap: .4rem; padding-right: .7rem; }
  .public-top nav .btn { padding: 0 .75rem; }
  .public-top nav { gap: .35rem; }
}
.side nav { position: relative; display: flex; flex-direction: column; gap: 6px; }
.side nav a {
  position: relative; z-index: 1;
  color: #232b33; text-decoration: none; padding: .58rem .85rem; border-radius: 999px; font-weight: 500;
  display: flex; align-items: center; gap: .7rem;
  background: transparent;
  transition: background .2s var(--spring-smooth), color .2s var(--spring-smooth), transform .4s var(--spring-bouncy);
}
.ico { flex: none; opacity: .72; transition: opacity .2s var(--spring-smooth), transform .4s var(--spring-bouncy); }
.side nav a:hover { background: rgba(255, 255, 255, .45); color: var(--ink); }
.side nav a:hover .ico { opacity: 1; }
.side nav a[aria-current=page], .side nav a.lens-held { color: var(--ink); font-weight: 650; }
.side nav a[aria-current=page] .ico, .side nav a.lens-held .ico { opacity: 1; stroke-width: 2; }
.side nav a { -webkit-user-drag: none; touch-action: manipulation; }
/* The pill is one piece of glass that slides from the old item to the new one
   (the script in app.html moves it). Without the script, the current item is lit instead. */
/* The overlay that holds the lens. It has the same grid cell, margins and stickiness as the
   sidebar, so the two always line up, and it clips the lens to the sidebar's rounded shape. */
.nav-lens {
  grid-column: 1; grid-row: 1; position: sticky; top: 14px; height: calc(100vh - 28px); margin: 14px 0 14px 14px;
  border-radius: var(--r-shell); overflow: hidden; pointer-events: none; z-index: 31;
}
.side { grid-column: 1; grid-row: 1; }
.main { grid-column: 2; grid-row: 1; }
.nav-pill {
  position: absolute; left: 0; top: 0; width: 0; height: 0; border-radius: 999px; pointer-events: none;
  transform-origin: 50% 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .06) 46%, rgba(255, 255, 255, .22));
  /* no blur here: the label is underneath and must stay sharp. The script adds the
     refraction (an SVG displacement filter) in Chrome and Edge. */
  -webkit-backdrop-filter: var(--rf,) brightness(1.1) saturate(140%); backdrop-filter: var(--rf,) brightness(1.1) saturate(140%);
  box-shadow: inset 0 1.5px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .85), inset 0 -7px 10px -7px #fff,
              inset 7px 0 10px -8px rgba(120, 190, 255, .7), inset -7px 0 10px -8px rgba(255, 150, 190, .6),
              0 0 0 1px rgba(10, 20, 60, .08), 0 14px 24px -10px rgba(2, 6, 30, .6);
  will-change: transform;
}
.side nav.dragging { cursor: grabbing; -webkit-user-select: none; user-select: none; }
.side nav.dragging a { cursor: grabbing; }
.side nav:not(.has-pill) a[aria-current=page] {
  background: linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(255, 255, 255, .32) 55%, rgba(255, 255, 255, .52));
  box-shadow: inset 0 1.5px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .7), 0 14px 22px -12px rgba(22, 44, 78, .65);
}
.side .badge { margin-left: auto; background: var(--zone); color: var(--ink); border-radius: 999px; font-size: .78rem; font-weight: 700; padding: 0 .5rem; }
.side-foot { margin-top: auto; padding: .9rem .75rem .2rem; border-top: 1px solid rgba(255, 255, 255, .75); font-size: .92rem; }
.side-foot .who { color: var(--ink); font-weight: 650; word-break: break-word; }
.side-foot .role { color: var(--muted); margin-bottom: .7rem; }
.side-foot .btn { width: 100%; }
.main { padding: 18px clamp(1rem, 2.4vw, 2rem) 5rem; max-width: 1180px; width: 100%; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; padding: 1.2rem 1.6rem 1.25rem; border-radius: var(--r-panel); }
.page-head h1 { margin-bottom: .2rem; }
.page-head p { margin: 0; color: var(--muted); }

/* Moving between pages: the sidebar stays put while its lens moves, and the new page grows out of the tab or
   record you clicked (see "opening a page like an app on iOS" below). */
/* (no cross-document view transitions: their snapshots drop the frosted glass and leave marks while they animate) */
/* (no slide-up on page load: pages either grow out of the spot you clicked, or simply appear) */
.auth-card { animation: glass-in .65s var(--spring-bouncy) both; }
/* the home page springs in the same way: the sign first, then the three cards one after another */
.hero { animation: glass-in .7s var(--spring-bouncy) both; }
.facts > * { animation: glass-in .7s var(--spring-bouncy) both; }
.facts > :nth-child(1) { animation-delay: .08s; }
.facts > :nth-child(2) { animation-delay: .14s; }
.facts > :nth-child(3) { animation-delay: .2s; }
.facts > :nth-child(4) { animation-delay: .26s; }
.facts > :nth-child(5) { animation-delay: .32s; }
.facts > :nth-child(6) { animation-delay: .38s; }
/* logging in: the login card recedes while the server checks... */
.auth-card { transition: transform .5s var(--spring-smooth), opacity .4s var(--spring-smooth); }
.auth-card.auth-leaving { animation: none; transform: scale(.97); opacity: .55; pointer-events: none; }
/* ...then the whole app opens out of the button that was pressed, like an app launching on iOS: the exact reverse of
   logging out (below). A window the size and shape of the button grows to fill the screen on the app's one spring
   (--spring-zoom), its corners squaring off as it lands, and shows its content as it leaves the button. */
html[data-launch] .shell {
  transform-origin: var(--app-ox, 50%) var(--app-oy, 50%); transform: scale(var(--in-s, .2)); opacity: 0;
  background: var(--paper); will-change: transform, clip-path, opacity;
}
html[data-launch].app-go .shell { animation: app-launch var(--zoom-time) var(--spring-zoom) both, app-fade .12s ease-out both; }
@keyframes app-launch {
  from { transform: scale(var(--in-s, .2)); clip-path: inset(var(--cl-t, 0px) var(--cl-r, 0px) var(--cl-b, 0px) var(--cl-l, 0px) round var(--in-r, 300px)); }
  to { transform: none; clip-path: inset(var(--cl-t, 0px) var(--cl-r, 0px) var(--cl-b, 0px) var(--cl-l, 0px) round 0px); }
}
html[data-launch] .shell * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
@media (prefers-reduced-motion: reduce) { html[data-launch] .shell { animation: none; transform: none; opacity: 1; } .auth-card.auth-leaving { transform: none; } }
/* Logging out, like closing an app on iOS (app.html): the part of the app on screen becomes a window that shrinks into
   the Log out button, its corners rounding as it goes, until it is the button's size and shape and fades into it.
   The button is lifted out of the app (.logout-icon) so it stays put, and gives a little squeeze as the window
   arrives. Behind, the landing page's wallpaper comes up, as the home screen does behind a closing app. */
html.app-close .shell {
  transform-origin: var(--out-x, 10%) var(--out-y, 90%); pointer-events: none; will-change: transform, clip-path, opacity;
  background: var(--paper);   /* an app's window is opaque */
  animation: app-close var(--zoom-time) var(--spring-zoom) forwards, app-close-fade .14s ease-in .18s forwards;
}
html.app-close .shell * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
@keyframes app-close {
  from { transform: none; clip-path: inset(var(--cl-t, 0px) var(--cl-r, 0px) var(--cl-b, 0px) var(--cl-l, 0px) round 0px); }
  to { transform: scale(var(--out-s, .06)); clip-path: inset(var(--cl-t, 0px) var(--cl-r, 0px) var(--cl-b, 0px) var(--cl-l, 0px) round var(--out-r, 300px)); }
}
@keyframes app-close-fade { to { opacity: 0; } }
html.app-close .banners, html.app-close .undo-toast { transition: opacity .25s ease; opacity: 0; pointer-events: none; }
html.app-close body::before { animation: home-peek .45s ease both; }
@keyframes home-peek { from { opacity: 0; } }
/* Behind the closing app: the real home page, in a frame under it (app.html). It fades up and settles from a touch
   larger on the same spring, as the home screen does behind an app closing into its icon. When it has settled, the
   browser moves to that page, and it opens still (no entrance), so the two look exactly the same. */
html.app-close .shell { position: relative; z-index: 2; }
.home-under {
  position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; height: 100dvh; border: 0; z-index: 1; pointer-events: none;   /* 100vw: as wide as the next page will be, under this page's scrollbar */
  opacity: 0; background: transparent; transform-origin: 50% 45%;
}
.home-under.in { animation: home-settle var(--zoom-time) var(--spring-zoom) both, home-show .26s ease-out both; }
@keyframes home-settle { from { transform: scale(1.06); } to { transform: none; } }
@keyframes home-show { from { opacity: 0; } to { opacity: 1; } }
/* once the window has gone, the page lets go of its own scrollbar, so the frame is exactly the page that comes next */
html.app-gone { overflow: hidden; }
html.app-gone .shell { visibility: hidden; }
.logout-icon.gone { transition: opacity .24s ease, transform .4s var(--spring-zoom); opacity: 0; transform: scale(.72); }
/* the home page, framed under the closing app or just arrived from it: no entrance of its own (base.html) */
html.home-still .hero, html.home-still .facts > * { animation: none; }
@media (prefers-reduced-motion: reduce) { .home-under.in { animation: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hero, .facts > * { animation: none; } }

/* ---------- panels, stats, tables (content) ---------- */
.panel { border-radius: var(--r-panel); padding: 1.6rem 1.7rem; margin-bottom: 1.4rem; }
.panel > h2:first-child, .panel > h3:first-child { margin-bottom: .9rem; }
.panel > :last-child { margin-bottom: 0; }
.panel > table { display: block; overflow-x: auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.1rem; margin-bottom: 1.4rem; }
.stat { border-radius: var(--r-panel); padding: 1.05rem 1.2rem 1.1rem; }
/* a coloured tile is the same glass, lightly tinted, so its label stays readable */
.stat.alert { background: linear-gradient(170deg, rgba(255, 244, 246, .86), rgba(255, 236, 240, .7)); }
.stat.alert .v { color: #b81d30; }
.stat.zone { background: var(--surface); }
.stat .v { font: 700 2.7rem/1 var(--head); letter-spacing: -.045em; margin-bottom: .3rem; }
.stat .l { color: var(--muted); font-weight: 500; font-size: .95rem; line-height: 1.3; }
.cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.4rem; align-items: start; }
/* The dashboard: two columns that each stack their own panels (a long list on one side never leaves a hole on the
   other), then a row of three smaller panels of equal height. */
.dash-cols { align-items: stretch; margin-bottom: 1.4rem; }
.dash-col { min-width: 0; display: flex; flex-direction: column; }
.dash-col > .panel:last-child { flex: 1 1 auto; margin-bottom: 0; }
/* the shorter column's last panel takes up the difference, so both columns end on the same line: the hours chart
   grows taller (up to a point), the Detector keeps its button at the bottom */
.dash-col > .panel.grow { display: flex; flex-direction: column; }
.dash-col > .panel.grow > .bars.hours { flex: 1 1 auto; height: auto; min-height: 160px; max-height: 340px; }
.dash-col > .panel.grow > .btn:last-child { margin-top: auto; align-self: flex-start; }
/* two by two: speed and honking this week side by side, then repeat offenders and alerts */
.dash-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.4rem; align-items: stretch; }
/* below a wide screen the two columns are too narrow for the latest list: one column, each panel its own height */
@media (max-width: 1280px) {
  .dash-cols { grid-template-columns: minmax(0, 1fr); }
  .dash-col > .panel:last-child { flex: none; }
}
@media (max-width: 900px) { .dash-row { grid-template-columns: minmax(0, 1fr); } }
.panel-sub { margin: -.35rem 0 .2rem; font-size: .92rem; line-height: 1.45; }
/* Busiest hours: 24 slim bars, the same glass as the days chart, a label every three hours */
.bars.hours { height: 160px; gap: .2rem; padding-top: .8rem; }
.bars.hours .bar { max-width: 22px; border-radius: 7px 7px 3px 3px; }
.bars.hours .hr { font-size: .72rem; line-height: 1; height: .8rem; white-space: nowrap; }
.bars.hours .peak .bar { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 0 0 2px var(--focus-halo), 0 6px 12px -8px rgba(22, 44, 78, .5); }
/* Needs your attention: one row per kind of waiting thing, the next one named, a button to go to it */
.attention td.todo-ico { width: 2.6rem; padding-right: 0; color: var(--ink); }
.attention td.todo-ico .ico { width: 22px; height: 22px; display: block; }
.todo-next { display: block; margin-top: .15rem; font-size: .88rem; }
.all-clear { display: flex; gap: .85rem; align-items: center; margin: .2rem 0 0; }
.panel .sub-h { font-size: 1.02rem; margin: 1.3rem 0 .3rem; }
.backup-status { margin: .6rem 0 0; font-weight: 600; }
.turnstile { margin: .3rem 0 1rem; min-height: 65px; }
/* two-step sign-in (My account) */
.two-step .qr { display: inline-block; padding: 10px; background: #fff; border-radius: 16px; margin: .2rem 0 .6rem; box-shadow: 0 6px 18px -10px rgba(22, 44, 78, .4); }
.two-step .qr svg { display: block; width: 190px; height: 190px; }
.two-step .steps { margin: .2rem 0 .6rem 1.2rem; padding: 0; }
.two-step .setup-key { letter-spacing: .08em; }
.two-step .cancel-two-step { margin-top: .6rem; }
.backup-codes { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .35rem .9rem; margin: .5rem 0 0; padding: 0; }
.backup-codes code { font-size: 1.02rem; letter-spacing: .06em; }
/* notifications on this device (push.js) */
.push-state { margin: .2rem 0 .9rem; font-weight: 600; }
.push-state.ok { color: var(--ok); }
.push-state.warn { color: #8a5a00; font-weight: 500; }
html[data-theme=dark] .push-state.warn { color: #f3bd5c; }
.push-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.push-actions [hidden] { display: none; }
/* the detector's API key, hidden like a saved password (apikey.js) */
.key-row { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin: .4rem 0 .9rem; }
.key-row .key-text { flex: 1 1 18rem; min-width: 0; padding: .55rem .85rem; border-radius: 12px; letter-spacing: .12em; overflow-wrap: anywhere; }
.key-row .key-text.shown { letter-spacing: normal; user-select: all; }
.key-unlock { margin: 0 0 1rem; }
.key-unlock-row { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.key-unlock-row input { flex: 1 1 14rem; min-width: 0; }
.key-err { margin: .45rem 0 0; color: var(--bad, #c0263a); font-weight: 600; }
/* why a record waits for an administrator: an amber liquid-glass card above the review buttons, made like the
   amber "reconnecting" pill (see-through, a bright rim top and bottom, a warm glow along each side, the light that
   follows the pointer) */
.review-why {
  --tint: rgba(245, 170, 40, .2); --tint-line: rgba(196, 120, 10, .38); --tint-shadow: rgba(196, 120, 10, .45);
  --glow-l: rgba(255, 190, 80, .7); --glow-r: rgba(255, 140, 90, .55); --spec-size: 260px; --spec-a: .5;
  position: relative; isolation: isolate; margin: 0 0 1.1rem; padding: .9rem 1.15rem 1rem; border-radius: 22px; color: #5a3a00;
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .06) 46%, rgba(255, 255, 255, .42)), var(--tint);
  border: 1px solid var(--tint-line);
  -webkit-backdrop-filter: var(--rf, blur(14px)) brightness(1.05) saturate(170%); backdrop-filter: var(--rf, blur(14px)) brightness(1.05) saturate(170%);
  box-shadow: inset 0 1.5px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .55), inset 0 -6px 9px -6px #fff,
              inset 7px 0 10px -8px var(--glow-l), inset -7px 0 10px -8px var(--glow-r), 0 0 0 1px rgba(60, 40, 0, .05), 0 12px 22px -14px var(--tint-shadow);
}
.review-why::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(var(--spec-size) circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, var(--spec-a)), rgba(255, 255, 255, 0) 70%);
  transition: opacity .3s var(--spring-smooth);
}
.review-why:hover::after { opacity: 1; }
.review-why strong { display: flex; align-items: center; gap: .5rem; color: #7a4e00; margin-bottom: .25rem; font-weight: 700; }
.review-why strong::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #e09a16; box-shadow: 0 0 0 3px rgba(224, 154, 22, .25); flex: none; }
.review-why p { margin: 0; }
html[data-theme=dark] .review-why {
  --tint: rgba(220, 150, 30, .2); --tint-line: rgba(255, 190, 80, .36); --tint-shadow: rgba(140, 80, 0, .6);
  --glow-l: rgba(255, 190, 80, .5); --glow-r: rgba(255, 140, 90, .4); --spec-a: .16; color: #f6deb0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .02) 46%, rgba(255, 255, 255, .07)), var(--tint);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), inset 0 0 0 1px rgba(255, 255, 255, .04), inset 0 -6px 9px -6px rgba(255, 255, 255, .1),
              inset 7px 0 10px -8px var(--glow-l), inset -7px 0 10px -8px var(--glow-r), 0 0 0 1px rgba(0, 0, 0, .34), 0 12px 22px -14px var(--tint-shadow);
}
html[data-theme=dark] .review-why strong { color: #ffd590; }
html[data-theme=dark] .review-why strong::before { background: #f0a92a; box-shadow: 0 0 0 3px rgba(240, 169, 42, .26); }
.all-clear > .ico { width: 30px; height: 30px; flex: none; color: #1f8a4c; }
.all-clear > span > * { display: block; }
/* Detector and Alerts: short lines of a dot or an icon, a name and a value */
.health { list-style: none; margin: 0 0 1.1rem; padding: 0; display: grid; gap: .65rem; }
.health li { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: .65rem; }
.health li > :last-child { text-align: right; }
.health .dot { margin: 0; }
.health .ico { width: 19px; height: 19px; color: var(--muted); }
.health-info { margin: -.35rem 0 1rem; font-size: .85rem; }
.health.sends li { grid-template-columns: auto minmax(0, 1fr) auto; }
.health.sends .sends-more { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .4rem; text-align: left; }
.health.sends .sends-more:empty { display: none; }
/* Speed this week: three figures, a line each like the Detector's */
.health.figures { margin-top: .9rem; }
.health.figures li { grid-template-columns: auto minmax(0, 1fr) auto; }
.health.figures strong { font-weight: 650; white-space: nowrap; }
.health.figures .plate { font-size: .82rem; padding: .05rem .4rem; margin-left: .3rem; }
.plate-link { text-decoration: none; }
/* Repeat offenders: the plate under the name, the count over what it was */
.rep-plate { display: table; margin-top: .3rem; }
.rep-n { display: block; font-size: 1.15rem; }
.rep-mix { display: block; font-size: .82rem; white-space: nowrap; }
/* overflow-y hidden: a table that slides sideways on a phone must not grow a scroll bar of its own for a moment while
   its rows move (deleting, or the glass pill going over the last row) */
.table-wrap { position: relative; overflow-x: auto; overflow-y: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .7rem .7rem; border-bottom: 1px solid rgba(18, 24, 30, .09); vertical-align: middle; }
th { font-weight: 600; color: var(--muted); font-size: .88rem; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s var(--spring-smooth); }
tbody tr:hover { background: rgba(18, 24, 30, .04); }
td.r, th.r { text-align: right; }
td.num, td > a { white-space: nowrap; }
.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); }
/* the plate keeps its solid white face: it is the one thing that must read like the real object */
.plate { font: 650 1rem var(--head); letter-spacing: .07em; background: #fff; border: 1.5px solid var(--ink); border-radius: 6px; padding: .05rem .5rem; display: inline-block; white-space: nowrap; box-shadow: 0 2px 5px -2px rgba(18, 22, 26, .4); }

/* Chips and the status pill are small liquid-glass pills, made like the buttons and the menu pill: see-through,
   a bright rim top and bottom, a glow along each side. The tint keeps the meaning (red, green or neutral). */
.chip, .status {
  --tint: rgba(196, 210, 232, .16); --tint-line: rgba(255, 255, 255, .8); --tint-shadow: rgba(22, 44, 78, .4);
  --glow-l: rgba(90, 160, 255, .65); --glow-r: rgba(255, 120, 170, .55);
  background: linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(255, 255, 255, .04) 46%, rgba(255, 255, 255, .5)), var(--tint);
  border: 1px solid var(--tint-line); color: #2f373e;
  -webkit-backdrop-filter: var(--rf, blur(12px)) brightness(1.06) saturate(170%); backdrop-filter: var(--rf, blur(12px)) brightness(1.06) saturate(170%);
  box-shadow: inset 0 1.5px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .6), inset 0 -5px 7px -5px #fff,
              inset 5px 0 8px -6px var(--glow-l), inset -5px 0 8px -6px var(--glow-r), 0 0 0 1px rgba(18, 28, 60, .07), 0 8px 14px -9px var(--tint-shadow);
}
.chip { display: inline-flex; align-items: center; min-height: 28px; padding: 0 .75rem; border-radius: 999px; font-size: .84rem; font-weight: 600; white-space: nowrap; }
/* flagged and dismissed are both red */
.chip-flagged, .chip-dismissed { --tint: rgba(238, 70, 90, .22); --tint-line: rgba(217, 44, 63, .38); --tint-shadow: rgba(217, 44, 63, .55); --glow-l: rgba(255, 110, 130, .75); --glow-r: rgba(255, 150, 110, .6); color: #951424; }
.chip-ok { --tint: rgba(50, 190, 110, .22); --tint-line: rgba(31, 138, 76, .4); --tint-shadow: rgba(31, 138, 76, .5); --glow-l: rgba(60, 210, 140, .7); --glow-r: rgba(90, 200, 220, .6); color: #145431; }
.chip-under_review, .chip-resolved { color: #2f373e; }

/* chart (content: solid bars) */
.bars { display: flex; gap: .6rem; align-items: flex-end; height: 190px; padding-top: 1.4rem; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: .3rem; }
.bar-col .tot { font: 600 .95rem var(--body); }
.bar {
  width: 100%; max-width: 54px; border-radius: 12px 12px 5px 5px; display: flex; flex-direction: column; overflow: hidden; min-height: 2px;
  background: linear-gradient(180deg, #c9ced4, #a9b0b8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 6px 12px -8px rgba(22, 44, 78, .5);
}
.bar .s { background: linear-gradient(180deg, #3c434a, #171b1f); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.legend { display: flex; gap: 1.25rem; margin-top: .9rem; font-size: .92rem; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; box-shadow: 0 0 0 1px rgba(18, 24, 30, .2); margin-right: .45rem; vertical-align: -1px; }

/* filters / pagination */
.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; margin-bottom: 1.4rem; }
.filters .field { margin: 0; min-width: 120px; flex: 1; }
/* Filter and Clear stay together: on a narrower screen they move to the next line as a pair */
.filter-actions { display: flex; gap: .75rem; align-items: flex-end; flex: none; }
/* a date stays whole and a time stays whole (a narrow column breaks only between them); a name reads on one line */
.nw { white-space: nowrap; }
/* laptops up to 1440 px wide: a little less room around each cell, so the whole table fits without scrolling */
@media (max-width: 1440px) {
  th, td { padding-left: .5rem; padding-right: .5rem; }
  a.rec { font-size: .82rem; padding: 0 .72rem; }
  td.actions { white-space: normal; width: auto; }   /* the buttons stack when the row is short of room */
}
@media (max-width: 1439px) {
}
/* narrower laptops: the least-needed column of a wide table steps aside (it is still on the record's own page) */
@media (max-width: 1439px) { th.opt, td.opt { display: none; } }
/* a date box is wide enough to show its whole date */
.filters .field:has(input[type=date]) { min-width: 150px; }
.pager { display: flex; gap: .5rem; align-items: center; justify-content: flex-end; margin-top: 1rem; }
.list-search .field { flex: 0 1 380px; }        /* the search on a long list of drivers or vehicles */

/* detail */
.detail { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.4rem; align-items: start; }
.evidence img { width: 100%; border-radius: 16px; display: block; box-shadow: 0 0 0 1px rgba(18, 24, 30, .12), 0 12px 24px -16px rgba(22, 44, 78, .6); }
.evidence video { border-radius: 16px !important; display: block; background: #0d0f10; }
.noimg { aspect-ratio: 16 / 10; display: grid; place-items: center; background: #f3f4f5; color: var(--muted); border-radius: 16px; text-align: center; padding: 1rem; box-shadow: inset 0 1px 3px rgba(18, 24, 30, .12); }
dl.facts-list { display: grid; grid-template-columns: 9rem 1fr; gap: .6rem 1rem; margin: 0; }
dl.facts-list dt { color: var(--muted); }
dl.facts-list dd { margin: 0; font-weight: 500; }
/* an instruction banner: content, tinted solid */
.step { background: rgba(240, 243, 247, .7); padding: .85rem 1.15rem; border-radius: var(--r-panel); margin-bottom: 1.1rem; font-weight: 500; border: 1px solid var(--surface-line); }
.quote { border-left: 3px solid rgba(18, 24, 30, .22); padding-left: .9rem; margin: .5rem 0 1rem; white-space: pre-wrap; }
.live-frame { width: 100%; aspect-ratio: 16 / 9; background: #0d0f10; border-radius: 18px; display: grid; place-items: center; color: #aab0b4; text-align: center; overflow: hidden; box-shadow: 0 0 0 1px rgba(18, 24, 30, .25), 0 16px 30px -20px rgba(22, 44, 78, .8); }
.live-frame img { width: 100%; height: 100%; object-fit: contain; }
/* the live feed: the glass player fills the frame; a note covers it while it connects */
.live-stage { position: relative; display: block; }
.live-stage .gplayer { position: absolute; inset: 0; border-radius: inherit; box-shadow: none; }
.live-stage .gplayer video { width: 100%; height: 100%; object-fit: contain; background: #0d0f10; }
.live-stage .live-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.live-stage.picture-only .gplayer { visibility: hidden; }
/* What covers the player follows the camera (live.js sets data-mode):
   offline: a still card, no player; loading / reconnecting: the glass activity indicator; playing: nothing */
.live-stage[data-mode=offline] .gplayer, .live-stage[data-mode=offline] .live-img { visibility: hidden; }
.live-stage[data-mode=loading] .gbig, .live-stage[data-mode=reconnecting] .gbig,
.live-stage[data-mode=offline] .gbig { opacity: 0; pointer-events: none; }
.live-stage[data-mode=loading] .gbar { opacity: 0; pointer-events: none; transition: opacity .3s var(--spring-smooth); }
.live-load, .live-off {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .9rem; z-index: 3;
  text-align: center; padding: 1rem; pointer-events: none; opacity: 0; visibility: hidden;
  transition: opacity .35s var(--spring-smooth), visibility 0s linear .35s;
}
.live-stage[data-mode=loading] .live-load, .live-stage[data-mode=reconnecting] .live-load,
.live-stage[data-mode=offline] .live-off { opacity: 1; visibility: visible; transition: opacity .35s var(--spring-smooth), visibility 0s; }
.live-load p {
  margin: 0; padding: .3rem .85rem; border-radius: 999px; color: #fff; font-weight: 600; font-size: .92rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
  background: linear-gradient(180deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .06)), rgba(20, 24, 30, .14);
  border: 1px solid rgba(255, 255, 255, .38);
  -webkit-backdrop-filter: var(--rf, blur(18px)) saturate(190%); backdrop-filter: var(--rf, blur(18px)) saturate(190%);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .6), 0 10px 22px -12px rgba(0, 0, 0, .7);
}
.live-stage[data-mode=loading] .live-load p { display: none; }      /* a plain wait needs no words */
/* Apple's activity indicator: twelve rounded spokes whose brightness runs round, on a disc of liquid glass
   like the play button */
.glass-spin {
  position: relative; width: 74px; height: 74px; border-radius: 50%; display: block;
  border: 1px solid rgba(255, 255, 255, .5);
  background: linear-gradient(180deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, .08)), rgba(20, 24, 30, .1);
  -webkit-backdrop-filter: var(--rf, blur(22px)) saturate(200%) brightness(1.1); backdrop-filter: var(--rf, blur(22px)) saturate(200%) brightness(1.1);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .8), inset 0 -10px 18px -12px rgba(255, 255, 255, .6),
              inset 10px 0 16px -12px rgba(150, 195, 255, .7), inset -10px 0 16px -12px rgba(255, 165, 205, .6),
              0 18px 34px -14px rgba(0, 0, 0, .7);
  animation: glass-in .5s var(--spring-bouncy) both;
}
.glass-spin i {
  position: absolute; left: calc(50% - 1.6px); top: calc(50% - 6px); width: 3.2px; height: 12px; border-radius: 2px;
  background: #fff; box-shadow: 0 0 2px rgba(0, 0, 0, .25);
  transform: rotate(calc(var(--i) * 30deg)) translateY(-12px);
  opacity: .2; animation: glass-spoke 1s linear infinite; animation-delay: calc(var(--i) * 1s / 12 - 1s);
}
@keyframes glass-spoke { 0% { opacity: 1; } 100% { opacity: .2; } }
/* offline: still, no spinner */
.live-off-card {
  display: grid; justify-items: center; gap: .35rem; padding: 1.3rem 1.8rem 1.2rem; border-radius: 26px; color: #e8ebee;
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03)), rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .35), inset 8px 0 14px -12px rgba(150, 195, 255, .6),
              inset -8px 0 14px -12px rgba(255, 165, 205, .5), 0 18px 34px -16px rgba(0, 0, 0, .8);
}
.live-off-card svg { opacity: .85; margin-bottom: .2rem; }
.live-off-title { margin: 0; font: 650 1.05rem var(--head, inherit); }
.live-off-sub { margin: 0; color: #aab0b6; font-size: .9rem; }
@media (prefers-reduced-motion: reduce) { .glass-spin i { animation-duration: 2s; } .glass-spin { animation: none; } }
@media (prefers-reduced-transparency: reduce) { .glass-spin, .live-load p { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(23, 27, 31, .85); } }
.live-info { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: 1rem; }
.live-details { font-size: .92rem; }
/* the camera and microphone status: the same glass pill, green when both are online, amber when one is
   reconnecting, red when neither is */
.status.devstat { white-space: normal; line-height: 1.35; }
.status.devstat.ok { --tint: rgba(50, 190, 110, .22); --tint-line: rgba(31, 138, 76, .4); --tint-shadow: rgba(31, 138, 76, .5); --glow-l: rgba(60, 210, 140, .7); --glow-r: rgba(90, 200, 220, .6); color: #145431; }
.status.devstat.ok .dot { background: var(--ok); animation: live 2.6s var(--spring-smooth) infinite; }
.status.devstat.warn { --tint: rgba(245, 170, 40, .22); --tint-line: rgba(196, 120, 10, .42); --tint-shadow: rgba(196, 120, 10, .5); --glow-l: rgba(255, 190, 80, .75); --glow-r: rgba(255, 140, 90, .6); color: #6b4300; }
.status.devstat.warn .dot { background: #e09a16; box-shadow: 0 0 0 3px rgba(224, 154, 22, .25); animation: warn-blink 1.6s var(--spring-smooth) infinite; }
.status.devstat.bad { --tint: rgba(238, 70, 90, .2); --tint-line: rgba(217, 44, 63, .38); --tint-shadow: rgba(217, 44, 63, .5); --glow-l: rgba(255, 110, 130, .75); --glow-r: rgba(255, 150, 110, .6); color: #951424; }
.status.devstat.bad .dot { background: #d92c3f; box-shadow: 0 0 0 3px rgba(217, 44, 63, .22); }
@keyframes warn-blink { 50% { opacity: .35; } }
/* the player's LIVE button: a red dot while watching live, grey (and clickable) when behind */
.glive { display: inline-flex; align-items: center; gap: .35rem; flex: none; border: 0; border-radius: 999px; padding: .25rem .6rem; font: 700 .78rem var(--body); letter-spacing: .06em; color: inherit; background: rgba(255, 255, 255, .16); cursor: pointer; transition: background .25s var(--spring-smooth), transform .4s var(--spring-bouncy); }
.glive:hover { background: rgba(255, 255, 255, .3); }
.glive:active { transform: scale(.9); }
.glive-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.glive.on { cursor: default; }
.glive.on .glive-dot { background: #ff3b30; box-shadow: 0 0 0 0 rgba(255, 59, 48, .6); animation: glive 1.8s var(--spring-smooth) infinite; }
@keyframes glive { 0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, .6); } 80%, 100% { box-shadow: 0 0 0 7px rgba(255, 59, 48, 0); } }
.gtime.gclock { min-width: 6.4em; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .glive.on .glive-dot, .status.devstat .dot { animation: none; } }
/* the live status is a small glass capsule, like the chips */
.status {
  display: inline-flex; align-items: center; gap: .15rem; min-height: 36px; padding: .3rem .95rem .3rem .8rem; border-radius: 999px;
  font-size: .9rem; font-weight: 600; cursor: default;
}
.status.on { --tint: rgba(50, 190, 110, .22); --tint-line: rgba(31, 138, 76, .4); --tint-shadow: rgba(31, 138, 76, .5); --glow-l: rgba(60, 210, 140, .7); --glow-r: rgba(90, 200, 220, .6); color: #145431; }
.status.on .dot { animation: live 2.6s var(--spring-smooth) infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(31, 138, 76, .5); } 70%, 100% { box-shadow: 0 0 0 8px rgba(31, 138, 76, 0); } }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #9aa0a4; margin-right: .45rem; box-shadow: 0 0 0 3px rgba(154, 160, 164, .22); }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(31, 138, 76, .22); }
/* Offline: the pill and its dot turn red, like the live page's "not running" pill. On the dashboard's Detector panel
   each line has the same dot: green with the signal going out while it is online, amber blinking while it
   reconnects, red when it is offline. */
.status.off { --tint: rgba(238, 70, 90, .2); --tint-line: rgba(217, 44, 63, .38); --tint-shadow: rgba(217, 44, 63, .5); --glow-l: rgba(255, 110, 130, .75); --glow-r: rgba(255, 150, 110, .6); color: #951424; }
.dot.off { background: #d92c3f; box-shadow: 0 0 0 3px rgba(217, 44, 63, .22); }
.dot.warn { background: #e09a16; box-shadow: 0 0 0 3px rgba(224, 154, 22, .25); animation: warn-blink 1.6s var(--spring-smooth) infinite; }
.dot.sig.on { animation: live 2.6s var(--spring-smooth) infinite; }
@media (prefers-reduced-motion: reduce) { .status.on .dot, .dot.sig.on, .dot.warn { animation: none; } }
code, .code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .92em; background: rgba(18, 24, 30, .07); padding: .15rem .45rem; border-radius: 8px; word-break: break-all; }

/* the zoom window (its base rules are in _zoom.html): a frosted backdrop, and glass controls like the player's:
   a capsule for zoom out / fit / zoom in, and a round close button */
/* the frosted backdrop fades in and out while the picture grows out of the page and back (_zoom.html) */
#zv::before { content: ""; position: absolute; inset: 0; background: rgba(12, 14, 17, .74);
  -webkit-backdrop-filter: var(--rf, blur(26px)) saturate(140%); backdrop-filter: var(--rf, blur(26px)) saturate(140%);
  opacity: 0; transition: opacity .38s var(--spring-smooth); }
#zv.shown::before { opacity: 1; }
#zv .zbar, #zv .hint, #zv .gbar { opacity: 0; transition: opacity .3s var(--spring-smooth); }
#zv.shown .zbar, #zv.shown .hint, #zv.shown .gbar { opacity: 1; transition-delay: .12s; }
#zv.closing .zbar, #zv.closing .hint, #zv.closing .gbar { transition-duration: .16s; transition-delay: 0s; }
#zv.closing { pointer-events: none; }
#zv .zgroup, #zv .zclose {
  display: flex; align-items: center; height: 46px; color: #fff; border: 1px solid rgba(255, 255, 255, .42);
  background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .07)), rgba(20, 24, 30, .12);
  -webkit-backdrop-filter: var(--rf, blur(22px)) saturate(200%) brightness(1.1); backdrop-filter: var(--rf, blur(22px)) saturate(200%) brightness(1.1);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .7), inset 0 -8px 14px -10px rgba(255, 255, 255, .5),
              inset 8px 0 14px -10px rgba(150, 195, 255, .6), inset -8px 0 14px -10px rgba(255, 165, 205, .5),
              0 14px 28px -14px rgba(0, 0, 0, .8);
}
#zv .zgroup { border-radius: 999px; padding: 0 4px; gap: 2px; }
#zv .zclose { width: 46px; justify-content: center; border-radius: 50%; cursor: pointer; padding: 0; }
#zv .zgroup button { height: 38px; min-width: 40px; padding: 0 .55rem; display: grid; place-items: center; border: 0; border-radius: 999px;
  background: transparent; color: inherit; font: 650 .92rem var(--body); cursor: pointer; transition: background .2s var(--spring-smooth), transform .3s var(--spring-bouncy); }
#zv .zgroup button:hover, #zv .zclose:hover { background-color: rgba(255, 255, 255, .2); }
#zv .zgroup button:focus-visible, #zv .zclose:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
#zv .zgroup button + button { position: relative; }
#zv .zgroup button + button::before { content: ""; position: absolute; left: -1px; top: 11px; bottom: 11px; width: 1px; background: rgba(255, 255, 255, .28); }
@media (prefers-reduced-transparency: reduce) { #zv::before { background: rgba(12, 14, 17, .94); -webkit-backdrop-filter: none; backdrop-filter: none; } }

/* on/off settings: Apple-style switches of liquid glass (switch.js builds them and moves them with springs).
   --p is how far on the knob is (0..1), --lift how far it has risen into a glass lens (0..1). */
.check { align-items: center; cursor: pointer; }
.check .sw-input { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
.sw {
  --p: 0; --lift: 0;
  position: relative; flex: none; width: 52px; height: 32px; border-radius: 999px; cursor: pointer; touch-action: none;
  border: 1px solid rgba(18, 28, 60, .14);
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .08)), rgba(120, 128, 140, .24);
  -webkit-backdrop-filter: var(--rf, blur(8px)) saturate(160%); backdrop-filter: var(--rf, blur(8px)) saturate(160%);
  box-shadow: inset 0 1.5px 2px rgba(18, 24, 30, .14), inset 0 -1px 0 rgba(255, 255, 255, .7);
}
/* the green comes in with the knob */
.sw-fill {
  position: absolute; inset: -1px; border-radius: inherit; opacity: var(--p);
  background: linear-gradient(180deg, rgba(255, 255, 255, .32), rgba(255, 255, 255, 0) 60%), #34c759;
  box-shadow: inset 0 0 0 1px rgba(31, 138, 76, .35);
}
/* at rest a solid white knob; held, it becomes a clear lens of glass that the green shows through */
.sw-knob {
  position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 999px; transform-origin: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, calc(1 - .72 * var(--lift))), rgba(241, 244, 248, calc(1 - .8 * var(--lift))));
  -webkit-backdrop-filter: var(--rf,) blur(calc(var(--lift) * 3px)) saturate(calc(100% + var(--lift) * 80%)) brightness(calc(1 + var(--lift) * .12));
  backdrop-filter: var(--rf,) blur(calc(var(--lift) * 3px)) saturate(calc(100% + var(--lift) * 80%)) brightness(calc(1 + var(--lift) * .12));
  box-shadow: 0 0 0 .5px rgba(18, 24, 30, calc(.12 + .1 * var(--lift))),
              0 calc(3px + 5px * var(--lift)) calc(8px + 10px * var(--lift)) -2px rgba(18, 24, 30, calc(.32 + .1 * var(--lift))),
              inset 0 1.5px 0 rgba(255, 255, 255, .95),
              inset calc(5px * var(--lift)) 0 calc(7px * var(--lift)) calc(-4px * var(--lift)) rgba(150, 195, 255, .8),
              inset calc(-5px * var(--lift)) 0 calc(7px * var(--lift)) calc(-4px * var(--lift)) rgba(255, 165, 205, .7),
              inset 0 calc(-4px * var(--lift)) calc(6px * var(--lift)) calc(-3px * var(--lift)) rgba(255, 255, 255, .9);
  will-change: transform;
}
.sw-input:focus-visible + .sw { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (prefers-reduced-transparency: reduce) { .sw, .sw-knob { -webkit-backdrop-filter: none; backdrop-filter: none; } }

/* a form's save button gets a card of its own, like every other action */
.filters.filters-one .field { flex: 0 1 240px; }
.panel.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.panel.form-foot p { margin: 0; }
.live-off-btn { margin-top: .6rem; }
.live-off { pointer-events: none; }
.live-off .live-off-btn { pointer-events: auto; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 2.5rem; padding-bottom: 2.5rem; border-radius: 30px; margin-top: 1.25rem; }
  .facts { grid-template-columns: 1fr; }
  .public-top { padding-left: 1rem; }
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  /* the sidebar becomes a glass bar that stays at the top; the page scrolls under it */
  .nav-lens { top: 8px; height: auto; margin: 8px 8px 0; border-radius: 26px; }
  .main { grid-column: 1; grid-row: 2; }
  .side {
    top: 8px; z-index: 30; height: auto; margin: 8px 8px 0; padding: .6rem .6rem .55rem; border-radius: 26px;
    display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .45rem .5rem;
  }
  .side .brand { padding: 0 .5rem; font-size: 1.2rem; }
  .side .btn.brand-pill { min-height: 40px; margin: 0; padding: .2rem .85rem .2rem .25rem; font-size: 1.2rem; justify-self: start; }
  .side nav { grid-column: 1 / -1; flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .side nav::-webkit-scrollbar { display: none; }
  .side nav a { white-space: nowrap; padding: .45rem .8rem; gap: .5rem; }
  .side-foot { grid-column: 2; grid-row: 1; margin: 0; padding: 0; border: 0; }
  .side-foot > div { display: none; }
  .side-foot .btn { width: auto; }
  .main { padding-top: 1rem; }
  .cols, .detail { grid-template-columns: minmax(0, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ---------- menu icons: each one plays a short move that matches what it shows ----------
   glass.js adds .ico-play to the item you press (and, on the next page, to the item that is now current). */
.ico * { transform-box: fill-box; transform-origin: center; }
.ico .i-loop, .ico .i-drive { transform-box: view-box; }
.ico .i-knob { fill: #fbfcfd; }
.ico-play .i-t1, .ico-play .i-t2, .ico-play .i-t3, .ico-play .i-t4 { animation: ico-tile .62s linear both; }
.ico-play .i-t2 { animation-delay: .07s; } .ico-play .i-t3 { animation-delay: .14s; } .ico-play .i-t4 { animation-delay: .21s; }
@keyframes ico-tile { 0% { transform: scale(1); } 3.704% { transform: scale(0.784); } 7.407% { transform: scale(0.64); } 11.111% { transform: scale(0.565); } 14.815% { transform: scale(0.552); } 18.519% { transform: scale(0.587); } 22.222% { transform: scale(0.657); } 25.926% { transform: scale(0.745); } 29.63% { transform: scale(0.839); } 33.333% { transform: scale(0.928); } 37.037% { transform: scale(1.004); } 40.741% { transform: scale(1.062); } 44.444% { transform: scale(1.101); } 48.148% { transform: scale(1.12); } 51.852% { transform: scale(1.123); } 55.556% { transform: scale(1.113); } 59.259% { transform: scale(1.093); } 62.963% { transform: scale(1.069); } 66.667% { transform: scale(1.043); } 70.37% { transform: scale(1.018); } 74.074% { transform: scale(0.998); } 77.778% { transform: scale(0.982); } 81.481% { transform: scale(0.972); } 85.185% { transform: scale(0.967); } 88.889% { transform: scale(0.966); } 92.593% { transform: scale(0.969); } 96.296% { transform: scale(0.975); } 100% { transform: none; } }
.ico-play .i-warn { transform-origin: 50% 92%; animation: ico-warn .7s linear both; }
@keyframes ico-warn { 0% { transform: rotate(0deg); } 3.704% { transform: rotate(-11.243deg); } 7.407% { transform: rotate(-13.74deg); } 11.111% { transform: rotate(-8.122deg); } 14.815% { transform: rotate(0.672deg); } 18.519% { transform: rotate(7.085deg); } 22.222% { transform: rotate(8.14deg); } 25.926% { transform: rotate(4.485deg); } 29.63% { transform: rotate(-0.797deg); } 33.333% { transform: rotate(-4.433deg); } 37.037% { transform: rotate(-4.803deg); } 40.741% { transform: rotate(-2.451deg); } 44.444% { transform: rotate(0.709deg); } 48.148% { transform: rotate(2.757deg); } 51.852% { transform: rotate(2.822deg); } 55.556% { transform: rotate(1.323deg); } 59.259% { transform: rotate(-0.56deg); } 62.963% { transform: rotate(-1.704deg); } 66.667% { transform: rotate(-1.651deg); } 70.37% { transform: rotate(-0.704deg); } 74.074% { transform: rotate(0.414deg); } 77.778% { transform: rotate(1.048deg); } 81.481% { transform: rotate(0.962deg); } 85.185% { transform: rotate(0.367deg); } 88.889% { transform: rotate(-0.293deg); } 92.593% { transform: rotate(-0.641deg); } 96.296% { transform: rotate(-0.558deg); } 100% { transform: none; } }
.ico-play .i-bang { animation: ico-bang .7s linear both; }
@keyframes ico-bang { 0% { transform: translateY(0px); } 3.704% { transform: translateY(-0.575px); } 7.407% { transform: translateY(-0.961px); } 11.111% { transform: translateY(-1.16px); } 14.815% { transform: translateY(-1.195px); } 18.519% { transform: translateY(-1.101px); } 22.222% { transform: translateY(-0.916px); } 25.926% { transform: translateY(-0.68px); } 29.63% { transform: translateY(-0.429px); } 33.333% { transform: translateY(-0.191px); } 37.037% { transform: translateY(0.011px); } 40.741% { transform: translateY(0.166px); } 44.444% { transform: translateY(0.269px); } 48.148% { transform: translateY(0.321px); } 51.852% { transform: translateY(0.328px); } 55.556% { transform: translateY(0.3px); } 59.259% { transform: translateY(0.248px); } 62.963% { transform: translateY(0.183px); } 66.667% { transform: translateY(0.114px); } 70.37% { transform: translateY(0.049px); } 74.074% { transform: translateY(-0.006px); } 77.778% { transform: translateY(-0.048px); } 81.481% { transform: translateY(-0.075px); } 85.185% { transform: translateY(-0.089px); } 88.889% { transform: translateY(-0.09px); } 92.593% { transform: translateY(-0.082px); } 96.296% { transform: translateY(-0.067px); } 100% { transform: none; } }
.ico-play .i-loop { transform-origin: 12px 12px; animation: ico-spin .8s var(--spring-snappy) both; }
@keyframes ico-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.ico-play .i-cam { animation: ico-shutter .6s linear both; }
@keyframes ico-shutter { 0% { transform: scale(1, 1); } 3.704% { transform: scale(0.952, 0.923); } 7.407% { transform: scale(0.92, 0.872); } 11.111% { transform: scale(0.903, 0.845); } 14.815% { transform: scale(0.9, 0.841); } 18.519% { transform: scale(0.908, 0.853); } 22.222% { transform: scale(0.924, 0.878); } 25.926% { transform: scale(0.943, 0.909); } 29.63% { transform: scale(0.964, 0.943); } 33.333% { transform: scale(0.984, 0.974); } 37.037% { transform: scale(1.001, 1.002); } 40.741% { transform: scale(1.014, 1.022); } 44.444% { transform: scale(1.022, 1.036); } 48.148% { transform: scale(1.027, 1.043); } 51.852% { transform: scale(1.027, 1.044); } 55.556% { transform: scale(1.025, 1.04); } 59.259% { transform: scale(1.021, 1.033); } 62.963% { transform: scale(1.015, 1.024); } 66.667% { transform: scale(1.009, 1.015); } 70.37% { transform: scale(1.004, 1.007); } 74.074% { transform: scale(0.999, 0.999); } 77.778% { transform: scale(0.996, 0.994); } 81.481% { transform: scale(0.994, 0.99); } 85.185% { transform: scale(0.993, 0.988); } 88.889% { transform: scale(0.992, 0.988); } 92.593% { transform: scale(0.993, 0.989); } 96.296% { transform: scale(0.994, 0.991); } 100% { transform: none; } }
.ico-play .i-flap { transform-box: view-box; transform-origin: 15.5px 12px; animation: ico-flap .6s linear both; }
@keyframes ico-flap { 0% { transform: rotate(0deg); } 3.704% { transform: rotate(-12.849deg); } 7.407% { transform: rotate(-15.703deg); } 11.111% { transform: rotate(-9.282deg); } 14.815% { transform: rotate(0.768deg); } 18.519% { transform: rotate(8.097deg); } 22.222% { transform: rotate(9.303deg); } 25.926% { transform: rotate(5.125deg); } 29.63% { transform: rotate(-0.911deg); } 33.333% { transform: rotate(-5.067deg); } 37.037% { transform: rotate(-5.489deg); } 40.741% { transform: rotate(-2.801deg); } 44.444% { transform: rotate(0.81deg); } 48.148% { transform: rotate(3.151deg); } 51.852% { transform: rotate(3.225deg); } 55.556% { transform: rotate(1.512deg); } 59.259% { transform: rotate(-0.64deg); } 62.963% { transform: rotate(-1.948deg); } 66.667% { transform: rotate(-1.887deg); } 70.37% { transform: rotate(-0.804deg); } 74.074% { transform: rotate(0.473deg); } 77.778% { transform: rotate(1.198deg); } 81.481% { transform: rotate(1.1deg); } 85.185% { transform: rotate(0.42deg); } 88.889% { transform: rotate(-0.335deg); } 92.593% { transform: rotate(-0.733deg); } 96.296% { transform: rotate(-0.638deg); } 100% { transform: none; } }
.ico-play .i-b1, .ico-play .i-b2, .ico-play .i-b3 { transform-origin: 50% 100%; animation: ico-bar .7s var(--spring-bouncy) both; }
.ico-play .i-b2 { animation-delay: .08s; } .ico-play .i-b3 { animation-delay: .16s; }
@keyframes ico-bar { from { transform: scaleY(.1); } to { transform: scaleY(1); } }
.ico-play .i-head { animation: ico-nod .6s linear both; }
@keyframes ico-nod { 0% { transform: translateY(0px); } 3.704% { transform: translateY(-1.151px); } 7.407% { transform: translateY(-1.921px); } 11.111% { transform: translateY(-2.319px); } 14.815% { transform: translateY(-2.39px); } 18.519% { transform: translateY(-2.202px); } 22.222% { transform: translateY(-1.832px); } 25.926% { transform: translateY(-1.36px); } 29.63% { transform: translateY(-0.857px); } 33.333% { transform: translateY(-0.383px); } 37.037% { transform: translateY(0.023px); } 40.741% { transform: translateY(0.333px); } 44.444% { transform: translateY(0.538px); } 48.148% { transform: translateY(0.642px); } 51.852% { transform: translateY(0.656px); } 55.556% { transform: translateY(0.601px); } 59.259% { transform: translateY(0.496px); } 62.963% { transform: translateY(0.366px); } 66.667% { transform: translateY(0.227px); } 70.37% { transform: translateY(0.098px); } 74.074% { transform: translateY(-0.012px); } 77.778% { transform: translateY(-0.096px); } 81.481% { transform: translateY(-0.151px); } 85.185% { transform: translateY(-0.177px); } 88.889% { transform: translateY(-0.18px); } 92.593% { transform: translateY(-0.164px); } 96.296% { transform: translateY(-0.134px); } 100% { transform: none; } }
.ico-play .i-body { transform-origin: 50% 100%; animation: ico-squash .6s linear both; }
@keyframes ico-squash { 0% { transform: scale(1, 1); } 3.704% { transform: scale(1.029, 0.942); } 7.407% { transform: scale(1.048, 0.904); } 11.111% { transform: scale(1.058, 0.884); } 14.815% { transform: scale(1.06, 0.88); } 18.519% { transform: scale(1.055, 0.89); } 22.222% { transform: scale(1.046, 0.908); } 25.926% { transform: scale(1.034, 0.932); } 29.63% { transform: scale(1.021, 0.957); } 33.333% { transform: scale(1.01, 0.981); } 37.037% { transform: scale(0.999, 1.001); } 40.741% { transform: scale(0.992, 1.017); } 44.444% { transform: scale(0.987, 1.027); } 48.148% { transform: scale(0.984, 1.032); } 51.852% { transform: scale(0.984, 1.033); } 55.556% { transform: scale(0.985, 1.03); } 59.259% { transform: scale(0.988, 1.025); } 62.963% { transform: scale(0.991, 1.018); } 66.667% { transform: scale(0.994, 1.011); } 70.37% { transform: scale(0.998, 1.005); } 74.074% { transform: scale(1, 0.999); } 77.778% { transform: scale(1.002, 0.995); } 81.481% { transform: scale(1.004, 0.992); } 85.185% { transform: scale(1.004, 0.991); } 88.889% { transform: scale(1.005, 0.991); } 92.593% { transform: scale(1.004, 0.992); } 96.296% { transform: scale(1.003, 0.993); } 100% { transform: none; } }
.ico-play .i-drive { animation: ico-drive .75s linear both; }
@keyframes ico-drive { 0% { transform: translateX(0); } 5.5% { transform: translateX(0.406px); } 11% { transform: translateX(1.625px); } 16.5% { transform: translateX(3.656px); } 22% { transform: translateX(6.5px); } 27.5% { transform: translateX(10.156px); } 33% { transform: translateX(14.625px); } 38.5% { transform: translateX(19.906px); } 44% { transform: translateX(26px); } 44.1% { transform: translateX(-26px); } 46.53% { transform: translateX(-24.001px); } 48.961% { transform: translateX(-19.392px); } 51.391% { transform: translateX(-13.861px); } 53.822% { transform: translateX(-8.559px); } 56.252% { transform: translateX(-4.147px); } 58.683% { transform: translateX(-0.897px); } 61.113% { transform: translateX(1.191px); } 63.543% { transform: translateX(2.282px); } 65.974% { transform: translateX(2.616px); } 68.404% { transform: translateX(2.447px); } 70.835% { transform: translateX(1.998px); } 73.265% { transform: translateX(1.444px); } 75.696% { transform: translateX(0.905px); } 78.126% { transform: translateX(0.451px); } 80.557% { transform: translateX(0.114px); } 82.987% { transform: translateX(-0.106px); } 85.417% { transform: translateX(-0.224px); } 87.848% { transform: translateX(-0.263px); } 90.278% { transform: translateX(-0.249px); } 92.709% { transform: translateX(-0.206px); } 95.139% { transform: translateX(-0.15px); } 97.57% { transform: translateX(-0.095px); } 100% { transform: translateX(-0.049px); } }
.ico-play .i-k1 { animation: ico-slide-l .8s linear both; }
.ico-play .i-k2 { animation: ico-slide-r .8s linear both; }
@keyframes ico-slide-l { 0% { transform: translateX(0px); } 3.704% { transform: translateX(-3.836px); } 7.407% { transform: translateX(-6.404px); } 11.111% { transform: translateX(-7.732px); } 14.815% { transform: translateX(-7.968px); } 18.519% { transform: translateX(-7.339px); } 22.222% { transform: translateX(-6.106px); } 25.926% { transform: translateX(-4.533px); } 29.63% { transform: translateX(-2.858px); } 33.333% { transform: translateX(-1.275px); } 37.037% { transform: translateX(0.076px); } 40.741% { transform: translateX(1.11px); } 44.444% { transform: translateX(1.794px); } 48.148% { transform: translateX(2.139px); } 51.852% { transform: translateX(2.187px); } 55.556% { transform: translateX(2.002px); } 59.259% { transform: translateX(1.655px); } 62.963% { transform: translateX(1.218px); } 66.667% { transform: translateX(0.758px); } 70.37% { transform: translateX(0.325px); } 74.074% { transform: translateX(-0.041px); } 77.778% { transform: translateX(-0.32px); } 81.481% { transform: translateX(-0.502px); } 85.185% { transform: translateX(-0.592px); } 88.889% { transform: translateX(-0.6px); } 92.593% { transform: translateX(-0.546px); } 96.296% { transform: translateX(-0.448px); } 100% { transform: none; } }
@keyframes ico-slide-r { 0% { transform: translateX(0px); } 3.704% { transform: translateX(3.836px); } 7.407% { transform: translateX(6.404px); } 11.111% { transform: translateX(7.732px); } 14.815% { transform: translateX(7.968px); } 18.519% { transform: translateX(7.339px); } 22.222% { transform: translateX(6.106px); } 25.926% { transform: translateX(4.533px); } 29.63% { transform: translateX(2.858px); } 33.333% { transform: translateX(1.275px); } 37.037% { transform: translateX(-0.076px); } 40.741% { transform: translateX(-1.11px); } 44.444% { transform: translateX(-1.794px); } 48.148% { transform: translateX(-2.139px); } 51.852% { transform: translateX(-2.187px); } 55.556% { transform: translateX(-2.002px); } 59.259% { transform: translateX(-1.655px); } 62.963% { transform: translateX(-1.218px); } 66.667% { transform: translateX(-0.758px); } 70.37% { transform: translateX(-0.325px); } 74.074% { transform: translateX(0.041px); } 77.778% { transform: translateX(0.32px); } 81.481% { transform: translateX(0.502px); } 85.185% { transform: translateX(0.592px); } 88.889% { transform: translateX(0.6px); } 92.593% { transform: translateX(0.546px); } 96.296% { transform: translateX(0.448px); } 100% { transform: none; } }

/* ---------- media players: a glass bar over the video, a glass capsule for the sound ----------
   player.js replaces the browser's own controls. Over the video the bar is clear glass with white controls and
   fades away while the clip plays; for sound it is the same capsule as a button. */
.gplayer { position: relative; border-radius: 16px; outline: none; }
.gplayer:focus-visible { box-shadow: 0 0 0 3px var(--focus-halo); }
.gplayer.video { background: #0d0f10; overflow: hidden; box-shadow: 0 0 0 1px rgba(18, 24, 30, .12), 0 12px 24px -16px rgba(22, 44, 78, .6); }
.gplayer video { display: block; width: 100%; border-radius: 0 !important; cursor: pointer; }
/* Each glass piece over a video, and the video itself, get a graphics layer of their own. The frosted glass then
   always blurs one whole picture of the video: a hover that redraws part of the screen can no longer leave a
   band of old picture behind a piece (the marks graphics cards made at their 256-pixel tile edges). */
.gplayer video, #zv .item { will-change: transform; }
.gplayer.video .gseg, .gplayer.video .gbar > .gbtn, .gplayer.video .gbig, #zv .gseg, #zv .gbar > .gbtn { will-change: transform; }
.gplayer audio { display: none; }
.gplayer.video:fullscreen { border-radius: 0; display: grid; place-items: center; }
.gplayer.video:fullscreen video { max-height: 100vh; height: 100%; object-fit: contain; }
/* while it grows to full screen or shrinks back (player.js), the controls step aside and the black fades in */
.gplayer.morphing .gbar > *, .gplayer.morphing .gbig { opacity: 0 !important; transition: none !important; }
.gplayer.video:fullscreen::backdrop { background: #000; animation: fs-backdrop .4s ease both; }
@keyframes fs-backdrop { from { opacity: 0; } }

/* The controls are separate pieces of glass (Apple's Liquid Glass player): a round play button, a capsule
   with the times and the scrubber, a capsule for the volume, a round full-screen button. The bar that holds
   them is invisible. Over the video the pieces are clear frosted glass with white icons; for the sound
   player on the page they are light glass with dark icons. */
.gbar {
  --gfg: var(--ink); --gtrack: rgba(18, 24, 30, .16); --gfill: #171b1f;
  display: flex; align-items: center; gap: .55rem; min-height: 48px; padding: 0;
  color: var(--gfg); font: 600 .86rem var(--body); font-variant-numeric: tabular-nums;
  background: none; border: 0; box-shadow: none;
}
.gseg, .gbar > .gbtn {
  height: 48px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .85);
  background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(234, 240, 248, .62));
  -webkit-backdrop-filter: var(--rf, blur(14px)) saturate(180%); backdrop-filter: var(--rf, blur(14px)) saturate(180%);
  box-shadow: inset 0 1.5px 0 #fff, inset 0 -7px 10px -8px rgba(255, 255, 255, .9),
              inset 7px 0 10px -8px rgba(90, 160, 255, .5), inset -7px 0 10px -8px rgba(255, 120, 170, .42),
              0 0 0 1px rgba(18, 28, 60, .08), 0 10px 18px -12px rgba(22, 44, 78, .45);
}
.gseg { display: flex; align-items: center; gap: .3rem; padding: 0 .7rem; }
.gseg-time { flex: 1; min-width: 0; }
.gseg.gvol { padding: 0 .55rem 0 .3rem; }
.gbar > .gbtn { width: 48px; }
.gbar > .gbtn svg { width: 20px; height: 20px; }
/* Apple's speaker (player.js speaker()): the waves ease in and out one by one with the volume; muted, they fold away
   and a slash is drawn across */
.gspk .w { transform-box: view-box; transform-origin: 9px 12px; transition: opacity .22s ease, transform .42s var(--spring-bouncy); }
.gspk .w2 { transition-delay: .03s; } .gspk .w3 { transition-delay: .06s; }
.gspk[data-level="0"] .w, .gspk[data-level="1"] .w2, .gspk[data-level="1"] .w3, .gspk[data-level="2"] .w3 { opacity: 0; transform: scale(.55); transition-delay: 0s; }
.gspk .slash, .gspk .cut { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .3s var(--spring-smooth); }
.gspk[data-level="0"] .slash, .gspk[data-level="0"] .cut { stroke-dashoffset: 0; }
/* muted, the speaker steps in to the middle of the button (with only its waves it sits left), as Apple's does */
.gspk .body { transition: translate .42s var(--spring-bouncy); }
.gspk[data-level="0"] .body { translate: 3px 0; }
@media (prefers-reduced-motion: reduce) { .gspk .w, .gspk .slash, .gspk .cut, .gspk .body { transition: none; } }
/* over the video (and in the enlarged view): clear frosted glass, white icons */
.gplayer.video .gbar, #zv .gbar { --gfg: #fff; --gtrack: rgba(255, 255, 255, .34); --gfill: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
.gplayer.video .gseg, .gplayer.video .gbar > .gbtn, #zv .gseg, #zv .gbar > .gbtn {
  border-color: rgba(255, 255, 255, .42);
  background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .08)), rgba(20, 24, 30, .1);
  -webkit-backdrop-filter: var(--rf, blur(18px)) saturate(190%) brightness(1.08); backdrop-filter: var(--rf, blur(18px)) saturate(190%) brightness(1.08);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .75), inset 0 -8px 14px -10px rgba(255, 255, 255, .5),
              inset 7px 0 12px -9px rgba(150, 195, 255, .6), inset -7px 0 12px -9px rgba(255, 165, 205, .5),
              0 12px 26px -12px rgba(0, 0, 0, .6);
}
.gplayer.video .gbar { position: absolute; left: 12px; right: 12px; bottom: 12px; }
/* Showing and hiding the controls, the way Apple's players do: the bar settles in with a soft fade and a small lift
   (a smooth spring, no bounce, no pieces flying about), stays while the pointer is on the picture, and fades away
   after a few still seconds. Each piece fades itself (not the bar as a whole), so its frosted glass stays frosted. */
.gplayer.video .gbar { transform-origin: 50% 100%; transition: transform .6s var(--spring-smooth); }
.gplayer.video .gbar > * { transition: opacity .45s var(--spring-smooth), color .3s var(--spring-smooth), background .3s var(--spring-smooth); }
.gplayer.video.idle .gbar { transform: translateY(6px) scale(.99); pointer-events: none; }
.gplayer.video.idle .gbar > * { opacity: 0; transition-duration: .6s, .3s, .3s; }
/* Adaptive glass: over a bright part of the picture a piece turns dark-on-light (player.js sets data-tone) */
.gseg, .gbar > .gbtn { color: var(--gfg); }
.gplayer.video .gseg[data-tone=light], .gplayer.video .gbar > .gbtn[data-tone=light], #zv .gseg[data-tone=light], #zv .gbar > .gbtn[data-tone=light] {
  --gfg: var(--ink); --gtrack: rgba(18, 24, 30, .22); --gfill: #171b1f; text-shadow: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .28)), rgba(255, 255, 255, .12);
}
.gtime { min-width: 2.6em; text-align: center; }
.gvol { display: flex; align-items: center; gap: .15rem; }

.gbtn {
  position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: inherit; cursor: pointer; transition: transform .4s var(--spring-bouncy), background .2s var(--spring-smooth);
}
.gseg .gbtn:hover { background: rgba(18, 24, 30, .08); }
.gplayer.video .gseg .gbtn:hover, #zv .gseg .gbtn:hover { background: rgba(255, 255, 255, .22); }
.gbar > .gbtn:hover { background: linear-gradient(180deg, #fff, rgba(240, 245, 251, .8)); }
.gplayer.video .gbar > .gbtn:hover, #zv .gbar > .gbtn:hover { background: linear-gradient(180deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .16)), rgba(20, 24, 30, .06); }
.gseg .gbtn:active { transform: scale(.86); transition-duration: .08s, .2s; }
.gbtn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* the scrubber and the volume slider (Apple: the knob is solid at rest and turns into Liquid Glass only while it is held) */
.gslider { --v: 0; position: relative; flex: 1; min-width: 0; height: 30px; cursor: pointer; touch-action: none; border-radius: 999px; outline: 0; user-select: none; -webkit-user-select: none; }
.gtrack { position: absolute; left: 13px; right: 13px; top: 12px; height: 6px; border-radius: 999px; background: var(--gtrack); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .18); overflow: hidden; }
.gfillbar { position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 100%); border-radius: inherit; background: var(--gfill); }
.gknob {
  position: absolute; top: 50%; left: calc(13px + (100% - 26px) * var(--v)); width: 26px; height: 16px; margin: -8px 0 0 -13px; border-radius: 999px;
  background: linear-gradient(180deg, #fff, #e9edf1); border: 1px solid rgba(18, 24, 30, .16);
  box-shadow: inset 0 1px 0 #fff, 0 2px 5px rgba(0, 0, 0, .3), 0 8px 12px -8px rgba(0, 0, 0, .5);
  transition: width .38s var(--spring-snappy), height .38s var(--spring-snappy), margin .38s var(--spring-snappy), background .22s var(--spring-smooth), border-color .22s var(--spring-smooth), box-shadow .3s var(--spring-smooth);
}
.gslider.held .gknob, .gslider:focus-visible .gknob {
  width: 46px; height: 30px; margin: -15px 0 0 -23px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .16)); border-color: rgba(255, 255, 255, .7);
  -webkit-backdrop-filter: var(--rf, blur(3px)) saturate(200%) brightness(1.08); backdrop-filter: var(--rf, blur(3px)) saturate(200%) brightness(1.08);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .95), inset 0 -2px 4px rgba(255, 255, 255, .45), inset 0 0 0 1px rgba(255, 255, 255, .25),
              0 6px 14px -4px rgba(0, 0, 0, .45), 0 1px 3px rgba(0, 0, 0, .25);
}
.knob-lens .gslider.held .gknob { -webkit-backdrop-filter: url(#rs-knob) blur(1px) saturate(200%) brightness(1.1); backdrop-filter: url(#rs-knob) blur(1px) saturate(200%) brightness(1.1); }
.gslider:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* pressed with the mouse or a finger: no keyboard focus ring (it comes back when the arrow keys are used) */
.gslider[data-pointer]:focus-visible { outline: none; }
.gslider:focus-visible:not(.held):not([data-pointer]) .gknob { width: 26px; height: 16px; margin: -8px 0 0 -13px; background: linear-gradient(180deg, #fff, #e9edf1); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: rgba(18, 24, 30, .16); box-shadow: inset 0 1px 0 #fff, 0 2px 5px rgba(0, 0, 0, .3); }
.gvol .gslider { width: 84px; flex: none; }

/* the big round glass play button in the middle of a paused video (icon only, like Apple's) */
.gbig {
  position: absolute; left: 50%; top: 46%; translate: -50% -50%; width: 78px; height: 78px; display: grid; place-items: center;
  padding: 0; border-radius: 50%; color: #fff; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .5);
  background: linear-gradient(180deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, .08)), rgba(20, 24, 30, .08);
  -webkit-backdrop-filter: var(--rf, blur(22px)) saturate(200%) brightness(1.1); backdrop-filter: var(--rf, blur(22px)) saturate(200%) brightness(1.1);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .8), inset 0 -10px 18px -12px rgba(255, 255, 255, .6),
              inset 10px 0 16px -12px rgba(150, 195, 255, .7), inset -10px 0 16px -12px rgba(255, 165, 205, .6),
              0 18px 34px -14px rgba(0, 0, 0, .7);
  transition: opacity .3s var(--spring-smooth), color .3s var(--spring-smooth), background .3s var(--spring-smooth);
}
.gbig svg { width: 32px; height: 32px; margin-left: 4px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
.gbig[data-tone=light] { color: var(--ink); background: linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .28)), rgba(255, 255, 255, .12); }
.gbig[data-tone=light] svg { filter: none; }
.gbig:hover { background: linear-gradient(180deg, rgba(255, 255, 255, .44), rgba(255, 255, 255, .14)), rgba(20, 24, 30, .06); }

.gplayer[data-playing="1"] .gbig { opacity: 0; pointer-events: none; }

@media (max-width: 560px) { .gvol .gslider { display: none; } .gbar { gap: .35rem; } .gseg, .gbar > .gbtn { height: 42px; } .gbar > .gbtn { width: 42px; } }
@media (prefers-reduced-motion: reduce) { .gbar, .gbtn, .gbig, .gknob { transition: none; } }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .gseg, .gbar > .gbtn, .gbig { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .gplayer.video .gseg, .gplayer.video .gbar > .gbtn, #zv .gseg, #zv .gbar > .gbtn, .gbig { background: rgba(23, 27, 31, .9); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .gplayer.video .gseg, .gplayer.video .gbar > .gbtn, #zv .gseg, #zv .gbar > .gbtn, .gbig { background: rgba(23, 27, 31, .78); }
}

/* ---------- glass motion ---------- */
/* (messages spring in with glass-in, further down; the frosting itself is never animated: Chrome flickers) */
@keyframes rim-in { from { opacity: 0; } }
.flash::before { animation: rim-in .95s var(--spring-smooth) backwards; }
/* A touch sends a wave of light out from the exact point of contact. A sidebar tab and an appearance choice hold
   their wave in a layer of their own rounded shape (glass.js), so it never spills onto the glass around them. */
.wave-clip { position: absolute; inset: 0; z-index: -1; border-radius: inherit; overflow: hidden; pointer-events: none; }
.appearance button { isolation: isolate; }
.btn .wave, .wave-clip .wave {
  position: absolute; left: var(--wx, 50%); top: var(--wy, 50%); width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(circle, rgba(255, 255, 255, .95) 0 35%, rgba(18, 24, 30, .09) 55%, rgba(18, 24, 30, 0) 72%);
  animation: wave .75s var(--spring-smooth) forwards;
}
.btn[data-tone=dark] .wave { background: radial-gradient(circle, rgba(255, 255, 255, .6) 0 35%, rgba(255, 255, 255, .2) 55%, rgba(255, 255, 255, 0) 72%); }
@keyframes wave { from { transform: scale(0); opacity: .95; } to { transform: scale(16); opacity: 0; } }
/* The top bar tucks away when you scroll down and springs back when you scroll up (glass.js sets data-chrome). */
.public-top { transition: transform .6s var(--spring-bouncy); }
html[data-chrome=away] .public-top { transform: translateY(calc(-100% - 28px)); }
@media (max-width: 900px) {
  .side, .nav-lens { transition: transform .6s var(--spring-bouncy); }
  html[data-chrome=away] .side, html[data-chrome=away] .nav-lens { transform: translateY(calc(-100% - 20px)); }
}

/* ---------- when glass is not available or not wanted ---------- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: rgba(255, 255, 255, .92); --glass-strong: rgba(255, 255, 255, .96); }
  .side, .public-top, .flash { background: rgba(246, 247, 249, .96); }
  .btn, button.zoombtn { background: rgba(255, 255, 255, .92); }
  input, select, textarea { background-color: #fff; }
  .panel, .stat, .facts > div, .page-head, .hero, .auth-card { background: rgba(255, 255, 255, .93); }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  :root { --glass: rgba(255, 255, 255, .96); --glass-strong: #fff; --line: rgba(18, 24, 30, .25); --muted: #2e363e; }
  .side, .public-top, .flash, .btn, button.zoombtn, select { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .side, .public-top { background: rgba(250, 250, 251, .97); }
  .panel, .stat, .facts > div, .page-head, .hero, .auth-card { border-color: rgba(18, 24, 30, .3); background: #fff; }
  .stat.alert { background: #fff6f7; }
  body::before { opacity: .35; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  @view-transition { navigation: none; }
}
@media print {
  body { background: #fff; }
  body::before { display: none; }
  .side, .public-top, .nav-lens { display: none; }
  .shell { display: block; }
  .panel, .stat, .page-head { box-shadow: none; border: 1px solid #bbb; background: #fff; }
}

/* ---------- account links, notices, temporary password ---------- */
/* you, at the foot of the sidebar: a glass pill (name, role, a person icon that nods when pressed, a chevron) */
.who-wrap { margin-bottom: .7rem; }
.side-foot .btn.who-pill {
  justify-content: flex-start; gap: .55rem; min-height: 52px; padding: .35rem .8rem .35rem .45rem; text-align: left; font-weight: 500;
}
.who-ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(220, 230, 244, .55)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9), 0 1px 3px rgba(18, 28, 60, .12); }
.who-ico svg { overflow: visible; }
.who-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.side-foot .who-pill .who { font-weight: 650; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: normal; }
.side-foot .who-pill .role { margin: 0; font-size: .8rem; color: var(--muted); }
html[data-theme=dark] .who-ico { background: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .06)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
/* on a phone or tablet the sidebar is a bar along the top: you become a round person button beside Log out (as an
   app keeps the account button in its top corner), so the account page (an administrator's My account, a driver's
   Profile) is still one tap away */
@media (max-width: 900px) {
  .side-foot { display: flex; align-items: center; gap: .4rem; }
  .side-foot > .who-wrap { display: block; margin: 0; }
  .side-foot .btn.who-pill { width: 40px; height: 40px; min-height: 0; padding: 0; justify-content: center; border-radius: 50%; }
  .side-foot .who-pill .who-text { display: none; }
  .side-foot .who-pill .who-ico { width: 30px; height: 30px; background: none; box-shadow: none; }
}
.notice { margin: 0 0 1rem; padding: .75rem 1rem; border-radius: 16px; color: var(--ink);
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.25));
  box-shadow: inset 0 1.5px 0 #fff, inset 0 0 0 1px rgba(255,255,255,.5), 0 6px 18px rgba(20,30,50,.08);
  backdrop-filter: var(--rf, blur(10px)) saturate(1.4); -webkit-backdrop-filter: var(--rf, blur(10px)) saturate(1.4); }
.temp-pass { display: inline-block; padding: .55rem 1rem; border-radius: 14px; user-select: all;
  background: rgba(255,255,255,.55); box-shadow: inset 0 1.5px 0 #fff, inset 0 0 0 1px rgba(255,255,255,.55); }

/* ---------- confirm dialog (asked inside the page, never with the browser's pop-up) ---------- */
dialog.rs-confirm { border: 0; padding: 0; background: transparent; width: min(92vw, 430px); max-width: none; color: var(--ink); overflow: visible; }
dialog.rs-confirm::backdrop { background: rgba(14, 20, 32, .30); -webkit-backdrop-filter: var(--rf, blur(10px)) saturate(1.2); backdrop-filter: var(--rf, blur(10px)) saturate(1.2); }
.rs-confirm-card {
  position: relative; padding: 1.7rem 1.7rem 1.4rem; border-radius: 30px;
  background:
    radial-gradient(120% 90% at 0% 50%, rgba(10, 132, 255, .12), transparent 55%),
    radial-gradient(120% 90% at 100% 50%, rgba(255, 69, 140, .10), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .66));
  -webkit-backdrop-filter: var(--rf, blur(26px)) saturate(1.7); backdrop-filter: var(--rf, blur(26px)) saturate(1.7);
  box-shadow: inset 0 1.5px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .65), 0 34px 80px rgba(18, 28, 48, .30), 0 6px 18px rgba(18, 28, 48, .12);
}
dialog.rs-confirm.open .rs-confirm-card { transform-origin: var(--ox, 50%) var(--oy, 50%); animation: rs-pop .6s var(--spring-bouncy) backwards; }
@keyframes rs-pop { from { opacity: 0; transform: scale(.25); } to { opacity: 1; transform: none; } }
/* Cancel: the card shrinks back into the button it came from, and the dimming lifts */
dialog.rs-confirm.closing { pointer-events: none; }
dialog.rs-confirm.closing .rs-confirm-card { transform-origin: var(--ox, 50%) var(--oy, 50%); animation: rs-back .34s var(--spring-smooth) forwards; }
dialog.rs-confirm.closing::backdrop { animation: rs-dim-out .34s var(--spring-smooth) forwards; }
@keyframes rs-back { to { opacity: 0; transform: scale(.2); } }
/* Confirm (Delete, Deactivate...): the chosen button stays lit and pressed in, the card fades and settles back a
   little, as an Apple alert goes, and the dimming lifts */
dialog.rs-confirm.confirming { pointer-events: none; }
dialog.rs-confirm.confirming .rs-confirm-card { transform-origin: 50% 50%; animation: rs-dismiss .25s cubic-bezier(.3, 0, .7, .2) forwards; }
dialog.rs-confirm.confirming::backdrop { animation: rs-dim-out .3s var(--spring-smooth) forwards; }
@keyframes rs-dismiss { 0% { opacity: 1; transform: none; } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(.9); } }
.rs-confirm .btn.rs-chosen { scale: .95; filter: brightness(1.06) saturate(1.2); transition: scale .18s var(--spring-snappy), filter .18s ease; }
@keyframes rs-dim-out { to { opacity: 0; } }
.rs-confirm-title { margin: 0 0 .5rem; font-size: 1.3rem; }
.rs-confirm-text { margin: 0 0 1.4rem; color: var(--muted); line-height: 1.5; }
.rs-confirm-actions { display: flex; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; }
.btn.rs-confirm-danger { background: linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(255, 214, 218, .75)); }
.btn.rs-confirm-go { background: linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(205, 226, 255, .8)); }
.setup-links { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
@media (prefers-reduced-motion: reduce) { dialog.rs-confirm.open .rs-confirm-card { animation: none; } }

/* ---------- text boxes: liquid glass, like the controls ----------
   Translucent, with the bright rim on top, the faint blue and pink side light, and a soft shadow under them.
   Focus brightens the glass and adds a faint grey halo. */
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date],
input[type=url], input[type=number], input[type=search], textarea {
  border: 1px solid rgba(255, 255, 255, .75); border-radius: 999px; padding: .55rem 1.15rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(232, 238, 246, .46));
  -webkit-backdrop-filter: var(--rf, blur(12px)) saturate(170%) brightness(1.06); backdrop-filter: var(--rf, blur(12px)) saturate(170%) brightness(1.06);
  box-shadow: inset 0 1.5px 0 #fff, inset 0 2px 6px rgba(18, 28, 48, .06),
              inset 7px 0 10px -8px rgba(90, 160, 255, .45), inset -7px 0 10px -8px rgba(255, 120, 170, .38),
              0 0 0 1px rgba(18, 28, 60, .07), 0 10px 18px -12px rgba(22, 44, 78, .38);
  transition: background .25s var(--spring-smooth), box-shadow .25s var(--spring-smooth), border-color .25s var(--spring-smooth), transform .4s var(--spring-bouncy);
}
textarea { border-radius: 22px; }
input[type=text]:hover, input[type=email]:hover, input[type=password]:hover, input[type=tel]:hover, input[type=date]:hover,
input[type=url]:hover, input[type=number]:hover, input[type=search]:hover, textarea:hover {
  border-color: rgba(255, 255, 255, .95);
  background: linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(236, 241, 248, .56));
}
input[type=text]:focus, input[type=email]:focus, input[type=password]:focus, input[type=tel]:focus, input[type=date]:focus,
input[type=url]:focus, input[type=number]:focus, input[type=search]:focus, textarea:focus, input.cal-open {
  outline: none; border-color: rgba(255, 255, 255, .95);
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(244, 248, 253, .78));
  box-shadow: inset 0 1.5px 0 #fff, inset 7px 0 10px -8px rgba(90, 160, 255, .5), inset -7px 0 10px -8px rgba(255, 120, 170, .4),
              0 12px 22px -12px rgba(22, 44, 78, .45);   /* (no grey ring: the field brightens, and the caret shows) */
}
/* Chrome paints remembered entries pale yellow or blue: keep them glass */
input:-webkit-autofill, input:autofill { transition: background-color 600000s var(--spring-smooth) 0s, color 600000s var(--spring-smooth) 0s; -webkit-text-fill-color: var(--ink); }
.otp, input.code { border-radius: 18px; }

/* ---------- glass calendar (calendar.js) ---------- */
.cal-wrap { position: relative; display: block; }
.cal-wrap > input { padding-left: 1rem; padding-right: 2.7rem; }
input.has-cal::-webkit-calendar-picker-indicator { display: none; }
/* no blue highlight on the day, month or year part when the pill is clicked or long-pressed (calendar.js keeps the
   mouse from focusing those parts; this stops text selection) */
input.has-cal { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; cursor: pointer; }
/* the calendar icon is part of the pill: no circle, it just plays a short move when the pill is clicked */
.cal-ico {
  position: absolute; right: 1rem; top: 50%; margin-top: -9px; width: 18px; height: 18px; pointer-events: none;
  color: var(--ink); opacity: .75; transition: opacity .2s var(--spring-smooth);
}
.cal-ico svg { display: block; transform-origin: 50% 60%; }
.cal-wrap:hover .cal-ico, input.cal-open + .cal-ico { opacity: 1; }
.cal-ico.ico-play svg { animation: cal-ring .62s linear both; }
.cal-ico.ico-play .cal-dot { animation: cal-pop .62s var(--spring-bouncy) both; transform-box: fill-box; transform-origin: center; }
@keyframes cal-ring { 0% { transform: rotate(0deg) scale(1); } 3.704% { transform: rotate(-11.243deg) scale(0.92); } 7.407% { transform: rotate(-13.74deg) scale(0.902); } 11.111% { transform: rotate(-8.122deg) scale(0.942); } 14.815% { transform: rotate(0.672deg) scale(1.005); } 18.519% { transform: rotate(7.085deg) scale(1.051); } 22.222% { transform: rotate(8.14deg) scale(1.058); } 25.926% { transform: rotate(4.485deg) scale(1.032); } 29.63% { transform: rotate(-0.797deg) scale(0.994); } 33.333% { transform: rotate(-4.433deg) scale(0.968); } 37.037% { transform: rotate(-4.803deg) scale(0.966); } 40.741% { transform: rotate(-2.451deg) scale(0.982); } 44.444% { transform: rotate(0.709deg) scale(1.005); } 48.148% { transform: rotate(2.757deg) scale(1.02); } 51.852% { transform: rotate(2.822deg) scale(1.02); } 55.556% { transform: rotate(1.323deg) scale(1.009); } 59.259% { transform: rotate(-0.56deg) scale(0.996); } 62.963% { transform: rotate(-1.704deg) scale(0.988); } 66.667% { transform: rotate(-1.651deg) scale(0.988); } 70.37% { transform: rotate(-0.704deg) scale(0.995); } 74.074% { transform: rotate(0.414deg) scale(1.003); } 77.778% { transform: rotate(1.048deg) scale(1.007); } 81.481% { transform: rotate(0.962deg) scale(1.007); } 85.185% { transform: rotate(0.367deg) scale(1.003); } 88.889% { transform: rotate(-0.293deg) scale(0.998); } 92.593% { transform: rotate(-0.641deg) scale(0.995); } 96.296% { transform: rotate(-0.558deg) scale(0.996); } 100% { transform: none; } }
@keyframes cal-pop { from { transform: scale(0); } to { transform: scale(1); } }

.cal[popover] {
  position: fixed; inset: auto; margin: 0; width: 308px; padding: 14px 14px 10px; overflow: visible; color: var(--ink);
  border: 1px solid rgba(255, 255, 255, .8); border-radius: var(--r-pop);
  background: linear-gradient(160deg, rgba(244, 248, 253, .8), rgba(226, 234, 246, .62));
  -webkit-backdrop-filter: var(--rf, blur(28px)) saturate(170%); backdrop-filter: var(--rf, blur(28px)) saturate(170%);
  box-shadow: inset 0 1.5px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .55), inset 8px 0 14px -10px rgba(120, 190, 255, .55), inset -8px 0 14px -10px rgba(255, 150, 190, .45),
              0 28px 54px -20px rgba(22, 44, 78, .55), 0 2px 8px -2px rgba(22, 44, 78, .16);
  font: 400 1rem var(--body);
  opacity: 0; transform: scale(.9, .6);
  transition: opacity .2s var(--spring-smooth), transform .2s var(--spring-bouncy), display .2s var(--spring-smooth) allow-discrete, overlay .2s var(--spring-smooth) allow-discrete;
}
.cal[popover]:popover-open {
  opacity: 1; transform: none;
  transition: opacity .2s var(--spring-smooth), transform .6s var(--spring-bouncy), display .2s var(--spring-smooth) allow-discrete, overlay .2s var(--spring-smooth) allow-discrete;
}
@starting-style { .cal[popover]:popover-open { opacity: 0; transform: scale(.9, .6); } }
.cal::backdrop { background: transparent; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: 8px; }
.cal-title { font-weight: 650; font-size: 1.02rem; text-align: center; flex: 1; }
.cal-nav {
  width: 34px; height: 34px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; cursor: pointer; color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4) 55%, rgba(255, 255, 255, .62));
  box-shadow: inset 0 1.5px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .85), 0 0 0 1px rgba(18, 28, 60, .07), 0 8px 14px -9px rgba(22, 44, 78, .5);
  transition: transform .4s var(--spring-bouncy);
}
.cal-nav:hover { background: linear-gradient(180deg, #fff, rgba(255, 255, 255, .6)); }

.cal-nav:focus-visible, .cal-btn-text:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: .74rem; font-weight: 650; color: var(--muted); margin: 0 0 4px; letter-spacing: .02em; }
.cal-body { position: relative; }
.cal-grid { position: relative; z-index: 1; }
.cal-row { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-day {
  position: relative; height: 38px; border: 0; padding: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font: 500 .95rem var(--body); color: var(--ink); font-variant-numeric: tabular-nums;
  transition: background .2s var(--spring-smooth), color .2s var(--spring-smooth), transform .35s var(--spring-bouncy);
}
.cal-day:hover { background: rgba(255, 255, 255, .5); }
.cal-day:active { transform: scale(.9); }
.cal-day.out { color: rgba(18, 24, 30, .34); }
.cal-day:disabled { color: rgba(18, 24, 30, .2); cursor: not-allowed; background: transparent; }
.cal-day.today { color: #0a6fd6; font-weight: 700; }
.cal-day.today::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.cal-day.chosen { font-weight: 700; }
.cal-day:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.cal-day:focus:not(:focus-visible) { outline: none; }
.cal-lens {
  position: absolute; left: 0; top: 0; width: 38px; height: 38px; z-index: 0; border-radius: 999px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .38) 55%, rgba(255, 255, 255, .66));
  box-shadow: inset 0 1.5px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .85), inset 0 -6px 9px -7px #fff,
              inset 6px 0 9px -7px rgba(120, 190, 255, .75), inset -6px 0 9px -7px rgba(255, 150, 190, .65),
              0 0 0 1px rgba(10, 20, 60, .06), 0 10px 16px -8px rgba(22, 44, 78, .55);
  transform-origin: 50% 50%; will-change: transform;
  transition: opacity .2s var(--spring-smooth);                   /* the movement itself is spring physics in calendar.js */
}
.cal-lens.hidden { opacity: 0; }
.cal-day.goal { font-weight: 700; }
.cal.dragging, .cal.dragging .cal-day { cursor: grabbing; -webkit-user-select: none; user-select: none; }
.cal.dragging .cal-day:hover { background: transparent; }
.cal-day { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.cal-foot { display: flex; justify-content: space-between; margin-top: 6px; }
.cal-btn-text {
  border: 0; background: transparent; padding: .45rem .95rem; border-radius: 999px; cursor: pointer;
  font: 600 .9rem var(--body); color: #0a6fd6; transition: background .2s var(--spring-smooth), transform .35s var(--spring-bouncy);
}
.cal-btn-text:hover { background: rgba(255, 255, 255, .6); }

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  input, textarea, .cal[popover] { -webkit-backdrop-filter: none; backdrop-filter: none; }
  input, textarea { background: #fff; }
  .cal[popover] { background: #fbfcfd; }
}

/* ---------- dropdown icons (select.js adds them; drawn and animated like the sidebar's) ---------- */
select.has-icons > button.sel-btn { all: unset; display: flex; align-items: center; flex: 1; min-width: 0; cursor: inherit; }
select.has-icons selectedcontent { display: flex; align-items: center; gap: .6rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
select .opt-ico { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; }
select .opt-ico .ico { opacity: .7; transition: opacity .2s var(--spring-smooth); }
select option:checked .opt-ico .ico, select option[data-goal] .opt-ico .ico, select option:hover .opt-ico .ico, selectedcontent .opt-ico .ico { opacity: 1; }
select.has-icons:has(> .sel-btn:focus-visible) { border-color: rgba(255, 255, 255, .95); box-shadow: 0 0 0 4px var(--focus-halo); }
/* the moves (the tiles, car, person and others reuse the sidebar's) */
.ico .i-needle { transform-box: view-box; transform-origin: 12px 17.5px; }
.ico-play .i-needle { animation: ico-needle .8s var(--spring-bouncy) both; }
@keyframes ico-needle { from { transform: rotate(-95deg); } to { transform: rotate(0); } }
.ico-play .i-w1, .ico-play .i-w2 { transform-origin: 0% 50%; animation: ico-wave .7s var(--spring-bouncy) both; }
.ico-play .i-w2 { animation-delay: .1s; }
@keyframes ico-wave { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
.ico-play .i-flag { transform-origin: 0% 50%; animation: ico-flag .75s linear both; }
@keyframes ico-flag { 0% { transform: skewY(0deg) scaleX(1); } 3.704% { transform: skewY(-7.228deg) scaleX(0.888); } 7.407% { transform: skewY(-8.833deg) scaleX(0.863); } 11.111% { transform: skewY(-5.221deg) scaleX(0.919); } 14.815% { transform: skewY(0.432deg) scaleX(1.007); } 18.519% { transform: skewY(4.554deg) scaleX(1.071); } 22.222% { transform: skewY(5.233deg) scaleX(1.081); } 25.926% { transform: skewY(2.883deg) scaleX(1.045); } 29.63% { transform: skewY(-0.513deg) scaleX(0.992); } 33.333% { transform: skewY(-2.85deg) scaleX(0.956); } 37.037% { transform: skewY(-3.088deg) scaleX(0.952); } 40.741% { transform: skewY(-1.576deg) scaleX(0.975); } 44.444% { transform: skewY(0.456deg) scaleX(1.007); } 48.148% { transform: skewY(1.772deg) scaleX(1.028); } 51.852% { transform: skewY(1.814deg) scaleX(1.028); } 55.556% { transform: skewY(0.851deg) scaleX(1.013); } 59.259% { transform: skewY(-0.36deg) scaleX(0.994); } 62.963% { transform: skewY(-1.096deg) scaleX(0.983); } 66.667% { transform: skewY(-1.062deg) scaleX(0.983); } 70.37% { transform: skewY(-0.452deg) scaleX(0.993); } 74.074% { transform: skewY(0.266deg) scaleX(1.004); } 77.778% { transform: skewY(0.674deg) scaleX(1.01); } 81.481% { transform: skewY(0.618deg) scaleX(1.01); } 85.185% { transform: skewY(0.236deg) scaleX(1.004); } 88.889% { transform: skewY(-0.188deg) scaleX(0.997); } 92.593% { transform: skewY(-0.412deg) scaleX(0.994); } 96.296% { transform: skewY(-0.359deg) scaleX(0.994); } 100% { transform: none; } }
.ico-play .i-scan { animation: ico-scan .8s linear both; }
@keyframes ico-scan { 0% { transform: translate(0px, 0px); } 3.704% { transform: translate(-1.927px, -0.803px); } 7.407% { transform: translate(-2.355px, -0.981px); } 11.111% { transform: translate(-1.392px, -0.58px); } 14.815% { transform: translate(0.115px, 0.048px); } 18.519% { transform: translate(1.214px, 0.506px); } 22.222% { transform: translate(1.395px, 0.581px); } 25.926% { transform: translate(0.769px, 0.32px); } 29.63% { transform: translate(-0.137px, -0.057px); } 33.333% { transform: translate(-0.76px, -0.317px); } 37.037% { transform: translate(-0.823px, -0.343px); } 40.741% { transform: translate(-0.42px, -0.175px); } 44.444% { transform: translate(0.122px, 0.051px); } 48.148% { transform: translate(0.473px, 0.197px); } 51.852% { transform: translate(0.484px, 0.202px); } 55.556% { transform: translate(0.227px, 0.095px); } 59.259% { transform: translate(-0.096px, -0.04px); } 62.963% { transform: translate(-0.292px, -0.122px); } 66.667% { transform: translate(-0.283px, -0.118px); } 70.37% { transform: translate(-0.121px, -0.05px); } 74.074% { transform: translate(0.071px, 0.03px); } 77.778% { transform: translate(0.18px, 0.075px); } 81.481% { transform: translate(0.165px, 0.069px); } 85.185% { transform: translate(0.063px, 0.026px); } 88.889% { transform: translate(-0.05px, -0.021px); } 92.593% { transform: translate(-0.11px, -0.046px); } 96.296% { transform: translate(-0.096px, -0.04px); } 100% { transform: none; } }
.ico .i-check { stroke-dasharray: 1; stroke-dashoffset: 0; }
.ico-play .i-check { animation: ico-check .55s .05s var(--spring-smooth) both; }
@keyframes ico-check { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.ico-play .i-x { animation: ico-x .6s var(--spring-bouncy) both; }
@keyframes ico-x { from { transform: rotate(-90deg) scale(.4); } to { transform: none; } }
.ico-play .i-pw { animation: ico-squash .55s linear both; transform-origin: 50% 70%; }
.ico-play .i-pwl { animation: ico-pwl .55s linear both; }
@keyframes ico-pwl { 0% { transform: translateY(0px) scaleY(1); } 3.704% { transform: translateY(1.247px) scaleY(0.856); } 7.407% { transform: translateY(2.081px) scaleY(0.76); } 11.111% { transform: translateY(2.513px) scaleY(0.71); } 14.815% { transform: translateY(2.59px) scaleY(0.701); } 18.519% { transform: translateY(2.385px) scaleY(0.725); } 22.222% { transform: translateY(1.984px) scaleY(0.771); } 25.926% { transform: translateY(1.473px) scaleY(0.83); } 29.63% { transform: translateY(0.929px) scaleY(0.893); } 33.333% { transform: translateY(0.414px) scaleY(0.952); } 37.037% { transform: translateY(-0.025px) scaleY(1.003); } 40.741% { transform: translateY(-0.361px) scaleY(1.042); } 44.444% { transform: translateY(-0.583px) scaleY(1.067); } 48.148% { transform: translateY(-0.695px) scaleY(1.08); } 51.852% { transform: translateY(-0.711px) scaleY(1.082); } 55.556% { transform: translateY(-0.651px) scaleY(1.075); } 59.259% { transform: translateY(-0.538px) scaleY(1.062); } 62.963% { transform: translateY(-0.396px) scaleY(1.046); } 66.667% { transform: translateY(-0.246px) scaleY(1.028); } 70.37% { transform: translateY(-0.106px) scaleY(1.012); } 74.074% { transform: translateY(0.013px) scaleY(0.998); } 77.778% { transform: translateY(0.104px) scaleY(0.988); } 81.481% { transform: translateY(0.163px) scaleY(0.981); } 85.185% { transform: translateY(0.192px) scaleY(0.978); } 88.889% { transform: translateY(0.195px) scaleY(0.977); } 92.593% { transform: translateY(0.177px) scaleY(0.98); } 96.296% { transform: translateY(0.146px) scaleY(0.983); } 100% { transform: none; } }
.ico-play .i-l1, .ico-play .i-l2, .ico-play .i-l3 { transform-origin: 0% 50%; animation: ico-line .5s var(--spring-snappy) both; }
.ico-play .i-l2 { animation-delay: .08s; } .ico-play .i-l3 { animation-delay: .16s; }
@keyframes ico-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.ico .i-r1, .ico .i-r2 { transform-box: view-box; transform-origin: 12px 12px; }
.ico-play .i-r1, .ico-play .i-r2 { animation: ico-ring .9s var(--spring-bouncy) both; }
.ico-play .i-r2 { animation-delay: .14s; }
@keyframes ico-ring { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: scale(1); } }
.ico-play .i-plus { animation: ico-plus .6s var(--spring-bouncy) both; }
@keyframes ico-plus { from { transform: rotate(-90deg) scale(.3); } to { transform: none; } }
.ico-play .i-lid { transform-origin: 50% 0%; animation: ico-lid .7s linear both; }
@keyframes ico-lid { 0% { transform: scaleY(1); } 3.704% { transform: scaleY(0.089); } 7.407% { transform: scaleY(-0.521); } 11.111% { transform: scaleY(-0.836); } 14.815% { transform: scaleY(-0.892); } 18.519% { transform: scaleY(-0.743); } 22.222% { transform: scaleY(-0.45); } 25.926% { transform: scaleY(-0.077); } 29.63% { transform: scaleY(0.321); } 33.333% { transform: scaleY(0.697); } 37.037% { transform: scaleY(1.018); } 40.741% { transform: scaleY(1.264); } 44.444% { transform: scaleY(1.426); } 48.148% { transform: scaleY(1.508); } 51.852% { transform: scaleY(1.52); } 55.556% { transform: scaleY(1.475); } 59.259% { transform: scaleY(1.393); } 62.963% { transform: scaleY(1.289); } 66.667% { transform: scaleY(1.18); } 70.37% { transform: scaleY(1.077); } 74.074% { transform: scaleY(0.99); } 77.778% { transform: scaleY(0.924); } 81.481% { transform: scaleY(0.881); } 85.185% { transform: scaleY(0.86); } 88.889% { transform: scaleY(0.857); } 92.593% { transform: scaleY(0.87); } 96.296% { transform: scaleY(0.894); } 100% { transform: none; } }
.ico-play .i-shake { transform-origin: 50% 90%; animation: ico-warn .7s linear both; }

/* ---------- record numbers: small glass pills that open the record ---------- */
a.rec {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: .45rem; min-height: 32px; padding: 0 .85rem; border-radius: 999px;
  white-space: nowrap; text-decoration: none; color: var(--ink); font: 600 .88rem var(--body); font-variant-numeric: tabular-nums; letter-spacing: .01em;
  border: 1px solid rgba(255, 255, 255, .8);
  background: linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(226, 234, 246, .45) 55%, rgba(255, 255, 255, .7));
  -webkit-backdrop-filter: var(--rf, blur(12px)) saturate(170%); backdrop-filter: var(--rf, blur(12px)) saturate(170%);
  box-shadow: inset 0 1.5px 0 #fff, inset 6px 0 9px -7px rgba(90, 160, 255, .6), inset -6px 0 9px -7px rgba(255, 120, 170, .5),
              0 0 0 1px rgba(18, 28, 60, .08), 0 10px 16px -10px rgba(22, 44, 78, .5);
  transition: transform .45s var(--spring-bouncy), box-shadow .25s var(--spring-smooth), background .25s var(--spring-smooth);
}
a.rec:hover {
  color: var(--ink);
  background: linear-gradient(180deg, #fff, rgba(232, 239, 248, .6) 55%, rgba(255, 255, 255, .85));
  box-shadow: inset 0 1.5px 0 #fff, inset 6px 0 9px -7px rgba(90, 160, 255, .7), inset -6px 0 9px -7px rgba(255, 120, 170, .6),
              0 0 0 1px rgba(18, 28, 60, .1), 0 14px 20px -10px rgba(22, 44, 78, .55);
}

a.rec:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a.rec .wave { z-index: -1; }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) { a.rec { -webkit-backdrop-filter: none; backdrop-filter: none; background: #fff; } }


/* ---------- Liquid Glass, everywhere ----------
   1. Light that follows the pointer: every glass surface gets a soft highlight where the pointer is
      (glass.js keeps --mx/--my up to date), as buttons already had.
   2. Materialising: messages and pop-ups appear out of a blur with a spring, as Apple's glass does. */
a.rec, .gseg, .gbar > .gbtn, .gbig, .cal-nav, .chip, .status, .side, .flash, .rs-confirm-card, .cal[popover], .appearance, .side nav a, .sw, .public-top { isolation: isolate; }
.gseg, .chip, .status { position: relative; }
a.rec::after, .gseg::after, .gbar > .gbtn::after, .gbig::after, .cal-nav::after, .chip::after, .status::after,
.side::after, .flash::after, .rs-confirm-card::after, .cal[popover]::after, .appearance::after, .side nav a::after, .sw::after,
.public-top::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(var(--spec-size, 90px) circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, var(--spec-a, .8)), rgba(255, 255, 255, 0) 70%);
  transition: opacity .3s var(--spring-smooth);
}
.side, .rs-confirm-card, .cal[popover], .flash { --spec-size: 220px; --spec-a: .45; }
.gplayer.video .gseg, .gplayer.video .gbar > .gbtn, .gbig { --spec-a: .45; }
a.rec:hover::after, .gseg:hover::after, .gbar > .gbtn:hover::after, .gbig:hover::after, .cal-nav:hover::after, .chip:hover::after, .status:hover::after,
.side:hover::after, .flash:hover::after, .rs-confirm-card:hover::after, .cal[popover]:hover::after,
.appearance:hover::after, .side nav a:hover::after, .sw:hover::after, .public-top:hover::after { opacity: 1; }
.public-top { --spec-size: 260px; --spec-a: .55; }
html[data-theme=dark] .public-top { --spec-a: .1; }
.appearance { --spec-size: 70px; --spec-a: .75; }
.side nav a { --spec-size: 110px; --spec-a: .7; }
.sw { --spec-size: 44px; --spec-a: .7; }
.sw::after { z-index: 1; } .sw-knob { z-index: 2; }        /* (the light falls on the green too; the knob stays on top) */
html[data-theme=dark] .appearance, html[data-theme=dark] .sw { --spec-a: .16; }
html[data-theme=dark] .side nav a { --spec-a: .12; }
/* text boxes and dropdowns cannot hold that extra layer, so the highlight is painted into their glass */
input[type=text]:hover, input[type=email]:hover, input[type=password]:hover, input[type=tel]:hover, input[type=date]:hover,
input[type=url]:hover, input[type=number]:hover, input[type=search]:hover, textarea:hover {
  background: radial-gradient(110px circle at var(--mx, 50%) var(--my, -50%), rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 70%),
              linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(236, 241, 248, .56));
}
@supports (appearance: base-select) {
  select:hover { background-image: radial-gradient(110px circle at var(--mx, 50%) var(--my, -50%), rgba(255, 255, 255, .8), rgba(255, 255, 255, 0) 70%), linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(214, 224, 238, .2) 46%, rgba(255, 255, 255, .6));
    background-position: 0 0, 0 0; background-size: 100% 100%, 100% 100%; }
  html[data-theme=dark] select:hover { background-image: radial-gradient(110px circle at var(--mx, 50%) var(--my, -50%), rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 70%), linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .07) 46%, rgba(255, 255, 255, .13));
    background-position: 0 0, 0 0; background-size: 100% 100%, 100% 100%; }
}
select:hover { border-color: rgba(255, 255, 255, .8); }
html[data-theme=dark] select:hover { border-color: rgba(255, 255, 255, .16); }
.flash { animation: glass-in .65s var(--spring-bouncy) both; }
@keyframes glass-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } }


/* ---------- opening a page like an app on iOS ----------
   Click a sidebar tab or a record and the new page grows out of exactly where you clicked, on a spring, the way
   an app opens from its icon. It is the real page that animates (not a picture of it), so the glass stays right.
   It plays once, only when you go to another page; clicking the tab you are already on does nothing. */
/* The page waits, hidden and small, until it has finished setting itself up (html.app-go), so the motion never
   stutters at the start. Then it grows on a soft spring that starts from rest, like an app opening on iOS, and
   fades in by itself. While it moves, the frosted glass inside it shows its plain tint (redrawing every blur on
   every frame is what made it jerky); the blur comes back the moment it lands. */
html.app-open .main {
  transform-origin: var(--app-ox, 50%) var(--app-oy, 30%); transform: scale(.2); opacity: 0;
  will-change: transform, opacity;
}
html.app-open.app-go .main {
  animation: app-zoom var(--zoom-time) var(--spring-zoom) both, app-fade .12s ease-out both;
}
html.app-open .main * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
@keyframes app-zoom { from { transform: scale(.2); } to { transform: none; } }
@keyframes app-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html.app-open .main { animation: none; transform: none; opacity: 1; } }

/* ...and the page it goes back to settles in, scrolled to where it was, with the row that was opened lit up */
html.app-return .main { opacity: 0; transform: scale(.985); }
html.app-return.app-return-go .main { opacity: 1; transform: none; transition: opacity .3s var(--spring-smooth), transform .55s var(--spring-bouncy); }
/* (the row you come back to is shown by the list's glass pill, which stays on it; no extra glow on the record's pill,
   which used to replace its glass shadows for a moment and make it look pressed in) */

/* the back pill, at the top left like an iOS screen's: its chevron nudges back when pressed */
.back-bar { margin: 0 0 .7rem; }
.btn.btn-back { gap: .2rem; padding-left: .55rem; padding-right: .9rem; max-width: 100%; }
.btn-back .bk { flex: none; }
.btn-back .bk-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ico-play .bk { animation: bk-nudge .5s var(--spring-bouncy) both; }
@keyframes bk-nudge { 0% { translate: 0 0; } 35% { translate: -4px 0; } 100% { translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .ico-play .bk { animation: none; } }

/* whether an alert reached the driver (their record page) */
.sent-ok, .sent-wait { font-weight: 650; }
.sent-wait { color: var(--muted); }
/* the type pill in the dashboard's latest list, with its time under it */
.rec-when { display: block; margin-top: .35rem; }

/* =====================================================================================================================
   THE MAIN BUTTON: tinted glass in Apple blue, as Apple tints the one most important action of a screen (Log in,
   Save settings, Filter, Send appeal). Everything else stays clear glass; a destructive action stays red text.
   ===================================================================================================================== */
:root { --accent: #007aff; --accent-hi: #3395ff; --accent-deep: rgba(0, 64, 170, .32); --accent-shadow: rgba(0, 96, 220, .55); }
.btn.btn-primary, .btn.btn-primary[data-tone] {
  color: #fff; border-color: rgba(255, 255, 255, .42);
  background: linear-gradient(180deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0) 48%, rgba(255, 255, 255, .1)), var(--accent);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .55), inset 0 0 0 1px rgba(255, 255, 255, .16), inset 0 -7px 10px -7px rgba(255, 255, 255, .4),
              inset 7px 0 10px -8px rgba(150, 210, 255, .8), inset -7px 0 10px -8px rgba(210, 170, 255, .6),
              0 0 0 1px var(--accent-deep), 0 12px 22px -10px var(--accent-shadow);
}
.btn.btn-primary:hover, .btn.btn-primary[data-tone]:hover {
  color: #fff; background: linear-gradient(180deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .04) 48%, rgba(255, 255, 255, .14)), var(--accent-hi);
}
.btn.btn-primary::after { background: radial-gradient(90px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 70%); }
.btn.btn-primary .wave { background: radial-gradient(circle, rgba(255, 255, 255, .7) 0 35%, rgba(255, 255, 255, .2) 55%, rgba(255, 255, 255, 0) 72%); }
.btn.rs-confirm-go { background: linear-gradient(180deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0) 48%, rgba(255, 255, 255, .1)), var(--accent); }
/* the chart legend */
.legend i.lg-s { background: var(--asphalt); }
.legend i.lg-h { background: #a9b0b8; }

/* =====================================================================================================================
   APPEARANCE: Automatic (follows the device) / Light / Dark. A small segmented glass control with a lens that springs
   to the choice. In the sidebar on a computer, and on the Profile and Account pages everywhere.
   ===================================================================================================================== */
.appearance {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; touch-action: none;
  -webkit-user-select: none; user-select: none;
  height: 36px; padding: 3px; border-radius: 999px; margin: 0 0 .7rem;
  border: 1px solid rgba(255, 255, 255, .8);
  background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(214, 224, 238, .16) 50%, rgba(255, 255, 255, .4)), rgba(196, 210, 232, .14);
  box-shadow: inset 0 1px 2px rgba(18, 24, 30, .1), 0 0 0 1px rgba(18, 28, 60, .07);
}
/* The lens: the same clear glass capsule as the sidebar's. It sits OVER the icons (so the chosen one is seen through
   it, bent at the rim in Chrome and Edge), moves on spring physics in theme.js, swells while held and can be dragged. */
.appearance .ap-lens {
  position: absolute; left: 0; top: 3px; width: 0; height: calc(100% - 6px); border-radius: 999px; pointer-events: none; z-index: 2;
  transform-origin: 50% 50%; will-change: transform;
  background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .08) 46%, rgba(255, 255, 255, .26));
  -webkit-backdrop-filter: var(--rf,) brightness(1.08) saturate(140%); backdrop-filter: var(--rf,) brightness(1.08) saturate(140%);
  box-shadow: inset 0 1.5px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .85), inset 0 -6px 9px -7px #fff,
              inset 6px 0 9px -7px rgba(120, 190, 255, .7), inset -6px 0 9px -7px rgba(255, 150, 190, .6),
              0 0 0 1px rgba(10, 20, 60, .08), 0 8px 14px -7px rgba(2, 6, 30, .45);
}
/* Where the lens sits before theme.js takes over: already on the current choice, at its exact size, so a new page
   opens with the control looking just as it did (no blink, no slide in). theme.js then measures the same place. */
.appearance .ap-lens { width: calc((100% - 6px) / 3); transform: translateX(3px); }
html[data-theme-pref=light] .appearance .ap-lens { transform: translateX(calc(3px + 100%)); }
html[data-theme-pref=dark] .appearance .ap-lens { transform: translateX(calc(3px + 200%)); }
html[data-theme-pref=auto] .appearance [data-theme-set=auto], html[data-theme-pref=light] .appearance [data-theme-set=light],
html[data-theme-pref=dark] .appearance [data-theme-set=dark] { color: var(--ink); }
html:not([data-theme-pref]) .appearance { display: none; }          /* no script at all: the control could not work */
.appearance.dragging { cursor: grabbing; }
/* each icon plays a short move when it is chosen, like the sidebar's icons: the half-moon of Automatic turns over,
   the sun's rays spin out, the moon swings and its star twinkles */
.appearance svg .i-auto, .appearance svg .i-rays, .appearance svg .i-core, .appearance svg .i-moon, .appearance svg .i-star { transform-box: view-box; transform-origin: 12px 12px; }
.appearance svg .i-star { transform-origin: 18px 6px; }
.appearance .ico-play .i-auto { animation: ap-flip .8s var(--spring-bouncy) both; }
.appearance .ico-play .i-rays { animation: ap-rays .9s var(--spring-bouncy) both; }
.appearance .ico-play .i-core { animation: ap-pop .6s var(--spring-bouncy) both; }
.appearance .ico-play .i-moon { animation: ap-swing .9s var(--spring-bouncy) both; }
.appearance .ico-play .i-star { animation: ap-twinkle .7s var(--spring-bouncy) .12s both; }
@keyframes ap-flip { from { rotate: -180deg; } to { rotate: 0deg; } }
@keyframes ap-rays { from { rotate: -70deg; scale: .55; opacity: .3; } to { rotate: 0deg; scale: 1; opacity: 1; } }
@keyframes ap-pop { from { scale: .55; } to { scale: 1; } }
@keyframes ap-swing { from { rotate: -38deg; } to { rotate: 0deg; } }
@keyframes ap-twinkle { from { scale: 0; rotate: -90deg; } to { scale: 1; rotate: 0deg; } }
@media (prefers-reduced-motion: reduce) { .appearance .ico-play * { animation: none !important; } }
.appearance button {
  position: relative; z-index: 1; display: grid; place-items: center; height: 100%; border: 0; padding: 0; margin: 0;
  background: none; color: var(--muted); border-radius: 999px; cursor: pointer;
  transition: color .25s var(--spring-smooth), transform .4s var(--spring-bouncy);
}
.appearance button svg { width: 17px; height: 17px; }
.appearance button[aria-checked=true] { color: var(--ink); }
.appearance button:hover { color: var(--ink); }
.appearance button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.appearance-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.appearance-row .appearance { width: 168px; margin: 0; }
/* on a phone the sidebar is a top bar with no room: the control is on the Profile or Account page instead */
@media (max-width: 900px) { .side-foot .appearance { display: none; } }
/* the account page's Appearance repeats the sidebar's, so it shows only where the sidebar's is hidden (phones, tablets) */
@media (min-width: 901px) { .appearance-panel { display: none; } }
/* A short window (a 1366×768 laptop at 125% zoom leaves about 520px): the sidebar tightens so Appearance and
   Log out stay on the screen instead of being cut off at the bottom. */
@media (min-width: 901px) and (max-height: 700px) {
  .side { padding-top: .85rem; }
  .side .brand { padding-bottom: .6rem; }
  .side .btn.brand-pill { min-height: 46px; margin-bottom: .6rem; padding-top: .2rem; padding-bottom: .2rem; }
  .side nav { gap: 3px; }
  .side nav a { padding-top: .4rem; padding-bottom: .4rem; }
  .side-foot { padding-top: .6rem; }
  .who-wrap { margin-bottom: .45rem; }
  .side-foot .btn.who-pill { min-height: 46px; }
  .who-ico { width: 32px; height: 32px; }
}
@media (min-width: 901px) and (max-height: 580px) {
  .side nav a { padding-top: .3rem; padding-bottom: .3rem; }
  .side .brand { padding-bottom: .35rem; }
  .side .btn.brand-pill { min-height: 38px; margin-bottom: .35rem; }
  .side-foot .who-pill .role { display: none; }              /* the name stays: it opens the account page */
  .side-foot .btn.who-pill { min-height: 36px; padding-top: .15rem; padding-bottom: .15rem; }
  .who-ico { width: 26px; height: 26px; }
  .who-wrap { margin-bottom: .3rem; }
  .side nav { gap: 2px; }
  .side-foot { padding-top: .45rem; }
}
/* changing the appearance cross-fades the whole page, like the system does */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: var(--spring-smooth); }

/* =====================================================================================================================
   DARK MODE. The same Liquid Glass in the dark: a deep, softly coloured wallpaper; content panels of smoked glass;
   controls of darker glass with a fine light rim; white text. Turned on by html[data-theme=dark] (set in base.html,
   from the device or the Appearance control).
   ===================================================================================================================== */
html { color-scheme: light; }
html[data-theme=dark] {
  color-scheme: dark;
  --paper: #0b0d11;
  --ink: #eef1f5;
  --muted: #a1aab4;
  --signal: #ff6b76;
  --signal-soft: rgba(255, 107, 118, .16);
  --surface: linear-gradient(170deg, rgba(44, 48, 57, .74), rgba(28, 31, 38, .62));
  --surface-line: rgba(255, 255, 255, .09);
  --surface-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), inset 0 -1px 0 rgba(255, 255, 255, .02),
                    0 1px 2px rgba(0, 0, 0, .35), 0 18px 40px -24px rgba(0, 0, 0, .75);
  --field: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .12);
  --glass: linear-gradient(160deg, rgba(54, 59, 69, .58), rgba(30, 33, 40, .46));
  --glass-strong: linear-gradient(160deg, rgba(60, 65, 76, .78), rgba(36, 39, 47, .66));
  --rim: linear-gradient(135deg, rgba(255, 255, 255, .34) 0%, rgba(255, 255, 255, .1) 30%, rgba(255, 255, 255, .03) 58%, rgba(255, 255, 255, .24) 100%);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 1px rgba(255, 255, 255, .04),
                  inset 0 14px 18px -16px rgba(255, 255, 255, .12), 0 24px 48px -26px rgba(0, 0, 0, .75), 0 2px 6px -2px rgba(0, 0, 0, .45);
  --glass-shadow-sm: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(255, 255, 255, .05),
                     inset 0 -6px 10px -8px rgba(255, 255, 255, .1), 0 10px 20px -12px rgba(0, 0, 0, .7);
  --focus: rgba(255, 255, 255, .55);
  --focus-halo: rgba(255, 255, 255, .1);
  --asphalt: #e6eaee;
  --accent: #0a84ff;
  --accent-hi: #3d9dff;
  --accent-deep: rgba(0, 0, 0, .45);
  --accent-shadow: rgba(0, 70, 170, .7);
}
html[data-theme=dark] body::before {
  background:
    radial-gradient(60vmax 50vmax at 0% 0%, rgba(40, 92, 210, .34), rgba(40, 92, 210, 0) 70%),
    radial-gradient(52vmax 46vmax at 100% 0%, rgba(160, 50, 120, .26), rgba(160, 50, 120, 0) 70%),
    radial-gradient(62vmax 56vmax at 100% 100%, rgba(190, 110, 40, .2), rgba(190, 110, 40, 0) 70%),
    radial-gradient(58vmax 56vmax at 0% 100%, rgba(100, 66, 210, .3), rgba(100, 66, 210, 0) 70%),
    radial-gradient(42vmax 34vmax at 55% 48%, rgba(30, 150, 140, .14), rgba(30, 150, 140, 0) 70%),
    var(--paper);
}
html[data-theme=dark] body:has(.hero)::before, html[data-theme=dark].app-close body::before {
  background:
    radial-gradient(38vmax 38vmax at 8% 6%, rgba(50, 110, 255, .5), rgba(50, 110, 255, 0) 70%),
    radial-gradient(34vmax 34vmax at 96% 4%, rgba(200, 60, 140, .4), rgba(200, 60, 140, 0) 70%),
    radial-gradient(40vmax 40vmax at 92% 96%, rgba(220, 130, 40, .34), rgba(220, 130, 40, 0) 70%),
    radial-gradient(40vmax 40vmax at 4% 98%, rgba(120, 80, 255, .44), rgba(120, 80, 255, 0) 70%),
    radial-gradient(28vmax 24vmax at 52% 50%, rgba(30, 170, 150, .26), rgba(30, 170, 150, 0) 70%),
    #07080b;
}
html[data-theme=dark] a { text-decoration-color: rgba(255, 255, 255, .35); }
html[data-theme=dark] .auth-foot a:hover { text-decoration-color: rgba(255, 255, 255, .4); }
html[data-theme=dark] code, html[data-theme=dark] .code { background: rgba(255, 255, 255, .09); }
html[data-theme=dark] ::selection { background: rgba(10, 132, 255, .45); }
html[data-theme=dark] ::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, calc(.42 * var(--sb-a, 0))); }
html[data-theme=dark] ::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .52); }
html[data-theme=dark] ::-webkit-scrollbar-thumb:active { background-color: rgba(255, 255, 255, .6); }

/* ---- controls: darker glass, a fine light rim, a faint dark edge outside it ---- */
html[data-theme=dark] .btn, html[data-theme=dark] button.zoombtn, html[data-theme=dark] select, html[data-theme=dark] a.rec,
html[data-theme=dark] .cal-nav {
  color: var(--ink); border-color: rgba(255, 255, 255, .16);
  background: linear-gradient(180deg, rgba(255, 255, 255, .17), rgba(255, 255, 255, .04) 46%, rgba(255, 255, 255, .09)), rgba(44, 48, 57, .42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 0 0 1px rgba(255, 255, 255, .05), inset 0 -7px 10px -8px rgba(255, 255, 255, .12),
              inset 7px 0 10px -8px rgba(90, 160, 255, .5), inset -7px 0 10px -8px rgba(255, 120, 170, .42),
              0 0 0 1px rgba(0, 0, 0, .38), 0 12px 20px -10px rgba(0, 0, 0, .65);
}
html[data-theme=dark] .btn:hover, html[data-theme=dark] button.zoombtn:hover, html[data-theme=dark] a.rec:hover, html[data-theme=dark] .cal-nav:hover {
  color: var(--ink); background: linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .07) 46%, rgba(255, 255, 255, .13)), rgba(52, 57, 67, .5);
}
html[data-theme=dark] select:hover { background-color: rgba(56, 61, 71, .5); }
html[data-theme=dark] .btn::after, html[data-theme=dark] button.zoombtn::after {
  background: radial-gradient(90px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 70%);
}
html[data-theme=dark] .btn .wave, html[data-theme=dark] .wave-clip .wave { background: radial-gradient(circle, rgba(255, 255, 255, .45) 0 35%, rgba(255, 255, 255, .12) 55%, rgba(255, 255, 255, 0) 72%); }
html[data-theme=dark] .btn-danger, html[data-theme=dark] .btn-danger:hover { color: #ff7a85; }
html[data-theme=dark] .btn.btn-primary, html[data-theme=dark] .btn.btn-primary[data-tone] {
  color: #fff; border-color: rgba(255, 255, 255, .3);
  background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 48%, rgba(255, 255, 255, .08)), var(--accent);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .45), inset 0 0 0 1px rgba(255, 255, 255, .12), inset 0 -7px 10px -7px rgba(255, 255, 255, .3),
              inset 7px 0 10px -8px rgba(150, 210, 255, .7), inset -7px 0 10px -8px rgba(210, 170, 255, .5),
              0 0 0 1px var(--accent-deep), 0 12px 22px -10px var(--accent-shadow);
}
html[data-theme=dark] .btn.btn-primary:hover { background: linear-gradient(180deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, .03) 48%, rgba(255, 255, 255, .12)), var(--accent-hi); }
html[data-theme=dark] .btn.rs-confirm-danger { background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 90, 105, .16)), rgba(70, 28, 36, .5); }

/* dropdowns: the closed field, the arrow, and the open list */
html[data-theme=dark] select { 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 1.5l5 5 5-5' fill='none' stroke='%23eef1f5' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"), linear-gradient(180deg, rgba(255, 255, 255, .17), rgba(255, 255, 255, .04) 46%, rgba(255, 255, 255, .09)); }
@supports (appearance: base-select) {
  html[data-theme=dark] select { background-image: linear-gradient(180deg, rgba(255, 255, 255, .17), rgba(255, 255, 255, .04) 46%, rgba(255, 255, 255, .09)); }
  html[data-theme=dark] select::picker-icon { background: var(--ink); }
  html[data-theme=dark] ::picker(select) {
    color: var(--ink); border-color: rgba(255, 255, 255, .14);
    background: linear-gradient(160deg, rgba(50, 54, 64, .86), rgba(30, 33, 40, .76));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(255, 255, 255, .04), inset 7px 0 12px -9px rgba(90, 160, 255, .4), inset -7px 0 12px -9px rgba(255, 120, 170, .32),
                0 24px 44px -18px rgba(0, 0, 0, .8), 0 2px 8px -2px rgba(0, 0, 0, .4);
  }
  html[data-theme=dark] select.rf-ghost::picker(select) { background: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(255, 255, 255, .04), inset 7px 0 12px -9px rgba(90, 160, 255, .4), inset -7px 0 12px -9px rgba(255, 120, 170, .32); }
  html[data-theme=dark] select option, html[data-theme=dark] select option:checked, html[data-theme=dark] select option::checkmark { color: var(--ink); }
  html[data-theme=dark] select.has-lens option:hover { background: rgba(255, 255, 255, .07); }
  html[data-theme=dark] select:not(.has-lens) option:hover, html[data-theme=dark] select:not(.has-lens) option:focus-visible,
  html[data-theme=dark] select:not(.has-lens) option:checked, html[data-theme=dark] select .sel-lens {
    background: linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .07) 55%, rgba(255, 255, 255, .14));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), inset 0 0 0 1px rgba(255, 255, 255, .06), inset 7px 0 10px -8px rgba(120, 190, 255, .55),
                inset -7px 0 10px -8px rgba(255, 150, 190, .45), 0 0 0 1px rgba(0, 0, 0, .3), 0 12px 20px -10px rgba(0, 0, 0, .7);
  }
}
html[data-theme=dark] .sel-glass[popover] { background: linear-gradient(160deg, rgba(50, 54, 64, .86), rgba(30, 33, 40, .76)); box-shadow: 0 24px 44px -18px rgba(0, 0, 0, .8), 0 2px 8px -2px rgba(0, 0, 0, .4); }

/* text boxes */
html[data-theme=dark] input[type=text], html[data-theme=dark] input[type=email], html[data-theme=dark] input[type=password],
html[data-theme=dark] input[type=tel], html[data-theme=dark] input[type=date], html[data-theme=dark] input[type=url],
html[data-theme=dark] input[type=number], html[data-theme=dark] input[type=search], html[data-theme=dark] textarea {
  color: var(--ink); border-color: rgba(255, 255, 255, .13); background-color: transparent;
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 2px 6px rgba(0, 0, 0, .28),
              inset 7px 0 10px -8px rgba(90, 160, 255, .32), inset -7px 0 10px -8px rgba(255, 120, 170, .26),
              0 0 0 1px rgba(0, 0, 0, .34), 0 10px 18px -12px rgba(0, 0, 0, .6);
}
html[data-theme=dark] input[type=text]:hover, html[data-theme=dark] input[type=email]:hover, html[data-theme=dark] input[type=password]:hover,
html[data-theme=dark] input[type=tel]:hover, html[data-theme=dark] input[type=date]:hover, html[data-theme=dark] input[type=url]:hover,
html[data-theme=dark] input[type=number]:hover, html[data-theme=dark] input[type=search]:hover, html[data-theme=dark] textarea:hover {
  border-color: rgba(255, 255, 255, .2); background: linear-gradient(180deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .05));
}
html[data-theme=dark] input[type=text]:focus, html[data-theme=dark] input[type=email]:focus, html[data-theme=dark] input[type=password]:focus,
html[data-theme=dark] input[type=tel]:focus, html[data-theme=dark] input[type=date]:focus, html[data-theme=dark] input[type=url]:focus,
html[data-theme=dark] input[type=number]:focus, html[data-theme=dark] input[type=search]:focus, html[data-theme=dark] textarea:focus, html[data-theme=dark] input.cal-open {
  border-color: rgba(255, 255, 255, .28); background: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .07));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 7px 0 10px -8px rgba(90, 160, 255, .4), inset -7px 0 10px -8px rgba(255, 120, 170, .3),
              0 12px 22px -12px rgba(0, 0, 0, .7);
}
html[data-theme=dark] input::placeholder, html[data-theme=dark] textarea::placeholder { color: #7f8892; }
html[data-theme=dark] input[type=checkbox] { border-color: rgba(255, 255, 255, .22); background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14); }
html[data-theme=dark] input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }
html[data-theme=dark] .cal-ico { color: var(--ink); }

/* chips and status pills keep their meaning (red, green, amber), brighter for the dark */
html[data-theme=dark] .chip, html[data-theme=dark] .status {
  --tint: rgba(44, 48, 57, .42); --tint-line: rgba(255, 255, 255, .14); --tint-shadow: rgba(0, 0, 0, .6);
  --glow-l: rgba(90, 160, 255, .45); --glow-r: rgba(255, 120, 170, .38);
  color: #d9dee4;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .02) 46%, rgba(255, 255, 255, .08)), var(--tint);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26), inset 0 0 0 1px rgba(255, 255, 255, .04), inset 0 -5px 7px -5px rgba(255, 255, 255, .1),
              inset 5px 0 8px -6px var(--glow-l), inset -5px 0 8px -6px var(--glow-r), 0 0 0 1px rgba(0, 0, 0, .34), 0 8px 14px -9px var(--tint-shadow);
}
html[data-theme=dark] .chip-flagged, html[data-theme=dark] .chip-dismissed, html[data-theme=dark] .status.devstat.bad {
  --tint: rgba(220, 50, 70, .26); --tint-line: rgba(255, 110, 125, .42); --tint-shadow: rgba(160, 20, 40, .6); --glow-l: rgba(255, 110, 130, .6); --glow-r: rgba(255, 150, 110, .5); color: #ffb3bb;
}
html[data-theme=dark] .chip-ok, html[data-theme=dark] .status.on, html[data-theme=dark] .status.devstat.ok {
  --tint: rgba(40, 170, 100, .26); --tint-line: rgba(80, 210, 140, .42); --tint-shadow: rgba(10, 100, 50, .6); --glow-l: rgba(60, 210, 140, .55); --glow-r: rgba(90, 200, 220, .45); color: #9ee8bf;
}
html[data-theme=dark] .status.devstat.warn {
  --tint: rgba(220, 150, 30, .24); --tint-line: rgba(255, 190, 80, .42); --tint-shadow: rgba(140, 80, 0, .6); --glow-l: rgba(255, 190, 80, .55); --glow-r: rgba(255, 140, 90, .45); color: #ffd590;
}
html[data-theme=dark] .chip-under_review, html[data-theme=dark] .chip-resolved { color: #d9dee4; }
html[data-theme=dark] .dot { background: #7d858c; box-shadow: 0 0 0 3px rgba(125, 133, 140, .22); }
/* a dot that means something keeps its colour in the dark (brighter, so it reads on the dark glass) */
html[data-theme=dark] .dot.on, html[data-theme=dark] .status.devstat.ok .dot { background: #34c77b; box-shadow: 0 0 0 3px rgba(52, 199, 123, .24); }
html[data-theme=dark] .dot.off, html[data-theme=dark] .status.devstat.bad .dot { background: #ff4d5e; box-shadow: 0 0 0 3px rgba(255, 77, 94, .24); }
html[data-theme=dark] .dot.warn, html[data-theme=dark] .status.devstat.warn .dot { background: #f0a92a; box-shadow: 0 0 0 3px rgba(240, 169, 42, .26); }
html[data-theme=dark] .status.on .dot, html[data-theme=dark] .dot.sig.on, html[data-theme=dark] .status.devstat.ok .dot { animation-name: live-dark; }
@keyframes live-dark { 0% { box-shadow: 0 0 0 0 rgba(52, 199, 123, .6); } 70%, 100% { box-shadow: 0 0 0 8px rgba(52, 199, 123, 0); } }
html[data-theme=dark] .status.off { --tint: rgba(220, 50, 70, .26); --tint-line: rgba(255, 110, 125, .42); --tint-shadow: rgba(160, 20, 40, .6); --glow-l: rgba(255, 110, 130, .6); --glow-r: rgba(255, 150, 110, .5); color: #ffb3bb; }
html[data-theme=dark] .all-clear > .ico { color: #5fd68a; }
html[data-theme=dark] .bars.hours .peak .bar { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 0 0 2px var(--focus-halo), 0 6px 12px -8px rgba(0, 0, 0, .6); }

/* the navigation layer */
html[data-theme=dark] .side nav a { color: #d3d8de; }
html[data-theme=dark] .side nav a:hover { background: rgba(255, 255, 255, .07); color: var(--ink); }
html[data-theme=dark] .nav-pill, html[data-theme=dark] .side nav:not(.has-pill) a[aria-current=page] {
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .05) 46%, rgba(255, 255, 255, .12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), inset 0 0 0 1px rgba(255, 255, 255, .06), inset 0 -7px 10px -8px rgba(255, 255, 255, .14),
              inset 7px 0 10px -8px rgba(120, 190, 255, .55), inset -7px 0 10px -8px rgba(255, 150, 190, .45),
              0 0 0 1px rgba(0, 0, 0, .3), 0 14px 22px -12px rgba(0, 0, 0, .75);
}
html[data-theme=dark] .side-foot { border-top-color: rgba(255, 255, 255, .1); }
html[data-theme=dark] .bn-sense { color: #a9b2bc; }
html[data-theme=dark] .mark { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 0 0 1px rgba(255, 255, 255, .12), 0 6px 14px -6px rgba(0, 0, 0, .7); }
html[data-theme=dark] .status::after, html[data-theme=dark] .side::after, html[data-theme=dark] .flash::after,
html[data-theme=dark] .rs-confirm-card::after, html[data-theme=dark] .cal[popover]::after { --spec-a: .14; }
html[data-theme=dark] .side, html[data-theme=dark] .rs-confirm-card, html[data-theme=dark] .cal[popover], html[data-theme=dark] .flash { --spec-a: .12; }

/* the appearance control */
html[data-theme=dark] .appearance {
  border-color: rgba(255, 255, 255, .12);
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)), rgba(20, 22, 27, .4);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 0, 0, .3);
}
html[data-theme=dark] .appearance .ap-lens {
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .04) 46%, rgba(255, 255, 255, .12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .36), inset 0 0 0 1px rgba(255, 255, 255, .06), inset 0 -6px 9px -7px rgba(255, 255, 255, .14),
              inset 6px 0 9px -7px rgba(120, 190, 255, .55), inset -6px 0 9px -7px rgba(255, 150, 190, .45),
              0 0 0 1px rgba(0, 0, 0, .35), 0 8px 14px -7px rgba(0, 0, 0, .7);
}

/* content */
html[data-theme=dark] th, html[data-theme=dark] td { border-bottom-color: rgba(255, 255, 255, .08); }
html[data-theme=dark] tbody tr:hover { background: rgba(255, 255, 255, .04); }
html[data-theme=dark] .plate { color: #12161a; border-color: #12161a; background: #f4f6f8; box-shadow: 0 2px 6px -2px rgba(0, 0, 0, .7); }
html[data-theme=dark] .stat.alert { background: linear-gradient(170deg, rgba(110, 32, 44, .62), rgba(70, 24, 32, .52)); }
html[data-theme=dark] .stat.alert .v { color: #ff8a94; }
html[data-theme=dark] .step { background: rgba(255, 255, 255, .06); }
html[data-theme=dark] .noimg { background: rgba(255, 255, 255, .05); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5); }
html[data-theme=dark] .quote { border-left-color: rgba(255, 255, 255, .24); }
html[data-theme=dark] .legend i { box-shadow: 0 0 0 1px rgba(255, 255, 255, .2); }
html[data-theme=dark] .legend i.lg-h, html[data-theme=dark] .bar { background: linear-gradient(180deg, #5b636c, #3d444c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 6px 12px -8px rgba(0, 0, 0, .6); }
html[data-theme=dark] .bar .s { background: linear-gradient(180deg, #f3f5f7, #b9c1c9); box-shadow: inset 0 1px 0 #fff; }
html[data-theme=dark] .evidence img { box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 12px 24px -16px rgba(0, 0, 0, .8); }
html[data-theme=dark] .hero p.lead, html[data-theme=dark] .facts p, html[data-theme=dark] .sign span { color: #c9d0d7; }
html[data-theme=dark] .sign { color: #12161a; }
html[data-theme=dark] .sign span { color: #2f373e; }
html[data-theme=dark] .flash-ok { background: linear-gradient(135deg, rgba(30, 64, 46, .9), rgba(22, 48, 36, .86)); color: #b9f0cf; }
html[data-theme=dark] .flash-error { background: linear-gradient(135deg, rgba(78, 26, 34, .9), rgba(58, 20, 28, .86)); color: #ffc4cb; }
html[data-theme=dark] .notice, html[data-theme=dark] .temp-pass {
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .04)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 1px rgba(255, 255, 255, .05);
}
html[data-theme=dark] .gplayer:not(.video) .gseg, html[data-theme=dark] .gplayer:not(.video) .gbar > .gbtn {
  border-color: rgba(255, 255, 255, .16); background: linear-gradient(180deg, rgba(255, 255, 255, .17), rgba(255, 255, 255, .05)), rgba(44, 48, 57, .5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -7px 10px -8px rgba(255, 255, 255, .1), 0 0 0 1px rgba(0, 0, 0, .35), 0 10px 18px -10px rgba(0, 0, 0, .65);
}
html[data-theme=dark] .gplayer:not(.video) .gseg .gbtn:hover { background: rgba(255, 255, 255, .1); }
/* the sound player in dark mode, as Apple's adapts: white text and icons, a white fill on a faint white track (light
   mode keeps the dark fill on a light grey track), dark glass, and the same white knob in both */
html[data-theme=dark] .gplayer:not(.video) .gbar { --gfg: #f5f5f7; --gtrack: rgba(255, 255, 255, .2); --gfill: #f5f5f7; }
html[data-theme=dark] .gplayer:not(.video) .gtrack { box-shadow: inset 0 1px 1px rgba(0, 0, 0, .35); }
html[data-theme=dark] .gplayer:not(.video) .gknob { border-color: rgba(0, 0, 0, .3); }
html[data-theme=dark] .gplayer:not(.video) .gseg, html[data-theme=dark] .gplayer:not(.video) .gbar > .gbtn { --spec-a: .14; }   /* a soft highlight on dark glass, like the rest */
html[data-theme=dark] .gplayer:not(.video) .gbar > .gbtn:hover { background: linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .08)), rgba(44, 48, 57, .55); }

/* the confirm dialog */
html[data-theme=dark] dialog.rs-confirm::backdrop { background: rgba(0, 0, 0, .5); }
html[data-theme=dark] .rs-confirm-card {
  background:
    radial-gradient(120% 90% at 0% 50%, rgba(10, 132, 255, .14), transparent 55%),
    radial-gradient(120% 90% at 100% 50%, rgba(255, 69, 140, .1), transparent 55%),
    linear-gradient(180deg, rgba(50, 54, 64, .88), rgba(32, 35, 42, .82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(255, 255, 255, .06), 0 34px 80px rgba(0, 0, 0, .6), 0 6px 18px rgba(0, 0, 0, .4);
}

/* the date picker */
html[data-theme=dark] .cal[popover] {
  color: var(--ink); border-color: rgba(255, 255, 255, .14);
  background: linear-gradient(160deg, rgba(50, 54, 64, .86), rgba(30, 33, 40, .76));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(255, 255, 255, .04), inset 8px 0 14px -10px rgba(90, 160, 255, .4), inset -8px 0 14px -10px rgba(255, 120, 170, .32),
              0 28px 54px -20px rgba(0, 0, 0, .8), 0 2px 8px -2px rgba(0, 0, 0, .4);
}
html[data-theme=dark] .cal-day { color: var(--ink); }
html[data-theme=dark] .cal-day:hover { background: rgba(255, 255, 255, .08); }
html[data-theme=dark] .cal-day.out { color: rgba(255, 255, 255, .32); }
html[data-theme=dark] .cal-day:disabled { color: rgba(255, 255, 255, .18); }
html[data-theme=dark] .cal-day.today, html[data-theme=dark] .cal-btn-text { color: #4da3ff; }
html[data-theme=dark] .cal-btn-text:hover { background: rgba(255, 255, 255, .08); }
html[data-theme=dark] .cal-lens {
  background: linear-gradient(180deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .07) 55%, rgba(255, 255, 255, .15));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .36), inset 0 0 0 1px rgba(255, 255, 255, .06), inset 6px 0 9px -7px rgba(120, 190, 255, .55),
              inset -6px 0 9px -7px rgba(255, 150, 190, .45), 0 0 0 1px rgba(0, 0, 0, .3), 0 10px 16px -8px rgba(0, 0, 0, .7);
}

/* the switches: the track darkens, the knob stays white, as Apple's do */
html[data-theme=dark] .sw {
  border-color: rgba(255, 255, 255, .12);
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .02)), rgba(120, 128, 140, .32);
  box-shadow: inset 0 1.5px 2px rgba(0, 0, 0, .4), inset 0 -1px 0 rgba(255, 255, 255, .08);
}

/* a screen set to use less transparency or more contrast: solid dark surfaces */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  html[data-theme=dark] .side, html[data-theme=dark] .public-top, html[data-theme=dark] .flash { background: rgba(26, 29, 35, .98); }
  html[data-theme=dark] .panel, html[data-theme=dark] .stat, html[data-theme=dark] .facts > div, html[data-theme=dark] .page-head,
  html[data-theme=dark] .hero, html[data-theme=dark] .auth-card { background: #1b1e24; border-color: rgba(255, 255, 255, .2); }
  html[data-theme=dark] .btn, html[data-theme=dark] a.rec { background: #2a2e36; }
  html[data-theme=dark] input, html[data-theme=dark] textarea, html[data-theme=dark] select { background: #22262d; }
  html[data-theme=dark] .cal[popover] { background: #1f2329; }
  html[data-theme=dark] body { background: #0b0d11; }
}
.appearance-row p { margin: 0; }

/* ---------- Export: Apple's "square and arrow down"; on press the arrow drops into the tray and springs back ---------- */
.dl { flex: none; display: block; overflow: visible; }
.dl .dl-arrow { transform-box: view-box; }
.dl .dl-tray { transform-box: view-box; transform-origin: 12px 20px; }
.ico-play .dl .dl-arrow { animation: dl-arrow .8s both; }
.ico-play .dl .dl-tray { animation: dl-tray .8s both; }
@keyframes dl-arrow {
  0% { translate: 0 0; animation-timing-function: var(--spring-snappy); }
  30% { translate: 0 3.4px; animation-timing-function: var(--spring-bouncy); }
  100% { translate: 0 0; }
}
@keyframes dl-tray {
  0%, 18% { scale: 1 1; animation-timing-function: var(--spring-snappy); }
  36% { scale: 1.06 .9; animation-timing-function: var(--spring-bouncy); }
  100% { scale: 1 1; }
}
@media (prefers-reduced-motion: reduce) { .ico-play .dl * { animation: none !important; } }

/* ---------- the undo toast: a glass capsule that springs up at the bottom for a few seconds after a delete ---------- */
.undo-toast {
  position: fixed; z-index: 60; bottom: 22px; left: calc(282px + (100% - 282px) / 2); translate: -50% 0;
  display: flex; align-items: center; gap: .55rem; max-width: min(620px, calc(100% - 314px));
  padding: .4rem .4rem .4rem 1.15rem; border-radius: 999px; color: var(--ink); font-weight: 500; font-size: .95rem;
  background: var(--glass-strong, var(--glass));
  -webkit-backdrop-filter: var(--rf, blur(26px)) saturate(180%) brightness(1.05); backdrop-filter: var(--rf, blur(26px)) saturate(180%) brightness(1.05);
  box-shadow: var(--glass-shadow), 0 18px 40px -14px rgba(18, 24, 30, .35);
  animation: undo-in .7s var(--spring-bouncy) both;
}
.undo-toast::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: var(--rim); pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.undo-toast.leaving { animation: undo-out .42s var(--spring-smooth) both; }
@keyframes undo-in { from { opacity: 0; transform: translateY(26px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes undo-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(22px) scale(.94); } }
.undo-msg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.undo-toast form { margin: 0; flex: none; }
.undo-btn { position: relative; gap: .35rem; font-weight: 650; }
.undo-ico { flex: none; transform-box: view-box; transform-origin: 12px 12px; }
.ico-play .undo-ico { animation: undo-spin .6s var(--spring-bouncy) both; }
@keyframes undo-spin { 0% { rotate: 0deg; } 45% { rotate: -40deg; } 100% { rotate: 0deg; } }
/* pressed: the label gives way to Apple's activity indicator (eight bars, fading round in turn) */
.undo-ico, .undo-label { transition: opacity .18s ease, scale .3s var(--spring-bouncy); }
.undo-toast form.busy .undo-ico, .undo-toast form.busy .undo-label { opacity: 0; scale: .7; }
.undo-toast form.busy .undo-btn { pointer-events: none; }
.spinner { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; opacity: 0; scale: .6;
  transition: opacity .2s ease .05s, scale .4s var(--spring-bouncy) .05s; }
.undo-toast form.busy .spinner { opacity: 1; scale: 1; }
.spinner i { position: absolute; left: 8.75px; top: 0; width: 2.5px; height: 6px; border-radius: 2px; background: currentColor;
  transform-origin: 1.25px 10px; rotate: calc(var(--i) * 45deg); opacity: .25;
  animation: spin-fade .8s linear infinite; animation-delay: calc((var(--i) - 8) * .1s); }
@keyframes spin-fade { 0% { opacity: 1; } 100% { opacity: .25; } }
.undo-close {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin-right: .15rem; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer; transition: background .2s var(--spring-smooth), transform .4s var(--spring-bouncy);
}
.undo-close:hover { background: rgba(18, 24, 30, .07); color: var(--ink); }
.undo-close:active { transform: scale(.88); }
html[data-theme=dark] .undo-toast { box-shadow: var(--glass-shadow), 0 0 0 1px rgba(0, 0, 0, .4), 0 18px 40px -14px rgba(0, 0, 0, .7); }
html[data-theme=dark] .undo-close:hover { background: rgba(255, 255, 255, .1); }
@media (max-width: 900px) {
  .undo-toast { left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); max-width: calc(100% - 24px); font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) { .undo-toast, .undo-toast.leaving { animation-duration: .01s; } .ico-play .undo-ico { animation: none; } }

/* ---------- deleting, as in an Apple list: the row slides away, the rows under it close the gap on a spring ---------- */
tr.rs-leaving > td { transition: opacity .22s ease, translate .3s cubic-bezier(.4, 0, .7, .2); opacity: 0; translate: -48px 0; }
tr.rs-leaving, html[data-theme=dark] tr.rs-leaving { background: transparent; }   /* no hover tint left behind where it was */
/* a whole page being deleted (a record, a driver): it draws back and fades as it goes */
html.app-delete .main { pointer-events: none; }        /* confirm.js shrinks it into the trash can */
html.app-delete-fade .main { animation: app-delete .3s cubic-bezier(.4, 0, .7, .2) forwards; transform-origin: 50% 30%; }
html.app-delete .main * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
@keyframes app-delete { to { transform: scale(.92); opacity: 0; } }
/* after Undo, what came back slides into its place and glows for a moment */
tr.rs-restored > td { animation: rs-restore .7s var(--spring-bouncy) var(--d, 0s) backwards; }
@keyframes rs-restore { from { opacity: 0; translate: -40px 0; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { tr.rs-leaving > td { transition: none; } html.app-delete-fade .main { animation: none; } tr.rs-restored > td { animation: none; } }

/* ---------- Apple's zoom transition between a record and the list (Chrome and Edge; base.html and glass.js) ----------
   Open: the record's pill grows into the record's page while the list stays behind it and the new page's backdrop
   fades in. Back: the page shrinks into the pill it came from, with the list already there underneath; the pill
   then lights up. The morph itself is the browser's: it moves and resizes one piece of glass between the two places. */
@view-transition { navigation: auto; }
::view-transition { pointer-events: none; }        /* the page under the morph can be clicked at once, as on iOS */
/* ONE open and ONE close for the whole app, on one spring (--spring-zoom), as on iOS:
   - opening (a record's pill, a menu tab, your name, "View records"): the page grows out of what you pressed;
   - closing (Back into the pill, or the page you leave shrinking into its menu tab while the next one grows out of
     the tab you pressed): the exact reverse, into that spot, and the spot gives a little squeeze as it catches it.
   rs-card is what opens (or closes, on Back); rs-shut is the page you leave from the menu, closing into its tab. */
::view-transition-group(rs-card), ::view-transition-group(rs-shut) {
  animation-duration: var(--zoom-time); animation-timing-function: var(--spring-zoom);
}
::view-transition-group(rs-card) { z-index: 2; }      /* what opens is on top of what closes */
::view-transition-group(rs-shut) { z-index: 1; }
/* the window's corners: a pill's at the small end, rounded while it flies, square once it has landed (opening);
   rounding as soon as it starts to shrink (closing) */
::view-transition-image-pair(rs-card), ::view-transition-image-pair(rs-shut) { overflow: clip; border-radius: 22px; }
html.vt-open::view-transition-image-pair(rs-card) { animation: vt-corner-open var(--zoom-time) linear both; }
html.vt-back::view-transition-image-pair(rs-card), html.vt-open::view-transition-image-pair(rs-shut) { animation: vt-corner-close var(--zoom-time) linear both; }
@keyframes vt-corner-open { 0%, 55% { border-radius: 22px; } 100% { border-radius: 0; } }
@keyframes vt-corner-close { 0% { border-radius: 0; } 22%, 100% { border-radius: 22px; } }
/* the page is a solid sheet while it moves (its own colour goes with its picture, so it fades with it), and keeps
   its proportions (scaled to the width, clipped below); the pill or tab is only seen small */
html.vt-open::view-transition-new(rs-card), html.vt-back::view-transition-old(rs-card), html.vt-open::view-transition-old(rs-shut) { background: var(--paper); width: 100%; height: auto; }
html.vt-open::view-transition-old(rs-card), html.vt-back::view-transition-new(rs-card), html.vt-open::view-transition-new(rs-shut) { width: 100%; height: 100%; }
/* opening: the page shows as it leaves the pill; closing: it fades into the pill as it gets there (mirror images
   of each other on the spring: the first and the last fifth of the way) */
html.vt-open::view-transition-old(rs-card) { animation: vt-fade-out .1s ease both; }
html.vt-open::view-transition-new(rs-card) { animation: vt-fade-in .12s ease-out both; }
html.vt-back::view-transition-old(rs-card), html.vt-open::view-transition-old(rs-shut) { animation: vt-fade-out .14s ease-in .18s both; }
html.vt-back::view-transition-new(rs-card), html.vt-open::view-transition-new(rs-shut) { animation: vt-fade-in .14s ease .2s both; }
/* the spot it would close into is not on screen: it sinks away where it is instead */
html.vt-back::view-transition-old(rs-card):only-child, html.vt-open::view-transition-old(rs-shut):only-child { animation: vt-sink .36s ease both; }
/* the page you leave stays under the one growing out of it, and the new page's frame fades in over it as it lands
   (the menu's lens starts on the new page from where it was, so the menu itself does not change while it fades) */
/* The menu and the rest of the frame are the new page's, live, from the very first frame: its glass lens springs to
   the new tab at once and the tab you left loses its bold at once (no frozen picture of the old menu). What was under
   a page opened from within it (the list under a record) stays under it until covered: rs-under, below. */
html.vt-open::view-transition-old(root) { animation: none; opacity: 0; }
html.vt-open::view-transition-new(root) { animation: none; }
::view-transition-group(rs-under) { z-index: 0; animation-duration: var(--zoom-time); }
html.vt-open::view-transition-old(rs-under) { animation: vt-fade-out .2s ease .32s both; background: var(--paper); }   /* solid, so nothing of the next page shows through it early */
/* the next page was not drawn yet when the morph started (base.html): a page-coloured sheet grows out of the pill
   instead, and fades as it lands, showing the page (drawn by then) through it */
.vt-ghost.vt-slot { opacity: 1; background: var(--paper); border-radius: 0; }
html.vt-slotted::view-transition-new(rs-card) { animation: vt-slot-show var(--zoom-time) linear both; }
@keyframes vt-slot-show { 0% { opacity: 0; } 15%, 62% { opacity: 1; } 100% { opacity: 0; } }
html.vt-back::view-transition-old(root) { animation: none; opacity: 0; }
html.vt-back::view-transition-new(root) { animation: none; }
@keyframes vt-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes vt-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes vt-sink { to { opacity: 0; transform: scale(.86); } }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
/* The pages before signing in (home, Log in, Sign up, Forgot password...) use the same open and close: the next card
   grows out of the pill you pressed (Log in, Create an account, Forgot password?), and going back ("Back to log in",
   "Cancel", "Log in" after "Already registered?") shrinks it into the pill that opened it. A card keeps its own
   rounded glass while it flies (it is not a whole page), and does not play its own entrance as well (base.html). */
html.vt-pub::view-transition-image-pair(rs-card) { animation: none; border-radius: var(--r-shell); }
html.vt-pub.vt-open::view-transition-new(rs-card), html.vt-pub.vt-back::view-transition-old(rs-card) { background: none; }
/* the rest of the page (its background too) cross-fades into the next one at the same time, so nothing of the old
   page is left floating on the new one's background, and the background never lags behind */
html.vt-pub::view-transition-old(root) { opacity: 1; animation: vt-fade-out .3s ease both; }
html.vt-pub::view-transition-new(root) { animation: vt-fade-in .3s ease both; }

/* ---------- notifications: glass banners at the top of the window, as on an iPhone (_flash.html, banners.js) ---------- */
.banners {
  position: fixed; z-index: 80; top: 14px; left: 50%; translate: -50% 0; width: min(420px, calc(100% - 24px));
  pointer-events: none;
}
/* one holder per banner (banners.js): tucked in behind the newest, a little smaller each, or fanned out into a list
   while pointed at; the move between the two is on the app's spring */
.bwrap { position: absolute; left: 0; right: 0; top: 0; transform-origin: 50% 0;
  transition: translate .55s var(--spring-bouncy), scale .55s var(--spring-bouncy), opacity .3s ease; }
.bwrap > .banner { width: 100%; }
/* behind the front one, only the glass shows (as an iPhone's stack): its words fade until the stack fans out */
.bwrap .banner > * { transition: opacity .25s ease; }
.bwrap[data-depth="1"] .banner > *, .bwrap[data-depth="2"] .banner > *, .bwrap[data-depth="3"] .banner > * { opacity: 0; }
.bwrap[data-depth="1"] .banner, .bwrap[data-depth="2"] .banner { pointer-events: auto; }
html:has(.shell) .banners { left: calc(282px + (100% - 282px) / 2); width: min(440px, calc(100% - 314px)); }
/* on the public pages the banner drops in just under the top bar, not on top of it (where the two would sit at the
   same height and look merged); when the bar slides away on a phone, the banner moves up with it */
html:has(.public-top) .banners { top: 84px; transition: top .6s var(--spring-bouncy); }
html[data-chrome=away]:has(.public-top) .banners { top: max(10px, env(safe-area-inset-top)); }
.banner {
  pointer-events: auto; position: relative; isolation: isolate; display: flex; align-items: center; gap: .75rem;
  padding: .7rem .75rem .7rem .7rem; border-radius: 24px; color: var(--ink); text-decoration: none; font-weight: 500;
  background: linear-gradient(160deg, rgba(255, 255, 255, .74), rgba(255, 255, 255, .5));
  -webkit-backdrop-filter: var(--rf, blur(30px)) saturate(190%) brightness(1.04); backdrop-filter: var(--rf, blur(30px)) saturate(190%) brightness(1.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 0 0 1px rgba(18, 28, 60, .06), 0 16px 38px -14px rgba(18, 28, 48, .38), 0 3px 10px rgba(18, 28, 48, .08);
  touch-action: none; -webkit-user-select: none; user-select: none; cursor: default;
  transform-origin: 50% 0;
  animation: banner-in .7s var(--spring-bouncy) backwards;
}
.banner::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: var(--rim); pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.banner::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 70%);
  transition: opacity .3s var(--spring-smooth);
}
.banner:hover::after { opacity: 1; }
a.banner { cursor: pointer; transition: scale .35s var(--spring-bouncy); }
a.banner:hover { color: var(--ink); }
a.banner:active { scale: .975; }
@keyframes banner-in { from { transform: translateY(calc(-100% - 28px)) scale(.9); opacity: 0; } 35% { opacity: 1; } to { transform: none; opacity: 1; } }
.banner.banner-out { animation: banner-out .36s cubic-bezier(.5, 0, .8, .4) forwards; pointer-events: none; }
@keyframes banner-out { to { transform: translateY(calc(-100% - 36px)) scale(.92); opacity: 0; } }
.banner-sym { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; }
.banner-ok .banner-sym { background: linear-gradient(180deg, #4cd964, #28b44a); box-shadow: 0 3px 8px -2px rgba(40, 180, 74, .55); }
.banner-error .banner-sym { background: linear-gradient(180deg, #ff5a4f, #e5352b); box-shadow: 0 3px 8px -2px rgba(229, 53, 43, .55); }
.banner-tick { stroke-dasharray: 20; stroke-dashoffset: 20; animation: banner-tick .42s ease-out .34s forwards; }
@keyframes banner-tick { to { stroke-dashoffset: 0; } }
/* The icon comes alive as the banner lands, as on an iPhone: its disc pops in on a spring; a tick draws itself and
   gives a little bump; an error's "!" drops in, its dot bounces, and the disc shakes no, like a wrong passcode.
   (The pop uses transform, the bump scale and the shake translate, so they never fight over one property.) */
.banner-sym { animation: sym-pop .6s .14s var(--spring-bouncy) backwards; }
.banner-ok .banner-sym { animation: sym-pop .6s .14s var(--spring-bouncy) backwards, sym-bump .5s .76s var(--spring-bouncy); }
.banner-error .banner-sym { animation: sym-pop .6s .14s var(--spring-bouncy) backwards, sym-shake .5s .72s ease-in-out; }
@keyframes sym-pop { from { transform: scale(.25) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sym-bump { 0%, 100% { scale: 1; } 40% { scale: 1.16; } }
@keyframes sym-shake { 0%, 100% { translate: 0 0; } 14% { translate: -4px 0; } 30% { translate: 4px 0; } 46% { translate: -3px 0; } 62% { translate: 2.5px 0; } 78% { translate: -1.2px 0; } }
.bang-l { stroke-dasharray: 7; stroke-dashoffset: 7; animation: banner-tick .26s cubic-bezier(.3, 0, .2, 1) .36s forwards; }
.bang-d { transform-box: fill-box; transform-origin: center; animation: bang-dot .55s .54s var(--spring-bouncy) both; }
@keyframes bang-dot { from { transform: scale(0); } to { transform: none; } }
/* a live alert: the RoadSense tile plays its own move (the lane marks run, the waves ping; banners.js) */
.banner-app .mark { transform-origin: 50% 60%; }
.banner-app { flex: none; }
.banner-app .mark { width: 38px; height: 38px; border-radius: 10px; }
.banner-body { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.banner-top { display: flex; align-items: baseline; gap: .6rem; }
.banner-title { font-weight: 650; font-size: .93rem; min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner-time { flex: none; font-size: .76rem; color: var(--muted); }
.banner-text { font-size: .9rem; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.banner-alert .banner-text { color: var(--muted); font-size: .87rem; }
.banner-ok .banner-text, .banner-error .banner-text { font-weight: 550; }
.banner-close {
  flex: none; align-self: flex-start; display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%;
  background: rgba(18, 24, 30, .07); color: var(--muted); cursor: pointer; opacity: 0;
  transition: opacity .2s var(--spring-smooth), transform .35s var(--spring-bouncy);
}
.banner:hover .banner-close, .banner-close:focus-visible { opacity: 1; }
.banner-close:active { transform: scale(.85); }
html[data-theme=dark] .banner {
  background: linear-gradient(160deg, rgba(58, 63, 74, .8), rgba(32, 35, 43, .72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 0 0 1px rgba(0, 0, 0, .45), 0 16px 38px -14px rgba(0, 0, 0, .7);
}
html[data-theme=dark] .banner::after { background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .1), rgba(255, 255, 255, 0) 70%); }
html[data-theme=dark] .banner-close { background: rgba(255, 255, 255, .1); }
@media (max-width: 900px) {
  html:has(.shell) .banners { left: 50%; width: calc(100% - 24px); }
  .banners { top: max(10px, env(safe-area-inset-top)); }
}
@media (prefers-reduced-motion: reduce) {
  .banner, .banner.banner-out { animation-duration: .01s; }
  .banner-tick, .bang-l { animation: none; stroke-dashoffset: 0; }
  .banner-sym, .banner-ok .banner-sym, .banner-error .banner-sym, .bang-d, .banner-app .mark, .banner-app .mark * { animation: none !important; }
}

/* Reduce Transparency or Increase Contrast: the notification banners and the undo bar turn solid, like the rest */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .banner, .undo-toast { background: rgba(255, 255, 255, .97); }
  html[data-theme=dark] .banner, html[data-theme=dark] .undo-toast { background: rgba(35, 38, 45, .98); }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .banner, .undo-toast { -webkit-backdrop-filter: none; backdrop-filter: none; background: #fff; box-shadow: 0 0 0 1px rgba(18, 24, 30, .3), 0 12px 30px -12px rgba(18, 28, 48, .35); }
  html[data-theme=dark] .banner, html[data-theme=dark] .undo-toast { background: #23262d; box-shadow: 0 0 0 1px rgba(255, 255, 255, .28), 0 12px 30px -12px rgba(0, 0, 0, .7); }
}

/* =====================================================================================================================
   CONTENT IS SOLID, as Apple does it. Liquid Glass is only for what floats above the content (the sidebar, buttons,
   pills, menus, the date picker, dialogs, banners, the undo bar). The content itself sits on Apple's grouped
   background (light grey, or black in the dark) in solid cards (white, or #1c1c1e in the dark), and a page's title
   is a large title on the background, not inside a card. The colourful wallpaper is kept only for the landing page.
   ===================================================================================================================== */
:root {
  --paper: #f2f2f7;
  --surface: #ffffff;
  --surface-line: rgba(18, 24, 30, .05);
  --surface-shadow: 0 1px 2px rgba(18, 24, 30, .04), 0 12px 28px -20px rgba(18, 24, 30, .2);
}
html[data-theme=dark] {
  --paper: #000000;
  --surface: #1c1c1e;
  --surface-line: rgba(255, 255, 255, .07);
  --surface-shadow: none;
}
body::before, html[data-theme=dark] body::before { background: var(--paper); }
html[data-theme] .page-head { background: none; border-color: transparent; box-shadow: none; padding: .35rem .35rem .15rem; }
html[data-theme] .page-head h1 { font-size: 2.15rem; }

/* the zoom's sheet where pages cannot morph (Firefox): a plain page-coloured card that grows out of a record's pill,
   or shrinks back into it (glass.js and app.html) */
.zoom-sheet { position: fixed; z-index: 90; pointer-events: none; background: var(--paper); box-shadow: 0 24px 60px -20px rgba(18, 28, 48, .35); }

/* ---------- lists: the liquid-glass pill behind the row under the pointer (rows.js) ---------- */
.table-wrap.has-row-lens > table { position: relative; z-index: 1; }
/* room around the table for the pill's rounded ends and its shadow, so the list's edge never cuts them off (the
   negative margin gives the room back, so the table sits exactly where it did) */
.table-wrap.has-row-lens { padding: 0 10px 18px; margin: 0 -10px -18px; }
.row-lens {
  position: absolute; left: 0; top: 0; width: 100%; height: 0; z-index: 0; border-radius: 999px; pointer-events: none;
  opacity: 0; transform-origin: 50% 50%; will-change: transform, opacity; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(234, 240, 248, .6) 50%, rgba(255, 255, 255, .85)), rgba(206, 218, 238, .3);
  box-shadow: inset 0 1.5px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .9), inset 0 -7px 10px -8px #fff,
              inset 10px 0 14px -12px rgba(90, 160, 255, .65), inset -10px 0 14px -12px rgba(255, 120, 170, .55),
              0 0 0 1px rgba(18, 28, 60, .07), 0 8px 18px -10px rgba(22, 44, 78, .32);
}
.row-lens::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(160px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 70%);
}
html[data-theme=dark] .row-lens {
  background: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .03) 50%, rgba(255, 255, 255, .08)), rgba(64, 68, 78, .4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), inset 0 0 0 1px rgba(255, 255, 255, .06),
              inset 10px 0 14px -12px rgba(90, 160, 255, .45), inset -10px 0 14px -12px rgba(255, 120, 170, .35),
              0 0 0 1px rgba(0, 0, 0, .45), 0 10px 22px -12px rgba(0, 0, 0, .7);
}
html[data-theme=dark] .row-lens::after { background: radial-gradient(160px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 70%); }
/* the pill replaces the flat row tint, and the lines next to it step aside, as in an Apple list */
.has-row-lens tbody tr:hover, html[data-theme=dark] .has-row-lens tbody tr:hover { background: transparent; }
.has-row-lens tbody td { transition: border-color .2s var(--spring-smooth); }
.has-row-lens tr.lens-on > td, .has-row-lens tr:has(+ tr.lens-on) > td { border-bottom-color: transparent; }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .row-lens { background: #eef1f6; box-shadow: 0 0 0 1px rgba(18, 24, 30, .25); }
  html[data-theme=dark] .row-lens { background: #2c2c2e; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
}

/* dragging the list's glass pill: the pointer holds it, and no words get selected on the way */
.table-wrap.lens-dragging, .table-wrap.lens-dragging * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }

/* Changing page from the menu (or any link within the app): the sidebar stays still and the page you are on
   dissolves (a little blur, a little smaller, fading) while the next one materialises in its place (from a blur, a
   touch larger, settling on a spring), as Apple's Liquid Glass moves between views. Chrome, Edge and Safari; other
   browsers keep the opening animation. */
html.vt-page::view-transition-old(root), html.vt-page::view-transition-new(root) { animation: none; }
html.vt-page::view-transition-old(rs-page-out) { animation: page-out .24s cubic-bezier(.4, 0, 1, 1) both; transform-origin: 30% 20%; }
html.vt-page::view-transition-new(rs-page-in) {
  transform-origin: 30% 20%;
  animation: page-in .55s var(--spring-snappy) both, page-in-fade .24s ease both;
}
::view-transition-group(rs-page-out), ::view-transition-group(rs-page-in) { animation-duration: .01s; }
@keyframes page-out { to { opacity: 0; filter: blur(10px); transform: scale(.985); } }
@keyframes page-in { from { filter: blur(12px); transform: scale(1.018); } to { filter: blur(0); transform: none; } }
@keyframes page-in-fade { from { opacity: 0; } to { opacity: 1; } }

/* a menu tab grows into its page from a stand-in in its place (glass.js), as a record does from its pill */
.vt-ghost { position: fixed; z-index: 2147483000; pointer-events: none; border-radius: 999px; opacity: 0; }   /* on top, so the page growing out of it is too */
/* Back into a record: the record's pill catches the page closing into it with a little spring (a squeeze and a
   bounce back, on its size only, so its glass is untouched), and the closing itself settles with a touch of bounce */
.rs-arrive { animation: rs-arrive .72s both; }
@keyframes rs-arrive {
  0% { scale: 1; animation-timing-function: cubic-bezier(.3, 0, .6, 1); }
  26% { scale: .9; animation-timing-function: var(--spring-bouncy); }
  100% { scale: 1; }
}
@media (prefers-reduced-motion: reduce) { .rs-arrive { animation: none; } }

/* ---------- the Dynamic Island (island.js): black in light and dark alike, as on an iPhone ----------
   Its size springs between compact (what is playing and the spectrum), open (press and hold: the Live Activity with
   the time and the controls) and Face ID (a rounded square while signing in); what is inside cross-fades. */
#rs-island {
  position: fixed; top: 10px; left: 50%; translate: -50% 0; z-index: 2147483000; overflow: hidden;
  width: 126px; height: 38px; border-radius: 22px; background: #000; color: #fff;
  font: 600 13px/1.2 var(--body); letter-spacing: -.01em; -webkit-user-select: none; user-select: none; touch-action: manipulation;
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .6), 0 0 0 .5px rgba(255, 255, 255, .07);
  opacity: 0; scale: .32 .62; visibility: hidden; pointer-events: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: width .56s var(--spring-bouncy), height .56s var(--spring-bouncy), border-radius .56s var(--spring-bouncy), scale .45s var(--spring-bouncy);
}
#rs-island.isl-on { opacity: 1; scale: 1 1; visibility: visible; pointer-events: auto; animation: isl-in .66s var(--spring-bouncy) backwards; }
#rs-island.isl-on:hover:not(.isl-big) { scale: 1.035 1.035; }
#rs-island.isl-out { visibility: visible; animation: isl-out .36s cubic-bezier(.4, 0, .6, 1) forwards; }
#rs-island.isl-big { border-radius: 44px; cursor: default; }
#rs-island.isl-faceid { border-radius: 46px; cursor: default; }
@keyframes isl-in { 0% { opacity: 0; scale: .32 .62; } 25% { opacity: 1; } 100% { opacity: 1; scale: 1 1; } }
@keyframes isl-out { from { opacity: 1; scale: 1 1; } to { opacity: 0; scale: .3 .6; } }
.isl-compact, .isl-expanded, .isl-face { position: absolute; left: 0; top: 0; transition: opacity .3s ease, filter .3s ease, scale .45s var(--spring-bouncy); }
.isl-compact { display: flex; align-items: center; gap: 18px; height: 38px; padding: 0 13px 0 8px; white-space: nowrap; }
.isl-expanded { width: 100%; padding: 18px 20px 16px; opacity: 0; filter: blur(6px); scale: .9; pointer-events: none; }
.isl-face { inset: 0; display: grid; place-items: center; opacity: 0; filter: blur(6px); scale: .8; pointer-events: none; }
#rs-island.isl-big .isl-compact, #rs-island.isl-faceid .isl-compact { opacity: 0; filter: blur(6px); scale: .9; pointer-events: none; }
#rs-island.isl-big .isl-expanded { opacity: 1; filter: none; scale: 1; pointer-events: auto; transition-delay: .08s; }
#rs-island.isl-faceid .isl-face { opacity: 1; filter: none; scale: 1; transition-delay: .1s; }
#rs-island.isl-on:not(.isl-faceid):not(.isl-big) .isl-compact { animation: isl-content .42s ease .14s backwards; }
@keyframes isl-content { from { opacity: 0; filter: blur(4px); } to { opacity: 1; filter: none; } }
#rs-island button:focus-visible { outline: 2px solid rgba(255, 255, 255, .7); outline-offset: 2px; }
.isl-lead { display: flex; align-items: center; gap: 8px; }
.isl-glyph, .isl-art { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 8px; color: #30d158;
  background: linear-gradient(180deg, #3a3a3c, #1c1c1e); box-shadow: inset 0 .5px 0 rgba(255, 255, 255, .18); }
.isl-glyph svg { width: 15px; height: 15px; }
.isl-art { width: 46px; height: 46px; border-radius: 12px; }
.isl-art svg { width: 26px; height: 26px; }
.isl-live { width: 9px; height: 9px; border-radius: 50%; background: #ff453a; box-shadow: 0 0 10px #ff453a; animation: isl-dot 1.6s ease-in-out infinite; }
.isl-art .isl-live { width: 14px; height: 14px; }
@keyframes isl-dot { 50% { opacity: .45; } }
.isl-title { color: rgba(255, 255, 255, .92); }
.isl-wave { display: flex; align-items: center; gap: 2.5px; height: 24px; }
/* each bar: the low notes on the left in green, the high ones on the right in white; its height is the sound */
.isl-wave i { display: block; flex: none; width: 3px; border-radius: 2px; height: calc(3px + var(--h, 0) * 20px);
  background: color-mix(in oklab, #30d158 calc((1 - var(--k)) * 100%), #f5f5f7); }
.isl-head { display: flex; align-items: center; gap: 12px; }
.isl-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.isl-t1 { font-size: 15px; font-weight: 650; }
.isl-t2 { font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, .55); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.isl-wave-big { height: 40px; gap: 2px; }
.isl-wave-big i { width: 2.5px; height: calc(3px + var(--h, 0) * 36px); }
.isl-prog { display: flex; align-items: center; gap: 10px; margin: 16px 2px 8px; font: 600 11px/1 var(--body); color: rgba(255, 255, 255, .55); font-variant-numeric: tabular-nums; }
.isl-cur, .isl-dur { min-width: 34px; } .isl-dur { text-align: right; }
.isl-track { flex: 1; height: 5px; border-radius: 4px; background: rgba(255, 255, 255, .18); overflow: hidden;
  transition: height .4s var(--spring-bouncy), background .25s ease; }
.isl-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: rgba(255, 255, 255, .85); transition: background .25s ease; }
/* the scrubber (island.js), as on an iPhone: a tall row to grab, and while held the bar swells and brightens and the
   times light up */
#rs-island:not(.isl-is-live) .isl-prog { cursor: pointer; touch-action: none; margin: 10px 2px 2px; padding: 6px 0; }
.isl-cur, .isl-dur { transition: color .25s ease; }
#rs-island.isl-scrub .isl-track { height: 9px; background: rgba(255, 255, 255, .26); }
#rs-island.isl-scrub .isl-fill { background: #fff; }
#rs-island.isl-scrub .isl-cur, #rs-island.isl-scrub .isl-dur { color: rgba(255, 255, 255, .92); }
#rs-island.isl-is-live .isl-dur { color: #ff453a; letter-spacing: .06em; }
#rs-island.isl-is-live .isl-fill { background: linear-gradient(90deg, rgba(255, 69, 58, .5), #ff453a); }
.isl-ctrl { display: flex; justify-content: center; align-items: center; }   /* play/pause alone, in the middle */
.isl-ctrl button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer;
  transition: background .2s ease, scale .35s var(--spring-bouncy); }
.isl-ctrl button svg { width: 24px; height: 24px; }
.isl-ctrl button:hover { background: rgba(255, 255, 255, .12); }
.isl-ctrl button:active { scale: .86; }
.isl-ctrl .isl-play svg { width: 30px; height: 30px; }
/* in the app, the island sits over the middle of the page beside the sidebar, where the banners drop in */
html:has(.shell) #rs-island { left: calc(282px + (100% - 282px) / 2); }
@media (max-width: 900px) { html:has(.shell) #rs-island { left: 50%; } }
/* while the island shows, the banners drop in under it instead of colliding with it (as on an iPhone) */
/* notifications drop in just under the island, as on an iPhone, however big it is (compact, open, or the Face ID
   scan): island.js says where its bottom is (--isl-bottom) */
html.island-on .banners { top: max(var(--banners-top, 14px), calc(var(--isl-bottom, 48px) + 10px)); }
html.island-on:has(.public-top) .banners { top: max(84px, calc(var(--isl-bottom, 48px) + 10px)); }
.banners { transition: top .5s var(--spring-bouncy); }
@media (prefers-reduced-motion: reduce) { #rs-island, #rs-island.isl-on, #rs-island.isl-out, #rs-island > * { animation: none; transition: none; } }

/* ---------- Face ID (face.js, passkey.py) ----------
   In the island: a rounded square with Apple's Face ID glyph. Looking: the brackets breathe and a ring turns.
   Recognised: the face gives way to a green ring that closes and a tick that draws itself. Not recognised: the face
   shakes no, and the island with it, as an iPhone does. */
.fid { display: grid; place-items: center; gap: 8px; color: #fff; }
.fid-svg { width: 66px; height: 66px; overflow: visible; }
.fid-face { transform-box: view-box; transform-origin: 40px 40px; transition: opacity .3s ease, scale .45s var(--spring-bouncy); }
.fid-ring { opacity: 0; stroke-dasharray: 18 82; transform-box: view-box; transform-origin: 40px 40px; transition: opacity .3s ease, stroke-dasharray .5s ease; }
.fid-tick { stroke-dasharray: 1; stroke-dashoffset: 1; color: #30d158; }
.fid-text { font: 600 12px/1 var(--body); color: rgba(255, 255, 255, .8); letter-spacing: 0; }
#rs-island[data-face=scan] .fid-face { animation: fid-breathe 1.5s ease-in-out infinite; }
#rs-island[data-face=scan] .fid-ring { opacity: .9; animation: fid-turn 1.1s linear infinite; transition-delay: .7s; }
#rs-island[data-face=ok] .fid-face { opacity: 0; scale: .55; }
#rs-island[data-face=ok] .fid-ring { opacity: 1; stroke-dasharray: 100 0; color: #30d158; }
#rs-island[data-face=ok] .fid-tick { animation: fid-draw .42s .18s cubic-bezier(.3, 0, .2, 1) forwards; }
#rs-island[data-face=ok] .fid-text { color: #30d158; }
#rs-island[data-face=fail] .fid-face { animation: fid-no .55s ease-in-out; }
#rs-island[data-face=fail] { animation: isl-no .55s ease-in-out; }
@keyframes fid-breathe { 50% { scale: .9; } }
@keyframes fid-turn { to { rotate: 360deg; } }
@keyframes fid-draw { to { stroke-dashoffset: 0; } }
@keyframes fid-no { 0%, 100% { translate: 0 0; } 15% { translate: -7px 0; } 35% { translate: 7px 0; } 55% { translate: -5px 0; } 75% { translate: 3px 0; } }
@keyframes isl-no { 0%, 100% { translate: -50% 0; } 15% { translate: calc(-50% - 9px) 0; } 35% { translate: calc(-50% + 9px) 0; } 55% { translate: calc(-50% - 6px) 0; } 75% { translate: calc(-50% + 3px) 0; } }

/* the Log in card: "Sign in with Face ID"; while it runs, the form steps aside for the glyph */
.faceid { margin: 0 0 .9rem; }
.faceid-btn { width: 100%; justify-content: center; gap: .6rem; }
.faceid-stage { display: none; }
.auth-card.faceid-on > :not(h1):not(.faceid):not(.auth-icon) { display: none; }
.auth-card.faceid-on .faceid-btn { display: none; }
.auth-card.faceid-on .faceid-stage { display: grid; justify-items: center; gap: .7rem; padding: 1.2rem 0 .4rem; }
.faceid-glyph { width: 88px; height: 88px; color: var(--accent, #0a84ff); animation: fid-breathe 1.6s ease-in-out infinite; }
.faceid-say { margin: 0; font-weight: 600; font-size: 1.05rem; }
.faceid-note { margin: .7rem 0 0; padding: .6rem .9rem; border-radius: 14px; font-size: .9rem; font-weight: 550;
  background: rgba(255, 159, 10, .14); color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .fid-face, .fid-ring, .faceid-glyph, #rs-island[data-face] { animation: none !important; }
  #rs-island[data-face=ok] .fid-tick { animation: none; stroke-dashoffset: 0; }
}
/* the account page: this person's devices with Face ID */
.pk-list { list-style: none; margin: .4rem 0 1rem; padding: 0; display: grid; gap: .5rem; }
.pk-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding: .7rem .9rem; border-radius: 18px;
  background: rgba(255, 255, 255, .45); box-shadow: inset 0 0 0 1px rgba(18, 28, 60, .06); }
html[data-theme=dark] .pk-row { background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.pk-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--accent, #0a84ff);
  background: linear-gradient(180deg, rgba(10, 132, 255, .16), rgba(10, 132, 255, .06)); }
.pk-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.pk-meta .muted { font-size: .85rem; }
.pk-remove > summary { list-style: none; }
.pk-remove > summary::-webkit-details-marker { display: none; }
.pk-remove[open] { grid-column: 1 / -1; }
.pk-remove form { margin-top: .6rem; display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; }
.pk-remove .field { margin: 0; flex: 1; min-width: 200px; }

/* ==========================================================================================================
   THE APP FRAME, as Apple's apps are made (iPadOS 26 and iOS 26). The same menu, buttons, lens and motion;
   only the frame around them is Apple's:
   - on a computer, the sidebar's items are grouped under small section headers, as an iPad's sidebar is;
   - every page has a navigation bar: clear at the top; once the page scrolls, a soft blur rises under it (the
     scroll edge), and when the large title has gone under it, the title settles small in its middle;
   - on a phone, the top buttons float over the page as glass capsules (the logo, you, Log out as a symbol), and
     the menu is a floating Liquid Glass tab bar at the bottom, icon above label, with the same glass lens.
   ========================================================================================================== */
.nav-sec { margin: .55rem .85rem .05rem; font: 650 .76rem/1.2 var(--body); letter-spacing: .01em; color: var(--muted); opacity: .85; }
@media (min-width: 901px) and (max-height: 760px) { .nav-sec { display: none; } }
.lo-ico { display: none; flex: none; }

/* the navigation bar */
.navbar {
  position: sticky; top: 0; z-index: 25; height: 58px; margin: -18px calc(-1 * clamp(1rem, 2.4vw, 2rem)) -40px;
  display: grid; place-items: center; pointer-events: none;
}
.navbar::before {                                  /* the scroll edge: blur that fades out downward */
  content: ""; position: absolute; inset: 0 0 -26px; z-index: -1;
  -webkit-backdrop-filter: blur(12px) saturate(150%); backdrop-filter: blur(12px) saturate(150%);
  background: linear-gradient(to bottom, color-mix(in srgb, var(--paper) 82%, transparent), color-mix(in srgb, var(--paper) 0%, transparent));
  -webkit-mask: linear-gradient(#000 50%, transparent); mask: linear-gradient(#000 50%, transparent);
  opacity: 0; transition: opacity .3s var(--spring-smooth);
}
html.scrolled .navbar::before { opacity: 1; }
.nav-title {
  max-width: min(60%, 420px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 650 1.02rem/1.3 var(--head); letter-spacing: -.015em; color: var(--ink);
  opacity: 0; translate: 0 10px; filter: blur(3px);
  transition: opacity .25s var(--spring-smooth), translate .5s var(--spring-bouncy), filter .25s var(--spring-smooth);
}
html.title-docked .nav-title { opacity: 1; translate: 0 0; filter: none; }

/* a phone or a small tablet */
@media (max-width: 900px) {
  .shell { grid-template-rows: minmax(100vh, auto); }
  /* the sidebar's parts sit straight in the page, so each can float where an iPhone app keeps it */
  .side { display: contents; }
  .side::before, .side::after { display: none; }
  .side .btn.brand-pill, .side-foot {
    grid-column: 1; grid-row: 1; align-self: start; position: sticky; z-index: 30;
    top: max(10px, env(safe-area-inset-top)); margin: 10px 12px 0; transition: top .5s var(--spring-bouncy);
  }
  .side .btn.brand-pill { justify-self: start; }
  .side-foot { justify-self: end; }
  /* floating over the page, the top buttons are glass again */
  .side .btn { -webkit-backdrop-filter: var(--rf, blur(12px)) brightness(1.06) saturate(170%); backdrop-filter: var(--rf, blur(12px)) brightness(1.06) saturate(170%); }
  .side-foot .btn.logout-btn { width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 50%; }
  .logout-btn .lo-text { display: none; }
  .logout-btn .lo-ico { display: block; }
  .main { grid-column: 1; grid-row: 1; padding-top: 74px; padding-bottom: 118px; }

  /* the tab bar */
  .side nav, .nav-lens {
    grid-column: 1; grid-row: 1; align-self: end; justify-self: center; position: sticky; top: auto;
    bottom: max(12px, env(safe-area-inset-bottom)); margin: 0 10px 12px; border-radius: 999px;
  }
  .side nav {
    z-index: 30; max-width: calc(100% - 20px); gap: 0; padding: 5px; overflow-x: auto; overscroll-behavior-x: contain;
    background: var(--glass); box-shadow: var(--glass-shadow), inset 0 0 0 1px rgba(255, 255, 255, .5);
    -webkit-backdrop-filter: blur(22px) saturate(180%) brightness(1.05); backdrop-filter: blur(22px) saturate(180%) brightness(1.05);
  }
  html[data-theme=dark] .side nav { box-shadow: var(--glass-shadow), inset 0 0 0 1px rgba(255, 255, 255, .1); }
  .nav-lens { height: 64px; z-index: 31; }
  .side nav a {
    flex: none; flex-direction: column; justify-content: center; gap: 3px; min-width: 68px; padding: 7px 13px 9px;
    font-size: .68rem; font-weight: 600; letter-spacing: 0; line-height: 1.1; border-radius: 999px;
  }
  .side nav a .ico { width: 23px; height: 23px; }
  .side nav a:hover { background: transparent; }
  .nav-sec { display: none; }

  /* the navigation bar sits behind the top buttons; once the title docks, the logo pill folds to its tile */
  /* (its box is always as tall as it gets, so the page never moves; the blur and the title follow --nb-h) */
  .navbar { --nb-h: 66px; margin: -74px calc(-1 * clamp(1rem, 2.4vw, 2rem)) -38px; height: 112px; display: flex; align-items: flex-start; justify-content: center; }
  .navbar::before { bottom: auto; height: calc(var(--nb-h) + 22px); transition: opacity .3s var(--spring-smooth), height .5s var(--spring-bouncy); }
  .nav-title { max-width: calc(100% - 200px); margin-top: calc(var(--nb-h) - 36px);
    transition: opacity .25s var(--spring-smooth), translate .5s var(--spring-bouncy), filter .25s var(--spring-smooth), margin-top .5s var(--spring-bouncy); }
  .side .brand-pill .brand-name { display: inline-flex; max-width: 8em; overflow: hidden; transition: max-width .45s var(--spring-snappy), opacity .25s var(--spring-smooth); }
  html.title-docked .side .btn.brand-pill { padding-right: .25rem; gap: 0; }
  html.title-docked .side .brand-pill .brand-name { max-width: 0; opacity: 0; }

  /* scrolling down, the top buttons tuck away upward and spring back on the way up (glass.js sets data-chrome);
     the tab bar stays, as on an iPhone */
  .side, .nav-lens { transition: none; }
  html[data-chrome=away] .side, html[data-chrome=away] .nav-lens { transform: none; }
  .side-foot { transition: top .5s var(--spring-bouncy), transform .6s var(--spring-bouncy); }
  .side .btn.brand-pill { transition: top .5s var(--spring-bouncy), padding .45s var(--spring-snappy), gap .45s var(--spring-snappy), transform .6s var(--spring-bouncy), background .2s var(--spring-smooth), box-shadow .2s var(--spring-smooth), color .2s var(--spring-smooth); }
  html[data-chrome=away] .side .btn.brand-pill, html[data-chrome=away] .side-foot { transform: translateY(-130px); }

  /* the Dynamic Island sits between the top buttons, as on an iPhone: the logo folds to its tile to make room, the
     island shows only its icon and its wave (no title, as an iPhone's compact Live Activity), and the docked title
     steps aside while it shows */
  html.island-on .side .btn.brand-pill { padding-right: .25rem; gap: 0; }
  html.island-on .side .brand-pill .brand-name { max-width: 0; opacity: 0; }
  html:has(.shell) #rs-island .isl-compact .isl-title { display: none; }
  html.island-on .nav-title { opacity: 0; translate: 0 -6px; }

  /* changing page, the floating parts stay put above the page that opens (their own layers in the morph) */
  .side .btn.brand-pill { view-transition-name: rs-brand; }
  .side-foot { view-transition-name: rs-foot; }
  .side nav { view-transition-name: rs-tabs; }
  .nav-lens { view-transition-name: rs-lens; }
  .undo-toast { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 80px); }
}
::view-transition-group(rs-brand), ::view-transition-group(rs-foot), ::view-transition-group(rs-tabs) { z-index: 5; }
::view-transition-group(rs-lens) { z-index: 6; }
@media (max-width: 900px) and (prefers-reduced-transparency: reduce), (max-width: 900px) and (prefers-contrast: more) {
  .side nav { -webkit-backdrop-filter: none; backdrop-filter: none; background: #fff; }
  html[data-theme=dark] .side nav { background: rgba(26, 29, 35, .98); }
}
@media (prefers-reduced-motion: reduce) { .nav-title, .navbar, .side .btn.brand-pill, .side .brand-pill .brand-name { transition: none; } }

/* ==========================================================================================================
   LISTS AND RECORDS, as Apple's apps show them.
   - On a phone a list is an inset grouped list, as in iOS: each row is a cell, its record or name first with its
     status on the right, the details under it, and its buttons at the end. The same table underneath (the row's
     glass lens, choosing, deleting and undoing work as before); only a list of four columns or more becomes cells,
     so a small table of numbers stays a table. Bare numbers carry their column's name (data-label).
   - A record's details are a grouped list: label and value, rows divided by hairlines, as iOS's "About" list.
   ========================================================================================================== */
dl.facts-list { gap: 0; }
dl.facts-list > dt, dl.facts-list > dd { padding: .7rem 0; }
dl.facts-list > dd { padding-left: 1rem; }                  /* (the space is inside the row, so its hairline is unbroken) */
@media (max-width: 700px) { dl.facts-list { grid-template-columns: 6.6rem minmax(0, 1fr); } }
dl.facts-list > dt:not(:first-child), dl.facts-list > dt:not(:first-child) + dd { border-top: 1px solid var(--line); }
html[data-theme=dark] dl.facts-list > dt:not(:first-child), html[data-theme=dark] dl.facts-list > dt:not(:first-child) + dd { border-top-color: rgba(255, 255, 255, .09); }
dl.facts-list > dt:first-child, dl.facts-list > dt:first-child + dd { padding-top: .2rem; }

@media (max-width: 700px) {
  .table-wrap > table:has(> tbody > tr > td:nth-child(4)), .table-wrap > table:has(> tbody > tr > td:nth-child(4)) > tbody { display: block; width: 100%; }
  .table-wrap > table:has(> tbody > tr > td:nth-child(4)) > thead {          /* read out, not shown */
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .table-wrap tbody > tr:has(> td:nth-child(4)) {
    display: flex; flex-wrap: wrap; align-items: center; gap: 5px 14px; padding: 13px 14px 12px;
    border-bottom: 1px solid var(--line);
  }
  html[data-theme=dark] .table-wrap tbody > tr:has(> td:nth-child(4)) { border-bottom-color: rgba(255, 255, 255, .09); }
  .table-wrap tbody > tr:has(> td:nth-child(4)):last-child { border-bottom: 0; }
  /* (a line break after the first line, so the details always start their own line) */
  .table-wrap tbody > tr:has(> td:nth-child(4))::before { content: ""; order: 2; flex-basis: 100%; height: 0; }
  .table-wrap tbody > tr:has(> td:nth-child(4)) > td {
    display: block; order: 3; width: auto; padding: 0; border: 0; text-align: left; white-space: normal;
    font-size: .88rem; line-height: 1.35; color: var(--muted);
  }
  /* the first line: the record (or name, or plate) and its status */
  .table-wrap tbody > tr:has(> td:nth-child(4)) > td:first-child { order: 0; flex: 1 1 auto; min-width: 0; font-size: 1rem; font-weight: 600; color: var(--ink); }
  .table-wrap tbody > tr:has(> td:nth-child(4)) > td:not(:first-child):has(> .chip) { order: 1; margin-left: auto; }
  /* its buttons, or its link to the records, at the end of the details, on the right */
  .table-wrap tbody > tr:has(> td:nth-child(4)) > td.actions,
  .table-wrap tbody > tr:has(> td:nth-child(4)) > td:last-child:not(:first-child):has(> a.rec) { order: 4; margin-left: auto; width: auto; padding: 0; }
  .table-wrap tbody > tr:has(> td:nth-child(4)) > td.opt { display: none; }
  /* a list's panel keeps iOS's narrower insets, so a cell's first line has room for its status */
  .panel:has(> .table-wrap > table > tbody > tr > td:nth-child(4)) { padding-left: 8px; padding-right: 8px; }
  .panel:has(> .table-wrap > table > tbody > tr > td:nth-child(4)) > :not(.table-wrap) { margin-left: 14px; margin-right: 14px; }
  .table-wrap tbody > tr > td[data-label]::before { content: attr(data-label) " "; color: var(--muted); font-weight: 500; }
  .table-wrap tbody > tr > td.num[data-label] { color: var(--ink); font-weight: 600; }
}

/* ==========================================================================================================
   FORMS AND SETTINGS, as Apple's System Settings lays them out: on a computer each setting is a row in its group,
   its name on the left (and any hint in grey under the name), its box or menu on the right, and a hairline between
   rows. Notes between rows read as the group's footnotes. A phone keeps the name above the box, as iOS does on a
   narrow screen. Filter bars and the small forms inside a list keep their own layouts. Every field, button and
   behaviour is the same.
   ========================================================================================================== */
@media (min-width: 901px) {
  .panel .grid-2:has(> .field) { display: block; }
  .panel .field:not(.filters .field):not(.pk-remove .field) {
    display: grid; grid-template-columns: minmax(11rem, 36%) minmax(0, 1fr); align-items: center; column-gap: 1.75rem;
    margin: 0; padding: .8rem 0; border-bottom: 1px solid var(--line);
  }
  html[data-theme=dark] .panel .field:not(.filters .field):not(.pk-remove .field) { border-bottom-color: rgba(255, 255, 255, .09); }
  .panel .field:not(.filters .field):not(.pk-remove .field) > label { grid-column: 1; margin: 0; font-weight: 550; }
  .panel .field:not(.filters .field):not(.pk-remove .field) > label .hint { display: block; margin-top: .15rem; font-size: .82rem; line-height: 1.35; }
  .panel .field:not(.filters .field):not(.pk-remove .field) > :not(label) { grid-column: 2; min-width: 0; }
  .panel .field:not(.filters .field):not(.pk-remove .field) > :not(label) + :not(label) { margin-top: .45rem; }
  /* a row's box is as wide as its column, a short number a little narrower, as a Mac's are */
  .panel .field:not(.filters .field):not(.pk-remove .field) > input[type=number] { max-width: 14rem; }
  /* the group's last row before its buttons or its end: no hairline under it */
  .panel :not(.grid-2) > .field:not(.filters .field):not(.pk-remove .field):last-child,
  .panel .grid-2:last-child > .field:last-child { border-bottom: 0; }
  /* notes between rows: footnotes, small and grey */
  .panel .field + p.muted, .panel .grid-2 + p.muted { margin-top: .7rem; font-size: .9rem; }
  .panel p.muted + .field, .panel p.muted + .grid-2 { margin-top: .3rem; }
}
/* a switch, on a computer or a phone: what it does on the left, the switch on the right, a row in its group */
.panel label.check { display: flex; align-items: center; gap: 1.5rem; margin: 0; padding: .85rem 0; border-bottom: 1px solid var(--line); }
html[data-theme=dark] .panel label.check { border-bottom-color: rgba(255, 255, 255, .09); }
.panel label.check > .sw { order: 2; margin-left: auto; flex: none; }
.panel label.check:last-child { border-bottom: 0; }
@media (max-width: 700px) { .panel label.check { gap: 1rem; } }

/* ==========================================================================================================
   THE DRIVER'S SIDE AND THE PUBLIC PAGES, as Apple's are:
   - a sign-in sheet (log in, sign up, forgot password, the code, a new password) opens with the app's icon above a
     centred title, and its other ways out (Forgot password?, Create an account) are centred under its button;
   - on a phone, the public pages' top buttons float over the page as glass capsules, as the app's do;
   - on a phone, an odd last tile on a dashboard runs the whole width, as a wide widget does on iOS.
   ========================================================================================================== */
.auth-icon { display: grid; place-items: center; margin: -.2rem 0 1rem; }
.auth-icon .mark { width: 64px; height: 64px; border-radius: 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 0 0 1px rgba(255, 255, 255, .07), 0 0 0 1px rgba(10, 14, 20, .12), 0 14px 26px -12px rgba(10, 14, 20, .55); }
.auth-icon .mark svg { width: 42px; height: 42px; }
.auth-card > h1 { text-align: center; }
.auth-card > h1 + p { text-align: center; margin-top: -.5rem; }
.auth-card .auth-foot { justify-content: center; text-align: center; }
.auth-card .faceid-note { text-align: center; }
html[data-theme=dark] .auth-icon .mark { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 0 0 1px rgba(255, 255, 255, .1), 0 14px 26px -12px rgba(0, 0, 0, .8); }

@media (max-width: 700px) {
  .public-top { background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding-left: .2rem; padding-right: .2rem; }
  .public-top::before, .public-top::after { display: none; }
  .public-top .btn { -webkit-backdrop-filter: var(--rf, blur(12px)) brightness(1.06) saturate(170%); backdrop-filter: var(--rf, blur(12px)) brightness(1.06) saturate(170%); }
  .stats > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---------- Face ID with the laptop camera (face.js): a round camera view with a ring, as Apple's Face ID set-up ---------- */
.faceid-cam { position: relative; width: 184px; height: 184px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(10, 132, 255, .10), rgba(10, 132, 255, .02) 70%); }
.faceid-cam .faceid-video { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); border-radius: 50%;
  object-fit: cover; transform: scaleX(-1); opacity: 0; scale: .92; transition: opacity .35s var(--spring-smooth), scale .6s var(--spring-bouncy); background: #000; }
.faceid-cam.live .faceid-video { opacity: 1; scale: 1; }
.faceid-cam .faceid-glyph { position: relative; width: 86px; height: 86px; color: var(--accent, #0a84ff); transition: opacity .3s var(--spring-smooth), scale .45s var(--spring-bouncy); }
.faceid-cam.live .faceid-glyph { opacity: 0; scale: .7; }
.faceid-ring { position: absolute; inset: 0; width: 100%; height: 100%; rotate: -90deg; overflow: visible; pointer-events: none; }
.faceid-ring circle { fill: none; stroke: var(--accent, #0a84ff); stroke-width: 3.2; stroke-linecap: round;
  stroke-dasharray: calc(var(--fid-done, 0) * 100) 100; transition: stroke-dasharray .35s var(--spring-smooth), stroke .3s ease; opacity: .35; }
.faceid-cam.live .faceid-ring circle { opacity: 1; }
.faceid-cam.seen .faceid-ring circle { stroke: #30d158; }
.faceid-cam.done .faceid-ring circle { stroke: #30d158; stroke-dasharray: 100 0; }
.faceid-cam.done .faceid-video { filter: saturate(.6) brightness(1.05); }
.faceid-enrol { display: grid; justify-items: center; gap: .8rem; padding: .6rem 0 .4rem; }
.faceid-enrol[hidden], .faceid-actions[hidden] { display: none; }
.faceid-msg.bad { color: #b81d30; }
html[data-theme=dark] .faceid-msg.bad { color: #ff8a96; }
/* the button grows into the camera view and the camera view closes back into it, on the app's open/close spring */
/* the Dynamic Island while the Face ID card zooms (face.js): shown live, where it is, never frozen or faded */
/* (and the notifications, the same way, just under it) */
::view-transition-group(rs-island) { animation: none; z-index: 4; }
::view-transition-group(rs-banners) { animation: none; z-index: 3; }
::view-transition-old(rs-island), ::view-transition-old(rs-banners) { display: none; }
::view-transition-new(rs-island), ::view-transition-new(rs-banners) { animation: none; }
::view-transition-group(rs-fid), ::view-transition-group(rs-fid-card) { animation-duration: var(--zoom-time); animation-timing-function: var(--spring-zoom); }
::view-transition-image-pair(rs-fid) { overflow: clip; border-radius: 28px; }
::view-transition-old(rs-fid), ::view-transition-new(rs-fid) { width: 100%; height: 100%; object-fit: contain; }
@media (prefers-reduced-motion: reduce) { .faceid-cam .faceid-video, .faceid-cam .faceid-glyph, .faceid-ring circle { transition: none; } }

/* ---------- a group's buttons sit clear of its last row (no hairline under the last row, room above the buttons) ---------- */
@media (min-width: 901px) {
  .panel .field:not(.filters .field):not(.pk-remove .field):not(:has(+ .field, + .grid-2, + p.muted, + label.check)) { border-bottom: 0; }
  .panel .grid-2:not(:has(+ .field, + .grid-2, + p.muted, + label.check)) > .field:last-child { border-bottom: 0; }
  .panel .field:not(.filters .field):not(.pk-remove .field) + :not(.field):not(.grid-2):not(p):not(label.check):not(input[type=hidden]),
  .panel .grid-2:has(> .field) + :not(.field):not(.grid-2):not(p):not(label.check):not(input[type=hidden]) { margin-top: 1.1rem; }
}
/* (a phone: the boxes stand alone, with their own room) */
@media (max-width: 900px) {
  .panel .field + .btn, .panel .field + .inline, .panel .field + div:has(> .btn) { margin-top: .4rem; }
}

/* ---------- the Dynamic Island never covers the docked title: while it shows, the bar steps the title down under it
   (on a computer; a phone moves the title aside) ---------- */
@media (min-width: 901px) {
  .navbar { transition: height .5s var(--spring-bouncy), margin-bottom .5s var(--spring-bouncy), padding-top .5s var(--spring-bouncy); }
  html.island-on .navbar { height: 96px; margin-bottom: -78px; padding-top: 38px; }
}
/* the large title and the small one move as one (app.html): no slide or blur of their own then */
html.title-morph .nav-title { translate: none; filter: none; transition: margin-top .5s var(--spring-bouncy);
  opacity: 0; transform-origin: 0 0; will-change: transform, opacity; }     /* (app.html moves it, with the scroll) */
html.title-morph .main .page-head h1 { will-change: opacity; }
@media (max-width: 900px) { html.title-morph.island-on .nav-title { opacity: 0 !important; } }

/* ---------- a group of banners (banners.js), as on an iPhone: tucked in, the front one says "3 more notifications"
   and the ones behind show only as plates of the same height; opened, "Show Less" and x ("Clear All") at the top
   right, and it scrolls when it is long ---------- */
.banner-count { display: block; margin-top: 3px; font-size: .76rem; font-weight: 500; color: var(--muted); }
/* the plates behind: the front one's height, no words, a light shadow (three full shadows would pile up grey) */
.banners.stacked .bwrap:not([data-depth="0"]) .banner {
  box-sizing: border-box; height: var(--front-h, auto); overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 0 0 1px rgba(18, 28, 60, .06), 0 8px 18px -10px rgba(18, 28, 48, .28);
}
.banners.stacked .bwrap[data-depth="1"] .banner { background: linear-gradient(160deg, rgba(250, 251, 253, .82), rgba(244, 246, 250, .74)); }
.banners.stacked .bwrap[data-depth="2"] .banner { background: linear-gradient(160deg, rgba(244, 246, 250, .76), rgba(238, 241, 246, .68)); }
/* the front one of a group is a little more solid, so the plates behind it never show through it as a pale box with
   its own corners */
.banners.stacked .bwrap[data-depth="0"] .banner { background: linear-gradient(160deg, rgba(255, 255, 255, .95), rgba(252, 253, 255, .9)); }
html[data-theme=dark] .banners.stacked .bwrap[data-depth="0"] .banner { background: linear-gradient(160deg, rgba(60, 65, 77, .96), rgba(38, 41, 50, .94)); }
html[data-theme=dark] .banners.stacked .bwrap[data-depth="1"] .banner { background: linear-gradient(160deg, rgba(50, 54, 64, .86), rgba(34, 37, 45, .8)); }
html[data-theme=dark] .banners.stacked .bwrap[data-depth="2"] .banner { background: linear-gradient(160deg, rgba(44, 48, 57, .8), rgba(30, 33, 40, .74)); }
html[data-theme=dark] .banners.stacked .bwrap:not([data-depth="0"]) .banner { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 0 0 1px rgba(0, 0, 0, .4), 0 8px 18px -10px rgba(0, 0, 0, .6); }
.banners.stacked .bwrap { cursor: pointer; }

.banners-bar { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: flex-end; gap: 8px; z-index: 60;
  pointer-events: none; opacity: 0; scale: .9; transform-origin: 100% 50%;
  transition: opacity .25s var(--spring-smooth), scale .45s var(--spring-bouncy); }
.banners-bar.on { pointer-events: auto; opacity: 1; scale: 1; }
.banners-bar .btn { min-height: 30px; padding: 0 .9rem; font-size: .8rem; -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%); }
/* x, which opens into "Clear All" when pointed at (as on a Mac) */
.banners-bar .bb-clear { min-width: 30px; padding: 0 .56rem; gap: 0; }
.banners-bar .bb-clear svg { flex: none; }
.banners-bar .bb-clear span { display: inline-block; max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0;
  transition: max-width .4s var(--spring-bouncy), opacity .2s ease, margin .4s var(--spring-bouncy); }
.banners-bar .bb-clear:hover span, .banners-bar .bb-clear:focus-visible span { max-width: 6rem; opacity: 1; margin-left: .4rem; }
.banners.open { pointer-events: auto; }
.banners.open.scroll { overflow-y: auto; overflow-x: visible; overscroll-behavior: contain; scrollbar-width: none;
  max-height: calc(100vh - 40px); padding-bottom: 12px; box-sizing: content-box; }
.banners.open.scroll::-webkit-scrollbar { display: none; }
/* the controls sit over whatever is under the group (a logo, a heading): nearly solid, so they read cleanly and the
   page never shows bent through them */
.banners-bar .btn { background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(246, 248, 252, .92)); }
html[data-theme=dark] .banners-bar .btn { background: linear-gradient(180deg, rgba(64, 69, 80, .97), rgba(42, 46, 55, .94)); }
@media (prefers-reduced-motion: reduce) { .banners-bar, .banners-bar .bb-clear span { transition: none; } }
/* Face ID never looks like it is loading: no spinning arc in the island, no pulsing glyph, no countdown ring; the
   sign-in ring only appears, green, once you are recognised (set-up keeps its filling ring, as Apple's does) */
#rs-island[data-face=scan] .fid-ring { opacity: 0; animation: none; }
#rs-island[data-face=scan] .fid-face { animation: none; }
.faceid-cam .faceid-glyph { animation: none; }
.faceid-stage .faceid-cam:not(.done) .faceid-ring circle { opacity: 0; }
.faceid-enrol .faceid-ring circle { opacity: min(1, calc(var(--fid-done, 0) * 40)); }
/* Settings, Sign in with Google: the return address to register, with its Copy button, and the steps */
.google-uri { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: .2rem 0 .8rem; }
.google-uri code { font-size: .9rem; word-break: break-all; }
.google-steps { margin: 0 0 .8rem; padding-left: 1.3rem; display: grid; gap: .35rem; font-size: .9rem; }

/* Face ID's scan, as Apple's: the frame comes toward you and back while the face inside turns a little from side to
   side, in the island and in the circle until the camera's picture is there. (Not a loading spinner.) */
@keyframes fid-scan-frame { 0%, 100% { transform: scale(1); } 50% { transform: scale(.88); } }
@keyframes fid-scan-face { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-3.5px, -1px); } 50% { transform: translate(0, 1.2px); } 75% { transform: translate(3.5px, -1px); } }
.fid-c, .fid-f, .fid-eye, .fid-nose, .fid-mouth { transform-box: view-box; transform-origin: 40px 40px; }
#rs-island[data-face=scan] .fid-c { animation: fid-scan-frame 1.5s cubic-bezier(.45, 0, .55, 1) infinite; }
#rs-island[data-face=scan] .fid-eye, #rs-island[data-face=scan] .fid-nose, #rs-island[data-face=scan] .fid-mouth { animation: fid-scan-face 2.4s ease-in-out infinite; }
.faceid-cam:not(.live) .faceid-glyph .fid-c { animation: fid-scan-frame 1.5s cubic-bezier(.45, 0, .55, 1) infinite; }
.faceid-cam:not(.live) .faceid-glyph .fid-f { animation: fid-scan-face 2.4s ease-in-out infinite; }
/* the icon and the title stay where they are while the button opens into the camera (nothing jumps) */
.auth-card.faceid-on > .auth-icon { display: grid; }
.fid-ghost { box-sizing: border-box; }
@media (prefers-reduced-motion: reduce) {
  #rs-island[data-face=scan] .fid-c, #rs-island[data-face=scan] .fid-eye, #rs-island[data-face=scan] .fid-nose, #rs-island[data-face=scan] .fid-mouth,
  .faceid-cam .faceid-glyph .fid-c, .faceid-cam .faceid-glyph .fid-f { animation: none; }
}
/* the app icon on a sign-in sheet plays the logo's move when clicked (glass.js), and gives a little as it is pressed */
.auth-icon .mark { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.auth-icon:active .mark { scale: .94; transition: scale .12s ease; }
.auth-icon .mark { transition: scale .45s var(--spring-bouncy); }

/* Face ID set-up, as an iPhone's: the camera in a circle inside a ring of ticks; the ticks on the side the head turns
   to light up green and stretch out, following the head round (face.js) */
.faceid-enrol .faceid-cam { width: 232px; height: 232px; background: none; }
.faceid-enrol .faceid-cam .faceid-video { inset: 30px; width: calc(100% - 60px); height: calc(100% - 60px); }
.faceid-enrol .faceid-ring { display: none; }
.fid-ticks { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.fid-ticks line { stroke: rgba(120, 128, 140, .5); stroke-width: 2.8; stroke-linecap: round; stroke-dasharray: 8 100;
  transition: stroke-dasharray .4s var(--spring-bouncy), stroke .25s var(--spring-smooth); }
html[data-theme=dark] .fid-ticks line { stroke: rgba(235, 235, 245, .3); }
.fid-ticks line.on, html[data-theme=dark] .fid-ticks line.on { stroke: #30d158; stroke-dasharray: 17 100; }
.faceid-cam.done .fid-ticks line { stroke: #30d158; stroke-dasharray: 17 100; }
.faceid-enrol .faceid-say { min-height: 1.4em; text-align: center; }
@media (prefers-reduced-motion: reduce) { .fid-ticks line { transition: none; } }

/* ---------- Face ID's "Face ID is on" row and the sign-in note: Liquid Glass pills, with the light that follows the
   pointer (glass.js), as the buttons are; and room between the row and "Set Up Again" ---------- */
.pk-row, .faceid-note {
  position: relative; isolation: isolate; border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .1) 46%, rgba(255, 255, 255, .45));
  -webkit-backdrop-filter: var(--rf, blur(14px)) brightness(1.05) saturate(170%); backdrop-filter: var(--rf, blur(14px)) brightness(1.05) saturate(170%);
  box-shadow: inset 0 1.5px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .55), inset 0 -6px 9px -6px rgba(255, 255, 255, .9),
              0 0 0 1px rgba(18, 28, 60, .07), 0 12px 22px -16px rgba(18, 28, 60, .45);
  transition: box-shadow .3s var(--spring-smooth), scale .45s var(--spring-bouncy);
}
.pk-row::after, .faceid-note::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%);
  transition: opacity .3s var(--spring-smooth);
}
.pk-row:hover::after, .faceid-note:hover::after { opacity: 1; }
html[data-theme=dark] .pk-row, html[data-theme=dark] .faceid-note {
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04) 46%, rgba(255, 255, 255, .09));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 0 0 1px rgba(255, 255, 255, .1), inset 0 -6px 9px -7px rgba(255, 255, 255, .22),
              0 12px 24px -16px rgba(0, 0, 0, .8);
}
html[data-theme=dark] .pk-row::after, html[data-theme=dark] .faceid-note::after {
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 70%);
}
/* the note says something went wrong: an amber glass, as the record's "why it waits" note */
.faceid-note { border-radius: 999px; padding: .65rem 1.2rem; color: #5a3a00;
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .06) 46%, rgba(255, 255, 255, .42)), rgba(245, 170, 40, .2); }
html[data-theme=dark] .faceid-note { color: #f6deb0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03) 46%, rgba(255, 255, 255, .08)), rgba(220, 150, 30, .2); }
.pk-row + .faceid-enrol, .pk-row + .faceid-actions, .pk-row ~ .faceid-actions { margin-top: 1rem; }
/* a page's title, large or in the bar, in Apple's own label colour: black, or white in Dark Mode */
.page-head h1, .nav-title { color: #000; }
html[data-theme=dark] .page-head h1, html[data-theme=dark] .nav-title { color: #fff; }
