/*
  Overlap UI: one shared library, four looks.

  How to use it
  1. Load Poppins (300, 400, 500, 600) and Vollkorn (italic 900), then this file.
  2. Put class "ou-app" and data-ui="atrium | workbench | studio | frontdoor"
     on the app's root element. The look comes from that one attribute.
  3. Optional: data-mode="dark" or "auto" for the dark version of a look, and
     data-density="compact" for tighter spacing on screens full of data.
  4. Build the screen from the ou-* parts below. Never restyle a part inside an
     app; change it here so every app gets the fix.

  How it is built
  - Brand colors (--ol-*) never change.
  - Each look sets the same role tokens (--ou-*): ground, surface, ink, accent.
  - Parts read only role tokens, so one part works in all four looks.
  - A dark or feature card re-points the role tokens for everything inside it,
    which is why a pill or a list looks right on a dark card with no extra CSS.
  - Layout responds to the width of the .ou-app box (container queries), not
    the window, so a screen also works inside a narrow pane.
*/

:root {
  /* Brand: Tim's seven colors, and no others. No teal, red, yellow, orange, or
     brown. Every color in this file is one of these seven, one of them made
     see-through, or a mix of two of them (color-mix), so a blend, a frosted
     card, or a shadow never leaves the family. tools/seven-colors.mjs checks it. */
  --ol-white: #ffffff;
  --ol-ice: #e0eef5;
  --ol-seafoam: #9ecec7;
  --ol-steel: #7294ab;
  --ol-navy: #414e5b;
  --ol-slate: #2f353c;
  --ol-black: #000000;

  --ou-font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ou-font-accent: "Vollkorn", Georgia, serif;
  --ou-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ───────────────────────── The four looks ───────────────────────── */

/* Light defaults shared by Atrium, Workbench, and Front Door. */
.ou-app {
  --ou-dark: var(--ol-slate);
  --ou-on-dark: var(--ol-ice);
  --ou-strong: var(--ou-dark);
  --ou-on-strong: var(--ou-on-dark);
  --ou-feature: linear-gradient(150deg, color-mix(in srgb, var(--ol-steel) 40%, var(--ol-navy)), var(--ol-navy));
  --ou-accent: var(--ol-seafoam);
  --ou-on-accent: var(--ol-slate);
  --ou-accent-strong: var(--ol-navy);
  --ou-accent-soft: rgba(158, 206, 199, 0.32);
  --ou-ink: var(--ol-slate);
  --ou-ink-2: var(--ol-navy);
  --ou-ink-3: color-mix(in srgb, var(--ol-navy) 70%, var(--ol-steel));
  --ou-line: rgba(47, 53, 60, 0.1);
  --ou-line-strong: rgba(47, 53, 60, 0.24);
  --ou-hatch: rgba(47, 53, 60, 0.25);
  --ou-hover: rgba(47, 53, 60, 0.045);
  /* Status has no red, yellow, or green. Good is a seafoam tint, a warning is a
     steel tint, and bad is the one dark pill: "bad-fill" with "on-bad" text on it.
     "bad" alone is the color of error text and of an error outline. */
  --ou-good: var(--ol-slate);
  --ou-good-soft: color-mix(in srgb, var(--ol-seafoam) 50%, var(--ol-white));
  --ou-warn: var(--ol-slate);
  --ou-warn-soft: color-mix(in srgb, var(--ol-steel) 30%, var(--ol-white));
  --ou-bad: var(--ol-black);
  --ou-bad-soft: var(--ol-ice);
  --ou-bad-fill: var(--ol-slate);
  --ou-on-bad: var(--ol-white);
  --ou-blur: none;
  --ou-r-row: 0.75rem;
  --ou-bar-track: transparent;
  --ou-bar: var(--ou-strong);
  --ou-bar-accent: var(--ou-accent);
  --ou-line-1: var(--ol-navy);
  --ou-line-2: var(--ol-steel);
}

/* Atrium: the home dashboard. Misty gradient ground, frosted cards, pill
   navigation across the top, big light numbers, one dark card for focus. */
.ou-app[data-ui="atrium"] {
  --ou-ground: linear-gradient(118deg, color-mix(in srgb, var(--ol-ice) 60%, var(--ol-white)) 0%, var(--ol-ice) 34%, color-mix(in srgb, var(--ol-seafoam) 30%, var(--ol-ice)) 68%, color-mix(in srgb, var(--ol-seafoam) 70%, var(--ol-ice)) 100%);
  --ou-panel: rgba(255, 255, 255, 0.42);
  --ou-surface: rgba(255, 255, 255, 0.6);
  --ou-surface-solid: #ffffff;
  --ou-surface-2: rgba(47, 53, 60, 0.07);
  --ou-edge: rgba(255, 255, 255, 0.78);
  --ou-blur: blur(20px) saturate(1.1);
  --ou-field: rgba(255, 255, 255, 0.78);
  --ou-primary: var(--ol-slate);
  --ou-on-primary: #ffffff;
  /* The quietest text is plain navy here, so it still reads in the seafoam corner of the ground. */
  --ou-ink-3: var(--ol-navy);
  --ou-r-shell: 2.25rem;
  --ou-r-card: 1.75rem;
  --ou-r-ctl: 999px;
  --ou-r-input: 999px;
  --ou-r-row: 999px;
  --ou-pad: 1.25rem;
  --ou-gap: 0.75rem;
  --ou-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 18px 40px -28px rgba(47, 53, 60, 0.4);
  --ou-shadow-hover: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 20px 42px -28px rgba(47, 53, 60, 0.46);
  --ou-num-weight: 300;
  --ou-title-weight: 400;
  --ou-bar-w: 0.5rem;
  --ou-bar-track: rgba(47, 53, 60, 0.08);
}

/* Atrium's color schemes (2026-11-19). Set data-tone on the same element.
     data-tone="mist"     the default, above: white to ice to seafoam
     data-tone="seafoam"  a seafoam ground with whiter glass
     data-tone="night"    Atrium's dark version; the same as data-mode="dark" */
.ou-app[data-ui="atrium"][data-tone="seafoam"] {
  --ou-ground: linear-gradient(118deg, color-mix(in srgb, var(--ol-seafoam) 40%, var(--ol-ice)) 0%, color-mix(in srgb, var(--ol-seafoam) 75%, var(--ol-ice)) 45%, var(--ol-seafoam) 100%);
  --ou-panel: rgba(255, 255, 255, 0.5);
  --ou-surface: rgba(255, 255, 255, 0.72);
  --ou-edge: rgba(255, 255, 255, 0.88);
  --ou-surface-2: rgba(47, 53, 60, 0.09);
  --ou-field: rgba(255, 255, 255, 0.85);
  --ou-accent-soft: rgba(255, 255, 255, 0.6);
  --ou-bar-track: rgba(47, 53, 60, 0.1);
  /* Quiet text is a step darker here, so it still reads on the full-seafoam corner of the ground. */
  --ou-ink-2: color-mix(in srgb, var(--ol-navy) 50%, var(--ol-slate));
  --ou-ink-3: color-mix(in srgb, var(--ol-navy) 50%, var(--ol-slate));
  --ou-hatch: rgba(47, 53, 60, 0.16);
}

/* Atrium with a sidebar (2026-11-19). The sidebar came from Workbench: Tim asked for
   Workbench's left menu to be folded into Atrium. Here it is frosted glass like the
   cards, its rows are pills, and the current page is the same dark pill Atrium's top
   menu uses, with a seafoam edge beside it. */
.ou-app[data-ui="atrium"] .ou-sidebar { border: 1px solid var(--ou-edge); box-shadow: var(--ou-shadow); backdrop-filter: var(--ou-blur); -webkit-backdrop-filter: var(--ou-blur); }
.ou-app[data-ui="atrium"] .ou-sidenav a { border-radius: 999px; }
.ou-app[data-ui="atrium"] .ou-sidenav a[aria-current="page"] { background: var(--ou-strong); color: var(--ou-on-strong); box-shadow: none; }
.ou-app[data-ui="atrium"] .ou-sidenav a[aria-current="page"] .ou-ico { color: var(--ou-accent); }
.ou-app[data-ui="atrium"] .ou-sidenav a::before { background: var(--ou-accent); }
.ou-app[data-ui="atrium"] .ou-sidenav a[aria-current="page"] .ou-count { background: var(--ou-accent); color: var(--ou-on-accent); }
/* Atrium's springy feel (2026-11-19, from the Fluid style Tim liked): a button dips a
   little further and settles with a small bounce, and a tick pops as it lands. Nothing
   moves under the mouse; this is the press and the change only. */
.ou-app[data-ui="atrium"] :is(.ou-btn, .ou-iconbtn) { transition: transform 320ms var(--ou-spring), box-shadow 220ms var(--ou-ease), background-color 160ms, border-color 160ms; }
.ou-app[data-ui="atrium"] :is(.ou-btn, .ou-iconbtn):active { transform: scale(0.95); transition-duration: 70ms; }
.ou-app[data-ui="atrium"] input.ou-slider { --track: 0.75rem; --thumb: 1.5rem; }
@media (prefers-reduced-motion: no-preference) {
  .ou-app[data-ui="atrium"] :is(input.ou-check, .ou-radio > input):checked { animation: ou-pop 340ms var(--ou-spring); }
  @keyframes ou-pop { from { scale: 0.7; } }
}
/* Beside a sidebar the page is narrower than the window. The main column measures itself,
   so the card grid folds by the room it really has. */
.ou-app[data-ui="atrium"] .ou-shell__main { container: ou / inline-size; }

/* Workbench: the staff tool. Sidebar, white cards on a quiet ice ground,
   one steel-blue feature card, dense tables. Built for many pages and real data. */
.ou-app[data-ui="workbench"] {
  --ou-ground: var(--ol-ice);
  --ou-panel: color-mix(in srgb, var(--ol-ice) 45%, var(--ol-white));
  --ou-surface: #ffffff;
  --ou-surface-solid: #ffffff;
  --ou-surface-2: color-mix(in srgb, var(--ol-ice) 60%, var(--ol-white));
  --ou-edge: rgba(65, 78, 91, 0.08);
  --ou-field: #ffffff;
  --ou-primary: linear-gradient(140deg, var(--ol-navy), var(--ol-slate));
  --ou-on-primary: #ffffff;
  --ou-r-shell: 1.75rem;
  --ou-r-card: 1.125rem;
  --ou-r-ctl: 999px;
  --ou-r-input: 0.75rem;
  --ou-pad: 1.125rem;
  --ou-gap: 0.75rem;
  --ou-shadow: 0 1px 2px rgba(47, 53, 60, 0.04);
  --ou-shadow-hover: 0 1px 2px rgba(47, 53, 60, 0.05), 0 10px 22px -18px rgba(47, 53, 60, 0.3);
  --ou-num-weight: 500;
  --ou-title-weight: 600;
  --ou-bar-w: min(100%, 3.25rem);
  --ou-bar: var(--ol-navy);
  --ou-bar-accent: var(--ou-feature);
}

/* Studio: the dark room for making things. The canvas is the brightest thing
   on screen; panels are quiet and dense. */
.ou-app[data-ui="studio"] {
  color-scheme: dark;
  --ou-ground: color-mix(in srgb, var(--ol-slate) 62%, var(--ol-black));
  --ou-panel: color-mix(in srgb, var(--ol-slate) 80%, var(--ol-black));
  --ou-surface: var(--ol-slate);
  --ou-surface-solid: color-mix(in srgb, var(--ol-navy) 30%, var(--ol-slate));
  --ou-surface-2: rgba(224, 238, 245, 0.07);
  --ou-edge: rgba(224, 238, 245, 0.08);
  --ou-field: color-mix(in srgb, var(--ol-slate) 70%, var(--ol-black));
  --ou-dark: var(--ol-ice);
  --ou-on-dark: var(--ol-slate);
  --ou-feature: linear-gradient(150deg, var(--ol-navy), var(--ol-slate));
  --ou-accent-strong: var(--ol-seafoam);
  --ou-accent-on-strong: var(--ol-navy);
  --ou-accent-soft: rgba(158, 206, 199, 0.18);
  --ou-primary: var(--ol-seafoam);
  --ou-on-primary: var(--ol-slate);
  --ou-btn-accent: var(--ou-dark);
  --ou-on-btn-accent: var(--ou-on-dark);
  --ou-shadow-strong: none;
  --ou-knob-on: var(--ou-on-accent);
  --ou-toast-ico: var(--ol-navy);
  --ou-line-1: var(--ol-seafoam);
  --ou-ink: var(--ol-ice);
  --ou-ink-2: color-mix(in srgb, var(--ol-ice) 60%, var(--ol-steel));
  --ou-ink-3: color-mix(in srgb, var(--ol-ice) 30%, var(--ol-steel));
  --ou-line: rgba(224, 238, 245, 0.09);
  --ou-line-strong: rgba(224, 238, 245, 0.22);
  --ou-hatch: rgba(224, 238, 245, 0.3);
  --ou-hover: rgba(224, 238, 245, 0.05);
  --ou-good: var(--ol-seafoam);
  --ou-good-soft: rgba(158, 206, 199, 0.13);
  --ou-warn: var(--ol-ice);
  --ou-warn-soft: rgba(114, 148, 171, 0.3);
  --ou-bad: var(--ol-white);
  --ou-bad-soft: rgba(224, 238, 245, 0.14);
  --ou-bad-fill: var(--ol-ice);
  --ou-on-bad: var(--ol-slate);
  --ou-r-shell: 1.5rem;
  --ou-r-card: 1rem;
  --ou-r-ctl: 0.625rem;
  --ou-r-input: 0.625rem;
  --ou-r-row: 0.5rem;
  --ou-pad: 1rem;
  --ou-gap: 0.625rem;
  --ou-shadow: none;
  --ou-shadow-hover: 0 0 0 1px rgba(224, 238, 245, 0.12);
  --ou-num-weight: 400;
  --ou-title-weight: 500;
  --ou-bar-w: min(100%, 1.5rem);
}

/* Front Door: sign-in, sign-up, and client-facing forms. A steel ground, one
   white panel, soft pill fields, and room for a piece of art. */
.ou-app[data-ui="frontdoor"] {
  --ou-ground: linear-gradient(160deg, color-mix(in srgb, var(--ol-steel) 80%, var(--ol-ice)), color-mix(in srgb, var(--ol-steel) 80%, var(--ol-navy)));
  --ou-panel: color-mix(in srgb, var(--ol-ice) 40%, var(--ol-white));
  --ou-surface: #ffffff;
  --ou-surface-solid: #ffffff;
  --ou-surface-2: color-mix(in srgb, var(--ol-ice) 60%, var(--ol-white));
  --ou-edge: rgba(65, 78, 91, 0.08);
  --ou-field: #ffffff;
  --ou-primary: linear-gradient(180deg, var(--ol-navy), var(--ol-slate));
  --ou-on-primary: #ffffff;
  --ou-r-shell: 2rem;
  --ou-r-card: 1.5rem;
  --ou-r-ctl: 999px;
  --ou-r-input: 999px;
  --ou-r-row: 999px;
  --ou-pad: 1.5rem;
  --ou-gap: 1rem;
  --ou-shadow: 0 28px 60px -32px rgba(0, 0, 0, 0.45);
  --ou-shadow-hover: 0 30px 62px -32px rgba(0, 0, 0, 0.5);
  --ou-num-weight: 400;
  --ou-title-weight: 600;
  --ou-bar-w: min(100%, 2rem);
}

/* ───────────────────────── Dark versions ─────────────────────────
   Atrium, Workbench, and Front Door each have a dark version. Studio is always
   dark and ignores data-mode.
     data-mode="dark"   always dark
     data-mode="auto"   dark when the person's device is set to dark
     no data-mode       always light
   Write dark values only between "dark:start" and "dark:end". The "auto" copy
   under it is made from that block. After a change, run:
     node tools/sync-auto-dark.mjs */

/* dark:start */
.ou-app[data-mode="dark"]:not([data-ui="studio"]), .ou-app[data-ui="atrium"][data-tone="night"] {
  color-scheme: dark;
  --ou-dark: var(--ol-ice);
  --ou-on-dark: var(--ol-slate);
  --ou-accent-strong: var(--ol-seafoam);
  --ou-accent-on-strong: var(--ol-navy);
  --ou-accent-soft: rgba(158, 206, 199, 0.18);
  --ou-primary: var(--ol-seafoam);
  --ou-on-primary: var(--ol-slate);
  --ou-btn-accent: var(--ou-dark);
  --ou-on-btn-accent: var(--ou-on-dark);
  --ou-ink: var(--ol-ice);
  --ou-ink-2: color-mix(in srgb, var(--ol-ice) 60%, var(--ol-steel));
  --ou-ink-3: color-mix(in srgb, var(--ol-ice) 30%, var(--ol-steel));
  --ou-line: rgba(224, 238, 245, 0.09);
  --ou-line-strong: rgba(224, 238, 245, 0.22);
  --ou-hatch: rgba(224, 238, 245, 0.2);
  --ou-hover: rgba(224, 238, 245, 0.05);
  --ou-good: var(--ol-seafoam);
  --ou-good-soft: rgba(158, 206, 199, 0.13);
  --ou-warn: var(--ol-ice);
  --ou-warn-soft: rgba(114, 148, 171, 0.3);
  --ou-bad: var(--ol-white);
  --ou-bad-soft: rgba(224, 238, 245, 0.14);
  --ou-bad-fill: var(--ol-ice);
  --ou-on-bad: var(--ol-slate);
  --ou-surface-2: rgba(224, 238, 245, 0.07);
  --ou-edge: rgba(224, 238, 245, 0.09);
  --ou-shadow-strong: none;
  --ou-knob-on: var(--ou-on-accent);
  --ou-toast-ico: var(--ol-navy);
  --ou-line-1: var(--ol-seafoam);
}
/* Atrium at night: the same mist, with the seafoam corner turned low. */
.ou-app[data-ui="atrium"][data-mode="dark"], .ou-app[data-ui="atrium"][data-tone="night"] {
  --ou-ground: linear-gradient(118deg, color-mix(in srgb, var(--ol-slate) 55%, var(--ol-black)) 0%, color-mix(in srgb, var(--ol-slate) 70%, var(--ol-black)) 34%, color-mix(in srgb, var(--ol-seafoam) 4%, color-mix(in srgb, var(--ol-slate) 66%, var(--ol-black))) 68%, color-mix(in srgb, var(--ol-seafoam) 8%, color-mix(in srgb, var(--ol-slate) 62%, var(--ol-black))) 100%);
  --ou-ink-2: color-mix(in srgb, var(--ol-ice) 70%, var(--ol-steel));
  --ou-ink-3: color-mix(in srgb, var(--ol-ice) 50%, var(--ol-steel));
  --ou-panel: rgba(224, 238, 245, 0.04);
  --ou-surface: rgba(224, 238, 245, 0.065);
  --ou-surface-solid: var(--ol-slate);
  --ou-edge: rgba(224, 238, 245, 0.1);
  --ou-field: rgba(0, 0, 0, 0.35);
  --ou-shadow: inset 0 1px 0 rgba(224, 238, 245, 0.06), 0 18px 40px -28px rgba(0, 0, 0, 0.6);
  --ou-shadow-hover: inset 0 1px 0 rgba(224, 238, 245, 0.1), 0 20px 42px -28px rgba(0, 0, 0, 0.7);
  --ou-bar-track: rgba(224, 238, 245, 0.08);
}
/* Workbench at night: three clear steps (ground, sidebar, card) so the grays
   never merge. The main button is seafoam, as in the other dark looks. */
.ou-app[data-ui="workbench"][data-mode="dark"] {
  --ou-ground: color-mix(in srgb, var(--ol-slate) 50%, var(--ol-black));
  --ou-panel: color-mix(in srgb, var(--ol-slate) 65%, var(--ol-black));
  --ou-surface: color-mix(in srgb, var(--ol-slate) 82%, var(--ol-black));
  --ou-surface-solid: var(--ol-slate);
  --ou-field: color-mix(in srgb, var(--ol-slate) 58%, var(--ol-black));
  --ou-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --ou-shadow-hover: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 24px -18px rgba(0, 0, 0, 0.7);
  --ou-bar: var(--ol-steel);
  --ou-bar-accent: var(--ol-seafoam);
}
/* Front Door at night: a deep steel ground and one raised panel. */
.ou-app[data-ui="frontdoor"][data-mode="dark"] {
  --ou-ground: linear-gradient(160deg, color-mix(in srgb, var(--ol-navy) 60%, var(--ol-slate)), color-mix(in srgb, var(--ol-slate) 55%, var(--ol-black)));
  --ou-panel: color-mix(in srgb, var(--ol-slate) 75%, var(--ol-black));
  --ou-surface: color-mix(in srgb, var(--ol-slate) 88%, var(--ol-black));
  --ou-surface-solid: var(--ol-slate);
  --ou-field: color-mix(in srgb, var(--ol-slate) 60%, var(--ol-black));
  --ou-shadow: 0 28px 60px -32px rgba(0, 0, 0, 0.7);
  --ou-shadow-hover: 0 30px 62px -32px rgba(0, 0, 0, 0.75);
}
/* dark:end */

/* auto-dark:start (made by tools/sync-auto-dark.mjs; never edit by hand) */
@media (prefers-color-scheme: dark) {
  .ou-app[data-mode="auto"]:not([data-ui="studio"]), .ou-app[data-ui="atrium"][data-tone="night"] {
    color-scheme: dark;
    --ou-dark: var(--ol-ice);
    --ou-on-dark: var(--ol-slate);
    --ou-accent-strong: var(--ol-seafoam);
    --ou-accent-on-strong: var(--ol-navy);
    --ou-accent-soft: rgba(158, 206, 199, 0.18);
    --ou-primary: var(--ol-seafoam);
    --ou-on-primary: var(--ol-slate);
    --ou-btn-accent: var(--ou-dark);
    --ou-on-btn-accent: var(--ou-on-dark);
    --ou-ink: var(--ol-ice);
    --ou-ink-2: color-mix(in srgb, var(--ol-ice) 60%, var(--ol-steel));
    --ou-ink-3: color-mix(in srgb, var(--ol-ice) 30%, var(--ol-steel));
    --ou-line: rgba(224, 238, 245, 0.09);
    --ou-line-strong: rgba(224, 238, 245, 0.22);
    --ou-hatch: rgba(224, 238, 245, 0.2);
    --ou-hover: rgba(224, 238, 245, 0.05);
    --ou-good: var(--ol-seafoam);
    --ou-good-soft: rgba(158, 206, 199, 0.13);
    --ou-warn: var(--ol-ice);
    --ou-warn-soft: rgba(114, 148, 171, 0.3);
    --ou-bad: var(--ol-white);
    --ou-bad-soft: rgba(224, 238, 245, 0.14);
    --ou-bad-fill: var(--ol-ice);
    --ou-on-bad: var(--ol-slate);
    --ou-surface-2: rgba(224, 238, 245, 0.07);
    --ou-edge: rgba(224, 238, 245, 0.09);
    --ou-shadow-strong: none;
    --ou-knob-on: var(--ou-on-accent);
    --ou-toast-ico: var(--ol-navy);
    --ou-line-1: var(--ol-seafoam);
  }
  /* Atrium at night: the same mist, with the seafoam corner turned low. */
  .ou-app[data-ui="atrium"][data-mode="auto"], .ou-app[data-ui="atrium"][data-tone="night"] {
    --ou-ground: linear-gradient(118deg, color-mix(in srgb, var(--ol-slate) 55%, var(--ol-black)) 0%, color-mix(in srgb, var(--ol-slate) 70%, var(--ol-black)) 34%, color-mix(in srgb, var(--ol-seafoam) 4%, color-mix(in srgb, var(--ol-slate) 66%, var(--ol-black))) 68%, color-mix(in srgb, var(--ol-seafoam) 8%, color-mix(in srgb, var(--ol-slate) 62%, var(--ol-black))) 100%);
    --ou-ink-2: color-mix(in srgb, var(--ol-ice) 70%, var(--ol-steel));
    --ou-ink-3: color-mix(in srgb, var(--ol-ice) 50%, var(--ol-steel));
    --ou-panel: rgba(224, 238, 245, 0.04);
    --ou-surface: rgba(224, 238, 245, 0.065);
    --ou-surface-solid: var(--ol-slate);
    --ou-edge: rgba(224, 238, 245, 0.1);
    --ou-field: rgba(0, 0, 0, 0.35);
    --ou-shadow: inset 0 1px 0 rgba(224, 238, 245, 0.06), 0 18px 40px -28px rgba(0, 0, 0, 0.6);
    --ou-shadow-hover: inset 0 1px 0 rgba(224, 238, 245, 0.1), 0 20px 42px -28px rgba(0, 0, 0, 0.7);
    --ou-bar-track: rgba(224, 238, 245, 0.08);
  }
  /* Workbench at night: three clear steps (ground, sidebar, card) so the grays
     never merge. The main button is seafoam, as in the other dark looks. */
  .ou-app[data-ui="workbench"][data-mode="auto"] {
    --ou-ground: color-mix(in srgb, var(--ol-slate) 50%, var(--ol-black));
    --ou-panel: color-mix(in srgb, var(--ol-slate) 65%, var(--ol-black));
    --ou-surface: color-mix(in srgb, var(--ol-slate) 82%, var(--ol-black));
    --ou-surface-solid: var(--ol-slate);
    --ou-field: color-mix(in srgb, var(--ol-slate) 58%, var(--ol-black));
    --ou-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --ou-shadow-hover: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 24px -18px rgba(0, 0, 0, 0.7);
    --ou-bar: var(--ol-steel);
    --ou-bar-accent: var(--ol-seafoam);
  }
  /* Front Door at night: a deep steel ground and one raised panel. */
  .ou-app[data-ui="frontdoor"][data-mode="auto"] {
    --ou-ground: linear-gradient(160deg, color-mix(in srgb, var(--ol-navy) 60%, var(--ol-slate)), color-mix(in srgb, var(--ol-slate) 55%, var(--ol-black)));
    --ou-panel: color-mix(in srgb, var(--ol-slate) 75%, var(--ol-black));
    --ou-surface: color-mix(in srgb, var(--ol-slate) 88%, var(--ol-black));
    --ou-surface-solid: var(--ol-slate);
    --ou-field: color-mix(in srgb, var(--ol-slate) 60%, var(--ol-black));
    --ou-shadow: 0 28px 60px -32px rgba(0, 0, 0, 0.7);
    --ou-shadow-hover: 0 30px 62px -32px rgba(0, 0, 0, 0.75);
  }
}
/* auto-dark:end */

/* ───────────────────────── Base ───────────────────────── */

.ou-app {
  container: ou / inline-size;
  font-family: var(--ou-font);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ou-ink);
  background: var(--ou-ground);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  caret-color: var(--ou-accent-strong);
  scrollbar-width: thin;
  scrollbar-color: var(--ou-line-strong) transparent;
}
.ou-app *, .ou-app *::before, .ou-app *::after { box-sizing: border-box; }
.ou-app [hidden] { display: none !important; }
.ou-app ::selection { background: var(--ou-accent); color: var(--ou-on-accent); }
.ou-app :focus-visible { outline: 2px solid var(--ou-accent-strong); outline-offset: 2px; }
.ou-app :where(h1, h2, h3, h4, p, ul, ol, figure) { margin: 0; padding: 0; }
.ou-app :where(ul, ol) { list-style: none; }
.ou-app :where(a) { color: inherit; text-decoration: none; }
.ou-app :where(button, input, select, textarea) { font: inherit; color: inherit; }

