/* Gig Management design system.
 *
 * Every colour is a variable, set once for light mode and again for dark mode,
 * so the whole app switches together the moment the phone does. Tailwind
 * classes read the same variables (see tw-config.js).
 *
 * Accessibility floor (WCAG 2.2 AA): text at least 4.5:1 against its
 * background (large text and icons 3:1), every control at least 48px to tap,
 * a visible focus ring, no meaning carried by colour alone, and nothing that
 * breaks when the phone's text size is turned up.
 */

/* ---------- colour tokens: light ---------- */
:root {
  color-scheme: light;
  --page: 243 248 247;          /* light teal-grey page */
  --surface: 255 255 255;       /* cards */
  --surface-raised: 255 255 255;
  --surface-sunken: 237 242 242;
  --ink: 19 28 30;              /* main text, 17:1 on white */
  --ink-soft: 67 81 84;         /* secondary text, 8:1 */
  --ink-faint: 89 105 108;      /* captions, 5.7:1 */
  --line: 221 229 230;
  --line-strong: 195 207 208;
  --shadow: 15 40 42;

  --accent: 15 118 110;         /* teal 700: 5.5:1 on white, white text on it 5.5:1 */
  --accent-strong: 17 94 89;
  --accent-soft: 204 251 241;
  --accent-softest: 240 253 250;
  --accent-ink: 255 255 255;    /* text on an accent fill */

  --good: 21 128 61;
  --bad: 185 28 28;
  --warn: 180 83 9;

  /* one neutral family (gray and slate both use it) */
  --n-50: 245 248 248; --n-100: 237 242 242; --n-200: 221 229 230; --n-300: 195 207 208;
  --n-400: 122 138 141; --n-500: 89 105 108; --n-600: 67 81 84; --n-700: 48 61 64;
  --n-800: 29 40 43; --n-900: 19 28 30; --n-950: 10 17 18;

  --control-border: 122 138 141;   /* field and choice borders, 3.6:1 on white */
  --focus: 15 118 110;

  /* The hero card (the big number or next shift at the top of a page): one
     style on every page (UX polish W7). Light: the teal card with white
     text, as before. Dark: Home's deep teal card with light text. */
  --hero-bg: 15 118 110;        /* hero fill */
  --hero-ink: 255 255 255;      /* hero text, 5.5:1 */
  --hero-label: 255 255 255;    /* its small label ("Next shift", "Net profit") */
  --hero-edge: 15 118 110;      /* 1px inner edge (shows only in dark) */
  --hero-chip: 17 94 89;        /* chips, stat boxes */
  --hero-chip-ink: 255 255 255; /* text on a chip */
  --hero-btn: 255 255 255;      /* the main button in a hero */
  --hero-btn-ink: 15 118 110;   /* its text, 5.5:1 */
  --hero-track: 17 94 89;       /* a meter's track */
  --hero-fill: 255 255 255;     /* a meter's fill */
  --hero-seg: 15 118 110;       /* the track of a choice group (This month / This year / All) */
  --hero-line: 255 255 255;     /* dividers, at --hero-line-a */
  --hero-line-a: 0.35;
  --map-restaurant: 109 40 217; /* build:fixes */
  --radius-card: 1rem;
  --radius-control: 0.75rem;
  --tap: 48px;
}

/* ---------- colour tokens: dark ---------- */
:root.dark {
  color-scheme: dark;
  --page: 11 18 19;
  --surface: 18 27 29;
  --surface-raised: 28 39 42;
  --surface-sunken: 11 18 19;
  --ink: 232 238 239;
  --ink-soft: 181 195 197;
  --ink-faint: 156 171 173;
  --line: 43 56 59;
  --line-strong: 62 76 79;
  --shadow: 0 0 0;

  --accent: 45 212 191;         /* teal 400: 9:1 on the dark page */
  --accent-strong: 94 234 212;
  --accent-soft: 17 64 60;
  --accent-softest: 10 40 38;
  --accent-ink: 4 47 46;        /* dark text on the bright accent, 7.8:1 */

  --good: 74 222 128;
  --bad: 248 113 113;
  --warn: 251 191 36;

  --n-50: 245 248 248; --n-100: 232 238 239; --n-200: 211 221 223; --n-300: 181 195 197;
  --n-400: 156 171 173; --n-500: 138 154 157; --n-600: 62 76 79; --n-700: 43 56 59;
  --n-800: 28 39 42; --n-900: 18 27 29; --n-950: 11 18 19;

  --control-border: 107 122 125;   /* 3.9:1 on the dark surface */
  --focus: 94 234 212;

  --hero-bg: 10 40 38;
  --hero-ink: 232 238 239;      /* 13:1 on the hero */
  --hero-label: 94 234 212;     /* 11:1 */
  --hero-edge: 17 64 60;
  --hero-chip: 17 64 60;
  --hero-chip-ink: 94 234 212;  /* 8:1 on the chip */
  --hero-btn: 45 212 191;
  --hero-btn-ink: 4 47 46;      /* 7.8:1 on the button */
  --hero-track: 17 64 60;
  --hero-fill: 45 212 191;      /* 3:1 or more against the track */
  --hero-seg: 17 64 60;
  --hero-line: 62 76 79;
  --hero-line-a: 1;
  --map-restaurant: 196 181 253; /* build:fixes */
}

/* ---------- base ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(76px + env(safe-area-inset-top)); scroll-padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) { html { scroll-padding-bottom: 16px; } }
body {
  background: rgb(var(--page));
  color: rgb(var(--ink));
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
  min-height: 100dvh;
}
/* Numbers line up in columns: money, miles, times. */
.tabular, .font-mono, input[type="number"], td, .num { font-variant-numeric: tabular-nums; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.015em; }
p { text-wrap: pretty; }

/* A focus ring that is always visible when using a keyboard or switch access. */
:focus-visible {
  outline: 3px solid rgb(var(--focus));
  outline-offset: 2px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 1px; }

/* Screen-reader-only text, and the skip link that appears when focused. */
.sr-only-gm { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 0.75rem; top: 0.75rem; z-index: 200; padding: 0.75rem 1rem; border-radius: 0.75rem; background: rgb(var(--accent)); color: rgb(var(--accent-ink)); font-weight: 600; -webkit-transform: translateY(calc(-100% - 2rem)); transform: translateY(calc(-100% - 2rem)); }
.skip-link:focus { -webkit-transform: none; transform: none; }

/* Anyone who asks the phone for less motion gets none. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Moving between pages: the new page fades in over the old one instead of a
   blank flash, while the top bar and the bottom navigation stay put, as in an
   installed app. Browsers without view transitions simply switch pages. */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
.gm-appbar { view-transition-name: gm-appbar; }
.gm-nav { view-transition-name: gm-nav; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 160ms; }
::view-transition-group(gm-appbar), ::view-transition-group(gm-nav) { animation: none; }

/* The one-page app (router.js): a view that is not on screen stays loaded but
   hidden; the move between views fades like a page change, and not at all
   for anyone who asks the phone for less motion. */
[data-gm-off] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
/* Focus moves to the page title after each move; the ring shows for keyboards. */
#page-title:focus { outline: none; }
#page-title:focus-visible { outline: 3px solid rgb(var(--focus)); outline-offset: 2px; border-radius: 6px; }

/* ---------- the app bar ---------- */
/* Solid, not blurred: a blur behind fixed bars is redrawn on every scrolled
   frame, which makes scrolling stutter on Android phones. */
.glass {
  background: rgb(var(--surface));
  border-bottom: 1px solid rgb(var(--line));
}
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ---------- building blocks the pages share ---------- */
.gm-card {
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--line));
  border-radius: var(--radius-card);
  box-shadow: 0 1px 2px rgb(var(--shadow) / 0.05);
}
.gm-section-title { font-size: 1.0625rem; font-weight: 600; color: rgb(var(--ink)); letter-spacing: -0.01em; }
.gm-eyebrow { font-size: 0.8125rem; font-weight: 600; color: rgb(var(--ink-faint)); letter-spacing: 0.01em; }
.gm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  /* Side padding in px: with large text the room goes to the words, which
     wrap between words ("Scan offer / screenshot"), not past the edge. */
  min-height: var(--tap); padding: 0.5rem 18px; border-radius: var(--radius-control);
  font-weight: 600; font-size: 0.9375rem; line-height: 1.2; overflow-wrap: break-word;
  transition: background-color 150ms ease, border-color 150ms ease, transform 100ms ease;
  cursor: pointer; user-select: none;
}
.gm-btn:active { transform: translateY(1px); }
.gm-btn:disabled, .gm-btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.gm-btn-primary { background: rgb(var(--accent)); color: rgb(var(--accent-ink)); }
.gm-btn-primary:hover { background: rgb(var(--accent-strong)); }
.gm-btn-secondary { background: rgb(var(--surface)); color: rgb(var(--ink)); border: 1px solid rgb(var(--control-border)); }
.gm-btn-secondary:hover { background: rgb(var(--surface-sunken)); }
.gm-btn-quiet { background: transparent; color: rgb(var(--accent)); }
.gm-btn-quiet:hover { background: rgb(var(--accent-softest)); }
.gm-btn-danger { background: rgb(var(--bad)); color: #fff; }
:root.dark .gm-btn-danger { color: rgb(var(--n-950)); }
.gm-icon-btn { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); border-radius: 999px; color: rgb(var(--ink-soft)); transition: background-color 150ms ease; }
.gm-icon-btn:hover { background: rgb(var(--surface-sunken)); color: rgb(var(--ink)); }

