/*! navigation.css 1.5.0 | DJ2000-UK/app-workbench */
/* Getting around an app, as on an iPhone with iOS 26 (DJ, 2026-11-29):
 *
 *   .glass-dock       the floating bar at the foot of a phone screen: the tab
 *                     bar and, beside it, one round action button
 *   .glass-tabbar     Liquid Glass tab bar: a capsule of clear glass with a
 *                     bright rim; tabbar.js adds the lens, the pill under the
 *                     current tab, which lifts into a clear droplet under a
 *                     finger, magnifies the tab under it and follows the finger
 *   .glass-action     the round, bevelled + beside it: the app's one main log action,
 *                     or, with aria-controls, the + that turns into an × and opens
 *   .glass-menu       a glass panel of round actions above the bar (Bevel's +);
 *                     held, it opens for choosing what it shows (.is-editing)
 *   .is-minimized     on the dock: the bar shrunk to one round button holding the
 *                     current tab's icon, and the + with it (iOS 26's minimise on scroll)
 *   .is-pulsing       on the tab just chosen (and its copy in the lens): its icon
 *                     bounces once, as iOS 26's tab bar does on a change of tab
 *   .glass-tabbar__fill  a part of a tab's icon that fills in while the tab is
 *                     current, as iOS swaps a tab's symbol for its .fill variant
 *   .nav-groups ...   More and settings as an iOS Settings grouped list: sentence
 *                     case headings, solid rounded groups, a coloured tile with
 *                     a white glyph per row, hairlines inset to the text, values
 *                     and chevrons in the system font at iOS sizes
 *   .page-head--large a large page title, as iOS Settings has
 *
 * Every colour comes from the app's own tokens (--ink, --muted, --panel, --void,
 * the accent, the shared status and data colours), so the bar and the lists
 * follow the palette and the Vibrancy and Contrast sliders. Kaizen calls its
 * accent --cyan. Everything sits in the djcns.navigation layer, so an app's own
 * unlayered rule always wins. docs/NAVIGATION.md has the markup. */