.ou-page { display: flex; flex-direction: column; gap: 1.25rem; padding: clamp(1rem, 2.4cqw, 1.75rem); }
.ou-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.ou-row--between { justify-content: space-between; }
.ou-stack { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.ou-grow { flex: 1 1 0; min-width: 0; }
.ou-push { margin-left: auto; }

.ou-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--ou-gap); }
.ou-c3 { grid-column: span 3; }
.ou-c4 { grid-column: span 4; }
.ou-c5 { grid-column: span 5; }
.ou-c6 { grid-column: span 6; }
.ou-c8 { grid-column: span 8; }
.ou-c9 { grid-column: span 9; }
.ou-c12 { grid-column: span 12; }
.ou-r2 { grid-row: span 2; }
@container ou (max-width: 64rem) {
  .ou-c3, .ou-c4, .ou-c5 { grid-column: span 6; }
  .ou-c6, .ou-c8, .ou-c9 { grid-column: span 12; }
  .ou-r2 { grid-row: auto; }
}
@container ou (max-width: 36rem) {
  .ou-c3, .ou-c4, .ou-c5 { grid-column: span 12; }
}

/* ───────────────────────── Type ───────────────────────── */

/* Page title. Wrap one word in <em> for the Vollkorn Black Italic accent. */
.ou-title { font-size: clamp(1.75rem, 3.4cqw, 2.375rem); line-height: 1.1; font-weight: var(--ou-title-weight); letter-spacing: -0.025em; text-wrap: balance; }
.ou-title em { font-family: var(--ou-font-accent); font-weight: 900; font-style: italic; letter-spacing: -0.01em; font-size: 1.06em; }
.ou-h2 { font-size: 1.0625rem; line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; }
.ou-h3 { font-size: 0.875rem; line-height: 1.35; font-weight: 500; }
.ou-sub { color: var(--ou-ink-2); font-size: 0.8125rem; }
.ou-small { color: var(--ou-ink-2); font-size: 0.75rem; }
.ou-label { color: var(--ou-ink-2); font-size: 0.75rem; font-weight: 500; }
.ou-link { color: var(--ou-accent-strong); font-weight: 500; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; transition: text-decoration-color 160ms; }
.ou-link:hover { text-decoration-color: currentColor; }

/* Kicker: a small label that names a group or a state. It carries a fact
   ("Menu", "Sample data", "Step 2 of 4"); it is never decoration over a title. */
.ou-kicker { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ou-ink-3); }
.ou-kicker--chip { display: inline-flex; align-items: center; height: 1.5rem; padding: 0 0.625rem; border-radius: 999px; background: var(--ou-accent-soft); color: var(--ou-ink); letter-spacing: 0.08em; }

/* Big numbers are always the body font: Vollkorn's 1 reads as a capital I. */
.ou-num { font-size: 2.5rem; line-height: 1; font-weight: var(--ou-num-weight); letter-spacing: -0.035em; }
.ou-num--xl { font-size: clamp(2.5rem, 5cqw, 3.5rem); }
.ou-num--sm { font-size: 1.75rem; }