.gm-label { display: block; font-size: 0.875rem; font-weight: 600; color: rgb(var(--ink-soft)); margin-bottom: 0.375rem; }
.gm-input, .gm-select, .gm-textarea {
  width: 100%; min-height: var(--tap); padding: 0.625rem 0.875rem; font-size: 1rem;
  color: rgb(var(--ink)); background: rgb(var(--surface)); border: 1px solid rgb(var(--control-border));
  border-radius: var(--radius-control); transition: border-color 150ms ease, box-shadow 150ms ease;
}
.gm-input::placeholder, .gm-textarea::placeholder { color: rgb(var(--ink-faint)); opacity: 1; }
.gm-input:focus, .gm-select:focus, .gm-textarea:focus { border-color: rgb(var(--accent)); box-shadow: 0 0 0 3px rgb(var(--accent) / 0.22); outline: none; }
.gm-input:focus-visible, .gm-select:focus-visible, .gm-textarea:focus-visible { outline: 3px solid rgb(var(--focus)); outline-offset: 1px; }
.gm-help { font-size: 0.8125rem; color: rgb(var(--ink-faint)); margin-top: 0.375rem; }
/* build:musthaves: "Estimate, not tax advice." beside tax and deduction numbers. */
.gm-estimate { display: flex; gap: 0.375rem; align-items: flex-start; color: rgb(var(--ink-soft)); font-size: 0.8125rem; }
.gm-estimate svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.gm-estimate[hidden] { display: none; }
/* end build:musthaves */
.gm-error { font-size: 0.875rem; color: rgb(var(--bad)); margin-top: 0.375rem; font-weight: 500; }

.gm-chip { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 2rem; padding: 0 0.75rem; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; background: rgb(var(--surface-sunken)); color: rgb(var(--ink-soft)); }
.gm-chip-accent { background: rgb(var(--accent-soft)); color: rgb(var(--accent-strong)); }

/* Money and status always say it in words or signs too, never by colour alone. */
.gm-good { color: rgb(var(--good)); }
.gm-bad { color: rgb(var(--bad)); }
.gm-warn { color: rgb(var(--warn)); }

/* Page tabs: the current page is marked by shape and weight as well as colour. */
.gm-tab { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 0.875rem; border-radius: 999px; font-size: 0.9375rem; font-weight: 500; color: rgb(var(--ink-soft)); white-space: nowrap; transition: background-color 150ms ease, color 150ms ease; }
.gm-tab:hover { background: rgb(var(--surface-sunken)); color: rgb(var(--ink)); }
.gm-tab[aria-current="page"] { background: rgb(var(--accent)); color: rgb(var(--accent-ink)); font-weight: 600; }

/* ---------- connection status ---------- */
.gm-net { display: none; align-items: center; gap: 0.375rem; min-height: 2rem; min-width: 0; max-width: 46%; flex-shrink: 1; padding: 0 0.75rem; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; white-space: nowrap; color: rgb(var(--ink)); }
.gm-net > span:last-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gm-net[data-state="offline"] { display: inline-flex; background: rgb(var(--warn) / 0.12); box-shadow: inset 0 0 0 1px rgb(var(--warn) / 0.55); }
.gm-net[data-state="offline"] .dot { background: rgb(var(--warn)); }
.gm-net[data-state="syncing"] { display: inline-flex; background: rgb(var(--accent-soft)); box-shadow: inset 0 0 0 1px rgb(var(--accent) / 0.45); }
.gm-net[data-state="syncing"] .dot { background: rgb(var(--accent)); }
.gm-net[data-state="synced"] { display: inline-flex; background: rgb(var(--good) / 0.12); box-shadow: inset 0 0 0 1px rgb(var(--good) / 0.45); }
.gm-net[data-state="synced"] .dot { background: rgb(var(--good)); }
@media (max-width: 479px) { .gm-net .gm-net-long { display: none; } }
@media (min-width: 480px) { .gm-net .gm-net-short { display: none; } }
/* Where the app bar can tell its own width (in rem, so large text counts),
   the full sentence shows only when it fits beside the title and buttons. */
@container gm-appbar (max-width: calc(300px + 21rem)) { .gm-net .gm-net-long { display: none; } .gm-net .gm-net-short { display: inline; } }
@container gm-appbar (min-width: calc(300px + 21rem)) { .gm-net .gm-net-long { display: inline; } .gm-net .gm-net-short { display: none; } }
.gm-net .dot { width: 0.5rem; height: 0.5rem; border-radius: 999px; flex: none; }

/* ---------- document editor (kept from the original) ---------- */
#editor-content:empty:before { content: 'Start typing...'; color: rgb(var(--ink-faint)); cursor: text; }
#editor-content h1 { font-size: 2rem; font-weight: 700; margin: 2rem 0 1rem; color: rgb(var(--ink)); letter-spacing: -0.025em; }
#editor-content h2 { font-size: 1.5rem; font-weight: 600; margin: 1.5rem 0 0.75rem; color: rgb(var(--ink)); letter-spacing: -0.02em; }
#editor-content p { margin-bottom: 1rem; line-height: 1.7; color: rgb(var(--ink-soft)); }
#editor-content ul { list-style-type: disc; padding-left: 1.5rem; margin-bottom: 1rem; color: rgb(var(--ink-soft)); }
#editor-content ol { list-style-type: decimal; padding-left: 1.5rem; margin-bottom: 1rem; color: rgb(var(--ink-soft)); }

/* Map controls follow the theme too. */
:root.dark .maplibregl-ctrl-group { background: rgb(var(--surface-raised)); }
:root.dark .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1); }
:root.dark .maplibregl-ctrl-attrib { background: rgb(var(--surface) / 0.8); color: rgb(var(--ink-soft)); }
:root.dark .maplibregl-ctrl-attrib a { color: rgb(var(--ink-soft)); }

/* =========================================================================
 * The app frame (shell.js): top bar, bottom navigation, sheets, sign-in.
 * Phone first. From 1024px wide the bottom bar becomes a side rail.
 * ========================================================================= */