@layer djcns.navigation {
  :root {
    --glass-tint: var(--tab-accent, var(--accent, var(--cyan)));
    --glass-fill: color-mix(in srgb, var(--panel) 62%, transparent);
    --glass-blur: blur(14px) saturate(185%) brightness(1.06);
    /* Bright where light would catch it, and never fainter than a clear ring
       all round, so the bar and the + read as whole shapes (as Bevel's do). */
    --glass-rim: linear-gradient(160deg,
      color-mix(in srgb, var(--ink) 46%, transparent),
      color-mix(in srgb, var(--ink) 17%, transparent) 34%,
      color-mix(in srgb, var(--ink) 13%, transparent) 64%,
      color-mix(in srgb, var(--ink) 30%, transparent));
    /* The drop shadows point up, so they never darken the screen's foot
       (docs/IPHONE.md, the Home Screen fill fix). */
    --glass-shadow:
      inset 0 1px 0 color-mix(in srgb, var(--ink) 16%, transparent),
      inset 0 -1px 0 color-mix(in srgb, var(--void) 28%, transparent),
      0 -12px 28px color-mix(in srgb, var(--void) 55%, transparent),
      0 -3px 8px color-mix(in srgb, var(--void) 28%, transparent);
    --glass-spring: cubic-bezier(.32, 1.32, .46, 1);
    /* Bevel's dock (DJ, 2026-11-29): 21 pt in from both sides of a 402 pt
       iPhone, less on a narrower one, and 8 pt between the bar and the +. */
    --glass-dock-inset: clamp(12px, 5.25vw, 21px);
    --glass-dock-gap: 8px;
    /* Minimised (iOS 26's tabBarMinimizeBehavior(.onScrollDown), as Bevel's,
       DJ 2026-11-30): the bar and the + at 48 pt from 62, eased with a
       little give. */
    --glass-mini-scale: .775;
    --glass-mini-icon: 1.25;  /* the current tab's icon, larger in the small bar, as the +'s */
    /* The minimise morph eases out without passing its mark (1.5.0): the bar's
       width cannot shrink past a circle, so an overshoot carried the icon past
       the middle after the circle had stopped, and back (DJ, 2026-11-30). */
    --glass-morph: cubic-bezier(.3, 1, .44, 1);
    --glass-morph-time: 480ms;
    /* The dock's foot where an app sets no --tabbar-bottom (djcns.css sets it):
       clear of Android's system bars, 13px into the iPhone's home indicator area. */
    --glass-dock-foot: max(10px, calc(env(safe-area-inset-bottom, 0px) + 8px));
  }
  @supports (-webkit-touch-callout: none) {
    :root { --glass-dock-foot: max(10px, calc(env(safe-area-inset-bottom, 0px) - 13px)); }
  }

  /* The dock: fixed just clear of the home indicator, inset from both sides as
     Bevel's is, so the + sits under the thumb rather than in the corner. It
     lets touches through everywhere except on the bar and the button. Where an
     app hides the bar (a wide screen with a sidebar), it sets
     --glass-dock-left: auto, so the button floats on its own at the right. */
  .glass-dock {
    position: fixed;
    z-index: var(--z-tabbar, 90);
    right: var(--glass-dock-right, max(var(--glass-dock-inset), env(safe-area-inset-right, 0px)));
    bottom: var(--glass-dock-bottom, var(--tabbar-bottom, var(--glass-dock-foot)));
    left: var(--glass-dock-left, max(var(--glass-dock-inset), env(safe-area-inset-left, 0px)));
    display: flex;
    max-width: var(--glass-dock-max, 640px);
    margin-inline: auto;
    gap: var(--glass-dock-gap);
    align-items: center;
    justify-content: center;
    pointer-events: none;
  }
  .glass-dock > * { pointer-events: auto; }

  /* The bar. touch-action: none keeps a sideways drag on it from scrolling the
     page, as on an iPhone, so the lens can follow the finger. */
  .glass-tabbar {
    --lens-x: 0px;
    --lens-w: 0px;
    position: relative;
    display: grid;
    flex: 1 1 var(--tabbar-height, 62px);
    min-width: 0;
    min-height: var(--tabbar-height, 62px);
    padding: 4px;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    align-items: stretch;
    border: 0;
    border-radius: 999px;
    background: var(--glass-fill);
    box-shadow: var(--glass-shadow);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    isolation: isolate;
    touch-action: none;
    transform-origin: calc(var(--tabbar-height, 62px) / 2) 50%;
    transition: flex-grow var(--glass-morph-time) var(--glass-morph), scale var(--glass-morph-time) var(--glass-morph);
    -webkit-user-select: none;
    user-select: none;
  }

  /* The rim: a thin edge, bright where light would catch it (top left) and
     again at the bottom right, drawn as a 1 px ring with a mask. */
  .glass-tabbar::before,
  .glass-action::before,
  .glass-menu::before {
    position: absolute;
    z-index: 3;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: var(--glass-rim);
    content: "";
    pointer-events: none;
    -webkit-mask: linear-gradient(var(--ink) 0 0) content-box, linear-gradient(var(--ink) 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(var(--ink) 0 0) content-box exclude, linear-gradient(var(--ink) 0 0);
  }
  /* A soft sheen across the top, as light on curved glass. */
  .glass-tabbar::after,
  .glass-action::after,
  .glass-menu::after {
    position: absolute;
    z-index: 0;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(120% 90% at 50% -38%, color-mix(in srgb, var(--ink) 13%, transparent), transparent 62%);
    content: "";
    pointer-events: none;
  }

  /* The lens: the pill under the current tab. tabbar.js moves it on springs
     (transform and width), and lifts it into a droplet while a finger is on
     the bar (--lens-lift, 0 to 1): the resting pill fades into a clear drop
     with a bright rim. Inside it, a copy of the tabs in the tint, magnified;
     the real tabs are clipped away under it, so the current tab's colour is
     always the lens's. Without tabbar.js there is no lens, and the current
     tab is tinted on its own (below). */
  .glass-tabbar__lens {
    position: absolute;
    z-index: 3;
    top: 4px;
    bottom: 4px;
    left: 0;
    width: 0;
    overflow: hidden;
    border-radius: 999px;
    pointer-events: none;
    will-change: transform;
  }
  .glass-tabbar__lens::before,
  .glass-tabbar__lens::after {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    content: "";
    pointer-events: none;
  }
  /* At rest: a soft pill of light. */
  .glass-tabbar__lens::before {
    background: color-mix(in srgb, var(--ink) 13%, transparent);
    box-shadow:
      inset 0 1px 0 color-mix(in srgb, var(--ink) 16%, transparent),
      inset 0 -1px 0 color-mix(in srgb, var(--void) 24%, transparent);
    opacity: calc(1 - var(--lens-lift, 0));
  }
  /* Lifted: clear glass, a bright edge where light catches it, a faint sheen. */
  .glass-tabbar__lens::after {
    z-index: 2;
    background:
      radial-gradient(90% 70% at 30% 0%, color-mix(in srgb, var(--ink) 16%, transparent), transparent 70%),
      radial-gradient(80% 60% at 75% 110%, color-mix(in srgb, var(--ink) 10%, transparent), transparent 70%),
      color-mix(in srgb, var(--ink) 4%, transparent);
    box-shadow:
      inset 0 1.5px 0 color-mix(in srgb, var(--ink) 55%, transparent),
      inset 0 -1px 0 color-mix(in srgb, var(--ink) 26%, transparent),
      inset 0 0 0 1px color-mix(in srgb, var(--ink) 18%, transparent),
      inset 0 0 12px color-mix(in srgb, var(--ink) 10%, transparent);
    opacity: var(--lens-lift, 0);
  }
  .glass-tabbar.is-empty .glass-tabbar__lens { opacity: 0; }
  /* The copy of the tabs, in the tint, set out by tabbar.js. */
  .glass-tabbar__ghost {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    color: var(--glass-tint);
    pointer-events: none;
    transform-origin: 0 0;
  }
  .glass-tabbar__ghost > * { overflow: visible; }

  .glass-tabbar > :is(a, button) {
    position: relative;
    z-index: 2;
    left: 0;  /* from here the tabs slide into the small bar (an auto left would not animate) */
    display: flex;
    min-width: 0;
    min-height: 54px;
    padding: 0 2px;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--muted-bright);
    font: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
  }
  .glass-tabbar > :is(a, button) > * { pointer-events: none; }
  .glass-tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .glass-tabbar strong { max-width: 100%; overflow: hidden; font-size: 10.5px; font-weight: 650; letter-spacing: 0; line-height: 1; text-overflow: ellipsis; text-transform: none; white-space: nowrap; }
  .glass-tabbar > [aria-current="page"] { color: var(--glass-tint); }
  /* The current tab's icon fills in, as iOS shows a tab's .fill symbol (DJ,
     2026-11-30, after Lyfta): the parts an app marks .glass-tabbar__fill, on the
     tab and on its copy in the lens (tabbar.js marks that .is-current). */
  .glass-tabbar .glass-tabbar__fill { fill: currentColor; fill-opacity: 0; transition: fill-opacity 180ms ease; }
  .glass-tabbar > :is([aria-current="page"], [aria-selected="true"], .is-mini-current) .glass-tabbar__fill,
  .glass-tabbar__ghost > .is-current .glass-tabbar__fill { fill-opacity: 1; }
  /* A change of tab: the new tab's icon swells and settles with a little give
     (tabbar.js adds .is-pulsing for one bounce, while the lens pulses). */
  .glass-tabbar .is-pulsing svg { animation: glass-tab-pulse 460ms cubic-bezier(.3, .7, .4, 1); }
  @keyframes glass-tab-pulse {
    0% { scale: 1; }
    28% { scale: 1.2; }
    58% { scale: .94; }
    80% { scale: 1.03; }
    100% { scale: 1; }
  }
  /* With the lens mounted, the tint lives in the lens. */
  .glass-tabbar.has-loupe > :is(a, button) { color: var(--muted-bright); }
  .glass-tabbar > :is(a, button):focus-visible { outline: 2px solid var(--glass-tint); outline-offset: -2px; -webkit-clip-path: none !important; clip-path: none !important; }

  /* The action: round glass, bevelled, the bar's height (Bevel's 62 pt). */
  .glass-action {
    position: relative;
    display: grid;
    width: var(--tabbar-height, 62px);
    height: var(--tabbar-height, 62px);
    flex: 0 0 auto;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background:
      radial-gradient(circle at 32% 24%, color-mix(in srgb, var(--ink) 20%, transparent), transparent 58%),
      radial-gradient(circle at 70% 88%, color-mix(in srgb, var(--glass-tint) 16%, transparent), transparent 60%),
      var(--glass-fill);
    color: var(--ink);
    box-shadow:
      inset 0 1.5px 0 color-mix(in srgb, var(--ink) 34%, transparent),
      inset 0 -3px 7px color-mix(in srgb, var(--void) 42%, transparent),
      inset 0 0 0 1px color-mix(in srgb, var(--ink) 5%, transparent),
      0 -12px 28px color-mix(in srgb, var(--void) 55%, transparent),
      0 -10px 18px color-mix(in srgb, var(--glass-tint) 12%, transparent);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    cursor: pointer;
    isolation: isolate;
    touch-action: manipulation;
    transition: scale 380ms var(--glass-spring), transform var(--glass-morph-time) var(--glass-morph), box-shadow 200ms ease, background-color 200ms ease;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }
  .glass-action svg { position: relative; z-index: 2; width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 1px color-mix(in srgb, var(--void) 50%, transparent)); transition: rotate 420ms var(--glass-spring); }
  /* With its menu open, the + turns a quarter of the way round into an ×, in the same spot. */
  .glass-action[aria-expanded="true"] svg { rotate: 45deg; }
  /* Interactive glass grows under a finger and brightens, as on iOS (tabbar.js adds is-pressed). */
  .glass-action:is(:active, .is-pressed) {
    scale: 1.12;
    box-shadow:
      inset 0 1.5px 0 color-mix(in srgb, var(--ink) 48%, transparent),
      inset 0 -3px 7px color-mix(in srgb, var(--void) 30%, transparent),
      inset 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent),
      inset 0 0 18px color-mix(in srgb, var(--ink) 12%, transparent),
      0 -12px 28px color-mix(in srgb, var(--void) 55%, transparent),
      0 -10px 22px color-mix(in srgb, var(--glass-tint) 20%, transparent);
  }
  .glass-action:focus-visible { outline: 2px solid var(--glass-tint); outline-offset: 3px; }
  /* Beside a bar, the + keeps to the end of the dock however small the bar gets. */
  .glass-tabbar ~ .glass-action { margin-left: auto; }

  /* Minimised (tabbar.js adds is-minimized to the dock): the bar's width eases
     to its height, so it is a circle at the leading corner, and the bar and the
     + both scale to --glass-mini-scale about their own middles. While the bar is
     small or on its way back (is-mini-layout), its tabs keep their full width
     (--mini-col) and are clipped; they slide by --mini-shift (left, which moves
     in the same frames as the width, where translate may run on its own) so the
     current tab (is-mini-current) sits in the circle, its icon dropped by --mini-drop to the
     middle, grown by --glass-mini-icon and in the tint, its name and the other
     tabs faded. The lens hides
     meanwhile, and the current tab is tinted instead. A tap on the small bar
     brings it back and opens nothing. */
  .is-minimized > .glass-tabbar { flex-grow: 0; scale: var(--glass-mini-scale); cursor: pointer; }
  .is-minimized > .glass-action { transform: scale(var(--glass-mini-scale)); }
  .glass-tabbar.is-mini-layout { grid-auto-columns: var(--mini-col, minmax(0, 1fr)); overflow: hidden; overflow: clip; }
  .glass-tabbar.is-mini-layout > .glass-tabbar__lens { opacity: 0; }
  .glass-tabbar.is-mini-layout > :is(a, button) { transition: left var(--glass-morph-time) var(--glass-morph), translate var(--glass-morph-time) var(--glass-morph), scale var(--glass-morph-time) var(--glass-morph), opacity 200ms ease, visibility 200ms; }
  .glass-tabbar.is-mini-layout > :is(a, button) > *,
  .glass-tabbar.is-mini-layout > :is(a, button) > :not(:first-child) * { transition: opacity 160ms ease; }
  .glass-tabbar.is-mini-layout > .is-mini-current { color: var(--glass-tint); }
  /* The other tabs are hidden once faded, so the small bar is one target and the current tab the only one a screen reader or the Tab key reaches, as iOS shows only the current tab. */
  .is-minimized > .glass-tabbar > :is(a, button) { left: var(--mini-shift, 0px); opacity: 0; visibility: hidden; }
  .is-minimized > .glass-tabbar > .is-mini-current { opacity: 1; visibility: visible; translate: 0 calc(var(--mini-drop, 0px) * var(--glass-mini-icon)); scale: var(--glass-mini-icon); }
  /* The name fades, and what it holds too: an app may wrap it in display: contents, which takes no opacity. */
  .is-minimized > .glass-tabbar > .is-mini-current > :not(:first-child),
  .is-minimized > .glass-tabbar > .is-mini-current > :not(:first-child) * { opacity: 0; }

  /* The menu the + opens, as Bevel's (DJ, 2026-11-29): a glass panel just
     above the dock, as wide as it, with the app's ways to log in rows of three
     round buttons, each named underneath. It grows out of the + with a spring
     and shrinks back into it. tabbar.js opens and closes it; the page behind
     dims a little, and a tap on it, Escape, a tab or a choice closes it. */
  .glass-menu {
    position: absolute;
    z-index: 4;
    right: 0;
    bottom: calc(100% + 11px);
    display: grid;
    width: min(max(100%, 340px), 430px, calc(100vw - 2 * var(--glass-dock-inset)));
    padding: 20px 8px 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 4px;
    align-items: start;
    border-radius: 26px;
    background:
      radial-gradient(130% 60% at 50% -12%, color-mix(in srgb, var(--ink) 7%, transparent), transparent 70%),
      color-mix(in srgb, var(--panel) 84%, transparent);
    box-shadow:
      inset 0 1px 0 color-mix(in srgb, var(--ink) 14%, transparent),
      0 -14px 40px color-mix(in srgb, var(--void) 55%, transparent),
      0 10px 30px color-mix(in srgb, var(--void) 40%, transparent);
    -webkit-backdrop-filter: blur(26px) saturate(170%);
    backdrop-filter: blur(26px) saturate(170%);
    isolation: isolate;
    opacity: 0;
    pointer-events: none;
    scale: .3;
    transform-origin: calc(100% - var(--tabbar-height, 62px) / 2) calc(100% + 11px + var(--tabbar-height, 62px) / 2);
    visibility: hidden;
    transition: opacity 170ms ease, scale 240ms cubic-bezier(.4, 0, .7, .2), visibility 0s linear 240ms;
  }
  .glass-menu.is-open {
    opacity: 1;
    pointer-events: auto;
    scale: 1;
    visibility: visible;
    transition: opacity 160ms ease, scale 480ms var(--glass-spring), visibility 0s;
  }
  .glass-menu > * { position: relative; z-index: 1; }
  .glass-menu__item {
    position: relative;
    display: grid;
    min-width: 0;
    padding: 0 2px;
    gap: 9px;
    justify-items: center;
    border: 0;
    background: none;
    color: var(--ink);
    font: inherit;
    font-family: var(--grouped-font);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }
  .glass-menu__item[hidden] { display: none; }
  /* A choice the person hid (data-menu-off) stays out of the menu, whatever the
     app's own rules say, until they choose it again. */
  .glass-menu:not(.is-editing) > [data-menu-off] { display: none !important; }
  .glass-menu__icon {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--void) 34%, transparent);
    box-shadow:
      inset 0 1px 0 color-mix(in srgb, var(--ink) 9%, transparent),
      inset 0 0 0 1px color-mix(in srgb, var(--ink) 6%, transparent);
    transition: scale 300ms var(--glass-spring), background-color 160ms ease;
  }
  .glass-menu__icon svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .glass-menu__item:active .glass-menu__icon { background: color-mix(in srgb, var(--ink) 16%, transparent); scale: .93; }
  .glass-menu__item:focus-visible { outline: none; }
  .glass-menu__item:focus-visible .glass-menu__icon { outline: 2px solid var(--glass-tint); outline-offset: 2px; }

  /* Choosing what the + shows (tabbar.js adds is-editing; DJ, 2026-11-30, as
     Bevel's): a head with the menu's name and Done, a − badge at the top left
     of each choice it shows and a + on each it hides, which is dimmed. The
     last choice showing (data-menu-keep) has no badge. */
  .glass-menu__head { display: none; }
  .glass-menu.is-editing > .glass-menu__head {
    display: flex;
    min-width: 0;
    margin: -6px 6px 0;
    grid-column: 1 / -1;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
  }
  .glass-menu__title { min-width: 0; overflow: hidden; color: var(--ink); font-family: var(--grouped-font); font-size: 17px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
  .glass-menu__done {
    flex: 0 0 auto;
    min-width: 72px;
    min-height: 38px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ink) 24%, transparent);
    color: var(--ink);
    font: inherit;
    font-family: var(--grouped-font);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -.01em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .glass-menu__done:active { background: color-mix(in srgb, var(--ink) 34%, transparent); }
  .glass-menu__done:focus-visible { outline: 2px solid var(--glass-tint); outline-offset: 2px; }
  .glass-menu.is-editing > :is(button, a)::before {
    position: absolute;
    z-index: 2;
    top: -4px;
    left: calc(50% - 33px);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background:
      linear-gradient(var(--void), var(--void)) center / 10px 2px no-repeat,
      color-mix(in srgb, var(--ink) 74%, var(--void));
    box-shadow: 0 1px 4px color-mix(in srgb, var(--void) 45%, transparent);
    content: "";
    pointer-events: none;
    animation: glass-badge-in 320ms var(--glass-spring) both;
  }
  .glass-menu.is-editing > [data-menu-off]::before {
    background:
      linear-gradient(var(--void), var(--void)) center / 10px 2px no-repeat,
      linear-gradient(var(--void), var(--void)) center / 2px 10px no-repeat,
      var(--glass-tint);
  }
  .glass-menu.is-editing > [data-menu-keep]::before { display: none; }
  .glass-menu.is-editing > [data-menu-off] > * { opacity: .45; }
  @keyframes glass-badge-in { from { scale: 0; } to { scale: 1; } }
  /* The dimmed page behind an open menu, made by tabbar.js; a tap on it closes the menu.
     Closed, it is hidden, not only clear: iOS looks for the bar to colour the status
     bar from by hit-testing the top of the page, and an invisible box over the whole
     screen sent it to the dock instead of the header (docs/IPHONE.md). */
  .glass-menu-scrim {
    position: fixed;
    inset: 0;
    background: color-mix(in srgb, var(--void) 38%, transparent);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    touch-action: none;
    transition: opacity 220ms ease, visibility 0s linear 220ms;
  }
  .glass-menu-scrim.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 220ms ease, visibility 0s; }

  /* More and settings: grouped lists, as in iOS Settings and Athlytic. Solid
     rounded groups a step lighter than the screen, rows in the system font at
     iOS sizes (17 px), a coloured tile with a white glyph leading each row,
     hairlines that start where the text does, grey values and a thin chevron. */
  :root {
    --grouped-fill: color-mix(in srgb, var(--ink) 9.5%, var(--void));
    --grouped-press: color-mix(in srgb, var(--ink) 19%, var(--void));
    --grouped-line: color-mix(in srgb, var(--ink) 17%, transparent);
    --grouped-font: -apple-system, BlinkMacSystemFont, var(--font-sans, system-ui), sans-serif;
  }
  .nav-groups { display: grid; min-width: 0; gap: 30px; align-content: start; }
  .nav-group { display: grid; min-width: 0; gap: 9px; align-content: start; }
  .nav-group > :is(h2, h3) { margin: 0 16px; color: color-mix(in srgb, var(--ink) 82%, transparent); font-family: var(--grouped-font); font-size: 17px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; text-transform: none; }
  .nav-list {
    position: relative;
    display: grid;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 26px;
    background: var(--grouped-fill);
    list-style: none;
  }
  .nav-list > li { position: relative; min-width: 0; }
  /* Hairlines start where the text does, as in iOS. */
  .nav-list > li + li::before { position: absolute; z-index: 1; top: 0; right: 0; left: 16px; height: 1px; background: var(--grouped-line); content: ""; pointer-events: none; transform: scaleY(.5); transform-origin: 0 0; }
  .nav-list > li + li:has(.nav-row__icon)::before { left: 60px; }
  .nav-row {
    position: relative;
    display: grid;
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 10px 16px;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
    align-items: center;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--ink);
    font: inherit;
    font-family: var(--grouped-font);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 160ms ease;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-row:has(> .nav-row__icon) { padding-left: 16px; grid-template-columns: 30px minmax(0, 1fr) auto; column-gap: 14px; }
  .nav-row__icon {
    --nav-tint: var(--accent, var(--cyan));
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(180deg, color-mix(in oklab, var(--nav-tint), var(--white, var(--ink)) 14%), var(--nav-tint) 52%, color-mix(in oklab, var(--nav-tint), var(--void) 10%));
    color: var(--white, var(--ink));
    box-shadow: inset 0 .5px 0 color-mix(in srgb, var(--white, var(--ink)) 30%, transparent);
  }
  .nav-row__icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 .5px .5px color-mix(in srgb, var(--void) 22%, transparent)); }
  .nav-row__icon[data-tint="mint"] { --nav-tint: var(--data-1); }
  .nav-row__icon[data-tint="blue"] { --nav-tint: var(--data-2); }
  .nav-row__icon[data-tint="amber"] { --nav-tint: var(--data-3); }
  .nav-row__icon[data-tint="pink"] { --nav-tint: var(--data-4); }
  .nav-row__icon[data-tint="sky"] { --nav-tint: var(--data-5); }
  .nav-row__icon[data-tint="green"] { --nav-tint: var(--positive); }
  .nav-row__icon[data-tint="red"] { --nav-tint: var(--danger, var(--health)); }
  .nav-row__icon[data-tint="purple"] { --nav-tint: var(--purple); }
  .nav-row__icon[data-tint="grey"] { --nav-tint: color-mix(in srgb, var(--muted) 82%, var(--void)); }
  .nav-row__text { display: grid; min-width: 0; gap: 1px; }
  .nav-row__text strong { overflow-wrap: anywhere; font-size: 17px; font-weight: 400; letter-spacing: -.025em; line-height: 1.29; text-transform: none; }
  .nav-row__text small { color: var(--muted); font-family: var(--grouped-font); font-size: 13px; letter-spacing: -.005em; line-height: 1.3; }
  .nav-row__end { display: flex; min-width: 0; gap: 10px; align-items: center; color: color-mix(in srgb, var(--muted) 72%, transparent); font-size: 17px; font-weight: 400; line-height: 1; }
  .nav-row__value { max-width: 46vw; overflow: hidden; color: var(--muted); font-size: 17px; font-weight: 400; letter-spacing: -.025em; text-align: right; text-overflow: ellipsis; text-transform: none; white-space: nowrap; }
  /* A page row's › is drawn as iOS's thin chevron; an action keeps its ↗, small. */
  a.nav-row .nav-row__end > [aria-hidden="true"]:last-child {
    display: block;
    width: 8px;
    height: 8px;
    margin: 0 4px 0 0;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    border-radius: 0 1.5px 0 0;
    font-size: 0;
    transform: rotate(45deg);
  }
  button.nav-row .nav-row__end > [aria-hidden="true"]:last-child { font-size: 15px; }
  .nav-row:active { background: var(--grouped-press); }
  .nav-row[aria-current="page"] { background: color-mix(in srgb, var(--accent, var(--cyan)) 10%, var(--grouped-fill)); }
  .nav-row[aria-current="page"] .nav-row__end { color: var(--accent, var(--cyan)); }
  /* The keyboard's ring follows the list's round corners, never a square box (DJ,
     2026-11-30). A row focused after a tap, as when a dialog closes, shows no ring:
     tabbar.js marks it data-focus-quiet until it is left or a key is pressed. */
  .nav-row:focus-visible { outline: 2px solid var(--accent, var(--cyan)); outline-offset: -3px; border-radius: 23px; }
  .nav-row[data-focus-quiet]:focus-visible { outline: none; }

  /* A large title, as iOS Settings leads with. */
  .page-head--large :is(h1, .page-title) { font-family: var(--grouped-font); font-size: clamp(30px, 8.7vw, 34px); font-weight: 700; letter-spacing: .008em; line-height: 1.12; text-transform: none; }

  @media (prefers-reduced-motion: reduce) {
    .glass-tabbar,
    .glass-tabbar > :is(a, button),
    .glass-tabbar.is-mini-layout > :is(a, button),
    .glass-tabbar.is-mini-layout > :is(a, button) > *,
    .glass-tabbar.is-mini-layout > :is(a, button) > :not(:first-child) *,
    .glass-action,
    .glass-action svg { transition: none; }
    .glass-menu.is-editing > :is(button, a)::before { animation: none; }
    .glass-tabbar .is-pulsing svg { animation: none; }
    .glass-action:is(:active, .is-pressed) { scale: none; }
    .glass-menu,
    .glass-menu.is-open { scale: none; transition: opacity 120ms ease, visibility 0s linear 120ms; }
    .glass-menu.is-open { transition: opacity 120ms ease, visibility 0s; }
  }
}