.ou-ico { width: 1.125rem; height: 1.125rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ou-ico--sm { width: 0.875rem; height: 0.875rem; }
.ou-kbd { font: inherit; font-size: 0.6875rem; padding: 0.125rem 0.375rem; border-radius: 0.375rem; background: var(--ou-surface-2); color: var(--ou-ink-2); }

/* ───────────────────────── Buttons ───────────────────────── */

.ou-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 2.5rem; padding: 0 1.125rem; border: 1px solid transparent; border-radius: var(--ou-r-ctl);
  background: var(--ou-primary); color: var(--ou-on-primary);
  font-weight: 500; white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: transform 220ms var(--ou-ease), box-shadow 220ms var(--ou-ease), background-color 160ms, border-color 160ms;
}
.ou-btn:hover { box-shadow: 0 6px 14px -10px rgba(0, 0, 0, 0.4); }
.ou-btn:active { transform: scale(0.98); box-shadow: none; }
.ou-btn--accent { background: var(--ou-btn-accent, var(--ou-accent)); color: var(--ou-on-btn-accent, var(--ou-on-accent)); }
/* Studio's main button is already seafoam, so its second-strongest button is ice. */
.ou-btn--ghost { background: transparent; color: var(--ou-ink); border-color: var(--ou-line-strong); }
.ou-btn--ghost:hover { border-color: var(--ou-ink); box-shadow: none; }
.ou-btn--soft { background: var(--ou-surface-solid); color: var(--ou-ink); border-color: var(--ou-line); }
.ou-btn--sm { height: 2rem; padding: 0 0.75rem; font-size: 0.8125rem; }
.ou-btn--lg { height: 3rem; padding: 0 1.5rem; }
.ou-btn--block { width: 100%; }
/* A gray button is a locked button: say why in a note beside it. */
.ou-btn:disabled, .ou-btn[aria-disabled="true"] { background: var(--ou-surface-2); color: var(--ou-ink-3); border-color: transparent; cursor: not-allowed; transform: none; box-shadow: none; }

.ou-iconbtn {
  display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; flex: none; padding: 0;
  border-radius: 50%; border: 1px solid var(--ou-line); background: var(--ou-surface-solid); color: var(--ou-ink); cursor: pointer;
  transition: transform 220ms var(--ou-ease), background-color 160ms, border-color 160ms;
}
.ou-app[data-ui="studio"] .ou-iconbtn { border-radius: var(--ou-r-ctl); }
.ou-iconbtn:hover { border-color: var(--ou-line-strong); }
.ou-iconbtn:active { transform: scale(0.96); }
.ou-iconbtn--strong { background: var(--ou-strong); color: var(--ou-on-strong); border-color: transparent; }
.ou-iconbtn--sm { width: 2rem; height: 2rem; }

/* Filter chip: a quiet dropdown trigger ("Status ▾"). */
.ou-chip {
  display: inline-flex; align-items: center; gap: 0.375rem; height: 2.25rem; padding: 0 0.875rem;
  border-radius: var(--ou-r-ctl); border: 1px solid var(--ou-line); background: var(--ou-surface-solid);
  color: var(--ou-ink); font-size: 0.8125rem; cursor: pointer; white-space: nowrap;
}
.ou-chip:hover { border-color: var(--ou-line-strong); }
/* Toggle chip: a chip you turn on and off, like "Hookshot" in a list of gear.
   Add aria-pressed. The box shows the state by shape (empty box, then a check),
   and "on" takes the accent fill, so it never relies on color alone. */
.ou-chip[aria-pressed]::before { content: ""; width: 0.875rem; height: 0.875rem; flex: none; border-radius: 0.25rem; border: 1.5px solid var(--ou-line-strong); background: var(--ou-field); }
.ou-chip[aria-pressed="true"] { background: var(--ou-accent); border-color: transparent; color: var(--ou-on-accent); font-weight: 500; }
.ou-chip[aria-pressed="true"]::before { border-color: transparent; background: var(--ou-on-accent); clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 10%, 37% 72%); border-radius: 0; }

/* ───────────────────────── Pills and status ───────────────────────── */

/* The fill changes with the state, not only the text color:
   done = solid dark, now = solid seafoam, to do = outline. */
.ou-pill {
  display: inline-flex; align-items: center; gap: 0.375rem; height: 1.625rem; padding: 0 0.625rem;
  border-radius: 999px; border: 1px solid transparent; background: var(--ou-surface-2); color: var(--ou-ink-2);
  font-size: 0.75rem; font-weight: 500; white-space: nowrap;
}
.ou-pill::before { content: ""; width: 0.375rem; height: 0.375rem; border-radius: 50%; background: currentColor; }
.ou-pill--plain::before { content: none; }
.ou-pill--done { background: var(--ou-strong); color: var(--ou-on-strong); }
.ou-pill--now { background: var(--ou-accent); color: var(--ou-on-accent); }
.ou-pill--todo { background: transparent; border-color: var(--ou-line-strong); color: var(--ou-ink-2); }
.ou-pill--good { background: var(--ou-good-soft); color: var(--ou-good); }
.ou-pill--warn { background: var(--ou-warn-soft); color: var(--ou-warn); }
.ou-pill--bad { background: var(--ou-bad-fill); color: var(--ou-on-bad); }
.ou-pill--lg { height: 2.25rem; padding: 0 1rem; font-size: 0.875rem; }
.ou-pill--glass { background: rgba(255, 255, 255, 0.18); color: #fff; border-color: rgba(255, 255, 255, 0.45); backdrop-filter: blur(10px); }

.ou-count { display: inline-grid; place-items: center; min-width: 1.375rem; height: 1.375rem; padding: 0 0.375rem; border-radius: 0.5rem; background: var(--ou-strong); color: var(--ou-on-strong); font-size: 0.6875rem; font-weight: 600; }

/* ───────────────────────── Cards ───────────────────────── */

.ou-card {
  display: flex; flex-direction: column; gap: 0.875rem; min-width: 0;
  padding: var(--ou-pad); border-radius: var(--ou-r-card);
  background: var(--ou-surface); border: 1px solid var(--ou-edge);
  box-shadow: var(--ou-shadow); backdrop-filter: var(--ou-blur); -webkit-backdrop-filter: var(--ou-blur);
}
.ou-card__head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 2.25rem; }
.ou-card__foot { margin-top: auto; }
.ou-card--flat { background: var(--ou-surface-2); border-color: transparent; box-shadow: none; backdrop-filter: none; }