.gm-has-shell { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.gm-mark { display: inline-flex; width: 36px; height: 36px; border-radius: 10px; overflow: hidden; flex: none; }
.gm-mark img { width: 100%; height: 100%; display: block; }

.gm-appbar { position: sticky; top: 0; z-index: 40; padding-top: env(safe-area-inset-top); container: gm-appbar / inline-size; }
/* Spacing in px, not rem: with the phone's text turned up, the room goes to
   the words instead of the gaps between the buttons. */
.gm-appbar-inner { display: flex; align-items: center; gap: 4px; min-height: 60px; max-width: 1200px; margin: 0 auto; padding: 0 8px 0 16px; }
.gm-appbar-brand { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 12px; cursor: pointer; flex: none; }
/* The buttons keep their size; the title, then the connection chip, give way. */
.gm-appbar-inner > .gm-icon-btn, .gm-appbar-inner > .gm-avatar-btn { flex-shrink: 0; }
.gm-appbar-title { flex: 1 100 6rem; min-width: min(4.5rem, 26vw); margin: 0 4px 0 8px; font-size: 1.1875rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; color: rgb(var(--ink)); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.gm-badge { position: absolute; top: 10px; right: 10px; width: 10px; height: 10px; border-radius: 999px; background: rgb(var(--bad)); box-shadow: 0 0 0 2px rgb(var(--surface)); }
.gm-avatar-btn { display: inline-flex; align-items: center; gap: 0.5rem; min-height: var(--tap); min-width: var(--tap); padding: 0 4px; border-radius: 999px; color: rgb(var(--ink)); }
/* The title gives up its room first (flex-shrink 100), so the connection chip
   keeps its words. On a narrow screen, or with very large text (the width is
   in rem, so it grows with the text), the chip has no room beside the title:
   it takes a row of its own under the bar, all its words showing, and the
   account button and the bottom bar stay on the screen. */
@container gm-appbar (max-width: calc(150px + 10rem)) {
  .gm-appbar-inner { flex-wrap: wrap; }
  .gm-appbar-title { flex-basis: 0; }
  .gm-net { order: 1; flex: 0 0 100%; max-width: 100%; margin-bottom: 8px; }
}
/* build:fixes: app bar title on its own row at large text
   Why: with big text the title only got the few pixels left between the logo and
   the buttons, and `overflow-wrap: anywhere` then broke it inside a word
   ("Acces / s and..."). Two steps, both measured in rem so the phone's text size
   counts:
   - Bar narrower than 192px + 15rem and the connection chip showing: Offline
     (it lasts) drops to a row of its own, so the title keeps the room beside
     the buttons (the longest title word, "Maintenance", is about 7.3rem; the
     chip up to about 7.6rem). Syncing and synced show for a moment after every
     save, so they float just under the bar instead, words and all: the bar and
     the page under it never jump.
   - Bar narrower than 192px + 10rem (the rule above): the title takes a full row
     of its own under the logo and the buttons, the chip below it. The logo stays
     at the left, the bell and the account button at the right end of the first
     row. The title wraps only between words and keeps two lines; a single word
     wider than the whole row may still break, as a last resort.
   At the wide layout nothing changes. */
@container gm-appbar (max-width: calc(192px + 15rem)) {
  .gm-appbar-inner { flex-wrap: wrap; position: relative; }
  .gm-appbar-title { overflow-wrap: break-word; hyphens: manual; }
  .gm-net[data-state="offline"] { order: 1; flex: 0 0 100%; max-width: 100%; margin-bottom: 8px; }
  .gm-net[data-state="syncing"], .gm-net[data-state="synced"] { position: absolute; top: 100%; right: 8px; max-width: calc(100% - 16px); margin-top: 4px; }
  /* Over the page, so the tint sits on the bar's own colour (the words keep their contrast). */
  .gm-net[data-state="synced"] { background: linear-gradient(rgb(var(--good) / 0.12), rgb(var(--good) / 0.12)), rgb(var(--surface)); }
}
@container gm-appbar (max-width: calc(150px + 10rem)) {
  .gm-appbar-brand { margin-right: auto; }
  .gm-appbar-title { order: 1; flex: 1 1 100%; min-width: 0; margin: 0 4px 6px 4px; }
  .gm-net { order: 2; }
}
/* end build:fixes */
.gm-avatar-btn:hover { background: rgb(var(--surface-sunken)); }
.gm-avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 999px; overflow: hidden; background: rgb(var(--accent-soft)); color: rgb(var(--accent-strong)); flex: none; }
.gm-avatar-lg { width: 56px; height: 56px; }
.gm-hide-sm { display: none; }
@media (min-width: 640px) { .gm-hide-sm { display: inline-flex; } }

/* Bottom navigation: five places, the current one marked by a filled pill,
   bold label and aria-current, not by colour alone. */
.gm-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: rgb(var(--surface)); border-top: 1px solid rgb(var(--line)); padding-bottom: env(safe-area-inset-bottom); }
.gm-nav-items { display: flex; max-width: 640px; margin: 0 auto; }
.gm-nav-item { flex: 1 1 0; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; padding: 6px 2px; color: rgb(var(--ink-soft)); font-size: 0.75rem; font-weight: 500; line-height: 1.2; text-align: center; }
.gm-nav-item .gm-nav-pill { display: inline-flex; align-items: center; justify-content: center; width: 56px; max-width: 100%; height: 30px; border-radius: 999px; transition: background-color 150ms ease; }
.gm-nav-item svg { width: 22px; height: 22px; }
.gm-nav-item > span:last-child { max-width: 100%; overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }
/* With the phone's text set very large, the bar shows icons only; each item keeps its name for TalkBack. */
@media (max-width: 19.99rem) { .gm-nav-item > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
/* The same where the bar can tell its own width in rem (so large text counts):
   five names need about 16rem side by side, or they break inside words. */
@media (max-width: 1023px) {
  .gm-nav { container: gm-nav / inline-size; }
  @container gm-nav (max-width: 16rem) { .gm-nav-item > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
}
/* Phones without container queries (Chrome 80, Safari 13.4): a name breaks
   only between words, and when one does not fit its place shell.js gives the
   bar .gm-nav-icons, icons only (each item keeps its name for TalkBack). */
html.gm-no-cq .gm-nav-item > span:last-child { overflow-wrap: normal; word-break: normal; -webkit-hyphens: manual; hyphens: manual; }
.gm-nav.gm-nav-icons .gm-nav-item > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.gm-nav-item[aria-current="page"] { color: rgb(var(--ink)); font-weight: 700; }
.gm-nav-item[aria-current="page"] .gm-nav-pill { background: rgb(var(--accent-soft)); color: rgb(var(--accent-strong)); }
.gm-nav-item:hover .gm-nav-pill { background: rgb(var(--surface-sunken)); }
.gm-nav-item[aria-current="page"]:hover .gm-nav-pill { background: rgb(var(--accent-soft)); }
.gm-nav-item .gm-lock { position: absolute; transform: translate(14px, -10px); width: 14px; height: 14px; }

@media (min-width: 1024px) {
  .gm-has-shell { padding-bottom: 0; padding-left: 96px; }
  .gm-nav { top: 0; right: auto; width: 96px; border-top: 0; border-right: 1px solid rgb(var(--line)); padding-top: calc(76px + env(safe-area-inset-top)); }
  .gm-nav-items { flex-direction: column; gap: 4px; }
  .gm-appbar { margin-left: -96px; padding-left: 96px; }
}

/* Sheets: rise from the bottom on a phone, slide in from the right on wide screens. */
.gm-sheet { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 70; }
.gm-sheet-scrim { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgb(10 17 18 / 0.5); opacity: 0; transition: opacity 180ms ease; }
.gm-sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column; background: rgb(var(--surface)); border-radius: 1.25rem 1.25rem 0 0; box-shadow: 0 -8px 32px rgb(var(--shadow) / 0.18); transform: translateY(100%); transition: transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1); padding-bottom: env(safe-area-inset-bottom); outline: none; }
.gm-sheet-tall { height: 88vh; height: 88dvh; }
.gm-sheet.is-open .gm-sheet-scrim { opacity: 1; }
.gm-sheet.is-open .gm-sheet-panel { transform: none; }
.gm-sheet-grab { width: 40px; height: 4px; border-radius: 999px; background: rgb(var(--line-strong)); margin: 8px auto 0; flex: none; }
.gm-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.5rem 0.5rem 0.5rem 1.25rem; flex: none; }
.gm-sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0.25rem 1.25rem 1.25rem; }
.gm-sheet-foot { flex: none; padding: 0.75rem 1.25rem 1rem; border-top: 1px solid rgb(var(--line)); }
@media (min-width: 768px) {
  .gm-sheet-panel { left: auto; top: 0; width: 420px; max-height: none; height: 100vh; height: 100dvh; border-radius: 0; transform: translateX(100%); }
  .gm-sheet-grab { display: none; }
  .gm-sheet-head { padding-top: 1rem; }
}
html.gm-sheet-open { overflow: hidden; }

/* The More sheet (renderTabs in shared.js): the four tools that are not in
   the bar, each with its icon tile, "Locked" for a Pro tool this account
   cannot open, and "You are here" on the tool on screen. */
/* A grid: icon, name and words, the tag, the chevron. The gaps are in px, so
   with large text the room goes to the words. Where the sheet is narrow (a
   small phone) the tag moves under the words, lined up with them; where it
   is narrower still for its text (large text) the icon tile goes too, so a
   name never breaks inside a word. Without container queries (an older phone
   with no signal for shell.js's polyfill) a phone under 360 px gets the first
   step from a media query. */
#more-items { container: gm-more / inline-size; }
.gm-row.gm-more-tool { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 20px; grid-template-areas: "icon text tag end"; align-items: center; column-gap: 12px; }
.gm-more-tool > .gm-more-icon { grid-area: icon; }
.gm-more-tool > .gm-row-text { grid-area: text; overflow-wrap: normal; word-break: normal; hyphens: manual; }
.gm-more-tool > .gm-more-tag, .gm-more-tool > .gm-more-here { grid-area: tag; }
.gm-more-tool > .gm-row-end { grid-area: end; }
@media (max-width: 359px) {
  .gm-row.gm-more-tool { grid-template-columns: 40px minmax(0, 1fr) 20px; grid-template-areas: "icon text end" "icon tag end"; }
  .gm-more-tool > .gm-more-tag, .gm-more-tool > .gm-more-here { justify-self: start; margin-top: 0.375rem; }
}
/* No container queries and a phone under 360 px (where large text would
   leave the words a sliver): the words get the icon tile's room too. */