/* Dark card and feature card: everything inside reads the re-pointed tokens. */
.ou-card--strong, .ou-card--feature {
  --ou-ink: var(--ou-on-strong);
  --ou-ink-2: color-mix(in srgb, var(--ou-on-strong) 76%, transparent);
  --ou-ink-3: color-mix(in srgb, var(--ou-on-strong) 64%, transparent);
  --ou-line: color-mix(in srgb, var(--ou-on-strong) 12%, transparent);
  --ou-line-strong: color-mix(in srgb, var(--ou-on-strong) 26%, transparent);
  --ou-surface-2: color-mix(in srgb, var(--ou-on-strong) 10%, transparent);
  --ou-surface-solid: color-mix(in srgb, var(--ou-on-strong) 12%, transparent);
  --ou-hatch: color-mix(in srgb, var(--ou-on-strong) 32%, transparent);
  --ou-hover: color-mix(in srgb, var(--ou-on-strong) 6%, transparent);
  --ou-strong: color-mix(in srgb, var(--ou-on-strong) 16%, transparent);
  --ou-primary: var(--ou-accent);
  --ou-on-primary: var(--ou-on-accent);
  --ou-bar-track: color-mix(in srgb, var(--ou-on-strong) 10%, transparent);
  --ou-bar: var(--ou-on-strong);
  --ou-bar-accent: var(--ou-accent);
  --ou-accent-strong: var(--ou-accent-on-strong, var(--ol-seafoam));
  --ou-line-1: var(--ou-accent-strong);
  --ou-line-2: color-mix(in srgb, var(--ou-on-strong) 55%, transparent);
  --ou-bad-fill: var(--ou-on-strong);
  --ou-on-bad: var(--ou-dark);
  background: var(--ou-dark); color: var(--ou-ink); border-color: transparent; backdrop-filter: none;
  box-shadow: var(--ou-shadow-strong, 0 22px 40px -26px rgba(0, 0, 0, 0.6));
}
/* White text on a color: keep the quiet text nearly white so it still passes contrast. */
/* Wells (a plain pill, a track) go a step darker than the color, never lighter, so white text on them still reads. */
.ou-card--feature { --ou-on-strong: #ffffff; --ou-accent-strong: #ffffff; --ou-ink-2: rgba(255, 255, 255, 0.92); --ou-ink-3: rgba(255, 255, 255, 0.86); --ou-surface-2: rgba(0, 0, 0, 0.18); --ou-on-bad: var(--ol-slate); background: var(--ou-feature); }

/* Photo card: an image fills the card and the caption sits on a soft scrim. */
.ou-card--photo { position: relative; padding: 0; overflow: hidden; min-height: 15rem; color: #fff; border: 0; }
.ou-card--photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ou-card__caption { position: relative; margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 0.75rem; padding: 3.5rem 1.125rem 1.125rem; background: linear-gradient(180deg, transparent, rgba(47, 53, 60, 0.85)); }
.ou-card__caption .ou-sub { color: rgba(255, 255, 255, 0.82); }

/* Stat: label, one big number, one short note. */
.ou-stat { gap: 0.5rem; }
.ou-stat__note { display: flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; color: var(--ou-ink-2); }
.ou-delta { display: inline-flex; align-items: center; height: 1.125rem; padding: 0 0.3125rem; border-radius: 0.3125rem; border: 1px solid currentColor; font-size: 0.625rem; font-weight: 600; }

/* Figure: an inline headline count for the top of a home screen. */
.ou-figures { display: flex; gap: clamp(1rem, 3cqw, 2.25rem); flex-wrap: wrap; }
.ou-figure { display: grid; grid-template-columns: auto auto; align-items: end; column-gap: 0.5rem; }
.ou-figure__icon { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; margin-bottom: 0.375rem; border-radius: 0.5rem; background: var(--ou-surface-2); color: var(--ou-ink-2); }
.ou-figure__label { grid-column: 1 / -1; font-size: 0.75rem; color: var(--ou-ink-2); }

/* ───────────────────────── Meters, bars, rings ───────────────────────── */

/* The hatch means "not done yet" everywhere: open time, pending work, future days.
   It echoes the line-drawn circle in the Overlap logo. */
.ou-hatch { background-image: repeating-linear-gradient(-45deg, var(--ou-hatch) 0 1.5px, transparent 1.5px 7px); }

/* Meter: how one whole splits into labeled parts. Set --v on each part. */
.ou-meter { display: flex; flex-wrap: wrap; gap: 0.625rem 0.375rem; align-items: flex-end; min-width: 0; }
.ou-meter__part { flex: var(--v, 1) 1 0; min-width: 4.25rem; display: flex; flex-direction: column; gap: 0.4375rem; }
.ou-meter__bar { display: flex; align-items: center; height: 2.5rem; padding: 0 0.875rem; border-radius: var(--ou-bar-r, 999px); font-size: 0.75rem; font-weight: 500; background: var(--ou-surface-2); color: var(--ou-ink); border: 1px solid transparent; }
.ou-meter__bar.is-strong { background: var(--ou-strong); color: var(--ou-on-strong); }
.ou-meter__bar.is-accent { background: var(--ou-accent); color: var(--ou-on-accent); }
.ou-meter__bar.is-hatch { background: var(--ou-surface-2) repeating-linear-gradient(-45deg, var(--ou-hatch) 0 1.5px, transparent 1.5px 7px); }
.ou-meter__bar.is-outline { background: transparent; border-color: var(--ou-ink-2); }
.ou-app[data-ui="studio"] .ou-meter__bar, .ou-app[data-ui="workbench"] .ou-meter__bar { height: 2rem; }

/* Progress: a thin one-line version of the meter. */
.ou-progress { display: flex; gap: 0.1875rem; height: 0.375rem; }
/* --ou-bar-r is how round a bar is. The first-paint wipe reads the same number, so a bar keeps its own shape while it fills. A style changes the number, never border-radius. */
.ou-progress > i { flex: var(--v, 1) 1 0; border-radius: var(--ou-bar-r, 999px); background: var(--ou-surface-2); }
.ou-progress > i.is-accent { background: var(--ou-accent); }
.ou-progress > i.is-strong { background: var(--ou-strong); }
.ou-progress > i.is-hatch { background: var(--ou-surface-2) repeating-linear-gradient(-45deg, var(--ou-hatch) 0 1.5px, transparent 1.5px 7px); }
.ou-progress--lg { height: 2.25rem; gap: 0.3125rem; }
.ou-progress--lg > i { --ou-bar-r: 0.75rem; }

/* Bars: a small week chart. Set --v (0 to 100) on each column. */
.ou-bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0.5rem; height: 9.5rem; }
.ou-bars__col { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 0.5rem; justify-items: center; font-size: 0.75rem; color: var(--ou-ink-2); position: relative; }
.ou-bars__track { position: relative; display: flex; align-items: flex-end; justify-content: center; width: var(--ou-bar-w); height: 100%; border-radius: 999px; background: var(--ou-bar-track); }
.ou-bars__bar { width: 100%; height: calc(var(--v) * 1%); min-height: 0.5rem; border-radius: 999px; background: var(--ou-bar); transform-origin: bottom; }
.ou-bars__col.is-accent .ou-bars__bar { background: var(--ou-bar-accent); }
.ou-bars__col.is-accent { color: var(--ou-ink); font-weight: 500; }
.ou-bars__col.is-hatch .ou-bars__bar { background-color: var(--ou-surface-2); background-image: repeating-linear-gradient(-45deg, var(--ou-hatch) 0 1.5px, transparent 1.5px 7px); }
.ou-bars__col.is-muted .ou-bars__bar { background: var(--ou-line-strong); }
.ou-bars__tag { position: absolute; left: 50%; translate: -50% 0; bottom: calc(var(--v) * 1% + 0.375rem); z-index: 1; padding: 0.125rem 0.5rem; border-radius: 999px; background: var(--ou-accent); color: var(--ou-on-accent); font-size: 0.6875rem; font-weight: 500; white-space: nowrap; }

/* Ring: one running total against a goal. Set --v (0 to 100). */
.ou-ring { position: relative; width: min(11rem, 100%); aspect-ratio: 1; margin-inline: auto; }
.ou-ring svg { width: 100%; height: 100%; display: block; }
.ou-ring circle { fill: none; }
.ou-ring__track { stroke: var(--ou-surface-2); stroke-width: 9; }
.ou-ring__ticks { stroke: var(--ou-ink-3); stroke-width: 4; stroke-dasharray: 0.7 4; }
.ou-ring__value { stroke: var(--ou-accent); stroke-width: 9; stroke-linecap: round; stroke-dasharray: var(--v) 100; transform: rotate(-90deg); transform-origin: center; }
.ou-ring__label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ou-ring__label b { font-size: 1.625rem; font-weight: 400; letter-spacing: -0.02em; line-height: 1.1; }
.ou-ring__label span { font-size: 0.75rem; color: var(--ou-ink-2); }

/* Gauge: a half circle split into done, in progress, and not started. */
.ou-gauge { position: relative; width: min(15rem, 100%); margin-inline: auto; }
.ou-gauge svg { display: block; width: 100%; }
.ou-gauge path { fill: none; stroke-width: 26; stroke-dasharray: var(--v, 100) 100; stroke-dashoffset: calc(var(--from, 0) * -1); }
.ou-gauge .is-rest { stroke: url(#ou-hatch-pattern); }
.ou-gauge .is-done { stroke: var(--ou-strong); }
.ou-gauge .is-doing { stroke: var(--ou-accent); }
.ou-hatch-line { stroke: var(--ou-hatch); stroke-width: 2.2; }
.ou-gauge__label { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; }
.ou-legend { display: flex; gap: 0.375rem 0.625rem; flex-wrap: wrap; white-space: nowrap; justify-content: center; font-size: 0.75rem; color: var(--ou-ink-2); }
.ou-legend i { display: inline-block; width: 0.625rem; height: 0.625rem; margin-right: 0.3125rem; border-radius: 50%; background: var(--ou-surface-2); vertical-align: -1px; }
.ou-legend i.ou-hatch { background: var(--ou-surface-2) repeating-linear-gradient(-45deg, var(--ou-hatch) 0 1.5px, transparent 1.5px 7px); }


/* ───────────────────────── People and lists ───────────────────────── */

.ou-avatar { display: inline-grid; place-items: center; width: 2rem; height: 2rem; flex: none; border-radius: 50%; background: var(--av, color-mix(in srgb, var(--ol-steel) 20%, var(--ol-ice))); color: var(--ol-slate); font-size: 0.6875rem; font-weight: 600; object-fit: cover; }
.ou-avatar--sm { width: 1.5rem; height: 1.5rem; font-size: 0.5625rem; }
.ou-avatar--lg { width: 2.75rem; height: 2.75rem; font-size: 0.875rem; }
.ou-avatars { display: inline-flex; }
.ou-avatars > * + * { margin-left: -0.3125rem; }
.ou-avatars > * { box-shadow: 0 0 0 2px var(--ou-ring-bg, var(--ou-surface-solid)); }

.ou-person { display: flex; align-items: center; gap: 0.625rem; min-width: 0; }
.ou-person__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ou-person__text > span { font-size: 0.75rem; color: var(--ou-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ou-list { display: flex; flex-direction: column; }
.ou-list__item { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0; border-bottom: 1px dashed var(--ou-line-strong); min-width: 0; }
.ou-list__item:last-child { border-bottom: 0; padding-bottom: 0; }
.ou-list__item:first-child { padding-top: 0; }
.ou-list__icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; flex: none; border-radius: 50%; background: var(--ou-surface-2); color: var(--ou-ink); }
.ou-list__item.is-done .ou-h3 { text-decoration: line-through; color: var(--ou-ink-3); }

/* Check dot: a to-do you can tick. Pair it with a plain-word title. */
.ou-checkdot { display: grid; place-items: center; width: 1.25rem; height: 1.25rem; flex: none; padding: 0; border-radius: 50%; border: 1.5px solid var(--ou-line-strong); background: transparent; color: transparent; cursor: pointer; }
.ou-checkdot[aria-pressed="true"] { background: var(--ou-accent); border-color: var(--ou-accent); color: var(--ou-on-accent); }
.ou-checkdot .ou-ico { width: 0.75rem; height: 0.75rem; stroke-width: 2.4; }

/* Accordion: fold reference material under one plain line. */
.ou-acc { border-bottom: 1px dashed var(--ou-line-strong); }
.ou-acc:last-child { border-bottom: 0; }
.ou-acc > summary { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 0; cursor: pointer; list-style: none; font-weight: 500; }
.ou-acc > summary::-webkit-details-marker { display: none; }
.ou-acc > summary .ou-ico { transition: transform 260ms var(--ou-ease); }
.ou-acc[open] > summary .ou-ico { transform: rotate(180deg); }
.ou-acc__body { padding: 0 0 0.875rem; }

/* ───────────────────────── Tables ───────────────────────── */

.ou-table-wrap { overflow-x: auto; }
.ou-table { width: 100%; min-width: 40rem; border-collapse: separate; border-spacing: 0; font-size: 0.8125rem; }
.ou-table th { padding: 0.625rem 0.875rem; text-align: left; font-size: 0.75rem; font-weight: 500; color: var(--ou-ink-2); white-space: nowrap; border-bottom: 1px dashed var(--ou-line-strong); }
.ou-table td { padding: 0.6875rem 0.875rem; vertical-align: middle; border-bottom: 1px solid var(--ou-line); }
.ou-table tbody tr:last-child td { border-bottom-color: transparent; }
.ou-table tbody tr:hover td { background: var(--ou-hover); }
.ou-table tbody tr:is(:hover, [aria-selected="true"]) td:first-child { border-radius: var(--ou-r-row) 0 0 var(--ou-r-row); }
.ou-table tbody tr:is(:hover, [aria-selected="true"]) td:last-child { border-radius: 0 var(--ou-r-row) var(--ou-r-row) 0; }
.ou-table .is-num { text-align: right; }
/* The selected row takes the accent fill, so it reads from across the room. */
.ou-table tbody tr[aria-selected="true"] td { background: var(--ou-accent); color: var(--ou-on-accent); border-bottom-color: transparent; }
.ou-table tbody tr[aria-selected="true"] .ou-person__text > span { color: inherit; opacity: 0.8; }
.ou-table tbody tr[aria-selected="true"] .ou-pill { background: rgba(255, 255, 255, 0.55); color: var(--ou-on-accent); }
.ou-sort { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.ou-sort::before { content: ""; width: 0.4375rem; height: 0.6875rem; background: var(--ou-ink-3); clip-path: polygon(50% 0, 100% 40%, 0 40%, 50% 0, 50% 100%, 100% 60%, 0 60%, 50% 100%); }

/* ───────────────────────── Forms ───────────────────────── */

.ou-field { display: flex; flex-direction: column; gap: 0.375rem; min-width: 0; }
.ou-field > label { font-size: 0.75rem; font-weight: 500; color: var(--ou-ink-2); }
.ou-field > .ou-segmented { align-self: flex-start; }
.ou-field__hint { font-size: 0.75rem; color: var(--ou-ink-3); }
.ou-field__error { font-size: 0.75rem; color: var(--ou-bad); }
.ou-input, .ou-select {
  width: 100%; height: 2.75rem; padding: 0 1rem; border-radius: var(--ou-r-input);
  border: 1px solid var(--ou-line-strong); background: var(--ou-field); color: var(--ou-ink);
  transition: border-color 160ms, box-shadow 160ms;
}
.ou-app[data-ui="frontdoor"] .ou-input { height: 3rem; padding: 0 1.25rem; box-shadow: 0 6px 14px -10px rgba(47, 53, 60, 0.4); }
.ou-app[data-ui="studio"] .ou-input, .ou-app[data-ui="studio"] .ou-select { height: 2.25rem; padding: 0 0.75rem; }
textarea.ou-input { height: auto; min-height: 5.5rem; padding-block: 0.75rem; border-radius: min(var(--ou-r-input), 1rem); resize: vertical; }
.ou-input::placeholder { color: var(--ou-ink-3); }
.ou-input:hover, .ou-select:hover { border-color: var(--ou-ink-3); }
.ou-input:focus, .ou-select:focus { outline: none; border-color: var(--ou-accent-strong); box-shadow: 0 0 0 3px var(--ou-accent-soft); }
.ou-input[aria-invalid="true"] { border-color: var(--ou-bad); }
.ou-inputwrap { position: relative; }
.ou-inputwrap > .ou-input { padding-right: 2.75rem; }
.ou-inputwrap > .ou-ico, .ou-inputwrap > button { position: absolute; right: 1rem; top: 50%; translate: 0 -50%; color: var(--ou-ink-3); }
.ou-inputwrap > button { display: grid; place-items: center; width: 2rem; height: 2rem; right: 0.5rem; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.ou-select { appearance: none; padding-right: 2.25rem; background-image: linear-gradient(45deg, transparent 50%, var(--ou-ink-2) 50%), linear-gradient(-45deg, transparent 50%, var(--ou-ink-2) 50%); background-size: 0.3125rem 0.3125rem; background-position: right 1.125rem center, right 0.8125rem center; background-repeat: no-repeat; }

.ou-search { display: flex; align-items: center; gap: 0.5rem; height: 2.5rem; padding: 0 0.875rem; border-radius: var(--ou-r-ctl); border: 1px solid var(--ou-line); background: var(--ou-field); color: var(--ou-ink-3); min-width: min(12rem, 100%); }
.ou-search input { flex: 1 1 0; min-width: 0; border: 0; background: none; outline: none; color: var(--ou-ink); }
/* The shell draws the one focus ring (focus-within, below). Without this line the page-wide
   focus outline also drew a second box around the words inside it. (Tim, 2026-11-18) */
.ou-search input:focus-visible { outline: none; }
.ou-search input::placeholder { color: var(--ou-ink-3); }
.ou-search:focus-within { border-color: var(--ou-accent-strong); box-shadow: 0 0 0 3px var(--ou-accent-soft); }

input.ou-check { appearance: none; display: inline-grid; place-content: center; width: 1.125rem; height: 1.125rem; flex: none; margin: 0; border-radius: 0.3125rem; border: 1.5px solid var(--ou-line-strong); background: var(--ou-field); cursor: pointer; }
input.ou-check::after { content: ""; width: 0.625rem; height: 0.625rem; clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 10%, 37% 72%); background: var(--ou-on-strong); scale: 0; transition: scale 160ms var(--ou-ease); }
input.ou-check:checked { background: var(--ou-strong); border-color: transparent; }
input.ou-check:checked::after { scale: 1; }
.ou-checkrow { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; cursor: pointer; }

input.ou-switch { appearance: none; position: relative; width: 2.5rem; height: 1.5rem; flex: none; margin: 0; border-radius: 999px; background: var(--ou-line-strong); cursor: pointer; transition: background-color 200ms; }
input.ou-switch::after { content: ""; position: absolute; top: 0.1875rem; left: 0.1875rem; width: 1.125rem; height: 1.125rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: translate 260ms var(--ou-ease); }
input.ou-switch:checked { background: var(--ou-accent-strong); }
input.ou-switch:checked::after { translate: 1rem 0; background: var(--ou-knob-on, #fff); }

/* Segmented: pick one of a few. The words say the choice. */
.ou-segmented { display: inline-flex; gap: 0.125rem; padding: 0.1875rem; border-radius: var(--ou-r-ctl); background: var(--ou-surface-2); max-width: 100%; overflow-x: auto; }
.ou-segmented > button { height: 2rem; padding: 0 0.875rem; border: 0; border-radius: calc(var(--ou-r-ctl) - 0.1875rem); background: none; color: var(--ou-ink-2); font-size: 0.8125rem; font-weight: 500; cursor: pointer; white-space: nowrap; }
.ou-segmented > button:hover { color: var(--ou-ink); }
.ou-segmented > button[aria-pressed="true"] { background: var(--ou-strong); color: var(--ou-on-strong); }

.ou-or { display: flex; align-items: center; gap: 0.75rem; color: var(--ou-ink-3); font-size: 0.75rem; }
.ou-or::before, .ou-or::after { content: ""; flex: 1; height: 1px; background: var(--ou-line-strong); }

/* ───────────────────────── Navigation ───────────────────────── */

/* One slim row: brand left, navigation middle, tools right. The work starts
   right under it. Notices are toasts, never stacked banners. */
.ou-topbar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-width: 0; }
.ou-brand { display: inline-flex; align-items: center; gap: 0.5rem; height: 2.5rem; padding: 0 0.875rem 0 0.375rem; flex: none; border-radius: 999px; border: 1px solid var(--ou-line-strong); font-size: 1rem; font-weight: 500; letter-spacing: -0.01em; }
.ou-brand img { width: 1.75rem; height: 1.75rem; border-radius: 50%; object-fit: cover; }
.ou-brand--bare { border: 0; padding: 0; }

.ou-navpills { display: flex; gap: 0.125rem; padding: 0.25rem; min-width: 0; overflow-x: auto; scrollbar-width: none; border-radius: 999px; background: var(--ou-surface); border: 1px solid var(--ou-edge); backdrop-filter: var(--ou-blur); }
.ou-navpills > * { display: inline-flex; align-items: center; height: 2rem; padding: 0 0.875rem; border-radius: 999px; font-size: 0.8125rem; white-space: nowrap; color: var(--ou-ink); transition: background-color 160ms; }
/* Hover never touches the current page's pill: it keeps its dark fill and light text. */
.ou-navpills > a:not([aria-current="page"]):hover { background: var(--ou-hover); }
.ou-navpills > [aria-current="page"] { background: var(--ou-strong); color: var(--ou-on-strong); font-weight: 500; }
.ou-app[data-ui="studio"] .ou-navpills { border-radius: var(--ou-r-ctl); }
.ou-app[data-ui="studio"] .ou-navpills > * { border-radius: calc(var(--ou-r-ctl) - 0.25rem); }

@container ou (max-width: 54rem) {
  .ou-topbar { flex-wrap: wrap; }
  .ou-topbar > .ou-navpills, .ou-topbar > .ou-steps { order: 3; flex-basis: 100%; }
}

/* Sidebar shell for tools with many pages. */
.ou-shell { display: grid; grid-template-columns: 14.5rem minmax(0, 1fr); gap: 0.75rem; padding: 0.75rem; }
.ou-shell__main { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.ou-panel { background: var(--ou-panel); border-radius: var(--ou-r-card); padding: 1.25rem; min-width: 0; }
.ou-sidebar { display: flex; flex-direction: column; gap: 1.5rem; padding: 1.25rem 0.875rem; border-radius: var(--ou-r-card); background: var(--ou-panel); min-width: 0; }
.ou-sidenav { display: flex; flex-direction: column; gap: 0.125rem; }
.ou-sidenav .ou-kicker { padding: 0 0.75rem 0.5rem; }
.ou-sidenav a { position: relative; display: flex; align-items: center; gap: 0.75rem; padding: 0.5625rem 0.75rem; border-radius: 0.75rem; color: var(--ou-ink-2); transition: background-color 160ms, color 160ms; }
.ou-sidenav a:hover { background: var(--ou-hover); color: var(--ou-ink); }
.ou-sidenav a[aria-current="page"] { background: var(--ou-surface-solid); color: var(--ou-ink); font-weight: 500; box-shadow: var(--ou-shadow); }
/* The colored left edge is Tim's signature. Here it marks where you are. */
.ou-sidenav a::before { content: ""; position: absolute; left: -0.875rem; top: 0.375rem; bottom: 0.375rem; width: 0.3125rem; border-radius: 0 0.3125rem 0.3125rem 0; background: var(--ou-accent-strong); scale: 1 0; opacity: 0; transition: scale 320ms var(--ou-ease), opacity 200ms; }
.ou-sidenav a[aria-current="page"]::before { scale: 1 1; opacity: 1; }
.ou-sidenav a[aria-current="page"] .ou-ico { color: var(--ou-accent-strong); }
.ou-sidenav a .ou-count { margin-left: auto; }
@container ou (max-width: 56rem) {
  .ou-shell { grid-template-columns: minmax(0, 1fr); }
  .ou-sidebar { flex-direction: row; align-items: center; gap: 0.75rem; padding: 0.625rem 0.875rem; overflow-x: auto; }
  .ou-sidenav { flex-direction: row; }
  .ou-sidenav .ou-kicker, .ou-sidebar__foot { display: none; }
  .ou-sidenav a { white-space: nowrap; }
  .ou-sidenav a::before { left: 0.75rem; right: 0.75rem; top: auto; bottom: 0; width: auto; height: 0.1875rem; border-radius: 0.1875rem 0.1875rem 0 0; }
}

/* ───────────────────────── Calendar pieces ───────────────────────── */

/* Event: the colored left edge says which calendar or kind it belongs to.
   Set --edge to that color. */
.ou-event { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-width: 0; padding: 0.4375rem 0.75rem; border-radius: 0.875rem; border-left: 0.25rem solid var(--edge, var(--ou-accent-strong)); background: var(--ou-surface-solid); box-shadow: 0 8px 18px -14px rgba(0, 0, 0, 0.5); line-height: 1.3; }
.ou-event > div { min-width: 0; }
.ou-event b { display: block; font-size: 0.8125rem; font-weight: 500; }
.ou-event > div > span { font-size: 0.6875rem; color: var(--ou-ink-2); }
.ou-event .ou-event__when, .ou-week .ou-event .ou-event__when { display: none; }
.ou-week .ou-event b, .ou-week .ou-event div > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ou-event--strong { --ou-ink-2: color-mix(in srgb, var(--ou-on-dark) 74%, transparent); --ou-ring-bg: var(--ou-dark); background: var(--ou-dark); color: var(--ou-on-dark); }

/* Month bar: previous, title, next on one line at every width. */
.ou-monthbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.5rem; text-align: center; }
.ou-week-wrap { overflow-x: auto; }
.ou-week { display: grid; grid-template-columns: 4.25rem repeat(var(--days, 6), minmax(0, 1fr)); grid-template-rows: 3rem repeat(var(--rows, 4), minmax(3.25rem, auto)); min-width: 34rem; font-size: 0.75rem; }
.ou-week__day { grid-row: 1; text-align: center; color: var(--ou-ink-2); line-height: 1.35; }
.ou-week__day b { display: block; font-size: 0.8125rem; font-weight: 400; }
.ou-week__day[aria-current="date"] { color: var(--ou-ink); font-weight: 500; }
.ou-week__day[aria-current="date"] b { font-weight: 600; }
.ou-week__time { grid-column: 1; color: var(--ou-ink-2); align-self: center; }
.ou-week__line { grid-row: 2 / -1; border-left: 1px dashed var(--ou-line-strong); }
.ou-week .ou-event { grid-column: var(--from) / var(--to); grid-row: var(--row); align-self: center; z-index: 1; margin-inline: 0.5rem; }

/* ───────────────────────── Feedback ───────────────────────── */

.ou-toast { display: inline-flex; align-items: center; gap: 0.625rem; padding: 0.625rem 1rem 0.625rem 0.75rem; border-radius: 999px; background: var(--ou-dark); color: var(--ou-on-dark); font-size: 0.8125rem; box-shadow: 0 16px 34px -16px rgba(0, 0, 0, 0.7); }
.ou-toast .ou-ico { color: var(--ou-toast-ico, var(--ol-seafoam)); }

.ou-note { display: flex; gap: 0.625rem; padding: 0.75rem 0.875rem; border-radius: min(var(--ou-r-card), 0.875rem); background: var(--ou-warn-soft); color: var(--ou-warn); font-size: 0.8125rem; }
.ou-note--bad { background: var(--ou-bad-fill); color: var(--ou-on-bad); }
.ou-note--good { background: var(--ou-good-soft); color: var(--ou-good); }

.ou-empty { display: grid; justify-items: center; gap: 0.5rem; padding: 2rem 1rem; text-align: center; border-radius: var(--ou-r-card); border: 1px dashed var(--ou-line-strong); color: var(--ou-ink-2); }
.ou-empty .ou-h3 { color: var(--ou-ink); }

/* Modal: one focused task on top of the page (details, a confirm, a short form).
   Use <dialog class="ou-modal"> inside the .ou-app and open it with showModal(),
   so Escape and focus work for free. Head (title + close), a scrolling body,
   and a foot with the one main button on the right. On a phone it becomes a
   sheet that rises from the bottom, where the thumb is. */
.ou-modal {
  width: min(36rem, calc(100vw - 2rem)); max-width: none; max-height: min(46rem, calc(100dvh - 2rem));
  padding: 0; border: 1px solid var(--ou-edge); border-radius: var(--ou-r-card);
  background: var(--ou-surface-solid); color: var(--ou-ink); font-family: var(--ou-font); font-size: 0.875rem; line-height: 1.5;
  box-shadow: 0 40px 90px -36px rgba(0, 0, 0, 0.6); overflow: hidden;
}
.ou-modal[open] { display: flex; flex-direction: column; }
.ou-modal::backdrop { background: rgba(47, 53, 60, 0.42); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.ou-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; padding: var(--ou-pad) var(--ou-pad) 0.875rem; border-bottom: 1px solid var(--ou-line); }
.ou-modal__head > .ou-iconbtn { flex: none; }
.ou-modal__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 1rem; padding: 1rem var(--ou-pad) var(--ou-pad); }
.ou-modal__foot { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; padding: 0.75rem var(--ou-pad); border-top: 1px solid var(--ou-line); background: var(--ou-panel, var(--ou-surface-solid)); }
.ou-modal__foot > :last-child { margin-left: auto; }
@media (max-width: 40rem) {
  .ou-modal { width: 100%; margin: auto 0 0; max-height: 88dvh; border-radius: var(--ou-r-card) var(--ou-r-card) 0 0; }
  .ou-modal__foot { padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px)); }
}

/* ───────────────────────── Step tool (Studio) ───────────────────────── */

/* Tim's step-tool rule: edits on the left, the thing being made in the middle,
   checks on the right, and ONE forward button at the bottom right that stays
   gray until the checks pass. Step tabs only go back. */
.ou-steps { display: flex; gap: 0.25rem; min-width: 0; overflow-x: auto; }
.ou-steps > * { display: inline-flex; align-items: center; gap: 0.5rem; height: 2.25rem; padding: 0 0.875rem 0 0.5rem; border-radius: var(--ou-r-ctl); border: 0; background: none; color: var(--ou-ink-3); font-size: 0.8125rem; white-space: nowrap; }
.ou-steps > * > i { display: grid; place-items: center; width: 1.375rem; height: 1.375rem; border-radius: 50%; border: 1px solid var(--ou-line-strong); font-style: normal; font-size: 0.6875rem; font-weight: 600; }
.ou-steps > a, .ou-steps > .is-done { color: var(--ou-ink-2); }
.ou-steps > a { cursor: pointer; }
.ou-steps > a:not([aria-current="step"]):hover { background: var(--ou-hover); color: var(--ou-ink); }
/* A finished step shows a check in an accent ring, so it never looks like a future step. */
.ou-steps > a > i, .ou-steps > .is-done > i { border-color: var(--ou-accent-strong); color: var(--ou-accent-strong); }
.ou-steps > * > i > .ou-ico { width: 0.75rem; height: 0.75rem; stroke-width: 2.4; }
.ou-steps > [aria-current="step"] { background: var(--ou-surface-solid); color: var(--ou-ink); font-weight: 500; }
.ou-steps > [aria-current="step"] > i { background: var(--ou-accent); border-color: var(--ou-accent); color: var(--ou-on-accent); }

.ou-steptool { display: grid; grid-template-columns: 19rem minmax(0, 1fr) 17rem; gap: var(--ou-gap); align-items: stretch; }
.ou-steptool__side { display: flex; flex-direction: column; gap: 1rem; padding: var(--ou-pad); border-radius: var(--ou-r-card); background: var(--ou-panel); border: 1px solid var(--ou-edge); min-width: 0; }
.ou-steptool__stage { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; padding: var(--ou-pad); border-radius: var(--ou-r-card); background: var(--ou-field); border: 1px solid var(--ou-edge); }
.ou-steptool__forward { margin-top: auto; display: flex; flex-direction: column; gap: 0.625rem; }
@container ou (max-width: 60rem) {
  .ou-steptool { grid-template-columns: minmax(0, 1fr); }
  .ou-steptool__stage { order: -1; }
}

/* Canvas selection: drag the thing itself, like Canva. */
.ou-canvas { position: relative; overflow: hidden; border-radius: 0.5rem; background: var(--ol-black); aspect-ratio: 16 / 9; container-type: inline-size; }
.ou-canvas > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ou-selected { position: absolute; outline: 1.5px solid var(--ol-seafoam); outline-offset: 0.375rem; cursor: move; }
.ou-selected > i { position: absolute; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: #fff; border: 1.5px solid var(--ol-seafoam); }
.ou-selected > i:nth-of-type(1) { left: -0.6875rem; top: -0.6875rem; }
.ou-selected > i:nth-of-type(2) { right: -0.6875rem; top: -0.6875rem; }
.ou-selected > i:nth-of-type(3) { left: -0.6875rem; bottom: -0.6875rem; }
.ou-selected > i:nth-of-type(4) { right: -0.6875rem; bottom: -0.6875rem; }

/* ───────────────────────── Sign-in (Front Door) ───────────────────────── */

.ou-login { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 0.75rem; padding: 0.75rem; border-radius: var(--ou-r-shell); background: var(--ou-surface-solid); box-shadow: var(--ou-shadow); min-height: 38rem; }
.ou-login__form { display: flex; flex-direction: column; justify-content: center; gap: 1rem; width: 100%; max-width: 24rem; margin-inline: auto; padding: 2rem 1rem; }
.ou-login__form .ou-title { text-align: center; margin-bottom: 0.75rem; }
.ou-login__art { position: relative; overflow: hidden; border-radius: calc(var(--ou-r-shell) - 0.75rem); background: var(--ol-navy); min-height: 14rem; }
.ou-login__art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ou-float { position: absolute; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.625rem 0.875rem; border-radius: 1rem; background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.5); color: #fff; font-size: 0.8125rem; font-weight: 500; backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.6); }
.ou-doorcard { display: flex; flex-direction: column; gap: 1rem; width: min(26rem, 100%); margin-inline: auto; padding: clamp(1.5rem, 5cqw, 2.5rem); border-radius: var(--ou-r-shell); background: var(--ou-surface-solid); box-shadow: var(--ou-shadow); }
@container ou (max-width: 52rem) {
  .ou-login { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .ou-login__art { order: -1; min-height: 12rem; }
  .ou-login__art > .ou-float:not(:first-of-type):not(:last-of-type) { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .ou-float { animation: ou-drift 7s ease-in-out infinite alternate; animation-delay: calc(var(--i, 0) * -2.3s); }
  @keyframes ou-drift { to { translate: 0 -0.5rem; } }
}
/* ───────────────────────── Phone width ───────────────────────── */

/* Below about 576px of app width: scrolling rows fade at the right edge to show
   there is more, tables keep only their must-have columns, and the week grid
   becomes a plain list. */
@container ou (max-width: 56rem) {
  .ou-sidebar { mask-image: linear-gradient(90deg, #000 calc(100% - 1.75rem), transparent); padding-right: 1.75rem; }
}
@container ou (max-width: 36rem) {
  .ou-navpills, .ou-steps { mask-image: linear-gradient(90deg, #000 calc(100% - 1.75rem), transparent); padding-right: 1.5rem; }
  .ou-half-sm { grid-column: span 6; --ou-pad: 0.875rem; }
  .ou-half-sm .ou-card__head { gap: 0.375rem; }
  .ou-monthbar .ou-h2 { font-size: 0.9375rem; }
  .ou-monthbar .ou-chip { height: 2rem; padding: 0 0.5rem; font-size: 0.75rem; }
  .ou-table { min-width: 0; }
  .ou-table .ou-col-opt { display: none; }
  .ou-table th, .ou-table td { padding-inline: 0.5rem; }
  .ou-table .ou-avatar { display: none; }
  .ou-table .ou-person__text { min-width: 6.5rem; }
  .ou-person__text > span { white-space: normal; }
  .ou-week { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
  .ou-week__day, .ou-week__line, .ou-week__time { display: none; }
  .ou-week .ou-event { margin-inline: 0; align-self: stretch; }
  .ou-week .ou-event b, .ou-week .ou-event div > span { white-space: normal; }
  .ou-week .ou-event .ou-event__when { display: block; font-weight: 500; }
}
/* ───────────────────────── Motion and hover ───────────────────────── */

/* The motion rules, the same in every look:
   1. Hover never moves or grows anything. Nothing lifts, slides, or scales
      under the pointer, so the spot you aim at stays put while the mouse
      travels across a page. Hover changes color, border, and shadow only.
      (Tim, 2026-11-10: lifting cards shifted his hover path.)
   2. A card answers hover quietly: its border darkens a step and its shadow
      deepens a little. Its action (the icon button in the card head, or the
      element marked ou-card__go) lights up, so the click target is obvious.
   3. Hover effects run only for a real mouse, so a phone tap never sticks.
   4. Press always answers: the control shrinks a hair while it is held.
   5. First-paint motion (cards rising, bars growing) is opt-in: put ou-enter
      on a wrapper. Leave it off any wrapper the app re-renders often. */

.ou-card { transition: transform 360ms var(--ou-ease), box-shadow 360ms var(--ou-ease), border-color 200ms; }
.ou-card__head > .ou-iconbtn, .ou-card__go { transition: transform 220ms var(--ou-ease), background-color 200ms, color 200ms, border-color 200ms; }
.ou-iconbtn .ou-ico, .ou-btn .ou-ico, .ou-link .ou-ico, .ou-chip .ou-ico { transition: translate 260ms var(--ou-ease), scale 260ms var(--ou-ease), rotate 260ms var(--ou-ease); }
.ou-event { transition: box-shadow 260ms var(--ou-ease); }
.ou-table td { transition: background-color 140ms, box-shadow 200ms; }
.ou-list__icon { transition: background-color 200ms, color 200ms; }
.ou-list__item .ou-h3 { transition: color 200ms; }
.ou-chip { transition: transform 220ms var(--ou-ease), border-color 160ms, background-color 160ms; }
.ou-segmented > button { transition: background-color 200ms, color 160ms, scale 160ms var(--ou-ease); }
.ou-navpills > *, .ou-steps > * { transition: background-color 200ms, color 160ms, scale 160ms var(--ou-ease); }
.ou-field > label { transition: color 160ms; }
.ou-bars__bar { transition: filter 200ms; }
.ou-bars__col { transition: color 160ms; }
input.ou-check, input.ou-switch { transition: background-color 200ms, border-color 160ms, box-shadow 200ms; }
input.ou-switch::after { transition: translate 260ms var(--ou-ease), width 200ms var(--ou-ease); }

/* A to-do dot is small, so its tap area reaches past its edge. */
.ou-checkdot { position: relative; transition: background-color 200ms, border-color 160ms, scale 220ms var(--ou-ease); }
.ou-checkdot::after { content: ""; position: absolute; inset: -0.75rem; border-radius: 50%; }
.ou-checkdot .ou-ico { scale: 0; transition: scale 320ms var(--ou-ease); }
.ou-checkdot[aria-pressed="true"] .ou-ico { scale: 1; }

/* Whole-card click: add ou-card--go to the card and ou-card__go to its one
   link or button. The click area then covers the card. Other controls inside
   the card still work. */
.ou-card--go { position: relative; cursor: pointer; }
.ou-card__go::after { content: ""; position: absolute; inset: 0; border-radius: var(--ou-r-card); }
.ou-card--go :is(a, button, input, select, summary, label):not(.ou-card__go) { position: relative; z-index: 1; }
/* The go control must not transform, or its stretched click area would shrink to its own box. */
.ou-card__go.ou-card__go { transform: none; }

@media (hover: hover) {
  .ou-card:not(.ou-card--flat):hover { border-color: var(--ou-line-strong); box-shadow: var(--ou-shadow-hover); }
  .ou-card:hover > .ou-card__head > .ou-iconbtn:not(.ou-iconbtn--strong), .ou-card:hover .ou-card__go.ou-iconbtn { background: var(--ou-strong); color: var(--ou-on-strong); border-color: transparent; }
  :is(.ou-card--strong, .ou-card--feature):hover > .ou-card__head > .ou-iconbtn, :is(.ou-card--strong, .ou-card--feature):hover .ou-card__go.ou-iconbtn { background: var(--ou-accent); color: var(--ou-on-accent); }
  .ou-card:hover > .ou-card__head > .ou-iconbtn .ou-ico, .ou-card:hover .ou-card__go .ou-ico { translate: 1px -1px; scale: 1.08; }
  .ou-card:hover .ou-link { text-decoration-color: currentColor; }

  .ou-iconbtn:hover .ou-ico { scale: 1.12; }
  .ou-btn:hover .ou-ico--go, .ou-link:hover .ou-ico--go { translate: 0.1875rem 0; }
  .ou-chip:hover .ou-ico:last-child { translate: 0 1px; }
  .ou-navpills > a[aria-current="page"]:hover { background: color-mix(in srgb, var(--ou-strong) 86%, var(--ou-on-strong)); }
  .ou-sidenav a:not([aria-current="page"]):hover::before { scale: 1 0.45; opacity: 0.55; }
  .ou-segmented > button:not([aria-pressed="true"]):hover { background: var(--ou-hover); }

  .ou-table tbody tr:hover td:first-child { box-shadow: inset 0.1875rem 0 0 var(--ou-accent-strong); }
  .ou-table tbody tr[aria-selected="true"]:hover td:first-child { box-shadow: inset 0.1875rem 0 0 var(--ou-on-accent); }
  .ou-list__item:hover .ou-list__icon { background: var(--ou-accent-soft); }
  .ou-event:hover { box-shadow: 0 10px 20px -14px rgba(0, 0, 0, 0.55); }
  .ou-bars__col:hover { color: var(--ou-ink); }
  .ou-bars__col:hover .ou-bars__bar { filter: brightness(1.08); }
  .ou-checkdot:hover { border-color: var(--ou-accent-strong); }
  input.ou-check:hover { border-color: var(--ou-accent-strong); }
  input.ou-switch:hover { box-shadow: 0 0 0 0.25rem var(--ou-accent-soft); }
  .ou-acc > summary:hover { color: var(--ou-accent-strong); }
  .ou-brand:hover img { rotate: -8deg; }
}
.ou-brand img { transition: rotate 420ms var(--ou-ease); }

/* Press. */
.ou-chip:active, .ou-navpills > a:active, .ou-steps > a:active, .ou-segmented > button:active { scale: 0.96; }
.ou-checkdot:active { scale: 0.88; }
.ou-card--go:active { transform: scale(0.995); }
input.ou-switch:active::after { width: 1.375rem; }
input.ou-switch:checked:active::after { translate: 0.75rem 0; }
.ou-field:focus-within > label { color: var(--ou-accent-strong); }

@media (prefers-reduced-motion: no-preference) {
  /* "Now" has a live dot. Tables stay still: a column of pulses is noise. */
  .ou-pill--now::before { animation: ou-pulse 2.6s ease-out infinite; }
  .ou-table .ou-pill--now::before { animation: none; }
  @keyframes ou-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 50%, transparent); } 70%, 100% { box-shadow: 0 0 0 0.3125rem transparent; } }

  /* A notice and an opened fold arrive, they do not blink in. */
  .ou-toast { animation: ou-toast-in 460ms var(--ou-ease) backwards; }
  @keyframes ou-toast-in { from { opacity: 0; transform: translateY(0.625rem) scale(0.97); } }
  .ou-acc[open] > .ou-acc__body { animation: ou-reveal 320ms var(--ou-ease) backwards; }
  .ou-modal[open] { animation: ou-modal-in 380ms var(--ou-ease); }
  .ou-modal[open]::backdrop { animation: ou-fade 260ms ease-out; }
  @keyframes ou-modal-in { from { opacity: 0; transform: translateY(1rem) scale(0.985); } }
  @keyframes ou-fade { from { opacity: 0; } }
  @keyframes ou-reveal { from { opacity: 0; transform: translateY(-0.375rem); } }

  /* First paint, opt-in with ou-enter. */
  .ou-enter .ou-grid > *, .ou-enter.ou-grid > * { animation: ou-enter 620ms var(--ou-ease) backwards; animation-delay: calc(var(--ou-n, 0) * 55ms); }
  .ou-enter .ou-grid > :nth-child(2) { --ou-n: 1; } .ou-enter .ou-grid > :nth-child(3) { --ou-n: 2; }
  .ou-enter .ou-grid > :nth-child(4) { --ou-n: 3; } .ou-enter .ou-grid > :nth-child(5) { --ou-n: 4; }
  .ou-enter .ou-grid > :nth-child(6) { --ou-n: 5; } .ou-enter .ou-grid > :nth-child(7) { --ou-n: 6; }
  .ou-enter .ou-grid > :nth-child(n + 8) { --ou-n: 7; }
  @keyframes ou-enter { from { opacity: 0; transform: translateY(0.875rem); } }
  .ou-enter .ou-bars__bar { animation: ou-rise 900ms var(--ou-ease) backwards; animation-delay: calc(var(--i, 0) * 45ms + 200ms); }
  @keyframes ou-rise { from { transform: scaleY(0.2); } }
  .ou-enter .ou-ring__value { animation: ou-sweep 1200ms var(--ou-ease) 250ms backwards; }
  .ou-enter .ou-gauge path:not(.is-rest) { animation: ou-sweep 1100ms var(--ou-ease) 250ms backwards; }
  @keyframes ou-sweep { from { stroke-dasharray: 0 100; } }
  .ou-enter .ou-progress > i:not(.is-hatch), .ou-enter .ou-meter__bar:not(.is-hatch) { animation: ou-wipe 900ms var(--ou-ease) 200ms backwards; }
  @keyframes ou-wipe { from { clip-path: inset(0 100% 0 0 round var(--ou-bar-r, 999px)); } to { clip-path: inset(0 0 0 0 round var(--ou-bar-r, 999px)); } }
}

/* ───────────────────────── Chat ─────────────────────────
   A conversation. .ou-chat holds .ou-msg rows. A row has an optional avatar, a
   name-and-time line (.ou-msg__meta), one .ou-bubble, and optional source
   chips (.ou-msg__cites). Add ou-msg--me to the person's own messages: they
   sit on the right in the strong color, so the two sides never look alike.
   .ou-composer is the message box; its text area grows with the text. */
.ou-chat { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.ou-chat__day { align-self: center; padding: 0.125rem 0.625rem; border-radius: 999px; background: var(--ou-surface-2); font-size: 0.75rem; color: var(--ou-ink-2); }
.ou-msg { --b: min(var(--ou-r-card), 1.125rem); display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: ". meta" "av bubble" ". cites"; column-gap: 0.625rem; row-gap: 0.3125rem; max-width: min(100%, 42rem); }
.ou-msg > .ou-avatar { grid-area: av; align-self: end; }
.ou-msg__meta { grid-area: meta; display: flex; align-items: baseline; gap: 0.5rem; font-size: 0.75rem; color: var(--ou-ink-2); }
.ou-msg__meta b { font-weight: 500; color: var(--ou-ink); }
.ou-bubble { grid-area: bubble; justify-self: start; max-width: 100%; padding: 0.625rem 0.875rem; border-radius: var(--b) var(--b) var(--b) 0.375rem; background: var(--ou-surface-solid); border: 1px solid var(--ou-line); overflow-wrap: anywhere; }
.ou-bubble > :where(p, ul, ol) { margin: 0; }
.ou-bubble > * + * { margin-top: 0.5rem; }
.ou-msg__cites { grid-area: cites; display: flex; flex-wrap: wrap; gap: 0.375rem; }
.ou-msg--me { margin-left: auto; grid-template-columns: minmax(0, 1fr); grid-template-areas: "meta" "bubble" "cites"; }
.ou-msg--me :is(.ou-msg__meta, .ou-msg__cites) { justify-content: flex-end; }
.ou-msg--me .ou-bubble { justify-self: end; background: var(--ou-strong); color: var(--ou-on-strong); border-color: transparent; border-radius: var(--b) var(--b) 0.375rem var(--b); }
.ou-bubble--typing { display: inline-flex; align-items: center; gap: 0.25rem; min-height: 2.5rem; }
.ou-bubble--typing > i { width: 0.375rem; height: 0.375rem; border-radius: 50%; background: var(--ou-ink-3); }

.ou-composer { display: flex; align-items: flex-end; gap: 0.5rem; padding: 0.375rem 0.375rem 0.375rem 0.625rem; border-radius: min(var(--ou-r-input), 1.5rem); border: 1px solid var(--ou-line-strong); background: var(--ou-field); transition: border-color 160ms, box-shadow 160ms; }
.ou-composer:focus-within { border-color: var(--ou-accent-strong); box-shadow: 0 0 0 3px var(--ou-accent-soft); }
.ou-composer textarea { flex: 1 1 0; min-width: 0; min-height: 2.5rem; max-height: 12rem; padding: 0.5625rem 0.375rem; border: 0; background: none; resize: none; font: inherit; color: var(--ou-ink); field-sizing: content; }
.ou-composer textarea:focus-visible { outline: none; }
.ou-composer textarea::placeholder { color: var(--ou-ink-3); }
.ou-composer > :is(.ou-btn, .ou-iconbtn) { flex: none; }
/* A text box that grows with its text and never scrolls inside itself. */
textarea.ou-input--grow { field-sizing: content; min-height: 2.75rem; resize: none; }

/* ───────────────────────── Loading placeholders ─────────────────────────
   Gray shapes that hold the place of text, numbers, and pictures while they
   load. Set --w and --h, or use a ready shape. Put aria-busy="true" on the box
   that is loading and aria-hidden="true" on each shape. */
.ou-skel { display: block; position: relative; overflow: hidden; flex: none; width: var(--w, 100%); max-width: 100%; height: var(--h, 0.75rem); border-radius: 999px; background: var(--ou-surface-2); }
.ou-skel--title { --w: 45%; --h: 1.25rem; }
.ou-skel--num { --w: 6rem; --h: 2.25rem; border-radius: 0.625rem; }
.ou-skel--avatar { --w: 2rem; --h: 2rem; border-radius: 50%; }
.ou-skel--btn { --w: 6.5rem; --h: 2.5rem; border-radius: var(--ou-r-ctl); }
.ou-skel--block { --h: 8rem; border-radius: min(var(--ou-r-card), 1rem); }

/* ───────────────────────── Tooltip ─────────────────────────
   Wrap a control: <span class="ou-tip" data-tip="Plain words">…</span>. The
   words show after a short pause on hover, and at once on keyboard focus. The
   control still needs its own label; a tooltip only adds to it. Use
   ou-tip--below near the top of a page, ou-tip--start or ou-tip--end near a
   side edge. A box that scrolls sideways will cut a tooltip off. */
.ou-tip { position: relative; display: inline-flex; }
.ou-tip::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 0.5rem); translate: -50% 0; z-index: 20;
  width: max-content; max-width: min(16rem, 70vw); padding: 0.375rem 0.625rem; border-radius: 0.5rem;
  background: var(--ou-dark); color: var(--ou-on-dark); font-size: 0.75rem; font-weight: 400; line-height: 1.35; letter-spacing: 0; text-align: left; text-transform: none; white-space: normal;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.6); pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 140ms, visibility 0s 140ms;
}
.ou-tip--below::after { bottom: auto; top: calc(100% + 0.5rem); }
.ou-tip--start::after { left: 0; translate: none; }
.ou-tip--end::after { left: auto; right: 0; translate: none; }
.ou-tip:has(:focus-visible)::after { opacity: 1; visibility: visible; transition: opacity 140ms; }
@media (hover: hover) {
  .ou-tip:hover::after { opacity: 1; visibility: visible; transition: opacity 140ms 350ms, visibility 0s 350ms; }
}

/* ───────────────────────── Trail and page numbers ─────────────────────────
   .ou-crumbs shows where a page sits: links, then the current page last.
   .ou-pager moves through a long list a page at a time. */
.ou-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem 0; min-width: 0; font-size: 0.8125rem; color: var(--ou-ink-2); }
.ou-crumbs > * { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
.ou-crumbs > * + *::before { content: ""; width: 0.375rem; height: 0.375rem; margin: 0 0.625rem 0 0.375rem; border-top: 1.5px solid var(--ou-ink-3); border-right: 1.5px solid var(--ou-ink-3); rotate: 45deg; }
.ou-crumbs > a:hover { color: var(--ou-ink); }
.ou-crumbs > [aria-current="page"] { color: var(--ou-ink); font-weight: 500; }

.ou-pager { display: inline-flex; align-items: center; gap: 0.25rem; max-width: 100%; }
.ou-pager > * { display: inline-grid; place-items: center; min-width: 2rem; height: 2rem; padding: 0 0.5rem; border: 1px solid transparent; border-radius: min(var(--ou-r-ctl), 0.625rem); background: none; color: var(--ou-ink-2); font-size: 0.8125rem; font-weight: 500; text-decoration: none; transition: background-color 160ms, color 160ms; }
.ou-pager > :is(a, button) { cursor: pointer; }
.ou-pager > :is(a, button):not([aria-current="page"]):hover { background: var(--ou-hover); color: var(--ou-ink); }
.ou-pager > [aria-current="page"] { background: var(--ou-strong); color: var(--ou-on-strong); }
.ou-pager > :is([aria-disabled="true"], :disabled) { color: var(--ou-ink-3); opacity: 0.6; pointer-events: none; }

/* ───────────────────────── Side panel ─────────────────────────
   <dialog class="ou-modal ou-modal--side"> slides in from the right and keeps
   the page behind it in view: details of one row, filters, a short form. On a
   phone it is the same bottom sheet as every other ou-modal. */
@media (min-width: 40.0625rem) {
  /* The page behind stays readable: a light dim, no blur. */
  .ou-modal--side::backdrop { background: rgba(47, 53, 60, 0.28); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .ou-modal--side { margin: 0 0 0 auto; width: min(26rem, calc(100vw - 3rem)); height: 100dvh; max-height: none; border-width: 0 0 0 1px; border-radius: var(--ou-r-card) 0 0 var(--ou-r-card); }
}

/* ───────────────────────── Line chart ─────────────────────────
   For change over time. The app draws two SVGs with the same points on a
   0 to 100 box (viewBox="0 0 100 100" preserveAspectRatio="none"): one closed
   shape for the soft fill (.ou-line__area) and one open path for the line
   (.ou-line__path). The line stays 2px at
   any width. Mark one point with .ou-line__dot and name it with .ou-line__tag;
   both take --x and --y from 0 to 100. A second line (add is-2) is dashed and
   has no fill, so the two never depend on color alone; show an .ou-legend
   whenever there are two. Never give one chart two different scales. */
.ou-line { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: var(--h, 9.5rem) auto; row-gap: 0.4375rem; margin: 0; font-size: 0.75rem; color: var(--ou-ink-2); }
.ou-line__y { display: flex; flex-direction: column; justify-content: space-between; padding-right: 0.5rem; text-align: right; line-height: 1; }
.ou-line__plot { grid-column: 2; position: relative; min-width: 0; border-bottom: 1px solid var(--ou-line-strong); background: linear-gradient(var(--ou-line) 1px, transparent 1px) 0 0 / 100% calc(100% / var(--rows, 4)); }
.ou-line__plot > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ou-line__area { fill: var(--ou-line-1); opacity: 0.34; -webkit-mask-image: linear-gradient(to bottom, #000, transparent); mask-image: linear-gradient(to bottom, #000, transparent); }
.ou-line__path { fill: none; stroke: var(--ou-line-1); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ou-line__path path { vector-effect: non-scaling-stroke; }
.ou-line__path.is-2 { stroke: var(--ou-line-2); stroke-dasharray: 5 5; }
.ou-line__dot { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); translate: -50% -50%; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--ou-line-1); box-shadow: 0 0 0 2px var(--ou-surface-solid); }
.ou-line__tag { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); translate: -50% calc(-100% - 0.625rem); z-index: 1; padding: 0.125rem 0.5rem; border-radius: 999px; background: var(--ou-dark); color: var(--ou-on-dark); font-size: 0.6875rem; font-weight: 500; white-space: nowrap; }
.ou-line__tag--end { translate: calc(-100% + 0.625rem) calc(-100% - 0.625rem); }
.ou-line__x { grid-column: 2; display: flex; justify-content: space-between; }
.ou-legend i.is-line-1 { background: var(--ou-line-1); }
.ou-legend i.is-line-2 { background: none; border: 1.5px dashed var(--ou-line-2); }
/* The moving read-out: the page's own script places .ou-line__cross with --x. */
.ou-line__cross { position: absolute; top: 0; bottom: 0; left: calc(var(--x) * 1%); width: 1px; background: var(--ou-line-strong); pointer-events: none; }
/* A small line with no axes, for a number card. */
.ou-line--spark { display: block; position: relative; height: var(--h, 2.5rem); }
.ou-line--spark > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* ───────────────────────── Compact spacing ─────────────────────────
   data-density="compact" on the .ou-app, or on any box inside it, tightens the
   space in and around every part, for screens full of data. Text stays the
   same size. Buttons and fields get shorter only where there is a mouse; on a
   touch screen they keep their full height. */
.ou-app[data-density="compact"], .ou-app [data-density="compact"] { --ou-pad: 0.75rem; --ou-gap: 0.5rem; }
:where([data-density="compact"]) .ou-page { gap: 0.75rem; padding: clamp(0.625rem, 1.6cqw, 1rem); }
:where([data-density="compact"]) .ou-card, .ou-card:where([data-density="compact"]) { gap: 0.5rem; }
:where([data-density="compact"]) .ou-card__head { min-height: 1.75rem; }
:where([data-density="compact"]) .ou-stack { gap: 0.5rem; }
:where([data-density="compact"]) .ou-shell { gap: 0.5rem; padding: 0.5rem; }
:where([data-density="compact"]) .ou-shell__main { gap: 0.5rem; }
:where([data-density="compact"]) .ou-sidebar { gap: 1rem; padding: 0.75rem 0.625rem; }
:where([data-density="compact"]) .ou-sidenav a { padding-block: 0.375rem; }
:where([data-density="compact"]) .ou-panel { padding: 0.75rem; }
:where([data-density="compact"]) .ou-table th { padding: 0.375rem 0.625rem; }
:where([data-density="compact"]) .ou-table td { padding: 0.375rem 0.625rem; }
:where([data-density="compact"]) .ou-list__item { padding-block: 0.375rem; }
:where([data-density="compact"]) .ou-modal__body { gap: 0.75rem; }
:where([data-density="compact"]) .ou-empty { padding: 1.25rem 1rem; }
:where([data-density="compact"]) .ou-chat { gap: 0.625rem; }
@media (pointer: fine) {
  :where([data-density="compact"]) .ou-btn { height: 2rem; padding: 0 0.875rem; }
  :where([data-density="compact"]) .ou-btn--sm { height: 1.75rem; padding: 0 0.625rem; }
  :where([data-density="compact"]) .ou-btn--lg { height: 2.5rem; padding: 0 1.25rem; }
  :where([data-density="compact"]) .ou-iconbtn { width: 2rem; height: 2rem; }
  :where([data-density="compact"]) .ou-iconbtn--sm { width: 1.75rem; height: 1.75rem; }
  :where([data-density="compact"]) :is(.ou-input, .ou-select, .ou-search) { height: 2.25rem; }
  :where([data-density="compact"]) textarea.ou-input { height: auto; }
  :where([data-density="compact"]) .ou-segmented > button { height: 1.75rem; }
  :where([data-density="compact"]) .ou-pill:not(.ou-pill--lg) { height: 1.375rem; }
  :where([data-density="compact"]) .ou-pager > * { min-width: 1.75rem; height: 1.75rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .ou-bubble--typing > i { animation: ou-typing 1.2s ease-in-out infinite; }
  .ou-bubble--typing > i:nth-child(2) { animation-delay: 160ms; }
  .ou-bubble--typing > i:nth-child(3) { animation-delay: 320ms; }
  @keyframes ou-typing { 0%, 60%, 100% { opacity: 0.35; } 30% { opacity: 1; } }
  .ou-skel::after { content: ""; position: absolute; inset: 0; translate: -100% 0; background: linear-gradient(100deg, transparent 20%, color-mix(in srgb, var(--ou-ink) 9%, transparent) 50%, transparent 80%); animation: ou-shimmer 1.7s ease-in-out infinite; }
  @keyframes ou-shimmer { to { translate: 100% 0; } }
  @media (min-width: 40.0625rem) {
    .ou-modal--side[open] { animation: ou-side-in 420ms var(--ou-ease); }
    @keyframes ou-side-in { from { opacity: 0; transform: translateX(2rem); } }
  }
  .ou-enter .ou-line__path { animation: ou-draw 1300ms var(--ou-ease) 200ms backwards; }
  @keyframes ou-draw { from { clip-path: inset(-20% 100% -20% -2%); } to { clip-path: inset(-20% -2% -20% -2%); } }
  .ou-enter .ou-line__area { animation: ou-fade 900ms ease-out 500ms backwards; }
  .ou-enter :is(.ou-line__dot, .ou-line__tag) { animation: ou-fade 400ms ease-out 1100ms backwards; }
}

/* Touch screens: small controls grow to a size a thumb can hit. */
@media (pointer: coarse) {
  .ou-pager > * { min-width: 2.5rem; height: 2.5rem; }
  .ou-btn--sm, .ou-chip, .ou-navpills > *, .ou-segmented > button, .ou-steps > * { min-height: 2.5rem; }
  .ou-iconbtn--sm { width: 2.5rem; height: 2.5rem; }
  .ou-table td { padding-block: 0.875rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ou-app *, .ou-app *::before, .ou-app *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ───────────────────────── More parts (2026-11-19) ─────────────────────────
   Twenty parts picked from the pieces Tim marked Keep in the Hundred. Each is built on
   the same role tokens as the parts above, so each works in every style. ou-parts.js
   runs the ones that move; the library page shows the markup for each. */

.ou-app { --ou-spring: cubic-bezier(0.3, 1.5, 0.5, 1); --ou-slide: 1; }

/* Segmented, with ou-parts.js loaded: one pill slides to the chosen segment. */
.ou-segmented.is-ready { position: relative; isolation: isolate; scrollbar-width: none; }
.ou-segmented.is-ready::-webkit-scrollbar { display: none; }
.ou-segmented.is-ready > button[aria-pressed="true"] { background: none; }
.ou-segmented.is-ready::before { content: ""; position: absolute; z-index: -1; top: 0.1875rem; bottom: 0.1875rem; left: 0; width: var(--seg-w, 0); translate: var(--seg-x, 0) 0; border-radius: calc(var(--ou-r-ctl) - 0.1875rem); background: var(--ou-strong); }
.ou-segmented.is-moving::before { transition: translate 360ms var(--ou-spring), width 260ms var(--ou-ease); }

/* Words that swap in place. Every wording sits in the same spot, so the control keeps one width. */
.ou-swap { display: inline-grid; justify-items: center; align-items: center; }
.ou-swap > * { grid-area: 1 / 1; transition: opacity 160ms, translate 220ms var(--ou-ease); }
.ou-swap > :not(:first-child) { opacity: 0; translate: 0 0.375rem; }
[data-state="busy"] > .ou-swap > *, [data-state="done"] > .ou-swap > * { opacity: 0; translate: 0 -0.375rem; }
[data-state="busy"] > .ou-swap > :nth-child(2), [data-state="done"] > .ou-swap > :last-child { opacity: 1; translate: none; }

/* Hold to confirm: for anything that cannot be undone. The button fills while it is held. */
.ou-hold { position: relative; overflow: hidden; isolation: isolate; touch-action: none; user-select: none; -webkit-user-select: none; }
.ou-hold::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, currentColor 26%, transparent); transform-origin: left center; scale: 0 1; }
.ou-hold.is-holding::before { scale: 1 1; transition: scale var(--hold-ms, 1000ms) linear; }
.ou-hold[data-state="done"]::before { scale: 1 1; }

/* Busy: the button shows the work under way, then that it is done. */
.ou-busy { position: relative; overflow: hidden; }
.ou-busy[data-state="busy"] { cursor: progress; }
.ou-busy::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 0.1875rem; background: currentColor; opacity: 0; transform-origin: left center; }
.ou-busy[data-state="busy"]::after { opacity: 0.75; }
@media (prefers-reduced-motion: no-preference) {
  .ou-busy[data-state="busy"]::after { animation: ou-busy 1.1s ease-in-out infinite; }
  @keyframes ou-busy { 0% { scale: 0.1 1; translate: 0 0; } 50% { scale: 0.55 1; translate: 25% 0; } 100% { scale: 0.1 1; translate: 100% 0; } }
}

/* Split button: one main action, and a small arrow for the other ways to do it. */
.ou-split, .ou-menuwrap { position: relative; display: inline-flex; align-items: flex-start; }
/* A split button is two buttons joined into one shape, with a thin line where they meet and no gap. Each half presses by itself. */
.ou-split > .ou-btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; transform-origin: right center; }
.ou-split > .ou-split__more { width: 2.5rem; padding: 0; margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-color: color-mix(in srgb, currentColor 35%, transparent); transform-origin: left center; }
/* Two outlined halves share one line where they meet. */
.ou-split > .ou-split__more:is(.ou-btn--ghost, .ou-btn--soft) { margin-left: -1px; }
.ou-split__more .ou-ico, .ou-pick__btn .ou-ico { transition: rotate 260ms var(--ou-ease); }
.ou-split__more[aria-expanded="true"] .ou-ico, .ou-pick__btn[aria-expanded="true"] .ou-ico { rotate: 180deg; }

/* Menu: a short list of actions under a button. Also the panel every opening list shares. */
.ou-menu, .ou-listbox, .ou-date__pop {
  position: absolute; z-index: 30; top: calc(100% + 0.375rem); left: 0; margin: 0; padding: 0.375rem;
  border: 1px solid var(--ou-line-strong); border-radius: min(var(--ou-r-card), 1rem);
  background: var(--ou-surface-solid); color: var(--ou-ink); box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.55);
}
.ou-menu { display: flex; flex-direction: column; gap: 0.125rem; min-width: 12rem; }
.ou-menu--end { left: auto; right: 0; }
:is(.ou-menu, .ou-listbox, .ou-date__pop).is-up { top: auto; bottom: calc(100% + 0.375rem); }
.ou-menu > :is(button, a) { display: flex; align-items: center; gap: 0.625rem; width: 100%; min-height: 2.25rem; padding: 0 0.75rem; border: 0; border-radius: min(var(--ou-r-row), 0.625rem); background: none; color: var(--ou-ink); font-size: 0.8125rem; text-align: left; white-space: nowrap; cursor: pointer; }
.ou-menu > :is(button, a):is(:hover, :focus-visible) { background: var(--ou-surface-2); }
.ou-menu > hr { width: 100%; height: 1px; margin: 0.25rem 0; border: 0; background: var(--ou-line); }
.ou-menu kbd, .ou-listbox kbd { margin-left: auto; font: inherit; font-size: 0.6875rem; color: var(--ou-ink-3); }
@media (prefers-reduced-motion: no-preference) {
  :is(.ou-menu, .ou-listbox, .ou-date__pop):not([hidden]) { animation: ou-drop 160ms var(--ou-ease); }
  @keyframes ou-drop { from { opacity: 0; translate: 0 -0.25rem; } }
}

/* Radio list: pick exactly one. The chosen row carries the colored left edge. */
.ou-radios { display: flex; flex-direction: column; gap: 0.5rem; }
.ou-radio { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.75rem 0.875rem; border: 1px solid var(--ou-line-strong); border-radius: min(var(--ou-r-card), 1rem); background: var(--ou-field); cursor: pointer; transition: border-color 160ms, box-shadow 160ms; }
.ou-radio > input { appearance: none; display: grid; place-content: center; flex: none; width: 1.125rem; height: 1.125rem; margin: 0.125rem 0 0; border: 1.5px solid var(--ou-line-strong); border-radius: 50%; background: var(--ou-field); cursor: pointer; }
.ou-radio > input::after { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ou-on-strong); scale: 0; transition: scale 220ms var(--ou-spring); }
.ou-radio > input:checked { background: var(--ou-strong); border-color: transparent; }
.ou-radio > input:checked::after { scale: 1; }
.ou-radio:has(input:checked) { border-color: var(--ou-accent-strong); box-shadow: inset 0.25rem 0 0 var(--ou-accent); }
.ou-radio__text { display: flex; flex-direction: column; min-width: 0; font-weight: 500; }
.ou-radio__text > span { font-size: 0.75rem; font-weight: 400; color: var(--ou-ink-2); }
@media (hover: hover) { .ou-radio:hover { border-color: var(--ou-ink-3); } }

/* Tabs: the parts of one screen. A line slides under the current tab. */
.ou-tabs { position: relative; display: flex; gap: 0.25rem; min-width: 0; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--ou-line-strong); }
.ou-tabs::-webkit-scrollbar { display: none; }
.ou-tabs > [role="tab"] { flex: none; height: 2.5rem; padding: 0 0.875rem; border: 0; background: none; color: var(--ou-ink-2); font-weight: 500; white-space: nowrap; cursor: pointer; transition: color 160ms; }
.ou-tabs > [role="tab"][aria-selected="true"] { color: var(--ou-ink); }
.ou-tabs::after { content: ""; position: absolute; left: 0; bottom: 0; width: var(--tab-w, 0); height: 0.1875rem; translate: var(--tab-x, 0) 0; border-radius: 0.1875rem 0.1875rem 0 0; background: var(--ou-accent-strong); }
.ou-tabs.is-moving::after { transition: translate 320ms var(--ou-ease), width 260ms var(--ou-ease); }
.ou-tabpanel { padding-top: 0.875rem; }
@media (hover: hover) { .ou-tabs > [role="tab"]:hover { color: var(--ou-ink); } }

/* Star rating: one to five. The same star again clears it. */
.ou-rating { display: inline-flex; gap: 0.125rem; }
.ou-rating > button { display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ou-line-strong); cursor: pointer; transition: color 120ms, scale 220ms var(--ou-spring); }
.ou-rating > button svg { width: 1.375rem; height: 1.375rem; fill: currentColor; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.ou-rating > button.is-on { color: var(--ou-accent-strong); }
.ou-rating > button:active { scale: 0.84; }
@media (hover: hover) {
  .ou-rating:hover > button { color: var(--ou-accent-strong); }
  .ou-rating > button:hover ~ button { color: var(--ou-line-strong); }
}

/* Dial: a hidden slider does the work (keys, screen readers, forms); the dial drawn over it turns by dragging. */
.ou-knobs { display: flex; flex-wrap: wrap; gap: 1.25rem 1.75rem; }
.ou-knob { --turn: 0; display: grid; justify-items: center; gap: 0.25rem; width: 5.25rem; }
.ou-knob__dial { position: relative; width: 5.25rem; height: 5.25rem; border-radius: 50%; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.ou-knob__scale { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ou-knob__scale line { stroke: var(--ou-line-strong); stroke-width: 2; stroke-linecap: round; transition: stroke 120ms; }
.ou-knob__scale line.is-on { stroke: var(--ou-accent-strong); }
.ou-knob__cap { position: absolute; inset: 0.875rem; border-radius: 50%; background: var(--ou-surface-solid); border: 1px solid var(--ou-line-strong); box-shadow: 0 2px 0 var(--ou-line-strong), 0 8px 14px -8px rgba(0, 0, 0, 0.5); rotate: calc(var(--turn) * 270deg - 135deg); transition: box-shadow 200ms var(--ou-ease), scale 200ms var(--ou-ease), border-color 160ms; }
.ou-knob__mark { position: absolute; left: 50%; top: 0.3125rem; width: 0.375rem; height: 0.375rem; margin-left: -0.1875rem; border-radius: 50%; background: var(--ou-accent-strong); }
.ou-knob.is-held .ou-knob__dial { cursor: grabbing; }
.ou-knob.is-held .ou-knob__cap { scale: 0.97; box-shadow: 0 0 0 var(--ou-line-strong), 0 2px 5px -2px rgba(0, 0, 0, 0.5); }
.ou-knob:has(.ou-knob__input:focus-visible) .ou-knob__cap { outline: 2px solid var(--ou-accent-strong); outline-offset: 3px; }
.ou-knob__value { font-size: 1.125rem; line-height: 1.2; font-weight: var(--ou-num-weight); letter-spacing: -0.02em; }
.ou-knob__label { font-size: 0.75rem; font-weight: 500; color: var(--ou-ink-2); }
.ou-knob__input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (hover: hover) { .ou-knob__dial:hover .ou-knob__cap { border-color: var(--ou-ink-2); } }

/* Slider: the filled part ends under the thumb. ou-parts.js keeps --frac (0 to 1) right. */
input.ou-slider { --frac: 0; --thumb: 1.375rem; --track: 0.375rem; --fill: calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--frac)); appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 1.75rem; margin: 0; background: none; cursor: pointer; touch-action: pan-y; }
input.ou-slider::-webkit-slider-runnable-track { height: var(--track); border-radius: 999px; background: linear-gradient(to right, var(--ou-slider-fill, var(--ou-accent-strong)) var(--fill), var(--ou-slider-rest, var(--ou-line-strong)) var(--fill)); }
input.ou-slider::-moz-range-track { height: var(--track); border-radius: 999px; background: var(--ou-slider-rest, var(--ou-line-strong)); }
input.ou-slider::-moz-range-progress { height: var(--track); border-radius: 999px; background: var(--ou-slider-fill, var(--ou-accent-strong)); }
input.ou-slider::-webkit-slider-thumb { -webkit-appearance: none; width: var(--thumb); height: var(--thumb); margin-top: calc((var(--track) - var(--thumb)) / 2); border-radius: 50%; background: var(--ou-surface-solid); border: 1px solid var(--ou-line-strong); box-shadow: 0 2px 0 var(--ou-line-strong), 0 6px 10px -6px rgba(0, 0, 0, 0.5); transition: scale 200ms var(--ou-ease), box-shadow 200ms var(--ou-ease), border-color 160ms; cursor: grab; }
input.ou-slider::-moz-range-thumb { width: var(--thumb); height: var(--thumb); border-radius: 50%; background: var(--ou-surface-solid); border: 1px solid var(--ou-line-strong); box-shadow: 0 2px 0 var(--ou-line-strong), 0 6px 10px -6px rgba(0, 0, 0, 0.5); cursor: grab; }
input.ou-slider:active::-webkit-slider-thumb { scale: 0.94; cursor: grabbing; box-shadow: 0 0 0 var(--ou-line-strong), 0 2px 4px -2px rgba(0, 0, 0, 0.5); }
.ou-app input.ou-slider:focus-visible { outline: none; }
input.ou-slider:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--ou-accent-strong); outline-offset: 2px; }
input.ou-slider:focus-visible::-moz-range-thumb { outline: 2px solid var(--ou-accent-strong); outline-offset: 2px; }
@media (hover: hover) { input.ou-slider:hover::-webkit-slider-thumb { border-color: var(--ou-ink-2); } }

/* Stepper: a number with one fewer and one more. */
.ou-stepper { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.1875rem; align-self: flex-start; border-radius: var(--ou-r-ctl); background: var(--ou-surface-2); }
.ou-stepper > button { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 1px solid var(--ou-line); border-radius: calc(var(--ou-r-ctl) - 0.1875rem); background: var(--ou-surface-solid); color: var(--ou-ink); font-size: 1.125rem; line-height: 1; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; box-shadow: 0 2px 0 var(--ou-line-strong); transition: translate 300ms var(--ou-spring), box-shadow 300ms var(--ou-ease), border-color 160ms; }
.ou-stepper > button:active { translate: 0 2px; box-shadow: 0 0 0 var(--ou-line-strong); transition-duration: 50ms; }
.ou-stepper > button:disabled { color: var(--ou-ink-3); cursor: not-allowed; box-shadow: none; translate: none; }
.ou-stepper > output { display: inline-flex; align-items: baseline; justify-content: center; gap: 0.3125rem; min-width: 5rem; padding: 0 0.5rem; overflow: hidden; }
.ou-stepper__num { display: inline-block; font-size: 1.375rem; line-height: 2.25rem; font-weight: var(--ou-num-weight); letter-spacing: -0.02em; }
@media (hover: hover) { .ou-stepper > button:not(:disabled):hover { border-color: var(--ou-line-strong); } }
@media (prefers-reduced-motion: no-preference) {
  .is-roll-up { animation: ou-roll-up 160ms var(--ou-ease); }
  .is-roll-down { animation: ou-roll-down 160ms var(--ou-ease); }
  @keyframes ou-roll-up { from { translate: 0 0.3125rem; opacity: 0.4; } }
  @keyframes ou-roll-down { from { translate: 0 -0.3125rem; opacity: 0.4; } }
}

/* Level meter: a row of lamps. Set --v from 0 to 100. The last fifth is the "nearly full" zone, in the ink color. */
.ou-level { --v: 0; --seg: 0.5rem; --lit: var(--ou-accent); --hot: var(--ou-ink); position: relative; height: 1rem; border-radius: 0.1875rem; background: repeating-linear-gradient(90deg, var(--ou-surface-2) 0 calc(var(--seg) - 2px), transparent calc(var(--seg) - 2px) var(--seg)); }
.ou-level::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--lit) 0 80%, var(--hot) 80%); -webkit-mask: repeating-linear-gradient(90deg, #000 0 calc(var(--seg) - 2px), transparent calc(var(--seg) - 2px) var(--seg)); mask: repeating-linear-gradient(90deg, #000 0 calc(var(--seg) - 2px), transparent calc(var(--seg) - 2px) var(--seg)); clip-path: inset(0 calc(100% - var(--v) * 1%) 0 0); transition: clip-path 90ms linear; }

/* Milestones: a line of named steps. Done is solid with a check, now is the accent, the rest are outlines. */
.ou-milestones { --n: 4; --v: 0; position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding-top: 2rem; }
.ou-milestones::before, .ou-milestones::after { content: ""; position: absolute; top: 0.625rem; left: calc(50% / var(--n)); height: 0.25rem; border-radius: 999px; }
.ou-milestones::before { right: calc(50% / var(--n)); background: var(--ou-surface-2); }
.ou-milestones::after { width: calc((100% - 100% / var(--n)) * var(--v) / 100); background: var(--ou-strong); transition: width 600ms var(--ou-ease); }
.ou-milestones > li { position: relative; text-align: center; font-size: 0.75rem; color: var(--ou-ink-2); }
.ou-milestones > li::before { content: ""; position: absolute; left: 50%; top: -2rem; z-index: 1; width: 1.5rem; height: 1.5rem; margin-left: -0.75rem; border-radius: 50%; border: 2px solid var(--ou-line-strong); background: var(--ou-surface-solid); }
.ou-milestones > li.is-done::before { border-color: transparent; background: var(--ou-strong); }
.ou-milestones > li.is-done::after { content: ""; position: absolute; left: 50%; top: calc(-2rem + 0.4375rem); z-index: 2; width: 0.625rem; height: 0.625rem; margin-left: -0.3125rem; background: var(--ou-on-strong); clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 10%, 37% 72%); }
.ou-milestones > li.is-now { color: var(--ou-ink); font-weight: 500; }
.ou-milestones > li.is-now::before { border-color: transparent; background: var(--ou-accent); box-shadow: 0 0 0 0.25rem var(--ou-accent-soft); }

/* Streak chain: one link per day. A done day is a solid link, today is the accent, a missed day is dashed. */
.ou-streak { display: flex; align-items: center; }
.ou-streak > li { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; margin-left: -0.375rem; border-radius: 50%; border: 0.25rem solid var(--ou-surface-2); font-size: 0.6875rem; font-weight: 600; color: var(--ou-ink-3); }
.ou-streak > li:first-child { margin-left: 0; }
.ou-streak > li.is-done { border-color: var(--ou-strong); color: var(--ou-ink); }
.ou-streak > li.is-now { border-color: var(--ou-accent); color: var(--ou-ink); box-shadow: 0 0 0 0.25rem var(--ou-accent-soft); }
.ou-streak > li.is-missed { border-style: dashed; border-color: var(--ou-line-strong); }

/* Select with its own list, and the type-to-find box. The chosen value is lettered like the options. */
.ou-pick, .ou-combo, .ou-date { position: relative; }
.ou-pick__btn, .ou-date__btn { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; width: 100%; height: 2.75rem; padding: 0 1rem; border: 1px solid var(--ou-line-strong); border-radius: var(--ou-r-input); background: var(--ou-field); color: var(--ou-ink); text-align: left; cursor: pointer; transition: border-color 160ms, box-shadow 160ms; }
:is(.ou-pick__btn, .ou-date__btn):focus-visible { outline: none; border-color: var(--ou-accent-strong); box-shadow: 0 0 0 3px var(--ou-accent-soft); }
.ou-pick__value, .ou-date__value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ou-listbox { right: 0; display: flex; flex-direction: column; gap: 0.125rem; max-height: 15rem; overflow-y: auto; overscroll-behavior: contain; list-style: none; }
.ou-listbox > [role="option"] { display: flex; align-items: center; gap: 0.75rem; min-height: 2.25rem; padding: 0 0.75rem; border-radius: min(var(--ou-r-row), 0.625rem); cursor: pointer; }
.ou-listbox > [role="option"].is-active { background: var(--ou-surface-2); }
.ou-listbox > [role="option"][aria-selected="true"] { font-weight: 500; }
.ou-listbox > [role="option"][aria-selected="true"]::after { content: ""; width: 0.75rem; height: 0.75rem; flex: none; margin-left: auto; background: var(--ou-accent-strong); clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 10%, 37% 72%); }
/* The words of an option sit in one .ou-listbox__label, so marking a few letters never splits the word apart. */
.ou-listbox__label { min-width: 0; }
.ou-listbox mark { padding: 0; margin: 0; background: var(--ou-accent-soft); color: inherit; border-radius: 0.1875rem; }
.ou-listbox__none { padding: 0.5rem 0.75rem; color: var(--ou-ink-3); }
.ou-listbox__group { padding: 0.5rem 0.75rem 0.125rem; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ou-ink-3); }
@media (hover: hover) { :is(.ou-pick__btn, .ou-date__btn):hover { border-color: var(--ou-ink-3); } }