@media (max-width: 359px) {
  html.gm-no-cq .gm-row.gm-more-tool { grid-template-columns: minmax(0, 1fr) 20px; grid-template-areas: "text end" "tag end"; column-gap: 8px; padding-left: 12px; padding-right: 8px; }
  html.gm-no-cq .gm-more-tool > .gm-more-icon { display: none; }
}
@container gm-more (max-width: 22rem) {
  .gm-row.gm-more-tool { grid-template-columns: 40px minmax(0, 1fr) 20px; grid-template-areas: "icon text end" "icon tag end"; }
  .gm-more-tool > .gm-more-tag, .gm-more-tool > .gm-more-here { justify-self: start; margin-top: 0.375rem; }
}
@container gm-more (max-width: 16rem) {
  .gm-row.gm-more-tool { grid-template-columns: minmax(0, 1fr) 20px; grid-template-areas: "text end" "tag end"; column-gap: 8px; padding-left: 12px; padding-right: 8px; }
  .gm-more-tool > .gm-more-icon { display: none; }
}
.gm-more-tool[aria-current="page"] { background: rgb(var(--accent-softest)); }
.gm-more-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: rgb(var(--accent-softest)); color: rgb(var(--accent)); flex: none; }
.gm-more-tool[aria-current="page"] .gm-more-icon { background: rgb(var(--accent-soft)); color: rgb(var(--accent-strong)); }
.gm-more-icon svg { width: 22px; height: 22px; }
.gm-more-tag { display: inline-grid; grid-auto-flow: column; align-items: center; justify-content: start; gap: 0.375rem; max-width: 100%; min-height: 28px; padding: 0.125rem 0.625rem; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; line-height: 1.3; background: rgb(var(--surface-sunken)); color: rgb(var(--ink-soft)); }
.gm-more-tag svg { width: 16px; height: 16px; flex: none; }
.gm-more-tag.hidden, .gm-more-here[hidden], .gm-more-locks[hidden] { display: none; }
.gm-more-here { font-size: 0.8125rem; font-weight: 600; color: rgb(var(--accent-strong)); white-space: nowrap; }
.gm-more-locks { margin-top: 0.75rem; }
.gm-settings > * + * { margin-top: 1.5rem; }
/* Side padding in px: with large text the room goes to the settings themselves. */
.gm-sheet-body.gm-settings { padding-left: 20px; padding-right: 20px; }
.gm-group-title { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: rgb(var(--ink-faint)); margin-bottom: 0.5rem; }
.gm-profile { display: flex; align-items: center; gap: 0.875rem; }
/* The balance and Get points side by side; Get points moves under the
   balance when both do not fit (a narrow phone, or large text). */
.gm-wallet { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 16px; border-radius: var(--radius-card); background: rgb(var(--accent-softest)); border: 1px solid rgb(var(--accent-soft)); }
.gm-wallet > div { min-width: 0; }
.gm-wallet-help { flex-basis: 100%; margin: 0; } /* integration (final review): what points pay for, under the balance and Get points */
.gm-wallet-value { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: rgb(var(--ink)); overflow-wrap: anywhere; }

.gm-segment { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: rgb(var(--surface-sunken)); }
.gm-segment-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; border-radius: 10px; font-size: 0.875rem; font-weight: 500; color: rgb(var(--ink-soft)); }
.gm-segment-btn[aria-checked="true"] { background: rgb(var(--surface)); color: rgb(var(--ink)); font-weight: 700; box-shadow: 0 1px 3px rgb(var(--shadow) / 0.12); outline: 2px solid rgb(var(--accent)); outline-offset: -2px; }

/* A list of rows: settings, tools, records. */
.gm-list { background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-card); overflow: hidden; }
.gm-list > * + * { border-top: 1px solid rgb(var(--line)); }
.gm-row { display: flex; align-items: center; gap: 0.875rem; width: 100%; min-height: 60px; padding: 0.625rem 1rem; text-align: left; color: rgb(var(--ink)); background: transparent; transition: background-color 150ms ease; }
button.gm-row:hover, a.gm-row:hover { background: rgb(var(--surface-sunken)); }
.gm-row-icon { width: 22px; height: 22px; flex: none; color: rgb(var(--accent)); }
.gm-row-text { flex: 1; min-width: 0; font-weight: 600; font-size: 0.9375rem; }
.gm-row-text small { display: block; font-weight: 400; font-size: 0.8125rem; color: rgb(var(--ink-faint)); margin-top: 1px; }
.gm-row-end { width: 20px; height: 20px; flex: none; color: rgb(var(--ink-faint)); }
/* build:security - Settings > Rush alerts with big text on a narrow phone: the On/Off chip
   moves under the words instead of squeezing them one syllable wide (as Phone alerts, push.css). */
#rush-switches .gm-row { flex-wrap: wrap; row-gap: 0.25rem; }
#rush-switches .gm-row-text { flex: 1 1 6rem; }
#rush-switches .gm-chip { flex: none; margin-left: auto; }
.gm-chip-good { background: rgb(var(--good) / 0.12); color: rgb(var(--ink)); box-shadow: inset 0 0 0 1px rgb(var(--good) / 0.45); }
.gm-chip-good::before { content: ''; width: 0.5rem; height: 0.5rem; border-radius: 999px; background: rgb(var(--good)); }
.gm-chip-bad { background: rgb(var(--bad) / 0.1); color: rgb(var(--ink)); box-shadow: inset 0 0 0 1px rgb(var(--bad) / 0.45); }
.gm-chip-bad::before { content: ''; width: 0.5rem; height: 0.5rem; border-radius: 999px; background: rgb(var(--bad)); }

.gm-alert { padding: 0.75rem 1rem; border-radius: var(--radius-control); font-size: 0.9375rem; line-height: 1.45; }
.gm-alert-bad { background: rgb(var(--bad) / 0.1); color: rgb(var(--bad)); border: 1px solid rgb(var(--bad) / 0.3); }
.gm-alert-warn { background: rgb(var(--warn) / 0.1); color: rgb(var(--ink)); border: 1px solid rgb(var(--warn) / 0.55); }
.gm-alert-info { background: rgb(var(--accent-softest)); color: rgb(var(--accent-strong)); border: 1px solid rgb(var(--accent-soft)); }

/* No bar at the bottom (owner, 24 Nov 2026). A message that shows (a failure,
   the update bar) sits at the top: under the app bar (--gm-appbar-bottom, set by
   shared.js), so it never covers the header's buttons; fixed, so nothing jumps.
   Every other message is in here visually hidden (.sr-only-gm), for a screen reader.
   It ends above the bottom bar; a message taller than the room (200% text on a
   small phone) scrolls inside it, so no words are out of reach. The top zone, in
   order: app bar (with the Offline chip), the Tracking chip, the update bar, failure bars. */