/* Date picker: one month at a time. Today is ringed; the chosen day is solid. */
.ou-date__pop { width: 18.5rem; max-width: calc(100cqw - 2rem); padding: 0.75rem; }
.ou-date__head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.ou-date__head b { font-weight: 500; }
.ou-date__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.125rem; }
.ou-date__grid > span { padding: 0.25rem 0; text-align: center; font-size: 0.6875rem; color: var(--ou-ink-3); }
.ou-date__grid > button { aspect-ratio: 1; padding: 0; border: 0; border-radius: min(var(--ou-r-ctl), 999px); background: none; color: var(--ou-ink); font-size: 0.8125rem; cursor: pointer; }
.ou-date__grid > button.is-out { color: var(--ou-ink-3); }
.ou-date__grid > button.is-today { box-shadow: inset 0 0 0 1.5px var(--ou-line-strong); }
.ou-date__grid > button[aria-pressed="true"] { background: var(--ou-strong); color: var(--ou-on-strong); font-weight: 500; }
@media (hover: hover) { .ou-date__grid > button:not([aria-pressed="true"]):hover { background: var(--ou-surface-2); } }

/* Command bar: a search box of commands over the page. Add ou-command to a <dialog class="ou-modal">. */
.ou-modal.ou-command { width: min(34rem, calc(100vw - 2rem)); margin-top: 12vh; }
.ou-command__search { display: flex; align-items: center; gap: 0.625rem; padding: 0.875rem 1rem; border-bottom: 1px solid var(--ou-line); color: var(--ou-ink-3); }
.ou-command__search input { flex: 1 1 0; min-width: 0; border: 0; background: none; outline: none; color: var(--ou-ink); font-size: 1rem; }
.ou-command__search input:focus-visible { outline: none; }
.ou-command .ou-listbox { position: static; max-height: min(20rem, 50dvh); border: 0; border-radius: 0; background: none; box-shadow: none; animation: none; }