.gm-toasts { position: fixed; z-index: 110; left: 0.75rem; right: 0.75rem; top: calc(var(--gm-appbar-bottom, env(safe-area-inset-top)) + 0.5rem + var(--gm-chip-room, 0px)); bottom: auto; max-height: calc(100dvh - var(--gm-appbar-bottom, env(safe-area-inset-top)) - var(--gm-chip-room, 0px) - 1rem - 84px - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; align-items: center; }
.gm-toasts:has(> :not(.sr-only-gm)) { pointer-events: auto; }
.gm-toasts > * { pointer-events: none; width: 100%; max-width: 440px; flex: none; }
.gm-toasts > .sr-only-gm { width: 1px; max-width: 1px; }
/* A bar comes down a little from the top as it shows. */
.gm-toasts > .gm-toast-in { transform: translateY(-0.5rem); }
.gm-toasts button, .gm-toasts a { pointer-events: auto; }
/* "Update ready" at 200% text: its button goes under the words, never past the card. */
.gm-toasts #update-ready { flex-wrap: wrap; }
/* The sign-in screen covers the app bar (it cannot be used then): the top of the screen, under the safe area. */
html:has(#login-overlay:not(.hidden)) .gm-toasts { top: calc(0.75rem + env(safe-area-inset-top)); max-height: calc(100dvh - 1.5rem - env(safe-area-inset-top) - env(safe-area-inset-bottom)); z-index: 120; }
/* An open sheet: under the sheet's head (--gm-sheet-top, set by shared.js), so a
   message never covers its Close or "Not now" (owner, 24 Nov 2026). */
html.gm-sheet-open .gm-toasts, html:has(.gm-sheet.is-open) .gm-toasts { top: calc(var(--gm-sheet-top, env(safe-area-inset-top)) + 0.5rem); max-height: calc(100dvh - var(--gm-sheet-top, env(safe-area-inset-top)) - 1rem - env(safe-area-inset-bottom)); z-index: 120; }
/* Over an open sheet a toast is never in the way: taps go through it to the sheet, and it goes by itself. */
html.gm-sheet-open .gm-toasts, html:has(.gm-sheet.is-open) .gm-toasts { pointer-events: none; }
html.gm-sheet-open .gm-toasts button, html:has(.gm-sheet.is-open) .gm-toasts button { pointer-events: none; }
html.gm-sheet-open .gm-toasts #update-ready button, html:has(.gm-sheet.is-open) .gm-toasts #update-ready button { pointer-events: auto; }
@media (min-width: 1024px) { .gm-toasts { left: auto; right: 1.5rem; align-items: flex-end; } }
/* build:android: a saved file's name has no spaces, so long words break anywhere instead of
   running under the Dismiss button or off a 320px screen at 200% text; the same for every line
   that shows why a file was not saved (also 'gigmanagement.web.app'), the GM Dashboard's too */
.gm-toasts [data-t], .gm-toasts [data-m], .del-download .gm-help, .gm-said,
#adm-pts-ledger-status, #adm-confirm-error, #adm-sheet-error, #adm-money-csv-status /* integration: billing's sales CSV line */ { overflow-wrap: anywhere; }
/* build:android: a line that stays beside a Save or Export button with why the file was not
   saved (role="status", in the page, so it covers nothing); takes no room while empty */
.gm-said:empty { padding: 0; border-width: 0; margin: 0; }
/* build:android: a message is never taller than the room it has (now, 24 Nov 2026: the whole
   .gm-toasts box ends above the bottom bar and scrolls, so no words are cut off). */

/* Sign-in */
.gm-login { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); background: rgb(var(--page)); overflow-y: auto; isolation: isolate; }
/* The drive picture fills the whole screen: by day in light mode, at night in
   dark mode, darkened toward the edges so the card stands out. Drawn only
   while the sign-in screen shows, so a signed-in phone never downloads it. */
.gm-login-bg { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: -1; background-color: rgb(32 40 44); background-image: radial-gradient(120% 80% at 50% 45%, rgb(8 14 16 / 0.05), rgb(8 14 16 / 0.5)), url('assets/signin-day.webp'); background-size: cover; background-position: center 40%; }
:root.dark .gm-login-bg { background-color: rgb(8 14 16); background-image: radial-gradient(120% 80% at 50% 45%, rgb(8 14 16 / 0.15), rgb(8 14 16 / 0.7)), url('assets/signin-night.webp'); }
/* Centred while it fits; taller than the screen (200% text), it starts at the
   top, so its top can always be scrolled back to. One glass card holds the
   logo, the words and the ways to sign in. */
.gm-login-inner { width: 100%; max-width: 400px; margin-top: auto; margin-bottom: auto; padding: 28px 24px 24px; border-radius: 28px; text-align: center; background: rgb(var(--surface) / 0.8); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); border: 1px solid rgb(255 255 255 / 0.45); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.5), 0 24px 60px rgb(0 0 0 / 0.45); }
:root.dark .gm-login-inner { background: rgb(var(--surface) / 0.68); border-color: rgb(255 255 255 / 0.14); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08), 0 24px 60px rgb(0 0 0 / 0.55); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .gm-login-inner, :root.dark .gm-login-inner { background: rgb(var(--surface) / 0.95); } }
@media (prefers-reduced-transparency: reduce) { .gm-login-inner, :root.dark .gm-login-inner { background: rgb(var(--surface)); -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (max-width: 360px) { .gm-login-inner { padding: 22px 16px 18px; border-radius: 22px; } }
.gm-login-brand { display: flex; justify-content: center; }
.gm-login-brand .gm-mark { width: 72px; height: 72px; border-radius: 20px; box-shadow: 0 8px 24px rgb(var(--shadow) / 0.18); }
.gm-login-title { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; margin-top: 1.25rem; color: rgb(var(--ink)); overflow-wrap: anywhere; hyphens: auto; text-wrap: balance; }
.gm-login-lead { margin-top: 0.5rem; font-size: 1.0625rem; line-height: 1.5; color: rgb(var(--ink-soft)); text-wrap: balance; }
/* The three points stay a left-aligned list, centred as one block. */
.gm-login-points { margin: 1.5rem auto 0; display: grid; gap: 0.75rem; width: fit-content; max-width: 100%; text-align: left; }
.gm-login-points li { display: flex; align-items: center; gap: 0.75rem; font-weight: 500; color: rgb(var(--ink)); }
.gm-login-actions { text-align: left; }
.gm-login-actions .gm-login-methods, .gm-login-actions .gm-google-btn, .gm-login-actions .gm-email-btn, .gm-login-actions .gm-apple-btn { text-align: center; }
.gm-login-points svg { width: 22px; height: 22px; color: rgb(var(--accent)); flex: none; }
.gm-login-actions { margin-top: 2rem; }
.gm-login #login-error { margin-top: 1rem; }
/* Google's own sign-in button style: white, grey border, the four-colour G. */
.gm-google-btn { display: flex; align-items: center; justify-content: center; gap: 0.75rem; width: 100%; min-height: 52px; border-radius: 999px; background: #ffffff; color: #1f1f1f; border: 1px solid #747775; font-weight: 600; font-size: 1rem; transition: background-color 150ms ease, box-shadow 150ms ease; }
.gm-google-btn:hover { background: #f8faf9; box-shadow: 0 1px 3px rgb(0 0 0 / 0.15); }
:root.dark .gm-google-btn { background: #131314; color: #e3e3e3; border-color: #8e918f; }
/* Every way to sign in is the same size, one under the other, in each phone's
   order (sign-in.js); long words wrap at 200% text. */
.gm-login-methods { display: grid; gap: 0.75rem; }
.gm-google-btn, .gm-apple-btn, .gm-email-btn { padding: 8px 16px; line-height: 1.25; text-align: center; }
.gm-google-btn span, .gm-apple-btn span, .gm-email-btn span { min-width: 0; overflow-wrap: break-word; }
.gm-google-btn svg, .gm-apple-btn svg, .gm-email-btn svg { flex: none; }
/* Apple's own button style: black, white in dark mode. */
.gm-apple-btn, .gm-email-btn { display: flex; align-items: center; justify-content: center; gap: 0.75rem; width: 100%; min-height: 52px; border-radius: 999px; font-weight: 600; font-size: 1rem; transition: background-color 150ms ease, box-shadow 150ms ease; }
.gm-apple-btn { background: #000000; color: #ffffff; border: 1px solid #000000; }
:root.dark .gm-apple-btn { background: #ffffff; color: #000000; border-color: #ffffff; }
.gm-email-btn { background: rgb(var(--surface)); color: rgb(var(--ink)); border: 1px solid rgb(var(--control-border)); }
.gm-email-btn:hover { background: rgb(var(--surface-sunken)); }
.gm-email-btn svg { color: rgb(var(--accent)); }
/* "Use another account" (the Android app): a text link under Google's button. */
.gm-login-link { display: flex; align-items: center; justify-content: center; width: 100%; min-height: var(--tap); margin-top: -0.25rem; padding: 0.25rem 1rem; border-radius: var(--radius-control); color: rgb(var(--accent)); font-weight: 600; font-size: 0.9375rem; text-decoration: underline; text-underline-offset: 3px; }
.gm-login-link:hover { background: rgb(var(--accent-softest)); }
/* The email link steps (email-link.js): one column, full-width buttons. */
.gm-login-step { display: grid; gap: 0.75rem; }
.gm-login-step .gm-btn { width: 100%; }
.gm-login-step .gm-error:empty { margin-top: 0; }
.gm-login-note { font-size: 0.9375rem; line-height: 1.5; color: rgb(var(--ink-soft)); }
.gm-login-email-to { color: rgb(var(--ink)); overflow-wrap: anywhere; }
/* The sign-in card's small print: how to delete an account (delete-account.html). */
.gm-login-small { margin-top: 1rem; }
.gm-login-small .gm-login-link { margin-top: 0; font-size: 0.875rem; font-weight: 500; color: rgb(var(--ink-soft)); }
/* Settings > Account > Delete my account (delete-account.js): said in words and red. */
.gm-row-danger, .gm-row-danger .gm-row-icon { color: rgb(var(--bad)); }
/* The Delete my account warning (delete-account.js). */
#delete-account-sheet{z-index:72}
/* A blocked account deleting itself: over the sign-in screen (z-index 100), under the first-open screens and the messages */
#delete-account-sheet.del-over-login{z-index:105}
#delete-account-sheet [hidden]{display:none!important}
.del-lead{font-size:1rem;line-height:1.5;color:rgb(var(--ink));overflow-wrap:anywhere}
.del-who{margin-top:.25rem;font-size:.9375rem;color:rgb(var(--ink-soft));overflow-wrap:anywhere}
.del-part{margin-top:1.25rem}
.del-part h3{font-size:1rem;font-weight:700;color:rgb(var(--ink));margin-bottom:.5rem}
.del-list{display:grid;gap:.5rem}
.del-list li{display:flex;align-items:flex-start;gap:.625rem;min-width:0;font-size:.9375rem;line-height:1.45;color:rgb(var(--ink));overflow-wrap:anywhere}
.del-list svg{width:20px;height:20px;flex:none;margin-top:.12em;color:rgb(var(--bad))}
.del-kept svg{color:rgb(var(--ink-faint))}
.del-list li>span{min-width:0}
.del-num{font-weight:700;font-variant-numeric:tabular-nums}
.del-skel{display:inline-block;width:5.5em;height:1em;vertical-align:middle;border-radius:6px;background:rgb(var(--surface-sunken))}
.del-download{margin-top:1.25rem;padding:1rem;border-radius:var(--radius-card);background:rgb(var(--surface-sunken))}
.del-download .gm-btn{width:100%;flex-wrap:wrap;text-align:center}
.del-download .gm-help{color:rgb(var(--ink-soft))}
.del-confirm{margin-top:1.5rem;padding-top:1.25rem;border-top:1px solid rgb(var(--line))}
.del-input{font-weight:600;letter-spacing:.06em}
.del-actions{display:grid;gap:.75rem;margin-top:1rem}
.del-actions .gm-btn{width:100%;flex-wrap:wrap;text-align:center}
.del-ways{display:grid;gap:.75rem;margin-top:1rem}
.del-ways .gm-btn{width:100%;flex-wrap:wrap;text-align:center}
.del-status:empty,.del-refusal:empty{display:none}
.del-status,.del-refusal{margin-top:1rem}
.del-refusal{margin-top:0;margin-bottom:1rem}
#del-again-title{font-size:1.0625rem;font-weight:700;color:rgb(var(--ink))}
#del-again-title:focus{outline:none}
#del-again-title:focus-visible{outline:3px solid rgb(var(--focus));outline-offset:2px;border-radius:6px}
@media (forced-colors:active){.del-list svg{color:CanvasText}}

/* Page content area: one comfortable column on a phone, wider on desktop. */
/* The bottom padding keeps a page's last control clear of the "Tracking"
   chip (tracker.js) that floats over the bottom bar while a route records. */
.gm-page { max-width: 640px; margin: 0 auto; padding: 1rem 1rem calc(1.5rem + 64px); }
@media (min-width: 1024px) { .gm-page { max-width: 1120px; padding: 1.5rem 2rem 2.5rem; } }
.gm-hero { padding: 1.25rem; border-radius: 1.25rem; background: rgb(var(--hero-bg)); color: rgb(var(--hero-ink)); box-shadow: inset 0 0 0 1px rgb(var(--hero-edge)); }
.gm-hero :focus-visible { outline-color: rgb(var(--hero-ink)); }
.gm-hero .gm-hero-label { font-size: 0.875rem; font-weight: 600; opacity: 0.9; color: rgb(var(--hero-label)); }
/* A hero's buttons: filled (the main action) and outlined. */
/* Icon and words: an inline grid, not flex, so the space between them shows
   on Chrome 80 and Safari 13.4 too (they have grid gap, not flex gap); a run
   of words is a grid item of its own. */
.gm-hero-btn { display: inline-grid; grid-auto-flow: column; align-items: center; justify-content: center; gap: 0.5rem; max-width: 100%; min-height: var(--tap); padding: 0.375rem 16px; border-radius: var(--radius-control); background: rgb(var(--hero-btn)); color: rgb(var(--hero-btn-ink)); font-weight: 650; font-size: 0.9375rem; text-align: center; overflow-wrap: break-word; }
.gm-hero-btn:hover { box-shadow: 0 0 0 2px rgb(var(--hero-btn) / 0.6); }
.gm-hero-btn-line { display: inline-grid; grid-auto-flow: column; align-items: center; justify-content: center; gap: 0.5rem; max-width: 100%; min-height: var(--tap); padding: 0.375rem 16px; border-radius: var(--radius-control); background: transparent; color: rgb(var(--hero-ink)); border: 2px solid rgb(var(--hero-ink) / 0.7); font-weight: 600; font-size: 0.9375rem; text-align: center; overflow-wrap: break-word; }
.gm-hero-btn-line:hover { background: rgb(var(--hero-ink) / 0.12); }
.gm-hero-chip { display: inline-grid; grid-auto-flow: column; align-items: center; justify-content: start; gap: 0.375rem; min-height: 28px; padding: 0 0.625rem; border-radius: 999px; background: rgb(var(--hero-chip)); color: rgb(var(--hero-chip-ink)); font-size: 0.8125rem; font-weight: 700; }
@media (forced-colors: active) { .gm-hero { border: 1px solid CanvasText; } .gm-hero-btn, .gm-hero-btn-line { border: 2px solid ButtonText; } }
.gm-hero .gm-hero-value { font-size: 2.25rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.gm-stat { padding: 1rem; border-radius: var(--radius-card); background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); }
.gm-stat-label { font-size: 0.8125rem; font-weight: 600; color: rgb(var(--ink-faint)); }
.gm-stat-value { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: rgb(var(--ink)); margin-top: 0.125rem; }
.gm-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 2rem 1rem; color: rgb(var(--ink-soft)); }
/* Spaced with margins, not flex gap (Chrome 80, Safari 13.4). */
.gm-empty > * + * { margin-top: 0.5rem; }
.gm-empty svg { width: 32px; height: 32px; color: rgb(var(--ink-faint)); }
/* The picture icon is grey; a button's own icon keeps the button's size and
   colour (the + on "Add shift" was grey on teal, 1.05:1). */
.gm-empty .gm-btn svg { width: 20px; height: 20px; color: currentColor; }
.gm-skeleton { border-radius: 0.5rem; background: linear-gradient(90deg, rgb(var(--surface-sunken)) 0%, rgb(var(--line)) 50%, rgb(var(--surface-sunken)) 100%); background-size: 200% 100%; animation: gm-shimmer 1.2s ease-in-out infinite; }
@keyframes gm-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
html.is-offline .gm-needs-net { opacity: 0.55; }

/* ---------- the calendar tooltip: tokens, so it shows in both modes ---------- */
#event-tooltip { background: rgb(var(--surface-raised)); color: rgb(var(--ink)); border: 1px solid rgb(var(--line-strong)); }
#event-tooltip.is-shown { pointer-events: auto; }

/* ---------- older phones ----------
 * Android 5-9 and iOS 13-15 browsers miss a few newer CSS features the pages
 * use. These rules give the same result there (newer browsers ignore them or
 * the pages' own rules win). shell.js adds the .is-checked class where :has()
 * is missing and loads a container-query polyfill where needed. */
.gp-chart-empty, .gp-cat input, #map, .gm-pick-input { top: 0; right: 0; bottom: 0; left: 0; }
.gt-map-wrap { height: 320px; }
.gt-route-panel { height: 88vh; }
.gp-cat.is-checked { border-color: rgb(var(--accent)); background: rgb(var(--accent-softest)); }
.gp-cat.is-checked .gp-cat-check { display: inline-flex; }
.gm-pick.is-checked { border-color: rgb(var(--accent)); background: rgb(var(--accent-softest)); }
.gm-seg .gm-pick.is-checked { background: rgb(var(--surface)); border-color: rgb(var(--accent)); }

/* =========================================================================
 * Release 2026-11-05.5: Follow daylight in Settings, and the first-open
 * permission screens (primer.js). Tokens only, so both follow light and dark.
 * ========================================================================= */
/* Four colour modes, two by two. With the phone's text very large a choice
   no longer fits half the width, so each takes a whole row instead of
   breaking "daylight" in two (the min-width is in em, so it grows with the text). */
.gm-segment-4 { display: flex; flex-wrap: wrap; }
.gm-segment-4 .gm-segment-btn { flex: 1 1 calc(50% - 4px); min-width: min(100%, 8.5em); padding: 0.5rem; text-align: center; line-height: 1.25; }
/* The daylight line is an always-present live region; empty, it takes no room. */
.gm-theme-sun:empty { margin: 0; }

/* One question per screen, over the whole app, like the sign-in screen. The
   inner column centres with margin: auto (not align-items) so a screen taller
   than the phone, at large text, still scrolls to its top. Above the messages
   (z 110) so a message never covers its buttons; below "Update required". */
.gm-primer { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 115; display: flex; padding: calc(1.5rem + env(safe-area-inset-top)) 1rem calc(1.5rem + env(safe-area-inset-bottom)); background: rgb(var(--page)); overflow-y: auto; overscroll-behavior: contain; }
.gm-primer [hidden] { display: none !important; }
.gm-primer-inner { width: 100%; max-width: 420px; margin: auto; transition: opacity 200ms ease, transform 200ms ease; }
.gm-primer:not(.is-open) .gm-primer-inner { opacity: 0; transform: translateY(12px); }
.gm-primer-count { font-size: 0.875rem; font-weight: 600; color: rgb(var(--ink-faint)); margin-bottom: 1rem; }
.gm-primer-count:empty { display: none; }
.gm-primer-icon { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 20px; background: rgb(var(--accent-soft)); color: rgb(var(--accent-strong)); }
.gm-primer-icon svg { width: 36px; height: 36px; }
.gm-primer-title { margin-top: 1.25rem; font-size: 1.75rem; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; color: rgb(var(--ink)); overflow-wrap: anywhere; }
/* Focus is moved to the heading so each step is read from its start; it is
   not a control, so it gets no ring (every button keeps its own). */
.gm-primer-title:focus { outline: none; }
.gm-primer-lead { margin-top: 0.75rem; font-size: 1.0625rem; line-height: 1.5; color: rgb(var(--ink-soft)); }
.gm-primer-help { margin-top: 1.25rem; }
.gm-primer-help-title { font-weight: 700; }
.gm-primer-help-steps { margin-top: 0.25rem; overflow-wrap: anywhere; }
.gm-primer-help .gm-btn { width: 100%; margin-top: 0.75rem; }
.gm-primer-status { margin-top: 1rem; min-height: 1.5em; font-size: 0.9375rem; font-weight: 600; line-height: 1.45; color: rgb(var(--ink)); }
.gm-primer-actions { display: grid; gap: 0.5rem; margin-top: 1rem; }
.gm-primer-btn { width: 100%; min-height: 56px; font-size: 1rem; }
html.gm-primer-open { overflow: hidden; }
@media (min-width: 768px) { .gm-primer-title { font-size: 2rem; } }
/* Anyone who asks the phone for less motion: the screen is simply there. */
@media (prefers-reduced-motion: reduce) {
  .gm-primer-inner { transition: none; }
  .gm-primer:not(.is-open) .gm-primer-inner { opacity: 1; transform: none; }
}

/* Today's goal (goal-bar.js): a game-style bar, teal at every level (UX
   polish W8). Red is only for a loss, and today's pay is never below zero,
   so the bar is never red. The words say how far along ("$109 to go
   today.", "Goal reached. Nice work."), with a check before the done line,
   so colour is never the only sign. data-tier stays for the one-time glow. */
.gb { --gb-c: rgb(var(--accent)); display: grid; gap: 0.5rem; padding: 1rem; }
.gb[data-tier="mid"], .gb[data-tier="near"], .gb[data-tier="done"] { --gb-c: rgb(var(--accent)); }
.gb-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 0.75rem; min-width: 0; }
.gb-head > * { min-width: 0; }
.gb { min-width: 0; max-width: 100%; }
.gb-title { margin: 0; }
.gb-edit { min-height: var(--tap); padding: 0 0.75rem; border-radius: var(--radius-control); font-weight: 600; color: rgb(var(--accent)); text-decoration: underline; text-underline-offset: 3px; }
.gb-edit:hover { background: rgb(var(--accent-softest)); }
.gb-edit[hidden] { display: none; }
.gb-amount { margin: 0; font-size: 1.05rem; color: rgb(var(--ink-soft)); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.gb-earned { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; color: rgb(var(--ink)); }
.gb-pct { font-weight: 700; color: rgb(var(--ink)); }
.gb-bar { position: relative; height: 18px; border-radius: 999px; background: rgb(var(--surface-sunken)); border: 1px solid rgb(var(--line-strong)); box-shadow: inset 0 1px 3px rgb(var(--shadow) / 0.35); overflow: hidden; }
.gb-bar[hidden] { display: none; }
.gb-fill { position: absolute; top: 0; bottom: 0; left: 0; width: 0; border-radius: inherit; background: linear-gradient(180deg, rgb(255 255 255 / 0.4), rgb(255 255 255 / 0) 60%), var(--gb-c); box-shadow: 0 0 10px var(--gb-c); transition: width 700ms cubic-bezier(.2, .8, .2, 1); }
.gb-ticks { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), rgb(var(--surface) / 0.75) calc(25% - 1px) 25%); pointer-events: none; }
.gb[data-tier="done"] .gb-fill { animation: gb-glow 1.6s ease-out 1; }
@keyframes gb-glow { 0%, 100% { filter: brightness(1); } 40% { filter: brightness(1.35); } }
.gb-line { margin: 0; font-weight: 600; color: rgb(var(--ink)); }
/* The done line starts with a check mark (Lucide circle-check), in teal. */
.gb[data-tier="done"] .gb-line::before { content: ''; display: inline-block; width: 1.25em; height: 1.25em; margin-right: 0.375rem; vertical-align: -0.25em; background: rgb(var(--accent)); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E") center / contain no-repeat; }
@media (forced-colors: active) { .gb[data-tier="done"] .gb-line::before { background: CanvasText; } }
.gb-form { display: grid; gap: 0.5rem; }
.gb-form[hidden] { display: none; }
.gb-form-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.gb-err:empty { display: none; }
/* Drive mode: one slim line under the street and weather, hidden with no goal. */
.gb-drive[hidden] { display: none; }
.gb-compact { padding: 0; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.25rem 0.75rem; }
.gb-compact .gb-head { grid-column: 1; }
.gb-compact .gb-label { margin: 0; font-weight: 700; color: rgb(var(--ink-soft)); }
.gb-compact .gb-amount { grid-column: 2; justify-self: end; text-align: right; }
.gb-compact .gb-earned { font-size: 1.25rem; }
.gb-compact .gb-bar { grid-column: 1 / -1; height: 12px; }
@media (prefers-reduced-motion: reduce) { .gb-fill { transition: none; } .gb[data-tier="done"] .gb-fill { animation: none; } }
/* Goals and bills (owner, 18 and 23 Nov 2026; goal-bar.js, goals-sheet.js). The pace is a word and
   an icon on its own fill: Behind yellow, Good pace green, Ahead the brightest green; the same
   in light and dark (dark text on the two bright fills, white on the green). */
.gb-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; min-width: 0; }
.gb-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 0.75rem; min-width: 0; }
.gb-row > * { min-width: 0; }
/* The buttons keep their 44 px+ tap area but take less room in the row (the card stays as short as before). */
.gb-row > .gb-edit { margin-block: -0.5rem; }
.gb-head > .gb-switch { margin-block: -0.25rem; }
/* Home stays as short as before the switch came (tests/page-home-week.mjs (e)): a slimmer card edge,
   a tighter amount line, and the Goals and bills button reaching up over the bar (not a tap area). */
.gb:not(.gb-compact) { padding-block: 0.75rem; }
.gb-row-amount .gb-amount { line-height: 1.2; }
.gb-row-amount > .gb-edit { align-self: flex-end; }
.gb-row-line { row-gap: 1rem; }
.gb-row > .gb-edit.gb-plan { margin-block: -1rem -0.5rem; }
.gb-titlebox { display: grid; gap: 0.125rem; }
.gb-switch[hidden], .gb-plan[hidden], .gb-tools[hidden], .gb-when[hidden], .gb-pace[hidden], .gb-track[hidden], .gb-line[hidden], .gb-pick[hidden], .gb-billbox[hidden], .gb-bill-nums[hidden] { display: none; }
.gb-switch { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: rgb(var(--surface-sunken)); max-width: 100%; }
.gb-switch-btn { min-height: 44px; min-width: 44px; padding: 0 0.625rem; border-radius: 10px; font-weight: 600; color: rgb(var(--ink-soft)); }
.gb-switch-btn[aria-pressed="true"] { background: rgb(var(--accent)); color: rgb(var(--accent-ink)); }
.gb-switch-btn:focus-visible { outline: 3px solid rgb(var(--focus)); outline-offset: 1px; }
.gb-when { margin: 0; font-size: 0.875rem; font-weight: 600; color: rgb(var(--ink-soft)); }
.gb-pace { display: inline-flex; align-items: center; gap: 0.375rem; justify-self: start; margin: 0; padding: 0.25rem 0.75rem 0.25rem 0.5rem; border-radius: 1rem; font-weight: 700; line-height: 1.3; border: 1px solid transparent; }
.gb-pace[data-pace="behind"] { background: #facc15; color: #422006; }
.gb-pace[data-pace="good"] { background: #15803d; color: #ffffff; }
.gb-pace[data-pace="ahead"] { background: #4ade80; color: #052e16; }
.gb-pace-icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
@media (forced-colors: active) { .gb-pace { border-color: CanvasText; } }
.gb-track { margin: 0; font-weight: 600; color: rgb(var(--ink)); }
.gb-pick { justify-self: start; }
.gb-billbox { display: grid; gap: 0.5rem; padding-top: 0.75rem; border-top: 1px solid rgb(var(--line)); }
.gb-bill { display: block; width: 100%; min-height: 44px; padding: 0.625rem 0.75rem; border-radius: var(--radius-control); text-align: left; font-weight: 600; line-height: 1.4; color: rgb(var(--ink)); background: rgb(var(--accent-softest)); border: 1px solid rgb(var(--accent) / 0.35); }
.gb-bill:hover { background: rgb(var(--accent-soft)); }
.gb-bill[aria-expanded="true"] { border-color: rgb(var(--accent)); }
.gb-nums { display: grid; gap: 0.25rem; margin: 0; }
.gb-nums-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; padding: 0.25rem 0; border-bottom: 1px solid rgb(var(--line)); }
.gb-nums dt { color: rgb(var(--ink-soft)); }
.gb-nums dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; color: rgb(var(--ink)); }
.gb-note { margin: 0; }
.gb-compact .gb-tools { grid-column: 1 / -1; flex: 1 1 100%; margin-top: 0.25rem; }
.gb-compact .gb-pace { grid-column: 1 / -1; margin-top: 0.25rem; }
.gpl { display: grid; gap: 1.25rem; }
.gpl-status { margin: 0; font-weight: 600; color: rgb(var(--ink)); }
.gpl-status:empty { display: none; }
.gpl-section { display: grid; gap: 0.75rem; }
.gpl-title { margin: 0; font-size: 1.0625rem; font-weight: 700; color: rgb(var(--ink)); }
.gpl-view { display: grid; gap: 0.375rem; justify-items: start; }
.gpl-view .gm-label { margin: 0; }
.gpl-subtitle { margin: 0; font-size: 1rem; font-weight: 700; color: rgb(var(--ink)); }
.gpl-form { display: grid; gap: 0.875rem; }
.gpl-form[hidden], .gpl-empty[hidden], .gpl-add[hidden], .gpl-clear[hidden], .gpl-bill-nums[hidden] { display: none; }
.gpl-field { display: grid; gap: 0.25rem; }
.gpl-field .gm-label { margin-bottom: 0; }
.gpl-help { margin: 0; }
.gpl-help:empty { display: none; }
.gpl-clear { justify-self: start; min-height: 44px; }
.gpl-days { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 0.375rem; }
.gpl-day-row { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.gpl-day { min-width: 44px; min-height: 44px; flex: 1 1 3rem; padding: 0 0.25rem; border-radius: 10px; font-weight: 600; color: rgb(var(--ink)); background: rgb(var(--surface)); border: 1px solid rgb(var(--control-border)); }
.gpl-day[aria-pressed="true"] { background: rgb(var(--accent)); color: rgb(var(--accent-ink)); border-color: rgb(var(--accent)); }
.gpl-day:focus-visible { outline: 3px solid rgb(var(--focus)); outline-offset: 1px; }
.gpl-err { margin: 0; color: rgb(var(--bad)); font-weight: 600; }
.gpl-err:empty { display: none; }
.gpl-note { margin: 0; }
.gpl-bills { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.gpl-bill { display: grid; gap: 0.375rem; padding: 0.75rem; border-radius: 14px; border: 1px solid rgb(var(--line)); background: rgb(var(--surface)); }
.gpl-meta { margin: 0; }
.gpl-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.gpl-actions .gm-btn { min-height: 44px; }
.gpl-ask { display: grid; gap: 0.5rem; }
.gpl-ask-text { margin: 0; font-weight: 600; color: rgb(var(--ink)); }
.gpl-empty { margin: 0; color: rgb(var(--ink-soft)); }
.gpl-add { justify-self: start; }
.gpl-check { display: flex; align-items: center; gap: 0.625rem; min-height: 44px; font-weight: 600; color: rgb(var(--ink)); }
.tool-plan { margin-top: 0.75rem; width: 100%; }
.gpl-check input { width: 1.375rem; height: 1.375rem; accent-color: rgb(var(--accent)); }

/* =========================================================================
 * Folds (fold.js): a secondary section opens from its heading. The button's
 * ::after covers the whole head, so the summary and the chevron open it too;
 * the head is at least 48px and shows the focus ring. The summary shows
 * while the fold is closed. No :has(): fold.js marks data-open on the section.
 * ========================================================================= */
.gm-fold-head { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 0.75rem; min-height: var(--tap); }
.gm-fold-head > h2, .gm-fold-head > h3 { grid-column: 1; margin: 0; }
.gm-fold-btn { display: block; width: 100%; min-height: var(--tap); padding: 0.5rem 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; overflow-wrap: break-word; }
.gm-fold-btn::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: var(--radius-control); }
.gm-fold-btn:focus-visible { outline: none; }
.gm-fold-btn:focus-visible::after { outline: 3px solid rgb(var(--focus)); outline-offset: 2px; }
.gm-fold-sum { grid-column: 1; margin: -0.25rem 0 0; padding-bottom: 0.5rem; font-size: 0.875rem; line-height: 1.4; color: rgb(var(--ink-soft)); overflow-wrap: anywhere; }
.gm-fold-sum:empty, .gm-fold[data-open="true"] .gm-fold-sum { display: none; }
.gm-fold-chev { grid-column: 2; grid-row: 1 / span 2; width: 24px; height: 24px; color: rgb(var(--ink-soft)); transition: transform 200ms ease; pointer-events: none; }
.gm-fold[data-open="true"] .gm-fold-chev { -webkit-transform: rotate(180deg); transform: rotate(180deg); }
.gm-fold-body { margin-top: 0.75rem; }
.gm-fold-body[hidden] { display: none; }
@media (hover: hover) { .gm-fold-btn:hover { text-decoration: underline; text-underline-offset: 3px; } }
@media (prefers-reduced-motion: reduce) { .gm-fold-chev { transition: none; } }
@media (forced-colors: active) { .gm-fold-btn:focus-visible::after { outline-color: Highlight; } }

/* =========================================================================
 * The activity log (shared.js renderNotificationsList): one row per entry,
 * its kind by an icon and a colour token, its time in words ("Today 3:51 PM",
 * log-time.js). Tokens only, so light and dark both follow (UX polish W10).
 * ========================================================================= */
.gm-act-list { display: grid; gap: 0.5rem; }
/* Spaced with margins, not flex gap (Chrome 80, Safari 13.4). */
.gm-act { position: relative; display: flex; align-items: flex-start; padding: 0.875rem 1rem; border-radius: var(--radius-card); background: rgb(var(--surface-sunken)); border: 1px solid rgb(var(--line)); color: rgb(var(--ink)); }
a.gm-act { min-height: var(--tap); text-decoration: none; }
a.gm-act:hover { border-color: rgb(var(--line-strong)); background: rgb(var(--surface)); }
.gm-act .gm-row-end { align-self: center; margin-left: 0.75rem; }
.gm-act-icon { display: inline-flex; align-items: center; justify-content: center; margin-right: 0.75rem; width: 36px; height: 36px; border-radius: 10px; background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); color: rgb(var(--accent)); flex: none; }
.gm-act-icon svg { width: 18px; height: 18px; }
.gm-act[data-tone="good"] .gm-act-icon { color: rgb(var(--good)); }
.gm-act[data-tone="warn"] .gm-act-icon { color: rgb(var(--warn)); }
.gm-act[data-tone="bad"] { background: rgb(var(--bad) / 0.06); border-color: rgb(var(--bad) / 0.35); }
.gm-act[data-tone="bad"] .gm-act-icon { color: rgb(var(--bad)); }
.gm-act[data-tone="bad"] .gm-act-title { color: rgb(var(--bad)); }
.gm-act-text { display: grid; gap: 0.125rem; flex: 1; min-width: 0; }
.gm-act-title { font-size: 0.9375rem; font-weight: 700; overflow-wrap: anywhere; }
.gm-act-msg { font-size: 0.875rem; color: rgb(var(--ink-soft)); overflow-wrap: anywhere; }
.gm-act-when { font-size: 0.8125rem; font-weight: 500; color: rgb(var(--ink-faint)); font-variant-numeric: tabular-nums; }
.gm-act-new { display: inline-block; width: 8px; height: 8px; margin-left: 0.5rem; border-radius: 999px; background: rgb(var(--accent)); vertical-align: middle; }
@media (forced-colors: active) { .gm-act { border: 1px solid CanvasText; } .gm-act-new { background: CanvasText; } }

/* The Tracking chip (its own styles are in tracker.js, which this pass leaves
   alone; "html" outweighs them): inside the screen at any width, and with
   very large text its words wrap, centred, so the miles always show
   (WCAG 1.4.4). Home hides it while its big card shows the recording route
   (app.js sets html.gm-home-live). */
html .gm-tracking-chip { max-width: calc(100vw - 2rem); white-space: normal; text-align: center; border-radius: 1.5rem; }
html .gm-tracking-chip .t { min-width: 0; }
html.gm-home-live #gm-tracking-chip { display: none; }
/* Never an empty chip beside "Check for updates" (shared.js puts the version in). */
#app-version:empty { display: none; }

/* The Spanish job (phase 2, the layout pass): rules for Spanish only (html lang="es",
   set by lang-boot.js), where its longer words need room; English is untouched.
   Profile > App > Notifications: the status chip moves under the words when it does not fit. */
html:lang(es) .gm-row:has(> #notification-status-badge) { flex-wrap: wrap; row-gap: 0.25rem; }
html:lang(es) .gm-row:has(> #notification-status-badge) > .gm-row-text { flex: 1 1 6rem; }
html:lang(es) #notification-status-badge { margin-left: auto; }
/* Save this shift: "Ahora no" goes under the title instead of past the edge. */
html:lang(es) #save-sheet .gm-sheet-head { flex-wrap: wrap; row-gap: 0.25rem; }
html:lang(es) #save-sheet .gm-sheet-head > button { margin-left: auto; }
/* Profile > Maps > Restaurants on maps: the On/Off chip moves under the words (as Rush alerts do). */
html:lang(es) #map-restaurants-switch { flex-wrap: wrap; row-gap: 0.25rem; }
html:lang(es) #map-restaurants-switch > .gm-row-text { flex: 1 1 6rem; }
html:lang(es) #map-restaurants-switch > .gm-chip { margin-left: auto; }
/* Profit & Expenses: a shift's time range ("9:00 a.m. – 11:00 a.m.") may wrap at 320 px 200%. */
html:lang(es) .gp-keep-time { display: inline; }
/* Tax center, payment dates: the status chip and its button take their own line when they do not fit. */
html:lang(es) .tx-pay-side { flex: 1 1 100%; justify-content: flex-start; margin-left: 0; }
html:lang(es) .tx-pay-side > * { max-width: 100%; min-width: 0; white-space: normal; }
/* Profit & Expenses: a shift's figures ("$1.20/mi Bueno") may wrap instead of running past the row. */
html:lang(es) .gp-row-figs { flex: 0 1 auto; min-width: 0; max-width: 100%; }
html:lang(es) .gp-fig { white-space: normal; }