/* Sortable list: drag a row by its grip, or move it with the arrow keys. */
.ou-sortable { display: flex; flex-direction: column; gap: 0.375rem; }
.ou-sortable > li { display: flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0 0.75rem 0 0.25rem; border: 1px solid var(--ou-line); border-radius: min(var(--ou-r-card), 0.875rem); background: var(--ou-surface-solid); }
.ou-sortable__grip { display: grid; place-items: center; width: 2rem; height: 2rem; flex: none; padding: 0; border: 0; border-radius: 0.5rem; background: none; color: var(--ou-ink-3); cursor: grab; touch-action: none; }
.ou-sortable__grip::before { content: ""; width: 0.625rem; height: 0.9375rem; background: radial-gradient(circle, currentColor 1.25px, transparent 1.6px) 0 0 / 0.3125rem 0.3125rem; }
.ou-sortable > li.is-lifted { position: relative; z-index: 2; border-color: var(--ou-accent-strong); box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.55); }
.ou-sortable > li.is-lifted .ou-sortable__grip { cursor: grabbing; color: var(--ou-ink); }
@media (hover: hover) { .ou-sortable__grip:hover { color: var(--ou-ink); background: var(--ou-hover); } }

/* Rolling number: each digit is a column that rolls to its new value. ouParts.count(element, number). */
.ou-odometer { display: inline-flex; height: 1.1em; overflow: hidden; font-size: 2.25rem; line-height: 1.1; font-weight: var(--ou-num-weight); letter-spacing: -0.02em; }
.ou-odometer > span { display: flex; flex-direction: column; translate: 0 calc(var(--d, 0) * -1.1em); transition: translate 700ms var(--ou-ease); }
.ou-odometer > span > i { height: 1.1em; font-style: normal; text-align: center; }
.ou-odometer > b { font-weight: inherit; }
@media (prefers-reduced-motion: reduce) { .ou-odometer > span, .ou-milestones::after, .ou-level::after { transition: none; } }
