/* ==========================================================================
   Kelar (Fokus Target's project platform) — visual system "Senja" (blue hour)

   Round 5c (2026-10-01). After the emerald 3D look ("Zamrud") the user went
   back to the previous style, steered by three references: a blue glass
   investing app (vivid blue, soft gradients, mirror-smooth glass cards), the
   Adobe MAX site (heavy, tightly set headlines, big rounded cards, pill
   buttons) and a dark airline dashboard (a night sidebar where the current
   page is a bright blue pill).

   - Colour: a vivid royal blue leads (links, focus, selection, the primary
     action), on a cool white ground with a soft blue wash. Fokus Target
     orange is the one warm note, for what's current, earned or today. The
     sidebar is night indigo with a faint warm horizon at its foot.
     Deliberately not the RSVP Platform's orange-to-violet sunset.
   - Type: Plus Jakarta Sans for everything (designed in Jakarta); headlines
     extra-bold and tight. JetBrains Mono for codes.
   - Surfaces: white cards with hairlines and soft navy shadows; frosted
     glass only on layers that float or stick, and on the Home header, a blue
     gradient panel with glass cards on it. Buttons, chips and tabs are pills.
   - Motion: short and purposeful. Things rise into place, numbers count,
     finished work celebrates. transform/opacity only; a tiered
     prefers-reduced-motion block at the bottom.
   - Never: animated background blobs, a glow on every button, gradient text,
     sparkles except for real AI features, emoji-heavy copy.

   Round 6b (2026-10-02): two looks. "Orbit" (dark, the default; its block
   follows this one) and "Senja" (light, these values). The theme is the
   data-theme attribute on <html>, set before the first paint from the pref
   "theme" (core/theme.js). Paper documents (.doc-page) always take the light
   values, and printing switches to light for the print.
   ========================================================================== */
:root, [data-theme="light"], .doc-page {
  color-scheme: light;
  /* Design tokens. Documented in docs/design-tokens.md; check with
     `node scripts/check-css-tokens.mjs`. Use var(--…) everywhere below. */

  /* 1. Typography ---------------------------------------------------------- */
  --font-brand: "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;   /* the wordmark */
  --font-display: "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-body: "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  /* type scale (app UI; printed documents keep their own A4 sizes) */
  --fs-3xs: 9.5px; --fs-2xs: 10.5px; --fs-xs: 11.5px; --fs-sm: 12.5px; --fs-md: 13.5px; --fs-base: 14px;
  --fs-lg: 15px; --fs-xl: 18px; --fs-2xl: 20px; --fs-3xl: 26px; --fs-4xl: 30px; --fs-display: 42px; --fs-hero: 64px;
  --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 600; --fw-heavy: 600;
  --lh-none: 1; --lh-tight: 1.1; --lh-snug: 1.3; --lh-normal: 1.4; --lh-base: 1.5;
  --ls-tight: -0.03em; --ls-snug: -0.015em; --ls-wide: 0.02em; --ls-caps: 0.08em; --ls-hero: -0.05em; /* caps = uppercase labels */

  /* 2. Colour: text ---------------------------------------------------------- */
  --ink: #0c0c0e;               /* night navy, 17.8:1 on white */
  --ink-2: #34343a;
  --ink-3: #5f5f68;             /* 5.7:1 on white, 5.2:1 on the ground */
  --ink-4: #8c8c94;             /* hints and faint labels only */
  --on-accent: #ffffff;         /* text and icons on the accent, the CTA, the hero and dark surfaces */
  --link-on-dark: #b9cdff;
  --stage-ink-3: #3d3d46; --stage-ink-4: #55555f; /* quiet text on the Home stage's frosted cards (always light) */
  --stage-ink: #0c0c0e; --stage-ink-2: #34343a; --stage-link: #1a3fbd; --on-stage: #ffffff; --stage-warm-bg: #ffe8f5; --stage-warm-ink: #a3106f; --stage-accent-bg: #e6edff; /* type on frosted panels, and on the gradient itself */
  --night-plum: #670c51; --night-mid: #3a1650; --night-navy: #0e1f3d; --night-deep: #04213d; --night-blue: #0071bd; --night-lime: #e6f79a; --night-star: #fff3b0; --neon-1: #ea5229; --neon-2: #a40758; /* the night city (Home header, sign-in) */
  --px: 0;
  --night-sky: radial-gradient(90% 34% at 0% 0%, var(--night-blue), transparent 72%), linear-gradient(180deg, var(--night-plum) 0%, var(--night-mid) 34%, var(--night-navy) 68%, var(--night-deep) 100%); --neon-grad: linear-gradient(90deg, var(--neon-1), var(--neon-2)); --neon-cyan: #2af0fb;
  --well: #f2f2f4; --well-hover: #e8e8eb;   /* Duo: the grey fill of controls, rows and tiles that sit on a white card */

  /* 3. Colour: surfaces, lines -------------------------------------------- */
  --ground: #eaeaec;            /* the page colour under --backdrop (what shows if the mesh can't paint) */
  --surface: #ffffff;
  --surface-hover: #f1f1f3;     /* row / cell hover */
  --surface-sunken: #f0f0f2;    /* table heads, calendar weekdays, key caps */
  --surface-selected: #e6edff;  /* selected row, chips on white */
  --surface-muted: #e7e7ea;     /* neutral badges, empty tracks, image placeholders */
  --surface-inverse: #0c0c0e;   /* toasts, tooltips */
  --skeleton: #e0e0e3; --skeleton-shine: #f1f1f3;
  --line: rgba(0, 0, 0, 0.07);
  --line-2: rgba(0, 0, 0, 0.12);
  --field-line: rgba(0, 0, 0, 0.13);
  --field-line-strong: #bdbdc4;
  --neutral-300: #cfcfd4; --neutral-400: #9a9aa2; --neutral-500: #6a6a72;
  --track: rgba(0, 0, 0, 0.08);          /* empty progress tracks */
  --mix-bg: #ffffff; --mix-ink: #000000;    /* round 6b: what tints mix into (--c 12% + this) and what tinted text mixes with */
  --seg-track: rgba(0, 0, 0, 0.05);    /* the segmented control's track */
  --glass-col: rgba(255, 255, 255, 0.5);    /* board columns */
  --veil-1: rgba(234, 234, 236, 0.25); --veil-2: rgba(234, 234, 236, 0.75); /* the locked-project veil */
  --btn-shadow: 0 0 0 0 transparent; /* secondary buttons */
  --edge-shade: rgba(0, 0, 0, 0.12);     /* the shadow at a scrolling edge (timelines) */
  --shadow-ink: #000000;                    /* the floor shadow under isometric glass (core/iso.js) */
  --iso-edge: rgba(47, 107, 255, 0.5);      /* the edges of isometric glass on light cards */
  --iso-ghost: rgba(47, 107, 255, 0.32);    /* the edges of an empty (future or missed) cube */
  --btn-light-bg: #ffffff; --btn-light-ink: #0c0c0e; /* the white pill on the Home header */
  --scroll-thumb: rgba(0, 0, 0, 0.2);   /* page scrollbars */
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f5f68' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); /* selects */

  /* 4. Colour: brand and accent ------------------------------------------- */
  --cyan: #22d3ee;
  --blue: #2a78d6;
  --indigo: #4f46e5;
  --teal: #14b8a6;
  --accent: #2459f5;            /* the one accent: links, focus, selection, active controls (5.9:1 on white) */
  --accent-hover: #1c49d6;
  --accent-ink: #1a3fbd;
  --accent-bg: #e6edff;
  --fokus: #ef7d29;             /* Fokus Target logo orange */
  /* Blue hour: sky → royal → indigo. Decoration, progress and the logo;
     white text sits only on the deep end (the hero keeps its text there). */
  --brand-1: #6f9bff; --brand-2: #2f6bff; --brand-3: #ff4fb6;
  /* mind map branches (2026-11-24): eight tones a branch and its lines take, readable as text on white */
  --mm-1: #2459f5; --mm-2: #c81d8e; --mm-3: #0b7f76; --mm-4: #b45309; --mm-5: #6d3fd6; --mm-6: #15803d; --mm-7: #c2410c; --mm-8: #4b5563;
  --grad-brand: linear-gradient(135deg, var(--brand-1), var(--brand-2) 50%, var(--brand-3));
  --grad-brand-x: linear-gradient(90deg, var(--brand-2), var(--brand-3)); /* progress, left to right */
  /* The warm note (Fokus orange): what's current, earned or today (the active page marker, rewards). */
  --warm-1: #ffb3df; --warm-2: #ff4fb6; --warm-3: #e0239f;
  --warm-ink: #a3106f; --warm-bg: #ffe8f5;                 /* 7:1 */
  --grad-warm: linear-gradient(135deg, var(--warm-1), var(--warm-2) 55%, var(--warm-3));
  /* The primary action: royal blue into indigo, white text ≥ 5:1 at both ends. */
  --cta-1: #2f6bff; --cta-2: #2f6bff; --cta-1-hover: #2459f5; --cta-2-hover: #2459f5;
  --grad-cta: linear-gradient(135deg, var(--cta-1), var(--cta-2));
  --grad-cta-hover: linear-gradient(135deg, var(--cta-1-hover), var(--cta-2-hover));
  --cta-shadow: 0 0 0 0 transparent;
  --cta-edge: 0 0 0 0 transparent;
  --grad-soft: linear-gradient(135deg, rgba(47, 107, 255, 0.12), rgba(255, 79, 182, 0.12)); /* icon wells, tints */
  --cta-ink: #2459f5;           /* icons on --grad-soft */

  /* 4b. Glass, the page backdrop and the Home header ------------------------ */
  /* the Home header: deep royal blue where the text sits, opening to sky on the right */
  --hero-grad: linear-gradient(120deg in oklab, #2f6bff, #ff4fb6);
  /* Round 5d (glass): a still blue mesh behind every page, so the translucent
     panels on it read as glass. Static on purpose: nothing drifts. */
  --backdrop: linear-gradient(#eaeaec, #eaeaec);
  --glass: rgba(255, 255, 255, 0.7);
  --glass-strong: #ffffff;
  --glass-line: rgba(0, 0, 0, 0.07);
  --glass-ground: rgba(234, 234, 236, 0.9); /* the floating top bar over scrolling content */
  /* glass panels in the page (cards, tiles, rows): a lit diagonal, a white rim, a blue-tinted lift */
  --glass-card: linear-gradient(#ffffff, #ffffff); /* --ink-3 stays ≥ 4.7:1 on it over the bluest part of the mesh */
  --glass-card-hover: linear-gradient(#ffffff, #ffffff);
  --glass-card-line: rgba(0, 0, 0, 0.05);
  --glass-card-shadow: 0 0 0 0 transparent;
  --glass-field: #ffffff;   /* inputs on glass: light enough to read, still tinted */
  --glass-btn: #ffffff;      /* secondary buttons, chips, the segmented track's pills */
  --glass-btn-hover: #ffffff;
  --glass-overlay: #ffffff; /* dialogs, drawers, menus, ⌘K: the page shows through, frosted */
  --glass-side: linear-gradient(transparent, transparent); /* the floating night sidebar: indigo glass, dense enough for --side-ink-2 at 4.5:1 over the brightest sky */
  --glass-blur-lg: none;
  --glass-sheen: linear-gradient(transparent, transparent); /* the mirror-smooth light across glass on blue */
  --glass-card-blur: none;
  --glass-dark: #0c0c0e;       /* toasts and tooltips */
  --glass-on-blue: rgba(255, 255, 255, 0.2);         /* smoky glass cards on the Home header and sign-in (white text ≥ 4.5:1) */
  --glass-on-blue-line: rgba(255, 255, 255, 0.4);
  --glass-blur: none;
  --glass-blur-sm: none;
  --highlight: 0 0 0 0 transparent; /* the lit top edge of glass */
  --scrim-blur: blur(3px);

  /* 5. Colour: status (text on tint = --x on --x-bg; fills use -solid) ---- */
  --ok: #15803d; --ok-bg: #e4f6ea; --ok-bg-soft: #f0fdf4;
  --ok-strong: #16a34a; --ok-solid: #22c55e; --ok-solid-deep: #059669; --ok-deep: #047857;
  --warn: #8a5a00; --warn-bg: #fff3d1; --warn-bg-soft: #fffdf4;
  --warn-strong: #d97706; --warn-solid: #f59e0b;
  --danger: #c0262d; --danger-bg: #fdebec; --danger-bg-soft: #fff7f7;
  --danger-solid: #ef4444; --danger-solid-soft: #f87171; --danger-deep: #7f1d1d; --danger-on-dark: #fecaca;
  --info: #1d4fb8; --info-bg: #e8effd;
  /* 2026-10-23: one colour per kind of quotation, everywhere it shows (Claim / PO, Actual / Real, single) */
  --kind-claim: #1d4fb8; --kind-claim-bg: #e3ecff; --kind-actual: #b4237a; --kind-actual-bg: #fde6f3; --kind-single: #475569; --kind-single-bg: #eef1f5;
  /* leaderboard medals */
  --medal-gold: #f5c542; --medal-gold-ink: #5b4300; --medal-silver: #d5dbe5; --medal-silver-ink: #3c4760; --medal-bronze: #e8b48a; --medal-bronze-ink: #5a3310;
  /* badge and level tiers (round 5): each tier its own metal; shape changes too (core/points.js) */
  --tier-1a: #ffd2b0; --tier-1b: #e0612f; --tier-1-ink: #4a1a05;                   /* Ember */
  --tier-2a: #f1fbff; --tier-2b: #8cb8d6; --tier-2-ink: #1d3448;                   /* Frost */
  --tier-3a: #ffe9a3; --tier-3b: #d39a10; --tier-3-ink: #503a00;                   /* Solar */
  --tier-4a: #e9fbff; --tier-4b: #7fc8db; --tier-4c: #b7a6ff; --tier-4-ink: #173944; /* Aurora */
  --tier-5a: #fff7fb; --tier-5b: #8fd3ff; --tier-5c: #d3a1ff; --tier-5d: #ff9fc6; --tier-5-ink: #2a1c5c; /* Cosmic */
  /* the level borders (core/tiers.js, 2026-11-28): the flat ring a stack of avatars shows in their place, per band (the
     drawings carry their own colours): bronze, silver, gold, royal, night sky, fire */
  --tb1-a: #ffd9ad; --tb1-b: #b8662a; --tb1-c: #7a3c12;
  --tb2-a: #ffffff; --tb2-b: #9fb1c2; --tb2-c: #6d8296;
  --tb3-a: #fff6c2; --tb3-b: #d49a0c; --tb3-c: #8f5f00;
  --tb4-a: #e8eef8; --tb4-b: #5b21b6; --tb4-c: #2e0f6e;
  --tb5-a: #f3ecff; --tb5-b: #141a52; --tb5-c: #c06cff;
  --tb6-a: #fff1b0; --tb6-b: #ff7417; --tb6-c: #b3130b;
  /* the borders to catch (core/catch.js): the few colours their flat rings need beyond the ones above */
  --ct-blue: #0d99ff; --ct-dawn-a: #7c3aed; --ct-dawn-b: #ec4899; --ct-dawn-c: #fb923c; --ct-ink: #050608;
  /* the "Grand Voyage" borders (core/voyage.js, round 25): straw, rope, the red band, wood, sea, gold, cape, bolts */
  --vy-straw: #f6d56b; --vy-straw-2: #e3ad2c; --vy-straw-edge: #8a5a12; --vy-band: #d62839; --vy-band-edge: #7d0f1c;
  --vy-rope: #e8bd5a; --vy-rope-dark: #9a6a1c; --vy-wood: #a86f32; --vy-wood-dark: #5a3716; --vy-wood-light: #d9a368;
  --vy-sea: #2aa6de; --vy-sea-2: #8fdcff; --vy-gold: #f2c230; --vy-gold-dark: #8a5d00; --vy-gold-light: #fff3b8;
  --vy-cape: #c91f32; --vy-cape-dark: #7a0d1a; --vy-bolt: #ff3b4e; --vy-bolt-core: #2a0a10; --vy-gem: #e11d48;
  /* the "Rossoneri" quest border (core/rossoneri.js): the red and the black of the stripes; its gold is the voyage set's */
  --rn-red: #e0162b; --rn-red-dark: #7a0a16; --rn-black: #121217;
  /* the "Golden Snitch" border (core/wizard.js): scarlet, the snitch's wings, the wand's sparks; its gold and wood are the voyage set's */
  --hp-scarlet: #a8112b; --hp-scarlet-dark: #5a0714; --hp-wing: #f6f2e3; --hp-wing-edge: #8d8563; --hp-spark: #d9f0ff; --hp-spark-glow: #7cc4ff;

  /* 6. Colour: sidebar (night indigo, a warm horizon at the foot, the current page a blue pill) */
  --side-bg: #0e1f3d;
  --side-bg-2: #04213d;
  --side-grad: linear-gradient(#eaeaec, #eaeaec);
  --side-glow: linear-gradient(transparent, transparent);
  --side-panel: #1c1a45;
  --side-ink: #ddd6ee;          /* 10:1 */
  --side-ink-2: #b3a9cf;        /* ≥ 4.8:1 on the sidebar glass, even over the sky */
  --side-ink-strong: #ffffff;
  --side-hover: rgba(255, 255, 255, 0.08);
  --side-on: rgba(255, 255, 255, 0.13);
  --side-line: rgba(255, 255, 255, 0.12);

  /* 7. Colour: charts (the dataviz skill's validated palette) -------------- */
  --viz-surface: #ffffff;
  --viz-grid: #e3e6ef;
  --viz-baseline: #c2c8d6;
  --viz-1: #2a78d6; --viz-2: #eb6834; --viz-3: #1baf7a; --viz-4: #eda100;
  --viz-5: #e87ba4; --viz-6: #008300; --viz-7: #4a3aa7; --viz-8: #e34948;
  --viz-good: #0ca30c; --viz-warning: #fab219; --viz-critical: #d03b3b;
  --seq-100: #cde2fb; --seq-200: #9ec5f4; --seq-300: #6da7ec; --seq-400: #3987e5; --seq-500: #256abf; --seq-600: #184f95; --seq-700: #0d366b;

  /* 8. Colour: printed documents (quotation / PR / CA on A4 paper) --------- */
  --doc-ink: #111111; --doc-ink-2: #333333; --doc-ink-3: #555555;
  --doc-line: #c9c9c9; --doc-line-strong: #b9b9b9; --doc-rule: #dddddd;
  --doc-head-bg: #fde7d6; --doc-section-bg: #f6f6f6; --doc-total-bg: #fff6ee; --doc-pkg-bg: #fff9c4; --doc-hl-bg: #fcd3b0; --doc-quo-head: #7ab648; --doc-quo-line: #5e9634; --doc-tele-band: #92d050; --doc-tele-mark: #ffff00; --doc-tele-title: #9c4a0b; --doc-cp-title: #38761d; --doc-cp-band: #6aa84f; --doc-cp-pkg: #d9ead3; --doc-chg-bg: #fff3a3;
  --doc-mark: rgba(200, 30, 30, 0.13); --doc-mark-ink: #b42318; --doc-ok: #15803d;
  --doc-ag-band: #1f2a3c; --doc-ag-band-ink: #ffffff; --doc-ag-ses: #edf1f6; --doc-ag-brk: #f6f7f9; --doc-ag-line: #e1e5eb;

  /* 9. Spacing (4px grid) ---------------------------------------------------- */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-12: 48px;

  /* 9b. Control sizes: buttons, inputs, chips and pills line up in rows */
  --ctl-h: 36px; --ctl-h-sm: 30px; --ctl-h-xs: 24px; --pill-h: 22px;
  --line-hover: rgba(47, 107, 255, 0.5);   /* control border on hover */
  --line-accent: rgba(47, 107, 255, 0.34);  /* border of a selected chip */
  --line-danger: rgba(192, 38, 45, 0.35);
  --tint-hover: rgba(47, 107, 255, 0.08);   /* menu / option hover */
  --tint-ghost: rgba(0, 0, 0, 0.05);    /* ghost button hover, segmented track */
  --tint-accent: rgba(47, 107, 255, 0.18);  /* text selection, drop zones */
  /* 2026-11-25: the Library's reader (views/reader-ui.js): its own page colours, the same in the light and dark looks */
  --read-paper: #f7f5f0; --read-paper-ink: #1d1d1f; --read-sepia: #f2e6cf; --read-sepia-ink: #4b3b26; --read-night: #111113; --read-night-ink: #d9d9de; --read-chrome: rgba(255, 255, 255, 0.86); --read-chrome-night: rgba(28, 28, 31, 0.86); --read-serif: "Iowan Old Style", "Palatino Linotype", Charter, Georgia, serif; --read-lh: 1.62; --read-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --read-warm: #17130e; --read-warm-ink: #e6d3b3; --read-shade: #000; --read-easy-ls: 0.012em; --read-easy-ws: 0.08em; --read-n-surface: #1f1f23; --read-n-sunken: #18181b; --read-n-muted: #2a2a2f; --read-n-ink: #f5f5f3; --read-n-ink2: #cfcfd2; --read-n-ink3: #a1a1a8; --read-n-line: rgba(255, 255, 255, 0.08); --read-n-line2: rgba(255, 255, 255, 0.14); --read-n-seg: rgba(255, 255, 255, 0.05); --read-n-accentbg: rgba(47, 107, 255, 0.2);
  --tone-violet: #7c3aed; --tone-teal: #0f766e; /* extra pill tones (with ok / warn / danger / info / neutral) */
  --tone-blue: #2f6bff; --tone-indigo: #4f46e5; --tone-sky: #0284c7; --tone-amber: #d97706; --tone-rose: #e11d48; /* round 6: icon tones by meaning (all ≥ 3:1 on white) */

  /* 10. Radius ------------------------------------------------------------- */
  --r-2xs: 4px; --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 20px; --r-xl: 26px; --r-pill: 999px;

  /* 11. Elevation (shadows tinted with the navy ink, never grey) ----------- */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);          /* resting cards, controls */
  --shadow-md: 0 12px 28px -16px rgba(0, 0, 0, 0.22);  /* hovered cards */
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.06), 0 30px 64px -18px rgba(0, 0, 0, 0.28);   /* menus, dialogs, drawers */
  --slab: 0 0 0 0 transparent;  /* a faint bottom edge on resting cards and buttons */
  --pop: 0 16px 36px -20px rgba(0, 0, 0, 0.28); /* a glass panel lifted toward you (hover, dialogs) */
  --scrim: rgba(12, 12, 14, 0.32);                                                          /* behind dialogs and drawers, frosted by --scrim-blur */
  --ring: 0 0 0 3px rgba(47, 107, 255, 0.3);

  /* 12. Motion ------------------------------------------------------------- */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);    /* entrances: quick start, soft landing */
  --ease-emph: cubic-bezier(0.16, 1, 0.3, 1);    /* bigger arrivals: sections rising into place */
  --ease-in: cubic-bezier(0.4, 0, 1, 1);         /* exits: leave quickly */
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1); /* only small confirmations (a tick, a drop landing) */
  --ease-pop: cubic-bezier(0.34, 1.22, 0.64, 1);   /* dialogs and menus popping up: a slight overshoot */
  --ease-std: cubic-bezier(0.4, 0, 0.2, 1);      /* state changes in place */
  --t-fast: 120ms; --t-med: 180ms; --t-slow: 280ms; --t-enter: 460ms; /* hover/press · open/close · larger moves · arrivals */

  /* 13. Layers: page-level stacking order. Small numbers (1–5) inside one
     component (sticky table heads, gantt labels) stay local on purpose. -- */
  --z-sticky: 30; --z-scrim: 35; --z-sidebar: 40; --z-drawer-back: 190; --z-drawer: 191; --z-modal: 200;
  --z-palette: 250; --z-popover: 300; --z-suggest: 320; --z-toast: 400; --z-loadbar: 450; --z-drag: 500; --z-tooltip: 600; --z-skip: 1000;

  /* 14. Layout -------------------------------------------------------------- */
  --mx: 50%; --my: 0%; --tx: 90%; --ty: 5%; /* set by app.js: the pointer on a stage, the light / dark button */
  --side-w: 256px;
  --top-h: 76px;
  /* 2026-10-28: the itinerary's own colours (the printed PDF and the shared plan: always on light paper) */
  --trip-sky: #2f6bff; --trip-sky-soft: #e8efff; --trip-sun: #f59f00; --trip-sun-soft: #fff4d6; --trip-coral: #f0563f; --trip-coral-soft: #ffeae6;
  --trip-mint: #0ca678; --trip-mint-soft: #e0f6ee; --trip-grape: #7048e8; --trip-grape-soft: #efe9ff; --trip-ink: #14213d; --trip-ink-2: #4a5470;
  --trip-paper: #ffffff; --trip-cream: #fbf8f2; --trip-line: #e3e6ee; --trip-white: #ffffff;
  /* 2026-10-28: Fokus Target tools, in each one's own colours (from its logo) */
  --tool-simak: #6a4cf5; --tool-simak-soft: #f1edff; --tool-tata: #e8491d; --tool-tata-soft: #fbefe7; --tool-catat: #0fa97f; --tool-catat-soft: #e2f8f1;
  --tool-rsvp: #ef4a85; --tool-rsvp-soft: #ffeef3; --tool-showdesk: #f2603f; --tool-showdesk-soft: #fff0e9; --tool-dark: #17150f;
}

/* --------------------------------------------------------------------------
   "Orbit" (round 6b, 2026-10-02): the dark look, and the default.
   Deep space navy behind everything, glass panels lit along their top edge,
   violet leading (the primary action, links, focus), aurora cyan for progress
   and data, Fokus orange still the one warm note. Contrast is worked out on
   the card glass over the darkest ground and over the brightest glow:
   ink-3 6.6:1 / 5.3:1, accent 6.8:1 / 5.5:1, white on the CTA ends 4.9:1
   and 5.0:1, status text on its tint at least 6.4:1.
   Only colours change here; sizes, type and motion are shared.
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
  color-scheme: dark;

  --well: #26262b; --well-hover: #303036;
  /* 6b. the sidebar's own ground (the phone drawer) */
  --side-bg: #0e1f3d; --side-bg-2: #04213d;

  /* 2. text */
  --ink: #f5f5f3;
  --ink-2: #cfcfd2;
  --ink-3: #a1a1a8;
  --ink-4: #73737b;             /* hints and faint labels only (3.7:1) */
  --on-accent: #ffffff;
  --link-on-dark: #b9cdff;
  --stage-ink-3: #3d3d46; --stage-ink-4: #55555f; /* quiet text on the Home stage's frosted cards (always light) */

  /* 3. surfaces, lines */
  --ground: #111113;
  --surface: #1f1f23;
  --surface-hover: #26262b;
  --surface-sunken: #18181b;
  --surface-selected: #1f2a4d;
  --surface-muted: #2a2a2f;
  --surface-inverse: #2e2e34;   /* tooltips and code: a lighter night under white text (13:1) */
  --skeleton: #1c1c20; --skeleton-shine: #26262b;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --field-line: rgba(255, 255, 255, 0.16);
  --field-line-strong: #55555e;
  --neutral-300: #3c3c44; --neutral-400: #63636c; --neutral-500: #9090a0;
  --track: rgba(255, 255, 255, 0.08);
  --mix-bg: #1f1f23; --mix-ink: #ffffff;
  --seg-track: rgba(255, 255, 255, 0.05);
  --glass-col: rgba(255, 255, 255, 0.03);
  --veil-1: rgba(17, 17, 19, 0.35); --veil-2: rgba(17, 17, 19, 0.82);
  --btn-shadow: 0 0 0 0 transparent;
  --edge-shade: rgba(0, 0, 0, 0.5);
  --shadow-ink: #000000;
  --iso-edge: rgba(255, 255, 255, 0.55);
  --iso-ghost: rgba(255, 255, 255, 0.26);
  --btn-light-bg: #ffffff; --btn-light-ink: #0c0c0e;
  --scroll-thumb: rgba(255, 255, 255, 0.16);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1a8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

  /* 4. brand and accent */
  --cyan: #3ee6ff; --blue: #4d8dff; --indigo: #8b8dff; --teal: #2ee6c8;
  --accent: #86a8ff;
  --accent-hover: #a3bdff;
  --accent-ink: #c4d4ff;
  --accent-bg: rgba(47, 107, 255, 0.2);
  --brand-1: #8fb0ff; --brand-2: #3d76ff; --brand-3: #ff63bf;   /* aurora: cyan → indigo → violet */
  --mm-1: #86a8ff; --mm-2: #ff7ccb; --mm-3: #4fd1c5; --mm-4: #fbbf24; --mm-5: #b79bff; --mm-6: #4ade80; --mm-7: #fb923c; --mm-8: #a3b1c6;
  --warm-ink: #ff9ad6; --warm-bg: rgba(255, 79, 182, 0.16);
  --cta-1: #2f6bff; --cta-2: #2f6bff; --cta-1-hover: #4a7dff; --cta-2-hover: #4a7dff;
  --cta-shadow: 0 0 0 0 transparent;
  --cta-edge: 0 0 0 0 transparent;
  --grad-soft: linear-gradient(135deg, rgba(47, 107, 255, 0.2), rgba(255, 79, 182, 0.18));
  --cta-ink: #9db8ff;

  /* 4b. glass, the backdrop, the Home header */
  --hero-grad: linear-gradient(120deg in oklab, #2f6bff, #ff4fb6);
  /* deep space with still nebula light: indigo up left, violet up right, a cyan whisper, nothing moves */
  --backdrop: linear-gradient(#111113, #111113);
  --glass: rgba(31, 31, 35, 0.7);
  --glass-strong: #1f1f23;
  --glass-line: rgba(255, 255, 255, 0.08);
  --glass-ground: rgba(17, 17, 19, 0.9);
  --glass-card: linear-gradient(#1b1b1f, #1b1b1f);
  --glass-card-hover: linear-gradient(#222226, #222226);
  --glass-card-line: rgba(255, 255, 255, 0.06);
  --glass-card-shadow: 0 0 0 0 transparent;
  --glass-field: #26262b;
  --glass-btn: #26262b;
  --glass-btn-hover: #2f2f35;
  --glass-overlay: #1f1f23;
  --glass-side: linear-gradient(transparent, transparent);
  --glass-sheen: linear-gradient(transparent, transparent);
  --glass-dark: #2e2e34;
  --glass-on-blue: rgba(255, 255, 255, 0.16);
  --glass-on-blue-line: rgba(255, 255, 255, 0.3);
  --highlight: 0 0 0 0 transparent;

  /* 5. status: light text on a tint of its own colour */
  --ok: #5cefb4; --ok-bg: rgba(46, 230, 168, 0.14); --ok-bg-soft: rgba(46, 230, 168, 0.07);
  --ok-strong: #4ade80;
  --warn: #ffcb6b; --warn-bg: rgba(255, 176, 32, 0.14); --warn-bg-soft: rgba(255, 176, 32, 0.07);
  --warn-strong: #ffb547;
  --danger: #ff8fa3; --danger-bg: rgba(255, 77, 109, 0.15); --danger-bg-soft: rgba(255, 77, 109, 0.07);
  --danger-solid: #ff4d6d; --danger-solid-soft: #ff7a93; --danger-on-dark: #ffc2cc;
  --info: #8cc8ff; --info-bg: rgba(77, 163, 255, 0.14);
  --kind-claim: #8cc8ff; --kind-claim-bg: rgba(77, 163, 255, 0.16); --kind-actual: #ff8ccf; --kind-actual-bg: rgba(255, 92, 180, 0.16); --kind-single: #c3cad6; --kind-single-bg: rgba(195, 202, 214, 0.12);

  /* 6. sidebar: a darker night than the page, the current page a violet pill */
  --side-ink: #ddd6ee; --side-ink-2: #b3a9cf; --side-ink-strong: #ffffff;
  --side-panel: #1c1a45;
  --side-hover: rgba(255, 255, 255, 0.08); --side-on: rgba(255, 255, 255, 0.13); --side-line: rgba(255, 255, 255, 0.12);
  --side-glow: linear-gradient(transparent, transparent);

  /* 7. charts: the same eight hues stepped for a dark surface (validated with the
     dataviz skill on #141a2e: band, chroma, CVD 8.4, normal 19.3, all ≥ 3:1) */
  --viz-surface: #1b1b1f; --viz-grid: #2a2a2f; --viz-baseline: #45454d;
  --viz-1: #3987e5; --viz-2: #d95926; --viz-3: #199e70; --viz-4: #c98500;
  --viz-5: #d55181; --viz-6: #008300; --viz-7: #9085e9; --viz-8: #e66767;

  /* 9b. lines and tints on controls */
  --line-hover: rgba(134, 168, 255, 0.5);
  --line-accent: rgba(134, 168, 255, 0.42);
  --line-danger: rgba(255, 77, 109, 0.45);
  --tint-hover: rgba(134, 168, 255, 0.12);
  --tint-ghost: rgba(255, 255, 255, 0.06);
  --tint-accent: rgba(134, 168, 255, 0.24);
  --tone-violet: #b892ff; --tone-teal: #2ee6c8;
  --tone-blue: #86a8ff; --tone-indigo: #9b9cff; --tone-sky: #4cc9ff; --tone-amber: #ffb547; --tone-rose: #ff6b8e;

  /* 11. elevation: black shadows, a lit top edge */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 36px -18px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.4), 0 30px 64px -18px rgba(0, 0, 0, 0.8);
  --slab: 0 0 0 0 transparent;
  --pop: 0 16px 36px -20px rgba(0, 0, 0, 0.8);
  --scrim: rgba(0, 0, 0, 0.55);
  --ring: 0 0 0 3px rgba(134, 168, 255, 0.42);
  /* 2026-10-28: the itinerary's own colours (the printed PDF and the shared plan: always on light paper) */
  --trip-sky: #2f6bff; --trip-sky-soft: #e8efff; --trip-sun: #f59f00; --trip-sun-soft: #fff4d6; --trip-coral: #f0563f; --trip-coral-soft: #ffeae6;
  --trip-mint: #0ca678; --trip-mint-soft: #e0f6ee; --trip-grape: #7048e8; --trip-grape-soft: #efe9ff; --trip-ink: #14213d; --trip-ink-2: #4a5470;
  --trip-paper: #ffffff; --trip-cream: #fbf8f2; --trip-line: #e3e6ee; --trip-white: #ffffff;
  --tool-simak: #9a84ff; --tool-simak-soft: rgba(122, 92, 255, 0.16); --tool-tata: #ff7a50; --tool-tata-soft: rgba(232, 73, 29, 0.16); --tool-catat: #4ff0bd; --tool-catat-soft: rgba(79, 240, 189, 0.12);
  --tool-rsvp: #ff7aa6; --tool-rsvp-soft: rgba(255, 77, 141, 0.16); --tool-showdesk: #ff8a6a; --tool-showdesk-soft: rgba(255, 79, 123, 0.15); --tool-dark: #17150f;
}

* { box-sizing: border-box; }
html { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; } /* round 6b: slim scrollbars in the theme's colour */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); font-size: var(--fs-base); line-height: var(--lh-base); color: var(--ink); background: var(--ground);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; min-height: 100vh; overflow-x: hidden;
}
/* The blue mesh behind every page (the glass shows it through): fixed, still, and on its own layer so scrolling stays smooth. */
body::before { content: ""; position: fixed; inset: 0; background: var(--backdrop); pointer-events: none; z-index: -1; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-optical-sizing: auto; letter-spacing: var(--ls-snug); margin: 0; color: var(--ink); }
h1 { font-size: var(--fs-3xl); font-weight: var(--fw-bold); line-height: var(--lh-snug); }
h2 { font-size: var(--fs-xl); font-weight: var(--fw-bold); }
h3 { font-size: var(--fs-lg); font-weight: var(--fw-bold); }
h4 { font-size: var(--fs-md); font-weight: var(--fw-bold); }
p { margin: 0; }
code, .mono { font-family: var(--font-mono); font-size: 0.92em; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-4) 0; }
::selection { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.i { width: 1.15em; height: 1.15em; flex: 0 0 auto; vertical-align: -0.2em; }
.card-head h3 .i, h3 > .i { width: 17px; height: 17px; color: var(--accent); }
/* Round 6, colour tones: an icon's meaning picks its tone (time sky, money teal, creative violet,
   people indigo, rewards and goals amber, warnings rose, everything else royal blue). Card heads show
   it in a soft well, stat tiles as a solid pill. Blue stays the lead; the tones only mark what a card is about. */
.i[data-i=calendar], .i[data-i=clock], .i[data-i=timeline], .i[data-i=plane], .i[data-i=calStar], .i[data-i=bed] { --tone: var(--tone-sky); }
.i[data-i=wallet], .i[data-i=receipt], .i[data-i=money], .i[data-i=chart], .i[data-i=handshake], .i[data-i=scale] { --tone: var(--tone-teal); }
.i[data-i=palette], .i[data-i=image], .i[data-i=camera], .i[data-i=mic], .i[data-i=presentation], .i[data-i=penNib], .i[data-i=video], .i[data-i=slides] { --tone: var(--tone-violet); }
.i[data-i=users], .i[data-i=people], .i[data-i=idCard], .i[data-i=headset], .i[data-i=chat] { --tone: var(--tone-indigo); }
.i[data-i=trophy], .i[data-i=target], .i[data-i=zap], .i[data-i=bolt], .i[data-i=star], .i[data-i=gift], .i[data-i=flag], .i[data-i=crown], .i[data-i=flame], .i[data-i=gem], .i[data-i=ticket] { --tone: var(--tone-amber); }
.i[data-i=alert], .i[data-i=trash], .i[data-i=lock] { --tone: var(--tone-rose); }
.card-head h3 > .i { width: 30px; height: 30px; flex: 0 0 30px; padding: 7px; border-radius: var(--r-sm); color: var(--tone, var(--tone-blue)); background: color-mix(in srgb, var(--tone, var(--tone-blue)) 11%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone, var(--tone-blue)) 16%, transparent); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.skip { position: absolute; left: 8px; top: -60px; z-index: var(--z-skip); background: var(--surface); padding: 8px 12px; border-radius: var(--r-xs); box-shadow: var(--shadow-md); }
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--ink-3); }
.faint { color: var(--ink-4); }
.small { font-size: var(--fs-sm); }
.tiny { font-size: var(--fs-xs); }
.strong { font-weight: var(--fw-bold); }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.grow { flex: 1 1 auto; min-width: 0; }
.gap-4 { gap: var(--sp-1); } .gap-8 { gap: var(--sp-2); } .gap-12 { gap: var(--sp-3); } .gap-16 { gap: var(--sp-4); } .gap-24 { gap: var(--sp-6); }
.mt-4 { margin-top: var(--sp-1); } .mt-8 { margin-top: var(--sp-2); } .mt-12 { margin-top: var(--sp-3); } .mt-16 { margin-top: var(--sp-4); } .mt-24 { margin-top: var(--sp-6); }
.mb-4 { margin-bottom: var(--sp-1); } .mb-8 { margin-bottom: var(--sp-2); } .mb-12 { margin-bottom: var(--sp-3); } .mb-16 { margin-bottom: var(--sp-4); } .mb-24 { margin-bottom: var(--sp-6); }
.grid { display: grid; gap: var(--sp-4); align-items: start; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
body.side-collapsed .shell { grid-template-columns: 72px minmax(0, 1fr); }
/* The sidebar floats: a panel of night glass inset from the window's edge, the blue mesh tinting it
   at the rim. Opaque enough that its text keeps ≥ 7:1. */
.side {
  position: sticky; top: 12px; height: calc(100vh - 24px); margin: 12px 0 12px 12px; border-radius: var(--r-xl); overflow-y: auto; overflow-x: hidden;
  background: var(--side-glow), var(--glass-side); -webkit-backdrop-filter: var(--glass-blur-lg); backdrop-filter: var(--glass-blur-lg);
  color: var(--side-ink); display: flex; flex-direction: column; z-index: var(--z-sidebar); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
  border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 30px 60px -30px rgba(10, 14, 36, 0.65), 0 2px 6px rgba(10, 14, 36, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 18px 16px 14px; position: relative; color: inherit; text-decoration: none !important; }
.brand-mark { width: 36px; height: 36px; flex: 0 0 36px; border-radius: var(--r-sm); box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--brand-2) 80%, transparent); transition: translate var(--t-slow) var(--ease-spring); }
.brand:hover .brand-mark { translate: 0 -2px; }
.brand-text { line-height: var(--lh-tight); min-width: 0; }
/* the wordmark: extra-bold and tight, set in the sidebar and on sign-in */
.wordmark { font-family: var(--font-brand); font-weight: var(--fw-heavy); letter-spacing: var(--ls-snug); line-height: var(--lh-none); }
.brand-text b { display: block; color: var(--on-accent); font-size: var(--fs-2xl); margin-bottom: 3px; }
.brand-text span { font-size: var(--fs-xs); color: var(--side-ink-2); }
body.side-collapsed .brand-text, body.side-collapsed .nav-label, body.side-collapsed .nav-group-title, body.side-collapsed .side-search, body.side-collapsed .nav-count, body.side-collapsed .side-foot .who { display: none; }
.side-search { margin: 2px 12px 10px; position: relative; }
.side-search input { width: 100%; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08); color: var(--side-ink-strong); border-radius: var(--r-sm); padding: 8px 10px 8px 32px; font: inherit; font-size: var(--fs-md); }
.side-search input::placeholder { color: var(--side-ink-2); }
.side-search svg { position: absolute; left: 10px; top: 50%; translate: 0 -50%; width: 15px; height: 15px; color: var(--side-ink-2); }
.side-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--side-panel); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--r-md); padding: 6px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4); z-index: 5; max-height: 360px; overflow: auto; }
.side-results a { display: block; padding: 7px 9px; border-radius: var(--r-xs); color: var(--side-ink-strong); font-size: var(--fs-md); }
.side-results a:hover, .side-results a.on { background: rgba(255, 255, 255, 0.08); text-decoration: none; }
.nav { padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; }
.nav-group-title { display: flex; align-items: center; justify-content: space-between; margin: 12px 8px 4px; font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--side-ink-2); cursor: pointer; user-select: none; background: none; border: 0; padding: 0; width: calc(100% - 16px); font-family: inherit; }
.nav-group-title svg { width: 12px; height: 12px; transition: rotate var(--t-fast); }
.nav-group.closed .nav-group-title svg { rotate: -90deg; }
.nav-group.closed .nav-items { display: none; }
/* the icon-only sidebar has no group titles to open a folded group with: show every icon there */
@media (min-width: 901px) { body.side-collapsed .nav-group.closed .nav-items { display: revert; } }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--side-ink); font-size: var(--fs-md); font-weight: var(--fw-medium); position: relative; transition: background var(--t-fast), color var(--t-fast); }
.nav-item:hover { background: var(--side-hover); color: var(--on-accent); text-decoration: none; }
/* the current page: a blue pill, like a lit key on the night sidebar */
.nav-item.on { background: var(--grad-cta); color: var(--on-accent); box-shadow: 0 10px 20px -12px color-mix(in srgb, var(--cta-1) 90%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.nav-item.on .nav-div { background: rgba(255, 255, 255, 0.2); color: var(--on-accent); box-shadow: none; }
.nav-item svg { width: 18px; height: 18px; flex: 0 0 18px; opacity: 0.85; }
.nav-item.on svg { opacity: 1; }
.nav-dot { width: 9px; height: 9px; border-radius: var(--r-2xs); flex: 0 0 9px; margin: 0 4px; }
/* a division in the sidebar: its icon on a tile of its colour */
.nav-div { width: 22px; height: 22px; flex: 0 0 22px; margin: 0 -2px; border-radius: var(--r-xs); display: grid; place-items: center; background: color-mix(in srgb, var(--c) 30%, transparent); color: color-mix(in srgb, var(--c) 40%, white); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); }
.nav-item .nav-div svg, .side-results .nav-div svg { width: 13px; height: 13px; flex: none; opacity: 1; }
.side-results .nav-div { width: 18px; height: 18px; flex-basis: 18px; margin: 0; }
.nav-count { margin-left: auto; font-size: var(--fs-xs); color: var(--side-ink-2); background: rgba(255, 255, 255, 0.06); padding: 1px 7px; border-radius: var(--r-pill); }
.nav-count.hot { background: rgba(239, 68, 68, 0.2); color: var(--danger-on-dark); }
.side-foot { border-top: 1px solid var(--side-line); padding: 10px 12px; display: flex; align-items: center; gap: 10px; position: relative; }
.side-foot .who { line-height: var(--lh-tight); min-width: 0; }
.side-foot .who b { color: var(--on-accent); font-size: var(--fs-md); display: block; }
.side-foot .who span { font-size: var(--fs-xs); color: var(--side-ink-2); }
.side-foot button { background: none; border: 0; color: inherit; padding: 0; cursor: pointer; display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; }

.main { min-width: 0; display: flex; flex-direction: column; }
/* The top bar floats too: a frosted strip with a white rim; pages scroll under it. */
.topbar {
  position: sticky; top: 12px; z-index: var(--z-sticky); height: calc(var(--top-h) - 4px); margin: 12px var(--sp-6) 0 var(--sp-5); display: flex; align-items: center; gap: 10px; padding: 0 var(--sp-3) 0 var(--sp-2);
  border-radius: var(--r-lg); background: var(--glass-ground); -webkit-backdrop-filter: var(--glass-blur-lg); backdrop-filter: var(--glass-blur-lg); border: 1px solid var(--glass-card-line); box-shadow: var(--glass-card-shadow);
}
.top-title { min-width: 0; display: flex; align-items: center; gap: 8px; flex: 1 1 auto; }
.top-search { flex: 0 0 auto; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: var(--fs-md); color: var(--ink-3); min-width: 0; overflow: hidden; white-space: nowrap; }
.crumbs > * { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.crumbs > a { flex: 0 1 auto; max-width: 220px; }
.crumbs .sep { flex: 0 0 auto; }
.crumbs a { color: var(--ink-3); }
.crumbs b { color: var(--ink); font-weight: var(--fw-bold); }
.crumbs .sep { color: var(--ink-4); }
.top-search { margin-left: auto; display: flex; align-items: center; gap: 8px; background: var(--glass-btn); border: 1px solid var(--glass-card-line); border-radius: var(--r-pill); padding: 7px 14px; min-width: 280px; color: var(--ink-3); cursor: pointer; font: inherit; font-size: var(--fs-md); box-shadow: var(--shadow-sm), var(--highlight); }
.top-search:hover { border-color: var(--line-hover); background: var(--glass-btn-hover); }
.top-search svg { width: 16px; height: 16px; }
.kbd { font-family: var(--font-mono); font-size: var(--fs-xs); padding: 1px 6px; border-radius: var(--r-xs); border: 1px solid var(--line-2); background: var(--surface-sunken); color: var(--ink-3); margin-left: auto; }
.content { padding: var(--sp-5) var(--sp-6) 60px; width: 100%; max-width: 1560px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-4); flex-wrap: wrap; }
.page-head .sub { color: var(--ink-3); margin-top: 4px; font-size: var(--fs-md); }
.btn.menu-btn { display: none; }
@media (max-width: 720px) { .hide-sm { display: none !important; } }
@media (max-width: 900px) {
  .shell, body.side-collapsed .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 8px; top: 8px; bottom: 8px; height: auto; margin: 0; width: 280px; translate: calc(-100% - 16px) 0; transition: translate var(--t-slow) var(--ease-emph); box-shadow: 0 0 60px rgba(0, 0, 0, 0.4); }
  body.side-open .side { translate: 0 0; }
  body.side-collapsed .brand-text, body.side-collapsed .nav-label, body.side-collapsed .nav-group-title, body.side-collapsed .side-search, body.side-collapsed .nav-count { display: revert; }
  .btn.menu-btn { display: inline-flex; }
  .topbar { margin: 8px 8px 0; top: 8px; padding: 0 var(--sp-2); }
  .top-search { min-width: 0; padding: 7px; }
  .top-search span, .top-search .kbd { display: none; }
  .content { padding: 16px 16px 60px; }
  .scrim { position: fixed; inset: 0; background: var(--scrim); -webkit-backdrop-filter: var(--scrim-blur); backdrop-filter: var(--scrim-blur); z-index: var(--z-scrim); }
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); height: var(--ctl-h); padding: 0 var(--sp-4); border-radius: var(--r-pill); border: 1px solid var(--glass-card-line);
  background: var(--glass-btn); color: var(--ink); font: inherit; font-size: var(--fs-md); font-weight: var(--fw-semibold); cursor: pointer; white-space: nowrap; text-decoration: none !important;
  transition: background var(--t-fast) var(--ease-std), border-color var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std), box-shadow var(--t-fast) var(--ease-std), scale var(--t-fast) var(--ease-out); box-shadow: var(--shadow-sm); user-select: none;
}
.btn:hover { border-color: var(--line-hover); background: var(--glass-btn-hover); }
.btn:not(.btn-ghost):not(.btn-primary):not(.btn-glass):not(.btn-light) { box-shadow: var(--btn-shadow); }
.btn:focus-visible, .chip:focus-visible, .seg button:focus-visible, .link-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:active:not(:disabled) { scale: 0.98; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; flex: 0 0 16px; }
/* The primary action: a royal-blue pill into indigo with a lit top edge; it rises a hair on hover
   and settles when pressed. One per screen area. */
.btn-primary { background: var(--grad-cta); color: var(--on-accent); border-color: transparent; box-shadow: var(--cta-shadow), var(--cta-edge); transition: background var(--t-fast) var(--ease-std), box-shadow var(--t-fast) var(--ease-std), translate var(--t-fast) var(--ease-out), scale var(--t-fast) var(--ease-out); }
.btn-primary:hover { background: var(--grad-cta-hover); color: var(--on-accent); border-color: transparent; translate: 0 -1px; box-shadow: var(--cta-shadow), 0 14px 24px -14px color-mix(in srgb, var(--cta-1) 85%, transparent), var(--cta-edge); }
.btn-primary:active:not(:disabled) { translate: 0 1px; scale: 1; box-shadow: 0 1px 2px rgba(23, 37, 120, 0.3), inset 0 2px 3px rgba(0, 0, 0, 0.22); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn-ghost:hover { background: var(--glass-btn); border-color: transparent; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--line-danger); }
.btn-ok { background: var(--ok); color: var(--on-accent); border-color: var(--ok); }
.btn-ok:hover { background: var(--ok-deep); border-color: var(--ok-deep); }
.btn-sm { height: var(--ctl-h-sm); padding: 0 var(--sp-3); font-size: var(--fs-sm); border-radius: var(--r-pill); }
.btn-xs { height: var(--ctl-h-xs); padding: 0 var(--sp-2); font-size: var(--fs-sm); border-radius: var(--r-pill); gap: var(--sp-1); }
.btn-xs svg { width: 13px; height: 13px; }
.btn-icon { width: var(--ctl-h); padding: 0; }
.btn-icon.btn-sm { width: var(--ctl-h-sm); }
.btn-icon.btn-xs { width: var(--ctl-h-xs); }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--r-pill) 0 0 var(--r-pill); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--r-pill) var(--r-pill) 0; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; font-weight: var(--fw-semibold); }
.link-btn:hover { text-decoration: underline; }
.link-btn.tiny { font-size: var(--fs-xs); } .link-btn.small { font-size: var(--fs-sm); } /* `font: inherit` above would undo these */

/* segmented control */
.seg { display: inline-flex; background: var(--seg-track); border: 1px solid var(--glass-card-line); -webkit-backdrop-filter: var(--glass-blur-sm); backdrop-filter: var(--glass-blur-sm); box-shadow: inset 0 1px 2px rgba(15, 22, 48, 0.06); border-radius: var(--r-pill); padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; transition: background var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std), box-shadow var(--t-fast) var(--ease-std); font: inherit; font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--ink-3); height: calc(var(--ctl-h-sm) - 6px); padding: 0 var(--sp-3); border-radius: var(--r-pill); cursor: pointer; display: inline-flex; align-items: center; gap: var(--sp-2); }
.seg button svg { width: 15px; height: 15px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 22, 48, 0.08), 0 4px 10px -4px rgba(30, 50, 150, 0.25); }
.seg button:hover:not(.on) { color: var(--ink); }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; }
.field > label, .label { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--ink-2); }
.field .hint { font-size: var(--fs-xs); color: var(--ink-3); }
.input, .field input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]), .field select, .field textarea, select.input, textarea.input {
  width: 100%; min-height: var(--ctl-h); padding: 7px var(--sp-3); border-radius: var(--r-sm); border: 1px solid var(--field-line); background: var(--glass-field); color: var(--ink);
  font: inherit; font-size: var(--fs-md); transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.field textarea, textarea.input { min-height: 84px; resize: vertical; line-height: var(--lh-normal); }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); background-color: var(--surface); }
/* round 6b: selects lose the browser's own arrow for a quiet chevron that follows the theme */
.field select, select.input, .status-select { -webkit-appearance: none; appearance: none; padding-right: 28px; background-image: var(--chevron); background-repeat: no-repeat; background-position: right 9px center; background-size: 12px; }
select.input:hover, .field select:hover { border-color: var(--line-hover); }
.input.sm { min-height: var(--ctl-h-sm); padding: 4px var(--sp-2); font-size: var(--fs-sm); border-radius: var(--r-xs); }
.field.inline { flex-direction: row; align-items: center; gap: var(--sp-2); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3) var(--sp-4); }
.form-grid .span2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: var(--fs-md); user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.search-box { position: relative; }
.search-box input { padding-left: 34px !important; }
.search-box svg { position: absolute; left: 11px; top: 50%; translate: 0 -50%; width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
.err-text { color: var(--danger); font-size: var(--fs-sm); }

/* date picker (core/datepick.js): the field that replaces a native date input, and its calendar */
.dp { position: relative; display: inline-flex; min-width: 0; vertical-align: middle; }
.field .dp, .form-grid .dp, .dp:not(.sm) { display: flex; width: 100%; }
.dp-native { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; min-height: 0 !important; opacity: 0; pointer-events: none; padding: 0 !important; border: 0 !important; }
.dp-field {
  width: 100%; min-height: var(--ctl-h); display: inline-flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-3); border: 1px solid var(--field-line); border-radius: var(--r-sm);
  background: var(--glass-field); color: var(--ink); font: inherit; font-size: var(--fs-md); cursor: pointer; text-align: left; white-space: nowrap; min-width: 0;
  transition: border-color var(--t-fast) var(--ease-std), box-shadow var(--t-fast) var(--ease-std), background var(--t-fast) var(--ease-std);
}
.dp-field:hover:not(:disabled) { border-color: var(--line-hover); }
.dp-field:focus-visible, .dp-field.open { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.dp-field.bad { border-color: var(--danger-solid); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18); }
.dp-field .dp-v { font-weight: var(--fw-semibold); overflow: hidden; text-overflow: ellipsis; }
.dp-field .dp-rel { color: var(--ink-3); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; }
.dp-field .dp-ph { color: var(--ink-4); }
.dp-field svg { width: 15px; height: 15px; margin-left: auto; color: var(--ink-3); flex: 0 0 15px; }
.dp-field.sm { min-height: var(--ctl-h-sm); padding: 0 var(--sp-2); font-size: var(--fs-sm); border-radius: var(--r-xs); gap: 6px; }
.dp-field.sm svg { width: 13px; height: 13px; flex-basis: 13px; }
.dp-field:disabled { cursor: default; background: var(--surface-sunken); color: var(--ink-3); }
.fb-dates .dp { width: 150px; }
.dp-pop { padding: 2px; }
.dp-head { display: flex; align-items: center; justify-content: space-between; padding: 0 0 6px; }
.dp-head b { font-size: var(--fs-md); font-weight: var(--fw-heavy); letter-spacing: var(--ls-snug); }
.dp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.dp-grid .dow { font-size: var(--fs-3xs); color: var(--ink-4); text-align: center; font-weight: var(--fw-bold); padding: 4px 0; text-transform: uppercase; letter-spacing: var(--ls-wide); }
.dp-grid .d { height: 34px; border: 0; background: none; border-radius: var(--r-sm); font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; transition: background var(--t-fast) var(--ease-std); }
.dp-grid .d:hover:not(:disabled) { background: var(--tint-hover); }
.dp-grid .d:focus-visible { outline: none; box-shadow: var(--ring); }
.dp-grid .d.out { color: var(--ink-4); }
.dp-grid .d.we:not(.sel) { color: var(--ink-3); }
.dp-grid .d.today:not(.sel) { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.dp-grid .d.inrange { background: var(--accent-bg); border-radius: 0; }
.dp-grid .d.edge { background: var(--accent-bg); color: var(--accent-ink); box-shadow: inset 0 0 0 1.5px var(--line-accent); }
.dp-grid .d.hl:not(.sel) { background: var(--accent-bg); }
.dp-grid .d.sel { background: var(--grad-cta); color: var(--on-accent); box-shadow: var(--cta-shadow); }
.dp-grid .d:disabled { color: var(--neutral-300); cursor: not-allowed; }
.dp-quick { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.dp-quick .chip { height: var(--ctl-h-xs); padding: 0 var(--sp-2); font-size: var(--fs-xs); }
.dp-type { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
.dp-hint { min-height: 16px; margin-top: 4px; font-size: var(--fs-xs); color: var(--ink-3); }

/* the project dialog (round 5): division tiles, sections, the service tree */
.pm-form { display: grid; gap: var(--sp-5); }
.pm-sec { display: grid; gap: var(--sp-3); }
.pm-sec > h4 { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-2xs); font-weight: var(--fw-heavy); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-3); }
.pm-sec > h4::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.input-lg { font-size: var(--fs-lg) !important; font-weight: var(--fw-semibold); min-height: 42px !important; }
.div-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.div-tile { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3); border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: var(--ink); min-width: 0; transition: border-color var(--t-fast) var(--ease-std), box-shadow var(--t-fast) var(--ease-std), background var(--t-fast) var(--ease-std); }
.div-tile:hover { border-color: color-mix(in srgb, var(--c) 50%, transparent); }
.div-tile:focus-visible { outline: none; box-shadow: var(--ring); }
.div-tile.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 7%, var(--mix-bg)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 20%, transparent); }
.div-tile .ic { width: 36px; height: 36px; flex: 0 0 36px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--on-accent); background: linear-gradient(135deg, color-mix(in srgb, var(--c) 72%, white), var(--c)); box-shadow: 0 4px 10px -4px color-mix(in srgb, var(--c) 70%, transparent); }
.div-tile .ic svg { width: 19px; height: 19px; }
.div-tile b { display: block; font-size: var(--fs-md); font-weight: var(--fw-bold); }
.div-tile .grow > span { display: block; font-size: var(--fs-xs); color: var(--ink-3); line-height: var(--lh-snug); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .div-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .div-tile .grow > span { display: none; } }
.svc-tree { display: grid; gap: var(--sp-3); }
.svc-group { display: grid; gap: 6px; }
.svc-group.main { padding: var(--sp-3); border-radius: var(--r-md); background: var(--surface-sunken); border: 1px solid var(--line); }
.svc-head { display: flex; align-items: center; gap: var(--sp-2); }
.svc-tree .chip svg { width: 13px; height: 13px; margin-left: -3px; }
.svc-often { width: 6px; height: 6px; border-radius: 50%; background: var(--warm-2); margin-left: 2px; }
.svc-more > summary, .pm-more > summary { cursor: pointer; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--accent); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.svc-more > summary::-webkit-details-marker, .pm-more > summary::-webkit-details-marker { display: none; }
.svc-more[open] > summary { margin-bottom: var(--sp-3); }
.svc-more .svc-group + .svc-group { margin-top: var(--sp-3); }
.pm-more { border-top: 1px solid var(--line); padding-top: var(--sp-3); }
.pm-more > summary svg { width: 14px; height: 14px; transition: rotate var(--t-fast) var(--ease-std); }
.pm-more[open] > summary svg { rotate: 90deg; }
.badge.new-client { background: var(--grad-soft); color: var(--cta-ink); }
.pop .opt.create { color: var(--accent); font-weight: var(--fw-semibold); }
.pop .opt.create svg { width: 15px; height: 15px; }
.pop .opt.busy { opacity: 0.6; }
.client-btn .badge { flex: none; }

/* combobox */
.combo { position: relative; }
.combo-btn { width: 100%; justify-content: space-between; font-weight: var(--fw-medium); min-height: var(--ctl-h); height: auto; padding: 5px var(--sp-3); box-shadow: none; border-color: var(--field-line); }
.combo-btn .ph { color: var(--ink-4); }
.pop {
  position: fixed; z-index: var(--z-popover); background: var(--glass-overlay); -webkit-backdrop-filter: var(--glass-blur-lg); backdrop-filter: var(--glass-blur-lg);
  border: 1px solid var(--glass-line); border-radius: var(--r-md); box-shadow: var(--shadow-lg), var(--highlight); padding: 6px; min-width: 200px; max-width: min(420px, calc(100vw - 24px));
  animation: pop-in 220ms var(--ease-pop) backwards; transform-origin: top;
}
@keyframes pop-in { from { opacity: 0; translate: 0 -6px; scale: 0.94; } }
.pop .pop-search { padding: 4px 4px 6px; }
.pop .pop-bulk { display: flex; justify-content: space-between; padding: 0 var(--sp-2) var(--sp-1); }
.pop .opts { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.pop .opt, .menu-item {
  display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: var(--fs-md); color: var(--ink); background: none; border: 0; width: 100%;
  text-align: left; font-family: inherit; text-decoration: none !important;
}
.pop .opt:hover, .pop .opt.hl, .menu-item:hover { background: var(--tint-hover); }
.pop .opt.sel { font-weight: var(--fw-bold); }
.pop .opt .tick { margin-left: auto; color: var(--accent); }
.menu-item svg { width: 16px; height: 16px; color: var(--ink-3); }
.menu-item.danger { color: var(--danger); }
.menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.menu-head { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-4); padding: 6px 10px 3px; }

/* ---------------------------------------------------------------- cards & surfaces */
.card {
  background: var(--glass-card); -webkit-backdrop-filter: var(--glass-card-blur); backdrop-filter: var(--glass-card-blur); border: 1px solid var(--glass-card-line); border-radius: var(--r-lg);
  box-shadow: var(--glass-card-shadow); padding: var(--sp-4); min-width: 0; position: relative;
}
.card.flat { box-shadow: var(--highlight); }
/* a card that opens something lifts toward you, brighter, with a deeper blue shadow */
.card.link, a.card { cursor: pointer; transition: background var(--t-med) var(--ease-std), box-shadow var(--t-med) var(--ease-std), translate var(--t-med) var(--ease-out); }
.card.link:hover, a.card:hover { background: var(--glass-card-hover); box-shadow: var(--pop); translate: 0 -3px; text-decoration: none; }
.card.tight { padding: var(--sp-3); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-3); min-width: 0; flex-wrap: wrap; }
.card-head h3 { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.card-head .sub { font-size: var(--fs-sm); color: var(--ink-3); }
.panel { background: var(--glass-card); border: 1px solid var(--glass-card-line); border-radius: var(--r-md); box-shadow: var(--glass-card-shadow); }
.section-title { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-3); margin: var(--sp-6) 0 var(--sp-3); }
/* Entrances. `backwards` (not `both`) so nothing keeps a transform once it has landed:
   a lingering transform would trap position: fixed children. */
.appear { animation: appear var(--t-enter) var(--ease-emph) backwards; transform-origin: 50% 100%; }
/* glass panels pop up into place: a short rise from a hair smaller, and a fade */
@keyframes appear { from { opacity: 0; transform: translateY(14px) scale(0.975); } }
.stagger > * { animation: appear var(--t-enter) var(--ease-emph) backwards; transform-origin: 50% 100%; }
.stagger > *:nth-child(2) { animation-delay: 45ms; } .stagger > *:nth-child(3) { animation-delay: 90ms; } .stagger > *:nth-child(4) { animation-delay: 135ms; }
.stagger > *:nth-child(5) { animation-delay: 180ms; } .stagger > *:nth-child(n + 6) { animation-delay: 220ms; }
.grid > .appear:nth-child(2) { animation-delay: 60ms; } .grid > .appear:nth-child(3) { animation-delay: 120ms; } .grid > .appear:nth-child(n + 4) { animation-delay: 170ms; }
/* A new page fades in; opacity only, so layout and fixed children aren't touched. */
.view-in { animation: fade-in var(--t-med) var(--ease-out) backwards; }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--sp-3); }
.stat { padding: var(--sp-4); border-radius: var(--r-lg); background: var(--glass-card); -webkit-backdrop-filter: var(--glass-card-blur); backdrop-filter: var(--glass-card-blur); border: 1px solid var(--glass-card-line); box-shadow: var(--glass-card-shadow); position: relative; min-width: 0; transition: background var(--t-med) var(--ease-std), box-shadow var(--t-med) var(--ease-std), translate var(--t-med) var(--ease-out); }
.stat .k { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.stat .k svg { width: 26px; height: 26px; flex: 0 0 26px; padding: 6px; border-radius: var(--r-pill); background: linear-gradient(135deg, color-mix(in srgb, var(--tone, var(--cta-1)) 74%, white), var(--tone, var(--cta-2))); color: var(--on-accent); box-shadow: 0 6px 12px -6px color-mix(in srgb, var(--tone, var(--cta-1)) 85%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.stat .v { font-family: var(--font-display); font-size: var(--fs-3xl); font-weight: var(--fw-bold); margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: var(--ls-tight); line-height: var(--lh-tight); }
.stat .d { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 3px; }
.stat.link { cursor: pointer; }
.stat.link:hover { background: var(--glass-card-hover); box-shadow: var(--pop); translate: 0 -3px; }
.stat.warn .v { color: var(--danger); }
.scope-line { font-size: var(--fs-sm); color: var(--ink-3); margin: 0 0 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.scope-line b { color: var(--ink-2); font-weight: var(--fw-bold); }

/* hero */
/* Home's header: a blue gradient panel (deep royal where the text sits, sky on the right, a warm
   glow at the foot) with white type, and glass cards on it: the next event with its countdown,
   then the few after it. Buttons on it are a white pill and glass pills. */
.hero {
  position: relative; border-radius: var(--r-xl); padding: var(--sp-8) var(--sp-8) var(--sp-6); background: var(--hero-grad); color: var(--on-accent);
  box-shadow: 0 24px 48px -28px color-mix(in srgb, var(--cta-1) 75%, transparent); display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: var(--sp-6); align-items: center;
  overflow: hidden; isolation: isolate;
}
/* two faint rings in the light, like the glass of a lens; still, decoration only */
.hero::before { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; right: -140px; top: -260px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.22); box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.05), 0 0 0 71px rgba(255, 255, 255, 0.12); pointer-events: none; }
.hero-main { min-width: 0; }
.hero-date { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: rgba(255, 255, 255, 0.82); }
.hero-date::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--warm-2); box-shadow: 0 0 0 3px rgba(255, 138, 61, 0.3); }
.hero h1 { margin-top: var(--sp-3); font-size: var(--fs-display); font-weight: var(--fw-heavy); letter-spacing: var(--ls-tight); line-height: var(--lh-tight); color: var(--on-accent); text-wrap: balance; }
.hero .sub { color: rgba(255, 255, 255, 0.86); margin-top: var(--sp-3); font-size: var(--fs-lg); max-width: 520px; }
/* a white pill (the main action on blue) and glass pills (the rest) */
.btn-light { background: var(--btn-light-bg); color: var(--btn-light-ink); border-color: transparent; box-shadow: 0 8px 18px -10px rgba(10, 14, 36, 0.55); }
.btn-light:hover { background: var(--btn-light-bg); color: var(--btn-light-ink); border-color: transparent; translate: 0 -1px; box-shadow: 0 10px 24px -10px rgba(10, 14, 36, 0.6), 0 0 0 4px rgba(255, 255, 255, 0.14); }
.btn-glass { background: var(--glass-on-blue); color: var(--on-accent); border-color: var(--glass-on-blue-line); -webkit-backdrop-filter: var(--glass-blur-sm); backdrop-filter: var(--glass-blur-sm); }
.btn-glass:hover { background: rgba(255, 255, 255, 0.24); border-color: rgba(255, 255, 255, 0.5); color: var(--on-accent); }
.hero-side { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
/* glass on blue: the next event, with a big countdown */
.hero-next, .hero-soon {
  display: block; min-width: 0; padding: var(--sp-4) var(--sp-5); border-radius: var(--r-lg); color: var(--on-accent); text-decoration: none !important;
  background: var(--glass-sheen), var(--glass-on-blue); -webkit-backdrop-filter: var(--glass-blur-lg); backdrop-filter: var(--glass-blur-lg); border: 1px solid var(--glass-on-blue-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 22px 40px -24px rgba(10, 14, 36, 0.7);
}
.hero-next { transition: background var(--t-fast) var(--ease-std), translate var(--t-med) var(--ease-out); }
.hero-next:hover { background: var(--glass-sheen), rgba(255, 255, 255, 0.2); translate: 0 -3px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 30px 50px -26px rgba(10, 14, 36, 0.8); }
.hero-next .hn-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.hero-next .hn-k { font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: rgba(255, 255, 255, 0.8); }
.hero-next .hn-div { width: 28px; height: 28px; border-radius: var(--r-pill); display: grid; place-items: center; background: var(--c); color: var(--on-accent); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25); }
.hero-next .hn-div svg { width: 15px; height: 15px; }
.hero-next .hn-count { display: flex; align-items: baseline; gap: var(--sp-2); margin-top: var(--sp-2); }
.hero-next .hn-count b { font-size: var(--fs-display); font-weight: var(--fw-heavy); line-height: var(--lh-none); letter-spacing: var(--ls-tight); font-variant-numeric: tabular-nums; }
.hero-next .hn-count span { font-size: var(--fs-md); font-weight: var(--fw-semibold); color: rgba(255, 255, 255, 0.85); }
.hero-next .hn-name { display: block; margin-top: var(--sp-2); font-weight: var(--fw-bold); font-size: var(--fs-lg); }
.hero-next .hn-meta { display: block; font-size: var(--fs-sm); color: rgba(255, 255, 255, 0.8); }
/* the few events after it: one line each, on a quieter glass */
.hero-soon { padding: var(--sp-2) var(--sp-3); }
.hero-soon a { display: flex; align-items: center; gap: var(--sp-3); padding: 6px var(--sp-1); color: var(--on-accent); border-radius: var(--r-sm); min-width: 0; }
.hero-soon a:hover { background: rgba(255, 255, 255, 0.1); text-decoration: none; }
.hero-soon a + a { border-top: 1px solid rgba(255, 255, 255, 0.14); }
.hero-soon .hs-d { flex: 0 0 52px; font-size: var(--fs-xs); font-weight: var(--fw-bold); color: rgba(255, 255, 255, 0.8); text-transform: uppercase; letter-spacing: var(--ls-wide); }
.hero-soon .hs-n { flex: 1 1 auto; min-width: 0; font-size: var(--fs-sm); font-weight: var(--fw-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-soon .hs-c { flex: none; font-size: var(--fs-xs); font-weight: var(--fw-bold); padding: 1px 8px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.16); }
/* round 6b: the floating glass workbench (core/iso.js) between the greeting and the next event */
.hero.has-art { grid-template-columns: minmax(0, 1fr) minmax(340px, 500px); min-height: 300px; }
.hero.has-art::before { display: none; }
.hero, .login-wrap { --iso-edge: rgba(255, 255, 255, 0.6); }
/* the art fills the right column; the next event floats over its lower corner as glass */
.hero.has-art .hero-side { position: relative; align-self: stretch; justify-content: center; }
.hero-art { margin: -70px -6px -60px -40px; pointer-events: none; min-width: 0; }
.hero-art .iso { width: 100%; height: auto; }
.hero.has-art .hero-next { position: absolute; right: 0; bottom: -6px; width: min(290px, 64%); }
@media (max-width: 1240px) {
  .hero.has-art { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); }
  .hero-art { display: none; }
  .hero.has-art .hero-next { position: static; width: auto; }
  .hero.has-art .hero-side.art-only { display: none; }
}
@media (max-width: 980px) { .hero.has-art { grid-template-columns: minmax(0, 1fr); min-height: 0; } }
@media (max-width: 980px) { .hero { grid-template-columns: minmax(0, 1fr); padding: var(--sp-6); } .hero h1 { font-size: var(--fs-4xl); } .hero-side { flex-direction: row; } .hero-side > * { flex: 1 1 0; } }
@media (max-width: 760px) { .hero { padding: var(--sp-5) var(--sp-4); gap: var(--sp-4); border-radius: var(--r-lg); } .hero h1 { font-size: var(--fs-3xl); } .hero-side { flex-direction: column; } .hero-soon { display: none; } .hero::before { right: -260px; } }

/* ---------------------------------------------------------------- badges, chips, avatars */
.badge { display: inline-flex; align-items: center; gap: var(--sp-1); height: var(--pill-h); padding: 0 var(--sp-2); border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: var(--fw-bold); white-space: nowrap; background: var(--surface-muted); color: var(--ink-2); border: 1px solid transparent; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.outline { background: transparent; border-color: var(--line-2); }
.stage { display: inline-flex; align-items: center; gap: var(--sp-1); height: var(--pill-h); padding: 0 var(--sp-2); border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: var(--fw-bold); white-space: nowrap; }
.stage::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.stage { background: color-mix(in srgb, var(--c) 12%, var(--mix-bg)); color: color-mix(in srgb, var(--c) 72%, var(--mix-ink)); }
/* status tones: statusPill(label, "ok" | "warn" | "danger" | "info" | "neutral" | "violet" | "teal") */
.stage.ok { --c: var(--ok-strong); } .stage.warn { --c: var(--warn-strong); } .stage.danger { --c: var(--danger); }
.stage.info { --c: var(--accent); } .stage.neutral { --c: var(--neutral-400); } .stage.violet { --c: var(--tone-violet); } .stage.teal { --c: var(--tone-teal); }
/* A division: its icon on a tile of its colour, then its name. Colour is never the only cue. */
.div-chip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--ink-2); white-space: nowrap; }
.div-chip i { width: 18px; height: 18px; border-radius: var(--r-xs); display: inline-grid; place-items: center; flex: 0 0 18px; background: color-mix(in srgb, var(--c) 15%, var(--mix-bg)); color: color-mix(in srgb, var(--c) 82%, var(--mix-ink)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent); }
.div-chip i svg { width: 12px; height: 12px; }
.div-chip.solid i { background: linear-gradient(135deg, color-mix(in srgb, var(--c) 80%, white), var(--c)); color: var(--on-accent); box-shadow: 0 2px 6px -2px color-mix(in srgb, var(--c) 60%, transparent); }
.div-chip.lg i { width: 30px; height: 30px; flex-basis: 30px; border-radius: var(--r-sm); }
.div-chip.lg i svg { width: 17px; height: 17px; }
.div-chip.lg { font-size: var(--fs-sm); gap: var(--sp-2); }
.div-chip.icon-only { gap: 0; }
.chip { display: inline-flex; align-items: center; gap: var(--sp-1); height: var(--ctl-h-sm); padding: 0 var(--sp-3); border-radius: var(--r-pill); border: 1px solid var(--glass-card-line); background: var(--glass-btn); box-shadow: 0 0 0 1px rgba(30, 45, 120, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.85); transition: background var(--t-fast) var(--ease-std), border-color var(--t-fast) var(--ease-std); font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ink-2); cursor: pointer; font-family: inherit; white-space: nowrap; }
.chip:hover { border-color: var(--line-hover); background: var(--glass-btn-hover); }
.chip.on { background: var(--accent-bg); border-color: var(--line-accent); color: var(--accent-ink); }
.chip svg { width: 14px; height: 14px; }
.chip .x { opacity: 0.6; margin-right: -3px; }
/* a division (or any entity with a colour) inside a chip or a segmented button */
.chip-ico { width: 18px; height: 18px; flex: 0 0 18px; margin-left: -5px; border-radius: var(--r-pill); display: inline-grid; place-items: center; background: color-mix(in srgb, var(--c) 15%, var(--mix-bg)); color: color-mix(in srgb, var(--c) 82%, var(--mix-ink)); transition: background var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std); }
.chip-ico svg { width: 11px; height: 11px; }
.chip.on .chip-ico, .seg button.on .chip-ico { background: var(--c); color: var(--on-accent); }
.seg .chip-ico { margin-left: -4px; }
.tag { display: inline-flex; align-items: center; height: var(--pill-h); padding: 0 var(--sp-2); border-radius: var(--r-xs); font-size: var(--fs-xs); font-weight: var(--fw-semibold); background: var(--surface-muted); color: var(--ink-2); white-space: nowrap; }
.av { --s: 26px; width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center; font-size: calc(var(--s) * 0.4); font-weight: var(--fw-bold); color: var(--on-accent); background: var(--c, var(--neutral-500)); flex: 0 0 var(--s); box-shadow: 0 0 0 2px var(--surface); letter-spacing: var(--ls-tight); font-family: var(--font-body); line-height: var(--lh-none); }
.av.sm { --s: 22px; } .av.lg { --s: 36px; } .av.xl { --s: 48px; }
.avs { display: inline-flex; align-items: center; }
.avs .av + .av { margin-left: -7px; }
.avs .more { font-size: var(--fs-xs); color: var(--ink-3); margin-left: 5px; font-weight: var(--fw-semibold); }
.pic-chip { display: inline-flex; align-items: center; gap: var(--sp-1); height: var(--ctl-h-xs); padding: 0 var(--sp-2) 0 2px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line-2); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.pic-chip .lbl { color: var(--ink-3); font-weight: var(--fw-semibold); }
.pic-chip .av { --s: 20px; }

/* progress */
.bar { height: 6px; border-radius: var(--r-pill); background: var(--track); overflow: hidden; position: relative; }
.bar > i { position: absolute; inset: 0 auto 0 0; width: 100%; transform-origin: left; scale: var(--p, 0) 1; background: var(--grad-brand-x); border-radius: var(--r-pill); transition: scale 480ms var(--ease-out); }
.bar.ok > i { background: var(--ok-strong); }
.bar.danger > i { background: var(--danger-solid); }
.ring { --p: 0; width: 42px; height: 42px; border-radius: 50%; background: conic-gradient(var(--brand-2), var(--brand-1) calc(var(--p) * 1%), var(--track) 0); display: grid; place-items: center; font-size: var(--fs-xs); font-weight: var(--fw-bold); flex: 0 0 42px; }
.ring::before { content: ""; position: absolute; }
.ring > span { width: 32px; height: 32px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; }

/* ---------------------------------------------------------------- filters bar */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.filters .search-box { min-width: 200px; flex: 0 1 240px; }
.filters .sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 2px; }
@media (max-width: 720px) { .filters .sep { display: none; } }
.pc-prog > .bar { flex: 1 1 auto; } /* the checklist bar on a project card fills the row (it had no width) */
.filters-more { flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: var(--sp-2); border-radius: var(--r-md); background: color-mix(in srgb, var(--surface) 45%, transparent); border: 1px solid var(--glass-card-line); animation: appear var(--t-med) var(--ease-out) backwards; } /* round 6: the less used filters, under Filters */
/* filterBar() (core/data.js): the same filter row on every main list */
.fbar-rest { display: contents; }
.fb-select { width: auto; max-width: 220px; }
.fb-dates { display: inline-flex; align-items: center; gap: var(--sp-1); flex-wrap: wrap; }
.fb-dates input[type="date"] { width: 150px; }
.fb-person { max-width: 260px; }
.fb-person .fb-x { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: -4px; border-radius: var(--r-pill); color: var(--ink-3); }
.fb-person .fb-x:hover { background: var(--tint-ghost); color: var(--ink); }
.fb-person .fb-x svg { width: 12px; height: 12px; }
@media (max-width: 640px) { .fb-select, .fb-dates, .fb-person { max-width: 100%; } .fb-dates input[type="date"] { width: 138px; } }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---------------------------------------------------------------- tables */
.tbl-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--glass-card-line); background: var(--glass-card); box-shadow: var(--glass-card-shadow); }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-md); }
.tbl th { position: sticky; top: 0; background: var(--surface-sunken); text-align: left; font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--ink-3); letter-spacing: var(--ls-wide); padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
.tbl td { padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background var(--t-fast); }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover { background: var(--surface-hover); }
.tbl tr.sel td { background: var(--surface-selected); }
.tbl .grp td { background: var(--surface-sunken); font-weight: var(--fw-bold); font-size: var(--fs-sm); color: var(--ink-2); padding: var(--sp-2) var(--sp-3); }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .muted-row td { color: var(--ink-4); }
.tbl-foot { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-3) 2px; font-size: var(--fs-sm); color: var(--ink-3); }

/* ---------------------------------------------------------------- tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line-2); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px; font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--ink-3); border: 0; background: none; cursor: pointer; font-family: inherit; position: relative; white-space: nowrap; text-decoration: none !important; transition: color var(--t-fast) var(--ease-std); }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs .on { color: var(--ink); }
.tabs .on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2.5px; border-radius: var(--r-2xs) var(--r-2xs) 0 0; background: var(--grad-brand-x); box-shadow: 0 0 12px color-mix(in srgb, var(--brand-2) 70%, transparent); }
.tabs .cnt { font-size: var(--fs-xs); background: var(--surface-muted); color: var(--ink-3); border-radius: var(--r-pill); padding: 0 7px; }
.tabs svg { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- project header and journey (round 5) */
/* the header carries its division: a band of its colour on top and a faint wash behind the title */
.phead { padding: 22px 22px 16px; overflow: hidden; background: radial-gradient(760px 220px at 0% 0%, color-mix(in srgb, var(--c) 13%, transparent), transparent 72%), var(--glass-card); }
.phead::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 35%, white)); }
.phead-title { margin-top: var(--sp-2); font-size: var(--fs-3xl); font-weight: var(--fw-heavy); letter-spacing: var(--ls-tight); line-height: var(--lh-snug); }
.pstats { gap: var(--sp-5); }
.pstats > div { display: flex; flex-direction: column; align-items: center; }
.pstats b { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: var(--fw-heavy); letter-spacing: var(--ls-snug); font-variant-numeric: tabular-nums; }
.pstats span { font-size: var(--fs-xs); color: var(--ink-3); }
.tag.svc { background: var(--surface-selected); color: var(--accent-ink); }
/* the steps from quotation to wrap-up: done steps wear the sunset, the current one is ringed */
.journey { list-style: none; margin: var(--sp-4) -4px 0; padding: var(--sp-4) 0 0; border-top: 1px solid var(--line); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(118px, 1fr); overflow-x: auto; scrollbar-width: none; counter-reset: none; }
.journey::-webkit-scrollbar { display: none; }
.journey li { position: relative; min-width: 0; }
.journey li::after { content: ""; position: absolute; top: 16px; left: calc(4px + 32px + 6px); right: 6px; height: 2px; border-radius: var(--r-pill); background: var(--line-2); }
.journey li:last-child::after { display: none; }
.journey li.done::after { background: var(--grad-brand-x); }
.journey a { display: flex; flex-direction: column; gap: 2px; padding: 0 4px 4px; color: inherit; text-decoration: none !important; border-radius: var(--r-sm); }
.journey a:hover .jt { color: var(--accent); }
.journey .jdot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-sm); font-weight: var(--fw-heavy); background: var(--surface-muted); color: var(--ink-3); margin-bottom: var(--sp-2); position: relative; z-index: 1; transition: box-shadow var(--t-med) var(--ease-out); }
.journey .jdot svg { width: 16px; height: 16px; stroke-width: 3; }
.journey li.done .jdot { background: var(--grad-cta); color: var(--on-accent); box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--brand-2) 55%, transparent), var(--cta-edge); }
.journey li.doing .jdot { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line-2); }
.journey li.now .jdot { background: var(--warm-bg); color: var(--warm-ink); box-shadow: inset 0 0 0 2px var(--warm-2), 0 0 0 5px rgba(255, 138, 61, 0.22); }
.journey li.none .jdot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--ink-4); }
.journey .jt { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--ink); display: flex; align-items: center; gap: 6px; }
.journey .jt em { font-style: normal; font-size: var(--fs-3xs); font-weight: var(--fw-heavy); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--on-accent); background: var(--grad-cta); padding: 1px 6px; border-radius: var(--r-pill); }
.journey .js { font-size: var(--fs-xs); color: var(--ink-3); line-height: var(--lh-snug); }
.journey li.none .jt, .journey li.none .js { color: var(--ink-4); }
/* "what to do now", under the step rail in the project header (round 6; was a card on the Overview) */
.next-step { display: flex; align-items: center; gap: var(--sp-3); margin: var(--sp-3) -6px 0; padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: linear-gradient(100deg, var(--warm-bg), color-mix(in srgb, var(--accent-bg) 70%, transparent)); border: 1px solid color-mix(in srgb, var(--warm-2) 30%, transparent); font-size: var(--fs-sm); }
.next-step .ns-ic { width: 28px; height: 28px; flex: 0 0 28px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--warm-2); color: var(--on-accent); }
.next-step .ns-ic svg { width: 15px; height: 15px; }
.next-step .ns-k { font-size: var(--fs-3xs); font-weight: var(--fw-heavy); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--warm-ink); margin-right: var(--sp-1); }
@media (max-width: 640px) { .next-step { flex-wrap: wrap; } .next-step .ns-ic { display: none; } .next-step .btn { width: 100%; justify-content: center; } }

/* celebrations (core/celebrate.js): blue and orange sparks, a "+8" and, now and then, the cendrawasih */
.cel-layer { position: fixed; inset: 0; pointer-events: none; z-index: var(--z-toast); }
.cel-spark { position: fixed; width: 7px; height: 7px; border-radius: 50%; pointer-events: none; }
.cel-points { position: fixed; z-index: var(--z-toast); pointer-events: none; font-family: var(--font-display); font-size: var(--fs-lg); font-weight: var(--fw-heavy); letter-spacing: var(--ls-snug); color: var(--on-accent); background: var(--grad-cta); padding: 2px 10px; border-radius: var(--r-pill); box-shadow: var(--cta-shadow); white-space: nowrap; }
.cel-bird { position: fixed; left: 0; top: 0; width: 150px; z-index: var(--z-toast); pointer-events: none; filter: drop-shadow(0 10px 18px rgba(15, 22, 48, 0.25)); }
.cel-bird svg { display: block; width: 100%; height: auto; overflow: visible; }
.cel-wing { transform-box: fill-box; transform-origin: 0% 100%; animation: cel-flap 0.22s ease-in-out infinite alternate; }
@keyframes cel-flap { from { transform: rotate(10deg); } to { transform: rotate(-26deg) scaleY(0.72); } }
/* round 6: the finale (a project closed or wrapped up, a whole checklist done) */
.cel-bird.big { width: 240px; }
.cel-trail { width: 6px; height: 6px; z-index: var(--z-toast); }
.cel-confetti { position: fixed; top: 0; width: 8px; height: 13px; border-radius: var(--r-2xs); pointer-events: none; }
.cel-confetti.round { width: 9px; height: 9px; border-radius: 50%; }
.cel-finale { position: fixed; inset: 0; z-index: var(--z-toast); display: grid; place-items: center; padding: var(--sp-4); background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--brand-1) 24%, transparent), color-mix(in srgb, var(--surface) 30%, transparent) 70%); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: cel-in var(--t-med) var(--ease-out) both; cursor: pointer; }
.cel-finale.out { animation: cel-out var(--t-med) var(--ease-in) both; }
.cel-card { width: min(380px, 100%); padding: var(--sp-6) var(--sp-5) var(--sp-5); text-align: center; border-radius: var(--r-xl); background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: var(--glass-blur-lg); backdrop-filter: var(--glass-blur-lg); border: 1px solid var(--glass-line); box-shadow: var(--shadow-lg); animation: cel-pop 520ms var(--ease-spring) both; }
.cel-ring { width: 64px; height: 64px; margin: 0 auto var(--sp-3); border-radius: 50%; display: grid; place-items: center; background: var(--grad-brand); box-shadow: 0 10px 28px color-mix(in srgb, var(--brand-1) 35%, transparent); }
.cel-ring svg { width: 40px; height: 40px; fill: none; stroke: var(--on-accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.cel-ring circle { stroke: color-mix(in srgb, var(--on-accent) 35%, transparent); stroke-width: 2; }
.cel-ring path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: cel-tick 420ms 260ms var(--ease-out) forwards; }
.cel-kicker { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--accent); }
.cel-title { margin-top: var(--sp-1); font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: var(--fw-heavy); line-height: var(--lh-snug); color: var(--ink); overflow-wrap: anywhere; }
.cel-sub { margin-top: 2px; font-size: var(--fs-sm); color: var(--ink-3); }
.cel-sub:empty { display: none; }
.cel-stats { display: flex; justify-content: center; gap: var(--sp-5); margin-top: var(--sp-4); }
.cel-stats b { display: block; font-family: var(--font-display); font-size: var(--fs-xl); font-weight: var(--fw-heavy); color: var(--ink); font-variant-numeric: tabular-nums; }
.cel-stats span { font-size: var(--fs-xs); color: var(--ink-3); }
.cel-line { margin: var(--sp-4) 0 var(--sp-3); font-size: var(--fs-sm); color: var(--ink-2); }
.cel-finale.still, .cel-finale.still .cel-card, .cel-finale.still .cel-ring path { animation: none; stroke-dashoffset: 0; }
@keyframes cel-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cel-out { to { opacity: 0; } }
@keyframes cel-pop { from { opacity: 0; transform: translateY(14px) scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes cel-tick { to { stroke-dashoffset: 0; } }

/* ---------------------------------------------------------------- project cards / list */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.pcard {
  position: relative; border-radius: var(--r-lg); background: var(--glass-card); border: 1px solid var(--glass-card-line); box-shadow: var(--glass-card-shadow); padding: 14px 16px 14px 18px; cursor: pointer;
  display: flex; flex-direction: column; gap: 9px; min-width: 0; overflow: hidden; transition: box-shadow var(--t-fast) var(--ease-std), border-color var(--t-fast) var(--ease-std);
}
.pcard::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, var(--c, var(--blue)), color-mix(in srgb, var(--c, var(--blue)) 45%, white)); }
/* a faint wash of the division's colour in the top corner, so a grid of cards reads by division at a glance */
.pcard::after { content: ""; position: absolute; inset: 0 0 auto auto; width: 60%; height: 70px; background: radial-gradient(120% 100% at 100% 0%, color-mix(in srgb, var(--c, var(--blue)) 13%, transparent), transparent 70%); pointer-events: none; }
.pcard:hover { background: var(--glass-card-hover); box-shadow: var(--pop); translate: 0 -4px; }
.pcard { transition: background var(--t-med) var(--ease-std), box-shadow var(--t-med) var(--ease-std), translate var(--t-med) var(--ease-out); }
.pcard > * { position: relative; z-index: 1; }
.pcard h3 { font-size: var(--fs-base); line-height: var(--lh-snug); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .meta { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--ink-3); min-width: 0; }
.pcard .meta svg { width: 14px; height: 14px; flex: 0 0 14px; }
.pcard .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.date-badge { width: 48px; flex: 0 0 48px; position: relative; border-radius: var(--r-md); background: var(--glass-card); border: 1px solid var(--glass-card-line); text-align: center; overflow: hidden; line-height: var(--lh-tight); box-shadow: var(--highlight), var(--shadow-sm); padding: 6px 0 4px; }
.date-badge::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad-brand-x); } /* round 6b */
.date-badge .m { color: var(--accent); font-size: var(--fs-3xs); font-weight: var(--fw-heavy); letter-spacing: var(--ls-caps); text-transform: uppercase; }
.date-badge .d { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: var(--fw-heavy); letter-spacing: var(--ls-snug); padding: 1px 0 0; color: var(--ink); }
.date-badge .y { font-size: var(--fs-3xs); color: var(--ink-4); }
.date-badge.tbc .m { color: var(--ink-3); } .date-badge.tbc::before { background: var(--neutral-400); }
.date-badge.none .m { color: var(--ink-4); } .date-badge.none::before { background: var(--neutral-300); }
.month-head { font-family: var(--font-display); font-size: var(--fs-md); font-weight: var(--fw-bold); color: var(--ink-2); margin: 18px 0 8px; display: flex; align-items: center; gap: 10px; }
.month-head::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.month-head .cnt { font-family: var(--font-body); font-size: var(--fs-xs); color: var(--ink-3); font-weight: var(--fw-semibold); }
.plist { display: flex; flex-direction: column; gap: 6px; }
.prow { display: grid; grid-template-columns: 46px minmax(0, 2.4fr) minmax(0, 1.2fr) minmax(0, 1fr) 110px 90px; gap: 14px; align-items: center; padding: 9px 12px; border-radius: var(--r-md); background: var(--glass-card); border: 1px solid var(--glass-card-line); cursor: pointer; box-shadow: var(--glass-card-shadow); transition: background var(--t-med) var(--ease-std), box-shadow var(--t-med) var(--ease-std), translate var(--t-med) var(--ease-out); }
.prow:hover { background: var(--glass-card-hover); box-shadow: var(--pop); translate: 0 -2px; }
.prow .name { font-weight: var(--fw-bold); font-size: var(--fs-md); }
@media (max-width: 1000px) { .prow { grid-template-columns: 46px minmax(0, 1fr) 90px; } .prow .hide-m { display: none; } }
.show-more { margin: var(--sp-3) auto 0; display: flex; }
/* data components (core/data.js) */
.dl-result { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); margin: 0 0 var(--sp-3); font-size: var(--fs-sm); color: var(--ink-3); }
.dl-result b { color: var(--ink); }
.dl-result .link-btn { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-sm); }
.dl-result .link-btn svg { width: 13px; height: 13px; }
.dl-sort { display: inline-flex; align-items: center; gap: 3px; background: none; border: 0; padding: 0; font: inherit; color: inherit; letter-spacing: inherit; cursor: pointer; }
.dl-sort svg { width: 12px; height: 12px; opacity: 0; transition: opacity var(--t-fast); }
.dl-sort:hover svg, .dl-sort.on svg { opacity: 1; }
.dl-sort.on { color: var(--ink); }
.dl-sort:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-2xs); }
.tbl.dense td, .tbl.dense th { padding: var(--sp-1) var(--sp-2); }
.dl-group-more { margin: var(--sp-1) 0 0 34px; }
.section-title.tone-danger { color: var(--danger); }
/* UI guide page */
.ug-sec h2 { font-size: var(--fs-xl); }
.ug-demo { margin-top: var(--sp-4); padding: var(--sp-4); border: 1px dashed var(--line-2); border-radius: var(--r-sm); background: var(--surface); }
.ug-rules { margin: 0; padding-left: var(--sp-4); font-size: var(--fs-sm); color: var(--ink-2); display: grid; gap: var(--sp-1); }
.ug-iso .iso { width: 100%; height: auto; max-height: 220px; } /* round 6b */
.ug-code { margin: 0; padding: var(--sp-3); border-radius: var(--r-sm); background: var(--surface-inverse); color: var(--side-ink-strong); font-family: var(--font-mono); font-size: var(--fs-xs); line-height: var(--lh-normal); overflow-x: auto; white-space: pre; }
.ug-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-2); }
.ug-sw { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: var(--sp-2); align-items: center; }
.ug-sw i { grid-row: span 2; width: 28px; height: 28px; border-radius: var(--r-xs); border: 1px solid var(--line-2); }
.ug-sw span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.bcol { background: var(--glass-col); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 200px; transition: background var(--t-fast), box-shadow var(--t-fast); }
.bcol.drop { background: var(--tint-hover); box-shadow: inset 0 0 0 2px var(--line-hover); }
.bcol-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 4px; }
.bcol-head .sum { font-size: var(--fs-xs); color: var(--ink-3); }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; box-shadow: var(--shadow-sm); cursor: grab; display: flex; flex-direction: column; gap: 6px; transition: box-shadow var(--t-fast), border-color var(--t-fast), opacity var(--t-fast); }
.kcard:hover { box-shadow: var(--shadow-md); border-color: var(--line-hover); }
.kcard.dragging { opacity: 0.45; }
.kcard .t { font-weight: var(--fw-bold); font-size: var(--fs-md); line-height: var(--lh-snug); }
.kcard .m { font-size: var(--fs-sm); color: var(--ink-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.drag-ghost { position: fixed; z-index: var(--z-drag); pointer-events: none; rotate: 2deg; box-shadow: var(--shadow-lg); opacity: 0.95; }

/* ---------------------------------------------------------------- calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.cal .dow { background: var(--surface-sunken); font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--ink-3); padding: 7px 8px; border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: var(--ls-caps); }
.cal .day { min-height: 108px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 5px; display: flex; flex-direction: column; gap: 3px; min-width: 0; cursor: pointer; }
.cal .day:nth-child(7n) { border-right: 0; }
.cal .day.out { background: var(--surface-sunken); }
.cal .day.out .n { color: var(--ink-4); }
.cal .day.today .n { background: var(--accent); color: var(--on-accent); border-radius: var(--r-pill); padding: 0 7px; }
.cal .day.sel { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.cal .n { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--ink-2); align-self: flex-start; }
.cal .ev { font-size: var(--fs-xs); padding: 2px 6px; border-radius: var(--r-xs); background: color-mix(in srgb, var(--c) 14%, var(--mix-bg)); color: color-mix(in srgb, var(--c) 70%, var(--mix-ink)); border-left: 3px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: var(--fw-semibold); }
.cal .ev.past { opacity: 0.55; }
.cal .ev.cancelled { text-decoration: line-through; opacity: 0.5; }
.cal .more { font-size: var(--fs-xs); color: var(--accent); font-weight: var(--fw-bold); padding: 0 4px; }
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .cal-wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .cal .day { min-height: 54px; }
  .cal .ev { font-size: 0; padding: 0; height: 6px; width: 6px; border-radius: 50%; border: 0; background: var(--c); display: inline-block; }
  .cal .day { flex-direction: row; flex-wrap: wrap; align-content: flex-start; }
  .cal .n { width: 100%; }
  .cal .more { display: none; }
}
.agenda-item { display: flex; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.agenda-item:last-child { border-bottom: 0; }
.agenda-item:hover .t { color: var(--accent); }

/* ---------------------------------------------------------------- gantt / timeline */
.gantt-wrap { --g-label-w: 300px; position: relative; }
.gantt { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: auto; position: relative; max-height: 70vh; overscroll-behavior-x: contain; scrollbar-width: thin; }
.gantt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gantt.panning { cursor: grabbing; user-select: none; }
@media (pointer: fine) { .gantt:not(.panning) .g-track, .gantt:not(.panning) .g-scale { cursor: grab; } }
/* shadows at the scroll edges: more timeline to the left / right */
.gantt-wrap::before, .gantt-wrap::after { content: ""; position: absolute; top: 1px; bottom: 1px; width: 22px; pointer-events: none; z-index: 5; opacity: 0; transition: opacity var(--t-med); }
.gantt-wrap::before { left: calc(var(--g-label-w) + 1px); background: linear-gradient(90deg, var(--edge-shade), transparent); }
.gantt-wrap::after { right: 1px; border-radius: 0 var(--r-md) var(--r-md) 0; background: linear-gradient(270deg, var(--edge-shade), transparent); }
.gantt-wrap.more-l::before, .gantt-wrap.more-r::after { opacity: 1; }
.gantt-grid { display: grid; min-width: max-content; position: relative; }
.g-head { position: sticky; top: 0; z-index: 3; background: var(--surface-sunken); border-bottom: 1px solid var(--line); display: flex; }
.g-label-head, .g-label { position: sticky; left: 0; z-index: 2; background: var(--surface); border-right: 1px solid var(--line); width: var(--g-label-w); min-width: var(--g-label-w); }
.g-head .g-label-head { background: var(--surface-sunken); z-index: 4; padding: 8px 12px; font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--ink-3); }
.g-scale { display: flex; flex-direction: column; position: relative; }
.g-tier { display: flex; }
.g-tick { flex: 0 0 auto; font-size: var(--fs-xs); color: var(--ink-3); padding: 5px 6px; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; line-height: var(--lh-snug); }
.g-tier.top .g-tick { font-weight: var(--fw-bold); color: var(--ink-2); border-bottom: 1px solid var(--line); padding: 4px 8px; }
/* the month / year name stays in view while its stretch is on screen */
.g-tier.top .g-tick { overflow: visible; }
.g-tick-l { position: sticky; left: calc(var(--g-label-w) + 8px); }
.g-tier:not(.top) .g-tick { text-align: center; padding: 4px 2px; }
.g-tick.yr { border-left-color: var(--line-2); }
.g-tick.we { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.g-tick.now { background: var(--accent-bg); color: var(--accent-ink); font-weight: var(--fw-bold); }
.g-tick b { font-weight: var(--fw-bold); color: var(--ink-2); }
.g-tick.now b { color: var(--accent-ink); }
.g-dow { display: block; font-size: var(--fs-3xs); color: var(--ink-4); }
/* faint unit gridlines (day and week scales) */
.gantt-grid.gridded .g-track { background-image: repeating-linear-gradient(90deg, color-mix(in srgb, var(--ink) 4.5%, transparent) 0 1px, transparent 1px var(--g-unit)); }
.g-group { min-height: 30px; background: var(--surface-sunken); }
.g-group .g-label { background: var(--surface-sunken); font-weight: var(--fw-bold); font-size: var(--fs-sm); cursor: default; }
.g-row { display: flex; border-bottom: 1px solid var(--line); min-height: 34px; position: relative; }
.g-row:hover .g-label { background: var(--surface-hover); }
.g-label { padding: 6px 12px; display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); min-width: 0; cursor: pointer; }
.g-label .ellipsis { flex: 1; }
.g-track { position: relative; flex: 0 0 auto; }
.g-bar { position: absolute; top: 8px; height: 18px; border-radius: var(--r-xs); background: var(--c, var(--blue)); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06); cursor: pointer; transform-origin: left; animation: grow-x 360ms var(--ease-out) backwards; display: flex; align-items: center; overflow: hidden; }
.g-bar-lbl { position: absolute; top: 8px; height: 18px; display: flex; align-items: center; overflow: clip; pointer-events: none; z-index: 1; }
.g-bar-lbl > span { position: sticky; left: calc(var(--g-label-w) + 6px); padding: 0 6px; font-size: var(--fs-2xs); color: var(--on-accent); font-weight: var(--fw-bold); white-space: nowrap; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25); }
.g-bar .prog { position: absolute; inset: 0 auto 0 0; background: rgba(255, 255, 255, 0.28); pointer-events: none; }
.g-bar.tbc { background: repeating-linear-gradient(45deg, var(--c), var(--c) 6px, color-mix(in srgb, var(--c) 60%, white) 6px, color-mix(in srgb, var(--c) 60%, white) 12px); }
.g-bar.done { opacity: 0.55; }
.g-bar.drag { cursor: grabbing; box-shadow: var(--shadow-md); }
/* bars that run past the edge of the view end in an arrow, not a cut */
.g-bar.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%); padding-left: 6px; }
.g-bar.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%); }
.g-bar.cut-l.cut-r { clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%); }
.g-ms { position: absolute; top: 10px; width: 13px; height: 13px; rotate: 45deg; background: var(--surface); border: 2.5px solid var(--c, var(--indigo)); border-radius: var(--r-2xs); margin-left: -6.5px; z-index: 1; }
/* milestone kinds: deadlines ◆, approvals ● ; state colours from the tokens */
.g-ms.k-deadline.s-open { --c: var(--indigo); }
.g-ms.k-deadline.s-done { --c: var(--ok-strong); background: var(--ok-strong); }
.g-ms.k-deadline.s-overdue { --c: var(--danger-solid); background: var(--danger-bg); }
.g-ms.k-approval { rotate: 0deg; border-radius: 50%; width: 12px; height: 12px; top: 11px; margin-left: -6px; border-width: 2.5px; }
.g-ms.k-approval.s-approved { --c: var(--ok-strong); background: var(--ok-strong); }
.g-ms.k-approval.s-signed { --c: var(--tone-teal); background: var(--tone-teal); }
.g-ms.k-approval.s-pending { --c: var(--warn-strong); background: var(--warn-bg); }
.g-ms.k-approval.s-changes { --c: var(--danger-solid); background: var(--danger-bg); }
.g-ms:hover { scale: 1.25; }
/* overlaps: the colliding stretch of a bar (e.g. one PIC on two events at once) */
.g-ov { position: absolute; top: 3px; bottom: 3px; border: 1px dashed var(--line-danger); border-radius: var(--r-xs); background: repeating-linear-gradient(135deg, rgba(220, 38, 38, 0.16) 0 5px, rgba(220, 38, 38, 0.05) 5px 10px); z-index: 0; }
.g-bar.has-ov { outline: 2px solid var(--danger-solid); outline-offset: 1px; }
/* "running per day" strip under the scale */
.g-load { min-height: 24px; background: var(--surface); position: sticky; top: var(--g-head-h, 0); z-index: 2; box-shadow: 0 1px 0 var(--line); }
.g-load .g-label { font-size: var(--fs-xs); }
.g-load-c { position: absolute; top: 7px; height: 10px; border-radius: var(--r-2xs); }
.g-load-c.l1 { background: var(--seq-200); } .g-load-c.l2 { background: var(--seq-400); }
.g-load-c.l3 { background: var(--warn-solid); } .g-load-c.l4 { background: var(--danger-solid); }
/* event days: shaded band across every row, labelled at the top */
.g-band { position: absolute; top: var(--g-head-h, 0); bottom: 0; background: rgba(99, 102, 241, 0.08); border-left: 2px solid var(--indigo); pointer-events: none; z-index: 0; }
.g-band > span { display: inline-block; margin-top: 2px; margin-left: 4px; font-size: var(--fs-2xs); font-weight: var(--fw-bold); color: var(--info); background: var(--glass-strong); padding: 0 4px; border-radius: var(--r-2xs); white-space: nowrap; }
.g-legend { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin-top: var(--sp-2); font-size: var(--fs-xs); color: var(--ink-3); }
.g-leg { display: inline-flex; align-items: center; gap: 6px; }
.g-leg .g-ms { position: static; margin: 0 2px; }
.chip .g-ms.chip-ms { position: static; margin: 0 2px 0 0; }
.g-leg-band { width: 14px; height: 12px; background: rgba(99, 102, 241, 0.14); border-left: 2px solid var(--indigo); }
.g-leg-today { width: 2px; height: 12px; background: var(--danger-solid); }
.g-today { position: absolute; top: var(--g-head-h, 0); bottom: 0; width: 2px; background: var(--danger-solid); z-index: 1; pointer-events: none; }
.g-today::before { content: "Today"; position: absolute; top: 2px; left: 4px; font-size: var(--fs-2xs); font-weight: var(--fw-bold); color: var(--danger-solid); background: var(--glass-strong); padding: 0 3px; border-radius: var(--r-2xs); }
.g-weekend { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--ink) 2.5%, transparent); pointer-events: none; }
@keyframes grow-x { from { scale: 0 1; } to { scale: 1 1; } }
@media (max-width: 720px) { .gantt-wrap { --g-label-w: 170px; } }
@media (max-width: 480px) { .gantt-wrap { --g-label-w: 128px; } .g-label .av { display: none; } .g-label { padding: 6px 8px; } .gantt { max-height: 64vh; } }

/* ---------------------------------------------------------------- checklist */
.cl-group { margin-bottom: 14px; }
.cl-group-head { display: flex; align-items: center; gap: 10px; padding: 6px 4px; cursor: pointer; user-select: none; }
.cl-group-head h4 { font-size: var(--fs-md); }
.cl-group-head .bar { flex: 0 0 120px; }
.cl-item { display: grid; grid-template-columns: 24px minmax(0, 1fr) 146px 110px 118px 30px; gap: 10px; align-items: center; padding: 7px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 4px; transition: border-color var(--t-fast), background var(--t-fast); }
.cl-item:hover { border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
/* Arranging (2026-10-05): the handle sits in the row's left padding, shown on hover or focus. */
.cl-item { position: relative; }
.cl-grip { position: absolute; left: -1px; top: 0; bottom: 0; width: 12px; display: grid; place-items: center; color: var(--ink-4); cursor: grab; opacity: 0; transition: opacity var(--t-fast); border-radius: var(--r-xs); }
.cl-grip svg { width: 12px; height: 12px; }
.cl-item:hover .cl-grip, .cl-grip:focus-visible { opacity: 1; }
.cl-grip:focus-visible { box-shadow: var(--ring); outline: none; }
.cl-item.dragging { opacity: 0.45; }
.cl-item.over-top { box-shadow: inset 0 2px 0 var(--accent); }
.cl-item.over-bottom { box-shadow: inset 0 -2px 0 var(--accent); }
.cl-group.over { outline: 2px dashed var(--accent); outline-offset: 2px; border-radius: var(--r-md); }
@media (hover: none) { .cl-grip { opacity: 0.6; } }
.cl-item.done .ttl { color: var(--ink-4); text-decoration: line-through; }
.cl-item.overdue .due { color: var(--danger); font-weight: var(--fw-bold); }
.cl-item .ttl { display: block; font-size: var(--fs-md); font-weight: var(--fw-semibold); cursor: pointer; }
.cl-item .ttl:hover { color: var(--accent); }
.cl-item .sub { font-size: var(--fs-xs); color: var(--ink-3); }
.cbx { width: 20px; height: 20px; border-radius: var(--r-xs); border: 2px solid var(--field-line-strong); background: var(--surface); display: grid; place-items: center; cursor: pointer; padding: 0; transition: background var(--t-fast), border-color var(--t-fast), scale var(--t-fast) var(--ease-spring); }
.cbx:hover { border-color: var(--accent); }
.cbx.on { background: var(--grad-cta); border-color: transparent; box-shadow: 0 3px 8px -3px color-mix(in srgb, var(--brand-2) 60%, transparent), var(--cta-edge); }
.cbx.on::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--on-accent); border-top: 0; border-right: 0; rotate: -45deg; translate: 0 -1px; }
.cbx:active { scale: 0.85; }
.status-select { border: 0; background: color-mix(in srgb, var(--c) 13%, var(--mix-bg)); color: color-mix(in srgb, var(--c) 72%, var(--mix-ink)); font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-bold); border-radius: var(--r-xs); padding: 4px 8px; cursor: pointer; width: 100%; }
@media (max-width: 900px) { .cl-item { grid-template-columns: 24px minmax(0, 1fr) 96px 30px; } .cl-item .hide-m { display: none; }  .cl-item .ttl.ellipsis { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: var(--lh-snug); } }
/* round 5: subtasks under their task, the inline "type it here" row, select boxes on hover */
.cl-item.sub { margin-left: 34px; padding-top: 5px; padding-bottom: 5px; background: var(--surface-sunken); position: relative; }
.cl-item.sub::before { content: ""; position: absolute; left: -20px; top: -7px; width: 14px; height: calc(50% + 7px); border-left: 1.5px solid var(--line-2); border-bottom: 1.5px solid var(--line-2); border-bottom-left-radius: var(--r-xs); }
.cl-item.sub .ttl { font-weight: var(--fw-medium); }
[data-act=select][aria-pressed="true"] { background: var(--accent-bg); border-color: var(--line-accent); color: var(--accent-ink); }
.cbx.pick { border-radius: var(--r-pill); border-style: dashed; }
.cbx.pick.on { border-style: solid; }
.cl-item.selected { border-color: var(--line-accent); background: var(--accent-bg); }
.cl-fold { width: 18px; height: 18px; border: 0; background: none; padding: 0; display: grid; place-items: center; color: var(--ink-3); cursor: pointer; border-radius: var(--r-2xs); flex: none; }
.cl-fold:hover { background: var(--tint-ghost); color: var(--ink); }
.cl-fold svg { width: 14px; height: 14px; }
.cl-ms { color: var(--accent); font-size: var(--fs-xs); }
.cl-addsub { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border: 1px dashed var(--line-2); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-3); font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-semibold); cursor: pointer; flex: none; opacity: 0; transition: opacity var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std), border-color var(--t-fast) var(--ease-std); }
.cl-addsub svg { width: 12px; height: 12px; }
.cl-item:hover .cl-addsub, .cl-addsub:focus-visible { opacity: 1; }
.cl-addsub:hover { color: var(--accent); border-color: var(--line-accent); }
@media (hover: none) { .cl-addsub { opacity: 1; } .cl-addsub span { display: none; } }
.cl-item.adding { grid-template-columns: 24px minmax(0, 1fr) auto; border-style: dashed; border-color: var(--line-accent); background: var(--accent-bg); animation: appear var(--t-med) var(--ease-out) backwards; }
.cl-item.adding.sub { background: var(--accent-bg); }
/* round 6: the summary bar (progress ring, quick filters, By date / By category), date groups, done folded away */
.cl-summary { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4); border-radius: var(--r-lg); background: var(--glass-card); border: 1px solid var(--glass-card-line); box-shadow: var(--glass-card-shadow); -webkit-backdrop-filter: var(--glass-card-blur); backdrop-filter: var(--glass-card-blur); }
.cl-ring { width: 48px; height: 48px; border-radius: 50%; flex: 0 0 48px; display: grid; place-items: center; background: radial-gradient(closest-side, var(--surface) 74%, transparent 75% 100%), conic-gradient(var(--accent) calc(var(--p) * 360deg), var(--surface-muted) 0); }
.cl-ring.ok { background: radial-gradient(closest-side, var(--surface) 74%, transparent 75% 100%), conic-gradient(var(--ok-solid) 360deg, var(--surface-muted) 0); }
.cl-ring b { font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.cl-sum-text { min-width: 130px; }
.cl-quick { display: flex; flex-wrap: wrap; gap: var(--sp-2); flex: 1 1 260px; }
.qchip { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 var(--sp-3); border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--glass-btn); color: var(--ink-2); font: inherit; font-size: var(--fs-sm); cursor: pointer; transition: background var(--t-fast) var(--ease-std), border-color var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std); }
.qchip b { color: var(--ink); font-variant-numeric: tabular-nums; }
.qchip:hover { border-color: var(--line-hover); background: var(--glass-btn-hover); }
.qchip.danger { border-color: var(--line-danger); }
.qchip.danger b { color: var(--danger); }
.qchip.on, .qchip.on:hover { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.qchip.on b { color: var(--on-accent); }
.cl-count { min-width: 22px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--surface-muted); color: var(--ink-2); font-size: var(--fs-xs); font-weight: var(--fw-bold); display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.when-late .cl-group-head h4 { color: var(--danger); }
.when-late .cl-count { background: var(--danger-bg); color: var(--danger); }
.when-week .cl-count { background: var(--accent-bg); color: var(--accent-ink); }
.when-done .cl-group-head h4 { color: var(--ink-3); }
.cl-cat { color: var(--ink-3); font-weight: var(--fw-semibold); margin-right: var(--sp-2); }
.cl-donefold { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 var(--sp-1) var(--sp-2); padding: 3px 10px; border: 1px dashed var(--line-2); border-radius: var(--r-pill); background: transparent; color: var(--ok-strong); font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-semibold); cursor: pointer; }
.cl-donefold:hover { border-color: var(--ok-strong); background: var(--ok-bg-soft); }
.cl-donefold svg { width: 12px; height: 12px; }
.cl-item .status-select.quiet { background: transparent; color: var(--ink-3); font-weight: var(--fw-medium); box-shadow: inset 0 0 0 1px var(--line); }
.cl-item:hover .status-select.quiet { color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-hover); }
@media (max-width: 640px) { .cl-summary { gap: var(--sp-3); padding: var(--sp-3); } .cl-summary .seg { width: 100%; } .cl-summary .seg button { flex: 1; justify-content: center; } }
.cbx.ghost { cursor: default; border-style: dashed; background: transparent; }
.cl-new, .cl-rename { width: 100%; border: 0; background: transparent; font: inherit; font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--ink); padding: 3px 0; outline: none; }
.cl-new::placeholder { color: var(--ink-4); font-weight: var(--fw-medium); }
.cl-rename { background: var(--surface); box-shadow: var(--ring); border-radius: var(--r-xs); padding: 3px 6px; min-width: 0; flex: 1; }
.cl-item .due .dp-field { border-color: transparent; background: transparent; }
.cl-item .due .dp-field:hover { border-color: var(--line-2); background: var(--surface); }
.cl-item.overdue .due .dp-v { color: var(--danger); }
.cl-item.mytask { grid-template-columns: 24px minmax(0, 1fr) minmax(0, 220px) 130px 110px; }
@media (max-width: 900px) { .cl-item.mytask { grid-template-columns: 24px minmax(0, 1fr) 96px; } }

/* ---------------------------------------------------------------- heat map */
.hm { border-collapse: separate; border-spacing: 3px; font-size: var(--fs-sm); }
.hm th { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--ink-3); padding: 2px 4px; text-align: center; white-space: nowrap; }
.hm th.name { text-align: left; }
.hm td.name { white-space: nowrap; padding-right: 10px; font-weight: var(--fw-semibold); }
.hm td.cell { width: 52px; min-width: 44px; height: 32px; border-radius: var(--r-xs); text-align: center; font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; cursor: pointer; transition: scale var(--t-fast) var(--ease-out), box-shadow var(--t-fast); }
.hm td.cell:hover { scale: 1.08; box-shadow: var(--shadow-md); }
.hm td.cur { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ink) 35%, transparent); }
.load-cell { border-radius: var(--r-xs); padding: 6px; text-align: center; font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; cursor: pointer; }
.legend-scale { display: flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--ink-3); }
.legend-scale i { width: 22px; height: 12px; border-radius: var(--r-2xs); display: inline-block; }

/* ---------------------------------------------------------------- modal / drawer / toast */
.backdrop { position: fixed; inset: 0; background: var(--scrim); -webkit-backdrop-filter: var(--scrim-blur); backdrop-filter: var(--scrim-blur); z-index: var(--z-modal); display: grid; place-items: center; padding: 20px; animation: fade-in var(--t-med) var(--ease-out) backwards; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
/* Leaving: ui.js adds .out, waits for the animation, then removes the node. */
.backdrop.out { animation: fade-out 140ms var(--ease-in) forwards; pointer-events: none; }
.backdrop.out .modal { animation: modal-out 140ms var(--ease-in) forwards; }
.modal { background: var(--glass-overlay); -webkit-backdrop-filter: var(--glass-blur-lg); backdrop-filter: var(--glass-blur-lg); border: 1px solid var(--glass-line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg), var(--highlight); width: min(560px, 100%); min-width: 0; max-height: calc(100vh - 40px); display: flex; flex-direction: column; animation: modal-in 340ms var(--ease-pop) backwards; }
.modal.lg { width: min(880px, 100%); }
.modal.xl { width: min(1180px, 100%); }
.modal.sm { width: min(420px, 100%); }
/* dialogs pop up: from a little smaller and lower, with a slight overshoot; they leave quicker */
@keyframes modal-in { from { opacity: 0; scale: 0.92; translate: 0 18px; } 60% { opacity: 1; } }
@keyframes modal-out { to { opacity: 0; scale: 0.96; translate: 0 8px; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 10px; }
.modal-head .sub { font-size: var(--fs-md); color: var(--ink-3); margin-top: 3px; }
.modal-body { padding: 8px 22px 16px; overflow-y: auto; min-width: 0; }
/* A flex item doesn't shrink below its content: without min-width: 0 a wide table in a dialog
   (the checklist import's preview) pushed the dialog past a phone's edge. */
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 22px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }
.drawer-back { position: fixed; inset: 0; z-index: var(--z-drawer-back); background: var(--scrim); -webkit-backdrop-filter: var(--glass-blur-sm); backdrop-filter: var(--glass-blur-sm); animation: fade-in var(--t-med) var(--ease-out) backwards; }
.drawer-back.out { animation: fade-out 160ms var(--ease-in) forwards; pointer-events: none; }
/* drawers float too: a glass sheet inset from the window's edge */
.drawer { position: fixed; top: 10px; right: 10px; bottom: 10px; width: min(640px, calc(100vw - 20px)); z-index: var(--z-drawer); background: var(--glass-overlay); -webkit-backdrop-filter: var(--glass-blur-lg); backdrop-filter: var(--glass-blur-lg); border: 1px solid var(--glass-line); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg), var(--highlight); display: flex; flex-direction: column; animation: drawer-in 320ms var(--ease-emph) backwards; }
.drawer.out { animation: drawer-out 160ms var(--ease-in) forwards; pointer-events: none; }
.drawer.wide { width: min(880px, calc(100vw - 20px)); }
@keyframes drawer-in { from { translate: 48px 0; opacity: 0; scale: 0.98; } }
@keyframes drawer-out { to { translate: 32px 0; opacity: 0; } }
.drawer-head { padding: 18px 20px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 12px; }
.drawer-body { padding: 16px 20px 30px; overflow-y: auto; flex: 1; }
.toasts { position: fixed; bottom: 18px; left: 50%; translate: -50% 0; z-index: var(--z-toast); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; background: var(--glass-dark); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); color: var(--on-accent); padding: 10px 16px; border-radius: var(--r-md); font-size: var(--fs-md); font-weight: var(--fw-semibold); box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.08); display: flex; align-items: center; gap: 10px; animation: toast-in 300ms var(--ease-pop) backwards; max-width: min(560px, calc(100vw - 32px)); }
.toast.out { animation: toast-out 160ms var(--ease-in) forwards; }
.toast.ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok-solid); flex: 0 0 8px; }
.toast.err { background: var(--danger-deep); }
.toast.points::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--medal-gold); flex: 0 0 8px; } /* points just earned */
.toast.award::before { content: ""; width: 14px; height: 14px; flex: 0 0 14px; clip-path: var(--shape, circle(50%)); background: var(--rim, var(--medal-gold)); } /* a badge just earned, in its tier's shape and metal (the tier looks are shared, see "tier looks"); "medal" is the badge component */
.toast .link-btn { color: var(--link-on-dark); white-space: nowrap; flex: none; }
@keyframes toast-in { from { opacity: 0; translate: 0 14px; scale: 0.94; } }
@keyframes toast-out { to { opacity: 0; translate: 0 6px; } }

/* ---------------------------------------------------------------- command palette */
.palette { position: fixed; inset: 0; z-index: var(--z-palette); background: var(--scrim); -webkit-backdrop-filter: var(--scrim-blur); backdrop-filter: var(--scrim-blur); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; animation: fade-in var(--t-fast) var(--ease-out) backwards; }
.palette-box { width: min(640px, 100%); background: var(--glass-overlay); -webkit-backdrop-filter: var(--glass-blur-lg); backdrop-filter: var(--glass-blur-lg); border: 1px solid var(--glass-line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg), var(--highlight); overflow: hidden; animation: modal-in 300ms var(--ease-pop) backwards; }
.palette.out { animation: fade-out 140ms var(--ease-in) forwards; pointer-events: none; }
.palette.out .palette-box { animation: modal-out 140ms var(--ease-in) forwards; }
.palette-input { display: flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-4); border-bottom: 1px solid var(--line); }
.palette-input > svg { width: 18px; height: 18px; color: var(--ink-3); flex: 0 0 18px; }
.palette-input input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 15px 0; font: inherit; font-size: var(--fs-lg); outline: none; color: var(--ink); }
.palette-head { display: flex; align-items: center; gap: var(--sp-2); padding: 10px 11px 4px; font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-3); }
.palette-head .cnt { font-size: var(--fs-2xs); font-weight: var(--fw-semibold); letter-spacing: 0; text-transform: none; color: var(--ink-4); }
.palette-item mark { background: var(--accent-bg); color: var(--accent-ink); border-radius: var(--r-2xs); padding: 0 1px; }
.palette-item.more .ic { background: transparent; color: var(--ink-3); }
.palette-note { padding: 4px 11px 8px 52px; font-size: var(--fs-xs); color: var(--ink-3); }
.palette-item.more .t { font-weight: var(--fw-medium); color: var(--accent); font-size: var(--fs-sm); }
.palette-foot { display: flex; gap: var(--sp-4); justify-content: flex-end; padding: 8px var(--sp-4); border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--ink-3); background: var(--seg-track); }
.palette-foot .kbd { margin: 0 2px 0 0; }
@media (max-width: 640px) { .palette-foot { display: none; } }
.palette-list { max-height: 56vh; overflow-y: auto; padding: 6px; }
.palette-item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: var(--r-sm); cursor: pointer; }
.palette-item.hl { background: var(--tint-hover); }
.palette-item .ic { width: 30px; height: 30px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--surface-selected); color: var(--accent); flex: 0 0 30px; }
.palette-item .ic svg { width: 16px; height: 16px; }
.palette-item .t { font-weight: var(--fw-semibold); font-size: var(--fs-md); }
.palette-item .s { font-size: var(--fs-sm); color: var(--ink-3); }
.palette-empty { padding: 26px; text-align: center; color: var(--ink-3); }

/* ---------------------------------------------------------------- empty, skeleton, misc */
.empty { text-align: center; padding: 36px 20px; color: var(--ink-3); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .art { width: 132px; margin: -6px 0 -2px; display: block; } /* round 6b: the isometric pedestal */
.empty .art .iso { width: 100%; height: auto; }
.empty h3 { color: var(--ink); }
.sk { background: linear-gradient(90deg, var(--skeleton) 0%, var(--skeleton-shine) 50%, var(--skeleton) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: var(--r-sm); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--accent) 16%, transparent); border-top-color: var(--accent); animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { rotate: 360deg; } }
/* core/loading.js: the one loading indicator. A 2px bar at the top of the
   window while requests run; it runs to the end and fades when they finish. */
.loadbar { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: var(--z-loadbar); overflow: hidden; pointer-events: none; background: var(--accent-bg); }
.loadbar > i { position: absolute; inset: 0 auto 0 0; width: 35%; background: var(--accent); border-radius: 0 var(--r-pill) var(--r-pill) 0; animation: loadbar 1.1s var(--ease-std) infinite; }
@keyframes loadbar { from { translate: -100% 0; } to { translate: 300% 0; } }
.loadbar.done > i { animation: none; width: 100%; translate: 0 0; }
.loadbar.done { animation: fade-out 300ms var(--ease-in) forwards; }
/* busy(button): the label hides (the width stays), a spinner takes its place */
.btn.is-busy, .btn.is-busy:disabled { position: relative; color: transparent !important; opacity: 1; cursor: progress; }
.btn.is-busy::after { content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--ink-2); animation: spin 0.7s linear infinite; }
.btn-primary.is-busy::after, .btn-ok.is-busy::after { border-color: rgba(255, 255, 255, 0.35); border-top-color: var(--on-accent); }
.offline-bar { position: fixed; left: 50%; top: calc(var(--top-h) + var(--sp-2)); translate: -50% 0; z-index: var(--z-toast); max-width: calc(100vw - 32px); padding: 6px var(--sp-4); border-radius: var(--r-pill); background: var(--warn-bg); color: var(--warn); border: 1px solid rgba(217, 119, 6, 0.3); font-size: var(--fs-sm); font-weight: var(--fw-semibold); box-shadow: var(--shadow-md); animation: toast-in 220ms var(--ease-out) backwards; }
.loading-page { display: grid; place-items: center; min-height: 40vh; animation: fade-in var(--t-med) 250ms backwards; } /* no spinner flash on fast pages */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--r-md); background: var(--info-bg); color: var(--info); font-size: var(--fs-md); }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.notice.danger { background: var(--danger-bg); color: var(--danger); }
.notice svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 1px; }
/* 2026-11-28: a notice with a button. On a phone the button goes under the words instead of squeezing them to a word a line */
.notice.wraps { flex-wrap: wrap; align-items: center; }
.notice.wraps > .grow { flex: 1 1 240px; min-width: 0; }

/* Company profile decks at the top of Templates (round 5, views/profile-ui.js) */
#profile { scroll-margin-top: calc(var(--top-h) + var(--sp-4)); } /* jumped to from ⌘K and Proposals: clear of the sticky top bar */
.profile-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--sp-3); }
.profile-card h3 { font-size: var(--fs-lg); }
.pf-ic { width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--accent-bg); color: var(--accent); }
.pf-ic svg { width: 20px; height: 20px; }
.profile-empty { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; border-style: dashed; }
.profile-empty > svg { width: 22px; height: 22px; color: var(--accent); flex: none; }

/* RSVP Platform card on a project's Overview (round 5, views/rsvp-ui.js) */
.rsvp-link { display: flex; gap: var(--sp-2); }
.rsvp-link .input { flex: 1; min-width: 0; }
.rv-main { display: flex; align-items: flex-end; gap: var(--sp-4); flex-wrap: wrap; }
.rv-big { display: flex; align-items: baseline; gap: var(--sp-2); }
.rv-big b { font-family: var(--font-display); font-size: var(--fs-4xl); line-height: var(--lh-none); letter-spacing: var(--ls-tight); }
.rv-big span { font-size: var(--fs-sm); color: var(--ink-3); }
.rv-big em { font-style: normal; font-weight: var(--fw-semibold); color: var(--ok); }
.rv-target { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 4px; padding-bottom: 3px; }
.rv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); margin-top: var(--sp-3); }
.rv-stat { display: flex; flex-direction: column; gap: 1px; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); background: var(--surface-sunken); min-width: 0; }
.rv-stat b { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.rv-stat span { font-size: var(--fs-xs); color: var(--ink-3); }
.rv-stat i { font-style: normal; }
.pc-rsvp { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--ink-2); white-space: nowrap; }
.pc-rsvp svg { width: 13px; height: 13px; color: var(--ok-strong); }
/* Round 20: a pitch's note on cards and rows, the banner on its project, and the proposal's next action */
.pc-pitch { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 8px; border-radius: var(--r-sm); background: var(--warn-bg-soft); color: var(--warn); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.pc-pitch svg { width: 13px; height: 13px; flex: none; }
.kcard .pc-pitch { margin-top: var(--sp-2); }
.pitch-note { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 12px; border-radius: var(--r-md); background: var(--warn-bg); color: var(--warn); font-size: var(--fs-sm); text-decoration: none; }
.pitch-note svg { width: 15px; height: 15px; flex: none; }
.pitch-note:hover { filter: brightness(0.97); }
.na-card { border-left: 3px solid var(--accent); }
.na-card.late { border-left-color: var(--danger); }
.na-list { display: flex; flex-direction: column; }
.na-row { display: flex; align-items: center; gap: var(--sp-2); padding: 7px 0; border-top: 1px solid var(--line); min-width: 0; }
.na-row:first-child { border-top: 0; }
.na-title { flex: 1; min-width: 0; cursor: text; overflow-wrap: anywhere; }
.na-row.done .na-title { color: var(--ink-3); text-decoration: line-through; }
.na-who { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 2px 6px; border-radius: var(--r-sm); background: none; border: 0; cursor: pointer; color: var(--ink-2); }
.na-who:hover { background: var(--surface-sunken); }
.na-due input { border: 0; background: none; color: inherit; font: inherit; width: 8.4rem; padding: 2px 4px; border-radius: var(--r-sm); }
.na-due input:hover { background: var(--surface-sunken); }
.na-add { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3); }
.na-add input[name=text] { flex: 1 1 220px; min-width: 0; }
@media (max-width: 560px) { .na-row { flex-wrap: wrap; } .na-title { flex-basis: calc(100% - 40px); } }
@media (max-width: 480px) { .rv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rsvp-link { flex-direction: column; } }
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 14px; font-size: var(--fs-md); }
.kv dt { color: var(--ink-3); font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.kv dd { margin: 0; min-width: 0; }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.list-plain li:last-child { border-bottom: 0; }
.dropzone { border: 2px dashed color-mix(in srgb, var(--accent) 35%, transparent); border-radius: var(--r-md); padding: 18px; text-align: center; color: var(--ink-3); background: color-mix(in srgb, var(--accent) 3%, transparent); transition: background var(--t-fast), border-color var(--t-fast); cursor: pointer; }
.dropzone.over { background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: var(--accent); }
.dropzone svg { width: 26px; height: 26px; color: var(--accent); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.thumb { position: relative; border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-muted); border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .x { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(8, 14, 32, 0.6); color: var(--on-accent); cursor: pointer; display: grid; place-items: center; opacity: 0; transition: opacity var(--t-fast); }
.thumb:hover .x { opacity: 1; }
.thumb .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 7px 5px; font-size: var(--fs-xs); color: var(--on-accent); background: linear-gradient(transparent, rgba(0, 0, 0, 0.6)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb.file { display: grid; place-items: center; font-size: var(--fs-xs); color: var(--ink-3); padding: 8px; text-align: center; }

/* bank cards */
.bank-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.bank-tile { border-radius: var(--r-lg); padding: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); cursor: pointer; display: flex; flex-direction: column; gap: 8px; transition: box-shadow var(--t-fast) var(--ease-std), border-color var(--t-fast) var(--ease-std); }
.bank-tile:hover { box-shadow: var(--shadow-md); border-color: var(--line-2); text-decoration: none; }
.bank-tile .ic { width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--accent-bg); color: var(--accent); }
.bank-tile .ic svg { width: 22px; height: 22px; }
.bank-tile .n { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: var(--fw-bold); color: var(--ink); }
.bcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.bcard { border-radius: var(--r-lg); background: var(--glass-card); border: 1px solid var(--glass-card-line); box-shadow: var(--glass-card-shadow); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; transition: background var(--t-med) var(--ease-std), box-shadow var(--t-med) var(--ease-std), translate var(--t-med) var(--ease-out); }
.bcard:hover { background: var(--glass-card-hover); box-shadow: var(--pop); translate: 0 -3px; }
.bcard .img { aspect-ratio: 16 / 9; background: var(--surface-muted); display: grid; place-items: center; color: var(--accent); overflow: hidden; }
.bcard .img img { width: 100%; height: 100%; object-fit: cover; }
.bcard .img svg { width: 34px; height: 34px; opacity: 0.55; }
.bcard .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 5px; }
.bcard .t { font-weight: var(--fw-bold); font-size: var(--fs-md); line-height: var(--lh-snug); }
.stars { color: var(--warn-solid); letter-spacing: 1px; font-size: var(--fs-sm); }

/* demo-unit catalog (round 5): spec cards, compare, the item's spec sheet, the printed catalog */
.dcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: var(--sp-3); }
.dcard { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; cursor: pointer; transition: box-shadow var(--t-fast) var(--ease-std), border-color var(--t-fast) var(--ease-std); }
.dcard:hover, .dcard:focus-visible { box-shadow: var(--shadow-md); border-color: var(--line-2); }
.dcard:has(.dc-pick input:checked) { border-color: var(--line-accent); box-shadow: 0 0 0 3px var(--accent-bg), var(--shadow-sm); }
.dc-media { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; background: var(--grad-soft), var(--surface-sunken); }
.dc-media img { width: 100%; height: 100%; object-fit: contain; padding: var(--sp-2); }
.dc-ph svg { width: 56px; height: 56px; color: var(--cta-ink); opacity: 0.45; stroke-width: 1.4; }
.dc-cat, .dc-units { position: absolute; display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: var(--r-pill); background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur-sm); backdrop-filter: var(--glass-blur-sm); border: 1px solid var(--glass-line); font-size: var(--fs-2xs); font-weight: var(--fw-semibold); color: var(--ink-2); }
.dc-cat { left: 10px; top: 10px; }
.dc-units { right: 10px; bottom: 10px; }
.dc-units svg { width: 12px; height: 12px; }
.dc-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; min-width: 0; }
.dc-brand { font-size: var(--fs-2xs); font-weight: var(--fw-heavy); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-3); }
.dc-name { margin: 0; font-size: var(--fs-lg); line-height: var(--lh-snug); }
.dc-specs { margin: 2px 0 0; display: grid; gap: 5px; }
.dc-specs > div { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: center; }
.dc-specs dt { display: grid; place-items: center; color: var(--accent); }
.dc-specs dt svg { width: 15px; height: 15px; }
.dc-specs dd { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-foot { margin-top: auto; padding-top: var(--sp-2); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dc-foot .tiny svg { width: 12px; height: 12px; vertical-align: -2px; margin-right: 3px; }
.dc-avail { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--ink-2); }
.dc-avail::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--ok-solid); }
.dc-avail.held::before { background: var(--warn-solid); }
.dc-avail.busy::before { background: var(--danger-solid); }
.dc-avail.off::before { background: var(--neutral-400); }
.dc-pick { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border-radius: var(--r-pill); background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur-sm); backdrop-filter: var(--glass-blur-sm); border: 1px solid var(--glass-line); font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--ink-2); cursor: pointer; opacity: 0; transition: opacity var(--t-fast) var(--ease-std); }
.dc-pick input { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); }
.dcard:hover .dc-pick, .dcard:focus-within .dc-pick, .dc-pick:has(input:checked) { opacity: 1; }
@media (hover: none) { .dc-pick { opacity: 1; } }
.cmp-bar { position: sticky; bottom: var(--sp-4); z-index: var(--z-sticky); width: fit-content; max-width: 100%; margin: var(--sp-4) auto 0; display: flex; align-items: center; gap: var(--sp-3); padding: 6px 6px 6px 16px; border-radius: var(--r-pill); background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-line); box-shadow: var(--shadow-lg), var(--highlight); }
.cmp-bar[hidden] { display: none; }
.cmp-tbl th[scope="row"] { white-space: nowrap; vertical-align: top; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--ink-3); }
.cmp-tbl th[scope="row"] svg { width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; color: var(--accent); }
.cmp-tbl td { vertical-align: top; min-width: 150px; }
.cmp-head { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.cmp-head img, .cmp-head .dc-ph { width: 100%; height: 72px; object-fit: contain; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--surface-sunken); }
.cmp-head .dc-ph svg { width: 30px; height: 30px; }
.spec-panel { margin-bottom: var(--sp-4); padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.sp-grid { margin: var(--sp-3) 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.sp-grid dt { display: flex; align-items: center; gap: 6px; font-size: var(--fs-2xs); font-weight: var(--fw-heavy); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-3); }
.sp-grid dt svg { width: 14px; height: 14px; color: var(--accent); }
.sp-grid dd { margin: 2px 0 0; font-size: var(--fs-sm); color: var(--ink); overflow-wrap: anywhere; }
.sp-hl { margin-top: var(--sp-3); padding: var(--sp-3); border-radius: var(--r-sm); background: var(--grad-soft); }
.sp-hl p { margin: 4px 0 0; }
.sp-facts { margin-top: var(--sp-3); }
.sp-serials { margin: 6px 0 0; padding: var(--sp-2); border-radius: var(--r-xs); background: var(--surface-sunken); font-family: var(--font-mono); font-size: var(--fs-xs); white-space: pre-wrap; }
@media (max-width: 560px) { .sp-grid { grid-template-columns: minmax(0, 1fr); } .cmp-bar { border-radius: var(--r-md); } }
/* the printed catalog: six cards to an A4 page, nothing internal on it */
.catalog-page { position: relative; }
.doc-page .cat-sub { margin: -4px 0 12px; text-align: center; font-size: 11px; color: var(--doc-ink-3); }
.doc-page .dcards.print { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.doc-page .dcards.print .dcard { cursor: default; box-shadow: none; border-color: var(--doc-line); break-inside: avoid; }
.doc-page .dcards.print .dc-media { aspect-ratio: auto; height: 96px; background: var(--doc-section-bg); }
.doc-page .dcards.print .dc-body { padding: 8px 10px; gap: 4px; }
.doc-page .dcards.print .dc-name { font-size: 13px; }
.doc-page .dcards.print .dc-specs dd { font-size: 9.5px; white-space: normal; color: var(--doc-ink-2); }
.doc-page .dcards.print .dc-specs dt svg { width: 12px; height: 12px; }
.doc-page .dc-hl { margin: 2px 0 0; font-size: 9.5px; color: var(--doc-ink-3); }
.doc-page .cat-foot { position: absolute; left: 14mm; right: 14mm; bottom: 8mm; padding-top: 4px; border-top: 1px solid var(--doc-rule); text-align: center; font-size: 9px; color: var(--doc-ink-3); }

/* approval matrix */
.matrix { border-collapse: separate; border-spacing: 0; width: 100%; font-size: var(--fs-sm); }
.matrix th { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--ink-3); padding: 8px 6px; text-align: center; white-space: nowrap; border-bottom: 1px solid var(--line); background: var(--surface-sunken); position: sticky; top: 0; }
.matrix th:first-child { text-align: left; }
.matrix td { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: center; }
.matrix td:first-child { text-align: left; }
.ap { width: 30px; height: 30px; border-radius: var(--r-sm); border: 1.5px solid var(--line-2); background: var(--surface); cursor: pointer; display: inline-grid; place-items: center; font-weight: var(--fw-heavy); font-size: var(--fs-md); transition: scale var(--t-fast) var(--ease-spring), background var(--t-fast); }
.ap:hover { scale: 1.1; }
.ap.approved { background: var(--ok-bg); border-color: var(--ok-solid); color: var(--ok); }
.ap.changes { background: var(--danger-bg); border-color: var(--danger-solid); color: var(--danger); }
.ap.na { background: var(--surface-muted); color: var(--neutral-400); border-style: dashed; }
.ap.pending { color: var(--neutral-400); }

/* charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--viz-grid); stroke-width: 1; }
.chart .base-line { stroke: var(--viz-baseline); stroke-width: 1; }
.chart .axis-label { font-size: var(--fs-xs); fill: var(--ink-3); font-family: var(--font-body); }
.chart .val-label { font-size: var(--fs-xs); fill: var(--ink-2); font-weight: var(--fw-bold); font-family: var(--font-body); }
.chart .bar-mark { transform-box: fill-box; transform-origin: bottom; animation: grow-y 420ms var(--ease-out) backwards; }
.chart .bar-mark.h { transform-origin: left; animation-name: grow-x; }
.chart .line-mark { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 640ms var(--ease-out) forwards; }
.chart .area-mark { opacity: 0.12; animation: fade-in 400ms 200ms backwards; }
.chart .donut-seg { transition: opacity var(--t-fast); animation: fade-in 320ms backwards; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .dim { opacity: 0.35; }
@keyframes grow-y { from { scale: 1 0; } to { scale: 1 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.tip { position: fixed; z-index: var(--z-tooltip); pointer-events: none; background: var(--surface-inverse); color: var(--on-accent); font-size: var(--fs-sm); padding: 8px 10px; border-radius: var(--r-sm); box-shadow: var(--shadow-lg); max-width: 280px; line-height: var(--lh-normal); }
.tip b { font-weight: var(--fw-bold); }
.tip .row { gap: 6px; }
.tip i { width: 8px; height: 8px; border-radius: var(--r-2xs); display: inline-block; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--fs-sm); color: var(--ink-2); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; cursor: default; }
.legend i { width: 10px; height: 10px; border-radius: var(--r-2xs); display: inline-block; }

/* login: the blue gradient on the left (the Home header's), the three things it does as glass
   cards; a frosted sign-in card on the cool ground on the right */
/* round 5d: the blue runs edge to edge, and the sign-in card floats on it as frosted glass */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--hero-grad); position: relative; isolation: isolate; overflow: hidden; }
.login-art { position: relative; overflow: visible; isolation: isolate; background: none; color: var(--on-accent); padding: 40px 48px 32px; display: flex; flex-direction: column; justify-content: space-between; gap: var(--sp-6); }
.login-art::before { content: ""; position: absolute; z-index: -1; width: 640px; height: 640px; right: -220px; top: -300px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.22); box-shadow: 0 0 0 90px rgba(255, 255, 255, 0.05), 0 0 0 91px rgba(255, 255, 255, 0.12); pointer-events: none; }
.login-brand { display: flex; align-items: center; gap: var(--sp-3); }
.login-brand img { width: 52px; height: 52px; border-radius: var(--r-md); box-shadow: 0 12px 24px -10px rgba(10, 14, 36, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.3); }
.login-brand b { display: block; font-size: var(--fs-4xl); color: var(--on-accent); margin-bottom: 4px; }
.login-brand span { font-size: var(--fs-md); color: rgba(255, 255, 255, 0.82); }
.login-points { list-style: none; margin: var(--sp-8) 0 0; padding: 0; display: grid; gap: var(--sp-3); max-width: 480px; }
.login-points li {
  display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-lg); font-size: var(--fs-md); line-height: var(--lh-normal); color: rgba(255, 255, 255, 0.88);
  background: var(--glass-on-blue); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-on-blue-line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.login-points li:nth-child(2) { margin-left: var(--sp-6); } .login-points li:nth-child(3) { margin-left: var(--sp-3); }
.login-points svg { width: 34px; height: 34px; flex: 0 0 34px; padding: 8px; border-radius: 50%; background: var(--surface); color: var(--accent); }
.login-points b { color: var(--on-accent); font-weight: var(--fw-bold); }
.login-foot { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-xs); color: rgba(255, 255, 255, 0.78); }
.login-foot .ft-logo { height: 26px; width: auto; opacity: 0.9; }
.login-art h1 { color: var(--on-accent); font-size: var(--fs-display); font-weight: var(--fw-heavy); line-height: var(--lh-tight); letter-spacing: var(--ls-tight); max-width: 560px; text-wrap: balance; }
.login-art p { color: rgba(255, 255, 255, 0.86); max-width: 470px; margin-top: 14px; font-size: var(--fs-lg); }
.login-form { position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; padding: 32px 20px; }
/* two still orbs of the brand's light behind the card, so its glass has something to frost */
.login-form::before, .login-form::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.login-form::before { width: 320px; height: 320px; left: calc(50% - 260px); top: calc(50% - 290px); background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.95), var(--brand-1) 34%, var(--brand-3) 92%); box-shadow: 0 40px 80px -30px rgba(10, 14, 60, 0.6); }
.login-form::after { width: 190px; height: 190px; left: calc(50% + 80px); top: calc(50% + 100px); background: radial-gradient(circle at 34% 28%, var(--warm-1), var(--warm-2) 60%, var(--warm-3)); box-shadow: 0 30px 60px -24px rgba(120, 40, 10, 0.55); }
.login-card.glass { background: var(--glass-strong); border-color: var(--glass-line); box-shadow: 0 40px 80px -30px rgba(10, 14, 60, 0.6), var(--highlight); }
/* round 6b: the glass workbench floats behind the card (core/iso.js) instead of the two orbs */
.login-form.has-art::before, .login-form.has-art::after { display: none; }
.login-form.has-art { background: radial-gradient(460px 360px at 50% 50%, color-mix(in srgb, var(--brand-3) 20%, transparent), transparent 70%); }
.login-scene { width: min(560px, 100%); margin: var(--sp-2) 0 calc(var(--sp-8) * -1) calc(var(--sp-6) * -1); pointer-events: none; } /* under the headline, in place of the three feature boxes */
.login-wrap:has(.login-form.has-art) .login-art::before { display: none; } /* the old lens ring would cut through the headline */
.login-scene .iso { width: 100%; height: auto; }
.login-card { width: min(400px, 100%); padding: var(--sp-6); }
.login-card h2 { font-size: var(--fs-3xl); font-weight: var(--fw-heavy); letter-spacing: var(--ls-tight); }
.card.glass { background: var(--glass-overlay); -webkit-backdrop-filter: var(--glass-blur-lg); backdrop-filter: var(--glass-blur-lg); border-color: var(--glass-line); box-shadow: var(--pop); }
@media (max-width: 900px) {
  .login-wrap { grid-template-columns: minmax(0, 1fr); } .login-art { padding: 28px; min-height: 240px; } .login-art h1 { font-size: var(--fs-4xl); } .login-points { display: none; }
  /* the orbs stay inside the form's band on a phone, so nothing is cut at its top edge */
  .login-form::before { width: 200px; height: 200px; left: -30px; top: 6px; } .login-form::after { width: 130px; height: 130px; left: auto; right: -20px; top: auto; bottom: 10px; }
  .login-scene { display: none; }
}

/* ---------------------------------------------------------------- lightbox (receipts, round 15) */
.lightbox { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; grid-template-rows: minmax(0, 1fr) auto; align-items: center; gap: var(--sp-2); padding: var(--sp-4); background: var(--scrim); -webkit-backdrop-filter: var(--scrim-blur); backdrop-filter: var(--scrim-blur); animation: fade-in var(--t-fast) var(--ease-out) backwards; }
.lightbox .lb-stage { grid-column: 2; grid-row: 1; height: 100%; min-height: 0; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; } /* a sized row, so a tall photo fits the screen (2026-10-27: it ran off the bottom) */
.lightbox .lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--r-md); box-shadow: var(--shadow-lg); background: var(--surface); }
.lightbox .lb-stage iframe { width: min(900px, 100%); height: 100%; border: 0; border-radius: var(--r-sm); background: var(--surface); }
.lightbox .lb-nav.prev { grid-column: 1; grid-row: 1; justify-self: center; }
.lightbox .lb-nav.next { grid-column: 3; grid-row: 1; justify-self: center; }
.lightbox .lb-x { position: absolute; top: var(--sp-3); right: var(--sp-3); }
.lightbox .lb-cap { grid-column: 1 / -1; grid-row: 2; display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--glass-overlay); border: 1px solid var(--glass-line); font-size: var(--fs-sm); }
@media (max-width: 720px) { .lightbox { grid-template-columns: 36px minmax(0, 1fr) 36px; padding: var(--sp-2); } .lightbox .lb-cap { flex-direction: column; align-items: flex-start; } }
.rcpt { width: 34px; height: 34px; padding: 0; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-sunken); overflow: hidden; display: inline-grid; place-items: center; cursor: zoom-in; color: var(--ink-3); }
.rcpt img { width: 100%; height: 100%; object-fit: cover; }
/* bulk receipts: what the reader made of each photo, under its description */
.bulk-rc [data-status] svg { width: 12px; height: 12px; vertical-align: -2px; }
.warn-ink { color: var(--warn-strong); }

/* ---------------------------------------------------------------- documents (quotation / PR print) */
/* On screen each document is an A4 sheet. On paper the page margins come
   from @page, so a long quotation or PR flows onto page 2 with the same
   margins, the table head repeats, rows never split, and the totals and the
   signatures stay together (round 7, "the margin break so rough"). */
.doc-page { background: var(--surface); color: var(--doc-ink); width: 210mm; min-height: 297mm; margin: 0 auto 24px; padding: 13mm 13mm 12mm; box-shadow: var(--shadow-lg); font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 10.5px; line-height: 1.35; position: relative; display: flex; flex-direction: column; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc-page > * { flex: none; }
.doc-page.landscape { width: 297mm; min-height: 210mm; padding: 11mm 12mm 10mm; }
.doc-page h1.doc-title { font-family: Arial, sans-serif; color: var(--fokus); font-size: 20px; text-align: center; letter-spacing: 0.04em; margin: 6px 0 12px; font-weight: var(--fw-bold); }
.doc-letter { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 6px; border-bottom: 1px solid var(--doc-rule); }
.doc-letter img { height: 42px; }
.doc-letter .addr { text-align: right; font-size: 10px; color: var(--doc-ink-2); white-space: pre-line; }
.doc-meta { display: grid; grid-template-columns: 90px 10px minmax(0, 1fr); gap: 2px 0; margin: 10px 0 12px; font-size: 10.5px; }
.doc-meta b { font-weight: var(--fw-bold); }
.doc-meta .pending { color: var(--doc-ink-3); font-style: italic; }
.doc-tbl { width: 100%; border-collapse: collapse; font-size: 9.8px; }
.doc-tbl th { background: var(--doc-head-bg); border: 1px solid var(--doc-line-strong); padding: 5px 4px; font-weight: var(--fw-bold); text-align: center; vertical-align: middle; }
.doc-tbl td { border: 1px solid var(--doc-line); padding: 3px 5px; vertical-align: top; }
.doc-tbl td.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.doc-tbl td.c { text-align: center; }
.doc-tbl td.r { text-align: right; }
.doc-tbl tr.sec td { font-weight: var(--fw-bold); background: var(--doc-section-bg); }
.doc-tbl tr.sec td.pkg { background: var(--doc-pkg-bg); }
.doc-tbl tr.sub td { font-weight: var(--fw-bold); font-style: italic; }
.doc-tbl tr.tot td { font-weight: var(--fw-bold); background: var(--doc-total-bg); }
.doc-tbl tr.grand td { border-top: 1.5px solid var(--doc-ink-2); }
/* the quotation's Grand Total (before VAT, fee included): the line the client reads first */
.doc-tbl tr.hl td { background: var(--doc-hl-bg); font-size: 12px; padding-top: 5px; padding-bottom: 5px; border-top: 1.5px solid var(--doc-ink-2); border-bottom: 1.5px solid var(--doc-ink-2); }
.doc-tbl tr.plain td { font-weight: var(--fw-regular); background: none; }
/* the quotation's own table (round 13): the team's green heading, Qty and Freq each one
   heading over the number and its unit, both centred */
.doc-tbl.quo th { background: var(--doc-quo-head); border: 1px solid var(--doc-quo-line); } /* a thin line in a darker green: near-black looked bold */
.doc-tbl.quo td { vertical-align: middle; } /* a long description's numbers sit level with its middle */
.doc-tbl.quo td.q { width: 34px; }
.doc-tbl.quo td.u { width: 46px; }
/* the telemarketing quotation (round 18), as the team's own: no grid, a rule over the
   heading and a heavier one under it, the campaign on green, a package's name on yellow,
   its contents as "- " lines, and the Grand Total on a double rule */
.doc-page.tele h1.doc-title { color: var(--doc-tele-title); font-size: 22px; letter-spacing: 0.01em; margin: 10px 0 14px; }
.doc-page.tele .doc-letter { border-bottom: 0; }
.doc-page.tele .doc-date { font-style: italic; }
.doc-page.tele .doc-meta { font-weight: var(--fw-bold); margin: 14px 0 22px; gap: 5px 0; }
.doc-page.tele .doc-meta .act { background: var(--doc-tele-mark); padding: 2px 4px; margin: -2px -4px; }
.doc-tbl.tele { font-size: 10.5px; }
.doc-tbl.tele th { background: none; border: 0; border-top: 1px solid var(--doc-ink); border-bottom: 2px solid var(--doc-ink); padding: 6px 6px; }
.doc-tbl.tele th + th, .doc-tbl.tele td.n { width: 104px; }
.doc-tbl.tele td { border: 0; padding: 2.5px 6px; vertical-align: top; }
.doc-tbl.tele tbody:not(.doc-totals) tr:first-child td { padding-top: 12px; }
.doc-tbl.tele tbody:not(.doc-totals) tr:last-child td { padding-bottom: 14px; }
.doc-tbl.tele tr.sec td { background: none; padding-left: 20px; }
.doc-tbl.tele tr.ln td:first-child { padding-left: 24px; }
.doc-tbl.tele .band { display: block; padding: 3px 4px; font-weight: var(--fw-bold); }
.doc-tbl.tele .band.g { background: var(--doc-tele-band); }
.doc-tbl.tele .band.y { background: var(--doc-tele-mark); }
.doc-tbl.tele tr.sec td.n { padding-top: 5.5px; font-weight: var(--fw-regular); }
.doc-tbl.tele tbody.doc-totals td { padding-top: 1.5px; padding-bottom: 1.5px; }
.doc-tbl.tele tbody.doc-totals td.r { font-weight: var(--fw-bold); }
.doc-tbl.tele tbody.doc-totals tr:first-child td { border-top: 2px solid var(--doc-ink); padding-top: 4px; }
.doc-tbl.tele tr.tv td.n { border-bottom: 1px solid var(--doc-ink); }
.doc-tbl.tele tr.tg td { font-weight: var(--fw-bold); }
.doc-tbl.tele tr.tg td.n { border-bottom: 3px double var(--doc-ink); }
.doc-page.tele .doc-remarks { font-weight: var(--fw-bold); }
.doc-page.tele .doc-remarks > div { padding-left: 18px; margin-top: 6px; }
/* the Digital and Integrated Campaign quotation (2026-10-26), as the team's own (the IBM digital quotation): the
   telemarketing form's rules and totals, the activity on yellow, a section on green, each package's name on light
   green with its price level with it, its points under it */
.doc-page.campaign h1.doc-title { color: var(--doc-cp-title); }
.doc-tbl.campaign tr.cp-title td:first-child, .doc-tbl.campaign tr.sec td:first-child, .doc-tbl.campaign tr.pk td:first-child { padding-left: 14px; }
.doc-tbl.campaign tr.sec td, .doc-tbl.campaign tr.pk td { padding-top: 4px; }
.doc-tbl.campaign .band.g { background: var(--doc-cp-band); }
.doc-tbl.campaign .band.l { background: var(--doc-cp-pkg); }
.doc-tbl.campaign tr.pk td.n { padding-top: 7px; }
.doc-tbl.campaign tr.ln td:first-child { padding-left: 18px; }
.doc-tbl.campaign .band .sub-line { font-weight: var(--fw-regular); }
/* a revision's new or changed lines, when "Highlight changes" is on */
.doc-page.show-chg .doc-tbl tr.chg td { background: var(--doc-chg-bg); }
.doc-cap { margin: 0 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--doc-rule); font-size: 9.5px; color: var(--doc-ink-3); } /* round 17: which quotation this is, inside a payment request's file */
.doc-page.show-hl .doc-tbl tr.mk td { background: var(--doc-chg-bg); } /* round 17: lines highlighted in the editor */
.doc-chg-note { display: none; margin-top: 6px; font-size: 9px; color: var(--doc-ink-3); }
.doc-chg-note i { display: inline-block; width: 18px; height: 8px; margin-right: 5px; background: var(--doc-chg-bg); border: 1px solid var(--doc-line); vertical-align: baseline; }
.doc-page.show-chg .doc-chg-note { display: block; }
.doc-tbl .desc-lines { white-space: pre-line; }
.doc-tbl .sub-line { color: var(--doc-ink-3); }
.doc-gap { margin-top: 8px; }
/* remarks + signatures, kept on one page */
.doc-end { margin-top: 14px; }
/* A quotation's closing block sits at the foot of the sheet: on screen the page is a column
   with the block pushed down; on paper print.js measures the room left into --push. */
.doc-push { display: none; }
.doc-page > .doc-push + .doc-end { margin-top: auto; padding-top: 14px; }
.doc-page > .doc-push ~ .doc-foot { margin-top: 10px; }
.doc-remarks { margin-bottom: 4px; }
.doc-rate { margin-bottom: 6px; font-size: 9.5px; color: var(--doc-ink-3); }
.doc-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 22px; font-size: 10.5px; }
.doc-sign.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; text-align: center; }
.doc-sign .line { margin-top: 58px; border-top: 1px solid var(--doc-ink-2); padding-top: 3px; font-weight: var(--fw-bold); }
.doc-sign.four .line { margin-top: 46px; }
.doc-sign .when { color: var(--doc-ink-3); font-weight: var(--fw-regular); }
.doc-sign .role { color: var(--doc-ink-2); }
/* the client's signature from the review link (2026-10-26): the picture sits on the line, where a pen would */
.doc-esign img { display: block; height: 52px; max-width: 220px; object-fit: contain; object-position: left bottom; margin: 8px 0 -4px; }
.doc-esign .line { margin-top: 0; }
.doc-esign-note { margin-top: 3px; font-size: 8.5px; color: var(--doc-ink-3); }
.doc-foot { margin-top: auto; padding-top: 10px; font-size: 9px; color: var(--doc-ink-3); text-align: center; }
.doc-foot > div { border-top: 1px solid var(--doc-rule); padding-top: 4px; }
/* draft mark until the quotation is approved and has its number */
.doc-watermark { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; pointer-events: none; z-index: 1; }
.doc-watermark span { transform: rotate(-32deg); font: var(--fw-bold) 36px/1.1 Arial, sans-serif; letter-spacing: 0.06em; color: var(--doc-mark); border: 4px solid var(--doc-mark); padding: 6px 22px; white-space: nowrap; text-align: center; }
/* 2026-10-28: who approved a payment request, under its heading */
.doc-appr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin: 0 0 10px; padding: 6px 10px; border: 1px solid var(--doc-ok); border-left-width: 4px; color: var(--doc-ink); font-size: 10px; }
.doc-appr > b:first-child { color: var(--doc-ok); letter-spacing: 0.04em; }
.doc-appr.wait { border-color: var(--doc-ink-3); } .doc-appr.wait > b:first-child { color: var(--doc-ink-3); }
.doc-appr.no { border-color: var(--doc-mark-ink); } .doc-appr.no > b:first-child { color: var(--doc-mark-ink); }
.doc-appr-via { margin-left: auto; color: var(--doc-ink-3); font-size: 8.5px; }
.doc-draft-note { margin: 0 0 8px; padding: 6px 10px; border: 1px dashed var(--doc-mark-ink); color: var(--doc-mark-ink); font-size: 10px; text-align: center; }
.print-bar { position: sticky; top: var(--top-h); z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 10px; margin-bottom: 10px; }
.print-bar .notice { align-self: center; }
/* the settlement's own pieces (round 15): key numbers, a tick box per row, tagged receipts */
.doc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 10px; }
.doc-kpis > div { border: 1px solid var(--doc-line); border-left: 3px solid var(--fokus); padding: 6px 9px; }
.doc-kpis span { display: block; font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--doc-ink-3); }
.doc-kpis b { display: block; font-size: 13px; margin-top: 1px; }
.doc-kpis i { display: block; font-size: 8.5px; font-style: normal; color: var(--doc-ink-3); }
.doc-kpis .over { border-left-color: var(--doc-mark-ink); } .doc-kpis .over b { color: var(--doc-mark-ink); }
.doc-kpis .left { border-left-color: var(--doc-ok); }
.doc-box { display: inline-block; width: 11px; height: 11px; border: 1px solid var(--doc-ink-2); vertical-align: middle; }
.doc-miss { color: var(--doc-mark-ink); font-style: italic; }
.doc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.doc-note { margin: 8px 0 0; font-size: 9.5px; color: var(--doc-mark-ink); }
.doc-page.rc-sheet { align-items: stretch; }
.doc-page.rc-sheet .rc-intro { margin: -6px 0 10px; text-align: center; font-size: 9.5px; color: var(--doc-ink-3); }
.doc-page .rc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7mm 6mm; }
.doc-page .rc-card { margin: 0; padding: 6px; border: 1px solid var(--doc-line); break-inside: avoid; display: flex; flex-direction: column; gap: 3px; }
.doc-page .rc-card .rc-tag { display: flex; align-items: center; gap: 6px; font-size: 9.5px; color: var(--doc-ink-2); }
.doc-page .rc-card .rc-tag b { background: var(--fokus); color: var(--surface); padding: 1px 7px; font-size: 12px; border-radius: var(--r-2xs); }
.doc-page .rc-card .rc-amt { margin-left: auto; font-weight: var(--fw-bold); font-size: 11px; color: var(--doc-ink); }
.doc-page .rc-card .rc-what { font-size: 10.5px; font-weight: var(--fw-bold); }
.doc-page .rc-card .rc-who, .doc-page .rc-card .rc-part { font-size: 9px; color: var(--doc-ink-3); }
.doc-page.attach .rc-card img { width: 100%; max-height: 98mm; margin: 3px 0 0; object-fit: contain; border: 0; border-top: 1px solid var(--doc-rule); padding-top: 4px; }
/* a file attached to a payment request (an invoice, the PO), one page each */
.doc-page.attach { align-items: center; }
.doc-page.attach .att-cap { align-self: stretch; margin-bottom: 8px; padding-bottom: 5px; border-bottom: 1px solid var(--doc-rule); font-size: 10px; color: var(--doc-ink-3); }
.doc-page.attach img { display: block; margin: 0 auto; max-width: 100%; max-height: 245mm; object-fit: contain; border: 1px solid var(--doc-rule); }
.doc-page.attach.landscape img { max-height: 165mm; }
.doc-page.attach ul { align-self: stretch; margin: 0; padding-left: 16px; }
/* Fit to one page (print.js): measured at the printed width, then shrunk on paper only */
.doc-page.measure { width: var(--measure-w) !important; min-height: 0 !important; padding: 0 !important; display: block; }
.doc-page.measure .doc-foot { margin-top: 10mm; }
/* Round 17: the sheets being made into a PDF file (core/sheet-pdf.js): laid out as on paper, off screen */
.print-host { position: fixed; left: -20000px; top: 0; width: 1400px; visibility: hidden; pointer-events: none; }
.pdf-make .doc-page { box-shadow: none; margin: 0; }
.pdf-make .doc-push { display: block; height: var(--push, 0); }
.pdf-make .doc-page > .doc-push ~ .doc-foot { margin-top: 4mm; }
.pdf-make .doc-watermark, .pdf-make .print-bar { display: none; }
@media print {
  @page { size: A4; margin: 12mm 12mm 13mm; @bottom-right { content: "Page " counter(page) " of " counter(pages); font-family: Arial, sans-serif; font-size: 8pt; color: var(--doc-ink-3); } }
  html, body { background: var(--surface) !important; }
  /* nothing of the app's own floating UI on paper (the loading bar is fixed, so it printed on every page) */
  body::before, body::after, .side, .topbar, .print-bar, .no-print, .toasts, .loadbar, .offline-bar, .tip, .suggest, .scrim, .palette,
  .cel-layer, .cel-spark, .cel-points, .cel-bird, .cel-confetti, .cel-finale, .drag-ghost { display: none !important; }
  /* only the page itself: anything in flow before a landscape sheet (the empty
     #phoneNudge bar did it) opened a blank portrait page first */
  .shell > :not(.main), .main > :not(#main), body > :not(#root) { display: none !important; } /* body's other children: the skip link, the "Your day" card, toasts, dialogs */
  .shell { display: block !important; }
  .content { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .doc-page { box-shadow: none !important; margin: 0 !important; padding: 0 !important; width: auto !important; min-height: 0 !important; display: block; }
  .doc-page + .doc-page { break-before: page; }
  .doc-page.fit { zoom: var(--fit); width: var(--fit-w) !important; }
  .doc-page.landscape { page: landscape; }
  .doc-letter, h1.doc-title, .doc-meta { break-after: avoid; }
  .doc-tbl thead { display: table-header-group; }
  .doc-tbl tr { break-inside: avoid; }
  .doc-tbl tbody.doc-totals, .doc-end, .doc-foot { break-inside: avoid; }
  .doc-tbl tr.sec { break-after: avoid; }
  .doc-tbl tr.sub { break-before: avoid; }
  .doc-foot { margin-top: 10mm; }
  .doc-push { display: block; height: var(--push, 0); break-after: avoid; }
  .doc-page > .doc-push ~ .doc-foot { margin-top: 4mm; }
  /* fixed boxes repeat on every printed page */
  .doc-watermark { position: fixed; }
  .doc-page .cat-foot { position: static; margin-top: 8mm; }
}
@page landscape { size: A4 landscape; margin: 10mm 12mm 12mm; @bottom-right { content: "Page " counter(page) " of " counter(pages); font-family: Arial, sans-serif; font-size: 8pt; color: var(--doc-ink-3); } }

/* quotation editor */
/* Round 25: the lines get the page's whole width. Totals, next steps and tips are one panel (the
   "dock"): at the side of the page when there is room (.dock-side), or floating over the bottom-right
   corner (.dock-float), where it can be minimised to a pill with the grand total (.dock-min). */
.qe { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.qe.dock-side { grid-template-columns: minmax(0, 1fr) 320px; }
.qe-dock { display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; }
.qe.dock-side .qe-dock { position: sticky; top: calc(var(--top-h) + 12px); max-height: calc(100vh - var(--top-h) - 24px); overflow-y: auto; scrollbar-width: thin; }
.qe.dock-side .qe-dock-head { justify-content: flex-end; }
.qe.dock-side .qe-dock-head .seg, .qe.dock-side .qe-min { display: none; }
.qe-dock-head { display: flex; align-items: center; gap: var(--sp-2); }
.qe-pane h3 { margin: 0; }
.qe-bar { display: none; }
/* floating: a bar with the totals at the foot of the page, and the panel popping up above it */
.qe.dock-float .qe-bar { position: sticky; bottom: var(--sp-3); z-index: var(--z-sticky); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-4);
  padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-5); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
/* 2026-10-28 (the user: "so many numbers that stand out in bold"): one number leads, the total before VAT;
   the fee and the total with VAT beside it in plain type; margin and room as small chips. Subtotal and VAT
   are in the Totals panel. */
.qb-main { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-6); min-width: 0; }
.qb-lead { display: flex; flex-direction: column; min-width: 0; }
.qb-lead i { font-style: normal; font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; }
.qb-lead b { font-family: var(--font-display); font-size: var(--fs-3xl); font-weight: var(--fw-semibold); line-height: var(--lh-tight); font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: var(--ls-snug); }
.qb-side { display: flex; flex-direction: column; gap: 2px; padding-left: var(--sp-5); border-left: 1px solid var(--line); min-width: 0; }
.qb-side:empty { display: none; }
.qb-side > span { display: flex; align-items: baseline; gap: var(--sp-3); justify-content: space-between; font-size: var(--fs-sm); color: var(--ink-3); white-space: nowrap; }
.qb-side i { font-style: normal; }
.qb-side em { font-style: normal; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.qb-chip { font-size: var(--fs-xs); font-weight: var(--fw-medium); padding: 3px 10px; border-radius: var(--r-pill); white-space: nowrap; }
.qb-chip.ok { background: var(--ok-bg); color: var(--ok); }
.qb-chip.low { background: var(--warn-bg); color: var(--warn); }
.qb-acts { display: flex; gap: var(--sp-2); margin-left: auto; }
.qe-bar .btn[aria-expanded="true"] { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 760px) { .qb-side { display: none; } }
.qe.dock-float .qe-dock { position: fixed; right: var(--sp-6); bottom: 92px; z-index: var(--z-sticky); width: min(360px, calc(100vw - 2 * var(--sp-4))); max-height: min(72vh, 680px); gap: var(--sp-2);
  padding: var(--sp-3); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: qe-pop var(--t-slow) var(--ease-out); }
.qe.dock-float .qe-pane { display: none; border: 0; box-shadow: none; background: transparent; padding: var(--sp-2) var(--sp-1) var(--sp-1); overflow-y: auto; scrollbar-width: thin; min-height: 0; }
.qe.dock-float .qe-pane.on { display: block; }
.qe.dock-float .qe-pane[data-pane="totals"] > .row:first-child h3, .qe.dock-float .qe-pane[data-pane="steps"] > h3, .qe.dock-float .qe-pane[data-pane="tips"] > h3 { display: none; }
.qe.dock-float .qe-pane[data-pane="totals"] > .row:first-child { justify-content: flex-end; }
.qe.dock-float.dock-min .qe-dock { display: none; }
@keyframes qe-pop { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .qe.dock-float .qe-dock { animation: none; } }
@media (max-width: 560px) { .qe.dock-float .qe-dock { right: var(--sp-3); } }
@media print { .qe-dock, .qe-bar { display: none; } }
.pr-group { overflow: hidden; }
/* The lines' heading sticks under the top bar while the page scrolls. It can only do that when no
   box around it scrolls: `overflow: hidden` here made the table its own scroll box, so the heading
   was pushed down over the first lines (the "top item cropped" bug, round 25). `clip` keeps the
   rounded corners without that. Where the table has to scroll sideways, the heading stays put. */
.qe-lines { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: clip; }
@media (max-width: 1340px) { .pr-group { overflow-x: auto; } .qe-scroll { overflow-x: auto; } .qe-lines { min-width: 1080px; } .qe-lines .ql.head { position: static; } }
.qe.dock-side .qe-scroll { overflow-x: auto; }
.qe.dock-side .qe-lines { min-width: 1080px; }
.qe.dock-side .qe-lines .ql.head { position: static; }
.ql { display: grid; grid-template-columns: 28px minmax(220px, 1fr) 120px 70px 72px 60px 72px 124px 110px 28px; gap: 6px; align-items: start; padding: 6px 8px; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
/* 2026-10-26: the Freq columns left off (the quotation's showFreq): two columns fewer, a note spans five */
.qe-lines.no-freq { --note-span: 5; }
.qe-lines.no-freq .ql { grid-template-columns: 28px minmax(220px, 1fr) 120px 70px 72px 124px 110px 28px; }
.qe-lines.no-freq .qf { display: none; }
.ql.head { background: var(--surface-sunken); font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--ink-3); align-items: center; position: sticky; top: var(--top-h); z-index: 2; }
.ql.section { background: var(--surface-selected); }
/* Round 17: a line someone highlighted (kept with the quotation), and the line being edited */
.ql.hl, .ql.section.hl { background: var(--warn-bg); box-shadow: inset 3px 0 0 var(--warn-strong); }
.ql:focus-within { background: var(--surface-selected); }
.ql.hl:focus-within { background: var(--warn-bg); }
/* Round 17: Actual / Real and Claim / PO. Labels in the app only; the two quotations of one number and the client's saving */
.quo-kind.k-claim { background: var(--kind-claim-bg); color: var(--kind-claim); }
.quo-kind.k-actual { background: var(--kind-actual-bg); color: var(--kind-actual); }
.quo-kind.k-quotation { background: var(--kind-single-bg); color: var(--kind-single); }
.quo-opt { background: var(--warn-bg); color: var(--warn); }
.pair-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.pair-bar > .grow { min-width: 0; }
.pair-nums { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2) var(--sp-4); margin-top: var(--sp-1); font-size: var(--fs-sm); color: var(--ink-2); }
.pair-nums b { color: var(--ink); font-variant-numeric: tabular-nums; }
.pair-nums .pos b { color: var(--ok); } .pair-nums .neg b { color: var(--danger); }
/* Round 17: the emails of a payment request, one thread */
.pr-thread { display: flex; flex-direction: column; gap: var(--sp-2); }
.pr-mail { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-1) var(--sp-3); padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.pr-mail:last-child { border-bottom: 0; }
.pr-mail .who { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.pr-mail .txt { grid-column: 1 / -1; padding: 0; border: 0; background: none; font: inherit; font-size: var(--fs-sm); color: var(--ink-2); text-align: left; white-space: pre-line; overflow-wrap: anywhere; cursor: pointer; }
.pr-mail .txt.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mail-steps { display: flex; flex-direction: column; gap: var(--sp-1); font-size: var(--fs-sm); color: var(--ink-2); }
.mail-steps .on { color: var(--ink); font-weight: var(--fw-semibold); }
.mail-steps .done { color: var(--ok); }
.ql.section textarea { font-weight: var(--fw-bold); }
.ql.note textarea { font-style: italic; color: var(--ink-2); }
.ql textarea, .ql input, .ql select { width: 100%; border: 1px solid transparent; background: transparent; font: inherit; font-size: var(--fs-sm); padding: 4px 6px; border-radius: var(--r-xs); color: var(--ink); resize: none; min-height: 28px; }
.ql textarea { field-sizing: content; min-height: 28px; line-height: var(--lh-normal); }
.ql textarea:hover, .ql input:hover, .ql select:hover { border-color: var(--line-2); }
.ql textarea:focus, .ql input:focus, .ql select:focus { border-color: var(--accent); background: var(--surface); outline: none; box-shadow: var(--ring); }
.ql input.n { text-align: right; font-variant-numeric: tabular-nums; }
/* Bulk editing (2026-10-05): a tick box in the handle's place, and a bar of actions. */
.ql-pick { width: 20px; height: 20px; margin-top: 4px; border-radius: var(--r-2xs); border: 1.5px solid var(--line-2); background: var(--surface); display: grid; place-items: center; cursor: pointer; padding: 0; color: var(--accent-ink); }
.ql-pick.on { background: var(--accent); border-color: var(--accent); }
.ql-pick svg { width: 13px; height: 13px; }
.qe-bulk { position: sticky; top: calc(var(--top-h) + 4px); z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--surface-selected); border: 1px solid var(--line-accent); }
.ql .amt { text-align: right; font-weight: var(--fw-bold); padding: 5px 4px; font-variant-numeric: tabular-nums; }
.ql .handle { cursor: grab; color: var(--ink-4); padding-top: 6px; display: grid; place-items: center; }
.ql .handle svg { width: 14px; height: 14px; }
.ql.dragover { box-shadow: inset 0 2px 0 var(--accent); }
/* 2026-10-28: lines picked with Shift / ⌘ / Ctrl, as in a spreadsheet */
.ql.picked { background: var(--accent-bg); box-shadow: inset 3px 0 0 var(--accent); }
.ql.picked textarea, .ql.picked input, .ql.picked select { background: transparent; }
.ql .sec-sub { text-align: right; font-weight: var(--fw-bold); padding: 5px 4px; }
.ql .margin-low { color: var(--danger); }
.qe-add { display: flex; gap: 6px; padding: 8px; flex-wrap: wrap; align-items: center; background: var(--surface-sunken); }
.qe-add-sep { width: 1px; align-self: stretch; margin: 2px 4px; background: var(--line-2); }

.suggest { position: fixed; z-index: var(--z-suggest); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 5px; width: 420px; max-height: 280px; overflow-y: auto; }
.suggest .opt { display: flex; justify-content: space-between; gap: 10px; padding: 6px 9px; border-radius: var(--r-xs); cursor: pointer; font-size: var(--fs-sm); }
.suggest .opt:hover, .suggest .opt.hl { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.totals { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; font-size: var(--fs-md); }
.totals .n { text-align: right; font-variant-numeric: tabular-nums; font-weight: var(--fw-semibold); }
.totals .big { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: var(--fw-bold); }
.totals .sep { grid-column: 1 / -1; height: 1px; background: var(--line); margin: 4px 0; }
/* 2026-10-20: in a narrow side panel the amounts crushed the labels to one word a line: there each
   amount goes under its label instead */
[data-totals] { container: qtotals / inline-size; }
@container qtotals (max-width: 340px) {
  .totals { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .totals > span:not(.n):not(.sep) { margin-top: var(--sp-2); }
  .totals .n { text-align: left; overflow-wrap: anywhere; }
}

/* POE builder */
.poe-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .poe-layout { grid-template-columns: minmax(0, 1fr); } }
.poe-nav { position: sticky; top: calc(var(--top-h) + 12px); }
.poe-nav a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--r-sm); color: var(--ink-2); font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.poe-nav a:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); text-decoration: none; }
.poe-nav a .cnt { margin-left: auto; font-size: var(--fs-xs); color: var(--ink-3); }
.poe-sec { scroll-margin-top: calc(var(--top-h) + 12px); }
.poe-item { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px; background: var(--surface); margin-bottom: 10px; }
.poe-item.missing { border-color: rgba(234, 179, 8, 0.5); background: var(--warn-bg-soft); }

/* mobile capture page */
.capture { max-width: 480px; margin: 0 auto; padding: 18px 16px 40px; }
.capture .snap { width: 100%; aspect-ratio: 4 / 3; border-radius: var(--r-lg); border: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 5%, transparent); display: grid; place-items: center; overflow: hidden; cursor: pointer; }
.capture .snap img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------- reduced motion (tiered) */
@media (prefers-reduced-motion: reduce) {
  .appear, .stagger > *, .modal, .drawer, .pop, .palette-box, .toast { animation-duration: 150ms !important; animation-name: fade-in !important; animation-delay: 0ms !important; }
  .backdrop.out, .backdrop.out .modal, .drawer.out, .drawer-back.out, .toast.out { animation: none !important; }
  .loadbar > i { animation: none; width: 100%; opacity: 0.6; } /* a still bar: something is loading */
  .btn:active:not(:disabled) { scale: 1; }
  .chart .bar-mark, .g-bar { animation: none !important; }
  .chart .draw { animation: none !important; stroke-dashoffset: 0 !important; }
  .bar > i, .side-level .sl-bar > i { transition: none; }
  .stat.link:hover, .pcard:hover, .prow:hover, .bcard:hover, .card.link:hover, a.card:hover, .hero-next:hover, .btn-primary:hover { translate: none; }
  .brand:hover .brand-mark, .hero-next:hover, .btn-light:hover { translate: none; }
  .sk { animation: none; }
}

/* editable page titles (trip, proposal, POE) and small labelled fields */
.page-head > div:first-child:has(.title-edit) { flex: 1 1 420px; min-width: 0; }
.title-edit { font: var(--fw-bold) var(--fs-3xl) var(--font-display) !important; border-color: transparent !important; background: transparent !important; box-shadow: none !important; padding-left: 0 !important; width: 100%; max-width: 820px; min-width: 0; flex: 1 1 auto; text-overflow: ellipsis; }
.title-edit:hover { border-color: var(--line-2) !important; padding-left: 8px !important; }
.title-edit:focus { border-color: color-mix(in srgb, var(--accent) 50%, transparent) !important; background: var(--surface) !important; padding-left: 8px !important; }
.mf { display: flex; flex-direction: column; gap: 3px; margin: 0; }
.mf > span { font-size: var(--fs-2xs); font-weight: var(--fw-bold); color: var(--ink-3); letter-spacing: var(--ls-wide); }

/* two-column page layouts (project overview, client) stack on small screens */
.split { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .kv { grid-template-columns: 110px minmax(0, 1fr) !important; } }

/* small screens: segmented controls and loose tables scroll instead of widening the page */
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 0 0 auto; }
@media (max-width: 720px) {
  .card > table.tbl, .card > div:not(.tbl-wrap) > table.tbl { display: block; overflow-x: auto; }
  .page-head > * { max-width: 100%; min-width: 0; }
}
.proj-side { align-items: flex-end; }
@media (max-width: 720px) { .proj-side { align-items: flex-start; } }

/* ---------------------------------------------------------------- round 2: approvals, access, WhatsApp, rate card */
.approval-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow-sm); }
.approval-bar > .row > svg { width: 20px; height: 20px; flex: 0 0 20px; color: var(--ink-3); }
.approval-bar.s-pending { border-color: rgba(217, 119, 6, 0.35); background: var(--warn-bg-soft); }
.approval-bar.s-pending > .row > svg { color: var(--warn-strong); }
.approval-bar.s-approved { border-color: rgba(22, 163, 74, 0.3); background: var(--ok-bg-soft); }
.approval-bar.s-approved > .row > svg { color: var(--ok-strong); }
.approval-bar.s-changes { border-color: rgba(220, 38, 38, 0.3); background: var(--danger-bg-soft); }
.approval-bar.s-changes > .row > svg { color: var(--danger); }
.wa-btn svg { color: var(--ok-strong); }
.appr-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 11px 0; border-bottom: 1px solid var(--line); }
.appr-row:last-child { border-bottom: 0; }
.locked-page { max-width: 640px; margin: 6vh auto 0; text-align: center; padding: 34px 28px; }
.locked-page h1 { font-size: var(--fs-3xl); margin-top: 14px; }
.locked-page form { text-align: left; }
.lock-art { width: 56px; height: 56px; margin: 0 auto; border-radius: var(--r-lg); display: grid; place-items: center; background: var(--accent-bg); color: var(--accent); }
.lock-art svg { width: 28px; height: 28px; }
.center-row { justify-content: center; }
/* locked views (round 5): the page's shape, blurred, behind a frosted lock card */
.locked-wrap { position: relative; min-height: 76vh; }
.locked-ghost { filter: blur(7px) saturate(0.85); opacity: 0.8; pointer-events: none; user-select: none; }
.locked-ghost .gh-line { height: 10px; border-radius: var(--r-pill); background: var(--skeleton); margin: 10px 0; }
.locked-ghost .gh-head { padding: 22px; overflow: hidden; background: radial-gradient(700px 200px at 0% 0%, color-mix(in srgb, var(--c) 14%, transparent), transparent 70%), var(--surface); }
.locked-ghost .gh-head::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c); }
.locked-ghost .gh-title { font-size: var(--fs-3xl); font-weight: var(--fw-heavy); letter-spacing: var(--ls-tight); color: var(--ink-2); }
.locked-ghost .gh-steps { display: flex; gap: 14%; margin-top: 18px; }
.locked-ghost .gh-steps i { width: 30px; height: 30px; border-radius: 50%; background: var(--skeleton); flex: none; }
.locked-veil { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-start; padding: 7vh 12px 24px; background: linear-gradient(180deg, var(--veil-1), var(--veil-2)); }
.locked-card { width: min(540px, 100%); text-align: center; padding: 30px 28px 26px; }
.locked-card h1 { font-size: var(--fs-3xl); font-weight: var(--fw-heavy); letter-spacing: var(--ls-tight); }
.locked-card form.left { text-align: left; }
.lock-badge { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: var(--r-xl); display: grid; place-items: center; background: var(--grad-cta); color: var(--on-accent); box-shadow: 0 12px 28px -12px color-mix(in srgb, var(--brand-2) 70%, transparent), var(--cta-edge); }
.lock-badge svg { width: 30px; height: 30px; }
/* another team's project in a list: a lock and a blurred stand-in */
.masked { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); white-space: nowrap; }
.masked svg { width: 12px; height: 12px; flex: none; color: var(--ink-3); }
.masked .blurred { filter: blur(3.5px); user-select: none; }
/* "← where you came from" in the top bar */
.back-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 240px; height: 30px; padding: 0 12px 0 8px; margin-right: 6px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--glass); color: var(--ink-2); font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold); cursor: pointer; flex: none; box-shadow: var(--highlight); transition: border-color var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std); }
.back-chip:hover { border-color: var(--line-hover); color: var(--accent); }
.back-chip svg { width: 15px; height: 15px; flex: none; }
@media (max-width: 720px) { .back-chip span { display: none; } .back-chip { padding: 0 8px; } }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: 0 0 42px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: var(--r-pill); background: var(--neutral-300); transition: background var(--t-fast); }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: translate var(--t-fast) var(--ease-out); }
.switch input:checked + i { background: var(--ok-strong); }
.switch input:checked + i::after { translate: 18px 0; }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.tpl-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 46vh; overflow: auto; padding: 2px; }
@media (max-width: 640px) { .tpl-pick { grid-template-columns: minmax(0, 1fr); } }
.tpl-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--line-2); border-radius: var(--r-md); cursor: pointer; background: var(--surface); }
.tpl-opt > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tpl-opt:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.tpl-card h3 { font-size: var(--fs-lg); }
.tbl.rc td { vertical-align: top; }
.photo-credit { font-size: var(--fs-2xs); color: var(--ink-3); }
.photo-credit a { color: inherit; text-decoration: underline; }
.linked-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.linked-photos figure { margin: 0; }
.linked-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); display: block; background: var(--surface-muted); }
.phone-nudge { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 22px 0; padding: 10px 14px; border-radius: var(--r-md); background: var(--ok-bg-soft); border: 1px solid rgba(22, 163, 74, 0.25); font-size: var(--fs-md); }
/* Round 32: "Your day" docked under the top bar as a strip (#dayStrip), where it pushes the page down
   instead of covering it (the card slid in over the content until dismissed). */
.day-strip { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin: 12px 22px 0; padding: 8px 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: var(--fs-sm); }
.day-strip .cc-ic { width: 32px; height: 32px; }
.day-strip .ds-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.day-strip .ds-text b { font-size: var(--fs-md); }
.day-strip .ds-text > span { font-size: var(--fs-xs); color: var(--ink-3); }
.day-strip .ds-sugs { display: flex; gap: var(--sp-2); flex-wrap: wrap; flex: 1 1 240px; min-width: 0; }
.day-strip .ds-sugs .chip { max-width: 320px; text-decoration: none; }
.day-strip .ds-sugs .chip svg { width: 14px; height: 14px; flex: none; }
.day-strip .ds-sugs .sug-pts { margin-left: 2px; }
.day-strip .ds-acts { display: flex; align-items: center; gap: var(--sp-1); margin-left: auto; }
@media (max-width: 720px) { .day-strip { margin: 10px 12px 0; } .day-strip .ds-sugs { flex-basis: 100%; } }
/* stat tiles that open what they count (round 32) take the keyboard too */
.stat.link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.phone-nudge > svg { color: var(--ok-strong); width: 20px; height: 20px; }
@media (max-width: 720px) { .phone-nudge { margin: 10px 12px 0; } }
.budget-bar { position: relative; height: 12px; border-radius: var(--r-pill); background: var(--surface-muted); overflow: visible; }
.budget-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--r-pill); transition: width 600ms var(--ease-out); }
.budget-bar .mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: color-mix(in srgb, var(--ink) 35%, transparent); border-radius: var(--r-2xs); }
.budget-card.s-over { border: 1px solid rgba(220, 38, 38, 0.3); }
.budget-card.s-watch { border: 1px solid rgba(217, 119, 6, 0.3); }
.budget-card .stats { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.od-open { display: inline-block; font-size: var(--fs-2xs); font-weight: var(--fw-bold); color: var(--warn); background: var(--warn-bg); border-radius: var(--r-xs); padding: 1px var(--sp-2); }
/* On the day (round 5): event days as a list of checklists, read top to bottom */
.od-week { margin-bottom: var(--sp-6); }
.od-week-h { display: flex; align-items: baseline; gap: var(--sp-2); margin: 0 0 var(--sp-3); font-size: var(--fs-lg); }
.od-week-h span { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ink-3); }
.od-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: var(--sp-3); align-items: start; }
.od-card { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.od-card.now { border-color: var(--ok-strong); box-shadow: 0 0 0 3px var(--ok-bg), var(--shadow-sm); }
.od-card-head { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); cursor: pointer; }
.od-card-name { margin: 4px 0 2px; font-size: var(--fs-lg); line-height: var(--lh-snug); }
.od-card-name a { color: var(--ink); text-decoration: none; }
.od-card-name a:hover { color: var(--accent); }
.od-card-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.od-when { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-2xs); font-weight: var(--fw-bold); color: var(--ink-3); white-space: nowrap; }
.od-when svg { width: 12px; height: 12px; }
.od-when.now { color: var(--ok); }
.od-when.past { color: var(--ink-4); }
.od-meter { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; }
.od-meter b { color: var(--ink); font-variant-numeric: tabular-nums; }
.od-meter .gap b { color: var(--warn); }
.od-meter .all b { color: var(--ok); }
.od-days { display: flex; gap: var(--sp-1); overflow-x: auto; padding: 0 var(--sp-4) var(--sp-2); }
.od-days button { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 var(--sp-2); border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--ink-2); cursor: pointer; }
.od-days button.on { background: var(--ink); border-color: var(--ink); color: var(--on-accent); }
.od-days button svg { width: 12px; height: 12px; color: var(--ok-strong); }
.od-days button.on svg { color: inherit; }
.od-grp-h { padding: 6px var(--sp-4); background: var(--surface-sunken); border-top: 1px solid var(--line); font-size: var(--fs-2xs); font-weight: var(--fw-heavy); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-3); }
.od-list { list-style: none; margin: 0; padding: 0; }
.od-row { display: flex; align-items: flex-start; gap: var(--sp-3); padding: 9px var(--sp-4); border-top: 1px solid var(--line); }
.od-list .od-row:first-child { border-top: 0; }
.od-row.open { background: var(--warn-bg-soft); }
.od-row.hit { box-shadow: inset 3px 0 0 var(--warn-solid); background: var(--warn-bg-soft); }
.od-row.ticked .od-rname { color: var(--ink-3); }
.od-row-main { display: grid; grid-template-columns: minmax(120px, 38%) minmax(0, 1fr); gap: 2px var(--sp-3); flex: 1; min-width: 0; align-items: baseline; }
.od-row-main > :nth-child(n + 3) { grid-column: 2; }
.od-rname { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.od-who { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.od-who-p { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: var(--r-pill); background: var(--surface-selected); font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--accent-ink); }
.od-who-p.crew { background: var(--surface-muted); color: var(--ink-2); }
.od-who-p.out { background: transparent; border: 1px dashed var(--line-2); color: var(--ink-2); font-weight: var(--fw-medium); }
.od-who-p.clash { background: var(--danger-bg); color: var(--danger); }
.od-who-p.hit { box-shadow: 0 0 0 2px var(--warn-solid); }
.od-who-p svg { width: 12px; height: 12px; }
.cs-tick.sm { width: 20px; height: 20px; margin-top: 0; }
.cs-tick.sm svg { width: 12px; height: 12px; }
.od-unplanned { display: flex; align-items: center; gap: var(--sp-3); margin: 0 var(--sp-4) var(--sp-4); padding: var(--sp-3); border-radius: var(--r-md); border: 1px dashed var(--line-2); background: var(--surface-sunken); }
.od-unplanned > svg { width: 22px; height: 22px; flex: none; color: var(--ink-4); }
.od-unplanned > div { flex: 1; min-width: 0; }
.od-none { padding: var(--sp-2) var(--sp-4) var(--sp-3); }
.od-card-foot { margin-top: auto; padding: var(--sp-2) var(--sp-4); border-top: 1px solid var(--line); }
.od-card-foot a { display: inline-flex; align-items: center; gap: 4px; }
.od-card-foot svg { width: 13px; height: 13px; }
@media (max-width: 560px) { .od-cards { grid-template-columns: minmax(0, 1fr); } .od-row-main { grid-template-columns: minmax(0, 1fr); } .od-row-main > :nth-child(n + 3) { grid-column: 1; } .od-card-head .date-badge { display: none; } }
/* schedule clashes (on-the-day board and project tab) */
.clash-panel { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.clash-panel.warn { border-color: rgba(217, 119, 6, 0.35); }
.clash-panel.danger { border-color: var(--line-danger); }
.clash-panel > summary { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; padding: var(--sp-2) var(--sp-3); cursor: pointer; list-style: none; font-size: var(--fs-md); }
.clash-panel > summary::-webkit-details-marker { display: none; }
.clash-panel.warn > summary { background: var(--warn-bg); color: var(--warn); }
.clash-panel.danger > summary { background: var(--danger-bg); color: var(--danger); }
.clash-panel > summary > svg { width: 17px; height: 17px; }
.clash-panel > summary .tiny { margin-left: auto; }
.clash-items { list-style: none; margin: 0; padding: 0; }
.clash-item { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.clash-item .stage { flex: 0 0 auto; margin-top: 1px; }
.dr-clash-row td:first-child { box-shadow: inset 3px 0 0 var(--danger-solid); }
.pic-chip.clash { border-color: var(--line-danger); background: var(--danger-bg); color: var(--danger); }
.pic-chip.clash > svg { width: 13px; height: 13px; }
/* booking form: live availability */
.clash-box { display: flex; align-items: flex-start; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); font-size: var(--fs-sm); }
.clash-box > svg { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 1px; }
.clash-box.ok { background: var(--ok-bg); color: var(--ok); }
.clash-box.warn { background: var(--warn-bg); color: var(--warn); }
.clash-box.danger { background: var(--danger-bg); color: var(--danger); }
.clash-box .muted, .clash-box .tiny { color: inherit; opacity: 0.85; }
.clash-list { margin: var(--sp-1) 0; padding-left: var(--sp-4); color: var(--ink); }
.clash-list li + li { margin-top: 3px; }
.clash-list .stage { margin-right: var(--sp-1); }
/* find a person on the board / quick find in the editor */
.od-find { width: 200px; }
.od-find-res { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-3); border-radius: var(--r-md); background: var(--warn-bg-soft); border: 1px solid rgba(217, 119, 6, 0.3); }
.od-find-res ul { margin: 0; padding-left: var(--sp-4); font-size: var(--fs-sm); }
.od-find-res > svg, .od-find-res.muted svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: var(--sp-1); }
.qf-kind { flex: 0 0 auto; font-size: var(--fs-3xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-3); background: var(--surface-muted); border-radius: var(--r-2xs); padding: 1px 4px; }
@media (max-width: 720px) { .od-find { width: 100%; } }
/* compact roster in the project tab */
.dr-roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sp-3); }
.dr-roster-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.dr-roster-head b { font-family: var(--font-display); font-size: var(--fs-md); }
.dr-roster-row { display: grid; grid-template-columns: minmax(120px, 42%) minmax(0, 1fr); gap: var(--sp-2); padding: 5px 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.dr-roster-role { color: var(--ink-3); font-weight: var(--fw-semibold); }
.dr-clash { color: var(--danger); font-weight: var(--fw-bold); }
.dr-grid td { vertical-align: middle; }
.dr-day { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.dr-day.every { border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.dr-day-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; padding: var(--sp-3) var(--sp-4); background: var(--surface-sunken); border-bottom: 1px solid var(--line); }
.dr-day.every .dr-day-head { background: var(--accent-bg); }
.dr-day-head b { font-family: var(--font-display); font-size: var(--fs-md); }
.dr-day .tbl-wrap { border: 0; border-radius: 0; box-shadow: none; }
.dr-day-empty { padding: var(--sp-3) var(--sp-4); }
.od-day { display: inline-block; font-size: var(--fs-2xs); font-weight: var(--fw-bold); color: var(--ink-3); margin-right: var(--sp-1); letter-spacing: var(--ls-wide); }
.mt-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mt-row:last-child { border-bottom: 0; }
.mt-row > input[type=checkbox] { margin-top: 9px; }
.mt-row.dismissed { opacity: 0.55; }
.date-badge.sm { width: 44px; min-width: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: var(--r-sm); background: var(--accent-bg); padding: 4px 0; }
.date-badge.sm b { font-size: var(--fs-lg); line-height: var(--lh-none); }
.date-badge.sm i { font-style: normal; font-size: var(--fs-2xs); text-transform: uppercase; color: var(--ink-3); }
.brief-preview { white-space: pre-wrap; font-family: var(--font-body); font-size: var(--fs-md); line-height: var(--lh-base); background: var(--surface-sunken); border-radius: var(--r-md); padding: 14px 16px; margin: 0; max-height: 60vh; overflow: auto; }

/* ---------------------------------------------------------------- member levels (core/points.js) */
/* The five tier looks (round 5), shared by badge medals (.t1–.t5), level
   bands (.b1–.b5: badges, chips, the ladder), the tier marks on badge cards
   and the award toast. Each tier has its own SHAPE and metal, so they read
   apart even without colour: Ember coin · Frost scalloped seal · Solar
   sunburst · Aurora hexagon · Cosmic gem (round 6 names). --tier-ink is the text on it. */
:is(.medal.t1, .lvl-badge.b1, .lvl-chip.b1, .lvl-band.b1, .bd-band.b1, .tmark.t1, .toast.award-1) { --shape: circle(50%); --rim: linear-gradient(160deg, var(--tier-1a), var(--tier-1b)); --face: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.55), transparent 42%), linear-gradient(135deg, var(--tier-1b), var(--tier-1a)); --tier-ink: var(--tier-1-ink); }
:is(.medal.t2, .lvl-badge.b2, .lvl-chip.b2, .lvl-band.b2, .bd-band.b2, .tmark.t2, .toast.award-2) { --shape: polygon(50.0% 0.0%, 60.0% 6.1%, 71.7% 5.0%, 78.1% 14.8%, 89.1% 18.8%, 90.5% 30.5%, 98.7% 38.9%, 95.0% 50.0%, 98.7% 61.1%, 90.5% 69.5%, 89.1% 81.2%, 78.1% 85.2%, 71.7% 95.0%, 60.0% 93.9%, 50.0% 100.0%, 40.0% 93.9%, 28.3% 95.0%, 21.9% 85.2%, 10.9% 81.2%, 9.5% 69.5%, 1.3% 61.1%, 5.0% 50.0%, 1.3% 38.9%, 9.5% 30.5%, 10.9% 18.8%, 21.9% 14.8%, 28.3% 5.0%, 40.0% 6.1%); --rim: linear-gradient(160deg, var(--tier-2a), var(--tier-2b)); --face: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.85), transparent 46%), linear-gradient(135deg, var(--tier-2b), var(--tier-2a)); --tier-ink: var(--tier-2-ink); }
:is(.medal.t3, .lvl-badge.b3, .lvl-chip.b3, .lvl-band.b3, .bd-band.b3, .tmark.t3, .toast.award-3) { --shape: polygon(50.0% 0.0%, 62.1% 12.9%, 79.4% 9.5%, 81.6% 27.1%, 97.6% 34.5%, 89.0% 50.0%, 97.6% 65.5%, 81.6% 72.9%, 79.4% 90.5%, 62.1% 87.1%, 50.0% 100.0%, 37.9% 87.1%, 20.6% 90.5%, 18.4% 72.9%, 2.4% 65.5%, 11.0% 50.0%, 2.4% 34.5%, 18.4% 27.1%, 20.6% 9.5%, 37.9% 12.9%); --rim: linear-gradient(160deg, var(--tier-3a), var(--tier-3b)); --face: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.75), transparent 44%), linear-gradient(135deg, var(--tier-3b), var(--tier-3a) 60%, var(--tier-3b)); --tier-ink: var(--tier-3-ink); }
:is(.medal.t4, .lvl-badge.b4, .lvl-chip.b4, .lvl-band.b4, .bd-band.b4, .tmark.t4, .toast.award-4) { --shape: polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%); --rim: linear-gradient(160deg, var(--tier-4a), var(--tier-4b) 50%, var(--tier-4c)); --face: radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.9), transparent 46%), linear-gradient(135deg, var(--tier-4a), var(--tier-4b) 55%, var(--tier-4c)); --tier-ink: var(--tier-4-ink); }
:is(.medal.t5, .lvl-badge.b5, .lvl-chip.b5, .lvl-band.b5, .bd-band.b5, .tmark.t5, .toast.award-5) { --shape: polygon(28% 4%, 72% 4%, 98% 33%, 50% 98%, 2% 33%); --rim: linear-gradient(160deg, var(--tier-5b), var(--tier-5c) 50%, var(--tier-5d)); --face: linear-gradient(115deg, var(--tier-5a) 0%, var(--tier-5b) 30%, var(--tier-5a) 46%, var(--tier-5c) 64%, var(--tier-5d) 100%); --tier-ink: var(--tier-5-ink); }

/* One level for the whole platform, in five bands of three levels that
   share the badge tiers (round 5; Ember → Cosmic since round 6). The level badge wears its band's medal. */
.lvl-badge { --s: 44px; width: var(--s); height: var(--s); flex: 0 0 var(--s); position: relative; isolation: isolate; display: grid; place-items: center; color: var(--tier-ink, var(--ink-2)); font-family: var(--font-display); font-size: var(--fs-xl); font-weight: var(--fw-heavy); font-variant-numeric: tabular-nums; }
.lvl-badge::before, .lvl-badge::after { content: ""; position: absolute; z-index: -1; clip-path: var(--shape, inset(0 round var(--r-md))); }
.lvl-badge::before { inset: 0; background: var(--rim, var(--surface-muted)); }
.lvl-badge::after { inset: 3px; background: var(--face, var(--surface-muted)); }
.lvl-badge.b3, .lvl-badge.b4 { filter: drop-shadow(0 3px 7px rgba(150, 100, 20, 0.22)); }
.lvl-badge.b5 { padding-bottom: 7px; filter: drop-shadow(0 4px 10px rgba(166, 77, 214, 0.35)); }
.lvl-chip { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px 0 2px; border-radius: var(--r-pill); background: var(--surface-muted); color: var(--ink-2); font-size: var(--fs-xs); font-weight: var(--fw-semibold); white-space: nowrap; flex: none; }
.lvl-chip b { min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--r-pill); display: grid; place-items: center; background: var(--rim, var(--surface)); color: var(--tier-ink, var(--ink)); font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; }
.lvl-chip.sm { padding: 0 2px; }
.lvl-chip:is(.b4, .b5) { background: var(--surface-selected); color: var(--accent-ink); }
.lvl-card { border-top: 1px solid var(--line); padding-top: var(--sp-4); }
.lvl-head { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.lvl-name { font-family: var(--font-display); font-size: var(--fs-lg); display: block; }
.lvl-band-name { font-size: var(--fs-2xs); font-weight: var(--fw-heavy); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-3); }
.lvl-nums { display: flex; gap: var(--sp-5); margin-left: auto; }
.lvl-nums > div { display: flex; flex-direction: column; align-items: flex-end; }
.lvl-nums b { font-family: var(--font-display); font-size: var(--fs-xl); line-height: var(--lh-tight); }
/* the ladder, in five metal bands of three levels; each band head shows its medal shape */
.lvl-ladder { margin: var(--sp-4) 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-2); }
.lvl-band { border-radius: var(--r-md); padding: var(--sp-2); background: var(--surface-sunken); border: 1px solid var(--line); min-width: 0; }
.lvl-band.cur { background: var(--surface); border-color: var(--line-accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.lvl-band-head { display: flex; align-items: center; gap: 6px; font-size: var(--fs-2xs); font-weight: var(--fw-heavy); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-3); padding: 2px 2px 6px; }
.lvl-band .tier-dot { width: 14px; height: 14px; flex: none; clip-path: var(--shape, circle(50%)); background: var(--rim); }
.lvl-band:not(.cur, .past) .tier-dot { opacity: 0.55; }
.lvl-band ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.lvl-band li { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: var(--r-xs); color: var(--ink-3); font-size: var(--fs-xs); min-width: 0; }
.lvl-band li b { font-size: var(--fs-sm); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lvl-band li.done { color: var(--ink-2); }
.lvl-band li.done b::after { content: " ✓"; color: var(--ok-strong); }
.lvl-band li.on { background: var(--grad-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand-2) 25%, transparent); }
.lvl-band li.on b { color: var(--cta-ink); }
@media (max-width: 720px) { .lvl-ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lvl-nums { margin-left: 0; width: 100%; justify-content: space-between; } .lvl-nums > div { align-items: flex-start; } }
.pts-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.pts-rules li { display: flex; gap: var(--sp-3); align-items: baseline; }
.pts-rules li > .num { flex: 0 0 52px; text-align: right; color: var(--medal-gold-ink); }
/* badges: a medal per family, in its tier's look (above); not yet = dashed */
.medal { --s: 38px; width: var(--s); height: var(--s); flex: 0 0 var(--s); position: relative; display: grid; place-items: center; color: var(--tier-ink, var(--ink-4)); }
.medal::before, .medal::after { content: ""; position: absolute; clip-path: var(--shape, circle(50%)); }
.medal::before { inset: 0; background: var(--rim, transparent); }
.medal::after { inset: 3px; background: var(--face, transparent); }
.medal > svg { position: relative; z-index: 1; width: 44%; height: 44%; }
.medal.sm { --s: 28px; }
.medal.lg { --s: 56px; }
.medal.t0 { --shape: none; --rim: transparent; --face: transparent; --tier-ink: var(--ink-4); } /* never borrows a tier look from around it */
.medal.t0::before { clip-path: none; border: 1.5px dashed var(--line-2); border-radius: 50%; }
.medal.t0::after { display: none; }
.medal.t5 { filter: drop-shadow(0 4px 10px rgba(166, 77, 214, 0.35)); }
.medal.t5 > svg { translate: 0 -8%; }
.medal.t5::after { background-size: 220% 100%; transition: background-position 900ms var(--ease-out); }
.medal.t5:hover::after { background-position: 100% 0; }
.medal.t3, .medal.t4 { filter: drop-shadow(0 3px 7px rgba(150, 100, 20, 0.22)); }
.medal-row { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5); margin-top: var(--sp-3); }
.medal-item { display: flex; align-items: center; gap: var(--sp-2); }
.medal-item > span:last-child { display: flex; flex-direction: column; line-height: var(--lh-tight); }
.bdg-next { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-2); }
.bdg-all { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-2); }
.bdg-card { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); min-width: 0; }
/* the road of tiers on a badge card: each tier's shape with its tally; earned ones in metal */
.bdg-tiers { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: var(--sp-2); }
.tmark { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-2xs); font-weight: var(--fw-semibold); color: var(--ink-4); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tmark > i { width: 13px; height: 13px; flex: none; clip-path: var(--shape, circle(50%)); background: var(--rim); opacity: 0.3; filter: grayscale(0.9); }
.tmark.on { color: var(--ink-2); }
.tmark.on > i { opacity: 1; filter: none; }
.tmark.next { color: var(--ink-3); }
.tmark.next > i { opacity: 0.6; filter: grayscale(0.4); }
.pts-rules li > .medal { margin-left: 26px; }
/* sidebar: your level under your name, with a thin line to the next one */
.side-foot { flex-direction: column; align-items: stretch; gap: var(--sp-2); }
.side-level { display: flex; flex-direction: column; gap: 5px; color: var(--side-ink-2); font-size: var(--fs-xs); text-decoration: none; border-radius: var(--r-xs); }
.side-level:hover, .side-level:focus-visible { color: var(--side-ink-strong); }
.side-level .sl-text { display: flex; align-items: baseline; gap: 5px; min-width: 0; white-space: nowrap; }
.side-level .sl-text b { color: var(--side-ink-strong); font-weight: var(--fw-semibold); }
.side-level .sl-to { margin-left: auto; padding-left: var(--sp-2); }
.side-level .sl-bar { height: 3px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.08); overflow: hidden; position: relative; }
.side-level .sl-bar > i { position: absolute; inset: 0 auto 0 0; width: 100%; transform-origin: left; scale: var(--p, 0) 1; background: var(--grad-brand-x); border-radius: inherit; transition: scale 480ms var(--ease-out); }
body.side-collapsed .side-level .sl-text { display: none; }

/* ---------------------------------------------------------------- contribution recap (views/recap.js) */
.rc-label { font-family: var(--font-display); font-size: var(--fs-lg); min-width: 150px; text-align: center; }
.rc-stats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.rc-lead { font-size: var(--fs-base); line-height: var(--lh-normal); }
.rc-facts { margin: var(--sp-2) 0 0; padding-left: 1.1em; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-1) var(--sp-5); font-size: var(--fs-sm); color: var(--ink-2); }
.rc-standouts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--sp-3) var(--sp-5); }
.rc-group { min-width: 0; }

/* ---------------------------------------------------------------- my points (views/points.js) */
.count-lg { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: var(--fw-bold); line-height: var(--lh-tight); font-variant-numeric: tabular-nums; }
.pts-cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pts-cat { display: grid; grid-template-columns: 110px minmax(0, 1fr) 48px; align-items: center; gap: var(--sp-3); width: 100%; padding: 5px var(--sp-2); border: 0; border-radius: var(--r-sm); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.pts-cat:hover { background: var(--surface-hover); }
.pts-cat.on { background: var(--surface-selected); box-shadow: inset 0 0 0 1px var(--line-accent); }
.pts-cat .num { text-align: right; }
.pts-feed { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.pts-feed li { display: flex; align-items: baseline; gap: var(--sp-3); padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.pts-feed li:last-child { border-bottom: 0; }
.pts-plus { flex: 0 0 44px; text-align: right; color: var(--ok); font-size: var(--fs-sm); }
.pts-plus .tiny { color: var(--ink-3); margin-left: 2px; }
.pts-feed li.voided .pts-plus, .pts-feed li.voided .strong { color: var(--ink-4); text-decoration: line-through; }
.pts-back { color: var(--warn-strong); font-weight: var(--fw-semibold); }

/* ---------------------------------------------------------------- leaderboard (views/leaderboard.js) */
.lbx { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); } /* rows shrink; long lines ellipsize */
.lbx li { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-2); border-bottom: 1px solid var(--line); }
.lbx li:last-child { border-bottom: 0; }
.lbx li.me { background: var(--surface-selected); border-radius: var(--r-sm); }
.lbx .lb-rank { width: 26px; height: 26px; flex-basis: 26px; font-variant-numeric: tabular-nums; }
.lbx-who { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lbx-who a { color: var(--ink); text-decoration: none; }
.lbx-who a:hover { color: var(--accent); text-decoration: underline; }
.lbx-bar { height: 4px; margin-top: var(--sp-1); max-width: 360px; }
.lbx-pts { display: flex; flex-direction: column; align-items: flex-end; flex: none; min-width: 56px; white-space: nowrap; font-size: var(--fs-lg); font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.lbx-badges { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--medal-gold-ink); }
.lbx-badges svg { width: 13px; height: 13px; }
.lbx-team { width: 12px; height: 32px; border-radius: var(--r-xs); background: var(--c); flex: 0 0 12px; }
.lbx-me { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); background: var(--surface-muted); font-size: var(--fs-sm); color: var(--ink-2); }
.lbx-me svg { width: 16px; height: 16px; color: var(--medal-gold-ink); flex: none; }

/* ---------------------------------------------------------------- banks: contributions */
.bk-top { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
@media (max-width: 900px) { .bk-top { grid-template-columns: minmax(0, 1fr); } }
.bk-me { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.bk-level { display: flex; align-items: center; gap: var(--sp-3); }
.bk-level b { font-family: var(--font-display); font-size: var(--fs-lg); }
.bk-pts { display: flex; gap: var(--sp-6); }
.bk-pts > div { display: flex; flex-direction: column; align-items: flex-end; }
.bk-pts .count { font-family: var(--font-display); font-size: var(--fs-3xl); font-weight: var(--fw-bold); line-height: var(--lh-tight); font-variant-numeric: tabular-nums; }
.quests { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); }
.quests li { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); transition: background var(--t-med), border-color var(--t-med); }
.quests li.done { background: var(--ok-bg-soft); border-color: rgba(22, 163, 74, 0.25); }
.q-ic { width: 28px; height: 28px; border-radius: var(--r-xs); display: grid; place-items: center; background: var(--surface-selected); color: var(--accent); flex: 0 0 28px; }
.quests li.done .q-ic { background: var(--ok-solid); color: var(--on-accent); }
.q-ic svg { width: 15px; height: 15px; }
.q-meta { display: flex; flex-direction: column; align-items: flex-end; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.q-title { color: var(--ink); text-decoration: none; display: block; } /* daily quests on Home: the title opens where the work is */
.q-title:hover { color: var(--accent); text-decoration: underline; }
.quests li.done .q-title { color: var(--ink-2); }
/* The daily check-in on the quests card (round 6; weekdays only, as five glass cubes, round 6b). */
.checkin { position: relative; isolation: isolate; overflow: hidden; margin-bottom: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-lg);
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--brand-2) 22%, transparent), transparent 70%), var(--glass-card);
  border: 1px solid color-mix(in srgb, var(--brand-2) 34%, transparent); box-shadow: var(--glass-card-shadow); }
/* a hairline of aurora along the top edge */
.checkin::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, transparent, var(--brand-1), var(--brand-3), transparent); opacity: 0.85; }
.checkin.done { border-color: color-mix(in srgb, var(--ok-solid) 34%, transparent); background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--ok-solid) 14%, transparent), transparent 70%), var(--glass-card); }
.checkin.weekend { border-color: var(--line-2); }
.ck-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.ck-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-2xs); font-weight: var(--fw-heavy); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--accent); }
.ck-kicker svg { width: 13px; height: 13px; }
.ck-streak { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: var(--r-pill); background: var(--warm-bg); color: var(--warm-ink); font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.ck-streak svg { width: 12px; height: 12px; }
.ck-art { max-width: 330px; margin: 0 auto; }
.ck-art .iso { width: 100%; height: auto; }
.ck-foot { display: flex; align-items: center; gap: var(--sp-3); }
.ck-title { font-weight: var(--fw-bold); font-size: var(--fs-md); color: var(--ink); }
.ck-btn { flex: none; }
.ck-ok { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-solid); color: var(--on-accent); flex: 0 0 30px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok-solid) 22%, transparent); }
.ck-ok svg { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- isometric glass (round 6b, core/iso.js)
   Inline SVG scenes coloured by the tokens. Motion is slow and small: things float a
   few pixels, glints twinkle, beams breathe, today's cube pulses, a new check-in pops.
   transform/opacity only; all of it stops under prefers-reduced-motion. */
.iso { display: block; overflow: visible; }
.iso .f { animation: iso-float 6.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes iso-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.iso .shadow { transform-box: fill-box; transform-origin: center; animation: iso-shadow 6.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes iso-shadow { 0%, 100% { scale: 1; opacity: 1; } 50% { scale: 0.86; opacity: 0.7; } }
.iso .glint { transform-box: fill-box; transform-origin: center; opacity: 0.2; animation: iso-glint 4.6s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes iso-glint { 0%, 100% { opacity: 0.1; scale: 0.5; } 50% { opacity: 1; scale: 1; } }
.iso .beam { mix-blend-mode: screen; animation: iso-beam 5.2s ease-in-out infinite; }
@keyframes iso-beam { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.iso .ring-o { transform-box: fill-box; transform-origin: center; animation: iso-ring 3.6s ease-out infinite; }
@keyframes iso-ring { 0% { scale: 0.8; opacity: 0.9; } 100% { scale: 1.5; opacity: 0; } }
.iso .holo { filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.55)); }
.iso .ck-lbl { font-family: var(--font-body); font-size: var(--fs-2xs); font-weight: var(--fw-bold); fill: var(--ink-3); }
.iso .ck-cube.lit .ck-lbl { fill: var(--ink); }
.iso .ck-cube.today .ck-lbl { fill: var(--accent); }
.iso .ck-cube.lit .box { filter: drop-shadow(0 0 9px color-mix(in srgb, var(--brand-1) 55%, transparent)); }
.iso .ck-cube.today .edge { stroke: var(--accent); animation: iso-pulse 1.8s ease-in-out infinite; }
@keyframes iso-pulse { 0%, 100% { stroke-opacity: 0.35; } 50% { stroke-opacity: 1; } }
.iso .ck-cube.pop .f { transform-box: fill-box; transform-origin: 50% 100%; animation: iso-pop 0.9s var(--ease-pop) both, iso-float 6.4s ease-in-out 0.9s infinite; }
@keyframes iso-pop { 0% { scale: 0.4; opacity: 0; } 60% { scale: 1.12; opacity: 1; } 100% { scale: 1; } }
@media (prefers-reduced-motion: reduce) { .iso, .iso * { animation: none !important; } }
.seg.seg-sm button { height: 24px; padding: 0 var(--sp-2); font-size: var(--fs-xs); }
.lb { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.lb li { display: flex; align-items: center; gap: var(--sp-2); padding: 6px var(--sp-2); border-radius: var(--r-sm); font-size: var(--fs-sm); }
.lb li.me { background: var(--surface-selected); }
.lb-rank { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--ink-3); background: var(--surface-muted); flex: 0 0 22px; }
.lb-rank.r1 { background: var(--medal-gold); color: var(--medal-gold-ink); } .lb-rank.r2 { background: var(--medal-silver); color: var(--medal-silver-ink); } .lb-rank.r3 { background: var(--medal-bronze); color: var(--medal-bronze-ink); }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.feed li { display: flex; align-items: center; gap: var(--sp-2); }
.wanted { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-2); }
.wanted-item { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); transition: border-color var(--t-fast), translate var(--t-fast) var(--ease-out); }
.wanted-item:hover { border-color: var(--line-hover); text-decoration: none; translate: 0 -1px; }
.wanted-item > span.grow { display: flex; flex-direction: column; }
.wanted-item > svg { width: 16px; height: 16px; color: var(--ink-4); }
.ring-sm { --p: 0; width: 34px; height: 34px; border-radius: 50%; flex: 0 0 34px; display: grid; place-items: center; background: conic-gradient(var(--warn-solid) calc(var(--p) * 1%), var(--surface-muted) 0); }
.ring-sm > span { width: 26px; height: 26px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: var(--fs-3xs); font-weight: var(--fw-bold); color: var(--ink-2); }
.bc-meter { display: flex; align-items: center; gap: var(--sp-2); margin-top: 2px; }
.bc-meter i { flex: 1; height: 4px; border-radius: var(--r-pill); background: var(--surface-muted); position: relative; overflow: hidden; }
.bc-meter i::after { content: ""; position: absolute; inset: 0; transform-origin: left; scale: var(--p, 0) 1; border-radius: var(--r-pill); background: var(--danger-solid-soft); transition: scale 480ms var(--ease-out); }
.bc-meter.mid i::after { background: var(--warn-solid); } .bc-meter.good i::after { background: var(--ok-solid); }
.bc-meter span { font-size: var(--fs-2xs); font-weight: var(--fw-bold); color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 28px; text-align: right; }
.bn-complete { padding: var(--sp-3); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-sunken); margin-bottom: var(--sp-3); }
.bn-complete.low .bar > i { background: var(--danger-solid-soft); } .bn-complete.mid .bar > i { background: var(--warn-solid); } .bn-complete.good .bar > i { background: var(--ok-solid); }
.bn-add { display: flex; gap: var(--sp-2); align-items: flex-end; margin-bottom: var(--sp-3); }
.bn-add textarea { min-height: 44px !important; }
.bn-list { list-style: none; margin: 0 0 var(--sp-3); padding: 0; display: grid; gap: var(--sp-3); }
.bn-list li { display: flex; gap: var(--sp-2); }
/* bank form: quick fill, completeness, category chips */
.bf-paste { display: grid; gap: var(--sp-1); padding: var(--sp-3); border: 1px dashed var(--line-hover); border-radius: var(--r-md); background: var(--surface-selected); margin-bottom: var(--sp-3); }
.bf-paste label { display: flex; align-items: center; gap: var(--sp-1); color: var(--accent-ink); }
.bf-paste label svg { width: 15px; height: 15px; }
.bf-paste textarea { border: 0; background: transparent; resize: vertical; font: inherit; font-size: var(--fs-sm); color: var(--ink); outline: none; min-height: 40px; }
.bf-meter { margin-bottom: var(--sp-3); }
.bf-chips { display: flex; flex-wrap: wrap; gap: var(--sp-1); align-items: center; }
.bf-chips .chip { height: var(--ctl-h-xs); padding: 0 var(--sp-2); font-size: var(--fs-xs); }
.bf-other { width: 150px !important; min-height: var(--ctl-h-xs) !important; }
.bf-more { margin-top: var(--sp-3); border-top: 1px solid var(--line); padding-top: var(--sp-3); }
.bf-more > summary { cursor: pointer; font-weight: var(--fw-semibold); font-size: var(--fs-md); list-style: none; display: flex; align-items: center; gap: var(--sp-2); }
.bf-more > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); rotate: -45deg; transition: rotate var(--t-fast) var(--ease-out); }
.bf-more[open] > summary::before { rotate: 45deg; }
.bf-more > summary::-webkit-details-marker { display: none; }
.bf-filled { animation: bf-flash 1.4s var(--ease-out); }
@keyframes bf-flash { 0%, 30% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.35); border-color: var(--ok-solid); } 100% { box-shadow: none; } }
[data-dupes] { color: var(--warn); }
[data-dupes] svg { width: 13px; height: 13px; vertical-align: -2px; }

/* ---------------------------------------------------------------- crew / manpower */
.crew-tabs { margin-bottom: var(--sp-4); }
.crew-tabs a { display: inline-flex; align-items: center; gap: 6px; }
.crew-tabs a svg { width: 15px; height: 15px; }
.cr-scroll { overflow: auto; max-height: 72vh; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); overscroll-behavior-x: contain; }
.cr-grid { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: var(--fs-sm); }
.cr-grid th, .cr-grid td { border-bottom: 1px solid var(--line); padding: 0; }
.cr-grid thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-sunken); font-weight: var(--fw-semibold); color: var(--ink-3); height: 40px; min-width: 30px; text-align: center; }
.cr-grid thead th span, .cr-grid thead th b { display: block; line-height: var(--lh-tight); }
.cr-grid thead th b { color: var(--ink-2); font-size: var(--fs-sm); }
.cr-grid thead th.mon { box-shadow: inset 1px 0 0 var(--line-2); }
.cr-grid thead th.now { background: var(--accent-bg); color: var(--accent-ink); }
.cr-grid thead th.now b { color: var(--accent-ink); }
.cr-grid th.we, .cr-grid td.we { background-color: var(--surface-sunken); }
.cr-grid .cr-name { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 220px; max-width: 240px; text-align: left; border-right: 1px solid var(--line); }
.cr-grid thead .cr-name { z-index: 3; background: var(--surface-sunken); padding: 0 var(--sp-3); }
.cr-person { display: flex; align-items: center; gap: var(--sp-2); width: 100%; padding: 6px var(--sp-3); background: none; border: 0; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.cr-person:hover b { color: var(--accent); }
.cr-person .grow { display: flex; flex-direction: column; }
.cr-cell { height: 38px; min-width: 30px; text-align: center; vertical-align: middle; border-left: 1px solid color-mix(in srgb, var(--ink) 4%, transparent); }
.cr-cell > span { display: inline-grid; place-items: center; width: calc(100% - 4px); height: 26px; border-radius: var(--r-xs); font-size: var(--fs-3xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-wide); }
.cr-cell.free { cursor: copy; }
.cr-cell.free:hover { background: var(--surface-hover); box-shadow: inset 0 0 0 1px var(--line-hover); }
.cr-cell.now { background: color-mix(in srgb, var(--accent) 4%, transparent); box-shadow: inset 1px 0 0 var(--line-accent), inset -1px 0 0 var(--line-accent); }
.cr-cell.booked > span { background: var(--danger-bg); color: var(--danger); box-shadow: inset 0 0 0 1px var(--line-danger); }
.cr-cell.held > span { background: var(--warn-bg); color: var(--warn); box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.3); }
.cr-cell.planned > span { background: var(--surface-selected); color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--line-accent); }
.cr-cell.done > span { background: var(--surface-muted); color: var(--ink-3); }
.cr-cell.double > span { background: var(--danger-solid); color: var(--on-accent); box-shadow: none; }
.cr-cell[data-project] { cursor: pointer; }
.cr-grid .cr-load { min-width: 120px; padding: 0 var(--sp-3); text-align: left; border-left: 1px solid var(--line); }
.cr-loadbar { height: 6px; border-radius: var(--r-pill); background: var(--surface-muted); overflow: hidden; margin-bottom: 3px; }
.cr-loadbar > i { display: block; height: 100%; transform-origin: left; scale: var(--p, 0) 1; background: var(--ok-solid); border-radius: var(--r-pill); transition: scale 480ms var(--ease-out); }
.cr-loadbar.mid > i { background: var(--warn-solid); } .cr-loadbar.hi > i { background: var(--danger-solid); }
.cr-legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); }
.cr-key { display: inline-block; width: 12px; height: 12px; border-radius: var(--r-2xs); margin-left: var(--sp-1); }
.cr-key.booked { background: var(--danger-bg); box-shadow: inset 0 0 0 1px var(--line-danger); } .cr-key.held { background: var(--warn-bg); }
.cr-key.planned { background: var(--surface-selected); box-shadow: inset 0 0 0 1px var(--line-accent); } .cr-key.double { background: var(--danger-solid); }
.cr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sp-3); }
.cr-card { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); transition: box-shadow var(--t-med), border-color var(--t-med), translate var(--t-med) var(--ease-out); }
.cr-card:hover { box-shadow: var(--shadow-md); border-color: var(--line-hover); translate: 0 -2px; }
.cr-today { font-size: var(--fs-2xs); font-weight: var(--fw-bold); padding: 2px var(--sp-2); border-radius: var(--r-pill); white-space: nowrap; background: var(--ok-bg); color: var(--ok); }
.cr-today.booked { background: var(--danger-bg); color: var(--danger); } .cr-today.held { background: var(--warn-bg); color: var(--warn); } .cr-today.planned { background: var(--surface-selected); color: var(--accent-ink); }
.cr-rate { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.cr-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cr-week i { height: 26px; border-radius: var(--r-xs); display: grid; place-items: center; font-style: normal; font-size: var(--fs-3xs); font-weight: var(--fw-bold); color: var(--ink-3); background: var(--surface-sunken); }
.cr-week i.booked { background: var(--danger-bg); color: var(--danger); } .cr-week i.held { background: var(--warn-bg); color: var(--warn); } .cr-week i.planned { background: var(--surface-selected); color: var(--accent-ink); }
@media (max-width: 720px) { .cr-grid .cr-name { min-width: 150px; max-width: 150px; } .cr-grid .cr-load { min-width: 90px; } }
/* ⋯ next to a name (round 5): the same menu as a right-click, shown on hover, focus and touch screens */
.cr-name-in { display: flex; align-items: center; min-width: 0; }
.cr-name-in .cr-person { flex: 1; min-width: 0; }
.cr-person .ellipsis { max-width: 100%; }
.cr-more { flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin-right: var(--sp-1); border: 0; border-radius: var(--r-xs); background: none; color: var(--ink-3); cursor: pointer; opacity: 0; transition: opacity var(--t-fast) var(--ease-out); }
.cr-more svg { width: 16px; height: 16px; }
.cr-more:hover { background: var(--tint-hover); color: var(--ink); }
.cr-more.on, tr:hover .cr-more, .cr-more:focus-visible { opacity: 1; }
@media (hover: none) { .cr-more { opacity: 1; } }
.cr-cell, .cr-person, .cr-card, .mc-bar, .mc-day, .mc-people li { -webkit-touch-callout: none; } /* press and hold opens our menu, not the phone's */

/* ---------------------------------------------------------------- crew calendar: events as bars (round 5, item 18) */
.bk-softbooked { --c: var(--warn-strong); } .bk-on_check { --c: var(--tone-violet); } .bk-booked { --c: var(--ok-strong); } .bk-done { --c: var(--tone-teal); }
.mc-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-4); margin-bottom: var(--sp-2); }
.mc-nav { display: flex; align-items: center; gap: var(--sp-2); }
.mc-nav h2 { min-width: 170px; margin: 0; text-align: center; font-size: var(--fs-xl); }
.mc-legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-3); margin: 0 0 var(--sp-3); font-size: var(--fs-xs); color: var(--ink-3); }
.mc-legend span { display: inline-flex; align-items: center; gap: 5px; }
.mc-legend b { color: var(--ink); }
.mc-legend .mc-sum { margin-right: var(--sp-2); color: var(--ink-2); }
.mc-legend .mc-hint-touch { display: none; }
@media (hover: none) { .mc-legend .mc-hint-mouse { display: none; } .mc-legend .mc-hint-touch { display: inline-flex; } }
.mc-key { display: inline-block; width: 18px; height: 10px; border-radius: var(--r-2xs); border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 18%, var(--surface)); }
.mc-key-clash { display: inline-flex; align-items: center; gap: 4px; color: var(--danger); }
.mc-key-clash svg { width: 13px; height: 13px; }
.mc { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface); min-width: 0; }
.mc-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface-sunken); border-bottom: 1px solid var(--line); }
.mc-dow span { padding: 7px var(--sp-2); font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--ink-3); text-transform: uppercase; letter-spacing: var(--ls-caps); }
.mc-week { display: grid; min-height: 120px; border-bottom: 1px solid var(--line); }
.mc-week:last-child { border-bottom: 0; }
.mc-days, .mc-bars { grid-area: 1 / 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mc-day { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; min-width: 0; padding: 6px var(--sp-2); border: 0; border-right: 1px solid var(--line); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.mc-day:last-child { border-right: 0; }
.mc-day.we { background: var(--surface-sunken); }
.mc-day.out { background: color-mix(in srgb, var(--surface-sunken) 70%, transparent); }
.mc-day.out .mc-n { color: var(--ink-4); }
.mc-day:hover { background: var(--tint-hover); }
.mc-day.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.mc-day:focus-visible, .mc-bar:focus-visible, .mc-more:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.mc-n { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 4px; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--ink-2); }
.mc-day.today .mc-n { background: var(--accent); color: var(--on-accent); }
.mc-bars { grid-template-rows: repeat(3, 24px) 20px; row-gap: 3px; align-content: start; padding: 32px 0 6px; pointer-events: none; }
.mc-bar { pointer-events: auto; display: flex; align-items: center; gap: 4px; min-width: 0; height: 24px; margin: 0 4px; padding: 0 4px 0 6px; border: 0; border-left: 3px solid var(--c); border-radius: var(--r-xs); background: color-mix(in srgb, var(--c) 15%, var(--surface)); color: color-mix(in srgb, var(--c) 68%, var(--ink)); font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-align: left; cursor: pointer; }
.mc-bar:hover { background: color-mix(in srgb, var(--c) 25%, var(--surface)); }
.mc-bar.cont-l { margin-left: 0; border-left-width: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.mc-bar.cont-r { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.mc-bar.on { box-shadow: 0 0 0 2px var(--c); }
.mc-bar > svg { flex: none; width: 13px; height: 13px; color: var(--danger); }
.mc-bar-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-bar-n { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 16px; padding: 0 5px; border-radius: var(--r-pill); background: var(--surface); color: inherit; font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; }
.mc-more { pointer-events: auto; justify-self: start; margin: 0 6px; padding: 0 2px; border: 0; background: none; color: var(--accent); font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-bold); cursor: pointer; }
.mc-side { padding: var(--sp-4); min-width: 0; }
.mc-side-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.mc-side-h h3 { margin: 0; }
.mc-sd + .mc-sd { margin-top: var(--sp-4); }
.mc-sd h4 { display: flex; justify-content: space-between; gap: var(--sp-2); margin: 0 0 6px; font-size: var(--fs-sm); color: var(--ink-2); }
.mc-sd h4 span { font-size: var(--fs-xs); font-weight: var(--fw-regular); color: var(--ink-3); }
.mc-ev { margin-bottom: var(--sp-2); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-md); }
.mc-ev.hl { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-bg); }
.mc-ev-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--sp-2); }
.mc-ev-h a, .mc-ev-h b { color: var(--ink); font-size: var(--fs-sm); font-weight: var(--fw-semibold); text-decoration: none; }
.mc-ev-h a:hover { color: var(--accent); }
.mc-dot { flex: none; width: 10px; height: 10px; border-radius: var(--r-2xs); background: var(--c); }
.mc-people { display: grid; grid-template-columns: minmax(0, 1fr); margin: 6px 0 0; padding: 0; list-style: none; }
.mc-people li { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; padding: 5px 0; border-top: 1px solid var(--line); }
.mc-people .grow { display: flex; flex-direction: column; min-width: 0; }
.mc-people b { overflow: hidden; font-size: var(--fs-sm); text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) {
  .mc-nav h2 { min-width: 0; font-size: var(--fs-lg); }
  .mc-dow span { padding: 6px 2px; text-align: center; letter-spacing: 0; }
  .mc-week { min-height: 76px; }
  .mc-day { align-items: center; padding: 4px 2px; }
  .mc-n { min-width: 20px; height: 20px; font-size: var(--fs-xs); }
  .mc-bars { grid-template-rows: repeat(3, 6px) 16px; padding-top: 30px; }
  .mc-bar { height: 6px; margin: 0 2px; padding: 0; border-left-width: 0; border-radius: var(--r-pill); background: var(--c); }
  .mc-bar.cont-l, .mc-bar.cont-r { border-radius: 0; }
  .mc-bar > * { display: none; }
  .mc-more { margin: 0 2px; font-size: var(--fs-2xs); }
  .mc-more-w { display: none; }
}

/* ---------------------------------------------------------------- booking form and WhatsApp message (round 5, item 20) */
.bk-contact { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); margin-top: 6px; font-size: var(--fs-sm); color: var(--ink-2); }
.bk-contact svg { width: 15px; height: 15px; color: var(--ok-strong); }
.bk-contact .input { width: 200px; max-width: 100%; }
.bk-new { padding: var(--sp-3); border: 1px dashed var(--line-2); border-radius: var(--r-md); background: var(--surface-sunken); }
.bk-new-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--sp-2); margin-bottom: var(--sp-2); font-size: var(--fs-sm); }
.bk-new-h svg { width: 15px; height: 15px; color: var(--accent); }
.wa-book { display: flex; flex-direction: column; gap: var(--sp-3); }
.wa-book textarea { min-height: 230px; font-family: inherit; line-height: var(--lh-normal); }
.wa-to { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); }
.wa-to svg { width: 16px; height: 16px; color: var(--ok-strong); }
.wa-err { font-size: var(--fs-sm); color: var(--danger); }

/* ---------------------------------------------------------------- travel search (round 5, item 21) */
.trip-leg { margin-bottom: var(--sp-2); padding: var(--sp-3); }
.trip-more { padding-top: var(--sp-2); border-top: 1px dashed var(--line); }
.trip-stay .trip-links { flex-basis: 100%; }
.trip-plan .tiny svg, .tq .tiny svg { width: 12px; height: 12px; margin-right: 3px; vertical-align: -1px; }

/* ---------------------------------------------------------------- on the day: call sheet + editor */
.cs-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-4); flex-wrap: wrap; padding: var(--sp-5); margin-bottom: var(--sp-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.cs-head::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--fokus); }
.cs-kicker { text-transform: uppercase; letter-spacing: var(--ls-caps); font-weight: var(--fw-bold); }
.cs-title h2 { font-size: var(--fs-2xl); margin-top: 2px; }
.cs-meta { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--ink-2); }
.cs-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.cs-meta svg { width: 15px; height: 15px; color: var(--ink-3); }
.cs-stats { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.cs-stats > span { display: inline-flex; align-items: center; gap: 4px; height: var(--pill-h); padding: 0 var(--sp-2); border-radius: var(--r-pill); background: var(--surface-muted); font-size: var(--fs-xs); color: var(--ink-2); }
.cs-stats b { font-variant-numeric: tabular-nums; }
.cs-stats .warn { background: var(--warn-bg); color: var(--warn); } .cs-stats .danger { background: var(--danger-bg); color: var(--danger); } .cs-stats .ok { background: var(--ok-bg); color: var(--ok); }
.cs-stats svg { width: 13px; height: 13px; }
.cs-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.cs-days { display: flex; gap: var(--sp-1); overflow-x: auto; margin-bottom: var(--sp-3); padding-bottom: 2px; }
.cs-days button { flex: 0 0 auto; height: var(--ctl-h-sm); padding: 0 var(--sp-3); border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ink-2); cursor: pointer; transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast); }
.cs-days button:hover { border-color: var(--line-hover); }
.cs-days button.on { background: var(--ink); border-color: var(--ink); color: var(--on-accent); }
.cs-days button:focus-visible { outline: none; box-shadow: var(--ring); }
.cs-groups { columns: 2 380px; column-gap: var(--sp-3); }
.cs-groups > .cs-group { break-inside: avoid; margin-bottom: var(--sp-3); }
.cs-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.cs-group h3 { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-2) var(--sp-4); background: var(--surface-sunken); border-bottom: 1px solid var(--line); font-size: var(--fs-xs); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-3); }
.cs-group h3 span { font-variant-numeric: tabular-nums; }
.cs-group ul { list-style: none; margin: 0; padding: 0; }
.cs-role { display: grid; grid-template-columns: minmax(120px, 36%) minmax(0, 1fr); gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--line); align-items: start; }
.cs-role:first-child { border-top: 0; }
.cs-role.open { background: var(--warn-bg-soft); }
.cs-role.issue { box-shadow: inset 3px 0 0 var(--danger-solid); }
.cs-role-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cs-role-name b { font-size: var(--fs-sm); }
.cs-day { align-self: flex-start; font-size: var(--fs-3xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-wide); color: var(--info); background: var(--info-bg); padding: 1px 6px; border-radius: var(--r-pill); }
.cs-note { font-size: var(--fs-xs); color: var(--ink-3); }
/* Round 24: what an area covers, its checklist work for the day, and its preparation */
.cs-detail { grid-column: 1 / -1; display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.cs-role:has(> .cs-tick) > .cs-detail { grid-column: 2 / -1; }
.cs-scope { margin: 0; padding-left: var(--sp-4); font-size: var(--fs-xs); color: var(--ink-2); display: flex; flex-direction: column; gap: 2px; }
.cs-scope li { list-style: disc; }
.cs-tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-1); }
.cs-task { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); min-width: 0; }
.cs-task .cs-tick.sm { flex: 0 0 auto; margin-top: 0; }
.cs-task-t { min-width: 0; overflow-wrap: anywhere; }
.cs-task.done .cs-task-t { color: var(--ink-3); text-decoration: line-through; }
.cs-detail-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.cs-prep { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-xs); color: var(--ink-3); }
.cs-prep svg { width: 13px; height: 13px; }
.cs-prep.late { color: var(--danger); }
.er-note { display: flex; flex-direction: column; gap: var(--sp-1); align-items: flex-start; min-width: 0; }
.er-note textarea { width: 100%; resize: vertical; }
.cs-people { display: flex; flex-wrap: wrap; gap: var(--sp-1); align-items: center; min-width: 0; }
.cs-open { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--warn); margin-right: var(--sp-1); }
/* the day's checklist (round 5): tick each role once it's handled, per day */
.cs-side { display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-3); min-width: min(320px, 100%); }
.cs-progress { width: 100%; display: flex; flex-direction: column; gap: 6px; padding: var(--sp-3); border-radius: var(--r-md); background: var(--surface-sunken); border: 1px solid var(--line); }
.cs-progress b { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-md); }
.cs-progress b svg { width: 15px; height: 15px; color: var(--ok-strong); }
.cs-progress.all { background: var(--ok-bg-soft); border-color: var(--ok-bg); }
.cs-role:has(> .cs-tick) { grid-template-columns: 26px minmax(110px, 34%) minmax(0, 1fr); }
.cs-tick { width: 24px; height: 24px; margin-top: -2px; border-radius: 50%; border: 2px solid var(--field-line-strong); background: var(--surface); display: grid; place-items: center; padding: 0; color: transparent; cursor: pointer; transition: background var(--t-fast) var(--ease-std), border-color var(--t-fast) var(--ease-std), scale var(--t-fast) var(--ease-out); }
.cs-tick svg { width: 14px; height: 14px; stroke-width: 3; }
.cs-tick:hover:not(:disabled) { border-color: var(--accent); color: var(--field-line-strong); }
.cs-tick.on { background: var(--grad-brand); border-color: transparent; color: var(--on-accent); }
.cs-tick:active:not(:disabled) { scale: 0.86; }
.cs-tick:disabled { cursor: default; }
.cs-tick:focus-visible, .cs-dd:focus-visible { outline: none; box-shadow: var(--ring); }
.cs-role.ticked .cs-role-name b { color: var(--ink-3); }
.cs-by { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-2xs); font-weight: var(--fw-semibold); color: var(--ok); }
.cs-by svg { width: 12px; height: 12px; }
.cs-dticks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cs-dd { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); font: inherit; font-size: var(--fs-3xs); font-weight: var(--fw-bold); color: var(--ink-3); cursor: pointer; }
.cs-dd svg { width: 11px; height: 11px; stroke-width: 3; }
.cs-dd.on { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.cs-dd:disabled { cursor: default; }
.cs-dcount { font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; opacity: 0.75; }
.cs-dcount.all { color: var(--ok-strong); opacity: 1; }
.cs-days button.on .cs-dcount.all { color: inherit; }
.as-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 var(--sp-2) 0 3px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); font-size: var(--fs-sm); font-weight: var(--fw-semibold); max-width: 100%; animation: chip-in 220ms var(--ease-out) both; }
.as-chip.out { padding: 0 var(--sp-2); background: var(--surface-sunken); border-style: dashed; font-weight: var(--fw-medium); color: var(--ink-2); }
.as-chip.crew { border-color: var(--line-accent); background: var(--surface-selected); }
.as-chip.clash { border-color: var(--line-danger); background: var(--danger-bg); color: var(--danger); }
.as-chip > svg { width: 13px; height: 13px; }
.as-chip .av { --s: 22px; }
.as-ini { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: var(--fs-3xs); font-weight: var(--fw-bold); flex: 0 0 22px; }
.as-role { font-size: var(--fs-3xs); font-weight: var(--fw-bold); color: var(--accent-ink); text-transform: uppercase; letter-spacing: var(--ls-wide); }
.as-wa, .as-x { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-3); cursor: pointer; padding: 0; }
.as-wa:hover { color: var(--ok-strong); background: var(--ok-bg); }
.as-x:hover { color: var(--danger); background: var(--danger-bg); }
.as-wa svg, .as-x svg { width: 13px; height: 13px; }
@keyframes chip-in { from { opacity: 0; scale: 0.92; } to { opacity: 1; scale: 1; } }
.er-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); flex-wrap: wrap; padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-3); border-radius: var(--r-md); background: var(--accent-bg); color: var(--accent-ink); }
.er-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-2) var(--sp-3) var(--sp-3); margin-bottom: var(--sp-3); }
.er-sec.every { border-color: var(--line-accent); }
.er-sec-head { display: flex; align-items: baseline; gap: var(--sp-2); padding: var(--sp-2) var(--sp-1); }
.er-sec-head b { font-family: var(--font-display); }
.er-row { display: grid; grid-template-columns: minmax(150px, 20%) minmax(0, 1fr) minmax(200px, 30%) 28px; gap: var(--sp-3); align-items: start; padding: var(--sp-2) var(--sp-1); border-top: 1px solid var(--line); }
.er-row:first-of-type { border-top: 0; }
.er-row.issue { box-shadow: inset 3px 0 0 var(--danger-solid); padding-left: var(--sp-3); }
.er-role { display: flex; flex-direction: column; min-width: 0; font-size: var(--fs-sm); }
.er-people { display: flex; flex-wrap: wrap; gap: var(--sp-1); align-items: center; min-width: 0; }
.er-add { border-style: dashed; }
.er-addrole { margin-top: var(--sp-2); }
.er-empty { padding: var(--sp-2) var(--sp-1); }
.er-save { position: sticky; bottom: var(--sp-3); z-index: 5; display: flex; align-items: center; gap: var(--sp-2); justify-content: flex-end; margin-top: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--surface-inverse); color: var(--on-accent); box-shadow: var(--shadow-lg); opacity: 0; translate: 0 12px; pointer-events: none; transition: opacity var(--t-med), translate var(--t-med) var(--ease-out); }
.er-save.show { opacity: 1; translate: 0 0; pointer-events: auto; }
.er-save > span { margin-right: auto; font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.er-save .btn:not(.btn-primary) { background: transparent; color: var(--on-accent); border-color: rgba(255, 255, 255, 0.3); box-shadow: none; }
@media (max-width: 720px) {
  .cs-groups { columns: 1; }
  .cs-role { grid-template-columns: minmax(0, 1fr); gap: var(--sp-1); }
  .cs-role:has(> .cs-tick) { grid-template-columns: 26px minmax(0, 1fr); column-gap: var(--sp-3); }
  .cs-role:has(> .cs-tick) > .cs-people { grid-column: 2; }
  .cs-role:has(> .cs-tick) > .cs-detail { grid-column: 2; }
  .cs-side { align-items: stretch; min-width: 0; width: 100%; }
  .er-row { grid-template-columns: minmax(0, 1fr) 28px; }
  .er-row .er-people, .er-row .er-note { grid-column: 1 / -1; }
}
@media print {
  .cs-actions, .cs-days, .clash-panel, .er-save, .proj-tabs, .tabs, [data-phone-nudge] { display: none !important; }
  .cs-group, .cs-head { box-shadow: none; break-inside: avoid; }
}
.od-person.crew { background: var(--surface-selected); box-shadow: inset 0 0 0 1px var(--line-accent); }
.od-crew { color: var(--accent-ink); }
/* crew profile in the bank drawer */
.crew-prof { padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); margin-bottom: var(--sp-3); }
.cp-rates { display: flex; flex-wrap: wrap; gap: var(--sp-3); font-size: var(--fs-sm); color: var(--ink-3); }
.cp-rates b { font-family: var(--font-display); font-size: var(--fs-lg); color: var(--ink); }
.cp-strip { display: grid; grid-template-columns: repeat(28, 1fr); gap: 2px; }
.cp-strip i { height: 18px; border-radius: var(--r-2xs); background: var(--surface-muted); }
.cp-strip i:nth-child(7n + 1) { box-shadow: inset 1px 0 0 var(--line-2); }
.cp-strip i.booked { background: var(--danger-solid-soft); } .cp-strip i.held { background: var(--warn-solid); } .cp-strip i.planned { background: var(--blue); } .cp-strip i.done { background: var(--neutral-300); }
.cp-jobs { list-style: none; margin: var(--sp-2) 0 0; padding: 0; display: grid; gap: var(--sp-2); }
.cp-jobs li { display: flex; align-items: center; gap: var(--sp-2); }

/* ---------------------------------------------------------------- invite by email */
.inv-steps { list-style: none; display: flex; gap: var(--sp-2); margin: 0 0 var(--sp-3); padding: 0; }
.inv-steps li { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--ink-3); font-weight: var(--fw-semibold); }
.inv-steps li + li::before { content: ""; width: 28px; height: 1px; background: var(--line-2); margin-right: var(--sp-1); }
.inv-steps b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-muted); font-size: var(--fs-xs); transition: background var(--t-med), color var(--t-med); }
.inv-steps li.on { color: var(--ink); } .inv-steps li.on b { background: var(--accent); color: var(--on-accent); }
.inv-list { max-height: 48vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.inv-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: var(--sp-2) var(--sp-3); background: var(--surface-sunken); border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.inv-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) minmax(180px, 38%) 130px; gap: var(--sp-3); align-items: center; padding: 6px var(--sp-3); border-bottom: 1px solid var(--line); transition: background var(--t-fast); }
.inv-row.sel { background: var(--surface-hover); }
.inv-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
.inv-st { font-size: var(--fs-2xs); font-weight: var(--fw-bold); text-align: right; color: var(--ink-3); }
.inv-st.in { color: var(--ok); } .inv-st.invited { color: var(--info); } .inv-st.noemail { color: var(--warn); }
.inv-paste { margin-bottom: var(--sp-3); }
.inv-preview { width: 100%; height: min(52vh, 420px); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--ground); }
.empty-ok { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); padding: var(--sp-6) 0 var(--sp-3); text-align: center; }
.empty-ok > svg { width: 38px; height: 38px; color: var(--on-accent); background: var(--ok-solid); border-radius: 50%; padding: 8px; animation: pop-in 360ms var(--ease-spring) both; }
.inv-res { list-style: none; margin: var(--sp-3) 0 0; padding: 0; display: grid; gap: var(--sp-2); }
.inv-res li { display: flex; align-items: center; gap: var(--sp-2); }
.inv-res li.ok > svg { color: var(--ok-strong); } .inv-res li.bad > svg { color: var(--danger); }
.inv-res svg { width: 15px; height: 15px; }
@media (max-width: 640px) { .inv-row { grid-template-columns: 20px minmax(0, 1fr); } .inv-row .inv-email, .inv-row .inv-st { grid-column: 2; text-align: left; } }

/* ---------------------------------------------------------------- avatar rings (round 9)
   Earned, and seen by everyone wherever the avatar shows (assignee pickers, cards, People):
   the member level's band from Frost up (core/ui.js avatar(), `ring` from /bootstrap).
   Frost an ice ring, Solar gold, Aurora and Cosmic turning slowly. The founder's ring is
   thicker, with a flame that circles it and a warm glow. Motion stops under reduced motion.
   The class is .av-ring, never .ring: .ring is the 42px progress ring above, and sharing
   the name blew every ringed avatar up to its size. The ring's width (--rw) and its gap to
   the face (--rg) follow the avatar's size (--s), so it sits right from 20px chips to 48px
   profiles. Only rotate and opacity move (no box-shadow animation), so a list full of the
   same person stays cheap to draw. */
.av.av-ring { --rg: 1.5px; --rw: max(1.5px, calc(var(--s) * .08)); position: relative; isolation: isolate; box-shadow: 0 0 0 var(--rg) var(--surface); }
.av.av-ring::before, .av.av-ring::after { content: ""; position: absolute; inset: calc(-1 * (var(--rg) + var(--rw))); z-index: -1; border-radius: 50%; pointer-events: none;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--rw) - .5px), black calc(100% - var(--rw))); mask: radial-gradient(farthest-side, transparent calc(100% - var(--rw) - .5px), black calc(100% - var(--rw))); }
.av.av-ring::after { display: none; }
/* The level borders are drawings (core/tiers.js, "level borders" below); these flat rings in their band's colours stand in
   where avatars overlap in a stack (avatars()). */
.av:is(.av-ring-w1, .av-ring-e1, .av-ring-e2)::before { background: conic-gradient(var(--tb1-a), var(--tb1-b), var(--tb1-c), var(--tb1-b), var(--tb1-a)); }
.av:is(.av-ring-f1, .av-ring-f2, .av-ring-f3)::before { background: conic-gradient(var(--tb2-a), var(--tb2-b), var(--tb2-c), var(--tb2-b), var(--tb2-a)); }
.av:is(.av-ring-s1, .av-ring-s2, .av-ring-s3)::before { background: conic-gradient(var(--tb3-a), var(--tb3-b), var(--tb3-c), var(--tb3-b), var(--tb3-a)); }
.av:is(.av-ring-a1, .av-ring-a2, .av-ring-a3)::before { background: conic-gradient(var(--tb4-a), var(--tb4-b), var(--tb4-c), var(--tb4-b), var(--tb4-a)); }
.av:is(.av-ring-c1, .av-ring-c2)::before { background: conic-gradient(var(--tb5-a), var(--tb5-c), var(--tb5-b), var(--tb5-c), var(--tb5-a)); }
.av.av-ring-c3::before { background: conic-gradient(var(--tb6-a), var(--tb6-b), var(--tb6-c), var(--tb6-b), var(--tb6-a)); }
.av.av-ring-o1::before { background: conic-gradient(var(--ct-ink), var(--neutral-500), var(--ct-ink), var(--rn-red), var(--ct-ink)); }
.av.av-ring-t1::before { background: var(--ct-blue); }
.av.av-ring-g1::before { background: conic-gradient(var(--tb3-a), var(--tb3-b), var(--rn-red), var(--tb3-b), var(--tb3-a)); }
.av.av-ring-b1::before { background: repeating-conic-gradient(var(--vy-wood) 0 20deg, var(--rn-red) 20deg 30deg); }
.av.av-ring-r1::before { background: conic-gradient(var(--tb2-a), var(--tb5-b), var(--tb2-b), var(--tb5-b), var(--tb2-a)); }
.av.av-ring-d1::before { background: linear-gradient(var(--ct-dawn-a), var(--ct-dawn-b), var(--ct-dawn-c)); }
.av.av-ring-k1::before { background: repeating-conic-gradient(var(--vy-wood-dark) 0 11deg, var(--vy-straw) 11deg 22.5deg); }
.av.av-ring-l1::before { background: conic-gradient(var(--tb3-a), var(--tb3-b), var(--tb3-a)); }
.av.av-ring-n1::before { background: conic-gradient(var(--tb5-b), var(--tb3-b), var(--tb5-b), var(--rn-red), var(--tb5-b)); }
.av.av-ring-x1::before { background: conic-gradient(var(--ct-ink), var(--tb6-b), var(--ct-dawn-a), var(--ct-ink)); }
/* a picture instead of initials (core/ui.js avatar(), set in views/me-ui.js) */
.av.has-photo { background-size: cover; background-position: center; background-repeat: no-repeat; color: transparent; }
.me-photo { display: flex; align-items: center; gap: var(--sp-4); grid-column: 1 / -1; }
.me-prev { flex: none; display: grid; place-items: center; min-width: 52px; }
.me-edit .field { grid-column: 1 / -1; }
/* the border collection dialog (views/border-ui.js) */
.bd-top { display: flex; align-items: center; gap: var(--sp-4); padding-bottom: var(--sp-3); margin-bottom: var(--sp-3); border-bottom: 1px solid var(--line); }
.bd-now { flex: none; }
.bd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--sp-2); }
.bd-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: var(--sp-3) var(--sp-2); text-align: center; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--glass-btn); color: var(--ink); cursor: pointer; transition: border-color var(--t-fast) var(--ease-std), background var(--t-fast) var(--ease-std); }
.bd-cell:hover { border-color: var(--line-hover); background: var(--glass-btn-hover); }
.bd-cell.on { border-color: var(--accent); background: var(--accent-bg); }
.bd-cell .tiny { min-height: 2.6em; display: flex; align-items: center; justify-content: center; gap: 3px; }
.bd-cell .tiny svg { width: 11px; height: 11px; }
.bd-prev { display: grid; place-items: center; height: 76px; }
.bd-cell.locked .bd-prev { filter: grayscale(.85) brightness(.75); opacity: .7; }
.bd-cell.locked { cursor: default; }
.bd-grid.voyage { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.bd-grid.voyage .bd-prev { height: 104px; }
.bd-grid.voyage .bd-prev .av-wreath { --s: 44px; }
.bd-grid.voyage .bd-prev .av-wreath > .av { width: var(--s); height: var(--s); font-size: var(--fs-md); }
.bd-set { padding: var(--sp-3); border-radius: var(--r-md); background: var(--surface-sunken); margin-bottom: var(--sp-2); }
@media (max-width: 640px) { .bd-top { align-items: flex-start; } }
@keyframes av-breathe { 0%, 100% { opacity: .35; scale: .96; } 50% { opacity: 1; scale: 1.04; } }
/* drawn borders (the level borders, core/tiers.js; the Grand Voyage, Rossoneri and Golden Snitch art; the borders to catch, core/catch.js):
   the art sits in a box --k times the face's size with the face in the middle. (The tentacle wreath that was here went with the level
   borders' redraw, 2026-11-28.) */
.av-wreath { --s: 26px; --k: 2.2; position: relative; isolation: isolate; width: var(--s); height: var(--s); flex: 0 0 var(--s); display: inline-grid; place-items: center; }
.av-wreath.lg { --s: 36px; }
.av-wreath.sm { --s: 22px; }
/* the profile size takes the wreath's whole box in the layout (the face is a little smaller than the opening); the smaller
   ones don't change their row at all: the art simply overlaps the space around the face */
.av-wreath:not(.xl) { --k: 2; } /* no margin: the layout box stays the size of a plain avatar, so nothing beside it moves; the art just spills over the space around */
.av-wreath.xl { --s: 41px; width: calc(var(--s) * var(--k)); height: calc(var(--s) * var(--k)); flex-basis: calc(var(--s) * var(--k)); }
.av-wreath > .av { --s: inherit; position: relative; z-index: 0; box-shadow: 0 0 0 max(1px, calc(var(--s) * .05)) var(--surface); }
.av-wreath .w-art { position: absolute; left: 50%; top: 50%; width: calc(var(--s) * var(--k)); height: calc(var(--s) * var(--k)); translate: -50% -50%; z-index: 1; pointer-events: none; overflow: visible; }
/* thin ring off under the art. Small avatars and chips wear the drawn border too (2026-10-11: the thin ring they had read as
   "my border didn't change"), drawn still: no motion in lists, where one person can show a hundred times */
.av-wreath > .av.av-ring::before, .av-wreath > .av.av-ring::after { content: none; }
:is(.pic-chip, .as-chip) .av-wreath { --s: 20px; }
.as-chip .av-wreath { --s: 22px; }
.av-wreath.sm::before, .av-wreath.sm .w-art, .av-wreath.sm .w-art * { animation: none !important; }
.av-wreath.sm .hp-art .hp-spark { opacity: .9; } /* (the voyage bolts stay hidden: too busy at this size) */
.av-wreath.sm .vy-art .vy-tip { rotate: -9deg; }
/* voyage borders (round 25, core/voyage.js): a pirate adventure after One Piece, at levels 5, 10 and 15.
   Inline art in the wreath's box; small avatars (lists, chips) fall back to a thin ring in the set's colours. */
.av.av-ring-p1::before { background: repeating-conic-gradient(var(--vy-rope) 0 12deg, var(--vy-rope-dark) 12deg 16deg); animation: av-turn 18s linear infinite; }
.av.av-ring-p2::before { background: repeating-conic-gradient(var(--vy-wood) 0 30deg, var(--vy-sea) 30deg 45deg); animation: av-turn 14s linear infinite; }
.av.av-ring-p3 { --rw: max(2px, calc(var(--s) * .1)); }
.av.av-ring-p3::before { background: conic-gradient(var(--vy-gold-light), var(--vy-gold), var(--vy-band), var(--vy-gold), var(--vy-gold-light)); animation: av-turn 7s linear infinite; }
.av-wreath.vy .vy-art { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .32)); }
.vy-art * { transform-box: view-box; transform-origin: 50px 50px; }
.vy-art .vy-rope-shadow { fill: none; stroke: var(--vy-straw-edge); stroke-width: 5.4; }
.vy-art .vy-rope-body { fill: none; stroke: var(--vy-rope); stroke-width: 4; }
.vy-art .vy-rope-twist { fill: none; stroke: var(--vy-rope-dark); stroke-width: 4; stroke-dasharray: 1.3 4.4; stroke-linecap: butt; animation: vy-rope 2.6s linear infinite; }
.vy-art .vy-knot circle { fill: var(--vy-rope); stroke: var(--vy-straw-edge); stroke-width: .8; }
.vy-art .vy-knot path { fill: none; stroke: var(--vy-rope); stroke-width: 2.2; stroke-linecap: round; }
.vy-art .vy-brim { fill: var(--vy-straw); stroke: var(--vy-straw-edge); stroke-width: .9; }
.vy-art .vy-weave { fill: none; stroke: var(--vy-straw-2); stroke-width: .7; opacity: .75; }
.vy-art .vy-dome { fill: var(--vy-straw); stroke: var(--vy-straw-edge); stroke-width: .9; stroke-linejoin: round; }
.vy-art .vy-band { fill: var(--vy-band); stroke: var(--vy-band-edge); stroke-width: .6; stroke-linejoin: round; }
.vy-art .vy-hat-shine { fill: none; stroke: var(--vy-gold-light); stroke-width: 1.3; stroke-linecap: round; opacity: .8; }
/* the hat tips as if a sea wind caught the brim */
.vy-art .vy-tip { transform-origin: 50px 24px; animation: vy-tip 3.4s ease-in-out infinite alternate; }
.vy-art .vy-wave { fill: none; stroke-linejoin: round; }
.vy-art .vy-wave.w1 { stroke: var(--vy-sea); stroke-width: 2.6; animation: av-turn 26s linear infinite; }
.vy-art .vy-wave.w2 { stroke: var(--vy-sea-2); stroke-width: 1.6; opacity: .85; animation: av-turn 18s linear infinite reverse; }
.vy-art .vy-wheel { animation: vy-steer 5.2s cubic-bezier(.45, 0, .2, 1) infinite alternate; }
.vy-art .vy-handle { stroke: var(--vy-wood); stroke-width: 4; stroke-linecap: round; fill: none; paint-order: stroke; }
.vy-art .vy-knob { fill: var(--vy-wood-light); stroke: var(--vy-wood-dark); stroke-width: .8; }
.vy-art .vy-rim-edge { fill: none; stroke: var(--vy-wood-dark); stroke-width: 6.2; }
.vy-art .vy-rim { fill: none; stroke: var(--vy-wood); stroke-width: 4.6; }
.vy-art .vy-rim-shine { fill: none; stroke: var(--vy-wood-light); stroke-width: .9; opacity: .9; }
.vy-art .vy-stud { fill: var(--vy-gold); stroke: var(--vy-gold-dark); stroke-width: .3; }
.vy-art .vy-gold-edge { fill: none; stroke: var(--vy-gold-dark); stroke-width: 6; }
.vy-art .vy-gold { fill: none; stroke: url(#vyGold); stroke-width: 4.4; }
.vy-art .vy-gold-shine { fill: none; stroke: var(--vy-gold-light); stroke-width: .9; stroke-dasharray: 26 175; stroke-linecap: round; animation: vy-glint 3.2s linear infinite; }
.vy-art .vy-gem { fill: var(--vy-gem); stroke: var(--vy-gold-light); stroke-width: .5; }
.vy-art .vy-cape { fill: var(--vy-cape); stroke: var(--vy-cape-dark); stroke-width: .8; stroke-linejoin: round; transform-origin: 58px 82px; }
.vy-art .vy-cape-knot { fill: var(--vy-cape); stroke: var(--vy-cape-dark); stroke-width: .8; }
.vy-art .vy-cape.l { animation: vy-cape-l 2.4s ease-in-out infinite alternate; }
.vy-art .vy-cape.r { animation: vy-cape-r 2.9s ease-in-out infinite alternate; }
.vy-art .vy-bolt { fill: none; stroke: var(--vy-bolt); stroke-width: 1.5; stroke-linejoin: miter; stroke-linecap: round; opacity: 0; paint-order: stroke; filter: drop-shadow(0 0 1.5px var(--vy-bolt)); animation: vy-bolt 2.8s steps(1, end) infinite; }
.vy-art .vy-bolt.b1 { animation-delay: .7s; }
.vy-art .vy-bolt.b2 { animation-delay: 1.4s; }
.vy-art .vy-bolt.b3 { animation-delay: 2.1s; }
.av-wreath.vy-p3 .vy-art { filter: drop-shadow(0 0 3px color-mix(in srgb, var(--vy-bolt) 45%, transparent)) drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
/* rossoneri border (core/rossoneri.js): the prize of the Rossoneri quest, after AC Milan. Red and black stripes inside a gold
   edge, a gold star, the devil's horns and tail. Small avatars fall back to a thin striped ring. */
.av.av-ring-m1 { --rw: max(2px, calc(var(--s) * .1)); }
.av.av-ring-m1::before { background: repeating-conic-gradient(var(--rn-red) 0 15deg, var(--rn-black) 15deg 30deg); animation: av-turn 24s linear infinite; }
.rn-art .rn-edge { fill: none; stroke: var(--vy-gold); stroke-width: 8; }
.rn-art .rn-red { fill: none; stroke: var(--rn-red); stroke-width: 5.8; }
.rn-art .rn-stripes { fill: none; stroke: var(--rn-black); stroke-width: 5.8; stroke-dasharray: 8.639 8.639; animation: av-turn 36s linear infinite; }
.rn-art .rn-glint { fill: none; stroke: var(--vy-gold-light); stroke-width: 1.1; stroke-dasharray: 24 202.8; stroke-linecap: round; animation: rn-glint 3.6s linear infinite; }
.rn-art .rn-star { fill: var(--vy-gold); stroke: var(--vy-gold-dark); stroke-width: .9; stroke-linejoin: round; transform-origin: 50px 11.5px; animation: rn-star 2.8s ease-in-out infinite alternate; }
.rn-art .rn-horn { fill: var(--rn-red); stroke: var(--rn-red-dark); stroke-width: .9; stroke-linejoin: round; }
.rn-art .rn-tail { transform-origin: 67.5px 80.3px; animation: rn-tail 2.6s ease-in-out infinite alternate; }
.rn-art .rn-tail-line { fill: none; stroke: var(--rn-red); stroke-width: 2.6; stroke-linecap: round; }
.rn-art .rn-tail-tip { fill: var(--rn-red); stroke: var(--rn-red-dark); stroke-width: .7; stroke-linejoin: round; }
@keyframes rn-glint { to { stroke-dashoffset: -226.8; } }
@keyframes rn-star { from { scale: .92; } to { scale: 1.1; } }
@keyframes rn-tail { from { rotate: -7deg; } to { rotate: 8deg; } }
/* wizard border (core/wizard.js): the Golden Snitch, after Harry Potter, the reward of level 12. A scarlet ring in a gold edge set
   with stars, a bolt that flashes, a wand casting sparks, and a snitch that darts round the ring and hovers. Small avatars get a thin ring. */
.av.av-ring-h1 { --rw: max(2px, calc(var(--s) * .1)); }
.av.av-ring-h1::before { background: conic-gradient(var(--vy-gold-light), var(--vy-gold), var(--hp-scarlet), var(--vy-gold), var(--hp-scarlet), var(--vy-gold), var(--vy-gold-light)); animation: av-turn 9s linear infinite; }
.av-wreath.hp-h1 .hp-art { filter: drop-shadow(0 0 3px color-mix(in srgb, var(--vy-gold) 40%, transparent)) drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
.hp-art .hp-edge { fill: none; stroke: var(--vy-gold); stroke-width: 8; }
.hp-art .hp-ring { fill: none; stroke: var(--hp-scarlet); stroke-width: 5.8; }
.hp-art .hp-glint { fill: none; stroke: var(--vy-gold-light); stroke-width: 1.1; stroke-dasharray: 24 202.8; stroke-linecap: round; animation: rn-glint 3.2s linear infinite; }
.hp-art .hp-stud { fill: var(--vy-gold-light); transform-box: fill-box; transform-origin: center; animation: hp-twinkle 2.4s ease-in-out infinite; }
.hp-art .hp-star { fill: var(--vy-gold); stroke: var(--vy-gold-dark); stroke-width: .3; transform-box: fill-box; transform-origin: center; animation: hp-twinkle 3.1s ease-in-out infinite; }
.hp-art :is(.hp-stud, .hp-star).t1 { animation-delay: -.8s; }
.hp-art :is(.hp-stud, .hp-star).t2 { animation-delay: -1.7s; }
.hp-art .hp-bolt { fill: var(--vy-gold-light); stroke: var(--vy-gold-dark); stroke-width: .9; stroke-linejoin: round; paint-order: stroke; animation: hp-flash 4.2s steps(1, end) infinite; }
.hp-art .hp-wand { fill: var(--vy-wood); stroke: var(--vy-wood-dark); stroke-width: .7; stroke-linejoin: round; }
.hp-art .hp-grip { fill: var(--vy-wood-dark); stroke: var(--vy-wood-dark); stroke-width: .7; stroke-linejoin: round; }
.hp-art .hp-band { fill: none; stroke: var(--vy-gold); stroke-width: 1.1; stroke-linecap: round; }
.hp-art .hp-tip { fill: var(--hp-spark); filter: drop-shadow(0 0 2px var(--hp-spark-glow)); transform-box: fill-box; transform-origin: center; animation: hp-tip 1.6s ease-in-out infinite alternate; }
.hp-art .hp-spark { fill: var(--hp-spark); stroke: var(--hp-spark-glow); stroke-width: .3; transform-box: fill-box; transform-origin: center; opacity: 0; animation: hp-cast 2.4s ease-out infinite; }
.hp-art .hp-spark.k1 { animation-delay: .6s; }
.hp-art .hp-spark.k2 { animation-delay: 1.2s; }
.hp-art .hp-spark.k3 { animation-delay: 1.8s; }
/* the snitch: the orbit turns it round the ring in darts and pauses, the inner group turns it back by the same steps so it stays upright */
.hp-art .hp-orbit { animation: hp-orbit 11s cubic-bezier(.5, 0, .3, 1) infinite; }
.hp-art .hp-upright { transform-origin: 50px 8px; animation: hp-orbit-back 11s cubic-bezier(.5, 0, .3, 1) infinite; }
.hp-art .hp-bob { animation: hp-bob 1.3s ease-in-out infinite alternate; }
.hp-art .hp-ball { fill: var(--vy-gold); stroke: var(--vy-gold-dark); stroke-width: .7; }
.hp-art .hp-ball-line { fill: none; stroke: var(--vy-gold-dark); stroke-width: .5; stroke-linecap: round; opacity: .7; }
.hp-art .hp-ball-shine { fill: var(--vy-gold-light); }
.hp-art .hp-wing path { fill: var(--hp-wing); stroke: var(--hp-wing-edge); stroke-width: .5; stroke-linejoin: round; }
.hp-art .hp-wing.l { transform-origin: 47px 8.4px; animation: hp-flap-l .16s ease-in-out infinite alternate; }
.hp-art .hp-wing.r { transform-origin: 53px 8.4px; animation: hp-flap-r .16s ease-in-out infinite alternate; }
@keyframes hp-orbit { 0% { rotate: 0deg; } 14% { rotate: 96deg; } 26% { rotate: 108deg; } 44% { rotate: 232deg; } 56% { rotate: 220deg; } 74% { rotate: 318deg; } 84% { rotate: 306deg; } 100% { rotate: 360deg; } }
@keyframes hp-orbit-back { 0% { rotate: 0deg; } 14% { rotate: -96deg; } 26% { rotate: -108deg; } 44% { rotate: -232deg; } 56% { rotate: -220deg; } 74% { rotate: -318deg; } 84% { rotate: -306deg; } 100% { rotate: -360deg; } }
@keyframes hp-bob { from { translate: 0 -.9px; } to { translate: 0 1.1px; } }
@keyframes hp-flap-l { from { rotate: 16deg; scale: 1 1; } to { rotate: -30deg; scale: .92 .8; } }
@keyframes hp-flap-r { from { rotate: -16deg; scale: 1 1; } to { rotate: 30deg; scale: .92 .8; } }
@keyframes hp-twinkle { 0%, 100% { scale: .55; opacity: .45; } 50% { scale: 1.15; opacity: 1; } }
@keyframes hp-flash { 0%, 100% { filter: none; } 3% { filter: brightness(1.6) drop-shadow(0 0 3px var(--vy-gold-light)); } 7% { filter: none; } 10% { filter: brightness(1.8) drop-shadow(0 0 4px var(--vy-gold-light)); } 18% { filter: none; } }
@keyframes hp-tip { from { scale: .7; opacity: .7; } to { scale: 1.25; opacity: 1; } }
@keyframes hp-cast { 0% { opacity: 0; scale: .2; rotate: 0deg; } 25% { opacity: 1; scale: 1.1; } 60% { opacity: .9; scale: .9; rotate: 40deg; } 100% { opacity: 0; scale: .3; rotate: 70deg; } }
@media (prefers-reduced-motion: reduce) { .hp-art .hp-spark { opacity: .9; } }
/* the quest behind it, in the border picker (views/border-ui.js): the border on the left, its three steps on the right */
.bd-quest { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: var(--sp-3); align-items: start; }
.bd-quest .bd-prev { height: 104px; }
.bd-quest .bd-prev .av-wreath { --s: 44px; }
.bd-quest .bd-prev .av-wreath > .av { width: var(--s); height: var(--s); font-size: var(--fs-md); }
@media (max-width: 640px) { .bd-quest { grid-template-columns: minmax(0, 1fr); } }
/* the collection (views/border-ui.js, 2026-11-28): Levels by band, To catch with each quest's steps, Specials */
.bd-meter { max-width: 320px; }
.bd-tabs { display: flex; width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.bd-band { padding: var(--sp-2) var(--sp-3) var(--sp-3); border-radius: var(--r-md); background: var(--surface-sunken); margin-bottom: var(--sp-2); }
.bd-band-head { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-1) 0 var(--sp-2); min-width: 0; }
.bd-band-head b { font-size: var(--fs-sm); }
.bd-band-head .tiny { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-band .tier-dot { width: 14px; height: 14px; flex: none; clip-path: var(--shape, circle(50%)); background: var(--rim); }
.bd-band-n { flex: none; margin-left: auto; font-weight: var(--fw-semibold); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bd-band.full .bd-band-n { color: var(--ok); }
.bd-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bd-grid.three .bd-prev { height: 104px; }
:is(.bd-grid.three, .bd-catch) .bd-prev .av-wreath { --s: 46px; }
:is(.bd-grid.three, .bd-catch) .bd-prev .av-wreath > .av { width: var(--s); height: var(--s); font-size: var(--fs-md); }
.bd-cell.worn { border-color: var(--accent); }
.bd-catches { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); }
.bd-catch { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--sp-2) var(--sp-3); align-items: start; padding: var(--sp-3); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--glass-btn); min-width: 0; }
.bd-catch.on { border-color: var(--accent); background: var(--accent-bg); }
.bd-catch-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--sp-2); }
.bd-catch-prev { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0; border: 0; background: none; color: var(--ink-2); cursor: pointer; font: inherit; }
.bd-catch-prev .bd-prev { height: 104px; }
.bd-catch-prev.locked { cursor: default; }
.bd-catch-prev.locked .bd-prev { filter: grayscale(.9) brightness(.8); opacity: .62; }
.bd-catch-prev .bd-wear { color: var(--accent-ink); font-weight: var(--fw-semibold); }
.bd-catch-prev .tiny svg { width: 11px; height: 11px; }
.bd-catch .quests { margin: 0; }
.bd-steps { grid-column: 2; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--sp-2); }
.bd-catch-prev { grid-row: span 2; }
.bd-tag { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: var(--r-pill); background: var(--surface-sunken); color: var(--ink-2); font-size: var(--fs-2xs); font-weight: var(--fw-semibold); }
.bd-tag svg { width: 11px; height: 11px; }
.bd-tag.ok { background: var(--ok-bg); color: var(--ok); }
.bd-tag.warn { background: var(--warn-bg); color: var(--warn); }
.bd-mystery { --s: 46px; width: var(--s); height: var(--s); display: inline-grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 50% 50%, var(--surface-inverse) 58%, transparent 60%), conic-gradient(var(--ct-ink), var(--neutral-500), var(--ct-ink)); box-shadow: 0 0 0 calc(var(--s) * .2) var(--ct-ink); color: var(--on-accent); font-weight: var(--fw-heavy); font-size: var(--fs-lg); }
.bd-mystery.xl { --s: 48px; }
@media (max-width: 640px) { .bd-grid.three .bd-prev { height: 84px; } :is(.bd-grid.three, .bd-catch) .bd-prev .av-wreath { --s: 38px; } .bd-catch { grid-template-columns: 84px minmax(0, 1fr); } .bd-catch-prev { grid-row: auto; } .bd-catch-prev .bd-prev { height: 88px; } .bd-steps { grid-column: 1 / -1; } .bd-grid.three .bd-cell .tiny { font-size: var(--fs-2xs); } .bd-band-head { flex-wrap: wrap; } .bd-band-head .tiny:not(.bd-band-n) { order: 3; width: 100%; } }
@keyframes vy-rope { to { stroke-dashoffset: -11.4; } }
@keyframes vy-tip { from { rotate: -13deg; translate: -1.5px .5px; } to { rotate: -5deg; translate: .5px -1px; } }
@keyframes vy-steer { from { rotate: -24deg; } to { rotate: 24deg; } }
@keyframes vy-glint { to { stroke-dashoffset: -201; } }
@keyframes vy-cape-l { from { rotate: 5deg; scale: 1 1; } to { rotate: -6deg; scale: 1.05 .94; } }
@keyframes vy-cape-r { from { rotate: -6deg; scale: 1 1; } to { rotate: 5deg; scale: 1.04 1.06; } }
@keyframes vy-bolt { 0%, 100% { opacity: 0; } 4% { opacity: 1; } 9% { opacity: .2; } 13% { opacity: 1; } 22% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .vy-art * { animation: none !important; } .vy-art .vy-bolt { opacity: .9; } .vy-art .vy-tip { rotate: -9deg; } }
@keyframes av-turn { to { rotate: 1turn; } }
@keyframes av-flicker { 0%, 100% { opacity: 1; } 28% { opacity: .72; } 52% { opacity: .96; } 76% { opacity: .66; } }
.avs .av.av-ring + .av, .avs .av + .av.av-ring { margin-left: -3px; }
@media (prefers-reduced-motion: reduce) { .av.av-ring::before, .av.av-ring::after { animation: none !important; } }
/* level borders (2026-11-28, core/tiers.js, docs/border-tiers.md): the fifteen level borders drawn as art, five bands
   of material and shape (bronze, silver and laurel, gold and gems, a royal crown, celestial wings) and the level in
   the band as pips on a plate. The colours are in the art; this is how it sits and moves. A glint runs round the band,
   gems twinkle, wings beat, the top level burns. Small avatars and chips are drawn still (the rules above), and so is
   everything under reduced motion. */
.av-wreath.tb .tb-art { filter: drop-shadow(0 1px 1.2px rgba(0, 0, 0, .3)); }
.tb-art * { transform-box: view-box; transform-origin: 50px 50px; }
.tb-art .tb-glint { stroke-dashoffset: -60; opacity: .8; animation: tb-glint 5.2s linear infinite; }
.tb-art .tb-glint.slow { opacity: .65; animation-duration: 7s; }
.tb-art .tb-glint.fast { opacity: .9; animation-duration: 3.4s; }
.tb-art .tb-tw { transform-box: fill-box; transform-origin: center; animation: tb-twinkle 3s ease-in-out infinite; }
.tb-art :is(.tb-tw, .tb-flame, .tb-ember).d1 { animation-delay: -.75s; }
.tb-art :is(.tb-tw, .tb-flame, .tb-ember).d2 { animation-delay: -1.5s; }
.tb-art :is(.tb-tw, .tb-flame, .tb-ember).d3 { animation-delay: -2.25s; }
.tb-art .tb-wing.r { animation: tb-flap-r 3.4s ease-in-out infinite alternate; }
.tb-art .tb-wing.l { animation: tb-flap-l 3.4s ease-in-out infinite alternate; }
.tb-art .tb-wings.big .tb-wing { animation-duration: 2.6s; }
.tb-art .tb-orbit { animation: av-turn 18s linear infinite; }
.tb-art .tb-orbit.slow { animation-duration: 30s; }
.tb-art .tb-glow { animation: tb-breathe 3.8s ease-in-out infinite; }
.tb-art .tb-glow.fire { animation: tb-breathe 1.9s ease-in-out infinite, av-flicker 1.3s ease-in-out infinite; }
.tb-art .tb-flame { animation: tb-flicker .95s ease-in-out infinite alternate; }
.tb-art .tb-crownfire { transform-origin: 50px 15px; animation: tb-flicker 1.2s ease-in-out infinite alternate; }
.tb-art .tb-ember { animation: tb-rise 2.8s ease-out infinite; }
@keyframes tb-glint { from { stroke-dashoffset: -60; } to { stroke-dashoffset: -160; } }
@keyframes tb-twinkle { 0%, 100% { scale: .9; opacity: .85; } 50% { scale: 1.08; opacity: 1; } }
@keyframes tb-flap-r { from { rotate: 3deg; } to { rotate: -6deg; } }
@keyframes tb-flap-l { from { rotate: -3deg; } to { rotate: 6deg; } }
@keyframes tb-breathe { 0%, 100% { opacity: .5; scale: .97; } 50% { opacity: 1; scale: 1.03; } }
@keyframes tb-flicker { 0% { scale: 1 .84; opacity: .82; } 100% { scale: 1 1.12; opacity: 1; } }
@keyframes tb-rise { 0% { translate: 0 2px; opacity: 0; } 20% { opacity: 1; } 100% { translate: 0 -10px; opacity: 0; } }
/* the shared still drawing in lists and chips: Chrome applies these rules inside a <use> too, so it is stopped here */
.tb-art.still * { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .tb-art * { animation: none !important; } }
/* borders to catch (2026-11-28, core/catch.js): each the prize of a quest (_borders.mts). The lens's iris turns and its flash
   fires, the selection's ants march and a pen glides round, the ribbon's tails sway, abacus beads flick, the watch's
   seconds sweep, the sun's rays sway as birds cross, the batik turns, the lantern swings and flickers among fireflies,
   fireworks pop in turn, the black hole's disc swirls. Still on small avatars (they use the shared still drawing). */
.ct-art .ct-iris { animation: ct-iris 4.8s ease-in-out infinite alternate; }
.ct-art .ct-flash { animation: ct-flash 3.6s ease-out infinite; }
.ct-art .ct-ants { animation: ct-ants .9s linear infinite; }
.ct-art .ct-glide { animation: av-turn 9s linear infinite; }
.ct-art .ct-tails { animation: ct-sway 2.6s ease-in-out infinite alternate; }
.ct-art .ct-beads { animation: ct-flick 5.2s cubic-bezier(.6, 0, .2, 1) infinite; }
.ct-art .ct-bead5 { animation: ct-flick5 5.2s cubic-bezier(.6, 0, .2, 1) infinite; }
.ct-art :is(.ct-beads, .ct-bead5).q1 { animation-delay: -1.3s; }
.ct-art :is(.ct-beads, .ct-bead5).q2 { animation-delay: -2.6s; }
.ct-art :is(.ct-beads, .ct-bead5).q3 { animation-delay: -3.9s; }
.ct-art .ct-sweep { animation: av-turn 12s linear infinite; }
.ct-art .ct-rays { animation: ct-rays 7s ease-in-out infinite alternate; }
.ct-art .ct-sunglow { transform-origin: 50px 92px; animation: tb-breathe 5s ease-in-out infinite; }
.ct-art .ct-birds { animation: ct-birds 9s ease-in-out infinite alternate; }
.ct-art .ct-kawung { animation: av-turn 90s linear infinite; }
.ct-art .ct-swing { animation: ct-swing 3.2s ease-in-out infinite alternate; }
.ct-art .ct-flame { animation: tb-flicker .7s ease-in-out infinite alternate; }
.ct-art .ct-lampglow { animation: av-flicker 1.6s ease-in-out infinite; }
.ct-art .ct-fly { animation: ct-fly 7s ease-in-out infinite; }
.ct-art .ct-fly.k1 { animation-duration: 8.4s; animation-delay: -2s; }
.ct-art .ct-fly.k2 { animation-duration: 6.2s; animation-delay: -4s; }
.ct-art .ct-fly.k3 { animation-duration: 9.4s; animation-delay: -1s; }
.ct-art .ct-burst { animation: ct-burst 3.2s ease-out infinite; }
.ct-art .ct-burst.k1 { animation-delay: -.8s; }
.ct-art .ct-burst.k2 { animation-delay: -1.6s; }
.ct-art .ct-burst.k3 { animation-delay: -2.4s; }
.ct-art .ct-disc { animation: av-turn 26s linear infinite; }
.ct-art .ct-photon { animation: tb-breathe 3.2s ease-in-out infinite; }
@keyframes ct-iris { from { rotate: -8deg; } to { rotate: 12deg; } }
@keyframes ct-flash { 0%, 80% { opacity: 0; scale: .3; } 85% { opacity: 1; scale: 1.15; } 100% { opacity: 0; scale: .7; } }
@keyframes ct-ants { to { stroke-dashoffset: -5; } }
@keyframes ct-sway { from { rotate: -5deg; } to { rotate: 6deg; } }
@keyframes ct-flick { 0%, 28% { rotate: 0deg; } 36%, 68% { rotate: 20deg; } 76%, 100% { rotate: 0deg; } }
@keyframes ct-flick5 { 0%, 40% { rotate: 0deg; } 46%, 84% { rotate: -12deg; } 90%, 100% { rotate: 0deg; } }
@keyframes ct-rays { from { rotate: -5deg; } to { rotate: 5deg; } }
@keyframes ct-birds { from { translate: -2px 1px; } to { translate: 3px -1.5px; } }
@keyframes ct-swing { from { rotate: -9deg; } to { rotate: 7deg; } }
@keyframes ct-fly { 0%, 100% { translate: 0 0; opacity: .3; } 25% { translate: 2px -3px; opacity: 1; } 50% { translate: -1px -5px; opacity: .5; } 75% { translate: -3px -1px; opacity: 1; } }
@keyframes ct-burst { 0% { scale: .2; opacity: 0; } 12% { opacity: 1; } 55% { scale: 1; opacity: .95; } 80%, 100% { scale: 1.08; opacity: 0; } }

/* ---------------------------------------------------------------- related projects in the project header (round 9)
   "← Linked from / Part of" the project this one came from, and a row of the work linked from it,
   so moving between an event and its RSVP or digital work never needs the browser's Back. */
.p-origin { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; margin-bottom: var(--sp-2); padding: 3px var(--sp-3) 3px 7px; border-radius: var(--r-pill); background: var(--glass-btn); border: 1px solid var(--line); color: var(--ink-2); font-size: var(--fs-sm); text-decoration: none !important; transition: border-color var(--t-fast) var(--ease-std), background var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std); }
.p-origin:hover { border-color: var(--line-hover); background: var(--glass-btn-hover); color: var(--ink); }
.p-origin > svg { width: 14px; height: 14px; flex: none; color: var(--accent); transition: translate var(--t-fast) var(--ease-out); }
.p-origin:hover > svg { translate: -2px 0; }
.p-origin-k { color: var(--ink-3); font-size: var(--fs-xs); font-weight: var(--fw-semibold); white-space: nowrap; }
.p-origin b { min-width: 0; font-weight: var(--fw-bold); }
.p-family { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: var(--sp-3); min-width: 0; }
.p-family-k { display: inline-flex; align-items: center; gap: 5px; margin-right: 2px; font-size: var(--fs-2xs); font-weight: var(--fw-heavy); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-3); }
.p-family-k svg { width: 13px; height: 13px; }
.p-fam { display: inline-flex; align-items: center; gap: 6px; max-width: 320px; min-width: 0; padding: 3px 4px; border-radius: var(--r-pill); background: var(--glass-btn); border: 1px solid var(--line); color: var(--ink); font-size: var(--fs-sm); font-weight: var(--fw-semibold); text-decoration: none !important; transition: border-color var(--t-fast) var(--ease-std), background var(--t-fast) var(--ease-std); }
.p-fam:hover { border-color: var(--line-hover); background: var(--glass-btn-hover); }
.p-fam .stage { flex: none; }
.link-hint { margin-top: var(--sp-2); align-items: flex-start; line-height: var(--lh-normal); color: var(--ink-2); }
.link-hint input { margin-top: 2px; }
@media (max-width: 640px) { .p-fam { max-width: 100%; } }

/* ---------------------------------------------------------------- RSVP Platform card: create in one click (round 9) */
.rsvp-create { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin: var(--sp-3) 0 var(--sp-2); padding: var(--sp-3); border-radius: var(--r-md); background: var(--grad-soft); border: 1px solid var(--line-accent); }
.rsvp-create .tiny { flex: 1 1 220px; min-width: 0; }
.rsvp-or { display: flex; align-items: center; gap: var(--sp-2); margin: var(--sp-2) 0; }
.rsvp-or::before, .rsvp-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.rsvp-via { margin-left: auto; margin-right: var(--sp-2); }
.rsvp-slug { display: flex; align-items: center; gap: var(--sp-1); min-width: 0; }
.rsvp-slug .tiny { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.rsvp-slug input { flex: 1 1 auto; min-width: 0; }

/* ---------------------------------------------------------------- long-running projects (round 9)
   Longer than 60 days (always-on telemarketing, year-long campaigns): out of the Projects views
   unless shown, then in their own group, and above the calendar instead of in every day. */
.long-strip { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--glass-card); border: 1px dashed var(--line-2); font-size: var(--fs-sm); }
.long-strip.open { border-style: solid; }
.ls-k { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: var(--fw-semibold); margin-right: var(--sp-1); }
.ls-k svg, .long-title svg { width: 14px; height: 14px; color: var(--accent); }
.ls-item { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; min-width: 0; padding: 2px var(--sp-2); border-radius: var(--r-pill); background: color-mix(in srgb, var(--c) 14%, var(--mix-bg)); color: color-mix(in srgb, var(--c) 72%, var(--mix-ink)); font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-decoration: none !important; }
.ls-item i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--c); }
.ls-item:hover { box-shadow: 0 0 0 1px var(--c); }
.long-strip .link-btn { margin-left: auto; }
.long-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.long-title .tiny { text-transform: none; letter-spacing: normal; font-weight: var(--fw-regular); }
.long-hidden { color: var(--ink-2); font-weight: var(--fw-semibold); }
/* round 9: How points work › Avatar borders. The cells borrow the picker's .bd-cell look but aren't buttons. */
.ring-samples { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: var(--sp-2); }
.ring-samples .bd-cell, .ring-samples .bd-cell:hover { cursor: default; border-color: var(--line); background: var(--glass-btn); }

/* ---------------------------------------------------------------- share the timeline with the client (round 9, views/share-ui.js) */
.share-link { display: flex; align-items: center; gap: var(--sp-2); }
.share-link .input { flex: 1 1 auto; min-width: 0; font-family: var(--font-mono); font-size: var(--fs-sm); }
.share-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--sp-1) var(--sp-3); }
.share-off { color: var(--danger); margin-left: auto; }
.share-comments { max-height: 240px; overflow-y: auto; }
.share-comments li { padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
@media (max-width: 560px) { .share-link { flex-wrap: wrap; } .share-link .input { flex-basis: 100%; } }

/* ---------------------------------------------------------------- the deck studio (round 10, views/deck-ui.js)
   One window: the look on the left, every slide on the right as it will come out (core/deck.js draws
   them with % boxes and cqw type, so a thumbnail is the slide, only smaller). */
.modal.deck-studio { width: min(1320px, calc(100vw - 32px)); height: calc(100vh - 32px); max-height: none; }
.modal.deck-studio .modal-body { padding: 0; overflow: hidden; display: flex; flex: 1 1 auto; min-height: 0; }
.modal.deck-studio .modal-foot { gap: var(--sp-2); }
.studio { display: grid; grid-template-columns: 300px minmax(0, 1fr); flex: 1 1 auto; min-height: 0; }
.st-side { border-right: 1px solid var(--line); overflow-y: auto; padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-5); }
.st-k { font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-3); margin-bottom: var(--sp-2); }
.st-themes { display: grid; gap: var(--sp-2); }
.st-theme { display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: var(--sp-3); align-items: center; text-align: left; padding: var(--sp-2); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--glass-btn); cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast) var(--ease-out); }
.st-theme:hover { background: var(--glass-btn-hover); }
.st-theme:active { transform: scale(0.985); }
.st-theme.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.st-theme .st-sw { grid-row: 1 / span 2; aspect-ratio: 16 / 9; border-radius: var(--r-xs); position: relative; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 0 8px; }
.st-sw i { position: absolute; right: 0; top: 0; bottom: 0; width: 38%; }
.st-sw b { display: block; height: 3px; width: 50%; border-radius: var(--r-2xs); }
.st-swatches { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.st-acc { width: 30px; height: 30px; border-radius: 50%; background: var(--c); border: 2px solid transparent; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35); cursor: pointer; position: relative; display: grid; place-items: center; color: var(--on-accent); transition: transform var(--t-fast) var(--ease-pop); }
.st-acc:hover { transform: scale(1.08); }
.st-acc.on { border-color: var(--surface); box-shadow: 0 0 0 2px var(--c); }
.st-acc.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.st-acc.custom svg { width: 14px; height: 14px; pointer-events: none; }
.switch-row { display: flex; align-items: flex-start; gap: var(--sp-3); cursor: pointer; }
.switch-row .switch { margin-top: 1px; }
.switch-row .col { min-width: 0; }
.st-note { display: flex; gap: var(--sp-2); align-items: flex-start; font-size: var(--fs-xs); color: var(--ink-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--surface-sunken); margin-bottom: var(--sp-2); line-height: var(--lh-normal); }
.st-note svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--accent); }
.st-note.warn { background: var(--warn-bg); color: var(--warn); }
.st-note.warn svg { color: var(--warn-strong); }
/* round 31: the pictures of the team's look (key visual, behind the pages, client logo) and their picker */
.st-pic { display: flex; align-items: center; gap: var(--sp-3); width: 100%; padding: var(--sp-2); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--glass-btn); cursor: pointer; text-align: left; transition: border-color var(--t-fast), background var(--t-fast); }
.st-pic:hover { background: var(--glass-btn-hover); border-color: var(--accent); }
.st-pic-th { flex: none; width: 56px; aspect-ratio: 16 / 9; border-radius: var(--r-xs); background: var(--surface-sunken) center / cover no-repeat; box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; color: var(--ink-3); }
.st-pic-th svg { width: 14px; height: 14px; }
.st-pic-go { color: var(--accent); font-weight: var(--fw-semibold); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: var(--sp-3); max-height: 52vh; overflow-y: auto; padding: 2px; }
.pick-th { display: flex; flex-direction: column; gap: var(--sp-1); padding: 0; border: 0; background: none; cursor: pointer; text-align: left; min-width: 0; color: var(--ink-2); }
.pick-th > span:first-child { aspect-ratio: 16 / 9; border-radius: var(--r-sm); background: var(--surface-sunken) center / contain no-repeat; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow var(--t-fast); }
.pick-th:hover > span:first-child { box-shadow: inset 0 0 0 1px var(--accent); }
.pick-th.on > span:first-child { box-shadow: 0 0 0 2px var(--accent); }
.st-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface-sunken); }
.st-bar { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); }
.st-stage { flex: 1 1 auto; overflow-y: auto; padding: var(--sp-4); }
.st-stage.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--sp-4) var(--sp-3); align-content: start; }
.st-thumb { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; animation: st-in 420ms var(--ease-out) backwards; animation-delay: var(--d, 0ms); }
.st-thumb .dk-slide { border-radius: var(--r-sm); box-shadow: 0 0 0 1px var(--line), 0 6px 18px -10px rgba(15, 22, 48, 0.4); transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med); }
.st-thumb:hover .dk-slide { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--accent), 0 14px 28px -14px rgba(15, 22, 48, 0.5); }
.st-thumb .st-n { position: absolute; z-index: 1; top: 6px; left: 6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--glass-dark); color: var(--on-accent); font-size: var(--fs-3xs); font-weight: var(--fw-bold); display: grid; place-items: center; }
.st-l { font-size: var(--fs-xs); color: var(--ink-3); }
@keyframes st-in { from { opacity: 0; transform: translateY(6px); } }
.st-stage.one { display: flex; flex-direction: column; gap: var(--sp-2); }
.st-big { width: min(100%, calc((100vh - 330px) * 16 / 9)); margin: 0 auto; }
.st-big .dk-slide { border-radius: var(--r-md); box-shadow: 0 0 0 1px var(--line), 0 24px 48px -24px rgba(15, 22, 48, 0.55); animation: st-in 260ms var(--ease-out); }
.st-film { display: flex; gap: var(--sp-2); overflow-x: auto; padding: var(--sp-2) 2px; margin-top: var(--sp-2); }
.st-thumb.sm { flex: 0 0 120px; animation: none; }
.st-thumb.sm.on .dk-slide { box-shadow: 0 0 0 2px var(--accent); }
.st-status { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; color: var(--ink-2); min-height: 28px; }
.st-status svg { width: 15px; height: 15px; color: var(--ok-strong); }
.spinner.sm { width: 14px; height: 14px; border-width: 2px; }
/* the slide itself (shared by the studio and anywhere a deck is previewed) */
.dk-slide { position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; container-type: inline-size; font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif; }
.dk-slide > * { position: absolute; display: block; margin: 0; }
.dk-slide .dk-o { border-radius: 50%; }
.dk-slide .dk-img { background-position: center; background-repeat: no-repeat; }
.dk-t { display: flex !important; flex-direction: column; padding: 0.5cqw 1cqw; overflow: hidden; }
.dk-t p { margin: 0; overflow-wrap: break-word; font-size: 0; } /* the runs carry their sizes: without this the page's own size set every line's height in the preview (2026-11-11) */
@media (max-width: 860px) {
  .backdrop:has(.modal.deck-studio) { padding: 0; }
  .modal.deck-studio { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .modal.deck-studio .modal-foot { flex-wrap: wrap; }
  .modal.deck-studio .modal-foot .btn { flex: 1 1 auto; justify-content: center; }
  .st-bar { flex-wrap: wrap; }
  .studio { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); overflow-y: auto; }
  .st-side { border-right: 0; border-bottom: 1px solid var(--line); max-height: 38vh; }
  .st-stage.grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .st-thumb, .st-big .dk-slide { animation: none; } .st-thumb .dk-slide { transition: none; } }

/* ---------------------------------------------------------------- steps across the top of a page (round 10: the POE, the project guide) */
.flow-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-2); counter-reset: fs; }
.flow-steps li { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3); border-radius: var(--r-lg); background: var(--glass-card); border: 1px solid var(--glass-card-line); box-shadow: var(--glass-card-shadow); min-width: 0; transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med); }
.flow-steps li > div { display: flex; flex-direction: column; gap: 2px; }
.flow-steps li b { font-size: var(--fs-md); }
.flow-steps li span:not(.fs-n) { font-size: var(--fs-xs); color: var(--ink-3); }
.fs-n { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: var(--fw-bold); font-size: var(--fs-sm); background: var(--surface-muted); color: var(--ink-3); }
.fs-n svg { width: 15px; height: 15px; }
.flow-steps li.done .fs-n { background: var(--ok-solid); color: var(--on-accent); }
.flow-steps li.now { box-shadow: 0 0 0 1.5px var(--accent), var(--glass-card-shadow); }
.flow-steps li.now .fs-n { background: var(--grad-cta); color: var(--on-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
/* round 23: the quotation → payment request → settlement strip (views/flow-ui.js) */
.flow-chain { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.flow-chain li { align-items: flex-start; }
.flow-chain li > div { min-width: 0; }
.flow-chain li.here b { color: var(--accent); }
.flow-chain li span a { color: inherit; text-decoration: underline; }
.settle-row { padding: var(--sp-2) 0; border-top: 1px solid var(--line); }
.settle-row:first-child { border-top: 0; }
/* the payment request's own documents: the client's PO and the signed quotation (2026-10-20) */
.pr-docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--sp-2); }
.pr-doc { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--surface-sunken); min-width: 0; }
.pr-doc > .small { min-width: 110px; }
.pr-doc > .tiny.muted { flex: 1 1 140px; }
.pr-doc > .row { flex: 1 1 140px; min-width: 0; }
/* the quotation's note under the fee: the lines the client asked to keep out of it (2026-10-20) */
.doc-tbl td.fee-note { font-style: italic; font-weight: var(--fw-regular); color: var(--doc-ink-2); }
/* a payment request's status card (views/pr.js): where it stands, who it waits on, the one action */
.pr-status { --tone: var(--ink-3); --tone-bg: var(--surface-muted); border-left: 4px solid var(--tone); }
.pr-status.tone-warn { --tone: var(--warn); --tone-bg: var(--warn-bg); }
.pr-status.tone-ok { --tone: var(--ok); --tone-bg: var(--ok-bg); }
.pr-status.tone-danger { --tone: var(--danger); --tone-bg: var(--danger-bg); }
.pr-status-top { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.pr-status-ico { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--tone-bg); color: var(--tone); }
.pr-status-ico svg { width: 22px; height: 22px; }
.pr-status-title { margin: 0; font-size: var(--fs-xl); line-height: var(--lh-tight); }
.pr-status-sub { margin: 2px 0 0; font-size: var(--fs-sm); color: var(--ink-3); }
.pr-status-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.pr-status-nudge { margin-top: var(--sp-3); align-items: center; }
.pr-status-credits { margin-top: var(--sp-3); }
.pr-track { list-style: none; margin: var(--sp-4) 0 0; padding: var(--sp-4) 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); }
.pr-track li { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; color: var(--ink-4); }
.pr-track-n { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-sm); font-weight: var(--fw-bold); background: var(--surface-muted); color: var(--ink-3); }
.pr-track-n svg { width: 14px; height: 14px; }
.pr-track-t { display: flex; flex-direction: column; min-width: 0; }
.pr-track-t b { font-size: var(--fs-sm); color: var(--ink-3); }
.pr-track-t span { font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-track li.done .pr-track-n { background: var(--ok-solid); color: var(--on-accent); }
.pr-track li.done .pr-track-t b, .pr-track li.now .pr-track-t b { color: var(--ink); }
.pr-track li.now { color: var(--ink-3); }
.pr-track li.now .pr-track-n { background: var(--accent); color: var(--on-accent); }
@media (max-width: 560px) { .pr-track { grid-template-columns: minmax(0, 1fr); } .pr-status-actions { width: 100%; } .pr-status-actions .btn { flex: 1; } }
/* the payment request number register: the "PR numbers" tab on Finance (views/prnumbers-ui.js) */
.tabs .tab-n { margin-left: 2px; padding: 1px 8px; border-radius: var(--r-pill); background: var(--surface-muted); color: var(--ink-3); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.tabs a.on .tab-n { background: var(--accent-bg); color: var(--accent-ink); }
.prn-hero { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; padding: var(--sp-5); border-radius: var(--r-xl); background: var(--accent-bg); }
.prn-hero-n { min-width: 92px; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-lg); background: var(--accent); color: var(--on-accent); font-size: var(--fs-3xl); font-weight: var(--fw-heavy); line-height: var(--lh-tight); text-align: center; font-variant-numeric: tabular-nums; }
.prn-hero-k { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--accent-ink); }
.prn-hero-v { font-size: var(--fs-xl); font-weight: var(--fw-bold); color: var(--ink); line-height: var(--lh-snug); }
.prn-hero-d { font-size: var(--fs-sm); color: var(--ink-3); }
.prn-hero-act { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.prn-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.prn-bar .seg .cnt { margin-left: 6px; color: var(--ink-4); font-weight: var(--fw-semibold); }
.prn-search { flex: 1 1 220px; max-width: 320px; }
.prn-list { padding: var(--sp-2) var(--sp-4); }
.prn-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-4); padding: var(--sp-3) var(--sp-2); border-bottom: 1px solid var(--line); border-radius: var(--r-md); }
.prn-row:last-child { border-bottom: 0; }
.prn-row.is-pr { cursor: pointer; }
.prn-row.is-pr:hover, .prn-row.is-pr:focus-visible { background: var(--surface-muted); outline: none; }
.prn-chip { min-width: 60px; white-space: nowrap; padding: 6px var(--sp-3); border-radius: var(--r-pill); text-align: center; font-size: var(--fs-md); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.prn-chip.is-pr { background: var(--accent-bg); color: var(--accent-ink); }
.prn-chip.is-used { background: var(--warn-bg); color: var(--warn); }
.prn-chip.is-free { background: transparent; color: var(--ink-4); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.prn-main { min-width: 0; }
.prn-title { font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--ink); }
.prn-sub { font-size: var(--fs-sm); color: var(--ink-3); }
.prn-side { display: flex; align-items: center; gap: var(--sp-3); }
.prn-amt { min-width: 118px; text-align: right; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 640px) {
  .prn-hero-act { width: 100%; } .prn-hero-act .btn { flex: 1; }
  .prn-row { grid-template-columns: auto minmax(0, 1fr); row-gap: var(--sp-2); }
  .prn-side { grid-column: 1 / -1; justify-content: space-between; }
  .prn-amt { min-width: 0; }
}
/* deciding several rows at once on Approvals (deletion requests) */
.appr-bulk { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; padding: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-2); border-radius: var(--r-md); background: var(--surface-muted); font-size: var(--fs-sm); }
.appr-bulk.on { background: var(--accent-bg); }
.appr-pick { width: 18px; height: 18px; flex: none; accent-color: var(--accent); cursor: pointer; }
/* who did a step: a small avatar and a name (approvals, a payment request's steps) */
.credit { display: inline-flex; align-items: center; gap: var(--sp-2); min-width: 0; }
/* a document's sheets shown inside a page (previewInto() in views/print.js) */
.doc-preview { max-height: 78vh; overflow: auto; padding: var(--sp-4); border-radius: var(--r-md); background: var(--surface-muted); }
.doc-preview .print-bar, .doc-preview .no-print { display: none; }
.doc-preview .doc-page { box-shadow: var(--shadow-md); margin-bottom: var(--sp-4); }
.doc-preview .doc-page:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- the agenda (round 10, views/agenda.js) */
.ag-head h3 { font-size: var(--fs-xl); }
.ag-head h3 svg { width: 18px; height: 18px; color: var(--accent); }
.ag-days { display: flex; gap: var(--sp-2); overflow-x: auto; margin-top: var(--sp-4); padding-bottom: 2px; scrollbar-width: thin; }
.ag-days button { flex: none; display: grid; grid-template-columns: auto auto; column-gap: var(--sp-2); text-align: left; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--glass-btn); cursor: pointer; color: var(--ink-2); font: inherit; }
.ag-days button span { grid-column: 1; font-size: var(--fs-xs); color: var(--ink-3); }
.ag-days button i { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; font-size: var(--fs-2xs); font-weight: var(--fw-bold); min-width: 20px; height: 20px; border-radius: var(--r-pill); display: grid; place-items: center; background: var(--surface-muted); }
.ag-days button.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); color: var(--ink); }
.ag-days button.on i { background: var(--accent); color: var(--on-accent); }
.ag-tools { display: flex; justify-content: flex-end; margin-bottom: var(--sp-3); }
.ag-rows { display: flex; flex-direction: column; gap: 6px; }
.ag-row { position: relative; display: grid; grid-template-columns: 22px 110px 78px 150px minmax(0, 1fr) auto auto; align-items: center; gap: var(--sp-2); padding: 6px var(--sp-2) 6px var(--sp-3); border-radius: var(--r-md); background: var(--glass-btn); border: 1px solid var(--line); transition: background var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast); }
.ag-row::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: var(--r-pill); background: var(--c); }
.ag-row:hover { background: var(--glass-btn-hover); }
.ag-row:focus-within { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
.ag-row.dragging { opacity: 0.45; }
.ag-row.over-top { box-shadow: inset 0 2px 0 var(--accent); }
.ag-row.over-bottom { box-shadow: inset 0 -2px 0 var(--accent); }
.ag-grip { display: grid; place-items: center; width: 22px; height: 30px; border: 0; background: none; color: var(--ink-4); cursor: grab; border-radius: var(--r-xs); padding: 0; }
.ag-grip:hover, .ag-grip:focus-visible { color: var(--ink-2); background: var(--surface-hover); }
.ag-grip svg { width: 15px; height: 15px; }
.ag-time { display: flex; align-items: center; gap: 4px; }
.ag-time input { width: 58px; padding-inline: 6px; text-align: center; font-variant-numeric: tabular-nums; font-weight: var(--fw-semibold); }
.ag-time input[readonly] { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); font-weight: var(--fw-semibold); pointer-events: none; }
.ag-end { font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ag-mins { display: flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--ink-3); }
.ag-mins input { width: 52px; padding-inline: 6px; text-align: right; font-variant-numeric: tabular-nums; }
.ag-kind { display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 8px 4px 4px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; font-size: var(--fs-xs); color: var(--ink-2); }
.ag-kind:hover { border-color: var(--c); }
.ag-kind-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-kind-ic { width: 22px; height: 22px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, var(--mix-bg)); color: var(--c); }
.ag-kind-ic svg { width: 12px; height: 12px; }
.ag-main { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.ag-main .input { height: 26px; border-color: transparent; background: transparent; box-shadow: none; padding-inline: 6px; }
.ag-main .input:hover { border-color: var(--line); }
.ag-main .input:focus { border-color: var(--accent); background: var(--surface); }
.ag-title { font-weight: var(--fw-semibold); }
.ag-main .ag-sub { font-size: var(--fs-xs); height: 22px; color: var(--ink-2); }
.ag-pic { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 8px; border-radius: var(--r-pill); border: 1px dashed var(--line-2); background: none; color: var(--ink-3); cursor: pointer; font: inherit; font-size: var(--fs-xs); }
.ag-pic:has(.av) { border-style: solid; padding: 0 3px; }
.ag-pic svg { width: 13px; height: 13px; }
.ag-start { text-align: center; }
.ag-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--sp-2); margin-top: var(--sp-2); }
.ag-qt { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: var(--sp-3); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--glass-btn); cursor: pointer; font: inherit; color: var(--ink); transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast), background var(--t-fast); }
.ag-qt:hover { transform: translateY(-2px); border-color: var(--accent); background: var(--glass-btn-hover); }
.ag-qt b { font-size: var(--fs-md); }
@media (max-width: 900px) {
  .ag-row { grid-template-columns: 22px auto 1fr auto auto; }
  .ag-row .ag-main { grid-column: 2 / -1; grid-row: 2; }
  .ag-row .ag-kind { grid-column: 3; justify-self: start; max-width: 100%; } /* never under the PIC */
  .ag-row .ag-mins { display: none; }
}
/* printed agenda (print/agenda/:id), 2026-11-16: a rundown. The Excel / Google Sheet (core/agenda-xlsx.js) uses the
   same colours (--doc-ag-*); change both together. */
.doc-page .ag-doc-head { text-align: center; margin: -4px 0 6mm; }
.doc-page .ag-doc-name { font-family: Arial, sans-serif; font-size: 15px; font-weight: var(--fw-bold); color: var(--doc-ink); }
.doc-page .ag-doc-meta { margin-top: 2px; font-size: 10.5px; color: var(--doc-ink-3); }
.doc-page table.ag-doc { width: 100%; table-layout: fixed; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 9.5px; color: var(--doc-ink-2); margin: 0 0 7mm; }
.doc-page table.ag-doc th, .doc-page table.ag-doc td { padding: 5px 6px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.doc-page .ag-doc-band th { background: var(--doc-ag-band); color: var(--doc-ag-band-ink); padding: 7px 9px; font-size: 11px; font-weight: var(--fw-regular); }
.doc-page .ag-doc-band b { text-transform: uppercase; letter-spacing: 0.06em; margin-right: 10px; }
.doc-page .ag-doc-cols th { font-size: 8px; font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: 0.06em; color: var(--doc-ink-3); border-bottom: 1.5px solid var(--doc-ag-band); padding-top: 7px; }
.doc-page table.ag-doc:last-child { margin-bottom: 0; }
.doc-page table.ag-doc tbody td { border-bottom: 1px solid var(--doc-ag-line); }
.doc-page table.ag-doc td.st { font-weight: var(--fw-bold); color: var(--doc-ink); font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 0; }
.doc-page table.ag-doc td.en { color: var(--doc-ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 3px; }
.doc-page table.ag-doc td.en:not(:empty)::before { content: "– "; }
.doc-page table.ag-doc td.du { color: var(--doc-ink-3); white-space: nowrap; }
.doc-page table.ag-doc td.ti { font-weight: var(--fw-bold); color: var(--doc-ink); }
.doc-page .ag-doc-ses td { background: var(--doc-ag-ses); color: var(--doc-ag-band); font-weight: var(--fw-bold); padding-top: 6px; padding-bottom: 6px; }
.doc-page table.ag-doc .ag-doc-ses td.st, .doc-page table.ag-doc .ag-doc-ses td.en { font-weight: var(--fw-regular); color: var(--doc-ag-band); }
.doc-page table.ag-doc tr.brk td { background: var(--doc-ag-brk); color: var(--doc-ink-3); }
.doc-page table.ag-doc tr.brk td.ti { font-weight: var(--fw-regular); font-style: italic; color: var(--doc-ink-3); }
.doc-page table.ag-doc tr.brk td.st { font-weight: var(--fw-regular); color: var(--doc-ink-3); }
@media print {
  .doc-page table.ag-doc thead { display: table-header-group; }
  .doc-page table.ag-doc tr { break-inside: avoid; }
  .doc-page table.ag-doc tr.ag-doc-ses { break-after: avoid; page-break-after: avoid; }
  .doc-page table.ag-doc.short { break-inside: avoid; } /* a short day moves to the next page whole */
  .doc-page .ag-doc-head { break-after: avoid; }
  /* the FOH agenda is landscape: the page around it too, or the app's own boxes after it start one more (empty,
     portrait) page */
  body:has(.doc-page.ag-doc-page.landscape) { page: landscape; }
  .doc-page.ag-doc-page.landscape { min-height: 0; }
}

/* ---------------------------------------------------------------- shared templates (round 10, views/templates-ui.js) */
.tpl-grid { align-items: stretch; }
.tpl-card { display: flex; flex-direction: column; transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med); }
.tpl-card:hover { transform: translateY(-2px); }
.tpl-card.team { box-shadow: inset 0 3px 0 var(--accent), var(--glass-card-shadow); }
.tpl-meta { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); }
.tpl-foot { margin-top: auto; padding-top: var(--sp-3); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); border-top: 1px solid var(--line); }
.tpl-foot > .tiny { display: inline-flex; align-items: center; gap: 4px; }
.tpl-foot > .tiny svg { width: 13px; height: 13px; }
.tpl-by { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.tpl-empty { display: flex; align-items: center; gap: var(--sp-3); }
.tpl-empty > svg { width: 22px; height: 22px; color: var(--accent); flex: none; }

/* ---------------------------------------------------------------- Settings › Google Slides (round 10) */
.setup-steps { padding-left: 18px; line-height: var(--lh-base); display: grid; gap: var(--sp-1); }
.code-block { white-space: pre-wrap; word-break: break-word; max-height: 52vh; overflow: auto; margin: 0; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--surface-inverse); color: var(--side-ink-strong); line-height: var(--lh-normal); }

/* ---------------------------------------------------------------- the project guide (round 10, views/guide-ui.js)
   A ring for how far along, the phases as an accordion on a thin line (the one you're in open), key dates under it. */
.guide { padding-bottom: var(--sp-3); }
.guide-head { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.guide-head h3 { font-size: var(--fs-lg); }
.guide-ring { --p: 0; width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--p) * 360deg), var(--track) 0); position: relative; transition: --p var(--t-slow); }
.guide-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.guide-ring b { position: relative; font-size: var(--fs-xs); font-weight: var(--fw-heavy); font-variant-numeric: tabular-nums; }
.guide-phases { list-style: none; margin: 0; padding: 0; position: relative; }
.guide-phases::before { content: ""; position: absolute; left: 15px; top: 16px; bottom: 16px; width: 2px; background: var(--line-2); border-radius: var(--r-pill); }
.guide-phases > li { position: relative; }
.gp-head { width: 100%; display: flex; align-items: center; gap: var(--sp-3); padding: 6px 0; border: 0; background: none; font: inherit; color: var(--ink-2); cursor: pointer; text-align: left; border-radius: var(--r-md); }
.gp-head:hover .gp-l { color: var(--ink); }
.gp-n { position: relative; z-index: 1; width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-sm); font-weight: var(--fw-bold); background: var(--surface); border: 2px solid var(--line-2); color: var(--ink-3); transition: background var(--t-med), border-color var(--t-med), transform var(--t-med) var(--ease-pop); }
.gp-n svg { width: 15px; height: 15px; }
.gp-l { flex: 1 1 auto; font-weight: var(--fw-semibold); }
.gp-c { font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; padding: 1px 8px; border-radius: var(--r-pill); background: var(--surface-muted); }
.guide-phases > li.done .gp-n { background: var(--ok-solid); border-color: var(--ok-solid); color: var(--on-accent); }
.guide-phases > li.done .gp-l { color: var(--ink-3); }
.guide-phases > li.now .gp-n { background: var(--grad-cta); border-color: transparent; color: var(--on-accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent); }
.guide-phases > li.now .gp-l { color: var(--ink); }
.guide-phases > li.now .gp-c { background: var(--accent-bg); color: var(--accent-ink); }
.gp-body { display: none; padding: 2px 0 var(--sp-3) 44px; }
.guide-phases > li.open .gp-body { display: grid; gap: 6px; animation: gp-open 260ms var(--ease-out); }
.guide-phases > li.open .gp-n { transform: scale(1.06); }
@keyframes gp-open { from { opacity: 0; transform: translateY(-4px); } }
.gs { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--glass-btn); border: 1px solid var(--line); }
.gs > .grow { display: flex; flex-direction: column; gap: 1px; }
.gs-ic { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; color: var(--on-accent); font-size: var(--fs-2xs); }
.gs-ic svg { width: 12px; height: 12px; }
.gs.done .gs-ic { background: var(--ok-solid); border-color: var(--ok-solid); }
.gs.done .gs-l { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-2); }
.gs.na { opacity: 0.6; }
.gs-l { font-size: var(--fs-md); font-weight: var(--fw-medium); }
.gs-h { font-size: var(--fs-xs); color: var(--ink-3); }
.guide-dates { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.gd { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 10px 4px 8px; border-radius: var(--r-pill); background: var(--glass-btn); border: 1px solid var(--line); font-size: var(--fs-xs); color: var(--ink-2); }
.gd i { width: 8px; height: 8px; flex: none; transform: rotate(45deg); background: var(--indigo); border-radius: var(--r-2xs); }
.gd.event i { background: var(--fokus); border-radius: 50%; transform: none; }
.gd.suggested { border-style: dashed; }
.gd.suggested i { background: var(--neutral-400); }
.gd b { color: var(--ink); font-variant-numeric: tabular-nums; }
.gd em { font-style: normal; color: var(--ink-3); white-space: nowrap; }
.gd.late { border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.gd.late em { color: var(--danger); }
/* the welcome sheet on a new project */
.welcome-path { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--sp-2); }
.welcome-path li { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3); border-radius: var(--r-md); background: var(--glass-btn); border: 1px solid var(--line); animation: st-in 420ms var(--ease-out) backwards; animation-delay: var(--d, 0ms); }
.welcome-path li > div { display: flex; flex-direction: column; gap: 2px; }
.welcome-path li span:not(.wp-n) { font-size: var(--fs-xs); color: var(--ink-3); }
.wp-n { width: 34px; height: 34px; flex: none; border-radius: var(--r-md); display: grid; place-items: center; background: var(--grad-soft); color: var(--cta-ink); }
.wp-n svg { width: 17px; height: 17px; }
.welcome-todo { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--glass-btn); }
@media (prefers-reduced-motion: reduce) { .guide-phases > li.open .gp-body, .welcome-path li { animation: none; } .gp-n { transition: none; } }
.gp-behind { margin-left: var(--sp-2); font-size: var(--fs-2xs); font-weight: var(--fw-semibold); color: var(--warn); background: var(--warn-bg); padding: 1px 8px; border-radius: var(--r-pill); }
.guide-phases > li.open .gp-body { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.gs { padding: 6px var(--sp-3); min-height: 44px; }
/* A step with two buttons (e.g. Request creative / No creative for this project) wraps them below the text instead of squeezing the label over them. */
.gs { flex-wrap: wrap; min-width: 0; }
.gs > .grow { flex: 1 1 160px; min-width: 0; }
.gs > .btn, .gs > .link-btn { flex: none; white-space: nowrap; }

/* ---------------------------------------------------------------- "Your day" (round 10, core/coach.js)
   A ring of today's quests in the top bar, its panel, and the cards that pop up (bottom right). */
.quest-orb { --p: 0; position: relative; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 6px; border-radius: var(--r-pill); border: 1px solid var(--glass-card-line); background: var(--glass-btn); color: var(--ink-2); cursor: pointer; font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-bold); transition: background var(--t-fast), transform var(--t-fast) var(--ease-out); }
.quest-orb:hover { background: var(--glass-btn-hover); color: var(--ink); }
.quest-orb:active { transform: scale(0.97); }
.quest-orb > svg { width: 15px; height: 15px; position: relative; z-index: 1; margin-left: 5px; color: var(--accent); }
.quest-orb .qo-ring { position: absolute; left: 4px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 360deg), var(--track) 0); -webkit-mask: radial-gradient(circle, transparent 9.5px, var(--ink) 10px); mask: radial-gradient(circle, transparent 9.5px, var(--ink) 10px); }
.quest-orb b { font-variant-numeric: tabular-nums; min-width: 0; }
.quest-orb b:empty { display: none; }
.quest-orb.all-done .qo-ring { background: var(--ok-solid); }
.quest-orb.all-done > svg { color: var(--ok-strong); }
.quest-orb.nudge::after { content: ""; position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--fokus); box-shadow: 0 0 0 2px var(--surface); animation: orb-nudge 2.4s var(--ease-out) infinite; }
@keyframes orb-nudge { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.35); } }
@media (max-width: 640px) { .quest-orb { padding-right: 6px; } .quest-orb b { display: none; } }
.day-panel { display: flex; flex-direction: column; max-height: min(78vh, 720px); }
.dp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-3) var(--sp-3) var(--sp-2); }
.dp-head > div { display: flex; flex-direction: column; gap: 2px; }
.dp-head b { font-size: var(--fs-lg); }
.dp-head span { font-size: var(--fs-xs); color: var(--ink-3); }
.dp-body { overflow-y: auto; padding: 0 var(--sp-3) var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-2); }
.dp-body .checkin { margin: 0; }
.dp-k { font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-3); margin-top: var(--sp-2); }
.dp-quests { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dp-quests a { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2); border-radius: var(--r-md); color: var(--ink); text-decoration: none; }
.dp-quests a:hover { background: var(--surface-hover); }
.dp-quests .grow { display: flex; flex-direction: column; }
.dp-quests b { font-size: var(--fs-sm); }
.dp-quests li.done b { color: var(--ink-3); }
.dp-quests .q-meta { display: flex; flex-direction: column; align-items: flex-end; font-size: var(--fs-xs); }
.dp-quests .q-meta span { color: var(--ink-3); }
.dp-sugs { display: grid; gap: 4px; }
.sug { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--glass-btn); color: var(--ink); text-decoration: none !important; transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast) var(--ease-out); }
.sug:hover { background: var(--glass-btn-hover); border-color: color-mix(in srgb, var(--accent) 45%, transparent); transform: translateX(2px); }
.sug .grow { display: flex; flex-direction: column; gap: 1px; }
.sug b { font-size: var(--fs-sm); }
.sug .grow > span { font-size: var(--fs-xs); color: var(--ink-3); }
.sug > svg { width: 14px; height: 14px; flex: none; color: var(--ink-4); }
.sug-ic { width: 30px; height: 30px; flex: none; border-radius: var(--r-md); display: grid; place-items: center; background: var(--grad-soft); color: var(--cta-ink); }
.sug-ic svg { width: 15px; height: 15px; }
.sug-ic.k-approve { background: var(--warn-bg); color: var(--warn-strong); }
.sug-ic.k-task, .sug-ic.k-milestone { background: var(--accent-bg); color: var(--accent); }
.sug-ic.k-creative { background: color-mix(in srgb, var(--viz-7) 16%, var(--mix-bg)); color: var(--viz-7); }
.sug-pts { flex: none; font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--warm-ink); background: var(--warm-bg); padding: 2px 8px; border-radius: var(--r-pill); }
.dp-ms { display: grid; gap: 2px; }
.dp-ms a { display: grid; grid-template-columns: 10px 76px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: var(--sp-2); align-items: center; padding: 6px var(--sp-2); border-radius: var(--r-md); color: var(--ink); text-decoration: none; }
.dp-ms a:hover { background: var(--surface-hover); }
.dp-ms i { grid-row: 1 / span 2; width: 8px; height: 8px; transform: rotate(45deg); background: var(--indigo); border-radius: var(--r-2xs); }
.dp-ms a.event i { background: var(--fokus); border-radius: 50%; transform: none; }
.dp-ms b { grid-row: 1 / span 2; font-size: var(--fs-xs); color: var(--accent); }
.dp-ms a.late b { color: var(--danger); }
.dp-ms span { font-size: var(--fs-sm); }
.dp-ms em { font-style: normal; font-size: var(--fs-xs); color: var(--ink-3); }
.dp-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-top: 1px solid var(--line); }
.coach-card { position: fixed; right: 20px; bottom: 20px; z-index: var(--z-toast); width: min(380px, calc(100vw - 32px)); padding: var(--sp-3); border-radius: var(--r-xl); background: var(--glass-overlay); -webkit-backdrop-filter: var(--glass-blur-lg); backdrop-filter: var(--glass-blur-lg); border: 1px solid var(--glass-line); box-shadow: var(--shadow-lg), var(--highlight); display: flex; flex-direction: column; gap: var(--sp-2); animation: cc-in 460ms var(--ease-pop) backwards; }
.coach-card.out { animation: cc-out 200ms var(--ease-in) forwards; }
@keyframes cc-in { from { opacity: 0; transform: translateY(16px) scale(0.97); } }
@keyframes cc-out { to { opacity: 0; transform: translateY(10px); } }
.cc-head { display: flex; align-items: flex-start; gap: var(--sp-3); }
.cc-head .grow { display: flex; flex-direction: column; gap: 2px; }
.cc-head b { font-size: var(--fs-md); }
.cc-head .grow > span { font-size: var(--fs-xs); color: var(--ink-3); }
.cc-ic { width: 38px; height: 38px; flex: none; border-radius: var(--r-md); display: grid; place-items: center; background: var(--grad-cta); color: var(--on-accent); box-shadow: var(--cta-shadow); }
.cc-ic svg { width: 18px; height: 18px; }
.cc-ic.win { background: var(--grad-warm); }
.cc-pts { color: var(--warm-ink); background: var(--warm-bg); padding: 1px 8px; border-radius: var(--r-pill); font-size: var(--fs-xs); margin-left: 4px; }
.cc-line { font-size: var(--fs-sm); color: var(--ink-2); }
.cc-foot { display: flex; gap: var(--sp-2); }
@media (max-width: 640px) { .coach-card { right: 16px; left: 16px; bottom: 76px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .coach-card, .coach-card.out { animation: none; } .quest-orb.nudge::after { animation: none; } .sug:hover { transform: none; } }
.dp-body > * { flex-shrink: 0; }

/* ---------------------------------------------------------------- round 10 polish
   Skeleton pages while loading, the sliding tab underline, the top bar's depth on scroll, the project "More" tab. */
.sk-page { display: flex; flex-direction: column; gap: var(--sp-4); place-items: stretch; align-content: start; padding-top: var(--sp-2); }
.sk-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); }
.sk-row .sk { height: 96px; border-radius: var(--r-lg); }
.sk-page > .sk { border-radius: var(--r-lg); }
@media (max-width: 640px) { .sk-row { grid-template-columns: minmax(0, 1fr); } .sk-row .sk:nth-child(n + 2) { display: none; } }
.tabs { position: relative; }
.tab-ink { position: absolute; bottom: -1px; height: 2.5px; border-radius: var(--r-2xs) var(--r-2xs) 0 0; background: var(--grad-brand-x); pointer-events: none; z-index: 1; }
.tabs.inking .on::after { opacity: 0; }
.tab-more { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; margin-left: auto; font: inherit; font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--ink-3); background: none; border: 0; cursor: pointer; white-space: nowrap; }
.tab-more:hover { color: var(--ink); }
.tab-more svg { width: 16px; height: 16px; }
.topbar { transition: box-shadow var(--t-med) var(--ease-std), background var(--t-med) var(--ease-std); }
.topbar.scrolled { box-shadow: var(--shadow-md), var(--highlight); }
.dp-sugs, .dp-ms, .dp-quests { grid-template-columns: minmax(0, 1fr); } /* a long title ellipsizes instead of widening the card */

/* ---------------------------------------------------------------- project Files tab (views/files-ui.js) */
.fl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--sp-4); align-items: start; }
.fl-folder { padding: var(--sp-3) var(--sp-4); transition: box-shadow var(--t-fast), border-color var(--t-fast); }
.fl-folder.over { border-color: var(--accent); box-shadow: var(--ring); }
.fl-head { display: flex; align-items: center; gap: var(--sp-2); min-height: 30px; }
.fl-head h4 { margin: 0; font-size: var(--fs-md); font-weight: var(--fw-bold); }
.fl-fic { width: 28px; height: 28px; border-radius: var(--r-xs); display: grid; place-items: center; background: var(--accent-bg); color: var(--accent); flex: none; }
.fl-fic svg { width: 15px; height: 15px; }
.fl-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; margin-top: var(--sp-2); }
.fl-row { display: flex; align-items: center; gap: var(--sp-3); padding: 6px var(--sp-2); border-radius: var(--r-sm); min-width: 0; }
.fl-row:hover { background: var(--surface-muted); }
.fl-row .fl-txt { min-width: 0; }
.fl-row .fl-txt > a { display: block; color: var(--ink); }
.fl-row.auto .fl-ic { background: transparent; border: 1px dashed var(--line-2); }
.fl-ic { width: 34px; height: 34px; border-radius: var(--r-xs); display: grid; place-items: center; background: var(--surface-muted); color: var(--ink-2); flex: none; overflow: hidden; }
.fl-ic svg { width: 16px; height: 16px; }
.fl-ic.img img { width: 100%; height: 100%; object-fit: cover; }
.fl-empty { margin-top: var(--sp-2); padding: var(--sp-2) 0 var(--sp-1); }

/* ---------------------------------------------------------------- telemarketing leads (round 18: views/leads.js, leads-tab.js, leads-ui.js) */
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.warn-text { color: var(--warn); font-weight: var(--fw-semibold); }
.stat .v.small-v { font-size: var(--fs-xl); margin-top: var(--sp-2); }
.stat.attn { border-color: var(--warn-solid); }
.stat.attn .v { color: var(--warn); }
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-1); align-items: center; }
.chip .cnt, .seg button .cnt { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chip.on .cnt, .seg button.on .cnt { color: inherit; }
.num-in { width: 84px; text-align: right; font-variant-numeric: tabular-nums; }

/* "Handed over before?": the finder at the top of the Leads Bank */
.lf-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5); }
.lf-row > div:first-child { flex: 0 0 auto; }
.lf-row h3 { display: flex; align-items: center; gap: var(--sp-2); }
.lf-row .search-box { flex: 1 1 320px; min-width: 0; }
.lf-list { list-style: none; margin: var(--sp-3) 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.lf-list button { display: flex; align-items: center; gap: var(--sp-3); width: 100%; padding: var(--sp-2) var(--sp-3); border: 0; border-radius: var(--r-sm); background: transparent; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.lf-list button:hover, .lf-list button:focus-visible { background: var(--surface-hover); }
.lf-list b, .lf-list .grow > .tiny { display: block; }
.lf-list svg { width: 14px; height: 14px; color: var(--ink-4); flex: none; }
.lf-n { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--warn); white-space: nowrap; }
.lf-n.none { color: var(--ink-3); }

/* earlier rows for the same company or person */
.lead-earlier { margin: var(--sp-3) 0; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--info-bg); }
.lead-earlier.ok { background: var(--ok-bg); } .lead-earlier.warn { background: var(--warn-bg); } .lead-earlier.danger { background: var(--danger-bg); }
.le-head { display: flex; align-items: flex-start; gap: var(--sp-3); color: var(--info); }
.lead-earlier.ok .le-head { color: var(--ok); } .lead-earlier.warn .le-head { color: var(--warn); } .lead-earlier.danger .le-head { color: var(--danger); }
.le-head svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.le-head b { display: block; }
.le-head span { display: block; font-size: var(--fs-sm); }
.le-list { list-style: none; margin: var(--sp-3) 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.le-list li { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-size: var(--fs-sm); }
.le-list li.click { cursor: pointer; }
.le-list li.click:hover, .le-list li.click:focus-visible { background: var(--surface-hover); }
.le-when { color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.le-what { min-width: 0; }
.le-what .tiny { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.le-status { display: inline-flex; align-items: center; gap: var(--sp-1); }

/* the leads table */
.lead-tbl .lead-co { min-width: 190px; max-width: 320px; }
.lead-tbl .lead-needs { max-width: 260px; }
.lead-tbl .lead-camp { max-width: 250px; }
.lead-tick { width: 36px; text-align: center; }
.lead-tick input { width: 16px; height: 16px; accent-color: var(--accent); }
.lead-status { display: inline-flex; }
.lead-meet { display: inline-flex; align-items: center; gap: var(--sp-1); margin-left: var(--sp-1); }
.lead-meet svg { width: 13px; height: 13px; color: var(--ink-3); }
.seen-chip { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 var(--sp-2); border: 0; border-radius: var(--r-pill); background: var(--warn-bg); color: var(--warn); font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-bold); cursor: pointer; flex: none; }
.seen-chip svg { width: 11px; height: 11px; }
.lvl-tag { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lvl-tag.l5, .lvl-tag.l4 { background: var(--ok-bg); color: var(--ok); }
.lvl-tag.l3 { background: var(--info-bg); color: var(--info); }

/* a lead's drawer */
.lead-camp-line { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); font-size: var(--fs-md); }
.lead-camp-line svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
.lead-remarks { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--surface-muted); font-size: var(--fs-md); line-height: var(--lh-base); }
.lead-hist li { padding: var(--sp-1) 0; }

/* status dialog */
.status-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--sp-2); }
.st-opt { display: grid; gap: 2px; padding: var(--sp-3); border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); font: inherit; color: var(--ink); text-align: left; cursor: pointer; transition: border-color var(--t-fast) var(--ease-std), background var(--t-fast) var(--ease-std); }
.st-opt span { font-size: var(--fs-xs); color: var(--ink-3); }
.st-opt:hover { border-color: var(--line-hover); }
.st-opt.on { border-color: var(--accent); background: var(--accent-bg); box-shadow: var(--ring); }

/* a project's Leads tab */
.kpi-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--sp-3) var(--sp-6); }
.kpi-edit { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.kpi-levels { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-3); flex: 1 1 260px; }
.lead-team { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-6); margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.lt-g { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); }
.lt-k { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-3); }
.lt-p { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.weeks-tbl input[type=date] { width: 140px; }

/* import dialog */
.imp-progress { display: grid; gap: var(--sp-2); }
.imp-cols { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.imp-tabs select.input.sm { min-width: 140px; }

/* People: what a team may do with leads */
.tag.leads-role { gap: var(--sp-1); }
.tag.leads-role svg { width: 12px; height: 12px; }
.tag.leads-role.supervisor { background: var(--accent-bg); color: var(--accent-ink); }
@media (max-width: 640px) {
  .le-list li { grid-template-columns: minmax(0, 1fr); gap: var(--sp-1); }
  .lf-list button { flex-wrap: wrap; }
}
.team-group { margin-top: var(--sp-3); padding-bottom: var(--sp-1); font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.team-group:first-of-type { margin-top: 0; }
.team-group span { font-weight: var(--fw-semibold); letter-spacing: 0; text-transform: none; color: var(--ink-4); }

/* Round 19: what could come down to meet a quotation's target budget */
.budget-ideas { margin-top: var(--sp-1); }
.budget-ideas li { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-1) 0; border-bottom: 1px solid var(--line); }
.budget-ideas li:last-child { border-bottom: 0; }
.budget-ideas .link-btn { text-align: left; }

/* Round 19: crew and talent for the day, on a project's On the day tab */
.mp-sum { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); font-size: var(--fs-sm); color: var(--ink-2); }
.mp-sum svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: var(--sp-1); }
.mp-person { display: inline-flex; align-items: center; gap: var(--sp-1); margin: 2px var(--sp-2) 2px 0; font-size: var(--fs-sm); }
.mp-person.clash { color: var(--danger); }
.mp-person svg { width: 14px; height: 14px; }
/* Round 24: the people for one role, free first, with a way out to everyone */
.pop-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-top: 1px solid var(--line); }
.qf-kind.ok { color: var(--ok); background: var(--ok-bg); }
.qf-kind.warn { color: var(--warn); background: var(--warn-bg); }
.qf-kind.danger { color: var(--danger); background: var(--danger-bg); }
.ok-ink { color: var(--ok); } .danger-ink { color: var(--danger); }

/* Round 19: the Google Sheet a telemarketing project's leads are synced from */
.lead-sheet { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3); padding: var(--sp-2) var(--sp-3); border: 1px dashed var(--line-2); border-radius: var(--r-sm); }
.lead-sheet svg { width: 14px; height: 14px; vertical-align: -2px; }

/* ---------------------------------------------------------------- "Duo" (2026-10-08)
   The look after the user's Figma reference (UI:UX Reffrence/Task Management Admin
   Dashboard), in two tones the user chose: blue leads, pink is the second note.
   Light is the default; dark is the same look on a near-black canvas.
   - The canvas is one flat grey. No mesh, no glass blur, no glow: the old glass
     tokens now hold flat fills, so every component followed without a rewrite.
   - The sidebar has no panel: the menu sits on the canvas, the current page a blue pill.
   - Controls are white pills; cards are a shade lighter than the canvas.
   - One gradient only: the blue-to-pink "stage" at the top of Home (and sign-in),
     with frosted white cards on it. Poppins throughout.
   The rules below reshape the shell and Home; they come last so they win. */
.side { position: sticky; top: 0; height: 100vh; margin: 0; padding: var(--sp-2) var(--sp-1) var(--sp-3) var(--sp-3); border: 0; border-radius: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; scrollbar-color: var(--scroll-thumb) transparent; }
.brand { padding: var(--sp-4) var(--sp-3) var(--sp-4); }
.brand-mark { width: 40px; height: 40px; flex-basis: 40px; border-radius: 50%; box-shadow: none; }
.brand-text b { color: var(--side-ink-strong); font-size: var(--fs-3xl); letter-spacing: var(--ls-tight); }
.side-search { margin: 0 var(--sp-2) var(--sp-3); }
.side-search input { height: 40px; padding-left: 38px; border-radius: var(--r-pill); border-color: transparent; background: var(--glass-btn); }
.side-search svg { left: 14px; }
.side-results { border-color: var(--line); box-shadow: var(--shadow-lg); }
.side-results a:hover, .side-results a.on { background: var(--side-hover); }
.nav { padding: 0 var(--sp-2) var(--sp-3); gap: 2px; }
.nav-group-title { margin: var(--sp-4) var(--sp-3) var(--sp-1); width: calc(100% - 24px); }
.nav-item { height: 40px; padding: 0 var(--sp-4); gap: var(--sp-3); border-radius: var(--r-pill); }
.nav-item:hover { color: var(--side-ink-strong); }
.nav-item.on { background: var(--cta-1); color: var(--on-accent); box-shadow: none; font-weight: var(--fw-semibold); }
.nav-div { border-radius: 50%; background: color-mix(in srgb, var(--c) 16%, transparent); color: color-mix(in srgb, var(--c) 80%, var(--mix-ink)); box-shadow: none; }
.nav-count { background: var(--side-on); font-weight: var(--fw-semibold); }
.nav-count.hot { background: var(--danger-bg); color: var(--danger); }
.nav-item.on .nav-count { background: rgba(255, 255, 255, 0.24); color: var(--on-accent); }
/* you, at the foot: the second tone */
.side-foot { margin: var(--sp-2) var(--sp-2) 0; padding: var(--sp-2) var(--sp-3); border: 0; border-radius: var(--r-lg); background: var(--warm-3); color: var(--on-accent); }
.side-foot .who span, .side-level, .side-level:hover, .side-level:focus-visible, .side-level .sl-text b { color: var(--on-accent); }
.side-level .sl-bar { background: rgba(255, 255, 255, 0.3); }
.side-level .sl-bar > i { background: var(--on-accent); }
body.side-collapsed .side { padding-left: var(--sp-2); }
body.side-collapsed .nav-item { padding: 0; justify-content: center; }
body.side-collapsed .side-foot { padding: var(--sp-2); background: none; }

.topbar { top: 0; height: var(--top-h); margin: 0; padding: 0 var(--sp-6) 0 var(--sp-3); border: 0; border-radius: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; gap: var(--sp-2); }
.topbar.scrolled { background: var(--glass-ground); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.crumbs { font-size: var(--fs-lg); }
.crumbs b { font-size: var(--fs-xl); font-weight: var(--fw-semibold); letter-spacing: var(--ls-snug); }
.top-search { height: 44px; min-width: 260px; padding: 0 var(--sp-4); border-color: transparent; box-shadow: none; }
.top-search .kbd { border: 0; background: var(--surface-muted); border-radius: var(--r-pill); padding: 2px 8px; }
#bellBtn, #themeBtn { width: 44px; height: 44px; background: var(--glass-btn); border-color: transparent; color: var(--ink); }
#bellBtn:hover, #themeBtn:hover { border-color: var(--line-hover); }
#newBtn { height: 44px; padding: 0 var(--sp-5); font-size: var(--fs-md); }
/* the black pill: the one action that starts something new */
.btn-dark, #newBtn { background: var(--ink); color: var(--ground); border-color: transparent; box-shadow: none; }
.btn-dark:hover, #newBtn:hover { background: var(--ink-2); color: var(--ground); border-color: transparent; translate: 0 -1px; }
.content { padding-top: var(--sp-2); }
@media (max-width: 900px) {
  .side { position: fixed; left: 0; top: 0; bottom: 0; height: auto; width: 284px; padding: var(--sp-2) var(--sp-2) var(--sp-3); background: var(--side-bg); box-shadow: var(--shadow-lg); translate: -110% 0; }
  .topbar { margin: 0; top: 0; padding: 0 var(--sp-3); height: 60px; }
  .top-search { min-width: 0; width: 44px; padding: 0; justify-content: center; }
  #newBtn { padding: 0 var(--sp-3); }
}

/* flat where the old look had gradients, glows and lifted shadows */
.stat .k svg { background: color-mix(in srgb, var(--tone, var(--cta-1)) 14%, transparent); color: var(--tone, var(--cta-1)); box-shadow: none; }
.card-head h3 > .i { border-radius: 50%; box-shadow: none; }
.tabs .on::after { background: var(--cta-1); box-shadow: none; }
.chip { box-shadow: none; }
.seg { box-shadow: none; }
.seg button.on { box-shadow: var(--shadow-sm); }
.div-tile .ic, .div-chip.solid i { background: var(--c); box-shadow: none; }
.div-chip i { border-radius: 50%; box-shadow: none; }
.btn-primary:active:not(:disabled) { box-shadow: none; }
.dp-grid .d { border-radius: 50%; }
.dp-grid .d.inrange { border-radius: 0; }

/* Home: the greeting on the canvas, then the stage */
.home-head { display: flex; align-items: flex-end; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.home-head h1 { font-size: var(--fs-4xl); font-weight: var(--fw-semibold); letter-spacing: var(--ls-tight); line-height: var(--lh-tight); margin-top: var(--sp-1); }
.home-head .hero-date { color: var(--ink-3); }
.home-head .hero-date::before { background: var(--warm-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warm-2) 25%, transparent); }
.home-head .sub { color: var(--ink-3); margin-top: var(--sp-1); }
/* The stage is always light (data-theme="light" on it restores the light tokens): frosted
   white cards on the gradient, dark type, in either theme. */
.stage-panel {
  border-radius: var(--r-xl); padding: var(--sp-5); background: var(--hero-grad); color: var(--ink); display: grid; gap: var(--sp-4);
  --glass-card: linear-gradient(rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.68)); --glass-card-hover: linear-gradient(rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.86)); --glass-card-line: transparent;
  --ink-3: var(--stage-ink-3); --ink-4: var(--stage-ink-4); --line: rgba(0, 0, 0, 0.1); --track: rgba(255, 255, 255, 0.75); --glass-btn: rgba(255, 255, 255, 0.9); --surface-muted: rgba(255, 255, 255, 0.7); --accent: var(--accent-ink);
}
.stage-panel .stat, .stage-panel .card { border-radius: var(--r-md); }
.stage-panel .card.link:hover, .stage-panel .stat.link:hover { box-shadow: none; translate: 0 -2px; }
.stage-panel .stat .k { color: var(--ink); font-size: var(--fs-sm); line-height: var(--lh-snug); }
.stage-panel .stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stage-panel .stat .k svg { background: rgba(255, 255, 255, 0.8); }
.stage-panel .stat .v { font-weight: var(--fw-semibold); }
.stage-panel .empty { padding: var(--sp-5) var(--sp-3); }
.stage-row { display: grid; gap: var(--sp-4); grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.stage-row.has-next { grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.14fr) minmax(0, 1.14fr); }
.stage-row > .card { animation-delay: 0ms; }
@media (max-width: 1180px) { .stage-row.has-next { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stage-row.has-next > .stage-next { grid-column: 1 / -1; } }
@media (max-width: 720px) { .stage-panel { padding: var(--sp-3); border-radius: var(--r-lg); gap: var(--sp-3); } .stage-row, .stage-row.has-next { grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); } .stage-panel .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stage-next { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-4) var(--sp-5); color: var(--ink); text-decoration: none !important; min-height: 240px; }
.sn-k { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-lg); font-weight: var(--fw-semibold); }
.sn-div { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: var(--on-accent); }
.sn-div svg { width: 15px; height: 15px; }
.sn-count { display: flex; align-items: baseline; gap: var(--sp-2); margin-top: var(--sp-2); }
.sn-count b { font-size: var(--fs-hero); font-weight: var(--fw-semibold); line-height: var(--lh-none); letter-spacing: var(--ls-hero); font-variant-numeric: tabular-nums; }
.sn-count span { font-weight: var(--fw-medium); }
.sn-name { margin-top: var(--sp-3); font-size: var(--fs-lg); font-weight: var(--fw-semibold); line-height: var(--lh-snug); }
.sn-meta { font-size: var(--fs-sm); color: var(--ink-3); }
.sn-meter { display: flex; align-items: center; gap: var(--sp-3); margin-top: auto; padding-top: var(--sp-4); font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.sn-meter .bar { flex: 1 1 auto; height: 8px; }
.sn-meter .bar > i { background: var(--ink); }

/* the check-in: five pills, Monday to Friday (the isometric cubes are gone) */
.checkin, .checkin.done { background: var(--surface-sunken); border-color: transparent; box-shadow: none; }
.checkin::before { display: none; }
.ck-week { display: flex; gap: var(--sp-2); margin: var(--sp-3) 0; }
.ck-day { flex: 1 1 0; height: 34px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-1); font-size: var(--fs-xs); font-weight: var(--fw-semibold); background: var(--glass-btn); color: var(--ink-3); }
.ck-day svg { width: 13px; height: 13px; }
.ck-day.lit { background: var(--warm-3); color: var(--on-accent); }
.ck-day.today { background: var(--accent-bg); color: var(--accent-ink); box-shadow: inset 0 0 0 1.5px var(--accent); }
.ck-day.missed { opacity: 0.55; }
.ck-day.pop { animation: pop-in 420ms var(--ease-pop) backwards; }

/* empty states: the icon in a round white well */
.empty .art.art-ic { width: 56px; height: 56px; margin: 0; border-radius: 50%; display: grid; place-items: center; background: var(--glass-btn); color: var(--accent); }
.empty .art.art-ic svg { width: 24px; height: 24px; }

/* sign-in: the same stage, the card plain white */
.login-form.has-art { background: none; }
.login-card.glass { box-shadow: var(--shadow-lg); }
.login-brand img { border-radius: 50%; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .ck-day.pop { animation: none; } }
.quest-orb { height: 44px; padding: 0 var(--sp-3) 0 var(--sp-2); border-color: transparent; }
.quest-orb .qo-ring { left: 8px; }
.quest-orb.nudge::after { background: var(--warm-2); }

/* Duo, second pass (2026-10-08): the inner pages. White cards on the grey canvas, and on a card
   everything you can press or type in is a grey "well" (no hairline boxes). Tabs are pills, the
   current one black. Lists, the project guide, tables and date badges lose their thin outlines. */
.card, .panel, .tbl-wrap, .stat, .pcard, .modal, .drawer, .pop, .filters-more { --glass-btn: var(--well); --glass-btn-hover: var(--well-hover); --glass-field: var(--well); --field-line: transparent; --glass-card-line: transparent; --seg-track: var(--well); }
.stage-panel .card, .stage-panel .stat { --glass-btn: rgba(255, 255, 255, 0.9); --glass-btn-hover: var(--surface); --glass-field: rgba(255, 255, 255, 0.9); --well: rgba(255, 255, 255, 0.6); --well-hover: rgba(255, 255, 255, 0.85); }
.card { border-radius: var(--r-xl); padding: var(--sp-5); }
.card.tight { padding: var(--sp-3); border-radius: var(--r-lg); }
.stat { border-radius: var(--r-xl); padding: var(--sp-5); }
.stat .v { font-size: var(--fs-4xl); font-weight: var(--fw-semibold); }
.page-head h1 { font-size: var(--fs-4xl); font-weight: var(--fw-semibold); letter-spacing: var(--ls-tight); }
.seg { border-color: transparent; padding: 4px; }
.seg button { height: calc(var(--ctl-h-sm) - 2px); padding: 0 var(--sp-4); }

.tabs { border-bottom: 0; gap: 2px; margin-bottom: var(--sp-4); padding: 2px 0; }
.tabs a, .tabs button { height: 36px; padding: 0 var(--sp-3); border-radius: var(--r-pill); transition: color var(--t-fast) var(--ease-std), background var(--t-fast) var(--ease-std); }
.tabs a:hover, .tabs button:hover { background: var(--tint-ghost); }
.tabs .on, .tabs .on:hover { background: var(--ink); color: var(--ground); }
.tabs .on::after, .tab-ink { display: none; }
.tabs .on .cnt { background: rgba(255, 255, 255, 0.22); color: inherit; }

.tbl-wrap { border-radius: var(--r-lg); border-color: transparent; }
.tbl th { background: var(--surface); text-transform: uppercase; font-size: var(--fs-2xs); letter-spacing: var(--ls-caps); color: var(--ink-4); padding: var(--sp-3) var(--sp-4); }
.tbl td { padding: var(--sp-3) var(--sp-4); }
.tbl tbody tr.click:hover { background: var(--well); }
[data-theme="dark"] .tbl th { background: var(--surface-sunken); }

.cbx { width: 22px; height: 22px; border-radius: 50%; border-color: var(--neutral-300); }
.cbx.on { background: var(--cta-1); box-shadow: none; }
.cl-item { border-color: transparent; border-radius: var(--r-md); padding: var(--sp-2) var(--sp-3); margin-bottom: 6px; }
.cl-item:hover { border-color: var(--line-accent); }
.cl-item.sub { background: var(--well); }

.date-badge { border: 0; border-radius: var(--r-md); background: var(--well); box-shadow: none; }
.date-badge::before { display: none; }
.pcard { border-radius: var(--r-xl); }
.pcard::before, .pcard::after { display: none; }

/* the project guide: each phase a row you can open, the current one tinted; steps are tiles */
.guide-phases { display: grid; gap: 6px; }
.guide-phases::before { display: none; }
.gp-head { padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-2); border-radius: var(--r-pill); background: var(--well); transition: background var(--t-fast) var(--ease-std); }
.gp-head:hover { background: var(--well-hover); }
.gp-n { width: 34px; height: 34px; border: 0; background: var(--surface); color: var(--ink-2); }
.guide-phases > li.done .gp-n { background: var(--cta-1); }
.guide-phases > li.done .gp-l { color: var(--ink-2); }
.guide-phases > li.now .gp-head { background: var(--accent-bg); }
.guide-phases > li.now .gp-n { background: var(--warm-3); box-shadow: none; }
.guide-phases > li.now .gp-c { background: var(--surface); }
.guide-phases > li.open .gp-n { transform: none; }
.gp-c { background: var(--surface); padding: 3px 10px; font-weight: var(--fw-semibold); }
.gp-body { padding: var(--sp-2) 0 var(--sp-2) var(--sp-2); }
.gs { border-radius: var(--r-md); }
.gs-ic { width: 22px; height: 22px; border-color: var(--neutral-300); }
.gs.done .gs-ic { background: var(--cta-1); border-color: var(--cta-1); }
.guide-dates { border-top: 0; padding-top: 0; }
.gd { border: 0; background: var(--well); padding: 6px 12px 6px 10px; }
.gd.suggested { opacity: 0.8; }
.gd.late { background: var(--danger-bg); }

/* Duo, third pass (2026-10-08): "surprise and amaze". Colour and motion where they mean something.
   - Every project opens on its own stage: its division's colour running into pink, the title in
     white, the steps on a frosted panel. Stages breathe (the gradient drifts slowly) and a soft
     light follows the pointer across them (app.js sets --mx / --my).
   - Stat tiles are colour blocks: the first solid blue, then pink, violet and sky tints.
   - Motion: the current menu pill and tab pill land with a spring, primary buttons turn two-tone
     on hover, ticks pop, the light / dark switch opens from the button as a circle.
   All of it stops under prefers-reduced-motion (the block at the end). */
@keyframes stage-drift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
.stage-panel, .phead, .login-wrap { background-size: 190% 190%; animation: stage-drift 14s ease-in-out infinite alternate; }
.stage-panel, .phead { position: relative; overflow: hidden; isolation: isolate; }
.stage-panel::after, .phead::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity var(--t-slow) var(--ease-std); background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.34), transparent 70%); }
.stage-panel.lit::after, .phead.lit::after { opacity: 1; }
/* two still rings in the corner of a stage, like the glass of a lens */
.stage-panel::before, .phead::before { content: ""; position: absolute; z-index: -1; inset: auto; right: -120px; top: -200px; width: 460px; height: 460px; border-radius: 50%; background: none; border: 1px solid rgba(255, 255, 255, 0.3); box-shadow: 0 0 0 64px rgba(255, 255, 255, 0.07), 0 0 0 65px rgba(255, 255, 255, 0.18); pointer-events: none; }

/* the project header */
.phead {
  padding: var(--sp-6); border-radius: var(--r-xl); background-image: linear-gradient(115deg in oklab, color-mix(in srgb, var(--c) 86%, var(--stage-ink)), var(--c) 38%, var(--warm-2));
  color: var(--on-stage); --ink: var(--on-stage); --ink-2: rgba(255, 255, 255, 0.94); --ink-3: rgba(255, 255, 255, 0.88); --ink-4: rgba(255, 255, 255, 0.8); --accent: var(--on-stage); --mix-bg: var(--on-stage); --mix-ink: var(--stage-ink);
}
.phead-title { font-size: var(--fs-display); font-weight: var(--fw-semibold); line-height: var(--lh-tight); text-wrap: balance; }
.phead .div-chip.solid i { background: rgba(255, 255, 255, 0.24); }
.phead .tag, .phead .tag.svc { background: rgba(255, 255, 255, 0.22); color: var(--on-stage); }
.phead .pstats b, .phead .pstats b[style] { color: var(--on-stage) !important; font-size: var(--fs-3xl); font-weight: var(--fw-semibold); }
/* what sits on the stage as its own light piece: dark type again, in either theme */
.phead :is(.journey, .next-step, .btn, .pic-chip, .date-badge, .badge, .p-fam, .p-origin, .pc-pitch) {
  --ink: var(--stage-ink); --ink-2: var(--stage-ink-2); --ink-3: var(--stage-ink-3); --ink-4: var(--stage-ink-4); --accent: var(--stage-link); --line: rgba(0, 0, 0, 0.1); --line-2: rgba(0, 0, 0, 0.16);
  --surface: var(--on-stage); --surface-muted: rgba(255, 255, 255, 0.7); --glass-btn: rgba(255, 255, 255, 0.92); --glass-btn-hover: var(--on-stage); --glass-card-line: transparent; --warm-bg: var(--stage-warm-bg); --warm-ink: var(--stage-warm-ink); --accent-bg: var(--stage-accent-bg);
  color: var(--stage-ink);
}
.phead .date-badge, .phead .badge:not(.danger), .phead .pic-chip { background: rgba(255, 255, 255, 0.92); border-color: transparent; }
.phead .badge.danger { background: var(--on-stage); }
.phead .journey { margin: var(--sp-5) 0 0; padding: var(--sp-4); border-top: 0; border-radius: var(--r-lg); background: rgba(255, 255, 255, 0.74); }
.phead .journey li.done .jdot { background: var(--cta-1); box-shadow: none; }
.phead .journey li.done::after { background: var(--cta-1); }
.phead .journey li.now .jdot { box-shadow: inset 0 0 0 2px var(--warm-2), 0 0 0 5px color-mix(in srgb, var(--warm-2) 22%, transparent); }
.phead .journey .jt em { background: var(--warm-3); }
.phead .next-step { margin: var(--sp-3) 0 0; border: 0; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.94); padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-3); }
.next-step .ns-ic { border-radius: 50%; }

/* stat tiles as colour blocks (not on the Home stage, where they're frosted) */
:not(.stage-panel) > .stats > .stat:nth-child(4n + 1) { background: var(--cta-1); color: var(--on-accent); --ink: var(--on-accent); --ink-3: rgba(255, 255, 255, 0.9); --danger: var(--on-accent); }
:not(.stage-panel) > .stats > .stat:nth-child(4n + 1) .k svg { background: rgba(255, 255, 255, 0.22); color: var(--on-accent); }
:not(.stage-panel) > .stats > .stat:nth-child(4n + 1) .v, :not(.stage-panel) > .stats > .stat:nth-child(4n + 1) .d * { color: var(--on-accent); }
:not(.stage-panel) > .stats > .stat:nth-child(4n + 2) { background: color-mix(in srgb, var(--warm-2) 15%, var(--surface)); }
:not(.stage-panel) > .stats > .stat:nth-child(4n + 3) { background: color-mix(in srgb, var(--tone-violet) 13%, var(--surface)); }
:not(.stage-panel) > .stats > .stat:nth-child(4n + 4) { background: color-mix(in srgb, var(--tone-sky) 15%, var(--surface)); }
:not(.stage-panel) > .stats > .stat .k svg { background: var(--surface); }
.stat.link:hover, .card.link:hover, a.card:hover, .pcard:hover { translate: 0 -4px; scale: 1.012; transition-timing-function: var(--ease-spring); }

/* motion with a little spring */
@keyframes land { from { scale: 0.9; opacity: 0.4; } }
.nav-item.on { animation: land 420ms var(--ease-spring) backwards; }
.tabs .on { animation: land 360ms var(--ease-spring) backwards; }
.btn-primary:hover { background: var(--hero-grad); }
.btn-dark:hover, #newBtn:hover { background: var(--hero-grad); color: var(--on-accent); }
@keyframes tick-pop { 0% { scale: 0.6; } 60% { scale: 1.22; } 100% { scale: 1; } }
.cbx.on, .gs.done .gs-ic { animation: tick-pop 420ms var(--ease-spring) backwards; }
.brand:hover .brand-mark { translate: none; rotate: -12deg; scale: 1.08; }
.brand-mark { transition: rotate var(--t-slow) var(--ease-spring), scale var(--t-slow) var(--ease-spring); }
/* light / dark: the new look opens from the button as a circle (View Transitions; a plain switch elsewhere) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: theme-open 620ms var(--ease-emph); }
@keyframes theme-open { from { clip-path: circle(0 at var(--tx, 90%) var(--ty, 5%)); } to { clip-path: circle(150vmax at var(--tx, 90%) var(--ty, 5%)); } }
@media (prefers-reduced-motion: reduce) {
  .stage-panel, .phead, .login-wrap, .nav-item.on, .tabs .on, .cbx.on, .gs.done .gs-ic, ::view-transition-new(root) { animation: none; }
  .stage-panel::after, .phead::after { display: none; }
  .stat.link:hover, .card.link:hover, a.card:hover, .pcard:hover { scale: 1; }
}

/* Duo, the night city (2026-10-08, the user's second reference: a neon isometric city at night).
   Home opens on it, and so does sign-in: a plum-to-navy sky with a blue glow in the corner, stars
   that twinkle, shooting stars, and the city itself (assets/duo/city.jpg) along the foot, drifting
   a few pixels against the pointer. The greeting is centred, the name in the reference's lime,
   the buttons its orange-to-magenta pills. */
.night, .night-wrap { position: relative; overflow: hidden; isolation: isolate; color: var(--on-stage);
  background: radial-gradient(46% 70% at 0% 0%, var(--night-blue), transparent 70%), linear-gradient(180deg, var(--night-plum) 0%, var(--night-mid) 34%, var(--night-navy) 66%, var(--night-deep) 100%); }
.night { border-radius: var(--r-xl); min-height: 450px; padding: var(--sp-6) var(--sp-6) 0; margin-bottom: var(--sp-4); text-align: center; }
.night-copy { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }
.night .hero-date { color: rgba(255, 255, 255, 0.82); }
.night .hero-date::before { background: var(--night-lime); box-shadow: 0 0 0 3px color-mix(in srgb, var(--night-lime) 28%, transparent); }
.night h1 { margin-top: var(--sp-2); font-size: var(--fs-display); font-weight: var(--fw-medium); letter-spacing: var(--ls-tight); line-height: var(--lh-tight); color: var(--on-stage); text-wrap: balance; }
.night h1 em, .night-wrap h1 em { font-style: normal; font-weight: var(--fw-bold); color: var(--night-lime); }
.night .sub { margin-top: var(--sp-2); color: rgba(255, 255, 255, 0.86); font-size: var(--fs-lg); }
.night-acts { justify-content: center; margin-top: var(--sp-5); }
.btn-neon { background: linear-gradient(90deg, var(--neon-1), var(--neon-2)); color: var(--on-stage); border-color: transparent; box-shadow: 0 10px 24px -12px var(--neon-1); }
.btn-neon:hover { background: linear-gradient(90deg, var(--neon-2), var(--neon-1)); color: var(--on-stage); border-color: transparent; translate: 0 -2px; }
.night .btn-glass { background: rgba(255, 255, 255, 0.12); color: var(--on-stage); border-color: rgba(255, 255, 255, 0.3); }
.night-city { position: absolute; z-index: 1; left: -2%; bottom: -180px; width: 104%; height: auto; max-width: none; pointer-events: none; -webkit-mask-image: linear-gradient(to bottom, transparent 0, var(--stage-ink) 34%); mask-image: linear-gradient(to bottom, transparent 0, var(--stage-ink) 34%); translate: calc(var(--px) * -18px) 0; transition: translate 600ms var(--ease-out); }
.night > .night-city { animation: city-rise 1100ms var(--ease-emph) backwards; }
@keyframes city-rise { from { transform: translateY(46px); opacity: 0; } }
.night-sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.night-sky .star { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--night-star); box-shadow: 0 0 12px 4px color-mix(in srgb, var(--night-star) 55%, transparent); animation: twinkle 3.6s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 0.35; scale: 0.7; } 50% { opacity: 1; scale: 1.15; } }
.night-sky .shoot { position: absolute; width: 90px; height: 2.5px; border-radius: var(--r-pill); background: linear-gradient(90deg, transparent, var(--night-star)); rotate: 135deg; opacity: 0; animation: shoot 7.5s linear infinite; }
@keyframes shoot { 0% { opacity: 0; translate: 60px -60px; } 4% { opacity: 1; } 14% { opacity: 0; translate: -120px 120px; } 100% { opacity: 0; translate: -120px 120px; } }
@media (max-width: 900px) { .night-city { bottom: -30px; } .night { min-height: 440px; padding: var(--sp-6) var(--sp-4) 0; } .night h1 { font-size: var(--fs-4xl); } .night-city { width: 150%; left: -25%; } }
/* sign-in: the same night, edge to edge */
.login-wrap.night-wrap { animation: none; background-size: auto; }
.night-wrap > .night-city { width: 100%; left: 0; bottom: 0; }
.night-wrap .login-art { justify-content: flex-start; gap: var(--sp-8); }
.night-wrap .login-foot { margin-top: auto; align-self: flex-start; padding: var(--sp-2) var(--sp-4); border-radius: var(--r-pill); background: color-mix(in srgb, var(--night-deep) 78%, transparent); }
.login-card { color: var(--ink); }
.night-wrap .login-art, .night-wrap .login-form { position: relative; z-index: 2; }
.night-wrap .login-foot { text-shadow: 0 1px 8px var(--night-deep); }
@media (prefers-reduced-motion: reduce) { .night-sky .star, .night-sky .shoot, .night > .night-city { animation: none; } .night-city { translate: none; transition: none; } }

/* Duo, night and neon carried further (2026-10-08, the user: "yes, like that"): the sidebar is a
   panel of the same night sky, floating with round corners, the current page a neon pill; a
   project's header is night too, lit from the corner in its division's colour. */
.side { top: var(--sp-3); height: calc(100vh - 24px); margin: var(--sp-3) 0 var(--sp-3) var(--sp-3); padding: var(--sp-2) var(--sp-1) var(--sp-3); border-radius: var(--r-xl); background: var(--night-sky); scrollbar-color: rgba(255, 255, 255, 0.2) transparent; }
.side-search input { background: rgba(255, 255, 255, 0.1); color: var(--side-ink-strong); }
.side-results { border-color: var(--side-line); }
.nav-item.on { background: var(--neon-grad); box-shadow: 0 10px 22px -12px var(--neon-1); }
.nav-div { background: color-mix(in srgb, var(--c) 34%, transparent); color: color-mix(in srgb, var(--c) 38%, var(--on-stage)); }
.nav-count.hot { background: var(--night-lime); color: var(--night-deep); }
.side-foot { background: rgba(255, 255, 255, 0.1); }
.side-level .sl-bar > i { background: var(--night-lime); }
body.side-collapsed .side { padding: var(--sp-2) var(--sp-1) var(--sp-3); }
@media (max-width: 900px) { .side { top: 0; height: auto; margin: 0; border-radius: 0 var(--r-xl) var(--r-xl) 0; background: var(--night-sky); } }

.phead { background-image: radial-gradient(72% 150% at 0% 0%, var(--c), transparent 70%), radial-gradient(40% 90% at 100% 100%, color-mix(in srgb, var(--neon-2) 60%, transparent), transparent 70%), linear-gradient(180deg, var(--night-plum) 0%, var(--night-mid) 40%, var(--night-navy) 100%); background-size: 130% 130%; }
.phead .btn-primary { background: var(--neon-grad); color: var(--on-stage); --ink: var(--on-stage); }
.phead .btn-primary:hover { background: linear-gradient(90deg, var(--neon-2), var(--neon-1)); }
.phead .journey { background: rgba(255, 255, 255, 0.86); }
.phead .journey .jt em, .phead .next-step .ns-ic { background: var(--neon-grad); }
.phead .pstats b, .phead .pstats b[style] { color: var(--night-lime) !important; }

/* ---------------------------------------------------------------- round 25: clearer menus and tidier pages
   A project's tabs are the navigation, so they sit in one white strip of their own; under them a
   page's tools read left to right: what you're looking at (filters, in one sunken box), then what
   you can do (the actions, the main one last and filled). */
.tabs[data-tabs] { background: var(--surface); border-radius: var(--r-pill); padding: 4px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); gap: 2px; scroll-padding: 0 48px; }
.tabs[data-tabs] a, .tabs[data-tabs] button { height: 34px; flex: 0 0 auto; }
/* 2026-10-17: only a strip with a More button (the project page) hides what doesn't fit; Settings,
   Templates and Invoices scroll sideways, which they couldn't on a phone since round 25. */
.tabs[data-tabs]:has(> .tab-more) { overflow: hidden; }
.tabs[data-tabs] .tab-more { margin-left: auto; }
.tabs[data-tabs] .tab-more .cnt { margin-left: -2px; }
.cl-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-4); margin-bottom: var(--sp-3); }
.cl-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); padding: 4px; border-radius: var(--r-pill); background: var(--tint-ghost); min-width: 0; }
.cl-filters .input, .cl-filters .chip { height: 32px; border-color: transparent; background-color: transparent; box-shadow: none; }
.cl-filters .search-box .input { width: 190px; background-color: var(--surface); }
.cl-filters select.input { width: auto; padding-right: var(--sp-6); }
.cl-filters .input:hover, .cl-filters .chip:hover { background-color: var(--surface); }
.cl-filters .chip.on { background: var(--accent); color: var(--on-accent); }
.cl-actions { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }
.cl-actions .btn svg:last-child:not(:first-child) { width: 14px; height: 14px; margin-right: -4px; opacity: .7; }
@media (max-width: 720px) { .cl-filters { border-radius: var(--r-lg); width: 100%; } .cl-filters .search-box { flex: 1 1 100%; } .cl-filters .search-box .input { width: 100%; } .cl-actions { width: 100%; } .cl-actions .btn-primary { flex: 1; justify-content: center; } }
/* a series' events, as a row of tabs above the checklist */
.cl-events { display: flex; align-items: center; gap: var(--sp-1); overflow-x: auto; scrollbar-width: none; margin-bottom: var(--sp-3); padding-bottom: 2px; }
.cl-events::-webkit-scrollbar { display: none; }
.ce-k { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-3); margin-right: var(--sp-2); flex: 0 0 auto; }
.ce-k svg { width: 14px; height: 14px; }
.ce-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 var(--sp-3); border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold); cursor: pointer; white-space: nowrap; flex: 0 0 auto; }
.ce-chip:hover { border-color: var(--line-hover); color: var(--ink); }
.ce-chip.on { background: var(--ink); border-color: transparent; color: var(--ground); }
.ce-n { font-size: var(--fs-xs); font-weight: var(--fw-semibold); opacity: .65; font-variant-numeric: tabular-nums; }
.cl-ev { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; margin-right: var(--sp-2); border-radius: var(--r-pill); background: var(--accent-bg); color: var(--accent); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
/* the brief under a project's name */
.p-brief { display: flex; align-items: flex-start; gap: var(--sp-2); width: 100%; max-width: 760px; margin-top: var(--sp-3); padding: var(--sp-2) var(--sp-3); border: 0; border-radius: var(--r-md); background: color-mix(in srgb, var(--surface) 12%, transparent); color: inherit; font: inherit; font-size: var(--fs-sm); text-align: left; cursor: pointer; }
.p-brief:hover { background: color-mix(in srgb, var(--surface) 20%, transparent); }
.p-brief > svg { width: 15px; height: 15px; flex: none; margin-top: 2px; opacity: .8; }
.p-brief .pb-text { flex: 1 1 auto; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-brief .pb-more { display: inline-flex; align-items: center; gap: 2px; flex: none; font-size: var(--fs-xs); font-weight: var(--fw-semibold); opacity: .8; white-space: nowrap; }
.p-brief .pb-more svg { width: 13px; height: 13px; }
.p-brief.empty { opacity: .85; border: 1px dashed color-mix(in srgb, currentColor 40%, transparent); background: transparent; }
.p-series { color: inherit; font-weight: var(--fw-semibold); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) { .p-brief { flex-wrap: wrap; } .p-brief .pb-more { margin-left: 23px; } }
/* cards that are still empty say so in one quiet line */
.card-none { color: var(--ink-3); font-size: var(--fs-sm); margin: 0 0 var(--sp-2); }
.poe-start { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-4); padding: var(--sp-4); border-radius: var(--r-md); background: var(--surface-sunken); }
.poe-start .grow { flex: 1 1 280px; min-width: 0; }
/* 2026-11-28: New POE on a project that has one already (views/shared.js poeModal) */
.poe-exists { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--surface-sunken); }
.poe-exists-row { align-items: center; }
.poe-exists p { margin: 0; }
.poe-brief { margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--sp-1); align-items: flex-start; }
.pb-clamp { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.deal-card tfoot td { border-top: 2px solid var(--line-2); background: var(--surface-sunken); }
/* a series' events */
.ev-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4); }
.ev-sum { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-6); }
.ev-stat { display: flex; flex-direction: column; min-width: 0; color: var(--ink); }
.ev-stat b { font-family: var(--font-display); font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.ev-stat span { font-size: var(--fs-xs); color: var(--ink-3); display: inline-flex; align-items: center; gap: 4px; }
.ev-stat span svg { width: 12px; height: 12px; }
.ev-stat.link:hover b { color: var(--accent); }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: var(--sp-3); }
.ev-card { position: relative; display: flex; gap: var(--sp-4); padding: var(--sp-4); border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); min-width: 0; }
.ev-card.now { border-color: var(--line-accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.ev-card.off { opacity: .6; }
.ev-date { flex: 0 0 56px; height: 62px; border-radius: var(--r-md); background: var(--ink); color: var(--ground); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: var(--lh-tight); }
.ev-date b { font-family: var(--font-display); font-size: var(--fs-xl); }
.ev-date span { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--ls-caps); opacity: .8; }
.ev-main { flex: 1 1 auto; min-width: 0; padding-right: var(--sp-5); }
.ev-name { font-size: var(--fs-lg); margin: 0; overflow-wrap: anywhere; }
.ev-main .row svg { width: 14px; height: 14px; }
.ev-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-4); margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.ev-lead { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.ev-list { display: flex; align-items: center; gap: var(--sp-2); color: var(--ink); min-width: 150px; }
.ev-list .progress { flex: 1 1 60px; min-width: 50px; }
.ev-list > svg { width: 14px; height: 14px; color: var(--ink-3); }
.ev-list:hover > svg { color: var(--accent); translate: 2px 0; }
.ev-list .late { color: var(--danger); font-weight: var(--fw-semibold); }
.ev-more { position: absolute; top: var(--sp-3); right: var(--sp-3); }
.ev-empty .art-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-bg); color: var(--accent); flex: none; }
.ev-empty .art-ic svg { width: 24px; height: 24px; }
/* the quotation editor has its own panel in the bottom corner: the morning card waits for another page */
body:has(.qe.dock-float) .coach-card.morning { display: none; }
/* Approvals (round 25): four lanes, so what waits for a decision is never mixed with what is approved */
/* checklist sections of the team's own (round 26) */
.cl-secacts { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; }
.cl-secacts [data-renamecat] { opacity: 0; transition: opacity var(--t-fast); }
.cl-group-head:hover [data-renamecat], .cl-secacts [data-renamecat]:focus-visible { opacity: 1; }
.cl-addsec { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); width: 100%; margin-top: var(--sp-3); padding: var(--sp-3); border: 1px dashed var(--line-2); border-radius: var(--r-lg); background: transparent; color: var(--ink-3); font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold); cursor: pointer; }
.cl-addsec:hover { border-color: var(--line-hover); color: var(--accent); background: var(--surface); }
.cl-addsec svg { width: 15px; height: 15px; }
@media (hover: none) { .cl-secacts [data-renamecat] { opacity: 1; } }
.fl-removed summary { display: inline-flex; align-items: center; gap: var(--sp-2); cursor: pointer; color: var(--ink-3); }
.fl-removed summary svg { width: 14px; height: 14px; }

/* Task reminders (2026-10-12, views/remind-ui.js): who gets nudged, with their tasks. */
.remind-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); max-height: 46vh; overflow-y: auto; }
.remind-person { padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.remind-tasks { margin-top: var(--sp-1); }
.remind-tasks li { display: grid; grid-template-columns: minmax(0, 1fr); padding: 3px 0; font-size: var(--fs-sm); }
.remind-late { color: var(--danger); font-weight: var(--fw-semibold); }

/* Comments that point at a quotation line (2026-10-12, core/quote-pins.js). On the sheet: a numbered
   pin in the margin and a highlight. In a comment: a chip with the same number. Never on paper. */
.doc-tbl td.qc-cell { position: relative; }
.qc-pin { position: absolute; left: -26px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; padding: 0; border: 0; border-radius: var(--r-pill);
  background: var(--warn-solid); color: var(--on-accent); font-family: inherit; font-weight: var(--fw-bold); font-size: var(--fs-xs); display: inline-grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm); }
.qc-pin::after { content: ""; position: absolute; left: 100%; top: 50%; width: 6px; border-top: 2px solid var(--warn-solid); }
.doc-tbl tr.qc-on > td { background: var(--warn-bg); }
.doc-tbl tr.qc-on > td:first-child { box-shadow: inset 3px 0 0 var(--warn-solid); }
.doc-tbl tr.qc-target > td { background: var(--accent-bg); }
.doc-tbl tr.qc-target > td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.doc-tbl tr.qc-flash > td { animation: qc-flash 1.6s var(--ease-out); }
@keyframes qc-flash { 0%, 55% { background: var(--warn-solid); } 100% { background: var(--warn-bg); } }
.qc-pick .doc-tbl tr[data-it] { cursor: pointer; }
.qc-pick .doc-tbl tr[data-it]:hover > td { background: var(--accent-bg); }
.qc-chip { display: inline-flex; align-items: center; gap: var(--sp-2); max-width: 100%; padding: 2px var(--sp-2) 2px 2px; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink-2); font-size: var(--fs-xs); cursor: pointer; }
.qc-chip:hover { border-color: var(--line-hover); color: var(--ink); }
.qc-chip b { flex: none; width: 18px; height: 18px; border-radius: var(--r-pill); background: var(--warn-solid); color: var(--on-accent); font-size: var(--fs-xs); display: inline-grid; place-items: center; }
.qc-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: var(--sp-1); }
.qc-chip b + span { padding-left: 0; }
.qc-about { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--accent-bg); color: var(--accent-ink); font-size: var(--fs-sm); }
.qc-about .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the same pin on a line in the quotation editor */
.ql { position: relative; }
.ql-pin { position: absolute; left: 12px; top: 28px; z-index: 1; min-width: 18px; height: 18px; padding: 0 4px; border: 0; border-radius: var(--r-pill); background: var(--warn-solid); color: var(--on-accent);
  font-family: inherit; font-weight: var(--fw-bold); font-size: var(--fs-xs); display: inline-grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm); }
.qc-count { min-width: 18px; height: 18px; padding: 0 5px; margin-left: var(--sp-1); border-radius: var(--r-pill); background: var(--warn-solid); color: var(--on-accent); font-size: var(--fs-xs); font-weight: var(--fw-bold); display: inline-grid; place-items: center; }
.qc-done { opacity: 0.6; }
.qc-done .qc-text { text-decoration: line-through; }
.qc-sheet { max-height: 62vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-sunken); padding: var(--sp-3); }
.qc-sheet .doc-page { margin: 0 auto var(--sp-3); }
@media (prefers-reduced-motion: reduce) { .doc-tbl tr.qc-flash > td { animation: none; background: var(--warn-solid); } }
@media print { .qc-pin { display: none !important; } .doc-tbl tr.qc-on > td, .doc-tbl tr.qc-target > td { background: transparent !important; box-shadow: none !important; } }

/* ============================================================================
   Round 28 (2026-10-12): payment request review, right-click and undo, the POE
   studio, agenda sessions and links, meeting actions.
   ============================================================================ */
/* --- payment request: what differs from the quotation, the change log, Fix expenses */
.pr-drift { border-left: 4px solid var(--warn); }
.pr-log { display: flex; flex-direction: column; gap: var(--sp-3); max-height: 420px; overflow: auto; }
.pr-log-row { display: flex; gap: var(--sp-2); align-items: flex-start; }
.pr-log-ico { flex: none; width: 24px; height: 24px; border-radius: var(--r-pill); display: inline-grid; place-items: center; background: var(--surface-sunken); color: var(--ink-3); }
.pr-log-ico svg { width: 13px; height: 13px; }
.pr-log-note { color: var(--ink-2); overflow-wrap: anywhere; }
.xp-wrap { max-height: 56vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.xp-tbl thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
.xp-tbl td { vertical-align: middle; }
.xp-tbl input.n { width: 130px; text-align: right; }
.xp-tbl [data-xvendor] { width: 150px; }
.xp-sec td { background: var(--surface-sunken); font-weight: var(--fw-bold); font-size: var(--fs-sm); letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--ink-3); }
.xp-opt { opacity: 0.6; }
.xp-chg > td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.xp-focus > td { background: var(--accent-bg); }
.xp-sum { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; font-size: var(--fs-md); }
/* --- drag a row out of its list to delete it; the bin shows while a row is held */
.drag-bin { position: fixed; left: 50%; bottom: var(--sp-6); transform: translateX(-50%); z-index: var(--z-toast); display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); border: 1px dashed var(--line-danger); box-shadow: var(--shadow-lg);
  font-size: var(--fs-md); font-weight: var(--fw-semibold); pointer-events: none; transition: background var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std), transform var(--t-fast) var(--ease-std); }
.drag-bin svg { width: 16px; height: 16px; color: var(--danger); }
.drag-bin.hot { background: var(--danger); color: var(--on-accent); border-style: solid; transform: translateX(-50%) scale(1.04); }
.drag-bin.hot svg { color: var(--on-accent); }
@media (prefers-reduced-motion: reduce) { .drag-bin { transition: none; } }
/* --- agenda: sessions inside a day, added days, selecting, the paste preview */
.ag-tools { justify-content: flex-start; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5); align-items: center; }
.ag-tools .btn.on { border-color: var(--accent); color: var(--accent); }
.ag-rows { gap: var(--sp-3); }
.ag-ses { display: flex; flex-direction: column; gap: 6px; }
.ag-ses:not(.loose) { padding: var(--sp-2); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-sunken); }
.ag-ses-head { display: flex; align-items: center; gap: var(--sp-2); padding: 2px var(--sp-1) 4px; min-width: 0; border-radius: var(--r-sm); }
.ag-ses-head.over { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-bg); }
.ag-ses-ic { flex: none; width: 24px; height: 24px; border-radius: var(--r-pill); display: inline-grid; place-items: center; background: var(--accent-bg); color: var(--accent); }
.ag-ses-ic.muted { background: var(--surface-sunken); color: var(--ink-3); }
.ag-ses-ic svg { width: 13px; height: 13px; }
.ag-ses-name { width: min(320px, 46vw); font-weight: var(--fw-bold); border-color: transparent; background: transparent; box-shadow: none; padding-inline: 6px; }
.ag-ses-name:hover { border-color: var(--line); }
.ag-ses-name:focus { border-color: var(--accent); background: var(--surface); }
.ag-row.picked { box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-bg); }
.ag-row .cbx.pick { width: 18px; height: 18px; justify-self: center; }
.ag-days button.drop { border-color: var(--accent); background: var(--accent-bg); box-shadow: 0 0 0 2px var(--accent); }
.ag-days .ag-day-add { grid-template-columns: auto auto; align-items: center; border-style: dashed; color: var(--ink-3); }
.ag-days .ag-day-add svg { width: 14px; height: 14px; grid-row: 1; }
.ag-days .ag-day-add span { grid-column: 2; grid-row: 1; font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.ag-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-3); border-radius: var(--r-md); background: var(--accent-bg); }
.ag-parsed { padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); background: var(--surface-sunken); color: var(--ink-2); }
@media (max-width: 720px) { .ag-ses:not(.loose) { padding: var(--sp-1); } .ag-ses-name { width: 100%; } }
/* --- POE: the side panel that always fits the window, moments with their photos, the tray */
.poe-layout { grid-template-columns: 280px minmax(0, 1fr); }
@media (max-width: 1000px) { .poe-layout { grid-template-columns: minmax(0, 1fr); } }
/* The panel is never taller than the window: its list scrolls inside it (the checklist used to run off the page). */
.poe-rail { position: sticky; top: calc(var(--top-h) + 12px); max-height: calc(100vh - var(--top-h) - 28px); display: flex; flex-direction: column; gap: var(--sp-3); min-height: 0; }
@media (max-width: 1000px) { .poe-rail { position: static; max-height: 60vh; } }
.poe-prog { display: flex; align-items: center; gap: var(--sp-3); flex: none; }
.poe-rail-tabs { flex: none; align-self: stretch; }
.poe-rail-tabs button { flex: 1; justify-content: center; }
.poe-rail-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 2px; padding-right: 2px; scrollbar-width: thin; }
.poe-rail-body a { display: flex; align-items: center; gap: var(--sp-2); padding: 7px var(--sp-2); border-radius: var(--r-sm); color: var(--ink-2); font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.poe-rail-body a:hover { background: var(--accent-bg); text-decoration: none; }
.poe-rail-body a svg { width: 15px; height: 15px; flex: none; color: var(--ink-4); }
.poe-rail-body a.done svg { color: var(--ok); }
.poe-rail-body a .cnt { margin-left: auto; font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* 2026-11-28: under 1000 px the panel sits above the report; Sections and Checklist fold behind one tap (views/poe.js) */
.poe-rail-more { display: contents; }
.poe-rail-toggle { display: none; }
@media (max-width: 1000px) {
  .poe-rail-toggle { display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: 40px; padding: var(--sp-2) 0 0; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--ink); cursor: pointer; text-align: left; }
  .poe-rail-toggle:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }
  .poe-rail-toggle svg { width: 15px; height: 15px; flex: none; color: var(--ink-3); }
  .poe-rail-more:not(.open) { display: none; }
  .poe-rail-more.open { display: flex; flex-direction: column; gap: var(--sp-3); min-height: 0; flex: 1 1 auto; }
}
.poe-sec-head { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); min-width: 0; }
.poe-sec.folded .poe-sec-head { margin-bottom: 0; }
.poe-fold { border: 0; background: none; padding: 2px; border-radius: var(--r-xs); color: var(--ink-3); cursor: pointer; display: inline-grid; place-items: center; }
.poe-fold:hover { background: var(--surface-hover); color: var(--ink); }
.poe-fold svg { width: 16px; height: 16px; }
.poe-sec-ic { flex: none; width: 28px; height: 28px; border-radius: var(--r-sm); display: inline-grid; place-items: center; background: var(--accent-bg); color: var(--accent); }
.poe-sec-ic svg { width: 15px; height: 15px; }
.poe-sec-title { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: var(--fs-xl); border-color: transparent; background: transparent; box-shadow: none; padding-left: var(--sp-1); min-width: 0; flex: 1 1 200px; max-width: 460px; }
.poe-sec-title:hover { border-color: var(--line); }
.poe-sec-title:focus { border-color: var(--accent); background: var(--surface); }
.poe-group { display: flex; align-items: center; gap: var(--sp-2); margin: var(--sp-4) 0 var(--sp-2); font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-3); }
.poe-group:first-child { margin-top: 0; }
.poe-group svg { width: 13px; height: 13px; }
.poe-group::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.poe-item { padding: var(--sp-3); margin-bottom: var(--sp-3); transition: border-color var(--t-fast) var(--ease-std), box-shadow var(--t-fast) var(--ease-std); }
.poe-item.drop, .poe-tray.drop { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.poe-item-head { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.poe-item-title { flex: 1 1 auto; min-width: 0; font-weight: var(--fw-semibold); border-color: transparent; background: transparent; box-shadow: none; padding-left: var(--sp-1); }
.poe-item-title:hover { border-color: var(--line); }
.poe-item-title:focus { border-color: var(--accent); background: var(--surface); }
.poe-item-foot { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
.poe-link { flex: 0 1 260px; }
.ph-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: var(--sp-2); margin-top: var(--sp-2); }
.ph-strip.tray { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); max-height: 320px; overflow-y: auto; padding: 2px; }
.poe-ph { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-muted); border: 1px solid var(--line); cursor: pointer; box-shadow: var(--shadow-sm); }
.poe-ph img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.poe-ph:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.poe-ph.dragging { opacity: 0.4; }
.poe-ph.picked { outline: 3px solid var(--accent); outline-offset: -3px; }
.poe-ph.picked::after { content: "✓"; position: absolute; left: 6px; top: 6px; width: 20px; height: 20px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-size: var(--fs-xs); font-weight: var(--fw-bold); display: grid; place-items: center; }
.poe-ph.drop-before { box-shadow: -4px 0 0 var(--accent); }
.poe-ph.drop-after { box-shadow: 4px 0 0 var(--accent); }
.ph-x { position: absolute; right: 4px; top: 4px; width: 22px; height: 22px; border: 0; border-radius: var(--r-pill); background: var(--scrim); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity var(--t-fast) var(--ease-std); }
.ph-x svg { width: 12px; height: 12px; }
.poe-ph:hover .ph-x, .poe-ph:focus-within .ph-x { opacity: 1; }
@media (hover: none) { .ph-x { opacity: 1; } }
.ph-focus { position: absolute; left: 4px; bottom: 4px; width: 20px; height: 20px; border-radius: var(--r-pill); background: var(--scrim); color: var(--on-accent); display: grid; place-items: center; }
.ph-focus svg { width: 12px; height: 12px; }
.ph-add { aspect-ratio: 4 / 3; border: 2px dashed var(--line-2); border-radius: var(--r-sm); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ink-3); font-size: var(--fs-xs); text-align: center; padding: var(--sp-2); cursor: pointer; }
.ph-add:hover, .ph-add:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.ph-add svg { width: 18px; height: 18px; }
.ph-strip:has(.poe-ph) .ph-add span { display: none; }
.poe-item.missing .ph-add { border-color: var(--warn); grid-column: 1 / -1; aspect-ratio: auto; min-height: 64px; flex-direction: row; gap: var(--sp-2); font-size: var(--fs-sm); }
.poe-tray { border: 2px dashed transparent; }
.poe-tray.empty { border-color: var(--line-2); background: transparent; box-shadow: none; }
.poe-agenda .pa-day td { background: var(--surface-inverse); }
.poe-agenda .pa-day input { font-weight: var(--fw-bold); background: transparent; border-color: transparent; color: var(--on-accent); }
.poe-agenda .pa-ses td { background: var(--accent-bg); }
.poe-agenda .pa-ses input { font-weight: var(--fw-bold); background: transparent; border-color: transparent; color: var(--accent); }
.pv-wrap { display: grid; place-items: center; background: var(--surface-sunken); border-radius: var(--r-md); overflow: hidden; }
.pv-stage { position: relative; display: inline-flex; cursor: crosshair; }
.pv-stage img { max-width: 100%; max-height: 62vh; display: block; }
.pv-dot { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: var(--r-pill); border: 3px solid var(--on-accent); background: var(--accent); box-shadow: var(--shadow-md); pointer-events: none; }
.poe-qr { width: 168px; flex: none; padding: var(--sp-2); border-radius: var(--r-md); background: var(--on-accent); border: 1px solid var(--line); }
.poe-qr svg { width: 100%; height: auto; display: block; }
@media (prefers-reduced-motion: reduce) { .poe-item, .ph-x { transition: none; } }
/* --- decks: the soft shadow under a photo, as PowerPoint and Google Slides get it */
.dk-slide .dk-shadow { box-shadow: 0 0.5cqw 1.7cqw rgba(15, 22, 48, 0.3); }
.poe-rail-tabs button { white-space: nowrap; font-size: var(--fs-sm); padding-inline: var(--sp-2); }
/* --- meeting notes: the action list */
.ma { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-3); background: var(--surface); display: flex; flex-direction: column; gap: var(--sp-2); border-left: 4px solid var(--line-2); }
.ma.e-new { border-left-color: var(--accent); }
.ma.e-done { border-left-color: var(--ok); }
.ma.e-update { border-left-color: var(--warn); }
.ma.e-progress { border-left-color: var(--info); }
.ma.added, .ma.dismissed { opacity: 0.72; }
.ma-top { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.ma-eff button svg { width: 13px; height: 13px; }
.ma-title { font-weight: var(--fw-semibold); }
.ma-task { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.ma-task .btn { min-width: 0; max-width: 100%; }
.ma-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-2) var(--sp-3); }
.ma-f { display: flex; flex-direction: column; gap: 2px; }
.ma-f .input { width: auto; min-width: 130px; }
.ma-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--surface); }
.mt-empty { padding: var(--sp-5) var(--sp-3); text-align: center; }
.mt-tips summary { cursor: pointer; display: flex; align-items: center; gap: var(--sp-2); }
.mt-tips summary svg { width: 15px; height: 15px; color: var(--ink-3); }
@media (max-width: 720px) { .ma-eff { width: 100%; } .ma-eff button { flex: 1; justify-content: center; padding-inline: var(--sp-1); } }

/* POE: choose which agenda items go in (round 29) */
.ar-list { display: grid; gap: 2px; max-height: 52vh; overflow: auto; }
.ar-day { font-weight: var(--fw-semibold); padding: var(--sp-3) 0 var(--sp-1); }
.ar-ses { font-size: var(--fs-xs); color: var(--ink-3); text-transform: uppercase; letter-spacing: var(--ls-wide, 0.04em); padding: var(--sp-2) 0 2px; }
.ar-row { display: flex; align-items: center; gap: var(--sp-3); padding: 6px var(--sp-2); border-radius: var(--r-md); cursor: pointer; min-width: 0; }
.ar-row:hover { background: var(--glass-btn); }
.ar-row.off .ar-n { color: var(--ink-3); }
.ar-t { flex: none; width: 96px; font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: var(--fs-sm); }
.ar-n { min-width: 0; overflow-wrap: anywhere; }
.ar-why { flex: none; padding: 1px 8px; border-radius: var(--r-pill); background: var(--warn-bg); color: var(--warn); }

/* Guide steps are links (round 29): the whole row goes to where the step is done. */
.gs.go { cursor: pointer; transition: background 120ms var(--ease-std), border-color 120ms var(--ease-std); }
.gs.go:hover { background: var(--accent-bg); border-color: var(--accent); }
.gs.go:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
tr.tpl-sec td { background: var(--surface-sunken); }
.gs-tools { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); padding: 2px var(--sp-1) 0; }
.gs-tools a { display: inline-flex; align-items: center; gap: 4px; }
.tpl-edit-tbl td { vertical-align: top; }
.tpl-edit-tbl select.input { max-width: 124px; }
.tpl-edit-tbl td:first-child { min-width: 150px; }
.tpl-edit-tbl td:nth-child(2) { width: 36%; min-width: 200px; }
.tpl-edit-tbl:not(.quo) td:nth-child(4) { min-width: 104px; }
.tpl-edit-tbl select.input { min-width: 100px; max-width: 150px; }
.tpl-edit-tbl.quo td:first-child { width: 40%; min-width: 240px; }
.tpl-edit-tbl.quo td:nth-child(2) { width: auto; min-width: 0; }
.tpl-edit-tbl [data-f=title], .tpl-edit-tbl [data-f=description] { width: 100%; min-width: 0; }
.tpl-edit-tbl textarea[data-f=description] { resize: vertical; min-height: 34px; }

/* ---------------------------------------------------------------- Round 30 (2026-10-14)
   The Claim / PO ↔ Actual / Real switch on a quotation: both sides side by side, the one on
   screen lit in its colour, the other one click away; a side that doesn't exist yet is dashed. */
.pair-switch { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--sp-2); padding: var(--sp-2); border-radius: var(--r-lg); background: var(--well); }
.ps-side { --k: var(--ink-3); --k-bg: var(--surface-muted); display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: var(--sp-3) var(--sp-4); border: 2px solid transparent; border-radius: var(--r-md); background: transparent; color: var(--ink-2); font: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: background var(--t-fast) var(--ease-std), border-color var(--t-fast) var(--ease-std); }
.ps-side.k-claim { --k: var(--kind-claim); --k-bg: var(--kind-claim-bg); }
.ps-side.k-actual { --k: var(--kind-actual); --k-bg: var(--kind-actual-bg); }
a.ps-side:hover, .ps-add:hover { background: var(--surface); border-color: var(--line-hover); }
a.ps-side:hover .ps-k svg { transform: translateX(2px); }
.ps-side.on { background: var(--surface); border-color: var(--k); box-shadow: var(--shadow-sm); cursor: default; }
.ps-k { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--k); }
.ps-k svg { width: 14px; height: 14px; transition: transform var(--t-fast) var(--ease-std); }
.ps-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--k); flex: none; }
.ps-here { padding: 0 8px; border-radius: var(--r-pill); background: var(--k-bg); font-size: var(--fs-2xs); font-weight: var(--fw-semibold); }
.ps-side b, .ps-save b { font-family: var(--font-display); font-size: var(--fs-xl); color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ps-s { font-size: var(--fs-xs); color: var(--ink-3); overflow-wrap: anywhere; }
.ps-add { border-style: dashed; border-color: var(--line-2); justify-content: center; }
.ps-add .ps-k { color: var(--accent); }
.ps-save { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; padding: var(--sp-3) var(--sp-4); }
.ps-save .ps-k { color: var(--ink-3); }
.ps-save.pos b { color: var(--ok); } .ps-save.neg b { color: var(--danger); }
.chip.pair-add { border-style: dashed; color: var(--accent); }
/* What is still free under the target (the Claim / PO's total or a typed budget), before the fee. */
.room-meter { height: 8px; border-radius: var(--r-pill); background: var(--surface-muted); overflow: hidden; }
.room-meter i { display: block; height: 100%; border-radius: inherit; background: var(--ok-solid); transition: width var(--t-med) var(--ease-std); }
.room-meter.over i { background: var(--danger-solid); }
.room-nums { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-1) var(--sp-3); margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--ink-3); }
.room-nums b { color: var(--ink); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .room-meter i, .ps-k svg { transition: none; } }
/* Meeting notes (round 30): the action list in plain groups, one line per action. */
.ma2-list { display: flex; flex-direction: column; gap: var(--sp-4); }
.ma2-sec { display: flex; flex-direction: column; gap: var(--sp-1); }
.ma2-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--sp-2); padding: 0 var(--sp-1) var(--sp-1); border-bottom: 1px solid var(--line); }
.ma2-head h4 { margin: 0; font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.ma2 { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 148px 28px; align-items: start; gap: var(--sp-2); padding: var(--sp-2) var(--sp-1); border-radius: var(--r-sm); }
.ma2:hover { background: var(--surface-hover); }
.ma2 > input[type=checkbox] { margin-top: 9px; }
.ma2 > .badge { margin-top: 6px; justify-self: start; }
.ma2.added, .ma2.dismissed { opacity: .72; }
/* round 31: an action already applied shows its word ("Added") where the box was: the column fits it */
.ma2.added:not(.loose), .ma2.dismissed:not(.loose) { grid-template-columns: auto minmax(0, 1fr) auto 148px 28px; }
.ma2-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ma2-title { font-weight: var(--fw-semibold); }
.ma2-hint { font-size: var(--fs-xs); color: var(--ink-3); overflow-wrap: anywhere; }
.ma2-hi { color: var(--danger); font-weight: var(--fw-semibold); }
/* round 31: the heading of the notes an action was under ("Booth") */
.ma2-area { color: var(--ink-2); font-weight: var(--fw-semibold); }
.ma2-owner { max-width: 170px; min-width: 0; margin-top: 2px; }
.ma2-owner .ellipsis { max-width: 110px; }
.ma2-due { width: 100%; min-width: 0; }
.ma2-what { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.ma2-task { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; font-weight: var(--fw-semibold); }
.ma2-task svg { width: 13px; height: 13px; flex: none; }
.ma2-badge { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 22px; padding: 0 8px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: var(--fw-semibold); background: var(--surface-muted); color: var(--ink-2); }
.ma2-badge svg { width: 12px; height: 12px; }
.ma2-badge.e-done { background: var(--ok-bg); color: var(--ok); }
.ma2-badge.e-update { background: var(--warn-bg); color: var(--warn); }
.ma2-badge.e-progress { background: var(--info-bg); color: var(--info); }
.ma2.loose { grid-template-columns: auto minmax(0, 1fr) auto auto 28px; align-items: center; }
.ma2.loose > .ma2-badge { align-self: start; margin-top: 2px; }
.ma2-said { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ma2-said li { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); padding: 6px var(--sp-1); border-radius: var(--r-sm); font-size: var(--fs-sm); }
.ma2-said li:hover { background: var(--surface-hover); }
.ma2-said li > span { min-width: 0; overflow-wrap: anywhere; }
.ma2-said .link-btn { opacity: .75; }
.ma2-said li:hover .link-btn, .ma2-said .link-btn:focus-visible { opacity: 1; }
@media (max-width: 720px) {
  .ma2, .ma2.loose { grid-template-columns: 22px minmax(0, 1fr) 28px; }
  .ma2.added:not(.loose), .ma2.dismissed:not(.loose) { grid-template-columns: auto minmax(0, 1fr) 28px; }
  .ma2 > .ma2-main { grid-column: 2; }
  .ma2 > .ma2-owner, .ma2 > .ma2-due, .ma2 > select, .ma2.loose > .btn { grid-column: 2; justify-self: start; }
  .ma2 > .ma2-due { max-width: 180px; }
  .ma2 > [data-more] { grid-column: 3; grid-row: 1; }
}
/* The creative job (round 30): where it stands with its next step, the design by version, and
   each approver with Approve / Request changes. */
.cj-flow { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.cj-step { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 var(--sp-3) 0 6px; border-radius: var(--r-pill); background: var(--well); color: var(--ink-3); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.cj-step i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); font-style: normal; font-size: var(--fs-2xs); }
.cj-step svg { width: 14px; height: 14px; padding: 2px; border-radius: 50%; background: var(--ok-solid); color: var(--on-accent); }
.cj-step.done { color: var(--ink-2); }
.cj-step.now { background: var(--accent-bg); color: var(--accent-ink); box-shadow: inset 0 0 0 1.5px var(--accent); }
.cj-step.now i { background: var(--accent); color: var(--on-accent); }
.cj-step.now.warn { background: var(--warn-bg); color: var(--warn); box-shadow: inset 0 0 0 1.5px var(--warn-strong); }
.cj-step.now.warn i { background: var(--warn-strong); }
.cj-next { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin-top: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--well); }
.cj-changes { margin: 6px 0 0; padding-left: 18px; }
.cj-changes li { margin-top: 2px; }
.cj-brief summary, .cj-details summary { cursor: pointer; display: inline-flex; align-items: center; gap: var(--sp-2); }
.cj-brief summary svg, .cj-details summary svg { width: 15px; height: 15px; color: var(--ink-3); }
.cj-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-2); border-radius: var(--r-md); }
.cj-files.over { outline: 2px dashed var(--accent); outline-offset: 4px; }
.cj-file { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-sunken); border: 1px solid var(--line); }
.cj-view { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.cj-view img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cj-doc { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 100%; padding: var(--sp-2); font-size: var(--fs-xs); color: var(--ink-2); }
.cj-doc svg { width: 26px; height: 26px; color: var(--ink-3); }
.cj-doc .ellipsis { max-width: 100%; }
.cj-x { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow-sm); cursor: pointer; opacity: 0; transition: opacity var(--t-fast) var(--ease-std); }
.cj-x svg { width: 13px; height: 13px; }
.cj-file:hover .cj-x, .cj-x:focus-visible { opacity: 1; }
@media (hover: none) { .cj-x { opacity: 1; } }
.cj-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; aspect-ratio: 4 / 3; border: 2px dashed var(--line-2); border-radius: var(--r-sm); color: var(--accent); font-size: var(--fs-sm); font-weight: var(--fw-semibold); text-align: center; cursor: pointer; padding: var(--sp-2); }
.cj-add:hover { border-color: var(--accent); background: var(--accent-bg); }
.cj-add svg { width: 20px; height: 20px; }
.cj-aps { display: flex; flex-direction: column; gap: var(--sp-1); }
.cj-ap { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sp-2) var(--sp-3); padding: var(--sp-3); border-radius: var(--r-md); border: 1px solid var(--line); }
.cj-ap.s-changes { border-color: var(--line-danger); background: var(--danger-bg-soft); }
.cj-ap.s-approved { background: var(--ok-bg-soft); }
.cj-ap-act { flex: none; }
.ap-pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--r-pill); font-size: var(--fs-2xs); font-weight: var(--fw-semibold); background: var(--surface-muted); color: var(--ink-2); }
.ap-pill.approved { background: var(--ok-bg); color: var(--ok); }
.ap-pill.changes { background: var(--danger-bg); color: var(--danger); }
.ap-pill.na { color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .cj-x { transition: none; } }
/* the level ladder (core/points.js levelLadder): each level with the border it unlocks, on your own avatar */
.lvl-band li { position: relative; padding-right: 44px; }
.lvl-band .lvl-lname { line-height: var(--lh-tight); } /* wraps between words: "Tokoh Masyarakat III" is too long for one line */
.lvl-band li:has(.lvl-ring) { padding-right: 40px; }
.lvl-ring { position: absolute; right: 10px; top: 50%; translate: 0 -50%; display: inline-grid; place-items: center; pointer-events: none; }
.lvl-band li.ahead .lvl-ring { filter: grayscale(.85); opacity: .5; }
.lvl-band li.ahead .lvl-ring :is(.av, .av-wreath)::before, .lvl-band li.ahead .lvl-ring .av::after, .lvl-band li.ahead .lvl-ring .w-art * { animation: none !important; }
/* reaching a level (core/points.js levelUpCard): the card rises, the avatar lights up in its new border */
.lvlup { position: fixed; inset: 0; z-index: var(--z-toast); display: grid; place-items: center; padding: var(--sp-4); background: color-mix(in srgb, var(--surface-inverse) 28%, transparent); animation: lvlup-fade var(--t-slow) var(--ease-std) both; }
.lvlup.out { animation: lvlup-fade 240ms var(--ease-std) reverse both; }
.lvlup-card { position: relative; width: min(380px, 100%); padding: var(--sp-6) var(--sp-5) var(--sp-5); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-lg); text-align: center; animation: lvlup-rise var(--t-enter) var(--ease-spring) both; }
.lvlup-card .row { justify-content: center; }
.lvlup-x { position: absolute; top: var(--sp-2); right: var(--sp-2); }
.lvlup-av { position: relative; display: grid; place-items: center; height: 104px; margin-bottom: var(--sp-3); }
.lvlup-av > :is(.av, .av-wreath) { --s: 56px; animation: lvlup-light 900ms var(--ease-spring) 120ms both; }
.lvlup-av > .av { width: 56px; height: 56px; font-size: var(--fs-xl); }
.lvlup-glow { position: absolute; inset: 0; margin: auto; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--rim-glow, var(--brand-2)) 45%, transparent), transparent); animation: lvlup-glow 2.4s var(--ease-std) 300ms both; }
.lvlup-card.b1 { --rim-glow: var(--tier-1b); } .lvlup-card.b2 { --rim-glow: var(--tier-2b); } .lvlup-card.b3 { --rim-glow: var(--tier-3a); } .lvlup-card.b4 { --rim-glow: var(--tier-4b); } .lvlup-card.b5 { --rim-glow: var(--tier-5c); }
.lvlup-k { font-size: var(--fs-xs); font-weight: var(--fw-semibold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-3); }
.lvlup-card h3 { margin: 4px 0 var(--sp-2); font-family: var(--font-display); font-size: var(--fs-2xl); }
@keyframes lvlup-fade { from { opacity: 0; } }
@keyframes lvlup-rise { from { opacity: 0; translate: 0 24px; scale: .96; } }
@keyframes lvlup-light { 0% { scale: .55; opacity: 0; filter: brightness(2); } 60% { scale: 1.08; opacity: 1; } 100% { scale: 1; filter: none; } }
@keyframes lvlup-glow { 0% { opacity: 0; scale: .6; } 35% { opacity: 1; scale: 1.1; } 100% { opacity: .55; scale: 1; } }
@media (prefers-reduced-motion: reduce) { .lvlup, .lvlup.out, .lvlup-card, .lvlup-av > *, .lvlup-glow { animation: none; } }
/* A payment request's cash advance: who receives what, and moving money between them (round 30). */
.ca-split { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--well); }
.ca-who { display: inline-flex; align-items: center; gap: 6px; padding: 2px var(--sp-3) 2px 3px; border-radius: var(--r-pill); background: var(--surface); }
.ca-split .btn { margin-left: auto; }
/* A checklist task that came from a meeting (round 30): a small link to its notes. */
.cl-mtg { display: inline-flex; align-items: center; gap: 3px; text-decoration: none; }
.cl-mtg svg { width: 11px; height: 11px; }
.cl-mtg:hover { color: var(--accent); }
/* The walkthrough (round 30, core/tour.js): the page dims around what a step is about, and a card says
   what it does. Its own layer above everything; nothing moves under reduced motion. */
.tour { position: fixed; inset: 0; z-index: var(--z-toast); animation: tour-in var(--t-med) var(--ease-std) both; }
.tour.out { animation: tour-in 180ms var(--ease-std) reverse both; }
.tour.center { background: color-mix(in srgb, var(--surface-inverse) 45%, transparent); }
.tour-hole { position: fixed; border-radius: var(--r-md); box-shadow: 0 0 0 9999px color-mix(in srgb, var(--surface-inverse) 45%, transparent), 0 0 0 2px var(--accent); transition: left var(--t-med) var(--ease-std), top var(--t-med) var(--ease-std), width var(--t-med) var(--ease-std), height var(--t-med) var(--ease-std); pointer-events: none; }
.tour.center .tour-hole { display: none; }
.tour-card { position: fixed; width: min(340px, calc(100vw - 24px)); padding: var(--sp-4); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); transition: left var(--t-med) var(--ease-std), top var(--t-med) var(--ease-std); }
.tour-top { display: flex; justify-content: space-between; gap: var(--sp-2); font-size: var(--fs-xs); color: var(--ink-3); }
.tour-k { font-weight: var(--fw-semibold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--accent); }
.tour-card h3 { display: flex; align-items: center; gap: var(--sp-2); margin: var(--sp-2) 0 var(--sp-1); font-size: var(--fs-lg); }
.tour-card h3 svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.tour-card p { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); line-height: var(--lh-base); }
.tour-dots { display: flex; gap: 5px; margin-top: var(--sp-3); }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--surface-muted); }
.tour-dots i.past { background: color-mix(in srgb, var(--accent) 45%, var(--surface-muted)); }
.tour-dots i.on { width: 16px; border-radius: var(--r-pill); background: var(--accent); }
.tour-foot { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3); }
.tour-off { display: flex; align-items: center; gap: 6px; margin-top: var(--sp-3); font-size: var(--fs-xs); color: var(--ink-3); }
@keyframes tour-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tour, .tour.out { animation: none; } .tour-hole, .tour-card { transition: none; } }

/* Bulk close on Projects (2026-10-15): Select ticks cards / rows, the bar at the foot acts on them */
.selecting [data-body] .pcard, .selecting [data-body] .prow { position: relative; }
.selecting [data-body] .prow { padding-left: 40px; }
.pick-mark { position: absolute; top: 10px; right: 10px; z-index: 2; width: 22px; height: 22px; border-radius: var(--r-xs); border: 2px solid var(--line-hover); background: var(--surface); display: grid; place-items: center; color: var(--accent-ink); }
.prow > .pick-mark { top: 50%; right: auto; left: 10px; translate: 0 -50%; }
.pick-mark svg { width: 14px; height: 14px; }
.picked > .pick-mark { background: var(--accent); border-color: var(--accent); }
.selecting [data-body] .picked { outline: 2px solid var(--accent); outline-offset: -2px; }
.bulk-proj { position: sticky; bottom: var(--sp-3); z-index: var(--z-sticky); display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-4); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line-accent); box-shadow: var(--shadow-lg); }
.bulk-proj[hidden] { display: none; }
.bc-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-1); max-height: 52vh; overflow: auto; }
.bc-row { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2); border-radius: var(--r-md); background: var(--surface-muted); }
.bc-row .grow { display: flex; flex-direction: column; }
.bc-mark { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-xs); font-weight: var(--fw-bold, 700); }
.bc-row.ok .bc-mark { background: var(--ok-bg); color: var(--ok); }
.bc-row.warn .bc-mark { background: var(--warn-bg); color: var(--warn); }
.bc-row.no { opacity: 0.6; }
.bc-row.no .bc-mark { background: var(--danger-bg); color: var(--danger); }

/* ---------------------------------------------------------------- round 33: meeting notes
   The summary for WhatsApp (views/meeting-share.js), lines kept internal, and the lock on a decision. */
.mom-text { white-space: pre-wrap; font-size: var(--fs-sm); line-height: var(--lh-normal); resize: vertical; font-family: inherit; }
.ma2-int { color: var(--ink-3); font-weight: var(--fw-semibold); display: inline-flex; align-items: center; gap: 2px; }
.ma2-int svg { width: 11px; height: 11px; }
.ma2-said li > .row { gap: var(--sp-3); flex: none; align-items: baseline; }
.ma2-said .link-btn.int-on { color: var(--ink-2); opacity: 1; }
.ma2-said .link-btn svg { width: 12px; height: 12px; }
/* Social posts and ads (2026-10-15, views/social-ui.js). The mockups themselves follow each platform's
   own look and carry their own styles (core/social-mock.js); this is the Kelar frame around them. */
.soc-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5); padding: var(--sp-3) var(--sp-4); }
.soc-acc { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; padding: var(--sp-1) var(--sp-3) var(--sp-1) var(--sp-1); border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.soc-acc:hover:not(:disabled) { border-color: var(--line-hover); }
.soc-acc:disabled { cursor: default; }
.soc-acc > img, .soc-acc-ini, .soc-acc-pic { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--surface-muted); color: var(--ink-2); font-size: var(--fs-sm); font-weight: var(--fw-bold); overflow: hidden; }
.soc-acc-pic { width: 56px; height: 56px; }
.soc-acc-pic img { width: 100%; height: 100%; object-fit: cover; }
.soc-acc > span:not(.soc-acc-ini) { display: flex; flex-direction: column; min-width: 0; line-height: var(--lh-tight); }
.soc-acc svg { width: 15px; height: 15px; color: var(--ink-3); }
.soc-stats { display: flex; gap: var(--sp-5); }
.soc-stats div { display: flex; flex-direction: column; }
.soc-stats b { font-size: var(--fs-xl); }
.soc-stats span { font-size: var(--fs-xs); color: var(--ink-3); }
.soc-acts { margin-left: auto; }
.soc-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: var(--sp-4) 0; }
.soc-filters select { height: var(--ctl-h-sm); border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-sm); padding: 0 28px 0 var(--sp-3); -webkit-appearance: none; appearance: none; background-image: var(--chevron); background-repeat: no-repeat; background-position: right 10px center; background-size: 12px; max-width: 220px; }
.soc-none { padding: var(--sp-6); text-align: center; }
.soc-week { margin-bottom: var(--sp-6); }
.soc-week h3 { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-md); color: var(--ink-2); margin: 0 0 var(--sp-3); }
.soc-week h3 span { font-size: var(--fs-xs); color: var(--ink-3); background: var(--surface-muted); border-radius: var(--r-pill); padding: 1px 8px; }
.soc-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--sp-5) var(--sp-4); align-items: start; }
.soc-card { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.soc-card header { display: flex; align-items: flex-start; gap: var(--sp-2); }
.soc-card header .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.soc-card header .tiny svg { width: 12px; height: 12px; margin-right: 3px; vertical-align: -1px; }
.soc-pl { display: flex; gap: var(--sp-1); overflow-x: auto; scrollbar-width: none; }
.soc-pl::-webkit-scrollbar { display: none; }
.soc-pl button, .soc-pl.one span { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink-3); border-radius: var(--r-pill); padding: 2px 10px; font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-semibold); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.soc-pl.one span { cursor: default; border-color: transparent; padding-left: 0; }
.soc-pl button.on { background: var(--accent-bg); border-color: var(--line-accent); color: var(--accent-ink); }
.soc-pl button i { font-style: normal; min-width: 16px; height: 16px; border-radius: var(--r-pill); background: var(--warn-bg); color: var(--warn); font-size: var(--fs-3xs); display: inline-grid; place-items: center; }
.soc-mock { cursor: pointer; display: flex; justify-content: center; }
.soc-warn { display: flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-xs); color: var(--warn); cursor: pointer; }
.soc-warn svg { width: 13px; height: 13px; }
.soc-rv { display: flex; gap: var(--sp-2); align-items: flex-start; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); font-size: var(--fs-sm); background: var(--ok-bg); color: var(--ink); }
.soc-rv.changes { background: var(--warn-bg); }
.soc-rv.stale { background: var(--surface-muted); }
.soc-rv svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--ok); }
.soc-rv.changes svg { color: var(--warn); }
.soc-rv.stale svg { color: var(--ink-3); }
.soc-rv > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.soc-rv q { quotes: none; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.soc-rv.full { margin-bottom: var(--sp-4); }
.soc-rv.full q { -webkit-line-clamp: unset; display: block; }
.soc-rv-tag { margin-top: 4px; font-size: var(--fs-2xs); font-weight: var(--fw-semibold); color: var(--ok); white-space: nowrap; }
.soc-rv-tag.changes { color: var(--warn); }
.soc-stat-warn b { color: var(--warn); }
.soc-feed { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
.soc-feed-note { padding: var(--sp-4); }
.soc-feed-note h3 { display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-2); font-size: var(--fs-lg); }
.soc-feed-note svg { width: 16px; height: 16px; vertical-align: -3px; }
@media (max-width: 820px) { .soc-feed { grid-template-columns: minmax(0, 1fr); } }
.soc-list { padding: 0; overflow-x: auto; }
.soc-list .status-select { --c: var(--accent); width: auto; }
.soc-cap1 { max-width: 420px; }
.soc-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.soc-chips .tag.ad { background: var(--warn-bg); color: var(--warn); }
.soc-warn-dot { display: inline-flex; align-items: center; gap: 3px; color: var(--warn); font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.soc-warn-dot svg { width: 13px; height: 13px; }
.soc-bulk { position: sticky; bottom: var(--sp-3); z-index: var(--z-sticky); display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line-accent); box-shadow: var(--shadow-lg); }
.soc-bulk select { height: var(--ctl-h-sm); border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-sm); padding: 0 var(--sp-3); }
/* the editor: the form, and the mockup beside it */
.modal.soc-wide { width: min(1180px, 96vw); max-width: none; }
.soc-ed { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: var(--sp-6); align-items: start; }
.soc-ed-prev { position: sticky; top: 0; display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-3); border-radius: var(--r-lg); background: var(--surface-sunken); }
.soc-ed-mock { display: flex; justify-content: center; }
@media (max-width: 900px) { .soc-ed { grid-template-columns: minmax(0, 1fr); } .soc-ed-prev { position: static; } }
.soc-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-1); }
.soc-checks li { display: flex; gap: var(--sp-2); font-size: var(--fs-xs); color: var(--ink-2); }
.soc-checks li svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.soc-checks li.warn svg { color: var(--warn); }
.soc-checks li.info svg { color: var(--ink-3); }
.soc-checks li.ok svg { color: var(--ok); }
.soc-places { display: grid; gap: var(--sp-2); }
.soc-pgroup { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: var(--sp-2); align-items: start; }
.soc-pgroup > span { padding-top: 5px; }
.soc-pgroup > div { display: flex; flex-wrap: wrap; gap: 6px; }
.soc-place { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: var(--r-pill); padding: 4px 12px; font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.soc-place:hover { border-color: var(--line-hover); }
.soc-place.on { background: var(--accent-bg); border-color: var(--line-accent); color: var(--accent-ink); font-weight: var(--fw-semibold); }
.soc-place svg { width: 13px; height: 13px; }
.soc-media { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.soc-media:not(:empty) { margin-bottom: var(--sp-2); }
.soc-thumb { position: relative; width: 92px; display: flex; flex-direction: column; gap: 4px; cursor: grab; }
.soc-thumb > img, .soc-thumb-l { width: 92px; height: 92px; border-radius: var(--r-sm); object-fit: cover; background: var(--surface-muted); display: grid; place-items: center; color: var(--ink-3); }
.soc-thumb-v { position: absolute; left: 6px; top: 66px; z-index: 1; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; }
.soc-thumb-v svg { width: 11px; height: 11px; }
.soc-thumb-n { position: absolute; left: 6px; top: 6px; min-width: 18px; height: 18px; border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font-size: var(--fs-2xs); font-weight: var(--fw-bold); display: grid; place-items: center; }
.soc-thumb-x { position: absolute; right: 4px; top: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.soc-thumb-x svg { width: 12px; height: 12px; }
.soc-thumb-h { width: 100%; font: inherit; font-size: var(--fs-2xs); padding: 3px 6px; border: 1px solid var(--line); border-radius: var(--r-2xs); background: var(--surface); color: var(--ink); }
.soc-sub h4 { margin: 0 0 var(--sp-2); font-size: var(--fs-md); }
.soc-senderpic { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.soc-node { display: grid; gap: var(--sp-2); padding: var(--sp-3); border-radius: var(--r-md); background: var(--surface-sunken); margin-bottom: var(--sp-2); }
.soc-node textarea { min-height: 60px; }
.soc-btnrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 150px) minmax(0, 1fr) auto; gap: var(--sp-2); align-items: center; }
.soc-btnrow input, .soc-btnrow select { min-width: 0; }
@media (max-width: 640px) { .soc-btnrow { grid-template-columns: minmax(0, 1fr) auto; } }
/* planning a series, importing */
.soc-beats { display: grid; gap: var(--sp-2); }
.soc-beat { display: grid; grid-template-columns: minmax(0, 200px) auto minmax(0, 1fr); gap: var(--sp-2) var(--sp-3); align-items: start; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--surface-sunken); }
.soc-beat textarea { min-height: 52px; font-size: var(--fs-sm); }
@media (max-width: 720px) { .soc-beat { grid-template-columns: minmax(0, 1fr); } }
.soc-series-sum { padding: var(--sp-3); border-radius: var(--r-md); background: var(--accent-bg); color: var(--accent-ink); font-size: var(--fs-sm); }
.soc-imp { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.soc-mini { width: 40px; height: 40px; border-radius: var(--r-2xs); object-fit: cover; background: var(--surface-muted); }

/* ---------------------------------------------------------------- round 34: options in step
   A line that stays one option's own (never synced with the other options) carries an accent edge
   and an "only here" tag under its amount. */
.ql.own { box-shadow: inset 3px 0 0 var(--accent); }
.ql.own.hl { box-shadow: inset 3px 0 0 var(--accent), inset 6px 0 0 var(--warn-strong); }
.own-tag { color: var(--accent); font-weight: var(--fw-semibold); }

/* 2026-10-20 (the user: "a bit confusing"): the options as tabs above the page, with one line on what
   stays in step; the editor's lock inside the approval card instead of a banner of its own. */
.qo { display: flex; flex-direction: column; gap: var(--sp-2); }
.qo-tabs { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.qo-tab { display: flex; flex-direction: column; gap: 1px; min-width: 150px; max-width: 260px; padding: 8px 14px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); text-decoration: none; text-align: left; font: inherit; cursor: pointer; transition: border-color 0.15s var(--ease-std), background 0.15s var(--ease-std); }
.qo-tab:hover { border-color: var(--line-hover); background: var(--surface-hover); text-decoration: none; }
.qo-tab.on { border-color: var(--accent); background: var(--accent-bg); color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.qo-k { font-size: var(--fs-2xs); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: var(--ls-caps); color: var(--ink-3); }
.qo-tab.on .qo-k { color: var(--accent); }
.qo-n { font-weight: var(--fw-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qo-n.none { font-weight: var(--fw-regular); color: var(--ink-4); }
.qo-v { font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.qo-add { flex-direction: row; align-items: center; justify-content: center; gap: 6px; min-width: 0; border-style: dashed; color: var(--ink-3); }
.qo-add svg { width: 14px; height: 14px; }
.qo-sync { display: flex; gap: 6px; align-items: flex-start; font-size: var(--fs-xs); color: var(--ink-3); }
.qo-sync svg { width: 13px; height: 13px; flex: 0 0 13px; margin-top: 2px; }
.ab-lock { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; font-size: var(--fs-xs); color: var(--ink-3); }
.ab-lock svg { width: 13px; height: 13px; flex: 0 0 13px; margin-top: 2px; }
.approval-bar.editing { border-color: var(--warn-strong); box-shadow: 0 0 0 3px var(--warn-bg); }
.approval-bar.editing .ab-lock { color: var(--warn-strong); }
@media (max-width: 720px) { .qo-tab { min-width: 0; flex: 1 1 140px; } }

/* ---------------------------------------------------------------- Travel planner (2026-10-22, docs/travel-planner.md)
   Trips as cards on the list and a project's Travel tab; on the trip page, flights and hotels as
   ticket-like cards (fields only while one is edited), a side column (travellers, sending the
   itinerary, cost), and the printed itinerary (.it-*). */
.travel-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--sp-4); align-items: start; }
.travel-side { position: sticky; top: calc(var(--top-h) + 12px); }
.travel-side .tq { display: flex; flex-direction: column; gap: var(--sp-3); }
.tq-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-2); }
.trip-filters { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.trip-filters .search-box { flex: 1 1 220px; min-width: 0; }
.trip-group + .trip-group { margin-top: var(--sp-5); }
.trip-gh { font-size: var(--fs-md); font-weight: var(--fw-bold); color: var(--ink-2); margin: 0 0 var(--sp-2); display: flex; gap: var(--sp-2); align-items: center; }
.trip-gh span { font-size: var(--fs-xs); color: var(--ink-3); background: var(--well); border-radius: var(--r-pill); padding: 1px 8px; }
.trip-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-3); }
.trip-cards.one { grid-template-columns: minmax(0, 1fr); }
.trip-card { display: flex; flex-direction: column; gap: 6px; padding: var(--sp-4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; min-width: 0; transition: border-color var(--t-fast) var(--ease-std), box-shadow var(--t-fast) var(--ease-std), translate var(--t-fast) var(--ease-std); }
.trip-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); translate: 0 -2px; }
.trip-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.trip-card.now { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.trip-card.past, .trip-card.cancelled { opacity: 0.72; }
.trip-card.cancelled .tc-route b { text-decoration: line-through; }
.tc-top { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); }
/* 2026-10-28: the card's menu, and whether the trip is in a quotation */
.tc-top .badge { margin-left: auto; }
.tc-menu { margin: -4px -6px -4px 0; }
.tc-qrow { display: flex; padding-top: 6px; border-top: 1px dashed var(--line); }
.tc-q { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: var(--fw-semibold); padding: 3px 10px; border-radius: var(--r-pill); }
.tc-q svg { width: 13px; height: 13px; }
.tc-q.in { background: var(--ok-bg); color: var(--ok); }
.tc-q.out { background: var(--warn-bg); color: var(--warn); cursor: pointer; }
.tc-q.out:hover { filter: brightness(0.96); text-decoration: underline; }
.trip-qstrip { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); margin: 0 0 var(--sp-3); padding: 10px 14px; border-radius: var(--r-md); font-size: var(--fs-md); }
.trip-qstrip > svg { width: 18px; height: 18px; flex: 0 0 18px; }
.trip-qstrip .grow { min-width: 220px; }
.trip-qstrip.in { background: var(--ok-bg-soft); border: 1px solid var(--ok-bg); color: var(--ink-2); } .trip-qstrip.in > svg { color: var(--ok); }
.trip-qstrip.ready { background: var(--warn-bg); color: var(--ink); border: 1px solid var(--warn-bg); } .trip-qstrip.ready > svg { color: var(--warn); }
.trip-qstrip.wait { background: var(--surface-sunken); color: var(--ink-3); }
.dv-i.ag .dv-ic { background: var(--info-bg); color: var(--info); }
.tc-route { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-family: var(--font-display); font-size: var(--fs-lg); }
.tc-route b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-route svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--accent); }
.tc-title { font-weight: var(--fw-semibold); font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-proj { font-size: var(--fs-sm); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: -4px; }
.tc-when { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--ink-2); flex-wrap: wrap; }
.tc-when svg { width: 14px; height: 14px; color: var(--ink-3); }
.tc-rel { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--accent-ink); background: var(--accent-bg); border-radius: var(--r-pill); padding: 1px 8px; }
.trip-card.past .tc-rel { color: var(--ink-3); background: var(--well); }
.tc-foot { display: flex; align-items: center; gap: var(--sp-3); margin-top: auto; padding-top: var(--sp-2); border-top: 1px solid var(--line); flex-wrap: wrap; }
.tc-who { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; }
.tc-book { display: inline-flex; align-items: center; gap: 6px; }
.tc-bar { width: 46px; height: 6px; border-radius: var(--r-pill); background: var(--well); overflow: hidden; }
.tc-bar i { display: block; height: 100%; background: var(--ok); border-radius: inherit; }
.tc-cost { font-weight: var(--fw-bold); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }

/* the trip page */
.trip-head .toolbar { align-items: center; }
.trip-stats { margin-bottom: var(--sp-3); }
.stat .stat-of { font-size: var(--fs-lg); color: var(--ink-3); font-weight: var(--fw-semibold); }
.trip-todo { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4); border-radius: var(--r-md); background: var(--warn-bg); color: var(--warn); font-size: var(--fs-md); }
.trip-todo > svg { width: 18px; height: 18px; }
.trip-todo .chip { height: var(--ctl-h-xs); color: var(--ink); }
.trip-todo.done { background: var(--ok-bg); color: var(--ok); }
.trip-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--sp-4); align-items: start; }
.trip-main { display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; }
.trip-side { display: flex; flex-direction: column; gap: var(--sp-4); position: sticky; top: calc(var(--top-h) + 12px); min-width: 0; }
.trip-viewbar { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.trip-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.trip-none { margin: 0; }
.trip-item { position: relative; padding: var(--sp-3) var(--sp-4); padding-left: calc(var(--sp-4) + 4px); border-radius: var(--r-md); background: var(--well); border: 1px solid transparent; display: flex; flex-direction: column; gap: var(--sp-2); scroll-margin-top: calc(var(--top-h) + 80px); transition: border-color var(--t-fast) var(--ease-std), box-shadow var(--t-fast) var(--ease-std); }
.trip-item::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: var(--r-pill); background: var(--line-2); }
.trip-item.st-held::before { background: var(--warn); }
.trip-item.st-booked::before { background: var(--ok); }
.trip-item.st-cancelled { opacity: 0.6; }
.trip-item.st-cancelled .ti-route b, .trip-item.st-cancelled .ti-hotel b { text-decoration: line-through; }
.trip-item.flash, .card.flash { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.ti-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-2); flex-wrap: wrap; }
.ti-route { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; font-family: var(--font-display); font-size: var(--fs-xl); }
.ti-arrow { display: inline-flex; align-items: center; color: var(--accent); }
.ti-arrow svg { width: 18px; height: 18px; }
.ti-cities, .ti-hotel .ti-cities { font-family: inherit; font-size: var(--fs-sm); letter-spacing: 0; color: var(--ink-3); font-weight: var(--fw-medium); }
.ti-hotel { display: flex; flex-direction: column; min-width: 0; }
.ti-hotel b { font-size: var(--fs-lg); }
.ti-st { flex: 0 0 auto; }
.ti-st button { height: 26px; font-size: var(--fs-sm); padding: 0 var(--sp-2); }
.ti-st button.on[data-st="booked"] { background: var(--ok); color: var(--on-accent); }
.ti-st button.on[data-st="held"] { background: var(--warn); color: var(--on-accent); }
.ti-facts { display: flex; flex-wrap: wrap; gap: 4px var(--sp-4); font-size: var(--fs-sm); color: var(--ink-2); align-items: center; }
.ti-facts > span { display: inline-flex; align-items: center; gap: 5px; }
.ti-facts svg { width: 14px; height: 14px; color: var(--ink-3); }
.ti-code b { font-family: var(--font-display); color: var(--ink); }
.ti-price { margin-left: auto; font-variant-numeric: tabular-nums; }
.ti-who, .ti-rooms { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ti-room { font-size: var(--fs-sm); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 2px 10px; }
.ti-room b { color: var(--ink-3); font-weight: var(--fw-semibold); margin-right: 2px; }
.ti-room.warn { color: var(--warn); border-color: var(--warn); display: inline-flex; gap: 4px; align-items: center; }
.ti-room.warn svg { width: 13px; height: 13px; }
.ti-note { font-size: var(--fs-sm); color: var(--ink-3); font-style: italic; }
.ti-actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ti-actions .ml-auto { margin-left: auto; }
.ti-file { display: inline-flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 0 0 0 8px; height: var(--ctl-h-xs); }
.ti-file .link-btn { display: inline-flex; align-items: center; gap: 4px; }
.ti-file svg { width: 12px; height: 12px; }
.ti-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: var(--sp-2) var(--sp-3); padding: var(--sp-3); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.ti-form .mf > span { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--ink-3); display: flex; gap: var(--sp-2); align-items: baseline; }
.ti-form .input { width: 100%; }
.ti-form .ti-span { grid-column: 1 / -1; }
.ti-form .ti-span2 { grid-column: span 2; }
.ti-form .chip svg { width: 12px; height: 12px; }
.ti-roomer { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px var(--sp-3); }
.ti-roomsel { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); font-size: var(--fs-sm); }
.ti-roomsel span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ti-roomsel select { width: 110px !important; flex: 0 0 110px; }
.trip-extras { display: flex; flex-direction: column; gap: var(--sp-2); }
.trip-extra { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--well); }
.te-ic { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-pill); background: var(--surface); color: var(--accent); flex: 0 0 28px; }
.te-ic svg { width: 14px; height: 14px; }
.te-label { flex: 1 1 180px; min-width: 140px; }
.te-n { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; }
.te-n .input { width: 120px; }
.te-n.sm .input { width: 58px; }
.te-total { margin-left: auto; font-variant-numeric: tabular-nums; min-width: 110px; text-align: right; }
.trip-people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.trip-people li { display: flex; align-items: center; gap: var(--sp-2); padding: 6px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.trip-people li:last-child { border-bottom: 0; }
.tp-n { flex: 1 1 auto; min-width: 0; font-size: var(--fs-md); }
.tp-n .tiny { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-people .badge { height: 18px; font-size: var(--fs-2xs); }
.seg-sm button { height: 24px; font-size: var(--fs-xs); padding: 0 var(--sp-2); }
.trip-out { display: flex; flex-direction: column; gap: var(--sp-2); }
.trip-out-btn { display: flex; align-items: flex-start; gap: var(--sp-3); text-align: left; padding: var(--sp-3); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; transition: border-color var(--t-fast) var(--ease-std), background var(--t-fast) var(--ease-std); }
.trip-out-btn:hover { border-color: var(--line-2); background: var(--well); }
.trip-out-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.trip-out-btn > svg { width: 20px; height: 20px; flex: 0 0 20px; color: var(--accent); margin-top: 1px; }
.trip-out-btn span { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-md); }
.trip-out-btn i { font-style: normal; font-size: var(--fs-xs); color: var(--ink-3); }
.trip-out-btn i svg { width: 11px; height: 11px; vertical-align: -1px; }
.trip-pr { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--line); font-size: var(--fs-md); }
.trip-pr > svg { width: 16px; height: 16px; color: var(--ink-3); }
.trip-pr .btn-sm { width: 100%; justify-content: center; }
.trip-pr > .btn-xs { margin-left: auto; }
.dv-day { padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.dv-day:last-child { border-bottom: 0; }
.dv-day.today .dv-h b { color: var(--accent); }
.dv-h { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.dv-h span { color: var(--ink-3); font-size: var(--fs-sm); }
.dv-day ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dv-i { display: grid; grid-template-columns: 48px 28px minmax(0, 1fr); align-items: start; gap: var(--sp-2); font-size: var(--fs-md); }
.dv-t { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: var(--fs-sm); padding-top: 4px; }
.dv-ic { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-pill); background: var(--accent-bg); color: var(--accent); }
.dv-ic svg { width: 14px; height: 14px; }
.dv-i.ho .dv-ic { background: var(--well); color: var(--ink-2); }
.dv-i.ev .dv-ic { background: var(--warn-bg); color: var(--warn); }
.dv-i.fl.st-idea .dv-ic { background: var(--well); color: var(--ink-3); }
.dv-free { margin: 0 0 0 calc(48px + 28px + var(--sp-2) * 2); font-size: var(--fs-sm); color: var(--ink-3); }
.trip-paste textarea { width: 100%; font-family: inherit; }
.trip-read { margin-top: var(--sp-3); }
.trip-read ul { margin: 4px 0; padding-left: 18px; font-size: var(--fs-sm); }
.trip-choice { display: flex; flex-direction: column; gap: 6px; }
.trip-prlines td { vertical-align: top; }
.trip-plan-opts { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); align-items: center; }
.trip-plan-rate { display: inline-flex; align-items: center; gap: var(--sp-2); }
.trip-plan-rate input { width: 130px; }
.trip-plan-rate[hidden] { display: none; }
@media (max-width: 1180px) {
  .trip-grid, .travel-grid { grid-template-columns: minmax(0, 1fr); }
  .trip-side, .travel-side { position: static; }
}
@media (max-width: 560px) {
  .ti-price { margin-left: 0; width: 100%; }
  .ti-form .ti-span2 { grid-column: 1 / -1; }
  .te-total { margin-left: 0; text-align: left; }
  .trip-head .toolbar { width: 100%; }
  .trip-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
  .trip-stats .stat { padding: var(--sp-3); }
  .trip-stats .stat .v { font-size: var(--fs-xl); }
  .trip-stats .stat .d { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* the printed itinerary (print.js, kind "trip") */
.doc-page.it-page .it-sub { text-align: center; margin: -4px 0 12px; font-size: 11px; color: var(--doc-ink-2); }
.doc-page.it-page .it-h { font-size: 11.5px; font-weight: var(--fw-bold); text-transform: uppercase; color: var(--doc-ink); margin: 14px 0 6px; padding-bottom: 3px; border-bottom: 1.5px solid var(--doc-line-strong); break-after: avoid; }
.doc-page.it-page .doc-tbl td, .it-page .doc-tbl th { vertical-align: top; }
.doc-page.it-page .sub-line { font-size: 8.8px; color: var(--doc-ink-3); }
.doc-page .it-ok { color: var(--doc-ok); font-weight: var(--fw-bold); }
.doc-page .it-hold { color: var(--doc-mark-ink); font-weight: var(--fw-bold); }
.doc-page .it-no { color: var(--doc-ink-3); }
.doc-page .it-hotel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; font-size: 10px; color: var(--doc-ink-2); margin-bottom: 6px; break-inside: avoid; }
.doc-page .it-hn { font-size: 12px; color: var(--doc-ink); }
.doc-page .it-hkv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; }
.doc-page .it-hkv span { color: var(--doc-ink-3); }
.doc-page .it-rooms { width: 60%; }
.doc-page .it-days { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.doc-page .it-day { break-inside: avoid; font-size: 10px; }
.doc-page .it-dh { border-bottom: 1px solid var(--doc-line); padding-bottom: 2px; margin-bottom: 4px; color: var(--doc-ink-2); }
.doc-page .it-day ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.doc-page .it-day li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 4px; }
.doc-page .it-t { color: var(--doc-ink-3); font-variant-numeric: tabular-nums; }
.doc-page .it-t svg { width: 10px; height: 10px; }
.doc-page .it-free { margin: 0; color: var(--doc-ink-3); font-size: 9.5px; }
.doc-page .it-list { margin: 0; padding-left: 16px; font-size: 10px; }
.doc-page .it-notes { font-size: 10px; margin: 0; }

/* ---------------------------------------------------------------- 2026-10-22: payment request follow-up, email people, approvals pop-up, revenue */
.pr-wait { list-style: none; margin: var(--sp-2) 0 0; padding: 0; display: grid; gap: var(--sp-1); }
.pr-wait li { padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--surface-muted); font-size: var(--fs-sm); color: var(--ink-2); }
.pr-wait li .small { margin-top: 2px; }
.em-people { display: grid; gap: var(--sp-1); max-height: 260px; overflow: auto; padding: var(--sp-1); border: 1px solid var(--line); border-radius: var(--r-md); }
.em-person { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-1) var(--sp-2); border-radius: var(--r-sm); min-width: 0; }
.em-person:hover { background: var(--surface-hover); }
.rev-stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.rev-stats button.stat { text-align: left; font: inherit; color: inherit; }
.rev-stats .stat.on { outline: 2px solid var(--accent); outline-offset: -2px; }
.rev-sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--sp-2); }
.rev-src { display: grid; gap: 2px; justify-items: start; padding: var(--sp-3); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); font: inherit; color: inherit; cursor: pointer; text-align: left; }
.rev-src:hover { background: var(--surface-hover); }
.rev-src.on { border-color: var(--accent); background: var(--surface-selected); }
.rev-src b { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.rev-dot { display: inline-block; width: 8px; height: 8px; border-radius: var(--r-pill); background: var(--c); margin-right: var(--sp-1); vertical-align: middle; }

/* live fares and hotel prices (2026-10-22, docs/live-fares.md): the windows from "Fares & times" and "Hotels & prices" */
.fares { display: flex; flex-direction: column; gap: var(--sp-3); }
.fares-bar { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.fares-when { margin-left: auto; }
.fares-list { display: flex; flex-direction: column; gap: var(--sp-2); max-height: 58vh; overflow-y: auto; scrollbar-width: thin; }
.fares-wait { display: flex; align-items: center; gap: var(--sp-2); color: var(--ink-3); font-size: var(--fs-sm); }
.fares-wait svg { width: 16px; height: 16px; color: var(--accent); }
.fare { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto auto; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--well); border: 1px solid transparent; }
.fare.best { border-color: var(--line-accent); background: var(--accent-bg); }
.fare-logo { width: 32px; height: 32px; object-fit: contain; border-radius: var(--r-sm); background: var(--surface); display: inline-grid; place-items: center; }
.fare-logo svg { width: 16px; height: 16px; color: var(--ink-3); }
.fare-main { min-width: 0; }
.fare-main .tiny { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fare-times { font-variant-numeric: tabular-nums; }
.fare-dur { text-align: right; min-width: 92px; }
.fare-price { text-align: right; font-variant-numeric: tabular-nums; min-width: 110px; }
.fare.hotel { grid-template-columns: 64px minmax(0, 1fr) auto auto; }
.hotel-img { width: 64px; height: 48px; object-fit: cover; border-radius: var(--r-sm); background: var(--surface); display: inline-grid; place-items: center; }
.hotel-img svg { width: 18px; height: 18px; color: var(--ink-3); }
.hotel-sellers { display: flex; flex-wrap: wrap; gap: 4px var(--sp-2); font-size: var(--fs-xs); margin-top: 2px; }
.hotel-sellers a, .hotel-sellers span { color: var(--ink-2); }
.fares-foot { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding-top: var(--sp-2); border-top: 1px solid var(--line); }
.ok-text { color: var(--ok); }
.steps-list { margin: var(--sp-2) 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 640px) {
  .fare { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .fare-dur { grid-column: 2; text-align: left; }
  .fare-price { grid-column: 3; grid-row: 1; }
  .fare > .btn { grid-column: 1 / -1; }
  .fare.hotel { grid-template-columns: 56px minmax(0, 1fr) auto; }
}

/* ---------------------------------------------------------------- 2026-10-22: payment request follow-up, email people, approvals pop-up, revenue */
.pr-wait { list-style: none; margin: var(--sp-2) 0 0; padding: 0; display: grid; gap: var(--sp-1); }
.pr-wait li { padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--surface-muted); font-size: var(--fs-sm); color: var(--ink-2); }
.pr-wait li .small { margin-top: 2px; }
.em-people { display: grid; gap: var(--sp-1); max-height: 260px; overflow: auto; padding: var(--sp-1); border: 1px solid var(--line); border-radius: var(--r-md); }
.em-person { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-1) var(--sp-2); border-radius: var(--r-sm); min-width: 0; }
.em-person:hover { background: var(--surface-hover); }
.rev-stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.rev-stats button.stat { text-align: left; font: inherit; color: inherit; }
.rev-stats .stat.on { outline: 2px solid var(--accent); outline-offset: -2px; }
.rev-sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--sp-2); }
.rev-src { display: grid; gap: 2px; justify-items: start; padding: var(--sp-3); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); font: inherit; color: inherit; cursor: pointer; text-align: left; }
.rev-src:hover { background: var(--surface-hover); }
.rev-src.on { border-color: var(--accent); background: var(--surface-selected); }
.rev-src b { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.rev-dot { display: inline-block; width: 8px; height: 8px; border-radius: var(--r-pill); background: var(--c); margin-right: var(--sp-1); vertical-align: middle; }


/* ---------------------------------------------------------------- 2026-10-23: client savings, margin on Revenue */
.rev-ms { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--sp-2); }
.rev-m { display: grid; gap: 2px; padding: var(--sp-3); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); color: inherit; min-width: 0; }
.rev-m b { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.rev-m.warn b { color: var(--danger); }
.rev-m.link:hover { background: var(--surface-hover); }
.sav-hist { list-style: none; margin: var(--sp-2) 0 0; padding: 0; display: grid; gap: var(--sp-2); font-size: var(--fs-sm); }
.sav-hist li { padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--surface-muted); }

/* ---------------------------------------------------------------- 2026-10-23: the kind of a quotation, tied deals */
.qk-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: var(--surface-muted); }
.qk-switch button { --k: var(--kind-single); --k-bg: var(--kind-single-bg); display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-3); font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold); cursor: pointer; }
.qk-switch button i { width: 8px; height: 8px; border-radius: var(--r-pill); background: var(--k); }
.qk-switch button.k-claim { --k: var(--kind-claim); --k-bg: var(--kind-claim-bg); }
.qk-switch button.k-actual { --k: var(--kind-actual); --k-bg: var(--kind-actual-bg); }
.qk-switch button:hover { color: var(--ink); }
.qk-switch button.on { background: var(--k-bg); color: var(--k); box-shadow: inset 0 0 0 1.5px var(--k); }
.qk-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--sp-2); }
.qk-card { --k: var(--kind-single); --k-bg: var(--kind-single-bg); display: grid; gap: 4px; padding: var(--sp-3); border: 2px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: inherit; }
.qk-card.k-claim { --k: var(--kind-claim); --k-bg: var(--kind-claim-bg); }
.qk-card.k-actual { --k: var(--kind-actual); --k-bg: var(--kind-actual-bg); }
.qk-card b { color: var(--k); display: flex; align-items: center; gap: 6px; }
.qk-card b i { width: 9px; height: 9px; border-radius: var(--r-pill); background: var(--k); }
.qk-card.on { border-color: var(--k); background: var(--k-bg); }
.qlinks { display: grid; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-lg); border: 1px dashed var(--line); background: var(--surface); }
.qlinks-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.qlink { --k: var(--kind-single); --k-bg: var(--kind-single-bg); display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: var(--r-pill); background: var(--k-bg); color: var(--k); font-size: var(--fs-sm); font-weight: var(--fw-semibold); text-decoration: none; }
.qlink.k-claim { --k: var(--kind-claim); --k-bg: var(--kind-claim-bg); }
.qlink.k-actual { --k: var(--kind-actual); --k-bg: var(--kind-actual-bg); }
.qlink.on { box-shadow: inset 0 0 0 1.5px var(--k); }
.qlink button { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0 2px; display: inline-flex; }
.qlink button svg { width: 14px; height: 14px; }
.btn.ask-approval { font-size: var(--fs-md); padding: 10px 18px; box-shadow: var(--shadow-md); }

/* Invite by email (2026-10-23): who is ticked, as chips above the list and on the message step */
.inv-chosen { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); min-height: 28px; }
.inv-chip { display: inline-flex; align-items: center; gap: var(--sp-1); padding: 2px 4px 2px 10px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--ink); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.inv-chip button { display: grid; place-items: center; width: 18px; height: 18px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); cursor: pointer; }
.inv-chip button:hover { background: var(--surface-hover); color: var(--ink); }
.inv-chip svg { width: 11px; height: 11px; }

/* Divisions told apart (2026-10-23, the owner's option B): a band in the division's colour across the top of a
   project card, a board card and the project header; "Includes RSVP" for a service; lines to linked work */
.div-band { --band: color-mix(in oklab, var(--c) 70%, var(--stage-ink)); display: flex; align-items: center; gap: var(--sp-2); min-width: 0; background: var(--band); color: var(--on-stage); font-size: var(--fs-xs); font-weight: var(--fw-semibold); letter-spacing: var(--ls-wide); }
.div-band svg { width: 14px; height: 14px; flex: 0 0 14px; }
.div-band-priv { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; padding: 1px var(--sp-2); border-radius: var(--r-pill); background: color-mix(in srgb, var(--on-stage) 22%, transparent); color: var(--on-stage); font-size: var(--fs-xs); font-weight: var(--fw-semibold); white-space: nowrap; }
.div-band-priv .ic, .div-band-priv svg { width: 11px; height: 11px; }
.div-band-priv + .div-band-code { margin-left: var(--sp-2); }
.priv-ic { display: inline-flex; vertical-align: -2px; margin-right: 4px; color: var(--ink-3); }
.priv-ic svg { width: 13px; height: 13px; }
.priv-field .check span { display: inline-flex; align-items: center; gap: var(--sp-1); flex-wrap: wrap; }
.priv-field .check svg { width: 14px; height: 14px; }
.priv-pick { margin-top: var(--sp-2); display: grid; gap: var(--sp-1); }
.div-band-code { margin-left: auto; font-family: var(--font-mono); font-weight: var(--fw-regular); color: color-mix(in srgb, var(--on-stage) 82%, transparent); white-space: nowrap; }
.pcard > .pc-band { margin: -14px -16px 0 -18px; padding: 6px 16px 6px 18px; }
.pcard > .pick-mark { top: 3px; }
.kcard { overflow: hidden; }
.kcard > .kc-band { margin: -10px -12px 0; padding: 4px 12px; }
.phead > .ph-band { margin: calc(-1 * var(--sp-6)) calc(-1 * var(--sp-6)) var(--sp-4); padding: var(--sp-2) var(--sp-6); font-size: var(--fs-sm); }
.phead > .ph-band svg { width: 16px; height: 16px; flex-basis: 16px; }
.pc-links { display: grid; gap: 2px; min-width: 0; }
.pc-link { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--fs-xs); color: var(--ink-3); text-decoration: none; }
.pc-link svg { width: 13px; height: 13px; flex: 0 0 13px; color: var(--c); }
.pc-link b { color: color-mix(in srgb, var(--c) 72%, var(--ink)); font-weight: var(--fw-semibold); }
.pc-link:hover b { text-decoration: underline; }
.tag.svc-inc { gap: 3px; background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, var(--line)); color: var(--ink-2); }
.tag.svc-inc svg { width: 11px; height: 11px; color: var(--c); }
.phead .tag.svc-inc { background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55); color: var(--on-stage); }
.phead .tag.svc-inc svg { color: var(--on-stage); }
.prow-div { color: color-mix(in srgb, var(--c) 72%, var(--ink)); font-weight: var(--fw-semibold); }

@keyframes apPulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--warn) 45%, transparent); } 50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--warn) 0%, transparent); } }
.nav-item.urgent .nav-count { background: var(--warn); color: var(--on-accent); animation: apPulse 1.6s var(--ease-std) infinite; }
@media (prefers-reduced-motion: reduce) { .nav-item.urgent .nav-count { animation: none; } }

/* ---------------------------------------------------------------- Round 36 (2026-10-23): creative and checklist */
/* Urgent: one red language everywhere (tag, card edge, lane, checklist group, bell, sidebar count) */
.cr-urgent-tag { display: inline-flex; align-items: center; gap: 3px; margin-right: var(--sp-2); padding: 1px 7px; border-radius: var(--r-pill); background: var(--danger); color: var(--on-accent); font-size: var(--fs-xs); font-weight: var(--fw-semibold); vertical-align: 1px; }
.cr-urgent-tag svg { width: 11px; height: 11px; }
.kcard.urgent { border-color: var(--line-danger); box-shadow: inset 3px 0 0 var(--danger), var(--shadow-sm); }
tr.cr-urgent-row-t > td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.cr-urgent { margin: 0 0 var(--sp-4); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-lg); background: var(--danger-bg); border: 1px solid var(--line-danger); }
.cr-urgent-head { display: flex; align-items: center; gap: var(--sp-2); color: var(--danger); margin-bottom: var(--sp-2); flex-wrap: wrap; }
.cr-urgent-head svg { width: 16px; height: 16px; }
.cr-urgent-head .cnt { min-width: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--danger); color: var(--on-accent); font-size: var(--fs-xs); text-align: center; }
.cr-urgent-head .tiny { color: var(--ink-2); }
.cr-urgent-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-2); }
.cr-urgent-row .kcard { margin: 0; cursor: pointer; background: var(--surface); }
.n-urgent { box-shadow: inset 3px 0 0 var(--danger); }
.n-urgent-tag { display: inline-block; padding: 0 6px; border-radius: var(--r-pill); background: var(--danger); color: var(--on-accent); font-size: var(--fs-3xs); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: var(--ls-caps); vertical-align: 1px; }
@keyframes crPulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 50%, transparent); } 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--danger) 0%, transparent); } }
.nav-item.cr-hot .nav-count { background: var(--danger); color: var(--on-accent); animation: crPulse 1.4s var(--ease-std) infinite; }
.btn.btn-urgent.on { background: var(--danger); border-color: var(--danger); color: var(--on-accent); }
.cl-group.cl-urgent { border: 1px solid var(--line-danger); border-radius: var(--r-lg); background: var(--danger-bg); padding: 0 var(--sp-2) var(--sp-2); margin-bottom: var(--sp-3); }
.cl-group.cl-urgent .cl-group-head h4, .cl-urgent-k { color: var(--danger); }
.cl-item.urgent { box-shadow: inset 3px 0 0 var(--danger); }
.cl-actions [data-act=select].on { background: var(--accent-bg); border-color: var(--line-accent); color: var(--accent-ink); }

@media (prefers-reduced-motion: reduce) { .nav-item.cr-hot .nav-count { animation: none; } }

/* Designers by load: tiles in the request dialog, the team strip on Creative */
.dz-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--sp-2); }
.dz-tile { display: grid; gap: 6px; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-align: left; cursor: pointer; min-width: 0; }
.dz-tile:hover { border-color: var(--line-hover); }
.dz-tile.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-bg); }
.dz-tile.later { border-style: dashed; }
.dz-best { padding: 0 6px; border-radius: var(--r-pill); background: var(--ok-bg); color: var(--ok-strong); font-size: var(--fs-3xs); font-weight: var(--fw-semibold); white-space: nowrap; }
.dz-bar { display: block; height: 4px; border-radius: var(--r-pill); background: var(--surface-sunken); overflow: hidden; }
.dz-bar i { display: block; height: 100%; background: var(--ok); border-radius: inherit; }
.l-mid .dz-bar i { background: var(--warn); }
.l-hi .dz-bar i { background: var(--danger); }
.cr-team { margin-bottom: var(--sp-3); }
.cr-team-head { display: flex; align-items: baseline; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-2); }
.cr-team-head b { display: inline-flex; align-items: center; gap: 6px; }
.cr-team-head .link-btn { margin-left: auto; }
.cr-team-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-2); }
.dz-tile, .cr-mate, .kpi-tile, .kpi-add { font: inherit; }
.cr-mate { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px var(--sp-2); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-align: left; cursor: pointer; }
.cr-mate .dz-bar { grid-column: 1 / -1; }
.cr-mate-t { display: grid; min-width: 0; }
.cr-mate.on { border-color: var(--accent); background: var(--accent-bg); }
.cr-mate:hover { border-color: var(--line-hover); }
.cj-who { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5); margin-top: var(--sp-3); padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-muted); }
.cj-who-item { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.cj-lead-note { display: inline-flex; align-items: center; gap: 4px; flex-basis: 100%; }
.cr-prio .p-urgent.on { background: var(--danger); color: var(--on-accent); }
/* The pack, as adjusted before it's sent */
.cr-pack { display: grid; gap: 4px; }
.cr-pack-head, .cr-pack-row { display: grid; grid-template-columns: 22px minmax(0, 1.4fr) minmax(0, 1fr) 150px 28px; gap: var(--sp-2); align-items: center; }
.cr-pack-row.off { opacity: .5; }
.cr-pack-row.off [data-ptitle] { text-decoration: line-through; }
@media (max-width: 640px) { .cr-pack-head { display: none; } .cr-pack-row { grid-template-columns: 22px minmax(0, 1fr) 28px; } .cr-pack-row [data-ptype], .cr-pack-row [data-pdue] { grid-column: 2 / 3; } }
.cr-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line-accent); border-radius: var(--r-md); background: var(--accent-bg); position: sticky; top: var(--sp-2); z-index: var(--z-sticky); }

/* KPIs on the project's banner and milestones from the checklist (kpi-ui.js); frosted tiles like the guide rail */
.kpi-strip { display: flex; flex-wrap: wrap; align-items: stretch; gap: var(--sp-2); margin-top: var(--sp-4); }
.kpi-strip > .kpi-tile, .kpi-strip > .kpi-next { flex: 1 1 150px; max-width: 280px; }
.kpi-tile, .kpi-next { display: grid; gap: 3px; align-content: start; min-width: 0; padding: var(--sp-3); border: 0; border-radius: var(--r-lg); background: rgba(255, 255, 255, 0.9); color: var(--stage-ink); text-align: left; cursor: pointer; text-decoration: none; transition: transform var(--t-fast) var(--ease-out); }
.kpi-tile:hover, .kpi-next:hover { transform: translateY(-1px); }
.kpi-k { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--stage-ink-2); font-weight: var(--fw-medium); }
.kpi-k svg { width: 12px; height: 12px; }
.kpi-live { padding: 0 5px; border-radius: var(--r-pill); background: var(--stage-accent-bg); color: var(--stage-link); font-size: var(--fs-3xs); }
.kpi-v { font-size: var(--fs-xl); font-weight: var(--fw-semibold); line-height: var(--lh-tight); }
.kpi-t { font-size: var(--fs-sm); font-weight: var(--fw-regular); color: var(--stage-ink-2); }
.kpi-s { font-size: var(--fs-xs); color: var(--stage-ink-2); }
.kpi-bar { display: block; height: 5px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--stage-ink) 10%, transparent); overflow: hidden; }
.kpi-bar i { display: block; height: 100%; border-radius: inherit; background: var(--cta-1, var(--accent)); }
.kpi-tile.hit .kpi-bar i { background: var(--ok); }
.kpi-next b { font-size: var(--fs-md); }
.kpi-next.s-late .kpi-s { color: var(--danger); font-weight: var(--fw-semibold); }
.kpi-next.s-soon .kpi-s { color: var(--warn-strong); }
.kpi-add { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: var(--sp-2) var(--sp-3); border: 1px dashed rgba(255, 255, 255, 0.6); border-radius: var(--r-lg); background: rgba(255, 255, 255, 0.12); color: var(--on-stage); font-size: var(--fs-sm); cursor: pointer; }
.kpi-add.icon { flex: 0 0 44px; align-self: stretch; padding: 0; }
.kpi-add.icon svg { width: 16px; height: 16px; }
/* 2026-10-29: "Track a KPI" beside the milestone tile: a labelled button as tall as the tile, never squeezed */
.kpi-add.label { flex: 0 0 auto; align-self: stretch; justify-content: flex-start; gap: var(--sp-2); min-width: 168px; padding: var(--sp-3) var(--sp-4); text-align: left; white-space: nowrap; }
.kpi-add.label svg { width: 18px; height: 18px; flex: 0 0 auto; padding: 5px; box-sizing: content-box; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.18); }
.kpi-add.label > span { display: grid; gap: 1px; line-height: var(--lh-tight); }
.kpi-add.label b { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.kpi-add.label > span > span { font-size: var(--fs-xs); opacity: 0.8; }
.kpi-tile.err .kpi-s { color: var(--danger); }
.kpi-linkbox { margin-top: var(--sp-3); padding: var(--sp-3); border-radius: var(--r-md); background: var(--surface-hover); }
.kpi-edit-extra { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: var(--sp-2); }
.kpi-edit-hint { grid-column: 1 / -1; margin: 0; }
.kpi-edit-hint a { word-break: break-all; }
.kpi-add:hover { background: rgba(255, 255, 255, 0.22); }
.kpi-hist { display: grid; gap: 6px; max-height: 240px; overflow: auto; }
.kpi-edit { display: grid; gap: 6px; }
.kpi-edit-head, .kpi-edit-row { display: grid; grid-template-columns: minmax(0, 1.5fr) 90px 90px minmax(0, 1.4fr) 90px 28px; gap: var(--sp-2); align-items: center; }
@media (max-width: 720px) { .kpi-edit-head { display: none; } .kpi-edit-row { grid-template-columns: 1fr 1fr 28px; } .kpi-edit-row [data-k=label], .kpi-edit-row [data-k=source] { grid-column: 1 / 3; } }
.ms-track { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.ms-item { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: var(--sp-2); position: relative; padding: 6px 0 10px; }
.ms-item:not(:last-child)::before { content: ""; position: absolute; left: 10px; top: 26px; bottom: -4px; width: 2px; background: var(--line); }
.ms-dot { display: grid; place-items: center; width: 22px; height: 22px; border-radius: var(--r-pill); border: 2px solid var(--line-2); background: var(--surface); color: var(--accent); font-size: var(--fs-xs); z-index: 1; }
.ms-dot svg { width: 12px; height: 12px; }
.ms-item.s-done .ms-dot { background: var(--ok); border-color: var(--ok); color: var(--on-accent); }
.ms-item.s-late .ms-dot { border-color: var(--danger); }
.ms-item.s-soon .ms-dot { border-color: var(--warn); }
.ms-item.next .ms-dot { box-shadow: 0 0 0 4px var(--accent-bg); border-color: var(--accent); }
.ms-body { display: grid; gap: 3px; min-width: 0; }
.ms-body .kpi-bar { background: var(--surface-sunken); max-width: 260px; }
.ms-body .kpi-bar i { background: var(--accent); }
.ms-state { color: var(--ink-3); white-space: nowrap; }
.s-late .ms-state { color: var(--danger); font-weight: var(--fw-semibold); }
.s-done .ms-state { color: var(--ok-strong); }
.pc-attn { margin-top: 2px; }

/* Submit designs, review mode and the delivery link (creative-flow-ui.js) */
.sd-list { display: grid; gap: 6px; max-height: 46vh; overflow: auto; }
.sd-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1.3fr) 28px; gap: var(--sp-2); align-items: center; }
.sd-row.off { opacity: .6; }
.sd-thumb { width: 44px; height: 44px; border-radius: var(--r-sm); background: var(--surface-sunken); display: grid; place-items: center; overflow: hidden; color: var(--ink-3); }
.sd-thumb img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) { .sd-row { grid-template-columns: 44px minmax(0, 1fr) 28px; } .sd-row select { grid-column: 2 / 3; } }
.kcard.filedrop { outline: 2px dashed var(--accent); outline-offset: 2px; background: var(--accent-bg); }
.crv { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--surface); }
.crv-load { display: grid; place-items: center; height: 100%; grid-row: 1 / -1; }
.crv-top { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-4); border-bottom: 1px solid var(--line); }
.crv-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-height: 0; }
.crv-stage { display: grid; place-items: center; min-height: 0; padding: var(--sp-4); background: var(--surface-sunken); }
.crv-stage img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: var(--shadow-md); }
.crv-stage iframe { width: 100%; height: 100%; border: 0; border-radius: var(--r-sm); background: var(--surface); }
.crv-none { display: grid; gap: var(--sp-2); justify-items: center; }
.crv-side { padding: var(--sp-4); overflow: auto; border-left: 1px solid var(--line); }
.crv-strip { display: flex; flex-wrap: wrap; gap: 6px; }
.crv-acts { display: grid; gap: var(--sp-2); }
.crv-acts .btn { justify-content: center; }
.crv-th { width: 52px; height: 52px; padding: 0; border: 2px solid transparent; border-radius: var(--r-sm); background: var(--surface-sunken); overflow: hidden; cursor: pointer; display: grid; place-items: center; }
.crv-th.on { border-color: var(--accent); }
.crv-th img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .crv-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; } .crv-side { border-left: 0; border-top: 1px solid var(--line); max-height: 48vh; } }
.dlv-jobs { display: grid; gap: 4px; max-height: 40vh; overflow: auto; padding: var(--sp-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.dlv-job { display: flex; align-items: center; gap: var(--sp-2); padding: 4px 6px; border-radius: var(--r-sm); cursor: pointer; min-width: 0; }
.dlv-job:hover { background: var(--surface-hover); }
.dlv-job.auto { cursor: default; }
.dlv-link { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.dlv-link .input { min-width: 220px; }

/* ---------------------------------------------------------------- installed app (2026-10-24)
   core/install.js, docs/install-app.md. viewport-fit=cover lets the page reach the screen's edges,
   so nothing sits under an iPhone's home indicator or, sideways, its notch (env() is 0 elsewhere). */
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.content { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
.toasts { bottom: calc(18px + env(safe-area-inset-bottom)); }
.drawer { bottom: calc(10px + env(safe-area-inset-bottom)); }
.backdrop { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
.side { padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom)); }
.app-nudge { background: var(--surface); border-color: var(--line); }
.app-nudge > img { width: 32px; height: 32px; border-radius: var(--r-sm); flex: none; }
.install-steps { margin: 0 0 var(--sp-3); padding-left: 22px; display: grid; gap: var(--sp-2); }
.install-steps svg { width: 16px; height: 16px; vertical-align: -3px; }
.push-hint { display: flex; align-items: center; gap: var(--sp-2); margin: 0 4px var(--sp-2); padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-muted); font-size: var(--fs-sm); }
.push-hint > svg { width: 16px; height: 16px; flex: none; color: var(--accent); }

/* ---------------------------------------------------------------- round 37 (2026-10-26) */
/* A campaign and its parts (or an event and the work made from it): one strip of tabs across the top of each of their
   pages, the one on screen lit, each with its checklist's progress (project.js famStrip) */
.fam-strip { display: flex; align-items: stretch; gap: 6px; margin: 0 0 var(--sp-4); padding: 4px; border-radius: var(--r-md); background: var(--surface-sunken); overflow-x: auto; scrollbar-width: thin; }
.fam-tab { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 300px; flex: 0 0 auto; padding: 6px 12px 6px 10px; border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none !important; border: 1px solid transparent; transition: background var(--t-fast) var(--ease-std), border-color var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std); }
.fam-tab:hover { background: var(--surface); color: var(--ink); }
.fam-tab.on { background: var(--surface); color: var(--ink); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); box-shadow: inset 0 -3px 0 var(--c), var(--pop); }
.fam-tab .chip-ico { margin-left: 0; }
.fam-t { display: grid; min-width: 0; line-height: var(--lh-snug); }
.fam-t b { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.fam-t small { display: flex; align-items: center; gap: 6px; font-size: var(--fs-2xs); color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.fam-tab.root .fam-t b { font-weight: var(--fw-bold); }
.fam-bar { display: inline-block; width: 38px; height: 4px; border-radius: var(--r-pill); background: var(--surface-muted); overflow: hidden; }
.fam-bar > i { display: block; height: 100%; background: var(--c); border-radius: inherit; }
.fam-sep { display: grid; place-items: center; color: var(--ink-4); flex: none; }
.fam-sep svg { width: 14px; height: 14px; }
.chip-ico.sm { width: 16px; height: 16px; flex-basis: 16px; margin: 0 6px 0 0; vertical-align: -3px; }
.chip-ico.sm svg { width: 10px; height: 10px; }
/* Projects: a campaign's parts under it (projects.js nestParts) */
.part-fold { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 0 7px 0 3px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-3); font: inherit; font-size: var(--fs-2xs); font-weight: var(--fw-semibold); cursor: pointer; vertical-align: 0; }
.part-fold:hover { color: var(--ink); border-color: var(--line-hover); }
.part-fold svg { width: 12px; height: 12px; }
.part-dot { width: 7px; height: 7px; border-radius: var(--r-pill); background: var(--c); display: inline-block; margin-right: -1px; }
.prow-parts { display: grid; gap: 4px; margin: -2px 0 6px 22px; padding-left: 14px; border-left: 2px solid var(--line); }
.prow.part { padding-top: 6px; padding-bottom: 6px; box-shadow: none; background: color-mix(in srgb, var(--glass-card) 70%, transparent); }
.prow.part .name { font-size: var(--fs-sm); }
.part-hook { justify-self: center; width: 18px; height: 14px; border-left: 2px solid var(--line-2); border-bottom: 2px solid var(--line-2); border-bottom-left-radius: 8px; translate: 0 -6px; }
.pc-parts { display: grid; gap: 4px; padding: 6px; border-radius: var(--r-sm); background: var(--surface-sunken); }
.pc-part { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 6px; border-radius: var(--r-xs); color: var(--ink); font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-decoration: none !important; }
.pc-part:hover { background: var(--surface); }
.pc-part .stage { flex: none; transform: scale(0.9); transform-origin: right center; }
/* Checklist: the family line, and the bulk bar that stays in view while tasks are picked */
.cl-family { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: var(--sp-3); padding: 8px 12px; border-radius: var(--r-sm); background: var(--surface-sunken); }
.cl-family > svg { width: 14px; height: 14px; color: var(--ink-3); }
.cl-fam-link { display: inline-flex; align-items: center; gap: 2px; padding: 2px 10px 2px 6px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-decoration: none !important; }
.cl-fam-link:hover { border-color: color-mix(in srgb, var(--c) 50%, var(--line)); }
.cl-bulkbar { position: sticky; bottom: 14px; z-index: var(--z-sticky); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: var(--sp-3); padding: 10px 12px; border-radius: var(--r-md); background: var(--glass-overlay); -webkit-backdrop-filter: var(--glass-blur-lg); backdrop-filter: var(--glass-blur-lg); border: 1px solid var(--glass-line); box-shadow: var(--shadow-lg); animation: pop-in var(--t-med) var(--ease-out) both; }
.cl-bulkbar[hidden] { display: none; }
.cl-bulk-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-width: 0; }
.cl-bulk-pick b { font-size: var(--fs-sm); }
.cl-bulk-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.cbx.pick.sm { width: 18px; height: 18px; flex: none; }
.cbx.pick.some { border-color: var(--accent); background: linear-gradient(var(--accent), var(--accent)) center / 8px 2px no-repeat, var(--surface); }
.cl-item.just-changed { animation: cl-flash 1.3s var(--ease-std); }
@keyframes cl-flash { 0%, 40% { background: var(--surface-selected); border-color: var(--accent); } 100% { background: var(--surface); } }
@media (prefers-reduced-motion: reduce) { .cl-item.just-changed { animation: none; box-shadow: inset 3px 0 0 var(--accent); } .cl-bulkbar { animation: none; } }
@media (max-width: 640px) { .fam-tab { max-width: 220px; } .prow-parts { margin-left: 8px; padding-left: 8px; } .cl-bulkbar { bottom: 8px; } }
/* the strip on the project's night header: frosted tabs, the one on screen solid white with its own ink */
.phead .fam-strip { background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.phead .fam-tab { color: var(--on-stage); }
.phead .fam-tab:hover { background: rgba(255, 255, 255, 0.16); color: var(--on-stage); }
.phead .fam-tab small { color: rgba(255, 255, 255, 0.72); }
.phead .fam-tab.on { background: rgba(255, 255, 255, 0.94); color: var(--stage-ink); border-color: transparent; box-shadow: inset 0 -3px 0 var(--c), 0 10px 24px -14px rgba(0, 0, 0, 0.5); }
.phead .fam-tab.on small { color: var(--stage-ink-3); }
.phead .fam-tab .fam-bar { background: rgba(255, 255, 255, 0.28); }
.phead .fam-tab.on .fam-bar { background: rgba(0, 0, 0, 0.1); }
.phead .fam-sep { color: rgba(255, 255, 255, 0.6); }
.phead .fam-tab .chip-ico { background: rgba(255, 255, 255, 0.92); color: var(--c); }
/* Social: Plan a series as a planner (social-ui.js seriesModal) and a page's sections (the page mockup's editor) */
.soc-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.soc-plan { display: grid; gap: 2px; padding: 8px 10px; text-align: left; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; transition: border-color var(--t-fast) var(--ease-std), background var(--t-fast) var(--ease-std); }
.soc-plan b { font-size: var(--fs-sm); }
.soc-plan span { font-size: var(--fs-2xs); color: var(--ink-3); }
.soc-plan:hover { border-color: var(--line-hover); }
.soc-plan.on { border-color: var(--accent); background: var(--accent-bg); box-shadow: var(--ring); }
.soc-beat.off { opacity: 0.55; }
.soc-beat-more summary { cursor: pointer; color: var(--ink-3); }
.soc-sections { display: grid; gap: 8px; }
.soc-secrow { display: grid; gap: 6px; padding: 10px; border-radius: var(--r-sm); background: var(--surface-sunken); }
.soc-secrow select { width: auto; }
.soc-series .soc-beat { grid-template-columns: minmax(0, 1fr); }
.soc-series .soc-beat > .row > input[data-btitle] { flex: 1 1 200px; width: auto; }
.soc-series .soc-beat > .row :is(input[type="number"], input[type="time"], select) { width: auto; }
.soc-series .soc-beat > .row > input[type="checkbox"] { flex: none; }
/* Round 38: a quotation line's cost rows (quotation.js costPanel), Fix expenses' rows, the budget breakdown's rows */
.qc-btn { display: flex; align-items: center; gap: 4px; width: 100%; min-height: 28px; padding: 4px 6px; border: 1px solid var(--line-2); border-radius: var(--r-xs); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; text-align: right; cursor: pointer; }
.qc-btn svg { width: 14px; height: 14px; color: var(--ink-3); flex: none; }
.qc-btn:hover { border-color: var(--accent); }
.qc-btn.on { border-color: var(--accent); background: var(--accent-bg); }
.qc-btn.margin-low .grow { color: var(--danger); }
.qc-split { align-self: flex-end; }
.ql-costs { margin: 0 8px 8px 36px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-sm); background: var(--surface-sunken); overflow-x: auto; }
.qc-in { min-width: 880px; padding: 8px; display: grid; gap: 4px; }
.qc-grid { display: grid; grid-template-columns: minmax(180px, 1fr) 64px 80px 56px 120px 116px 84px minmax(110px, 0.6fr) 28px; gap: 6px; align-items: center; font-size: var(--fs-sm); }
.qc-grid input, .qc-grid select { width: 100%; min-height: 28px; padding: 4px 6px; border: 1px solid var(--line); border-radius: var(--r-xs); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-sm); }
.qc-grid input:focus, .qc-grid select:focus { border-color: var(--accent); outline: none; box-shadow: var(--ring); }
.qc-grid input.n { text-align: right; font-variant-numeric: tabular-nums; }
.qc-grid .amt { text-align: right; font-variant-numeric: tabular-nums; padding: 4px 6px; }
.qc-head { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--ink-3); }
.qc-head span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.qc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.xp-grp td { background: var(--surface-selected); }
.xp-sub td:first-child { padding-left: var(--sp-6); }
.doc-tbl tr.grp td { font-weight: var(--fw-bold); }
.doc-tbl tr.row-sub td:first-child { padding-left: 14px; }
.ca-tie { width: 100%; min-width: 150px; max-width: 240px; }
/* Round 38: the budget per line on a project's Finance tab (budget-ui.js) */
.bl-tbl td { vertical-align: top; }
.bl-tbl tr.bl-sec td { background: var(--surface-sunken); padding-top: 8px; padding-bottom: 8px; }
.bl-tbl tr.bl-item td { padding-top: 8px; padding-bottom: 2px; border-bottom: 0; }
.bl-tbl tr.bl-row.sub td:first-child { padding-left: var(--sp-6); }
.bl-tbl tr.bl-logrow td { background: var(--surface-sunken); padding-top: 4px; }
.bl-via { white-space: nowrap; }
.bl-via.v-ca, .bl-via.v-gfb { background: var(--warn-bg); color: var(--warn-strong); }
.bl-logs { display: grid; gap: 4px; }
.bl-log { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); min-width: 0; }
.bl-log svg { width: 14px; height: 14px; color: var(--ink-3); flex: none; }
.bl-log .muted { min-width: 0; }
/* Round 39: a bank entry's photos open in the viewer on the page (bank.js), and a venue's layouts */
.bk-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.bk-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 120px), 1fr)); gap: 6px; }
.bk-ph { position: relative; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-sunken); cursor: zoom-in; }
.bk-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bk-ph:hover, .bk-ph:focus-visible { border-color: var(--accent); }
.bk-doc { display: grid; place-items: center; gap: 4px; height: 100%; padding: 6px; color: var(--ink-3); }
.bk-doc small { font-size: var(--fs-2xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.bk-badge { position: absolute; left: 4px; top: 4px; padding: 1px 6px; border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); font-size: var(--fs-2xs); font-weight: var(--fw-bold); box-shadow: var(--shadow-sm); }
.bk-lay { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bk-lay li { display: flex; align-items: center; gap: 10px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.bk-lay img, .bk-lay-ic { width: 56px; height: 42px; flex: none; border-radius: var(--r-xs); object-fit: cover; background: var(--surface-sunken); display: grid; place-items: center; color: var(--ink-3); }
.lb-cap .btn { color: inherit; }
/* Round 39: the Budget card's figures and its folded sections (budget-ui.js) */
.bl-line { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-2); }
.bl-tbl tr.bl-sec { cursor: pointer; }
.bl-tbl tr.bl-sec:hover td, .bl-tbl tr.bl-sec:focus-visible td { background: var(--surface-selected); }
.bl-caret { display: inline-flex; vertical-align: -2px; margin-right: 4px; color: var(--ink-3); }
.bl-caret svg { width: 14px; height: 14px; }
/* Round 39: the hotel search by name (travel-ui.js hotelsModal), the trip's headcount */
.fare.hotel.sold-out { opacity: 0.6; }
.fare.hotel.asked { border-color: var(--accent); box-shadow: var(--ring); }
.fare-price .badge { display: inline-block; margin-bottom: 2px; }
.trip-headcount { align-items: center; flex-wrap: wrap; }
/* Round 39: a signature pad (core/signature-pad.js) and our signature on a quotation */
.sigpad { display: grid; gap: 8px; }
.sig-draw { position: relative; }
.sig-draw canvas { width: 100%; max-width: 600px; aspect-ratio: 3 / 1; border: 1px dashed var(--line-2); border-radius: var(--r-md); background: var(--surface); touch-action: none; cursor: crosshair; display: block; }
.sig-draw .link-btn { position: absolute; right: 8px; top: 6px; }
.sig-hands { display: grid; gap: 6px; margin-top: 8px; }
.sig-hand { padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-size: var(--fs-3xl); text-align: left; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sig-hand.on { border-color: var(--accent); box-shadow: var(--ring); }
.sig-preview, .sig-saved img { max-height: 90px; max-width: 100%; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px; }
.sig-saved { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sig-badge { cursor: pointer; border: 0; }
.bl-tbl td:first-child, .bl-tbl th:first-child { min-width: 240px; }
.bl-secsub { padding-left: 22px; }

/* Bank entries' Google Drive & other links (2026-10-27) */
.bk-links { list-style: none; margin: 0; padding: 0; }
.bk-links li { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) 0; border-top: 1px solid var(--line); min-width: 0; }
.bk-links li:first-child { border-top: 0; }

/* A subtask's own subtasks (2026-10-27): one more step in each level */
.cl-item.sub.d2 { margin-left: 68px; }
.cl-item.sub.d2::before { left: -20px; }
@media (max-width: 720px) { .cl-item.sub.d2 { margin-left: 50px; } }

/* New payment request: the project's quotations to pick from (2026-10-27) */
.pr-quos { display: grid; gap: var(--sp-2); }
.pr-quo { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; min-width: 0; }
.pr-quo:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); }

/* Quotation editor: Lines / Breakdown (2026-10-27) */
.qe-viewbar { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--line); background: var(--surface); }
.ql-costs.stub .qc-stub { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-style: dashed; }
.ql-costs.stub .qc-stub svg { width: 15px; height: 15px; color: var(--ink-3); flex: none; }
/* the unit columns held "campa…": wide enough for "campaign" and "months" */
.ql { --qcost: 210px; grid-template-columns: 28px minmax(220px, 1fr) 120px 64px 88px 56px 88px 124px var(--qcost) 28px; }
.qe-lines.no-freq .ql { grid-template-columns: 28px minmax(220px, 1fr) 120px 64px 88px 124px var(--qcost) 28px; }
.qe-lines.no-cost .ql { --qcost: 0px; }
/* 2026-10-28: a line is one row: the cost, its split and Break down side by side (they were stacked, three
   rows a line); the "line total?" note and the vendor go under only when there is one */
.ql-cost { display: grid; grid-template-columns: minmax(0, 1fr) 86px 26px; gap: 4px; align-items: start; min-width: 0; }
.ql-cost > .tiny, .ql-cost > .ql-costnote { grid-column: 1 / -1; }
.ql-cost .qc-split { width: 26px; height: 28px; padding: 0; color: var(--ink-3); }
.ql-cost .qc-split svg { width: 14px; height: 14px; }
.ql.section > .tiny { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the details card leads with what changes per quotation; the rest folds under "Quotation settings" */
.qe-meta { display: flex; flex-direction: column; gap: var(--sp-3); }
.qe-essentials { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1280px) { .qe-essentials { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .qe-essentials { grid-template-columns: minmax(0, 1fr); } }
.qe-settings { border-top: 1px solid var(--line); padding-top: var(--sp-3); }
.qe-settings > summary { display: flex; align-items: center; gap: var(--sp-3); cursor: pointer; list-style: none; min-width: 0; }
.qe-settings > summary::-webkit-details-marker { display: none; }
.qe-settings > summary > .strong { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.qe-settings > summary svg { width: 15px; height: 15px; }
.qe-settings > summary::after { content: ""; margin-left: auto; flex: none; width: 8px; height: 8px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); rotate: 45deg; translate: 0 -2px; transition: rotate var(--t-fast) var(--ease-std); }
.qe-settings[open] > summary::after { rotate: 225deg; translate: 0 2px; }
.qe-settings[open] [data-setsum] { display: none; }

/* Client blasts: the clients to pick (2026-10-27) */
.aud-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 4px var(--sp-3); max-height: 42vh; overflow: auto; padding: var(--sp-2); border: 1px solid var(--line); border-radius: var(--r-md); }

/* Questions on lines (2026-10-27) */
.marks-card.has-open { border-color: var(--warn-solid); }
.mark { padding: var(--sp-3) 0; border-top: 1px solid var(--line); }
.mark:first-of-type { border-top: 0; }
.mark.flash { animation: qc-flash 1.6s var(--ease-out); }
.mark-thread { display: grid; gap: var(--sp-2); margin-top: var(--sp-2); }
.mark-msg { padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--surface-sunken); max-width: 92%; }
.mark-msg.pic { margin-left: auto; background: var(--accent-bg); }
.mark-tag { display: inline-flex; align-items: center; gap: 3px; margin-left: var(--sp-2); padding: 1px 7px; border: 1px solid var(--warn-solid); border-radius: var(--r-pill); background: var(--warn-bg); color: var(--ink); font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-semibold); cursor: pointer; vertical-align: middle; white-space: nowrap; }
.mark-tag svg { width: 12px; height: 12px; }
.mark-tag.answered { border-color: var(--accent); background: var(--accent-bg); }
@media (prefers-reduced-motion: reduce) { .mark.flash { animation: none; } }
/* Questions for the PIC, made simpler (2026-10-27): an Ask button on the line, one reply box */
.marks-hint { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border: 1px dashed var(--line-2); border-radius: var(--r-md); color: var(--ink-2); font-size: var(--fs-sm); }
.marks-hint svg { width: 16px; height: 16px; flex: none; color: var(--accent); }
.mark-reply { display: flex; align-items: flex-start; gap: var(--sp-2); margin-top: var(--sp-2); flex-wrap: wrap; }
.mark-reply textarea { flex: 1 1 260px; min-height: 36px; }
.ask-btn { display: inline-flex; align-items: center; gap: 3px; margin-top: 4px; padding: 1px 8px; border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-semibold); cursor: pointer; white-space: nowrap; }
.ask-btn svg { width: 12px; height: 12px; }
.ask-btn:hover { border-color: var(--accent); color: var(--accent-ink); }

/* The copy as its own step of a creative job (2026-10-27) */
.cj-copy { margin-top: var(--sp-3); border: 1px solid var(--warn-solid); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.cj-copy.done { border-color: var(--line); }
.cj-copy-head { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; padding: var(--sp-2) var(--sp-3); background: var(--warn-bg); }
.cj-copy.done .cj-copy-head { background: var(--ok-bg); }
.cj-copy-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); font-size: var(--fs-xs); font-weight: var(--fw-semibold); flex: none; }
.cj-copy-n svg { width: 13px; height: 13px; color: var(--ok-strong); }
.cj-copy-body { display: grid; gap: var(--sp-2); padding: var(--sp-3); }
.cj-copy-body .row svg { width: 14px; height: 14px; }
.kc-copy { display: inline-flex; align-items: center; gap: 3px; padding: 0 7px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: var(--fw-semibold); background: var(--warn-bg); color: var(--warn-strong); white-space: nowrap; }
.kc-copy.ready { background: var(--ok-bg); color: var(--ok-strong); }
.kc-copy svg { width: 11px; height: 11px; }
.cr-copylane { margin-bottom: var(--sp-4); padding: var(--sp-3); border: 1px solid var(--warn-solid); border-radius: var(--r-lg); background: var(--surface); }
.cr-copylane-head { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-2); }
.cr-copylane-head svg { width: 16px; height: 16px; color: var(--warn-strong); }
.cr-copylane .cr-urgent-row { margin: 0; }
.cr-pack.copy .cr-pack-head, .cr-pack.copy .cr-pack-row { grid-template-columns: 22px minmax(0, 1.4fr) minmax(0, 1fr) 150px 56px 28px; }
.cr-pack-copy { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); white-space: nowrap; }
@media (max-width: 640px) { .cr-pack.copy .cr-pack-row { grid-template-columns: 22px minmax(0, 1fr) 28px; } .cr-pack.copy .cr-pack-row .cr-pack-copy { grid-column: 2 / 3; } }

/* Recurring tasks (2026-10-27): today's tick and the last two weeks per person */
.rt-card { margin-bottom: var(--sp-4); padding: var(--sp-3) var(--sp-4); }
.rt-head { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-2); }
.rt-head b { display: inline-flex; align-items: center; gap: var(--sp-2); }
.rt-head b svg { width: 15px; height: 15px; color: var(--accent); }
.rt-list { display: grid; grid-template-columns: minmax(0, 1fr); }
.rt-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 28px; align-items: center; gap: var(--sp-3); padding: var(--sp-2) 0; border-top: 1px solid var(--line); }
.rt-row:first-child { border-top: 0; }
.rt-row.stopped { opacity: .6; }
.rt-tick { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--line-2); border-radius: 50%; background: var(--surface); color: transparent; cursor: pointer; transition: background var(--t-fast) var(--ease-std), border-color var(--t-fast) var(--ease-std); }
.rt-tick svg { width: 15px; height: 15px; }
.rt-tick:hover { border-color: var(--ok-solid); color: var(--ok-solid); }
.rt-tick.on { border-color: var(--ok-solid); background: var(--ok-solid); color: var(--surface); }
.rt-tick.off { border-style: dashed; color: var(--ink-3); cursor: default; }
.rt-tick.off:hover { border-color: var(--line-2); color: var(--ink-3); }
.rt-title { font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.rt-people { display: grid; gap: 4px; justify-items: end; }
.rt-person { display: flex; align-items: center; gap: var(--sp-2); }
.rt-strip { display: flex; gap: 2px; }
.rt-d { display: inline-block; width: 8px; height: 14px; border-radius: var(--r-2xs); background: var(--surface-sunken); }
.rt-d.done { background: var(--ok-solid); }
.rt-d.late { background: var(--ok-solid); opacity: .5; }
.rt-d.miss { background: var(--danger-solid); }
.rt-d.today { background: var(--accent); opacity: .35; }
.rt-d.skip { background: repeating-linear-gradient(45deg, var(--ink-3) 0 1.5px, transparent 1.5px 4px); }
.rt-d.off { background: var(--surface-sunken); opacity: .5; }
.rt-mini { display: inline-grid; place-items: center; width: 14px; height: 14px; border: 1.5px solid var(--line-2); border-radius: 50%; }
.rt-mini.on { border-color: var(--ok-solid); background: var(--ok-solid); color: var(--surface); }
.rt-mini svg { width: 9px; height: 9px; }
.rt-legend { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-2); }
.rt-legend span { display: inline-flex; align-items: center; gap: 4px; }
.rt-days { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
@media (max-width: 640px) { .rt-row { grid-template-columns: 32px minmax(0, 1fr) 28px; } .rt-people { grid-column: 2 / 3; justify-items: start; } }
@media (prefers-reduced-motion: reduce) { .rt-tick { transition: none; } }


.ql.q-open { box-shadow: inset 4px 0 0 var(--warn-solid); background: var(--warn-bg); }
.ql.q-answered { box-shadow: inset 4px 0 0 var(--accent); background: var(--accent-bg); }
[data-line]:has(.mark-tag:not(.answered)), .poe-item:has(.mark-tag:not(.answered)) { box-shadow: inset 4px 0 0 var(--warn-solid); }
[data-line]:has(.mark-tag.answered), .poe-item:has(.mark-tag.answered) { box-shadow: inset 4px 0 0 var(--accent); }
.mark-pop { display: grid; gap: var(--sp-2); padding: var(--sp-3); }
.mark-pop-head { display: flex; align-items: center; gap: var(--sp-2); }
.mark-pop-head svg { width: 15px; height: 15px; color: var(--accent); flex: none; }
.mark-pop .mark-thread { max-height: 260px; overflow: auto; margin: 0; }
.ql.flash, [data-line].flash, .poe-item.flash { animation: qc-flash 1.6s var(--ease-out); }
.budget-ideas li.fits .link-btn { font-weight: var(--fw-semibold); }
.budget-ideas li.fits svg { width: 13px; height: 13px; margin-right: 4px; color: var(--ok-strong); vertical-align: -2px; }
@media (prefers-reduced-motion: reduce) { .ql.flash, [data-line].flash, .poe-item.flash { animation: none; } }

/* ==========================================================================
   The itinerary (2026-10-28, itinerary-ui.js tripStory()): the printed PDF and the shared plan /trip?t=…
   A cover with the route, flights as boarding passes, the hotel card, the days as a timeline with the agenda.
   ========================================================================== */
.ip { color: var(--trip-ink); font-family: var(--font-body); display: flex; flex-direction: column; gap: var(--sp-3); }
.ip svg { width: 15px; height: 15px; flex: 0 0 auto; }
.ip-hero { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 22px 24px 20px; background: var(--trip-sky); color: var(--trip-white); break-inside: avoid; }
.ip-hero::after { content: ""; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: var(--trip-sun); opacity: 0.9; }
.ip-hero::before { content: ""; position: absolute; right: 90px; bottom: -70px; width: 160px; height: 160px; border-radius: 50%; background: var(--trip-coral); opacity: 0.85; }
.ip-hero > * { position: relative; z-index: 1; }
.ip-hero-k { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; opacity: 0.9; }
.ip-title { font-family: var(--font-display); font-size: var(--fs-3xl); line-height: var(--lh-tight); margin: 6px 0 14px; color: var(--trip-white); max-width: 70%; overflow-wrap: anywhere; }
.ip-route { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ip-route.stay { font-size: var(--fs-2xl); gap: 8px; } .ip-route.stay svg { width: 22px; height: 22px; }
.ip-end { display: flex; flex-direction: column; min-width: 0; }
.ip-end b { font-family: var(--font-display); font-size: var(--fs-display); line-height: var(--lh-none); letter-spacing: var(--ls-tight); }
.ip-end span { font-size: var(--fs-sm); opacity: 0.9; }
.ip-end.to { text-align: right; }
.ip-path { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 60px; max-width: 220px; }
.ip-path i { flex: 1; border-top: 2px dashed var(--trip-white); opacity: 0.7; }
.ip-path svg { width: 22px; height: 22px; }
.ip-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ip-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: var(--fw-semibold); background: var(--trip-sky-soft); color: var(--trip-ink); }
.ip-hero .ip-chip { background: var(--trip-white); color: var(--trip-ink); }
.ip-hero .ip-chip.ev { background: var(--trip-ink); color: var(--trip-white); }
.ip-chips.sm .ip-chip { padding: 3px 8px; }
.ip-chip.in { background: var(--trip-mint-soft); } .ip-chip.out { background: var(--trip-coral-soft); }
.ip-h { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; font-family: var(--font-display); font-size: var(--fs-xl); color: var(--trip-ink); break-after: avoid; }
.ip-h small { margin-left: auto; font-family: var(--font-body); font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--trip-ink-2); }
.ip-hi { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-xs); color: var(--trip-white); }
.ip-hi.sky { background: var(--trip-sky); } .ip-hi.grape { background: var(--trip-grape); } .ip-hi.sun { background: var(--trip-sun); } .ip-hi.mint { background: var(--trip-mint); } .ip-hi.coral { background: var(--trip-coral); }
/* boarding passes */
.ip-passes { display: grid; gap: 10px; }
.ip-pass, .ip-stay { display: grid; grid-template-columns: minmax(0, 1fr) 150px; border: 1px solid var(--trip-line); border-radius: var(--r-md); background: var(--trip-paper); overflow: hidden; break-inside: avoid; }
.ip-pass-main { padding: 12px 16px; border-left: 5px solid var(--trip-sky); }
.ip-pass.idea .ip-pass-main { border-left-color: var(--trip-sun); } .ip-pass.held .ip-pass-main { border-left-color: var(--trip-grape); }
.ip-pass-top { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-xs); color: var(--trip-ink-2); font-weight: var(--fw-semibold); }
.ip-air { display: inline-flex; align-items: center; gap: 5px; } .ip-air svg { color: var(--trip-sky); }
.ip-run { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.ip-pt { display: flex; flex-direction: column; min-width: 70px; }
.ip-pt.to { text-align: right; }
.ip-pt b { font-family: var(--font-display); font-size: var(--fs-3xl); line-height: var(--lh-none); letter-spacing: var(--ls-tight); }
.ip-time { font-size: var(--fs-lg); font-weight: var(--fw-bold); color: var(--trip-sky); }
.ip-pt small { font-size: var(--fs-2xs); color: var(--trip-ink-2); }
.ip-fly { flex: 1; display: flex; align-items: center; gap: 4px; color: var(--trip-sky); }
.ip-fly i { flex: 1; border-top: 2px dotted var(--trip-line); }
.ip-who { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: var(--fs-xs); color: var(--trip-ink-2); }
.ip-stub { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 12px 14px; background: var(--trip-cream); border-left: 2px dashed var(--trip-line); text-align: center; }
.ip-stub::before, .ip-stub::after { content: ""; position: absolute; left: -9px; width: 16px; height: 16px; border-radius: 50%; background: var(--trip-white); border: 1px solid var(--trip-line); }
.ip-stub::before { top: -9px; } .ip-stub::after { bottom: -9px; }
.ip-stub small { font-size: var(--fs-3xs); text-transform: uppercase; letter-spacing: var(--ls-caps); color: var(--trip-ink-2); }
.ip-ref { font-family: var(--font-mono); font-size: var(--fs-xl); letter-spacing: var(--ls-wide); }
.ip-money { text-transform: none !important; letter-spacing: 0 !important; }
.ip-st { align-self: center; padding: 2px 10px; border-radius: var(--r-pill); font-size: var(--fs-2xs); font-weight: var(--fw-bold); background: var(--trip-sun-soft); color: var(--trip-ink); }
.ip-st.booked { background: var(--trip-mint-soft); color: var(--trip-mint); } .ip-st.held { background: var(--trip-grape-soft); color: var(--trip-grape); }
/* the hotel */
.ip-stay-main { display: flex; gap: 12px; padding: 14px 16px; border-left: 5px solid var(--trip-grape); }
.ip-stay-ic { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: var(--r-sm); background: var(--trip-grape-soft); color: var(--trip-grape); }
.ip-stay-ic svg { width: 20px; height: 20px; }
.ip-stay-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ip-stay-n { font-family: var(--font-display); font-size: var(--fs-xl); }
.ip-stay-a { font-size: var(--fs-xs); color: var(--trip-ink-2); }
.ip-rooms { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ip-room { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: var(--r-pill); background: var(--trip-grape-soft); font-size: var(--fs-xs); }
.ip-room b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--trip-grape); color: var(--trip-white); font-size: var(--fs-3xs); }
/* day by day */
.ip-days { display: grid; gap: 8px; }
.ip-day { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--trip-paper); border: 1px solid var(--trip-line); break-inside: avoid; }
.ip-day.ev { background: var(--trip-sun-soft); border-color: var(--trip-sun-soft); }
.ip-dn { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: var(--r-sm); background: var(--trip-sky); color: var(--trip-white); padding: 6px 0; align-self: start; }
.ip-day.ev .ip-dn { background: var(--trip-sun); }
.ip-dn small { font-size: var(--fs-3xs); text-transform: uppercase; letter-spacing: var(--ls-caps); opacity: 0.85; }
.ip-dn b { font-family: var(--font-display); font-size: var(--fs-2xl); line-height: var(--lh-none); }
.ip-dd { font-weight: var(--fw-bold); font-size: var(--fs-md); margin-bottom: 4px; }
.ip-day ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.ip-day li { display: grid; grid-template-columns: 44px 22px minmax(0, 1fr); align-items: start; gap: 8px; }
.ip-t { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--trip-ink-2); padding-top: 2px; }
.ip-dot { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--trip-white); background: var(--trip-sky); }
.ip-dot svg { width: 12px; height: 12px; }
.k-stay .ip-dot { background: var(--trip-grape); } .k-ev .ip-dot { background: var(--trip-coral); } .k-ag .ip-dot { background: var(--trip-sun); }
.ip-what { display: flex; flex-direction: column; min-width: 0; font-size: var(--fs-sm); }
.ip-what small { font-size: var(--fs-2xs); color: var(--trip-ink-2); }
.ip-free { display: flex; align-items: center; gap: 6px; margin: 0; font-size: var(--fs-sm); color: var(--trip-ink-2); }
/* people, extras, cost, help, notes */
.ip-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.ip-person { display: flex; gap: 8px; align-items: center; padding: 6px 10px 6px 6px; border-radius: var(--r-md); background: var(--trip-mint-soft); min-width: 0; break-inside: avoid; }
.ip-person i { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: var(--trip-mint); color: var(--trip-white); font-style: normal; font-size: var(--fs-2xs); font-weight: var(--fw-bold); }
.ip-person > div { display: flex; flex-direction: column; min-width: 0; }
.ip-person b { font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-person small { font-size: var(--fs-3xs); color: var(--trip-ink-2); }
.ip-cost { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 12px 16px; border-radius: var(--r-md); background: var(--trip-coral-soft); font-size: var(--fs-sm); break-inside: avoid; }
.ip-cost b { text-align: right; } .ip-cost .tot { padding-top: 6px; border-top: 1px solid var(--trip-line); font-weight: var(--fw-bold); font-size: var(--fs-lg); }
.ip-help { display: flex; flex-wrap: wrap; gap: 8px; }
.ip-help > div { display: flex; flex-direction: column; padding: 10px 14px; border-radius: var(--r-md); background: var(--trip-sky-soft); min-width: 180px; break-inside: avoid; }
.ip-help small { font-size: var(--fs-3xs); text-transform: uppercase; letter-spacing: var(--ls-caps); color: var(--trip-ink-2); }
.ip-help span { font-weight: var(--fw-semibold); color: var(--trip-sky); }
.ip-notes { padding: 12px 16px; border-radius: var(--r-md); background: var(--trip-sun-soft); font-size: var(--fs-sm); break-inside: avoid; }
/* on paper: a little tighter */
.doc-page.ip-print .ip { gap: 10px; }
.doc-page.ip-print .ip-hero { padding: 18px 20px 16px; }
.doc-page.ip-print .ip-h { font-size: var(--fs-lg); margin-top: 6px; }
@media (max-width: 560px) {
  .ip-pass, .ip-stay { grid-template-columns: minmax(0, 1fr); }
  .ip-stub { border-left: 0; border-top: 2px dashed var(--trip-line); flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; }
  .ip-stub::before, .ip-stub::after { display: none; }
  .ip-end b { font-size: var(--fs-4xl); }
  .ip-title { max-width: 100%; font-size: var(--fs-2xl); }
  .ip-hero::after { width: 130px; height: 130px; right: -50px; top: -50px; opacity: 0.55; }
  .ip-hero::before { display: none; }
  .ip-pt b { font-size: var(--fs-2xl); }
  .ip-day li { grid-template-columns: 40px 22px minmax(0, 1fr); }
}

/* What's new (2026-10-28, core/whatsnew.js) */
.wn { display: flex; flex-direction: column; gap: var(--sp-4); }
.wn-entry + .wn-entry { padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.wn-h { display: flex; align-items: baseline; gap: var(--sp-2); font-size: var(--fs-lg); margin: 0 0 var(--sp-2); }
.wn-h small { font-size: var(--fs-xs); font-weight: var(--fw-regular); color: var(--ink-3); }
.wn-group { margin-bottom: var(--sp-3); }
.wn-gh { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--ls-caps); padding: 3px 10px; border-radius: var(--r-pill); }
.wn-gh svg { width: 13px; height: 13px; }
.wn-gh.new { background: var(--accent-bg); color: var(--accent); }
.wn-gh.better { background: var(--ok-bg); color: var(--ok); }
.wn-group ul { list-style: none; margin: var(--sp-2) 0 0; padding: 0; display: grid; gap: var(--sp-2); }
.wn-i { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: var(--sp-3); font-size: var(--fs-md); line-height: var(--lh-normal); }
.wn-tag { align-self: start; justify-self: start; font-size: var(--fs-2xs); font-weight: var(--fw-semibold); color: var(--ink-2); background: var(--surface-sunken); padding: 2px 8px; border-radius: var(--r-pill); }
@media (max-width: 560px) { .wn-i { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* Fokus Target tools (2026-10-28, core/tools.js, views/tools.js): each tool in its own logo and colours */
.t-simak { --tc: var(--tool-simak); --tcs: var(--tool-simak-soft); } .t-tata { --tc: var(--tool-tata); --tcs: var(--tool-tata-soft); }
.t-catat { --tc: var(--tool-catat); --tcs: var(--tool-catat-soft); } .t-rsvp { --tc: var(--tool-rsvp); --tcs: var(--tool-rsvp-soft); }
.t-showdesk { --tc: var(--tool-showdesk); --tcs: var(--tool-showdesk-soft); }
.tool-logo { display: block; width: 32px; height: 32px; flex: 0 0 auto; border-radius: var(--r-xs); }
.tool-logo.sm { width: 22px; height: 22px; } .tool-logo.lg { width: 44px; height: 44px; } .tool-logo.xl { width: 60px; height: 60px; border-radius: var(--r-sm); box-shadow: var(--shadow-sm); }
/* the page */
.tools-hero { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-4); margin-bottom: var(--sp-5); padding: var(--sp-5) var(--sp-6); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.tools-hero h1 { margin: 0 0 4px; }
.tools-hero p { margin: 0; max-width: 560px; color: var(--ink-2); font-size: var(--fs-md); }
.tools-row { display: flex; gap: var(--sp-3); }
.tools-row a { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--ink-2); font-size: var(--fs-2xs); font-weight: var(--fw-semibold); transition: translate var(--t-fast) var(--ease-std); }
.tools-row a:hover { translate: 0 -3px; color: var(--ink); }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr)); gap: var(--sp-4); }
.tool-card { display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; scroll-margin-top: 80px; transition: box-shadow var(--t-fast) var(--ease-std), translate var(--t-fast) var(--ease-std); }
.tool-card:hover { box-shadow: var(--shadow-md); translate: 0 -2px; }
.tool-card:target, .tool-card.on { box-shadow: 0 0 0 3px var(--tcs), var(--shadow-md); border-color: var(--tc); }
.tool-ban { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-5); background: var(--tcs); border-bottom: 1px solid var(--line); }
.tool-ban h2 { margin: 0; font-size: var(--fs-2xl); letter-spacing: var(--ls-snug); }
.tool-tag { color: var(--ink-2); font-size: var(--fs-md); }
.tool-url { align-self: flex-start; margin-left: auto; padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); font-size: var(--fs-2xs); font-weight: var(--fw-semibold); text-decoration: none; white-space: nowrap; }
.tool-url:hover { color: var(--tc); }
.tool-body { display: flex; flex-direction: column; gap: var(--sp-4); padding: var(--sp-5); flex: 1; }
.tool-what { margin: 0; font-size: var(--fs-md); line-height: var(--lh-base); }
.tool-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-4); }
.tool-cols h3 { margin: 0 0 8px; font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: var(--ls-caps); color: var(--tc); }
.tool-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: var(--fs-sm); color: var(--ink-2); line-height: var(--lh-normal); }
.tool-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 6px; }
.tool-list svg { width: 14px; height: 14px; margin-top: 2px; color: var(--tc); }
.tool-foot { display: flex; align-items: center; gap: var(--sp-3); margin-top: auto; }
.tool-open { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--r-pill); background: var(--tc); color: var(--trip-white); font-weight: var(--fw-semibold); font-size: var(--fs-sm); text-decoration: none; }
.t-tata .tool-open { background: var(--tool-dark); }
.t-catat .tool-open { color: var(--tool-dark); }
.tool-open:hover { filter: brightness(1.06); }
.tool-open svg { width: 15px; height: 15px; }
/* the hints on other pages */
.tool-hint { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 var(--sp-3); padding: 8px 10px 8px 8px; border-radius: var(--r-md); background: var(--tcs); border: 1px solid var(--line); font-size: var(--fs-sm); color: var(--ink-2); }
.tool-hint .grow { min-width: 200px; }
.tool-hint b { color: var(--ink); }
.tool-hint .tool-go { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: var(--r-pill); background: var(--tc); color: var(--trip-white); font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-decoration: none; }
.t-tata .tool-go { background: var(--tool-dark); } .t-catat .tool-go { color: var(--tool-dark); }
.tool-hint .tool-go svg { width: 13px; height: 13px; }
@media (max-width: 560px) { .tool-cols { grid-template-columns: minmax(0, 1fr); } .tool-url { display: none; } .tools-hero { padding: var(--sp-4); } }
/* in the dark look the brand colours are lighter: dark text on them, and Tata's button in its orange */
[data-theme="dark"] .tool-open, [data-theme="dark"] .tool-hint .tool-go { color: var(--tool-dark); }
[data-theme="dark"] .t-tata .tool-open, [data-theme="dark"] .t-tata .tool-go { background: var(--tool-tata); }

/* A POE moment's shot list (2026-10-29): what to photograph, ticked from the phones */
.poe-shots { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 6px 0 2px; }
.poe-shots-k { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-2xs); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: var(--ls-caps); color: var(--ink-3); margin-right: 2px; }
.poe-shots-k svg { width: 13px; height: 13px; }
.poe-shot { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: var(--r-pill); border: 1px dashed var(--line-2); font-size: var(--fs-2xs); color: var(--ink-2); }
.poe-shot.ok { border-style: solid; border-color: var(--ok-bg); background: var(--ok-bg); color: var(--ok); }
.poe-shot svg { width: 11px; height: 11px; }


/* Events vs series & long events (2026-10-29): Home, the New project dialog's dates, the project card */
.sn-series { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--ink-2); }
.sn-series svg { width: 13px; height: 13px; }
.ev-row-h.live { background: var(--ok-bg-soft); border-radius: var(--r-sm); padding-left: 6px !important; padding-right: 6px !important; }
.ev-of { display: flex; align-items: center; gap: 4px; color: var(--accent); }
.ev-of svg { width: 12px; height: 12px; flex: none; }
.series-card { margin-top: var(--sp-4); }
.series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: var(--sp-3); }
.sr { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; min-width: 0; transition: border-color var(--t-fast) var(--ease-std), translate var(--t-fast) var(--ease-std); }
.sr:hover { border-color: var(--line-2); translate: 0 -2px; }
.sr-top { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: var(--fs-md); }
.sr-state { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ink); }
.sr-state.on { color: var(--ok); }
.sr-state svg { width: 14px; height: 14px; }
.sr-dots { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sr-dots i { width: 18px; height: 6px; border-radius: var(--r-pill); background: var(--surface-sunken); border: 1px solid var(--line); }
.sr-dots i.done { background: var(--accent); border-color: var(--accent); }
.sr-dots i.now { background: var(--ok); border-color: var(--ok); }
.sr-bar { height: 6px; border-radius: var(--r-pill); background: var(--surface-sunken); overflow: hidden; margin-top: 4px; }
.sr-bar i { display: block; height: 100%; background: var(--accent); border-radius: var(--r-pill); }
.when-seg button { display: inline-flex; align-items: center; gap: 6px; }
.when-seg svg { width: 14px; height: 14px; }
.ev-rows { display: grid; gap: 8px; }
.ev-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) minmax(180px, 1.1fr) minmax(180px, 1.1fr) minmax(0, 0.8fr) 32px; gap: 6px; align-items: center; }
.ev-row .dp-rel { display: none; } /* the date itself matters more than "in 3 months" in a narrow row */
.ev-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-bg); color: var(--accent); font-size: var(--fs-2xs); font-weight: var(--fw-bold); }
@media (max-width: 900px) { .ev-row { grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr) 32px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); } .ev-row > :nth-child(2) { grid-column: 2 / 4; } .ev-row > :nth-child(5) { grid-column: 2 / 4; } .ev-row > :nth-child(6) { grid-row: 1; grid-column: 4; } }
.add-date .add-date-ic { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--accent-bg); color: var(--accent); flex: none; }
.add-date .add-date-ic svg { width: 17px; height: 17px; }
.pc-series { color: var(--accent); }
.pc-series b { color: var(--ink); }



/* 2026-10-29: My tasks › Assigned by me: who has it, the task, its status, due, Remind */
.cl-item.mytask.byme { grid-template-columns: 28px minmax(0, 1fr) 140px 100px 92px; }
.cl-item.mytask.byme .by-who { display: inline-grid; place-items: center; }
@media (max-width: 900px) { .cl-item.mytask.byme { grid-template-columns: 28px minmax(0, 1fr) 84px 40px; } }
/* ---------------------------------------------------------------- Catat (2026-10-28, docs/catat.md)
   A cash advance tracked with Catat, the team's WhatsApp money tracker: the card on the settlement page and the tag on its
   lines. Green like WhatsApp's own status colour, from the ok tokens, so it reads as "came in by itself". */
.tag.catat { background: var(--ok-bg); color: var(--ok); }
.catat-card h3 svg { color: var(--ok); }
.catat-spent .bar { height: 8px; }
.catat-points { margin: 0; padding-left: var(--sp-4); display: grid; gap: var(--sp-1); }
.catat-offer { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.catat-offer > svg { color: var(--ok); }
.catat-offer > span { flex: 1 1 240px; min-width: 0; }

/* 2026-10-29: a quotation line whose cost per @ is above its price per @ (a loss), in the editor only */
.ql.loss { background: var(--danger-bg); box-shadow: inset 4px 0 0 var(--danger); }
.ql.loss textarea, .ql.loss input, .ql.loss select { background: transparent; }
.ql.loss [data-f="cost"], .ql.loss .qc-btn { color: var(--danger); font-weight: var(--fw-bold); }
.ql.loss.picked { box-shadow: inset 4px 0 0 var(--danger), inset 0 0 0 2px var(--accent); }
.loss-tag { display: inline-flex; align-items: center; gap: 3px; margin-top: 3px; padding: 1px 6px; border-radius: var(--r-pill); background: var(--danger); color: var(--on-accent); font-size: var(--fs-xs); font-weight: var(--fw-semibold); white-space: nowrap; }
.loss-tag svg { width: 11px; height: 11px; }
.qb-chip.loss { display: inline-flex; align-items: center; gap: 4px; border: 0; background: var(--danger); color: var(--on-accent); cursor: pointer; font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.qb-chip.loss svg { width: 12px; height: 12px; }
.loss-notice b { color: inherit; }

/* 2026-10-29: a series' dates under its project on the list, and its next dates on its card */
.ev-dates .ev-row-l { text-decoration: none; color: inherit; }
.ev-dates .ev-row-l.s-done { opacity: 0.6; }
.ev-dates .ev-row-l.s-live { background: var(--ok-bg-soft); }
.ev-dates .ev-row-l .date-badge, .ev-dates .ev-row-l .dbadge { transform: scale(0.88); transform-origin: left center; }
.ev-dates .ev-more { display: flex; align-items: center; gap: 6px; color: var(--accent); text-decoration: none; }
.pc-dates { display: grid; gap: 3px; margin-top: 6px; }
.pc-date { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 3px 8px; border-radius: var(--r-sm); background: var(--surface-hover); color: var(--ink-2); font-size: var(--fs-xs); text-decoration: none; }
.pc-date b { color: var(--ink); font-weight: var(--fw-semibold); }
.pc-date i { font-style: normal; color: var(--ok-strong); font-weight: var(--fw-semibold); }
.pc-date.s-live { background: var(--ok-bg-soft); }
.pc-date.s-next b { color: var(--accent); }

/* 2026-10-29: the month calendar as week rows with bars across days (core/calendar.js) */
.mcal { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.mc-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--surface-hover); }
.mc-head > div { padding: 8px 10px; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--ink-3); text-transform: uppercase; letter-spacing: var(--ls-caps); }
.mc-week { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: 30px repeat(var(--lanes), 26px) 24px; row-gap: 3px; border-bottom: 1px solid var(--line); }
.mc-week:last-child { border-bottom: 0; }
.mc-day { grid-row: 1 / -1; display: flex; flex-direction: column; justify-content: space-between; padding: 6px 8px 4px; border-right: 1px solid var(--line); cursor: pointer; min-width: 0; }
.mc-day:nth-child(7) { border-right: 0; }
.mc-day.wkend, .mc-head .wkend { background: color-mix(in srgb, var(--surface-hover) 60%, transparent); }
.mc-day.out { background: var(--surface-hover); }
.mc-day.out .mc-n { color: var(--ink-4); }
.mc-day:hover { background: color-mix(in srgb, var(--accent-bg) 45%, transparent); }
.mc-day.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.mc-n { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ink-2); line-height: var(--lh-tight); min-height: 22px; display: inline-flex; align-items: center; gap: 4px; }
.mc-n small { font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--ink-3); }
.mc-day.today .mc-n { display: inline-grid; place-items: center; align-self: flex-start; min-width: 24px; height: 24px; padding: 0 6px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); }
.mc-more { align-self: flex-start; position: relative; z-index: 2; padding: 0 4px; border: 0; background: none; color: var(--accent); font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-semibold); cursor: pointer; }
.mc-bar { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0 4px; padding: 0 8px; border: 0; border-left: 3px solid var(--c); border-radius: var(--r-sm); background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--ink); font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-align: left; cursor: pointer; overflow: hidden; }
.mc-bar:hover { background: color-mix(in srgb, var(--c) 26%, var(--surface)); }
.mc-bar.multi { background: color-mix(in srgb, var(--c) 22%, var(--surface)); }
.mc-bar.cont-l { margin-left: 0; border-left-width: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; padding-left: 10px; }
.mc-bar.cont-r { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.mc-bar.past { opacity: 0.5; }
.mc-bar.cancelled .mc-t { text-decoration: line-through; }
.mc-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
.mc-s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 0; color: var(--ink-3); font-weight: var(--fw-regular); }
.mc-legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 10px; }
.mc-legend:empty { display: none; }
.mc-key { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--ink-2); }
.mc-key i { width: 14px; height: 10px; border-radius: var(--r-2xs); border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 22%, var(--surface)); }
.mc-key.past i { --c: var(--ink-4); opacity: 0.5; }
.ag-list { display: grid; gap: 10px; max-height: 70vh; overflow-y: auto; }
.ag-day { display: grid; gap: 4px; }
.ag-date { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--ink-3); text-transform: uppercase; letter-spacing: var(--ls-caps); }
.ag-day.today .ag-date { color: var(--accent); }
.ag-day.past { opacity: 0.6; }
.ag-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 6px; }
@media (max-width: 720px) {
  .mc-week { grid-template-rows: 26px repeat(var(--lanes), 20px) 20px; row-gap: 2px; }
  .mc-head > div { padding: 6px 4px; text-align: center; }
  .mc-day { padding: 4px; }
  .mc-bar { margin: 0 2px; padding: 0 4px; border-left-width: 2px; font-size: var(--fs-3xs); }
  .mc-s { display: none; }
}

/* 2026-10-29: the option the client chose */
.qo-tab.chosen { border-color: var(--ok); box-shadow: inset 0 -2px 0 var(--ok); }
.qo-tab.chosen .qo-k { display: inline-flex; align-items: center; gap: 4px; color: var(--ok-strong); }
.qo-tab.chosen .qo-k svg { width: 12px; height: 12px; }
.qo-tab.notchosen { opacity: 0.6; }
.qo-tab.notchosen.on { opacity: 1; }
.qo-choice { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-2); padding: 8px 12px; border-radius: var(--r-md); background: var(--surface-hover); font-size: var(--fs-sm); color: var(--ink-2); }
.qo-choice > svg { width: 16px; height: 16px; flex: 0 0 auto; }
.qo-choice > span { flex: 1 1 260px; }
.qo-choice.on { background: var(--ok-bg); color: var(--ok-strong); }
.quo-opt.chosen { display: inline-flex; align-items: center; gap: 3px; background: var(--ok-bg); color: var(--ok-strong); }
.quo-opt.chosen svg { width: 11px; height: 11px; }

/* 2026-10-29: a quotation line shared with the other options (a change here changes them too) */
.shared-tag { display: inline-flex; align-items: center; gap: 3px; margin-top: 3px; padding: 0 6px; border-radius: var(--r-pill); background: var(--accent-bg); color: var(--accent); font-weight: var(--fw-semibold); white-space: nowrap; }
.shared-tag svg { width: 10px; height: 10px; }

/* ---------------------------------------------------------------- Notices (2026-10-31; redrawn 2026-11-13): one look for everything Kelar tells you
   core/notice.js draws every notice the same way: the kind as a coloured word, the title, where · who · when. Used by the bell's
   panel (core/notifications.js), the corner cards (core/notify-pop.js) and the one "Needs you" card (core/needs-you.js).
   2026-11-13 (the user: "improve the overall notification pop up, animation, UI/UX … like a professional UI designer and developer
   work together", "I don't want it identified like AI slop"): quieter. No icon badges, no coloured borders or edges, no blur behind
   the card, no bounce. Hierarchy from type and space; colour only on the kind word, the unread dot and what has waited too long.
   Motion: things arrive over 200 ms from 8 px away and leave faster than they came; the cards already on screen slide to make room. */
.nt { position: relative; display: flex; align-items: flex-start; gap: var(--sp-2); width: 100%; padding: 10px 12px 10px 22px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); font: inherit; text-align: left; text-decoration: none !important; cursor: pointer; transition: background var(--t-fast) var(--ease-std); }
.nt:hover, .nt:focus-visible { background: var(--surface-hover); }
.nt-dot { position: absolute; left: 9px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.nt.urgent .nt-dot { background: var(--danger); }
.nt.read .nt-dot { display: none; }
.nt-tx { flex: 1; min-width: 0; display: grid; gap: 2px; }
.nt-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); }
.nt-when { font-size: var(--fs-xs); color: var(--ink-4); white-space: nowrap; font-variant-numeric: tabular-nums; }
.nt-title { font-size: var(--fs-md); font-weight: var(--fw-semibold); line-height: var(--lh-snug); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nt-body { font-size: var(--fs-sm); color: var(--ink-3); line-height: var(--lh-normal); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* read: still easy to read, only lighter in weight (it used to be faded, which looked switched off) */
.nt.read .nt-title { font-weight: var(--fw-medium); color: var(--ink-2); }
.nt-go { display: none; }
/* the kind: a word in its colour */
.nt-kind { --c: var(--ink-3); display: inline-flex; align-items: center; max-width: 100%; color: var(--c); font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; white-space: nowrap; }
.nt-kind > span { overflow: hidden; text-overflow: ellipsis; }
.nt-kind.k-task { --c: var(--accent); }
.nt-kind.k-urgent { --c: var(--danger); }
.nt-kind.k-creative { --c: var(--brand-2); }
.nt-kind.k-project, .nt-kind.k-quotation { --c: var(--indigo); }
.nt-kind.k-pr, .nt-kind.k-number { --c: var(--teal); }
.nt-kind.k-approval, .nt-kind.k-poe { --c: var(--ok-strong); }
.nt-kind.k-question { --c: var(--fokus); }
.nt-kind.k-changed, .nt-kind.k-badge { --c: var(--warn-strong); }
.nt-kind.k-info { --c: var(--ink-3); }
/* has waited a day or more: the one thing on a row that may be amber */
.nt-late { color: var(--warn-strong); font-weight: var(--fw-semibold); }

/* the bell's panel */
.nt-panel { display: flex; flex-direction: column; min-height: 0; }
.nt-head { display: flex; align-items: baseline; gap: var(--sp-2); padding: 8px 12px 10px; border-bottom: 1px solid var(--line); }
.nt-head b { font-size: var(--fs-lg); }
.nt-head .nt-count { flex: 1; font-size: var(--fs-sm); color: var(--ink-3); }
.nt-head [data-close] { align-self: center; }
.nt-list { overflow-y: auto; max-height: min(70vh, 560px); padding: 4px 0; overscroll-behavior: contain; }
.nt-group h4 { margin: 10px 12px 4px 22px; font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-4); }
.nt-group h4:empty { display: none; }
.nt-empty { display: grid; gap: 4px; padding: 36px 24px; text-align: center; color: var(--ink-3); font-size: var(--fs-sm); }
.nt-empty svg { display: none; }
.nt-empty b { color: var(--ink); font-size: var(--fs-md); }
/* a sheet from the foot of the screen (phones) */
.sheet-back { position: fixed; inset: 0; z-index: var(--z-popover); display: flex; align-items: flex-end; background: var(--scrim); animation: fade-in 200ms var(--ease-out) backwards; }
.sheet-back.out { animation: fade-out 160ms var(--ease-in) forwards; pointer-events: none; }
.sheet-back.out .sheet { animation: sheet-out 160ms var(--ease-in) forwards; }
.sheet { width: 100%; max-height: 86dvh; display: flex; flex-direction: column; padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--surface); box-shadow: var(--shadow-lg); animation: sheet-in 260ms var(--ease-emph) backwards; }
.sheet::before { content: ""; width: 36px; height: 4px; margin: 2px auto 8px; border-radius: var(--r-pill); background: var(--line-2); flex: none; }
.sheet .nt-panel { min-height: 0; }
.sheet .nt-list { max-height: none; }
@keyframes sheet-in { from { translate: 0 100%; } }
@keyframes sheet-out { to { translate: 0 100%; } }

/* corner cards: new notifications, in the corner by the thumb and out of the way of the top bar */
.np-stack { position: fixed; z-index: var(--z-toast); right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.np-card { pointer-events: auto; position: relative; overflow: hidden; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); animation: np-in 220ms var(--ease-out) both; transition: border-color var(--t-fast) var(--ease-std); }
.np-card.out { animation: np-out 160ms var(--ease-in) forwards; pointer-events: none; }
@keyframes np-in { from { opacity: 0; translate: 0 8px; } }
@keyframes np-out { to { opacity: 0; translate: 12px 0; } }
.np-card .nt { padding: 12px 40px 13px 14px; cursor: default; border-radius: 0; }
.np-card .nt:hover { background: none; }
.np-card .nt-dot { display: none; }
.np-card .nt-when { display: none; }
/* the whole card opens it: one target, also for the keyboard */
.np-open { position: absolute; inset: 0; z-index: 1; border: 0; padding: 0; background: none; cursor: pointer; border-radius: inherit; }
.np-open:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.np-card:has(.np-open):hover { border-color: var(--line-hover); }
.np-x { position: absolute; top: 6px; right: 6px; z-index: 2; opacity: 0.55; transition: opacity var(--t-fast) var(--ease-std); }
.np-card:hover .np-x, .np-x:focus-visible { opacity: 1; }
/* how long it stays: a hairline that runs out, and waits while the pointer is on the card */
.np-time { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--line-2); transform-origin: left; animation: np-time 10s linear forwards; }
.np-card:hover .np-time, .np-card:focus-within .np-time { animation-play-state: paused; }
@keyframes np-time { to { scale: 0 1; } }
.np-more { pointer-events: auto; align-self: flex-end; padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-semibold); box-shadow: var(--shadow-md); cursor: pointer; }
.np-more:hover { color: var(--ink); border-color: var(--line-hover); }
.np-more svg { display: none; }

/* "Needs you": the one card over the page */
.ny-spot { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: var(--sp-4); }
.ny-scrim { position: absolute; inset: 0; background: var(--scrim); animation: fade-in 200ms var(--ease-out) backwards; }
.ny-card { position: relative; width: min(560px, 100%); max-height: min(720px, calc(100dvh - 32px)); display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; animation: card-in 220ms var(--ease-out) backwards; }
@keyframes card-in { from { opacity: 0; translate: 0 10px; } }
@keyframes card-out { to { opacity: 0; translate: 0 6px; } }
.ny-spot.out .ny-card { animation: card-out 140ms var(--ease-in) forwards; }
.ny-spot.out .ny-scrim { animation: fade-out 160ms var(--ease-in) forwards; }
.ny-head { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-5) var(--sp-5) var(--sp-3); }
.ny-head b { display: block; font-size: var(--fs-xl); font-weight: var(--fw-semibold); line-height: var(--lh-snug); }
.ny-sub { display: block; margin-top: 2px; font-size: var(--fs-sm); color: var(--ink-3); }
.ny-groups { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 var(--sp-3) var(--sp-2); overscroll-behavior: contain; }
.ny-group + .ny-group { margin-top: var(--sp-3); }
.ny-group h4 { display: flex; align-items: center; gap: 6px; margin: 0; padding: 6px var(--sp-2); font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-4); }
.ny-n { color: var(--ink-3); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.ny-row { position: relative; display: flex; align-items: center; gap: var(--sp-3); width: 100%; padding: 10px var(--sp-2); border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; text-decoration: none !important; transition: background var(--t-fast) var(--ease-std); }
.ny-row + .ny-row::before { content: ""; position: absolute; left: var(--sp-2); right: var(--sp-2); top: 0; height: 1px; background: var(--line); }
.ny-row:hover, .ny-row:focus-visible { background: var(--surface-hover); }
.ny-row:hover::before, .ny-row:hover + .ny-row::before, .ny-row:focus-visible::before, .ny-row:focus-visible + .ny-row::before { opacity: 0; }
.ny-main { flex: 1; min-width: 0; display: grid; gap: 2px; justify-items: start; }
.ny-title { font-size: var(--fs-md); font-weight: var(--fw-semibold); line-height: var(--lh-snug); overflow-wrap: anywhere; }
.ny-meta { font-size: var(--fs-xs); color: var(--ink-3); line-height: var(--lh-normal); }
.ny-note { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--warn-strong); }
.ny-amt { font-size: var(--fs-md); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ny-go { display: none; }
.ny-more { margin: 4px var(--sp-2) 0; font-size: var(--fs-xs); color: var(--ink-3); }
.ny-actions { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-5); border-top: 1px solid var(--line); background: var(--surface-sunken); }
/* the quiet one (waiting on your own update, answers to your questions) sits in the corner stack with the cards */
.ny-pop { pointer-events: auto; animation: np-in 220ms var(--ease-out) both; }
.ny-pop.out { animation: np-out 160ms var(--ease-in) forwards; }
.ny-pop .ny-card { width: auto; max-height: min(60vh, 440px); border-radius: var(--r-md); border-color: var(--line-2); animation: none; }
.ny-pop .ny-head { padding: var(--sp-3) var(--sp-3) var(--sp-1) var(--sp-4); }
.ny-pop .ny-head b { font-size: var(--fs-md); }
.ny-pop .ny-groups { padding: 0 var(--sp-2) var(--sp-1); }
.ny-pop .ny-group h4 { display: none; }
.ny-pop .ny-actions { padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-4); }
@media (prefers-reduced-motion: reduce) { .ny-scrim, .ny-card, .ny-pop, .np-card, .np-time, .sheet, .sheet-back { animation: none; } }
@media print { .ny-spot, .ny-pop, .np-stack, .sheet-back { display: none; } }

/* Motion, one voice (2026-11-13): dialogs, menus and toasts arrive the same way as the notices: a short rise, no overshoot. */
.modal { animation: card-in 220ms var(--ease-out) backwards; }
.backdrop.out .modal { animation: card-out 140ms var(--ease-in) forwards; }
.pop { animation: pop-in 160ms var(--ease-out) backwards; }
@keyframes pop-in { from { opacity: 0; translate: 0 -4px; } }
.toast { animation: toast-in 200ms var(--ease-out) backwards; }
@keyframes toast-in { from { opacity: 0; translate: 0 8px; } }
/* a count that wants attention beats three times, then rests (it used to pulse for as long as the page was open) */
.nav-item.urgent .nav-count { animation-iteration-count: 3; }
.nav-item.cr-hot .nav-count { animation-iteration-count: 3; }

/* ---------------------------------------------------------------- Phones (2026-10-31): a tab bar, sheets, room for the page
   The user: "improve overall UI/UX and responsive in mobile version". Under 900 px (where the sidebar hides) a tab bar at the foot
   of the screen holds Home, Projects, My tasks, Approvals and Menu (the sidebar); the top bar keeps the title whole. Under 640 px
   dialogs come up from the foot of the screen, stat tiles sit two to a row, a page's description folds to two lines, and the
   "Your day" strip shows on Home only. --tabbar-h is the bar's height, 0 where there is none, so everything that floats at the
   foot (toasts, cards, bulk bars) stays above it. */
:root { --tabbar-h: 0px; }
.tabbar { display: none; }
@media (max-width: 900px) {
  :root { --tabbar-h: 58px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sticky); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom); background: var(--glass-ground); -webkit-backdrop-filter: var(--glass-blur-lg); backdrop-filter: var(--glass-blur-lg); border-top: 1px solid var(--line); }
  .tab-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; padding: 0; border: 0; background: none; color: var(--ink-3); font: inherit; font-size: var(--fs-2xs); font-weight: var(--fw-semibold); text-decoration: none !important; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .tab-item svg { width: 22px; height: 22px; }
  .tab-item > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tab-item.on { color: var(--accent); }
  .tab-item.on svg { stroke-width: 2.2; }
  .tab-count { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-size: var(--fs-3xs); font-style: normal; font-weight: var(--fw-bold); display: grid; place-items: center; }
  .tab-count.hot { background: var(--danger); }
  .tab-count[hidden] { display: none; }
  .content { padding-bottom: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom)); }
  /* the tab bar's Menu opens the sidebar, so the top bar's menu button and back chip make room for the title */
  .btn.menu-btn, .back-chip { display: none; }
  .toasts { bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); }
  .coach-card { bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); }
  .np-stack { right: 12px; left: 12px; width: auto; bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); }
  .cl-bulkbar, .bulk-proj, .soc-bulk, .cmp-bar, .er-save, .qe.dock-float .qe-bar { bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) {
  /* a page's description folds to two lines; a tap shows the rest (app.js) */
  .page-head .sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--fs-sm); cursor: pointer; }
  .page-head .sub.open { display: block; -webkit-line-clamp: unset; }
  /* stat tiles two to a row, not one tall tile each */
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
  .stat { padding: var(--sp-3); border-radius: var(--r-lg); }
  .stat .k { font-size: var(--fs-xs); }
  .stat .k svg { width: 22px; height: 22px; flex-basis: 22px; padding: 5px; }
  .stat .v { font-size: var(--fs-2xl); }
  .stat .d { font-size: var(--fs-xs); }
  /* the "Your day" strip on Home only (it sat at the top of every page) */
  body:not([data-page="home"]) #dayStrip { display: none; }
  .day-strip .ds-sugs { display: none; }
  /* dialogs come up from the foot of the screen, full width */
  .backdrop { padding: 0; place-items: end center; }
  .modal { width: 100%; max-height: calc(100dvh - 24px); border-radius: var(--r-xl) var(--r-xl) 0 0; border-bottom: 0; animation: sheet-in 260ms var(--ease-emph) backwards; }
  .backdrop.out .modal { animation: sheet-out 160ms var(--ease-in) forwards; }
  .modal-head { padding: 16px 18px 8px; }
  .modal-body { padding: 6px 18px 14px; }
  .modal-foot { padding: 10px 18px calc(14px + env(safe-area-inset-bottom)); }
  .modal-foot .btn-primary { flex: 1 1 auto; justify-content: center; }
  .modal-foot .left { width: 100%; }
  .drawer { top: 0; right: 0; bottom: 0; width: 100vw; border: 0; border-radius: 0; }
  .drawer-body { padding-bottom: calc(30px + env(safe-area-inset-bottom)); }
  .ny-spot { padding: 0; place-items: end center; }
  .ny-spot .ny-card { width: 100%; max-height: calc(100dvh - 24px); border-radius: var(--r-lg) var(--r-lg) 0 0; border-bottom: 0; animation: sheet-in 260ms var(--ease-emph) backwards; }
  .ny-spot.out .ny-card { animation: sheet-out 160ms var(--ease-in) forwards; }
  .ny-spot .ny-actions { padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom)); }
  .ny-actions .btn { flex: 1 1 auto; justify-content: center; }
  .ny-row { flex-wrap: wrap; row-gap: 2px; }
  .ny-amt { order: 2; margin-left: auto; }
  .ny-go { display: none; }
  /* the top bar: the title whole, the round buttons closer */
  .topbar { gap: 6px; }
  .crumbs b { font-size: var(--fs-lg); }
}
/* on a touch screen the small buttons and rows are easier to hit */
@media (pointer: coarse) {
  .btn-xs { min-height: 30px; }
  .nt, .ny-row { padding-top: 12px; padding-bottom: 12px; }
  .tabs a, .tabs button { padding-top: 12px; padding-bottom: 12px; }
}

/* ---------------------------------------------------------------- Phones and tablets, second pass (2026-10-31) */
/* a strip of tabs that scrolls fades at its right edge until it is scrolled to the end (app.js tabHints()) */
.tabs.can-scroll:not(.at-end) { -webkit-mask-image: linear-gradient(90deg, var(--ink) calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, var(--ink) calc(100% - 40px), transparent); }
@media (max-width: 1000px) {
  /* the quotation editor's lines and a payment request's lines scroll sideways instead of losing their last columns */
  .qe-lines { overflow: auto; }
  .qe-lines .ql { min-width: 960px; }
  .qe-lines.no-freq .ql { min-width: 820px; }
  .qe-lines .ql.head { top: 0; } /* sticky inside the scrolling box, not 76 px into it */
  .pr-group { overflow-x: auto; }
}
@media (max-width: 720px) {
  .cl-actions { flex-wrap: wrap; margin-left: 0; }
}
@media (max-width: 640px) {
  .phead-title { font-size: var(--fs-3xl); }
  .crumbs > :not(:last-child) { display: none; } /* the page's own name only; the back is the tab bar */
}
/* ---------------------------------------------------------------- bank rows (2026-10-29): price per pax tiers and the AV list on the venue form */
.br-row, .br-head { display: grid; gap: var(--sp-2); align-items: center; }
.br-row + .br-row { margin-top: var(--sp-1); }
.br-tier { grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 0.7fr) 20px; }
.br-av { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr) 20px; }
.br-head { margin-bottom: var(--sp-1); }
.br-row .input { width: 100%; min-width: 0; }
.br-row [data-row-x] { color: var(--ink-3); font-size: var(--fs-md); }
.br-show { margin: 0; padding: 0; list-style: none; }
.br-show li + li { margin-top: var(--sp-1); }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
@media (max-width: 560px) {
  .br-head { display: none; }
  .br-tier { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 20px; }
  .br-tier [data-k=label] { grid-column: 1 / -1; }
  .br-av { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--line); }
  .br-av > span:last-child:empty { display: none; }
}

/* ---------------------------------------------------------------- crew week by week (2026-10-31): a long project's people per week */
.mw-month { display: inline-flex; align-items: center; gap: var(--sp-2); }
.mw-month b { min-width: 130px; text-align: center; font-size: var(--fs-sm); }
.mw-tbl th, .mw-tbl td { vertical-align: top; min-width: 150px; }
.mw-tbl th[scope="row"] { min-width: 130px; white-space: normal; }
.mw-tbl td.open { background: var(--warn-bg); }
.mw-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--sp-1); width: 100%; margin-bottom: var(--sp-1); padding: 4px var(--sp-2); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font: inherit; font-size: var(--fs-sm); text-align: left; color: var(--ink); cursor: pointer; }
.mw-chip:hover { border-color: var(--line-hover); }
.mw-chip small { width: 100%; font-size: var(--fs-xs); color: var(--ink-3); }
.mw-chip svg { width: 13px; height: 13px; color: var(--danger); }
.mw-chip.s-softbooked, .mw-chip.s-on_check { border-style: dashed; }
.mw-chip.s-booked { border-color: var(--ok); }
.mw-chip.clash { border-color: var(--danger); }
.mw-add { display: inline-flex; align-items: center; gap: var(--sp-1); padding: 2px var(--sp-2); border: 0; border-radius: var(--r-sm); background: transparent; font: inherit; font-size: var(--fs-xs); color: var(--ink-3); cursor: pointer; }
.mw-add:hover { background: var(--surface-muted); color: var(--ink); }
.mw-add svg { width: 13px; height: 13px; }

/* ---------------------------------------------------------------- FOH agenda (2026-10-31): the team's items and columns */
.ag-view { margin-left: var(--sp-2); }
.ag-row.foh { background: var(--surface-muted); }

.ld-warn { margin: var(--sp-1) 0 0; padding-left: var(--sp-4); }

/* ---------------------------------------------------------------- My order and recurring subtasks (2026-11-04) */
.cl-item.mytask.ordered { grid-template-columns: 24px minmax(0, 1fr) minmax(0, 220px) 130px 110px 30px; }
@media (max-width: 900px) { .cl-item.mytask.ordered { grid-template-columns: 24px minmax(0, 1fr) 96px 30px; } }
.cl-item.rt-nested { background: var(--surface-muted); }
.cl-item.rt-nested.stopped { opacity: 0.6; }
.cl-item.rt-nested.done .ttl { color: var(--ink-3); }
.rt-tick.sm { width: 22px; height: 22px; }
.rt-tick.sm svg { width: 12px; height: 12px; }
.rt-flag { display: inline-grid; place-items: center; color: var(--accent); }
.rt-flag svg { width: 13px; height: 13px; }
.rt-nested-who { display: flex; align-items: center; gap: var(--sp-1); }
.rt-under { align-items: center; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-muted); }
.rt-under svg { width: 16px; height: 16px; color: var(--accent); }

/* ---------------------------------------------------------------- comments and reactions (2026-11-04, views/comments-ui.js) */
.cm-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); }
.cm { display: flex; align-items: flex-start; gap: var(--sp-3); }
.cm-main { flex: 1; min-width: 0; }
.cm-head { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); min-height: 24px; }
.cm-more { margin-left: auto; opacity: 0.55; }
.cm:hover .cm-more, .cm-more:focus-visible { opacity: 1; }
.cm-body { font-size: var(--fs-sm); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.cm-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.mention { color: var(--accent-ink); background: var(--accent-bg); border-radius: var(--r-xs); padding: 0 3px; font-weight: var(--fw-semibold); }
.cm-att { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); margin-top: var(--sp-2); }
.cm-pics { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.cm-pic { width: 112px; height: 84px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--surface-muted); cursor: zoom-in; }
.cm-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-file { display: flex; align-items: center; gap: var(--sp-2); max-width: 360px; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer; text-decoration: none; }
.cm-file:hover { border-color: var(--line-hover); background: var(--surface-hover); }
.cm-file > svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--accent); }
.cm-file span { min-width: 0; display: grid; }
.cm-file b, .cm-file small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-file b { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.cm-file small { font-size: var(--fs-xs); color: var(--ink-3); }
.cm-file .cm-go { width: 14px; height: 14px; flex: 0 0 14px; color: var(--ink-3); }

.cm-compose { margin-top: var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); transition: border-color var(--t-fast) var(--ease-std); }
.cm-compose:focus-within { border-color: var(--line-accent); }
.cm-compose.drop { border-style: dashed; border-color: var(--accent); background: var(--accent-bg); }
.cm-compose textarea { border: 0; background: transparent; box-shadow: none; resize: vertical; min-height: 64px; }
.cm-compose textarea:focus { box-shadow: none; }
.cm-pending { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding: 0 var(--sp-3) var(--sp-2); }
.cm-chip { display: inline-flex; align-items: center; gap: var(--sp-2); max-width: 240px; height: 30px; padding: 0 var(--sp-1) 0 var(--sp-2); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-muted); font-size: var(--fs-xs); }
.cm-chip img { width: 22px; height: 22px; object-fit: cover; border-radius: var(--r-xs); }
.cm-chip svg { width: 14px; height: 14px; flex: 0 0 14px; color: var(--accent); }
.cm-chip button { border: 0; background: none; padding: 2px; cursor: pointer; color: var(--ink-3); display: inline-grid; }
.cm-chip button svg { color: inherit; }
.cm-chip.busy { color: var(--ink-3); padding-right: var(--sp-2); }
.cm-bar { display: flex; align-items: center; gap: var(--sp-1); padding: var(--sp-1) var(--sp-2) var(--sp-2); border-top: 1px solid var(--line); }
.cm-linkform { display: grid; gap: var(--sp-1); padding: var(--sp-3); }
@media (max-width: 640px) { .cm-bar .btn-ghost span, .cm-keys { display: none; } }

.rx-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); margin-top: var(--sp-2); }
.rx, .rx-like, .rx-add { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 var(--sp-2); border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-semibold); cursor: pointer; transition: background var(--t-fast) var(--ease-std), border-color var(--t-fast) var(--ease-std); }
.rx:hover, .rx-like:hover, .rx-add:hover { border-color: var(--line-hover); background: var(--surface-hover); }
.rx.on { background: var(--accent-bg); border-color: var(--line-accent); color: var(--accent-ink); }
.rx-e { font-size: var(--fs-base); line-height: var(--lh-none); }
.rx-like, .rx-add { border-color: transparent; background: none; color: var(--ink-3); }
.rx-like svg, .rx-add svg { width: 14px; height: 14px; }
.rx-pick { display: grid; grid-template-columns: repeat(6, 36px); gap: 2px; padding: var(--sp-2); }
.rx-pick button { width: 36px; height: 36px; border: 0; border-radius: var(--r-sm); background: none; font-size: var(--fs-2xl); cursor: pointer; }
.rx-pick button:hover, .rx-pick button:focus-visible { background: var(--surface-hover); }

/* ---------------------------------------------------------------- History & restore, held option changes (2026-11-05) */
.qh-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.qh-item { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-3); background: var(--surface); }
.qh-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-1); }
.qh-changes { margin: 0; padding-left: var(--sp-4); font-size: var(--fs-sm); color: var(--ink-2); }
.qh-changes li { margin: 2px 0; }
.qh-more { list-style: none; margin-left: calc(-1 * var(--sp-4)); }
.qh-more summary { cursor: pointer; color: var(--accent); font-size: var(--fs-xs); }
.qh-now { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--surface-sunken); }
.qo-hold { display: flex; gap: var(--sp-3); align-items: flex-start; margin-top: var(--sp-2); padding: var(--sp-3); border-radius: var(--r-md); background: var(--warn-bg); color: var(--warn); }
.qo-hold > svg { flex: none; margin-top: 2px; }
.qo-hold-row { display: flex; gap: var(--sp-3); align-items: flex-start; flex-wrap: wrap; font-size: var(--fs-sm); }
.qo-hold-row details { margin-top: var(--sp-1); color: var(--ink-2); }
.qo-hold-row details ul { margin: var(--sp-1) 0 0; padding-left: var(--sp-4); }
.qo-hold-row summary { cursor: pointer; }

/* ---- Series dates: status, highlights, peak days (2026-11-05) ----
   core/series.js draws them; the Projects list (compact) and the Events tab (facts). */
.ev-dates .ev-state { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px; }
.ev-hl { margin-top: 6px; }
.ev-hl.compact { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: var(--fs-xs); color: var(--ink-2); min-width: 0; }
.ev-fact { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
.ev-fact svg, .ev-peak svg, .ev-facts dt svg { width: 12px; height: 12px; flex: none; color: var(--ink-3); }
.ev-peak { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: var(--r-pill); background: var(--warn-bg); color: var(--warn); font-size: var(--fs-xs); max-width: 100%; }
.ev-peak svg { color: currentColor; }
.ev-peak b { font-weight: var(--fw-semibold); white-space: nowrap; }
.ev-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 16px; margin: 8px 0 0; }
.ev-facts dt { display: flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--ink-3); }
.ev-facts dd { margin: 0; font-size: var(--fs-sm); color: var(--ink); overflow-wrap: anywhere; }
.ev-peaks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.ev-peak-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 90px auto; gap: 6px; margin-top: 6px; }
@media (max-width: 640px) { .ev-peak-row { grid-template-columns: minmax(0, 1fr) 80px auto; } .ev-peak-row [data-pk="title"] { grid-column: 1 / -1; grid-row: 2; } }
.pc-peak { color: var(--warn); }
.pc-date i.tent { color: var(--warn); }
/* the checklist a project or an event starts with: empty first, the division's templates suggested */
.ck-pick { display: grid; gap: 8px; }
.ck-pick .ck-sug { margin-top: 4px; }
.ck-pick .ck-more summary { cursor: pointer; color: var(--accent); }
.ck-pick .tpl-pick { max-height: 30vh; }
.ck-suggest { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
@media (max-width: 640px) { .ev-dates .ev-state { flex-direction: column; align-items: flex-end; } .ev-peak { border-radius: var(--r-xs); } }

/* 2026-10-29: a question opened again (Undo after Close, or Reopen) stands out until someone replies, and a line changed
   after the quotation went for approval is marked "Edited" here (never on paper or a payment request). */
.mark-tag.reopened { border-color: var(--danger-solid); background: var(--danger-solid); color: var(--on-accent); animation: q-reopen 1.8s var(--ease-out) 3; }
.ql.q-open.q-reopened { box-shadow: inset 5px 0 0 var(--danger-solid); background: var(--danger-bg); }
.mark.reopened { margin: 0 calc(-1 * var(--sp-3)); padding: var(--sp-3); border-radius: var(--r-md); background: var(--danger-bg-soft); }
.mark-reopened { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); padding: var(--sp-1) var(--sp-3); border-radius: var(--r-pill); background: var(--danger-solid); color: var(--on-accent); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.mark-reopened svg { width: 13px; height: 13px; flex: none; }
.marks-card:has(.mark.reopened) { border-color: var(--danger-solid); }
tr:has(.mark-tag.reopened) td { background: var(--danger-bg); }
@keyframes q-reopen { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger-solid) 55%, transparent); } 100% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--danger-solid) 0%, transparent); } }
.ql.q-edited:not(.q-open):not(.q-answered):not(.loss) { box-shadow: inset 4px 0 0 var(--kind-actual); background: var(--kind-actual-bg); }
.edit-tag { display: inline-flex; align-items: center; gap: 3px; margin-top: 3px; padding: 1px 6px; border-radius: var(--r-pill); background: var(--kind-actual-bg); color: var(--kind-actual); border: 1px solid var(--kind-actual); font-size: var(--fs-xs); font-weight: var(--fw-semibold); white-space: nowrap; cursor: help; }
.edit-tag svg { width: 11px; height: 11px; }
@media (prefers-reduced-motion: reduce) { .mark-tag.reopened { animation: none; } }
@media print { .edit-tag, .mark-reopened { display: none !important; } }

/* ---------------------------------------------------------------- price per pax (2026-11-05): the quotation by group, each per pax */
.qpax { border-top: 1px solid var(--line); padding-top: var(--sp-3); }
.qpax summary { cursor: pointer; font-size: var(--fs-md); }
.qpax-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; font-size: var(--fs-sm); align-items: baseline; }
.qpax-grid.w-cost { grid-template-columns: minmax(0, 1fr) auto auto; }
.qpax-l { display: grid; min-width: 0; }
.qpax-l i { font-style: normal; font-size: var(--fs-xs); color: var(--ink-4); }
.qpax-sep { grid-column: 1 / -1; height: 1px; background: var(--line); }
.qpax-grid .h { font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-4); }
.qpax-grid .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* on paper */
.doc-pax { margin-top: 10px; width: 60%; margin-left: auto; }
.doc-pax caption { text-align: left; font-weight: var(--fw-bold); padding-bottom: 4px; }
/* ---------------------------------------------------------------- POE · RSVP Platform import (2026-11-05)
   Event Attendee's panel: attended vs registered, breakdowns with a small bar each, the people who attended. */
/* 2026-11-13: photos from phones to look at, and the asks */
.poe-review .poe-review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-3); margin-top: var(--sp-3); }
.poe-rv { margin: 0; display: grid; gap: var(--sp-1); min-width: 0; }
.poe-rv img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-sunken); }
.poe-rv figcaption { display: grid; min-width: 0; font-size: var(--fs-xs); } .poe-rv figcaption b, .poe-rv figcaption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poe-rv figcaption span { color: var(--ink-3); }
.poe-asked { display: grid; gap: var(--sp-2); margin-top: var(--sp-3); }
.ph-redo { position: absolute; left: var(--sp-1); top: var(--sp-1); display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--danger); color: var(--on-accent); font-size: var(--fs-xs); font-weight: var(--fw-semibold); z-index: 1; }
.ph-redo.static { position: static; padding: 2px 6px; }
.ph-redo svg { width: 12px; height: 12px; }
.poe-ph.rv-redo { outline: 2px solid var(--danger); outline-offset: 1px; }
.poe-lists { margin-top: var(--sp-3); display: grid; gap: var(--sp-2); min-width: 0; } /* 2026-11-12: attendee lists from a sheet */
.poe-list { border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--sp-2) var(--sp-3); background: var(--surface); min-width: 0; }
.poe-list .tbl-wrap { max-height: 320px; overflow: auto; }
.poe-rsvp { border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-3); background: var(--surface); min-width: 0; }
.poe-rsvp.empty { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.poe-rsvp-ic { flex: none; width: 28px; height: 28px; border-radius: var(--r-sm); display: inline-grid; place-items: center; background: var(--accent-bg); color: var(--accent); }
.poe-rsvp-ic svg { width: 15px; height: 15px; }
.poe-rsvp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--sp-2); margin-top: var(--sp-3); }
.poe-rsvp-tile { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-xs); background: var(--ground); min-width: 0; }
.poe-rsvp-tile .v { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: var(--fs-2xl); line-height: var(--lh-tight); font-variant-numeric: tabular-nums; }
.poe-rsvp-tile .l { font-size: var(--fs-xs); color: var(--ink-3); }
.poe-rsvp-tile.lead { background: var(--accent-bg); }
.poe-rsvp-tile.lead .v { color: var(--accent); }
.poe-rsvp-bar { height: 6px; border-radius: var(--r-pill); background: var(--ground); margin-top: var(--sp-3); overflow: hidden; }
.poe-rsvp-bar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.poe-rsvp-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--sp-3); margin-top: var(--sp-4); }
.poe-rsvp-group, .poe-rsvp-list { min-width: 0; }
.poe-rsvp-group .tbl, .poe-rsvp-list .tbl { margin-top: var(--sp-1); }
.poe-rsvp-list { margin-top: var(--sp-4); }
.poe-rsvp .tbl { table-layout: fixed; }
.poe-rsvp .tbl th, .poe-rsvp .tbl td { padding: var(--sp-1) var(--sp-2); }
.poe-rsvp .tbl th.num, .poe-rsvp .tbl td.num { width: 84px; }
.poe-rsvp-list .tbl th:first-child, .poe-rsvp-list .tbl td:first-child { width: 44px; }
.poe-rsvp-list .tbl td { overflow-wrap: anywhere; }
.poe-rsvp-lbl { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poe-rsvp-mini { display: block; height: 4px; margin-top: 3px; border-radius: var(--r-pill); background: var(--ground); overflow: hidden; }
.poe-rsvp-mini i { display: block; height: 100%; background: var(--accent); }
.poe-rsvp-funnel { margin-top: var(--sp-4); display: grid; gap: var(--sp-1); }
.poe-rsvp-step { display: grid; grid-template-columns: minmax(84px, 120px) minmax(0, 1fr) 64px; column-gap: var(--sp-2); align-items: center; }
.poe-rsvp-step .poe-rsvp-mini { height: 8px; margin-top: 0; }
.poe-rsvp-step .num { text-align: right; font-weight: var(--fw-bold); }
.poe-rsvp-step .tiny { grid-column: 2 / -1; }
.poe-picks h4 { margin: 0 0 var(--sp-1); color: var(--ink-3); }
.poe-picks h4 ~ h4 { margin-top: var(--sp-4); }
.poe-pick { padding: var(--sp-1) 0; cursor: pointer; }

/* ===== teams on People: who else is in a team (2026-11-05, views/people.js) ===== */
.team-also { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.team-chip { display: inline-flex; align-items: center; gap: var(--sp-1); padding: 2px var(--sp-2) 2px 2px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); }
.team-chip .btn-icon { margin-right: calc(var(--sp-1) * -1); }

/* ---------------------------------------------------------------- a project's quotations by number (2026-11-06) */
.tbl.qg .qg-head td { padding-top: var(--sp-4); border-bottom: 1px solid var(--line); background: var(--surface-sunken); }
.tbl.qg .qg-row td:first-child { padding-left: var(--sp-5); }
.tbl.qg .qg-old td:first-child { padding-left: calc(var(--sp-5) + var(--sp-4)); }

/* ---------------------------------------------------------------- On the day: who handles what, positions (2026-11-10) */
/* Five group colours, from the chart palette: Leads, Before the day, Production, On the day, Other. */
.g0 { --g: var(--viz-1); } .g1 { --g: var(--viz-2); } .g2 { --g: var(--viz-3); } .g3 { --g: var(--viz-4); } .g4 { --g: var(--viz-5); }
.od-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-3); }
.od-nav .cs-days { margin-bottom: 0; flex: 1 1 260px; min-width: 0; }
.od-views button { display: inline-flex; align-items: center; gap: 6px; }
.od-views button svg { width: 15px; height: 15px; }
.wh { padding: 0; overflow: hidden; }
.wh-table { width: 100%; border-collapse: collapse; }
.wh-table thead th { text-align: left; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--ink-3); text-transform: uppercase; letter-spacing: var(--ls-caps); padding: var(--sp-2) var(--sp-4); background: var(--surface-sunken); border-bottom: 1px solid var(--line); }
.wh-table thead th:first-child { width: 30%; min-width: 200px; }
.wh-table tbody th, .wh-table tbody td { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; font-weight: inherit; }
.wh-table tbody tr:last-child > * { border-bottom: 0; }
.wh-table tbody tr:hover { background: var(--surface-hover); }
.wh-table tr.clash th { box-shadow: inset 3px 0 0 var(--danger); }
.wh-who { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.wh-who .as-ini { width: 28px; height: 28px; flex-basis: 28px; font-size: var(--fs-2xs); background: var(--surface-muted); color: var(--ink-2); }
.wh-name { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: var(--lh-tight); }
.wh-name b { font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-name span { font-size: var(--fs-xs); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-flag { color: var(--danger); display: inline-flex; } .wh-flag svg { width: 15px; height: 15px; }
.wh-who .as-wa { color: var(--ok); display: inline-flex; padding: 4px; border-radius: var(--r-sm); } .wh-who .as-wa:hover { background: var(--surface-hover); }
.wh-who .as-wa svg { width: 16px; height: 16px; }
.wh-areas { display: flex; flex-wrap: wrap; gap: 6px; }
.wh-area { display: inline-flex; flex-direction: column; gap: 1px; padding: 5px 10px 5px 22px; position: relative; border-radius: var(--r-md); background: var(--surface-sunken); border: 1px solid var(--line); font-size: var(--fs-sm); color: var(--ink); line-height: var(--lh-snug); max-width: 100%; }
.wh-area .wh-dot { position: absolute; left: 9px; top: 11px; }
.wh-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--g, var(--ink-4)); display: inline-block; flex: 0 0 7px; }
.wh-area i { font-style: normal; font-size: var(--fs-2xs); color: var(--ink-3); }
.wh-area small { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-xs); color: var(--ink-3); }
.wh-area small svg { width: 11px; height: 11px; }
.wh-open th .wh-name b { color: var(--warn-strong); }
.wh-q { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-muted); color: var(--warn-strong); flex: 0 0 28px; } .wh-q svg { width: 15px; height: 15px; }
button.wh-area.open { flex-direction: row; align-items: center; gap: 4px; padding-left: 10px; border-style: dashed; border-color: var(--warn); background: transparent; color: var(--warn-strong); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
button.wh-area.open:hover { background: var(--surface-hover); } button.wh-area.open svg { width: 13px; height: 13px; }
.wh-legend { display: flex; flex-wrap: wrap; gap: var(--sp-3); padding: var(--sp-2) var(--sp-4); border-top: 1px solid var(--line); background: var(--surface-sunken); }
.wh-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cs-post { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-xs); color: var(--ink-3); margin-left: var(--sp-2); } .cs-post svg { width: 11px; height: 11px; }
.er-where { display: flex; gap: 6px; margin-bottom: 6px; }
.er-mini { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; min-width: 0; color: var(--ink-3); }
.er-mini svg { width: 14px; height: 14px; flex: 0 0 14px; }
.er-mini.time { flex: 0 0 auto; } .er-mini.time .input { width: 104px; }
.er-mini .input { min-width: 0; width: 100%; }
/* positions */
.pm { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--sp-3); align-items: start; }
.pm-stage-wrap { padding: var(--sp-2); }
.pm-bar { display: flex; align-items: center; gap: var(--sp-2); padding: 2px 4px var(--sp-2); }
.pm-bar .strong svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.pm-hint { margin: 0 4px var(--sp-2); }
.pm-stage { position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--surface-sunken); user-select: none; touch-action: none; }
.pm-stage img { display: block; width: 100%; height: auto; pointer-events: none; }
.pm-stage.placing { cursor: crosshair; outline: 2px solid var(--accent); outline-offset: -2px; }
.pm-pin { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; padding: 0; cursor: grab; font: inherit; touch-action: none; }
.pm-pin span { width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--g, var(--accent)); box-shadow: var(--shadow-md); border: 2px solid var(--surface); display: grid; place-items: center; order: 2; }
.pm-pin span b { transform: rotate(45deg); color: var(--on-accent); font-size: var(--fs-2xs); font-weight: var(--fw-bold); }
.pm-pin em { order: 1; font-style: normal; font-size: var(--fs-2xs); font-weight: var(--fw-semibold); background: var(--surface); color: var(--ink); padding: 1px 6px; border-radius: var(--r-pill); box-shadow: var(--shadow-sm); white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.pm-pin.dragging { cursor: grabbing; z-index: 2; } .pm-pin.dragging span { box-shadow: var(--shadow-lg); }
.pm-pin:focus-visible span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pm-side { padding: var(--sp-3); max-height: 76vh; overflow: auto; }
.pm-side-h { display: flex; flex-direction: column; margin-bottom: var(--sp-2); }
.pm-post + .pm-post { margin-top: var(--sp-3); }
.pm-post h4 { display: flex; align-items: center; gap: 5px; margin: 0 0 4px; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--ink-2); text-transform: uppercase; letter-spacing: var(--ls-caps); }
.pm-post h4 svg { width: 13px; height: 13px; flex: 0 0 13px; }
.pm-c { font-weight: var(--fw-medium); color: var(--ink-4); }
.pm-post ul { list-style: none; margin: 0; padding: 0; }
.pm-item { display: flex; align-items: center; gap: var(--sp-2); padding: 6px 4px; border-radius: var(--r-sm); }
.pm-item:hover { background: var(--surface-hover); } .pm-item.placing { background: var(--surface-selected); }
.pm-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 22px; background: var(--g, var(--accent)); color: var(--on-accent); font-size: var(--fs-2xs); font-weight: var(--fw-bold); }
.pm-n.off { background: transparent; color: var(--ink-3); border: 1.5px dashed var(--g, var(--line-2)); }
.pm-thumb { width: 36px; height: 28px; object-fit: cover; border-radius: var(--r-2xs); }
@media (max-width: 900px) { .pm { grid-template-columns: minmax(0, 1fr); } .pm-side { max-height: none; } }
@media (max-width: 640px) {
  .od-views { width: 100%; } .od-views button { flex: 1; justify-content: center; padding: 0 6px; font-size: var(--fs-xs); }
  .wh-table thead { display: none; }
  .wh-table, .wh-table tbody, .wh-table tr, .wh-table th, .wh-table td { display: block; width: 100%; }
  .wh-table tbody th { border-bottom: 0; padding-bottom: var(--sp-1); } .wh-table tbody td { padding-top: 0; }
  .er-where { flex-wrap: wrap; } .er-mini.time .input { width: 100%; }
}
@media print { .od-nav .seg, .pm-bar button, .pm-hint, [data-pinmenu] { display: none !important; } .wh-table tbody tr:hover { background: none; } }

/* ---------------------------------------------------------------- Files: a project's own folders (2026-11-10) */
.fl-std { margin-left: 6px; font-weight: var(--fw-regular); }
.fl-hidden { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--sp-3); }
.fl-hidden > svg { width: 14px; height: 14px; }
.fl-hid { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border: 1px dashed var(--line-2); border-radius: var(--r-pill); }

/* ---------------------------------------------------------------- Agenda: a series' own days (2026-11-10) */
.ag-days button .ag-dev { display: block; font-size: var(--fs-2xs); color: var(--ink-3); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-daysnote { display: flex; flex-wrap: wrap; gap: 4px var(--sp-4); margin-top: var(--sp-2); }
.ag-daysnote > span { display: inline; }
.ag-daysnote > span > svg { vertical-align: -2px; margin-right: 4px; }
.ag-daysnote svg { width: 13px; height: 13px; }
.ag-days button:has(.ag-dev) i { grid-row: 1 / span 3; } .ag-days button .ag-dev { grid-column: 1; }
.btn .tool-logo.sm { width: 16px; height: 16px; border-radius: var(--r-2xs); }

/* ---------------------------------------------------------------- On the day, printed (2026-11-10) */
.od-print .od-pr td { vertical-align: top; }
.od-print .od-pr td > div + div { margin-top: 2px; }
.od-pr-sub { font-size: 8.5pt; color: var(--doc-ink); opacity: .7; }
.od-pr-day { font-size: 8pt; font-weight: var(--fw-regular); opacity: .7; }
.od-pr-open td { color: var(--doc-ink); font-style: italic; }
.od-pr-none { font-style: italic; opacity: .7; }
.od-pr-plan { break-before: page; }
.od-pr-stage { position: relative; border: 1px solid var(--doc-line); margin-top: 4mm; }
.od-pr-stage img { display: block; width: 100%; height: auto; }
.od-pr-pin { position: absolute; transform: translate(-50%, -50%); width: 6mm; height: 6mm; border-radius: 50%; background: var(--doc-ink); color: var(--surface); font-size: 8pt; font-weight: var(--fw-bold); display: grid; place-items: center; border: 1.5px solid var(--surface); print-color-adjust: exact; -webkit-print-color-adjust: exact; }

/* ---------------------------------------------------------------- On the day: the compact checklist (2026-11-10) */
.cs-list { padding: 0; overflow: hidden; }
.cs-sec + .cs-sec { border-top: 1px solid var(--line); }
.cs-sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-2); margin: 0; padding: var(--sp-2) var(--sp-4); background: var(--surface-sunken); font-size: var(--fs-xs); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: var(--ls-caps); color: var(--ink-2); border-bottom: 1px solid var(--line); }
.cs-sec-n { font-weight: var(--fw-medium); text-transform: none; letter-spacing: normal; color: var(--ink-3); }
.cs-sec ul { list-style: none; margin: 0; padding: 0; }
.cs-row { display: grid; grid-template-columns: auto minmax(160px, 1.1fr) minmax(150px, 1fr) auto; align-items: center; gap: 4px var(--sp-3); padding: 8px var(--sp-4); border-bottom: 1px solid var(--line); }
.cs-row:last-child { border-bottom: 0; }
.cs-row:hover { background: var(--surface-hover); }
.cs-row.open { background: color-mix(in srgb, var(--warn) 7%, transparent); }
.cs-row.issue { box-shadow: inset 3px 0 0 var(--danger); }
.cs-row.ticked .cs-r-main b { color: var(--ink-3); }
.cs-r-tick { display: flex; align-items: center; min-width: 24px; }
.cs-r-tick .cs-dticks { margin: 0; max-width: 150px; }
.cs-r-tick .cs-tick { margin: 0; }
.cs-r-main { min-width: 0; }
.cs-r-main b { font-size: var(--fs-sm); }
.cs-r-main .cs-day { margin-left: 6px; }
.cs-r-sub { display: flex; flex-wrap: wrap; gap: 2px var(--sp-3); font-size: var(--fs-xs); color: var(--ink-3); margin-top: 1px; }
.cs-r-sub span { display: inline-flex; align-items: center; gap: 3px; } .cs-r-sub svg { width: 11px; height: 11px; }
.cs-r-who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.cs-r-who .as-chip { height: 24px; font-size: var(--fs-xs); }
.cs-r-who .as-chip .av { --s: 18px; }
.cs-r-meta { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.cs-chip { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border-radius: var(--r-pill); background: var(--surface-muted); color: var(--ink-3); font-size: var(--fs-2xs); font-weight: var(--fw-semibold); white-space: nowrap; }
.cs-chip svg { width: 11px; height: 11px; }
.cs-chip.late { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); } .cs-chip.ok { color: var(--ok-strong); }
.cs-r-detail { grid-column: 2 / -1; padding: 4px 0 4px; }
.cs-r-detail .cs-detail { grid-column: auto; }
.cs-list-foot { padding: var(--sp-2) var(--sp-4); border-top: 1px solid var(--line); background: var(--surface-sunken); display: flex; align-items: center; gap: 6px; }
.cs-list-foot svg { width: 12px; height: 12px; }
@media (max-width: 760px) {
  .cs-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .cs-r-who { grid-column: 2 / -1; grid-row: 2; }
  .cs-r-detail { grid-column: 1 / -1; }
}
.od-print .od-pr tr.od-pr-cont td { border-top-style: dotted; }

/* ---------------------------------------------------------------- Booth Design Bank: options with preview and price (2026-11-10) */
.bo-empty { padding: var(--sp-3); border: 1px dashed var(--line-2); border-radius: var(--r-md); }
.bo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--sp-3); }
.bo-card { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface); display: flex; flex-direction: column; min-width: 0; }
.bo-prev { display: block; aspect-ratio: 16 / 10; width: 100%; border: 0; padding: 0; background: var(--surface-sunken); cursor: zoom-in; }
.bo-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bo-prev span { display: flex; height: 100%; align-items: center; justify-content: center; gap: 6px; color: var(--ink-3); font-size: var(--fs-xs); }
.bo-prev svg { width: 16px; height: 16px; }
.bo-body { padding: var(--sp-2) var(--sp-3) var(--sp-3); display: flex; flex-direction: column; gap: 4px; }
.bo-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); min-width: 0; }
.bo-price { font-weight: var(--fw-bold); font-size: var(--fs-sm); white-space: nowrap; color: var(--ink); }
.bo-note { margin: 2px 0 0; color: var(--ink-2); }
.bo-lines summary { cursor: pointer; color: var(--accent); }
.bo-tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); margin-top: 4px; }
.bo-tbl td { padding: 3px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.bo-tbl td.num { text-align: right; }
.bo-sum td { border-bottom: 0; font-weight: var(--fw-semibold); }
.bo-act { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.bo-pics { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bo-pic { width: 84px; height: 56px; border-radius: var(--r-sm); border: 2px solid var(--line); padding: 0; overflow: hidden; background: var(--surface-sunken); cursor: pointer; }
.bo-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bo-pic.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--tint-accent); }
.bo-pic.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: var(--fs-2xs); color: var(--ink-3); border-style: dashed; }
.bo-pic.add svg { width: 14px; height: 14px; }
.bo-ed-tbl { width: 100%; border-collapse: collapse; }
.bo-ed-tbl th { text-align: left; font-size: var(--fs-2xs); font-weight: var(--fw-semibold); color: var(--ink-3); padding: 0 4px 4px; }
.bo-ed-tbl td { padding: 2px 4px; }
.bo-ed-tbl td:nth-child(2) .input { width: 64px; } .bo-ed-tbl td:nth-child(3) .input { width: 72px; } .bo-ed-tbl td:nth-child(4) .input { width: 120px; }
.bo-ed-tbl .num { text-align: right; }
.bo-ed-tbl tfoot td { padding-top: 6px; }
@media (max-width: 640px) { .bo-ed-tbl thead { display: none; } .bo-ed-tbl tr { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; } .bo-ed-tbl td:first-child { flex: 1 1 100%; } }
.bo-q { color: var(--ink-3); font-size: var(--fs-2xs); }

/* ---------------------------------------------------------------- On the day by session (2026-11-10) */
.cs-sess { display: inline-flex; align-items: center; margin-left: 6px; padding: 0 7px; height: 18px; border-radius: var(--r-pill); background: var(--accent-bg); color: var(--accent-ink); font-size: var(--fs-2xs); font-weight: var(--fw-semibold); white-space: nowrap; vertical-align: 1px; }
.ss { padding: 0; overflow: hidden; }
.ss-warn { margin: var(--sp-3); }
.ss-warn > div { display: flex; flex-direction: column; gap: 2px; }
.ss-scroll { overflow-x: auto; }
.ss-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.ss-table th, .ss-table td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; font-size: var(--fs-sm); }
.ss-table td + td, .ss-table th + th, .ss-table td + th { border-left: 1px solid var(--line); }
.ss-table thead th { background: var(--surface-sunken); font-weight: var(--fw-semibold); font-size: var(--fs-xs); }
.ss-table thead th span { display: block; font-weight: var(--fw-regular); color: var(--ink-3); }
.ss-table tbody th[scope="row"] { font-weight: var(--fw-semibold); width: 22%; min-width: 160px; }
.ss-table .ss-whole { background: color-mix(in srgb, var(--surface-sunken) 60%, transparent); }
.ss-band th { background: var(--surface-sunken); font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: var(--ls-caps); color: var(--ink-3); padding: 4px 8px; }
.ss-p { display: inline-flex; align-items: center; gap: 2px; margin: 0 4px 4px 0; padding: 1px 4px 1px 8px; border-radius: var(--r-pill); background: var(--surface-muted); font-size: var(--fs-xs); font-weight: var(--fw-medium); white-space: nowrap; }
.ss-p.clash { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.ss-p button { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 0; padding: 0; border-radius: 50%; background: none; color: var(--ink-3); cursor: pointer; }
.ss-p button:hover { background: var(--surface-hover); } .ss-p button svg { width: 10px; height: 10px; }
.ss-add { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px dashed var(--line-2); border-radius: 50%; background: none; color: var(--ink-3); cursor: pointer; vertical-align: top; opacity: .55; }
.ss-table td:hover .ss-add, .ss-add:focus-visible { opacity: 1; }
@media (hover: hover) { .ss-add { opacity: 0; } .ss-table tr:hover .ss-add { opacity: .55; } .ss-table td:hover .ss-add { opacity: 1; } }
.ss-add svg { width: 12px; height: 12px; }
.ss-foot { padding: var(--sp-2) var(--sp-4); background: var(--surface-sunken); border-top: 1px solid var(--line); }
.ss-cross { padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.ss-cr { display: grid; grid-template-columns: 140px minmax(0, 1fr) minmax(0, 240px); gap: var(--sp-3); align-items: center; }
.ss-crn { font-size: var(--fs-sm); font-weight: var(--fw-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-cr.clash .ss-crn { color: var(--danger); }
.ss-bar { position: relative; height: 20px; border-radius: var(--r-sm); background: var(--surface-sunken); }
.ss-bar i { position: absolute; top: 2px; bottom: 2px; border-radius: var(--r-xs); background: color-mix(in srgb, var(--accent) 70%, transparent); overflow: hidden; }
.ss-cr.clash .ss-bar i { background: color-mix(in srgb, var(--danger) 55%, transparent); }
.ss-bar i span { display: block; padding: 0 4px; font-size: var(--fs-3xs); font-style: normal; color: var(--on-accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: var(--lh-none); padding-top: 3px; }
@media (max-width: 640px) { .ss-cr { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.od-print .od-pr-ss td { font-size: 8.5pt; }

/* Agenda › Share: several client links, each for every day or some days (2026-11-12) */
.ag-shrow { display: grid; gap: var(--sp-2); padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); min-width: 0; }
.ag-shrow-head, .ag-shrow-foot { display: flex; align-items: center; gap: var(--sp-2) var(--sp-3); flex-wrap: wrap; min-width: 0; }
.ag-shform { border-style: dashed; }
.ag-shdays { display: grid; gap: var(--sp-1); }

/* 2026-11-12: "Almost there" badges on Home's quests card */
.bdg-near a { padding: var(--sp-2) 0; color: var(--ink); border-top: 1px solid var(--line); text-decoration: none; }
.bdg-near a:hover b { color: var(--accent-ink); }

/* ============================================================================================================
   2026-11-13 · POE: the sorter, place by time, what is left, one section at a time (views/poe.js, poe-sort-ui.js)
   ============================================================================================================ */
/* the upload's progress, in Unsorted photos */
.poe-up { padding: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-3); border-radius: var(--r-md); background: var(--accent-bg); }
.poe-item.flash { box-shadow: var(--ring); }

/* "To finish": the report's own checklist, at the top of the side panel */
.poe-fin { flex: none; display: flex; flex-direction: column; gap: var(--sp-2); }
.poe-fin-head { display: flex; align-items: center; gap: var(--sp-2); width: 100%; padding: 0; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; text-align: left; border-radius: var(--r-sm); }
.poe-fin-head:focus-visible { outline: none; box-shadow: var(--ring); }
.poe-fin-head b { font-size: var(--fs-md); }
.poe-fin-head span { margin-left: auto; }
.poe-fin-head svg { width: 14px; height: 14px; color: var(--ink-3); flex: none; }
.poe-fin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.poe-fin-list li { display: flex; align-items: flex-start; gap: var(--sp-2); padding: var(--sp-2); border-radius: var(--r-md); }
.poe-fin-list li > div { display: flex; flex-direction: column; gap: 2px; }
.poe-fin-list li b { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.poe-fin-list li.done b { color: var(--ink-3); font-weight: var(--fw-regular); }
.poe-fin-list li.next { background: var(--accent-bg); }
.poe-fin-ic { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: var(--r-pill); display: grid; place-items: center; font-size: var(--fs-2xs); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; background: var(--surface-sunken); color: var(--ink-3); }
.poe-fin-ic svg { width: 12px; height: 12px; }
.poe-fin-list li.done .poe-fin-ic { background: var(--ok-strong); color: var(--on-accent); }
.poe-fin-list li.next .poe-fin-ic { background: var(--accent); color: var(--on-accent); }
.poe-fin-act { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-1); }
.poe-fin-act:empty { display: none; }
.poe-fin-next { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-2); }

/* Sort photos: the unsorted photos beside every moment */
html.srt-open { overflow: hidden; }
.srt { position: fixed; inset: 0; z-index: var(--z-drawer); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--surface-sunken); animation: fade-in var(--t-fast) var(--ease-out); }
.srt.out { animation: fade-out var(--t-fast) var(--ease-in) forwards; }
.srt-top { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); background: var(--surface); border-bottom: 1px solid var(--line); }
.srt-top h2 { margin: 0; font-size: var(--fs-lg); }
.srt-body { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 360px; min-height: 0; }
.srt-grid { overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--sp-4) var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); }
.srt-run-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); padding: var(--sp-3) 0 var(--sp-2); background: var(--surface-sunken); }
.srt-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: var(--sp-2); }
.srt-ph { position: relative; padding: 0; aspect-ratio: 4 / 3; overflow: hidden; border: 2px solid transparent; border-radius: var(--r-md); background: var(--surface-muted); cursor: pointer; }
.srt-ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.srt-ph:focus-visible { outline: none; box-shadow: var(--ring); }
.srt-ph.picked { border-color: var(--accent); }
.srt-t { position: absolute; left: var(--sp-1); bottom: var(--sp-1); padding: 1px 6px; border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); font-size: var(--fs-2xs); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }
.srt-tick { position: absolute; right: var(--sp-1); top: var(--sp-1); width: 22px; height: 22px; border-radius: var(--r-pill); display: grid; place-items: center; background: var(--surface); border: 1.5px solid var(--line-2); color: transparent; }
.srt-tick svg { width: 13px; height: 13px; }
.srt-ph.picked .srt-tick { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.srt-side { display: flex; flex-direction: column; gap: var(--sp-2); min-height: 0; padding: var(--sp-4); background: var(--surface); border-left: 1px solid var(--line); }
.srt-side-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.srt-back, .srt-choose { display: none; }
.srt-hint { margin: 0; }
.srt-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; display: flex; flex-direction: column; gap: 2px; }
.srt-sec { padding: var(--sp-3) var(--sp-2) var(--sp-1); font-size: var(--fs-2xs); font-weight: var(--fw-bold); text-transform: uppercase; color: var(--ink-3); }
.srt-m { display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: 44px; padding: var(--sp-1) var(--sp-2); border: 1px solid transparent; border-radius: var(--r-md); background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.srt-m > .grow { display: flex; flex-direction: column; }
.srt-m:hover:not(:disabled) { background: var(--surface-hover); }
.srt-m:focus-visible { outline: none; box-shadow: var(--ring); }
.srt-m.fit, .srt-m.drop { background: var(--accent-bg); border-color: var(--line-accent); }
.srt-m:disabled { cursor: default; }
.srt-m-t { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.srt-fit { color: var(--accent-ink); }
.srt-key { flex: none; width: 20px; height: 20px; border-radius: var(--r-xs); display: grid; place-items: center; background: var(--surface-sunken); color: var(--ink-3); font-size: var(--fs-2xs); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.srt-key:empty { visibility: hidden; }
.srt-mini { display: flex; flex: none; gap: 2px; }
.srt-mini img { width: 26px; height: 26px; object-fit: cover; border-radius: var(--r-xs); }
.srt-count { flex: none; min-width: 22px; text-align: right; font-size: var(--fs-sm); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.srt-count.zero { color: var(--ink-3); font-weight: var(--fw-regular); }
.srt-bar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); background: var(--surface); border-top: 1px solid var(--line); }
.srt-keys { margin-left: auto; }
.srt-empty { margin: auto; max-width: 420px; padding: var(--sp-4); display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); text-align: center; }
.srt-empty p { margin: 0; }
@media (max-width: 820px) {
  .srt-body { grid-template-columns: minmax(0, 1fr); }
  .srt-side { display: none; position: absolute; inset: auto 0 0 0; z-index: 2; max-height: 80%; border-left: 0; border-top: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow-lg); }
  .srt.choosing .srt-side { display: flex; }
  .srt-back, .srt-choose { display: inline-flex; }
  .srt-keys { display: none; }
  .srt-tiles { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .srt-grid { padding: 0 var(--sp-3) var(--sp-3); }
}

/* Place by time: what it would do, before it does it */
.plc { display: flex; flex-direction: column; gap: var(--sp-3); }
.plc p { margin: 0; }
.plc-list { list-style: none; margin: 0; padding: 0; }
.plc-list li { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.plc-ok { flex: none; width: 20px; height: 20px; border-radius: var(--r-pill); display: grid; place-items: center; background: var(--ok-strong); color: var(--on-accent); }
.plc-ok svg { width: 12px; height: 12px; }
.plc-thumbs { display: flex; flex: none; align-items: center; gap: 2px; }
.plc-thumbs img { width: 36px; height: 28px; object-fit: cover; border-radius: var(--r-xs); }
.plc-thumbs i { padding-left: var(--sp-1); font-style: normal; font-size: var(--fs-2xs); color: var(--ink-3); }
.plc-n { flex: none; min-width: 76px; text-align: right; font-size: var(--fs-sm); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }
.plc-left { padding: var(--sp-3); border-radius: var(--r-md); background: var(--surface-sunken); }
.plc-left ul { margin: var(--sp-1) 0 0; padding-left: var(--sp-4); font-size: var(--fs-sm); color: var(--ink-2); }
.plc-opt { align-items: flex-start; }
.plc-clock summary { cursor: pointer; color: var(--accent); font-weight: var(--fw-semibold); }
@media (max-width: 640px) { .plc-thumbs { display: none; } }

/* ============================================================================================================
   2026-11-13 · The race: leaderboard, champions and trophies, challenges, project stars (views/leaderboard.js …)
   ============================================================================================================ */
/* The board: a podium of three, the two people either side of you, your bests, and the rest by name only */
.rc-podium { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-3); }
.rc-pod { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); padding: var(--sp-4) var(--sp-3); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; text-align: center; min-width: 0; }
.rc-pod:hover { border-color: var(--line-2); text-decoration: none; }
.rc-pod.me { background: var(--surface-selected); }
.rc-pod.p1 { border-color: var(--medal-gold); }
.rc-pod .lb-rank { width: 26px; height: 26px; flex: none; }
.rc-pod-who, .rc-pod-score { display: flex; flex-direction: column; min-width: 0; max-width: 100%; }
.rc-pod-who b { font-size: var(--fs-lg); }
.rc-pod-score b { font-family: var(--font-display); font-size: var(--fs-3xl); font-weight: var(--fw-bold); line-height: var(--lh-tight); font-variant-numeric: tabular-nums; }
.rc-pod-from { max-width: 100%; }
.rc-around { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.rc-around li { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2); border-bottom: 1px solid var(--line); font-size: var(--fs-sm); min-width: 0; }
.rc-around li:last-child { border-bottom: 0; }
.rc-around li.me { background: var(--surface-selected); border-radius: var(--r-sm); border-bottom-color: transparent; }
.rc-bests { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); padding: var(--sp-1) var(--sp-2) var(--sp-2); }
.rc-best { display: grid; gap: var(--sp-1); min-width: 0; }
.rc-best b { font-family: var(--font-display); font-size: var(--fs-2xl); line-height: var(--lh-tight); font-variant-numeric: tabular-nums; }
.rc-rest { font-size: var(--fs-sm); color: var(--ink-2); line-height: var(--lh-normal); }
@media (max-width: 640px) {
  .rc-podium { grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); }
  .rc-pod { flex-direction: row; text-align: left; padding: var(--sp-3); gap: var(--sp-3); }
  .rc-pod-who { flex: 1 1 0; }
  .rc-pod-score { align-items: flex-end; flex: none; }
  .rc-pod-score b { font-size: var(--fs-xl); }
  .rc-pod-from { display: none; }
}
/* Where you stand (Home, My points): a short list of plain lines, a label and what it says */
.rc-lines { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.rc-lines li { display: flex; align-items: baseline; gap: var(--sp-3); padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); min-width: 0; }
.rc-lines li:last-child { border-bottom: 0; }
.rc-k { flex: 0 0 84px; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--ink-3); }
.rc-v { min-width: 0; color: var(--ink); }
.rc-v a { color: var(--accent-ink); }
.rc-bests.three { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; }
@media (max-width: 640px) { .rc-bests.three { grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); } }
/* Trophies: a short shelf (My points, the person drawer), and the two special winners under a month's top three */
.rc-shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--sp-2); }
.rc-trophy { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); min-width: 0; }
.rc-trophy > svg { width: 18px; height: 18px; flex: none; color: var(--ink-3); }
.rc-trophy.p1 > svg { color: var(--medal-gold-ink); } .rc-trophy.p2 > svg { color: var(--medal-silver-ink); } .rc-trophy.p3 > svg { color: var(--medal-bronze-ink); }
.rc-trophy-tx { display: flex; flex-direction: column; min-width: 0; }
.rc-also { list-style: none; margin: var(--sp-2) 0 0; padding: var(--sp-2) var(--sp-2) 0; border-top: 1px solid var(--line); display: grid; gap: var(--sp-1); font-size: var(--fs-sm); }
.rc-also li { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.rc-also svg { width: 14px; height: 14px; flex: none; color: var(--ink-3); }
/* The board's tabs: five of them scroll inside their own strip on a phone, never the page */
.rc-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.rc-tabs::-webkit-scrollbar { display: none; }
.rc-tabs button { flex: none; }
.rc-pad { padding: 0 var(--sp-2) var(--sp-2); }
/* Project stars: three small stars (filled when earned), the facts in a popover */
.rc-stars { display: inline-flex; align-items: center; gap: 2px; min-height: 28px; padding: 0 var(--sp-2); border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-4); font: inherit; cursor: pointer; flex: none; }
.rc-stars:hover { border-color: var(--line-2); }
.rc-stars:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rc-stars i { display: inline-grid; place-items: center; }
.rc-stars svg { width: 15px; height: 15px; }
.rc-stars i.on { color: var(--medal-gold-ink); }
.rc-stars i.on svg { fill: currentColor; }
.rc-stars .small { margin-left: var(--sp-1); color: var(--ink-2); font-variant-numeric: tabular-nums; }
/* on a project's night header, like its tags */
.phead .rc-stars { background: color-mix(in srgb, var(--on-stage) 16%, transparent); border-color: transparent; color: color-mix(in srgb, var(--on-stage) 55%, transparent); }
.phead .rc-stars i.on { color: var(--medal-gold); }
.phead .rc-stars .small { color: var(--on-stage); }
.rc-facts { display: grid; gap: var(--sp-2); padding: var(--sp-1); }
.rc-facts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.rc-facts li { display: flex; align-items: flex-start; gap: var(--sp-2); }
.rc-facts li > svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--ink-4); }
.rc-facts li.on > svg { color: var(--medal-gold-ink); fill: currentColor; }
.rc-facts li > span { display: flex; flex-direction: column; min-width: 0; }
/* The Projects tab: finished projects, newest first, each with its stars */
.rc-projects { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.rc-projects li { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2); border-bottom: 1px solid var(--line); min-width: 0; }
.rc-projects li:last-child { border-bottom: 0; }
.rc-proj-who { display: flex; flex-direction: column; min-width: 0; }
.rc-proj-why { flex: 0 1 220px; text-align: right; }
/* Challenges: a card each; squads as a short list */
.rc-chal .card-head h3 { min-width: 0; }
.rc-squads { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.rc-squads li { padding: var(--sp-2); border: 1px solid var(--line); border-radius: var(--r-sm); min-width: 0; }
.rc-squads li.me { background: var(--surface-selected); }
.rc-past > summary { cursor: pointer; color: var(--ink-2); font-weight: var(--fw-semibold); }
@media (max-width: 640px) {
  .rc-projects li { flex-wrap: wrap; }
  .rc-proj-why { flex-basis: 100%; text-align: left; }
}
/* (the race: more rules above this line) */

/* ============================================================================================================
   2026-11-13 · Resource banks: folders, stars, shortlists, one search (views/banks.js, views/bank.js …)
   ============================================================================================================ */
/* Words: a bank's automatic groupings are folders (read from the entries' own fields), the lists people make by hand
   are shortlists, a person's own marks are stars. Class prefix: bkf-. */

/* --- the hub: one search over every bank, then stars, recents, shortlists and the banks in four families */
.bkf-search { max-width: 720px; margin: 0 0 var(--sp-2); }
.bkf-search .input { min-height: 46px; padding-left: 44px !important; font-size: var(--fs-md); border-radius: var(--r-pill); }
.bkf-search svg { left: 16px; width: 18px; height: 18px; }
.bkf-sec-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); margin: var(--sp-6) 0 var(--sp-3); }
.bkf-sec-head h2 { margin: 0; font-size: var(--fs-lg); font-weight: var(--fw-semibold); }
.bkf-sec-head .sub { font-size: var(--fs-sm); color: var(--ink-3); }
.bkf-sec-head .end { margin-left: auto; }
.bkf-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: var(--sp-2); }
.bkf-mini { display: flex; align-items: center; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); transition: border-color var(--t-fast) var(--ease-std), box-shadow var(--t-fast) var(--ease-std); }
.bkf-mini:hover, .bkf-mini:focus-within { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.bkf-mini-a { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2); border-radius: inherit; color: var(--ink); }
.bkf-mini-a:hover { text-decoration: none; }
.bkf-mini-ph { position: relative; flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; overflow: hidden; border-radius: var(--r-sm); background: var(--surface-muted); color: var(--ink-3); }
.bkf-mini-ph svg { width: 20px; height: 20px; }
.bkf-mini-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bkf-mini-t { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bkf-mini-t b { font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.bkf-mini > .btn { flex: none; margin-right: var(--sp-1); }
.bkf-lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: var(--sp-3); }
.bkf-sl { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); transition: border-color var(--t-fast) var(--ease-std), box-shadow var(--t-fast) var(--ease-std); }
.bkf-sl:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); text-decoration: none; }
.bkf-sl b { font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.bkf-sl-new { align-items: flex-start; justify-content: center; gap: var(--sp-2); min-height: 76px; border-style: dashed; box-shadow: none; background: transparent; color: var(--accent); font: inherit; font-weight: var(--fw-semibold); text-align: left; cursor: pointer; }
.bkf-sl-new:hover { box-shadow: none; border-color: var(--line-hover); background: var(--accent-bg); }
.bkf-sl-new .row svg { width: 16px; height: 16px; }
.bkf-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-1); }
.bkf-thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-xs); background: var(--surface-muted); }
.bank-tile .bkf-foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.bkf-fam + .bank-hub { margin-bottom: var(--sp-2); }
.bkf-group { margin-bottom: var(--sp-5); }
.bkf-group-h { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); color: var(--ink); font-weight: var(--fw-semibold); }
.bkf-group-h:hover { text-decoration: none; }
.bkf-group-h:hover .more { text-decoration: underline; }
.bkf-group-h svg { width: 16px; height: 16px; color: var(--ink-3); }
.bkf-group-h .cnt { color: var(--ink-3); font-weight: var(--fw-medium); font-variant-numeric: tabular-nums; }
.bkf-group-h .more { margin-left: auto; font-size: var(--fs-sm); color: var(--accent); }

/* --- one bank: the folder rail beside the list */
.bkf-layout { display: grid; grid-template-columns: 256px minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
.bkf-main { min-width: 0; }
.bkf-rail { position: sticky; top: calc(var(--top-h) + 12px); max-height: calc(100vh - var(--top-h) - 28px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.bkf-folders { display: flex; flex-direction: column; gap: 2px; }
.bkf-rail-h { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); min-height: 24px; margin: var(--sp-3) var(--sp-2) 2px; font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-3); }
.bkf-rail-h .seg { text-transform: none; letter-spacing: 0; }
.bkf-f { display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: 32px; padding: 5px var(--sp-2); border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-2); font: inherit; font-size: var(--fs-md); font-weight: var(--fw-medium); text-align: left; cursor: pointer; }
.bkf-f:hover { background: var(--accent-bg); }
.bkf-f.on { background: var(--accent-bg); color: var(--accent-ink); font-weight: var(--fw-semibold); }
.bkf-f > svg { flex: none; width: 15px; height: 15px; color: var(--ink-4); }
.bkf-f.on > svg { color: var(--accent); }
.bkf-f .lbl { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bkf-f .cnt { flex: none; font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bkf-f.on .cnt { color: inherit; }
.bkf-f.sub { min-height: 28px; padding-left: calc(var(--sp-2) + 23px); font-size: var(--fs-sm); }
.bkf-f.add { color: var(--accent); font-weight: var(--fw-semibold); }
.bkf-f.add > svg { color: var(--accent); }
.bkf-foldbtn { display: none; }
.bkf-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-3); }
.bkf-chips:empty { display: none; }
.bkf-chips .chip { max-width: 100%; }
.bkf-chips .chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bkf-ghead { display: flex; align-items: center; gap: var(--sp-2); width: 100%; margin: var(--sp-5) 0 var(--sp-2); padding: var(--sp-1) 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.bkf-ghead:first-child { margin-top: 0; }
.bkf-ghead b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.bkf-ghead .cnt { flex: none; font-size: var(--fs-sm); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bkf-ghead svg { flex: none; width: 16px; height: 16px; color: var(--ink-3); }
.tbl tr.bkf-grow td { padding-top: var(--sp-3); background: var(--surface-sunken); }
.tbl tr.bkf-grow .bkf-ghead { margin: 0; }

/* --- on a card: the star and the menu (quiet until the card is pointed at; a star that is on always shows) */
.bcard { position: relative; }
.bkf-tools { position: absolute; top: var(--sp-2); right: var(--sp-2); z-index: 1; display: flex; gap: var(--sp-1); }
.dcard .bkf-tools { right: auto; left: var(--sp-2); }
.bkf-star, .bkf-more { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-3); cursor: pointer; transition: color var(--t-fast) var(--ease-std), border-color var(--t-fast) var(--ease-std), opacity var(--t-fast) var(--ease-std); }
.bkf-star svg, .bkf-more svg { width: 16px; height: 16px; }
.bkf-star:hover, .bkf-more:hover { color: var(--ink); border-color: var(--line-2); }
.bkf-star.on { color: var(--warn-solid); }
.bkf-star.on svg { fill: currentColor; }
@media (hover: hover) {
  .bkf-tools > :not(.on) { opacity: 0; }
  .bcard:hover .bkf-tools > *, .bcard:focus-within .bkf-tools > *, .dcard:hover .bkf-tools > *, .dcard:focus-within .bkf-tools > * { opacity: 1; }
}
.bkf-pick { position: absolute; top: var(--sp-2); left: var(--sp-2); z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); }
.bkf-pick input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.bcard.picked { border-color: var(--line-accent); box-shadow: 0 0 0 3px var(--accent-bg), var(--shadow-sm); }
.tbl td.bkf-cell { width: 1%; white-space: nowrap; text-align: right; }
.tbl td.bkf-cell .bkf-star, .tbl td.bkf-cell .bkf-more { width: 26px; height: 26px; border-color: transparent; background: transparent; vertical-align: middle; }
.bkf-rowpick { width: 16px; height: 16px; margin: 0 var(--sp-2) 0 0; vertical-align: middle; accent-color: var(--accent); }

/* --- the entry's drawer: its star and the shortlists it sits in */
.bkf-marks { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.bkf-marks .bkf-star { width: auto; height: var(--ctl-h-sm); padding: 0 var(--sp-3); gap: var(--sp-1); font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold); display: inline-flex; }
.bkf-marks .chip { gap: var(--sp-1); max-width: 100%; }
.bkf-marks .chip a { display: inline-flex; align-items: center; gap: var(--sp-1); min-width: 0; color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bkf-marks .chip .link-btn { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: -4px; color: var(--ink-3); }
.bkf-marks .chip .link-btn:hover { color: var(--ink); text-decoration: none; }

/* --- a shortlist's page */
.bkf-note { max-width: 720px; }

@media (max-width: 1023px) {
  .bkf-layout { grid-template-columns: minmax(0, 1fr); }
  .bkf-layout > .bkf-rail { display: none; }
  .bkf-foldbtn { display: inline-flex; max-width: 100%; }
  .bkf-foldbtn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 640px) {
  .bkf-row, .bkf-lists { grid-template-columns: minmax(0, 1fr); }
  .bkf-sec-head .end { margin-left: 0; }
  .bkf-f { min-height: 40px; } /* a finger, not a pointer */
  .bkf-f.sub { min-height: 36px; }
}

/* ---------------------------------------------------------------- Approvals, redrawn (2026-11-13): a review queue
   views/approvals.js. To decide is two panes: the list of what waits, and the one picked with what a decision needs and its
   buttons at the foot. No coloured edges, icon tiles or banners: the lane's count, the kind as a word and amber on what has waited
   a day are the only colour. Under 1000 px the list is the page and the picked one opens as a sheet. */
.apv-tabs { display: flex; gap: var(--sp-5); margin-bottom: var(--sp-4); border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.apv-tabs::-webkit-scrollbar { display: none; }
.apv-tab { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 10px 2px 11px; border: 0; background: none; color: var(--ink-3); font: inherit; font-size: var(--fs-md); font-weight: var(--fw-semibold); white-space: nowrap; cursor: pointer; transition: color var(--t-fast) var(--ease-std); }
.apv-tab:hover { color: var(--ink); }
.apv-tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); scale: 0 1; transition: scale var(--t-med) var(--ease-out); }
.apv-tab.on { color: var(--ink); }
.apv-tab.on::after { scale: 1 1; }
.apv-tab-n { min-width: 20px; padding: 1px 6px; border-radius: var(--r-pill); background: var(--surface-muted); color: var(--ink-2); font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-align: center; font-variant-numeric: tabular-nums; }
.apv-tab-n.wait { background: var(--warn-bg); color: var(--warn); }
.apv-tab-n[hidden] { display: none; }
.appr-sec .card-head h3 { font-size: var(--fs-md); }

.apv { display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
.apv-list { padding: var(--sp-2); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.apv-group { display: flex; align-items: center; gap: 6px; padding: 10px 10px 4px; font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-4); }
.apv-group:not(:first-child) { margin-top: var(--sp-2); padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.apv-group-n { color: var(--ink-3); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.apv-list .appr-bulk { margin: 2px 2px 4px; padding: 6px 8px; font-size: var(--fs-sm); }
.apv-item { display: flex; align-items: flex-start; flex-wrap: nowrap; justify-content: flex-start; gap: var(--sp-2); padding: 10px; border: 0; border-radius: var(--r-sm); cursor: pointer; overflow: hidden; outline: 0; transition: background var(--t-fast) var(--ease-std); }
.apv-item:hover { background: var(--surface-hover); }
.apv-item:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.apv-item.on { background: var(--surface-selected); }
.apv-item .appr-pick { margin-top: 2px; }
.apv-i-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.apv-i-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); min-width: 0; }
.apv-i-top .nt-kind { min-width: 0; }
.apv-i-when { flex: none; font-size: var(--fs-xs); color: var(--ink-4); font-variant-numeric: tabular-nums; }
.apv-i-title { font-size: var(--fs-md); font-weight: var(--fw-semibold); line-height: var(--lh-snug); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.apv-i-foot { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); min-width: 0; }
.apv-i-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-xs); color: var(--ink-3); }
.apv-i-amt { flex: none; font-size: var(--fs-sm); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }
.apv-i-flag { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--warn-strong); }
.apv-leave { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); font-size: var(--fs-sm); color: var(--ink-2); }
.apv-leave > span { flex: 1 1 320px; min-width: 0; }
.apv-done { display: grid; gap: 4px; justify-items: center; padding: 64px var(--sp-4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-align: center; color: var(--ink-3); font-size: var(--fs-md); animation: card-in 220ms var(--ease-out) backwards; }
.apv-done b { color: var(--ink); font-size: var(--fs-lg); }

/* the one picked */
.apv-panel { position: sticky; top: calc(var(--top-h) + 12px); display: flex; flex-direction: column; min-width: 0; max-height: calc(100dvh - var(--top-h) - 32px); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.apv-p-head { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5) var(--sp-3); }
.apv-p-head h2 { margin-top: 3px; font-size: var(--fs-xl); font-weight: var(--fw-semibold); line-height: var(--lh-snug); overflow-wrap: anywhere; }
.apv-p-head .btn svg { width: 14px; height: 14px; }
.apv-p-sub { margin-top: 2px; font-size: var(--fs-sm); color: var(--ink-3); }
.apv-back { display: none; margin: -2px 0 0 -6px; }
.apv-p-body { flex: 1 1 auto; min-height: 120px; overflow-y: auto; padding: 0 var(--sp-5) var(--sp-4); overscroll-behavior: contain; }
.apv-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--sp-3) var(--sp-4); padding: var(--sp-3) 0; border-top: 1px solid var(--line); }
.apv-facts > div { display: grid; gap: 3px; min-width: 0; align-content: start; }
.apv-f-l { display: block; font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-4); }
.apv-f-v { font-size: var(--fs-md); min-width: 0; overflow-wrap: anywhere; }
.apv-f-amt { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.apv-who { display: inline-flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.apv-note { margin: 0 0 var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm); background: var(--surface-sunken); font-size: var(--fs-md); line-height: var(--lh-normal); overflow-wrap: anywhere; }
.apv-note .apv-f-l { margin-bottom: 3px; }
.apv-warn { margin: 0 0 var(--sp-3); font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--warn-strong); }
.apv-deal { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-3); padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-4); border-radius: var(--r-sm); border: 1px solid var(--line-2); font-size: var(--fs-sm); }
.apv-sec { padding: var(--sp-3) 0 var(--sp-2); border-top: 1px solid var(--line); }
.apv-sec h4 { margin: 0 0 var(--sp-2); font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-4); }
.apv-totals, .apv-lines { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.apv-totals { margin-top: 0; }
.apv-lines + .apv-totals { margin-top: var(--sp-2); }
.apv-totals td { padding: 3px 0; color: var(--ink-2); }
.apv-totals td.num, .apv-lines td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.apv-totals tr.sum td { padding-top: 6px; border-top: 1px solid var(--line-2); color: var(--ink); font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.apv-totals tr.sep td { padding-top: 8px; }
.apv-totals tr.bad td.num { color: var(--danger); font-weight: var(--fw-semibold); }
.apv-lines td { padding: 7px 0; vertical-align: top; border-top: 1px solid var(--line); }
.apv-lines tr:first-child td { border-top: 0; }
.apv-lines td + td { padding-left: var(--sp-3); }
.apv-l-name { display: block; color: var(--ink); overflow-wrap: anywhere; }
.apv-l-more { display: block; margin-top: 1px; font-size: var(--fs-xs); color: var(--ink-3); overflow-wrap: anywhere; }
.apv-l-qty { white-space: nowrap; color: var(--ink-2); text-align: right; }
.apv-l-sec td { padding-top: var(--sp-3); font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--ink-2); }
.apv-l-opt td { color: var(--ink-3); }
.apv-st { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--ink-3); }
.apv-st.ok { color: var(--ok-strong); }
.apv-st.bad { color: var(--danger); }
.apv-rest { margin: var(--sp-2) 0 0; font-size: var(--fs-xs); color: var(--ink-3); }
.apv-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--fs-sm); color: var(--ink-2); }
.apv-p-foot { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; padding: var(--sp-3) var(--sp-5); border-top: 1px solid var(--line); background: var(--surface-sunken); }
.apv-hint { flex: 1 1 200px; min-width: 0; font-size: var(--fs-xs); color: var(--ink-3); line-height: var(--lh-normal); }
.apv-p-foot .grow { flex: 0 1 0; }
.apv-none { display: grid; gap: 4px; place-content: center; justify-items: center; min-height: 260px; padding: var(--sp-5); text-align: center; color: var(--ink-3); font-size: var(--fs-sm); }
.apv-none b { color: var(--ink); font-size: var(--fs-md); }
.apv-how { margin: 0; display: grid; gap: var(--sp-1); font-size: var(--fs-md); line-height: var(--lh-normal); }
.apv-how dt { margin-top: var(--sp-2); font-weight: var(--fw-semibold); }
.apv-how dd { margin: 0; color: var(--ink-2); }
@media (max-width: 999px) {
  .apv { grid-template-columns: minmax(0, 1fr); }
  .apv-item.on { background: none; }
  .apv-item.on:hover { background: var(--surface-hover); }
  .apv-panel { display: none; }
  /* the picked one, as a sheet over the page */
  .apv.open .apv-panel { display: flex; position: fixed; inset: 0; z-index: var(--z-modal); max-height: none; border: 0; border-radius: 0; animation: sheet-in 260ms var(--ease-emph) backwards; }
  .apv-back { display: inline-flex; }
  .apv-p-head { padding: calc(var(--sp-3) + env(safe-area-inset-top)) var(--sp-4) var(--sp-3); }
  .apv-p-body { padding: 0 var(--sp-4) var(--sp-4); }
  .apv-p-foot { padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + env(safe-area-inset-bottom)); }
  .apv-p-foot .btn { flex: 1 1 auto; justify-content: center; }
  .apv-hint { flex-basis: 100%; }
}
@media (max-width: 640px) {
  .apv-tabs { gap: var(--sp-4); margin-left: calc(-1 * var(--sp-1)); }
  .apv-p-head { flex-wrap: wrap; }
  .apv-p-head > a.btn { order: 3; margin-left: auto; }
  .apv-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apv-lines td.apv-l-qty { display: none; }
}
@media (prefers-reduced-motion: reduce) { .apv.open .apv-panel, .apv-done, .apv-tab::after { animation: none; transition: none; } }
@media print { .apv-panel, .apv-tabs { display: none; } }

/* ---------------------------------------------------------------- Agenda: events on one date, sliding, picking (2026-11-16)
   Two events of a series on one date: one tab each under the date. A handle held slides its item (or session): the others
   make room as it passes (FLIP in views/agenda.js), the gap is where it lands. A session's tick picks its items. */
.ag-days { align-items: stretch; scroll-snap-type: x proximity; }
.ag-days > * { scroll-snap-align: start; }
.ag-dgrp { flex: none; display: flex; flex-direction: column; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-sunken); }
.ag-dgrp.on { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.ag-dgrp-h { padding: 0 var(--sp-2); font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; }
.ag-dgrp-h b { color: var(--ink-2); }
.ag-dgrp-tabs { display: flex; gap: 4px; }
.ag-days .ag-dsub { padding: 4px var(--sp-3); }
.ag-days .ag-dsub b { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-days button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ag-grip { touch-action: none; }
.ag-sesgrip { flex: none; height: 24px; }
.ag-rows .ag-row, .ag-rows > .ag-ses { transition: background var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast), transform 170ms var(--ease-out); }
.ag-row.ag-hole, .ag-ses.ag-hole { background: var(--accent-bg); border: 1px dashed var(--accent); box-shadow: none; }
.ag-row.ag-hole > *, .ag-ses.ag-hole > * { visibility: hidden; }
.ag-row.ag-hole::before { display: none; }
.ag-row.ag-carried { display: none; }
.ag-rows.ag-sesdrag .ag-ses > .ag-row { display: none; }
.ag-rows.ag-sesdrag .ag-ses:not(.loose) { padding-block: 2px; }
.ag-ghost { position: fixed; left: 0; top: 0; margin: 0; z-index: var(--z-drag); pointer-events: none; box-shadow: var(--shadow-lg); opacity: 0.96; rotate: 0.6deg; transition: opacity var(--t-fast), box-shadow var(--t-fast); background: var(--surface); }
.ag-ghost.ag-ses > .ag-row { display: none; }
.ag-ghost.out { opacity: 0.7; box-shadow: 0 0 0 2px var(--danger), var(--shadow-lg); }
.ag-ghost.to-day { box-shadow: 0 0 0 2px var(--accent), var(--shadow-lg); }
.ag-ghost-n { position: absolute; top: -10px; right: -8px; padding: 1px 8px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-size: var(--fs-2xs); font-weight: var(--fw-bold); white-space: nowrap; }
body.ag-dragging, body.ag-dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.ag-ses-head .ag-sespick { flex: none; width: 18px; height: 18px; visibility: hidden; }
.ag-list.picking .ag-ses-head .ag-sespick, .ag-ses-head:hover .ag-sespick, .ag-sespick:focus-visible { visibility: visible; }
.cbx.pick.some { border-style: solid; border-color: var(--accent); }
.cbx.pick.some::after { content: ""; width: 8px; height: 2px; border-radius: var(--r-pill); background: var(--accent); }
.ag-list.picking .ag-row:not(.picked) { cursor: pointer; }
.ag-rows.ag-in-r { animation: ag-in-r 220ms var(--ease-out); }
.ag-rows.ag-in-l { animation: ag-in-l 220ms var(--ease-out); }
@keyframes ag-in-r { from { opacity: 0; transform: translateX(28px); } }
@keyframes ag-in-l { from { opacity: 0; transform: translateX(-28px); } }
@media (prefers-reduced-motion: reduce) { .ag-rows .ag-row, .ag-rows > .ag-ses { transition: none; } .ag-rows.ag-in-r, .ag-rows.ag-in-l { animation: none; } .ag-ghost { rotate: 0deg; } }
@media (max-width: 720px) {
  .ag-ses-head { flex-wrap: wrap; row-gap: 2px; }
  .ag-ses-head > .tiny.grow { order: 9; flex-basis: 100%; padding-left: var(--sp-6); }
  .ag-dgrp-h { padding-inline: var(--sp-1); }
}

/* ---------------------------------------------------------------- the live WIP deck (2026-11-17, wiplive-ui.js) */
.wl-state { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ink); }
.wl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.wl-state.ok .wl-dot { background: var(--ok); }
.wl-state.warn .wl-dot { background: var(--warn); }
.wl-state.bad { color: var(--danger); }
.wl-state.bad .wl-dot { background: var(--danger); }
.wl-set .check { align-items: flex-start; }

/* ---------------------------------------------------------------- Library (2026-11-17, views/learn.js; docs/pustaka.md)
   The learning library. Books stand like books (a spine, a pattern from the title, a tilt on hover); every other kind is
   a light card in its shelf's colour (--c, set per element). Journeys are a trail of stations. Colour means the shelf
   or the state, nothing else; motion is a hover tilt and the trail coming in, and stops under reduced motion. */
.lb-g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.lb-g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); }
.lb-block { display: block; margin-bottom: var(--sp-1); }
@media (max-width: 640px) { .lb-g2, .lb-g3 { grid-template-columns: minmax(0, 1fr); } }
.lb-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-size: var(--fs-3xs); font-weight: var(--fw-bold); margin-left: var(--sp-1); }
.lb-tabs { overflow-x: auto; max-width: 100%; }
.lb-tone { display: inline-flex; align-items: center; gap: 4px; font-weight: var(--fw-semibold); }
.lb-tone svg { width: 12px; height: 12px; }
.lb-tone.ok { color: var(--ok); } .lb-tone.warn { color: var(--danger); } .lb-tone.wait { color: var(--warn); } .lb-tone.info { color: var(--info); }

/* hero: your week, reading now, points */
.lb-hero { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: var(--sp-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-4) var(--sp-5); margin-bottom: var(--sp-4); box-shadow: var(--shadow-sm); }
.lb-hero > div { display: flex; flex-direction: column; gap: var(--sp-2); align-items: flex-start; min-width: 0; }
.lb-hero > div + div { border-left: 1px solid var(--line); padding-left: var(--sp-4); }
.lbh-kicker { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--ink-3); text-transform: uppercase; letter-spacing: var(--ls-caps); }
.lbh-kicker svg { width: 14px; height: 14px; }
.lbh-days { display: flex; gap: 6px; }
.lbh-day { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.lbh-day b { font-size: var(--fs-3xs); color: var(--ink-4); font-weight: var(--fw-semibold); }
.lbh-day i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--well); font-style: normal; font-size: var(--fs-2xs); font-weight: var(--fw-bold); color: var(--on-accent); transition: background var(--t-med) var(--ease-out); }
.lbh-day i svg { width: 14px; height: 14px; }
.lbh-day.on i { background: var(--accent); }
.lbh-day.today i { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.lbh-day.today b { color: var(--accent); }
.lbh-day.later i { opacity: 0.45; }
.lbh-line { font-size: var(--fs-sm); color: var(--ink-2); }
.lbh-covers { display: flex; gap: var(--sp-2); align-items: flex-end; }
.lbh-nums { display: flex; gap: var(--sp-4); }
.lbh-nums > div { display: flex; flex-direction: column; }
.lbh-nums b { font-size: var(--fs-2xl); font-weight: var(--fw-bold); line-height: var(--lh-tight); color: var(--ink); }
.lbh-nums span { font-size: var(--fs-xs); color: var(--ink-3); }
@media (max-width: 900px) { .lb-hero { grid-template-columns: minmax(0, 1fr); } .lb-hero > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: var(--sp-3); } }

/* filters and shelf buttons */
.lb-filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-bottom: var(--sp-3); }
.lb-search { position: relative; flex: 1 1 260px; max-width: 420px; }
.lb-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-4); pointer-events: none; }
.lb-search .input { width: 100%; padding-left: 36px; }
.lb-filters select.input.lb-level { width: auto; flex: none; max-width: 180px; }
.lb-chips { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.lb-chips .chip svg { width: 13px; height: 13px; }
.lb-chips .chip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.lb-shelfnav { display: flex; gap: var(--sp-2); overflow-x: auto; padding-bottom: var(--sp-2); margin-bottom: var(--sp-3); scrollbar-width: thin; }
.lb-shelfbtn { --c: var(--accent); display: inline-flex; align-items: center; gap: 6px; height: var(--ctl-h-sm); padding: 0 var(--sp-3); border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold); white-space: nowrap; cursor: pointer; transition: background var(--t-fast) var(--ease-std), border-color var(--t-fast) var(--ease-std); }
.lb-shelfbtn svg { width: 14px; height: 14px; color: var(--c); }
.lb-shelfbtn span { font-size: var(--fs-2xs); color: var(--ink-4); }
.lb-shelfbtn:hover { border-color: var(--c); }
.lb-shelfbtn.on { background: color-mix(in srgb, var(--c) 13%, var(--surface)); border-color: var(--c); color: var(--ink); }

/* a shelf: heading, then a rack of covers standing on a ledge */
.lb-shelf { --c: var(--accent); margin-bottom: var(--sp-6); }
.lb-shelf-head { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.lb-shelf-head h2 { font-size: var(--fs-lg); margin: 0; }
.lb-shelf-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-md); background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--c); flex: none; }
.lb-shelf-ic svg { width: 18px; height: 18px; }
.lb-rack { display: flex; gap: var(--sp-4); align-items: flex-end; overflow-x: auto; padding: var(--sp-3) var(--sp-1) 0; border-bottom: 8px solid color-mix(in srgb, var(--c) 22%, var(--well)); border-radius: 0 0 var(--r-xs) var(--r-xs); box-shadow: 0 10px 14px -12px rgba(0, 0, 0, 0.35); scroll-snap-type: x proximity; scrollbar-width: thin; }
.lb-rack.wrap { flex-wrap: wrap; overflow: visible; border-bottom: 0; box-shadow: none; }
.lb-invite { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); border: 1px dashed var(--line-2); border-radius: var(--r-sm); background: var(--surface); }
.lb-invite > svg { width: 20px; height: 20px; color: var(--c); flex: none; }
.lc-tile { flex: none; width: 128px; scroll-snap-align: start; padding-bottom: var(--sp-2); }
.lc-meta { display: flex; justify-content: space-between; gap: var(--sp-1); margin-top: 6px; font-size: var(--fs-2xs); color: var(--ink-3); }
.lc-readers { display: inline-flex; align-items: center; gap: 3px; flex: none; }
.lc-readers svg { width: 12px; height: 12px; }

/* the cover */
.lc { --c: var(--accent); position: relative; display: block; width: 128px; aspect-ratio: 2 / 3; padding: 0; border: 0; border-radius: var(--r-xs) var(--r-sm) var(--r-sm) var(--r-xs); font: inherit; text-align: left; cursor: pointer; overflow: hidden; transform-origin: left center; transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out); }
.lc-face { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 4px; padding: 12px 10px 10px 16px; }
.lc-kind { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-3xs); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: var(--ls-caps); opacity: 0.9; }
.lc-kind svg { width: 11px; height: 11px; }
.lc-title { font-family: var(--font-display); font-size: var(--fs-sm); font-weight: var(--fw-bold); line-height: var(--lh-snug); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
.lc-author { margin-top: auto; font-size: var(--fs-2xs); line-height: var(--lh-snug); opacity: 0.85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc.book { background: var(--c); color: var(--on-accent); box-shadow: inset 6px 0 0 rgba(0, 0, 0, 0.22), inset 7px 0 0 rgba(255, 255, 255, 0.18), 0 2px 4px rgba(0, 0, 0, 0.12), 0 10px 18px -12px rgba(0, 0, 0, 0.45); }
.lc.book::before { content: ""; position: absolute; pointer-events: none; }
.lc.book.pat0::before { left: 6px; right: 0; bottom: 28%; height: 7%; background: rgba(255, 255, 255, 0.16); }
.lc.book.pat1::before { right: -26%; top: -12%; width: 78%; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, 0.13); }
.lc.book.pat2::before { inset: 7px 6px 7px 13px; border: 1px solid rgba(255, 255, 255, 0.32); border-radius: var(--r-2xs); }
.lc.book.pat3::before { left: 6px; right: 0; top: 0; height: 34%; background: rgba(0, 0, 0, 0.14); }
.lc.card { background: color-mix(in srgb, var(--c) 10%, var(--surface)); color: var(--ink); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); border-top: 5px solid var(--c); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); border-radius: var(--r-sm); }
.lc.card .lc-face { padding-left: 10px; }
.lc.card .lc-kind { color: var(--c); }
.lc.book:hover, .lc.book:focus-visible { transform: perspective(700px) rotateY(-16deg) translateY(-4px); box-shadow: inset 6px 0 0 rgba(0, 0, 0, 0.22), 12px 14px 22px -12px rgba(0, 0, 0, 0.5); }
.lc.card:hover, .lc.card:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.lc-pending { align-self: flex-start; font-size: var(--fs-3xs); font-weight: var(--fw-bold); padding: 2px 6px; border-radius: var(--r-pill); background: var(--warn-bg); color: var(--warn); }
.lc-state { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
.lc-state svg { width: 12px; height: 12px; }
.lc-state.ok { background: var(--ok); color: var(--on-accent); }
.lc-state.wait { background: var(--warn-bg); color: var(--warn); }
.lc-state.back { background: var(--danger-bg); color: var(--danger); }
.lc-bar { position: absolute; left: 10px; right: 8px; bottom: 6px; height: 4px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.35); overflow: hidden; }
.lc.card .lc-bar { background: var(--line-2); }
.lc-bar i { display: block; height: 100%; background: var(--on-accent); border-radius: inherit; }
.lc.card .lc-bar i { background: var(--c); }
.lc.sm { width: 72px; } .lc.sm .lc-face { padding: 8px 6px 6px 11px; } .lc.sm .lc-title { font-size: var(--fs-3xs); -webkit-line-clamp: 4; } .lc.sm .lc-author, .lc.sm .lc-kind { display: none; }
.lc.xs { width: 40px; flex: none; } .lc.xs .lc-face { display: none; } .lc.xs .lc-state { width: 16px; height: 16px; top: 3px; right: 3px; } .lc.xs .lc-state svg { width: 9px; height: 9px; } .lc.xs .lc-bar { left: 5px; right: 4px; bottom: 3px; height: 3px; }
.lc.xs.book::before { display: none; }
.lc.lg { width: 170px; } .lc.lg .lc-title { font-size: var(--fs-md); }

/* journeys */
.lj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: var(--sp-4); }
.lj-card { --c: var(--accent); display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; cursor: pointer; font: inherit; color: inherit; box-shadow: var(--shadow-sm); transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out); }
.lj-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.lj-band { position: relative; display: flex; align-items: center; gap: var(--sp-2); height: 88px; padding: 0 var(--sp-4); background: var(--c); color: var(--on-accent); }
.lj-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.2); color: var(--on-accent); flex: none; }
.lj-ic svg { width: 22px; height: 22px; }
.lj-ic.sm { width: 30px; height: 30px; background: var(--c); } .lj-ic.sm svg { width: 16px; height: 16px; }
.lj-joined { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-2xs); font-weight: var(--fw-bold); background: rgba(255, 255, 255, 0.22); padding: 3px 8px; border-radius: var(--r-pill); }
.lj-joined svg { width: 12px; height: 12px; }
.lj-ring { position: absolute; right: var(--sp-4); top: 50%; width: 56px; height: 56px; transform: translateY(-50%) rotate(-90deg); }
.lj-ring circle { fill: none; stroke: rgba(255, 255, 255, 0.28); stroke-width: 3.5; }
.lj-ring circle.v { stroke: var(--on-accent); stroke-linecap: round; transition: stroke-dasharray var(--t-slow) var(--ease-out); }
.lj-pct { position: absolute; right: var(--sp-4); top: 50%; width: 56px; transform: translateY(-50%); text-align: center; font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.lj-body { display: flex; flex-direction: column; gap: 6px; padding: var(--sp-3) var(--sp-4) var(--sp-4); }
.lj-body > b { font-size: var(--fs-md); }
.lj-stops { display: flex; gap: 4px; margin-top: 2px; }
.lj-stops i { flex: 1; height: 6px; border-radius: var(--r-pill); background: var(--well); }
.lj-stops i.on { background: var(--c); }
.lj-covers { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.lj-mini { --c: var(--accent); display: grid; place-items: center; width: 22px; height: 30px; border-radius: var(--r-2xs); background: var(--c); color: var(--on-accent); }
.lj-mini svg { width: 11px; height: 11px; }
.lj-covers .small { margin-left: var(--sp-2); }
.lj-new { align-items: center; justify-content: center; gap: var(--sp-1); padding: var(--sp-5); border-style: dashed; min-height: 200px; text-align: center; }
.lj-new > svg { width: 22px; height: 22px; color: var(--accent); }
.lj-pill { --c: var(--accent); display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--r-pill); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); background: color-mix(in srgb, var(--c) 10%, var(--surface)); color: var(--ink); font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-semibold); cursor: pointer; }
.lj-pill svg { width: 13px; height: 13px; color: var(--c); }

/* a journey: the trail */
.ljv { --c: var(--accent); }
.ljv-head { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.ljv-head > .btn { align-self: flex-start; }
.ljv-title { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); border-radius: var(--r-lg); background: var(--c); color: var(--on-accent); }
.ljv-title h2 { margin: 0; color: var(--on-accent); }
.ljv-title .muted { color: var(--on-accent); opacity: 0.85; }
.ljv-prog { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 150px; }
.ljv-prog b { font-size: var(--fs-2xl); line-height: var(--lh-tight); }
.ljv-prog .muted { color: var(--on-accent); opacity: 0.85; }
.ljv-bar { display: block; width: 100%; height: 6px; border-radius: var(--r-pill); background: var(--well); overflow: hidden; margin-top: 4px; }
.ljv-title .ljv-bar { background: rgba(255, 255, 255, 0.28); }
.ljv-bar i { display: block; height: 100%; background: var(--c); border-radius: inherit; }
.ljv-title .ljv-bar i { background: var(--on-accent); }
.ljv-trail { list-style: none; margin: 0; padding: 0; }
.ljv-stop { --i: 0; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr); align-items: start; padding-bottom: var(--sp-5); animation: ljv-in var(--t-slow) var(--ease-out) both; animation-delay: calc(var(--i) * 70ms); }
.ljv-stop::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: var(--well); border-radius: var(--r-pill); }
.ljv-stop.done::before { background: var(--c); }
.ljv-stop:last-child::before { display: none; }
.ljv-node { grid-column: 2; grid-row: 1; justify-self: center; position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--well); color: var(--ink-3); font-weight: var(--fw-bold); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); }
.ljv-node svg { width: 20px; height: 20px; }
.ljv-stop.done .ljv-node { background: var(--c); color: var(--on-accent); box-shadow: none; }
.ljv-stop.cur .ljv-node { background: var(--surface); color: var(--c); box-shadow: 0 0 0 3px var(--c), 0 0 0 8px color-mix(in srgb, var(--c) 18%, transparent); }
.ljv-stop.finish .ljv-node { background: var(--surface); color: var(--c); box-shadow: 0 0 0 2px var(--c); }
.ljv-stop.finish.done .ljv-node { background: var(--c); color: var(--on-accent); }
.ljv-card { grid-row: 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-3) var(--sp-4); box-shadow: var(--shadow-sm); }
.ljv-stop.l .ljv-card { grid-column: 1; }
.ljv-stop.r .ljv-card, .ljv-stop.finish .ljv-card { grid-column: 3; }
.ljv-stop.cur .ljv-card { border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.ljv-stop.next .ljv-card { background: var(--surface-muted); }
.ljv-card h3 { margin: 2px 0 4px; font-size: var(--fs-md); }
.ljv-kick { font-size: var(--fs-2xs); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: var(--ls-caps); color: var(--c); }
.ljv-items { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-2); }
.ljv-item { display: flex; gap: var(--sp-2); align-items: flex-start; }
.ljv-it { text-align: left; font-weight: var(--fw-semibold); }
.ljv-mission { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); background: color-mix(in srgb, var(--c) 9%, var(--surface)); border-left: 3px solid var(--c); }
.ljv-mission > svg { width: 16px; height: 16px; color: var(--c); flex: none; margin-top: 2px; }
@keyframes ljv-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .ljv-stop { grid-template-columns: 52px minmax(0, 1fr); }
  .ljv-stop::before { left: 26px; }
  .ljv-node { grid-column: 1; }
  .ljv-stop.l .ljv-card, .ljv-stop.r .ljv-card, .ljv-stop.finish .ljv-card { grid-column: 2; }
  .ljv-title { flex-wrap: wrap; } .ljv-prog { align-items: flex-start; }
}

/* My shelf */
.lm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); margin-bottom: var(--sp-4); }
.lm-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-3) var(--sp-4); }
.lm-col h3, .lm-h { display: flex; align-items: center; gap: 6px; font-size: var(--fs-md); margin: 0 0 var(--sp-3); }
.lm-col h3 svg, .lm-h svg { width: 16px; height: 16px; color: var(--ink-3); }
.lm-col h3 span { margin-left: auto; font-size: var(--fs-xs); color: var(--ink-4); }
.lm-row { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-2) 0; border-top: 1px solid var(--line); }
.lm-row:first-of-type { border-top: 0; }
.lm-row .link-btn { text-align: left; font-weight: var(--fw-semibold); }
.lm-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-4); }
.lm-heat { display: grid; grid-template-rows: repeat(7, 13px); grid-auto-flow: column; grid-auto-columns: 13px; gap: 3px; }
.lm-heat i { border-radius: var(--r-2xs); background: var(--well); }
.lm-heat i.l1 { background: color-mix(in srgb, var(--accent) 35%, var(--well)); }
.lm-heat i.l2 { background: color-mix(in srgb, var(--accent) 65%, var(--well)); }
.lm-heat i.l3 { background: var(--accent); }
.lm-heat i.later { background: transparent; }
.lm-j { --c: var(--accent); display: flex; align-items: center; gap: var(--sp-3); width: 100%; padding: var(--sp-2); border: 0; border-radius: var(--r-sm); background: transparent; font: inherit; text-align: left; cursor: pointer; color: inherit; }
.lm-j:hover { background: var(--well); }
.lm-j .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
@media (max-width: 900px) { .lm-grid, .lm-two { grid-template-columns: minmax(0, 1fr); } }

/* Team feed */
.lf-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--sp-4); align-items: start; }
.lf-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.lf-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-3) var(--sp-4); box-shadow: var(--shadow-sm); }
.lf-who { display: flex; gap: var(--sp-2); align-items: flex-start; }
.lf-who .link-btn { font-weight: var(--fw-semibold); }
.lf-body { display: flex; gap: var(--sp-3); margin-top: var(--sp-2); }
.lf-quote { margin: 0 0 var(--sp-1); padding-left: var(--sp-3); border-left: 3px solid var(--line-2); color: var(--ink-2); white-space: pre-line; }
.lf-stars { color: var(--tone-amber); letter-spacing: 1px; font-size: var(--fs-sm); white-space: nowrap; }
.lf-stars span { color: var(--line-2); }
.lf-foot { display: flex; justify-content: flex-end; margin-top: var(--sp-1); }
.lf-foot .btn.on, .li-take .btn.on { color: var(--accent); background: var(--accent-bg); }
.lf-side { display: flex; flex-direction: column; gap: var(--sp-3); position: sticky; top: var(--sp-4); }
.lf-reader { display: flex; align-items: center; gap: var(--sp-2); padding: 4px 0; }
@media (max-width: 900px) { .lf-wrap { grid-template-columns: minmax(0, 1fr); } .lf-side { position: static; } }

/* To check */
.lr-row { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3) 0; border-top: 1px solid var(--line); }
.lr-row:first-of-type { border-top: 0; }
.lr-row > input { margin-top: 4px; }
.lr-row p { margin: 4px 0; }
.lr-acts { display: flex; flex-direction: column; gap: 6px; align-items: stretch; flex: none; }
@media (max-width: 640px) { .lr-row { flex-wrap: wrap; } .lr-acts { flex-direction: row; flex-wrap: wrap; width: 100%; } }
.lb-vlist { display: flex; flex-direction: column; gap: var(--sp-2); max-height: 50vh; overflow: auto; }

/* the drawer: one material */
.li-top { --c: var(--accent); display: flex; gap: var(--sp-5); align-items: flex-start; margin-bottom: var(--sp-4); }
.li-cover { flex: none; padding: var(--sp-2) 0 0 var(--sp-1); }
.li-info h2 { margin: 4px 0; font-size: var(--fs-xl); line-height: var(--lh-snug); }
.li-shelf { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--c); text-transform: uppercase; letter-spacing: var(--ls-caps); }
.li-shelf svg { width: 14px; height: 14px; }
.li-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--sp-2); }
.li-tags .tag svg { width: 12px; height: 12px; margin-right: 3px; }
.li-tags .tag.ok { background: var(--ok-bg); color: var(--ok); }
.li-h { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: var(--ls-caps); color: var(--ink-3); margin: var(--sp-4) 0 var(--sp-1); }
.li-js { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--sp-3); }
.li-note { display: flex; gap: var(--sp-2); padding: var(--sp-3); border-radius: var(--r-md); background: var(--info-bg); color: var(--ink); margin: var(--sp-3) 0; }
.li-note > svg { width: 18px; height: 18px; color: var(--info); flex: none; margin-top: 1px; }
.li-note.warn { background: var(--warn-bg); } .li-note.warn > svg { color: var(--warn); }
.li-note.ok { background: var(--ok-bg); } .li-note.ok > svg { color: var(--ok); }
.li-note .lf-quote { margin-top: var(--sp-2); }
.li-mine { padding: var(--sp-3) var(--sp-4) var(--sp-4); margin-top: var(--sp-4); border-radius: var(--r-lg); background: var(--surface-muted); }
.li-mine .li-h { margin-top: 0; }
.li-state { flex-wrap: wrap; }
.li-pct { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-3); }
.li-pct input { flex: 1; accent-color: var(--accent); }
.li-form { margin-top: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-2); }
.li-stars { display: flex; gap: 2px; }
.li-stars button { border: 0; background: transparent; font-size: var(--fs-2xl); line-height: var(--lh-none); color: var(--line-2); cursor: pointer; padding: 0 2px; transition: color var(--t-fast) var(--ease-std), transform var(--t-fast) var(--ease-pop); }
.li-stars button.on { color: var(--tone-amber); }
.li-stars button:hover { transform: scale(1.15); }
.li-people { display: flex; flex-direction: column; gap: var(--sp-2); }
.li-people > div { display: flex; align-items: center; gap: var(--sp-2); }
.li-take { display: flex; gap: var(--sp-2); padding: var(--sp-3) 0; border-top: 1px solid var(--line); }
.li-kinds, .li-shelves { display: flex; flex-wrap: wrap; gap: 6px; }
.li-kinds button svg { width: 14px; height: 14px; }
.lje-stage { border: 1px solid var(--line-2); border-radius: var(--r-md); padding: var(--sp-2) var(--sp-3) var(--sp-3); margin: 0 0 var(--sp-3); }
.lje-stage legend { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--ink-3); padding: 0 6px; }
.lb-logpop { padding: var(--sp-3); }
.lb-rules { padding-left: var(--sp-4); display: flex; flex-direction: column; gap: 6px; }
.lb-rules b { display: inline-block; min-width: 72px; color: var(--accent); }
@media (max-width: 640px) { .li-top { flex-direction: column; } .lc.lg { width: 120px; } }
@media (prefers-reduced-motion: reduce) {
  .lc, .lj-card, .lbh-day i, .li-stars button { transition: none; }
  .lc.book:hover, .lc.book:focus-visible, .lc.card:hover, .lj-card:hover { transform: none; }
  .ljv-stop { animation: none; }
}

/* =====================================================================================================
   2026-11-17 · The leaderboard's stage (views/leaderboard.js; docs/leaderboard-look.md)
   ============================================================================================================ */
/* People and Teams open on the Duo look's night (as Home and a project's header do): a podium of second · first ·
   third standing on a floor, the period in three numbers along the foot. Below it "Your race" and the top half as
   rows. Prefixes: lbs- the stage, lby- your race, lbr- the rows, lbm- the two columns under the stage, lb-mv the
   places moved since yesterday. No glow behind cards, no endless motion: the podium rises once when the board opens
   (and when the period or tab changes), the stars twinkle as they do on Home, and nothing moves under reduced motion. */
.lbs { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-xl); color: var(--on-stage); background: var(--night-sky); padding: var(--sp-5) var(--sp-6) 0; --surface: var(--night-mid); }
.lbs[aria-busy="true"] .lbs-podium { opacity: .55; transition: opacity var(--t-med) var(--ease-std); }
/* the stars that would sit on the podium's names stay out (nightSky() places them for Home) */
.lbs .night-sky .star:nth-child(2), .lbs .night-sky .star:nth-child(4), .lbs .night-sky .star:nth-child(9) { display: none; }
.lbs-light { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(30% 64% at 50% 0%, color-mix(in srgb, var(--night-star) 15%, transparent), transparent 74%); }
.lbs-head { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.lbs-when { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lbs-kick { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: color-mix(in srgb, var(--on-stage) 88%, transparent); }
.lbs-kick::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--night-lime); box-shadow: 0 0 0 3px color-mix(in srgb, var(--night-lime) 28%, transparent); }
.lbs-note { padding-left: calc(8px + var(--sp-2)); font-size: var(--fs-sm); color: color-mix(in srgb, var(--on-stage) 64%, transparent); }
.lbs-periods { display: inline-flex; gap: 2px; padding: 3px; max-width: 100%; overflow-x: auto; scrollbar-width: none; border-radius: var(--r-pill); background: color-mix(in srgb, var(--night-deep) 62%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--on-stage) 12%, transparent); }
.lbs-periods::-webkit-scrollbar { display: none; }
.lbs-periods button { flex: none; height: 30px; padding: 0 var(--sp-3); border: 0; border-radius: var(--r-pill); background: transparent; font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: color-mix(in srgb, var(--on-stage) 72%, transparent); cursor: pointer; transition: background var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std); }
.lbs-periods button:hover:not(.on) { color: var(--on-stage); background: color-mix(in srgb, var(--on-stage) 8%, transparent); }
.lbs-periods button.on { background: var(--neon-grad); color: var(--on-stage); box-shadow: 0 8px 18px -10px var(--neon-1); }
.lbs-periods button:focus-visible, a.lbs-who:focus-visible { outline: 2px solid var(--night-lime); outline-offset: 2px; }

/* the podium: one column per person, the winner in the middle (podiumSlots()), each standing on a step */
.lbs-podium { position: relative; z-index: 2; list-style: none; margin: var(--sp-5) 0 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 212px); justify-content: center; align-items: end; gap: var(--sp-3); }
.lbs-pod { --m: var(--medal-gold); display: flex; flex-direction: column; align-items: center; min-width: 0; }
.lbs-pod[data-place="2"] { --m: var(--medal-silver); }
.lbs-pod[data-place="3"] { --m: var(--medal-bronze); }
.lbs-who { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; max-width: 100%; padding: 0 var(--sp-2) var(--sp-3); border-radius: var(--r-lg); color: var(--on-stage); text-align: center; text-decoration: none; }
a.lbs-who:hover { color: var(--on-stage); text-decoration: none; }
a.lbs-who:hover .lbs-name { text-decoration: underline; text-underline-offset: 3px; }
.lbs-crown { display: grid; place-items: center; height: 26px; margin-bottom: var(--sp-1); color: var(--medal-gold); }
.lbs-crown svg { width: 28px; height: 28px; fill: color-mix(in srgb, var(--medal-gold) 35%, transparent); }
.lbs-pod { --av: 64px; }
.lbs-pod[data-place="1"] { --av: 84px; }
.lbs-av { display: grid; place-items: center; margin-bottom: var(--sp-2); }
.lbs-av .av, .lbs-av .av-wreath { --s: var(--av); }
/* a drawn border (wreath, Rossoneri, Golden Snitch …) spills round its avatar: give it the room, so the crown and the
   name stay clear of it */
.lbs-av:has(.av-wreath) { width: calc(var(--av) * 1.5); height: calc(var(--av) * 1.5); margin-bottom: 0; }
/* a plain avatar (no border earned) wears its place's metal; an earned border is shown as it is */
.lbs-av > .av:not(.av-ring) { box-shadow: 0 0 0 3px var(--night-mid), 0 0 0 6px var(--m); }
.lbs-tav { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--c); color: var(--on-accent); font-size: var(--fs-xl); font-weight: var(--fw-bold); box-shadow: 0 0 0 3px var(--night-mid), 0 0 0 6px var(--m); }
.lbs-pod[data-place="1"] .lbs-tav { width: 84px; height: 84px; font-size: var(--fs-2xl); }
.lbs-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-lg); font-weight: var(--fw-semibold); }
.lbs-pod[data-place="1"] .lbs-name { font-size: var(--fs-xl); }
.lbs-you { display: inline-block; vertical-align: middle; margin-left: 4px; padding: 1px 7px; border-radius: var(--r-pill); background: var(--night-lime); color: var(--night-deep); font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); line-height: var(--lh-normal); text-transform: uppercase; text-decoration: none; }
.lbs-team { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-xs); color: color-mix(in srgb, var(--on-stage) 62%, transparent); }
.lbs-pts { margin-top: var(--sp-1); font-size: var(--fs-xs); color: color-mix(in srgb, var(--on-stage) 70%, transparent); }
.lbs-pts b { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: var(--fw-bold); letter-spacing: var(--ls-tight); color: var(--night-lime); font-variant-numeric: tabular-nums; }
.lbs-pod[data-place="1"] .lbs-pts b { font-size: var(--fs-3xl); }
.lbs-who .lb-mv { margin-top: var(--sp-1); }
/* the steps: lit from above in their metal, the place cut into the face */
.lbs-block { width: 100%; height: 78px; display: grid; place-items: start center; padding-top: var(--sp-3); border-radius: var(--r-lg) var(--r-lg) 0 0; background: linear-gradient(180deg, color-mix(in srgb, var(--m) 24%, transparent), transparent 64%), linear-gradient(180deg, color-mix(in srgb, var(--on-stage) 16%, transparent), color-mix(in srgb, var(--on-stage) 3%, transparent)); box-shadow: inset 0 3px 0 var(--m); transform-origin: bottom; }
.lbs-pod[data-place="1"] .lbs-block { height: 136px; }
.lbs-pod[data-place="2"] .lbs-block { height: 104px; }
.lbs-block span { font-family: var(--font-display); font-size: var(--fs-display); font-weight: var(--fw-bold); line-height: var(--lh-none); color: var(--m); }
/* nobody has points yet: three empty steps and a line about the first points */
.lbs-empty { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); max-width: 480px; margin: var(--sp-6) auto 0; text-align: center; }
.lbs-empty b { font-size: var(--fs-xl); font-weight: var(--fw-semibold); }
.lbs-empty span { font-size: var(--fs-sm); color: color-mix(in srgb, var(--on-stage) 70%, transparent); }
.lbs-podium.ghost { grid-auto-columns: minmax(0, 168px); }
.lbs-podium.ghost .lbs-block { background: transparent; box-shadow: none; border: 1.5px dashed color-mix(in srgb, var(--on-stage) 26%, transparent); border-bottom: 0; }
.lbs-podium.ghost .lbs-block span { color: color-mix(in srgb, var(--on-stage) 30%, transparent); }
/* the floor: the period in three numbers */
.lbs-foot { position: relative; z-index: 2; display: flex; justify-content: center; flex-wrap: wrap; gap: var(--sp-3) var(--sp-8); margin: 0 calc(-1 * var(--sp-6)); padding: var(--sp-3) var(--sp-6); background: color-mix(in srgb, var(--night-deep) 76%, transparent); border-top: 1px solid color-mix(in srgb, var(--on-stage) 16%, transparent); }
.lbs-foot div { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.lbs-foot dt { font-size: var(--fs-2xs); font-weight: var(--fw-semibold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: color-mix(in srgb, var(--on-stage) 58%, transparent); }
.lbs-foot dd { margin: 0; font-size: var(--fs-sm); color: color-mix(in srgb, var(--on-stage) 76%, transparent); }
.lbs-foot dd b { font-size: var(--fs-lg); font-weight: var(--fw-bold); color: var(--on-stage); font-variant-numeric: tabular-nums; }
/* the rise: third, second, first (--d from the page), the person a moment after their step, the crown last */
@keyframes lbs-rise { from { scale: 1 0; } }
@keyframes lbs-arrive { from { opacity: 0; translate: 0 16px; } }
@keyframes lbs-crown { from { opacity: 0; translate: 0 -10px; scale: .6; } }
.lbs.rise .lbs-block { animation: lbs-rise 720ms var(--ease-out) both; animation-delay: calc(var(--d, 0) * 1ms); }
.lbs.rise .lbs-who { animation: lbs-arrive 520ms var(--ease-out) both; animation-delay: calc(var(--d, 0) * 1ms + 360ms); }
.lbs.rise .lbs-crown { animation: lbs-crown 560ms var(--ease-spring) both; animation-delay: 1180ms; }
@media (prefers-reduced-motion: reduce) { .lbs.rise .lbs-block, .lbs.rise .lbs-who, .lbs.rise .lbs-crown { animation: none; } }

/* places moved since yesterday: a small mark, green up, grey down, never red (nobody is told off for a quiet day) */
.lb-mv { display: inline-flex; align-items: center; justify-content: center; gap: 1px; min-width: 30px; height: 20px; padding: 0 6px; flex: none; border-radius: var(--r-pill); font-size: var(--fs-2xs); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; color: var(--ink-4); }
.lb-mv svg { width: 8px; height: 8px; margin-right: 2px; fill: currentColor; stroke: none; }
.lb-mv[data-mv="up"] { color: var(--ok); background: var(--ok-bg); }
.lb-mv[data-mv="down"] { color: var(--ink-3); background: var(--surface-muted); }
.lb-mv[data-mv="new"] { color: var(--accent-ink); background: var(--accent-bg); letter-spacing: var(--ls-caps); text-transform: uppercase; }
.lbs .lb-mv[data-mv="up"] { color: var(--night-lime); background: color-mix(in srgb, var(--night-lime) 16%, transparent); }
.lbs .lb-mv[data-mv="down"], .lbs .lb-mv[data-mv="same"] { color: color-mix(in srgb, var(--on-stage) 72%, transparent); background: color-mix(in srgb, var(--on-stage) 10%, transparent); }
.lbs .lb-mv[data-mv="new"] { color: var(--neon-cyan); background: color-mix(in srgb, var(--neon-cyan) 14%, transparent); }

/* under the stage: your race and the top half on the left, your pod and bests beside them */
.lbm { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--sp-4); align-items: start; }
.lbm:has(> .lbm-side:empty) { grid-template-columns: minmax(0, 1fr); }
.lbm-main, .lbm-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; min-width: 0; }
.lbm-side { gap: var(--sp-4); }
@media (max-width: 1180px) { .lbm { grid-template-columns: minmax(0, 1fr); } .lbm-side { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } }

/* your race: your place (or your points below the top half), the person to pass, where the points came from, and
   the people either side of you */
.lby { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--sp-5); padding: var(--sp-5); }
.lby:not(:has(.lby-around)) { grid-template-columns: minmax(0, 1fr); }
.lby-main { display: grid; gap: var(--sp-4); align-content: start; min-width: 0; }
.lby-id { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.lby-place { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.lby-k { font-size: var(--fs-2xs); font-weight: var(--fw-semibold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-3); }
.lby-big { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--sp-2); }
.lby-big > b { font-family: var(--font-display); font-size: var(--fs-4xl); font-weight: var(--fw-bold); line-height: var(--lh-tight); letter-spacing: var(--ls-tight); font-variant-numeric: tabular-nums; }
.lby-big .lb-mv { align-self: center; }
.lby-pts { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.lby-pts b { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: var(--fw-bold); line-height: var(--lh-tight); font-variant-numeric: tabular-nums; }
.lby-chase { display: grid; gap: var(--sp-2); }
.lby-chase p { margin: 0; }
.lby-bar { height: 10px; }
.lby-src { display: grid; gap: var(--sp-2); }
.lby-stack { display: flex; gap: 2px; height: 10px; overflow: hidden; border-radius: var(--r-pill); background: var(--track); }
.lby-stack i { --w: 0%; width: var(--w); background: var(--c); }
.lby-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); font-size: var(--fs-xs); color: var(--ink-2); }
.lby-legend li { display: inline-flex; align-items: center; gap: 6px; }
.lby-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.lby-legend b { color: var(--ink); }
.lby-around { display: grid; gap: var(--sp-2); align-content: start; min-width: 0; padding-left: var(--sp-5); border-left: 1px solid var(--line); }
.lby-around ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.lby-around li { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; padding: 7px var(--sp-2); border-radius: var(--r-sm); font-size: var(--fs-sm); }
.lby-around li.me { background: var(--surface-selected); }
.lby-gap { color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lby-none { display: flex; align-items: center; gap: var(--sp-4); }
.lby-none p { margin: 2px 0 0; }
@media (max-width: 760px) {
  .lby { grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); padding: var(--sp-4); }
  .lby-around { padding: var(--sp-3) 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .lby-big > b { font-size: var(--fs-3xl); }
  .lby-none { flex-wrap: wrap; }
}

/* the top half from place 4: rank, moved, face, name, badges, bar, points */
.lbr { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.lbr li { display: grid; grid-template-columns: 28px 34px auto minmax(0, 1fr) auto 140px 64px; align-items: center; gap: var(--sp-3); min-width: 0; padding: var(--sp-3) var(--sp-2); border-bottom: 1px solid var(--line); }
.lbr.teams li { grid-template-columns: 28px auto minmax(0, 1fr) 140px auto; }
.lbr li:last-child { border-bottom: 0; }
.lbr li.me { background: var(--surface-selected); border-radius: var(--r-md); border-bottom-color: transparent; }
.lbr-rank { text-align: center; font-family: var(--font-display); font-size: var(--fs-lg); font-weight: var(--fw-bold); color: var(--ink-3); }
.lbr-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lbr-who a { color: var(--ink); text-decoration: none; }
.lbr-who a:hover { color: var(--accent); text-decoration: underline; }
.lbr-who .lbs-you { margin-left: 0; }
.lbr-badges { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--medal-gold-ink); }
.lbr-badges svg { width: 14px; height: 14px; }
.lbr-bar { height: 6px; overflow: hidden; border-radius: var(--r-pill); background: var(--track); }
.lbr-bar i { display: block; width: 100%; height: 100%; border-radius: var(--r-pill); background: var(--grad-brand-x); transform-origin: left; scale: var(--p, 0) 1; }
.lbr-pts { text-align: right; font-family: var(--font-display); font-size: var(--fs-lg); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
span.lbr-pts { display: flex; flex-direction: column; align-items: flex-end; }
.lbr-tav { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--c); color: var(--on-accent); font-size: var(--fs-2xs); font-weight: var(--fw-bold); }
.lbr-card .card-head h3 { font-size: var(--fs-lg); }
@media (max-width: 720px) {
  .lbr li { grid-template-columns: 22px 30px auto minmax(0, 1fr) auto; gap: var(--sp-2); }
  .lbr.teams li { grid-template-columns: 22px auto minmax(0, 1fr) auto; }
  .lbr-rank, .lbr-pts { font-size: var(--fs-md); }
}
/* everyone else who scored: by name, no place, no points */
.lbr-rest h4 { margin: 0 0 var(--sp-2); font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ink-2); }
.lbr-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.lbr-chips li { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 var(--sp-3) 0 4px; border-radius: var(--r-pill); background: var(--surface); font-size: var(--fs-sm); color: var(--ink-2); }
.lbr-chips li.me { background: var(--surface-selected); color: var(--ink); font-weight: var(--fw-semibold); }

/* a phone: the same podium, smaller (three columns still fit at 360 px) */
@media (max-width: 640px) {
  .lbs { padding: var(--sp-4) var(--sp-3) 0; border-radius: var(--r-lg); }
  .lbs-head { flex-direction: column; align-items: flex-start; }
  .lbs-podium { width: 100%; grid-auto-columns: minmax(0, 1fr); gap: var(--sp-2); margin-top: var(--sp-4); }
  .lbs-podium.ghost { grid-auto-columns: minmax(0, 1fr); }
  .lbs-who { padding: 0 2px var(--sp-2); }
  .lbs-pod { --av: 46px; }
  .lbs-pod[data-place="1"] { --av: 58px; }
  .lbs-tav { width: 46px; height: 46px; font-size: var(--fs-md); }
  .lbs-pod[data-place="1"] .lbs-tav { width: 58px; height: 58px; font-size: var(--fs-lg); }
  .lbs-name, .lbs-pod[data-place="1"] .lbs-name { font-size: var(--fs-sm); }
  .lbs .lbs-you { display: none; }
  .lbs-team { font-size: var(--fs-2xs); }
  .lbs-pts span { display: none; }
  .lbs-pts b { font-size: var(--fs-lg); }
  .lbs-pod[data-place="1"] .lbs-pts b { font-size: var(--fs-xl); }
  .lbs-block { height: 54px; padding-top: var(--sp-2); }
  .lbs-pod[data-place="1"] .lbs-block { height: 94px; }
  .lbs-pod[data-place="2"] .lbs-block { height: 72px; }
  .lbs-block span { font-size: var(--fs-3xl); }
  .lbs-foot { margin: 0 calc(-1 * var(--sp-3)); padding: var(--sp-3); gap: var(--sp-2) var(--sp-5); }
  .lbs-foot dd b { font-size: var(--fs-md); }
}

/* ---------------------------------------------------------------- Inventory (2026-11-17, views/inventory*.js, docs/inventory.md)
   Rows with a photo, the code in a mono pill, where it is and its state; the item drawer (photos, where it is now with the
   moves it offers, details, the log); the project tab; QR labels on A4 sheets or a 62 mm label printer. */
.inv-code { display: inline-flex; align-items: center; height: var(--pill-h); padding: 0 var(--sp-2); border-radius: var(--r-xs); background: var(--surface-muted); color: var(--ink-2); font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: var(--fw-semibold); letter-spacing: var(--ls-wide); white-space: nowrap; }
.inv-code.lg { font-size: var(--fs-sm); height: auto; padding: 2px var(--sp-2); }
.inv-warn { color: var(--warn-strong); }
.inv-late { color: var(--danger); display: inline-flex; align-items: center; gap: 4px; }
.inv-late svg { width: 13px; height: 13px; }
.inv-ph { width: 44px; height: 44px; flex: 0 0 44px; border-radius: var(--r-sm); background: var(--surface-muted); color: var(--ink-3); display: grid; place-items: center; overflow: hidden; }
.inv-ph img { width: 100%; height: 100%; object-fit: cover; }
.inv-ph svg { width: 20px; height: 20px; }
.inv-ph.sm { width: 34px; height: 34px; flex-basis: 34px; }
.inv-ph.sm svg { width: 16px; height: 16px; }
.inv-filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-bottom: var(--sp-3); }
.inv-filters select.input { width: auto; max-width: 220px; }
.inv-search { flex: 1 1 240px; min-width: 0; }
.inv-listhead { display: flex; align-items: center; gap: var(--sp-3); padding: 0 var(--sp-3) var(--sp-2); }
.inv-tick { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; cursor: pointer; }
.inv-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-1); }
.inv-row { display: grid; grid-template-columns: auto 44px minmax(0, 2.2fr) minmax(0, 1.6fr) 90px auto; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: border-color var(--t-fast) var(--ease-std), background var(--t-fast) var(--ease-std); }
.inv-row:hover { border-color: var(--line-hover); background: var(--surface-hover); }
.inv-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.inv-row.late { border-color: var(--line-danger); box-shadow: inset 3px 0 0 var(--danger); }
.inv-row.dim { opacity: 0.62; }
.inv-main { min-width: 0; }
.inv-name { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.inv-name b { min-width: 0; }
.inv-sub { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 2px; }
.inv-where { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--ink-2); min-width: 0; }
.inv-where svg { width: 15px; height: 15px; flex: 0 0 15px; color: var(--ink-3); }
.inv-qty { font-size: var(--fs-sm); font-weight: var(--fw-semibold); text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.inv-state { display: flex; gap: var(--sp-1); justify-content: flex-end; flex-wrap: wrap; }
.inv-group { margin-top: var(--sp-4); }
.inv-group h3 { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-md); margin: 0 0 var(--sp-2) var(--sp-1); }
.inv-group h3 svg { width: 16px; height: 16px; color: var(--ink-3); }
.inv-group h3 .muted { font-weight: var(--fw-regular); margin-left: auto; }
.inv-bulk { position: sticky; bottom: 14px; z-index: var(--z-sticky); display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3); padding: 10px 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.inv-bulk[hidden] { display: none; }
.inv-bulk b { margin-right: auto; }
.inv-mine { padding: var(--sp-3) var(--sp-4); }
.inv-mine b svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; color: var(--accent); }
.inv-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
.inv-chip { display: inline-flex; align-items: center; gap: var(--sp-2); padding: 6px var(--sp-3); border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: var(--fs-sm); color: var(--ink); cursor: pointer; }
.inv-chip:hover { border-color: var(--line-hover); }
.inv-chip.late { border-color: var(--line-danger); background: var(--danger-bg-soft); }
.stat.link { text-align: left; font: inherit; cursor: pointer; width: 100%; }
/* the drawer */
.inv-drawer .dh-title { min-width: 0; }
.inv-drawer .dh-title .tag { gap: 4px; }
.inv-drawer .dh-title .tag svg { width: 13px; height: 13px; }
.inv-gallery { display: flex; gap: var(--sp-2); overflow-x: auto; padding-bottom: var(--sp-1); margin-bottom: var(--sp-4); scrollbar-width: thin; }
.inv-gph { flex: 0 0 auto; width: 132px; height: 104px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--surface-muted); padding: 0; cursor: pointer; }
.inv-gph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.inv-gph.add { display: grid; place-items: center; align-content: center; gap: 6px; color: var(--ink-3); font: inherit; font-size: var(--fs-xs); padding: var(--sp-2); text-align: center; border-style: dashed; }
.inv-gph.add svg { width: 20px; height: 20px; }
.inv-gallery:has(.inv-gph:not(.add)) .inv-gph.add { width: 104px; }
.inv-now { border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-4); background: var(--surface); margin-bottom: var(--sp-4); }
.inv-now.late { border-color: var(--line-danger); background: var(--danger-bg-soft); }
.inv-now-where { display: flex; gap: var(--sp-3); align-items: center; }
.inv-now-where b { font-size: var(--fs-lg); }
.inv-now-ic { width: 40px; height: 40px; flex: 0 0 40px; border-radius: var(--r-pill); display: grid; place-items: center; background: var(--accent-bg); color: var(--accent-ink); }
.inv-now-ic svg { width: 19px; height: 19px; }
.inv-acts { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.inv-sec { margin-bottom: var(--sp-5); }
.inv-sec h3 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: var(--ls-caps); color: var(--ink-3); margin: 0 0 var(--sp-2); }
.inv-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px var(--sp-4); margin: 0; font-size: var(--fs-sm); }
.inv-dl dt { color: var(--ink-3); }
.inv-dl dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.inv-notes { white-space: pre-wrap; font-size: var(--fs-sm); background: var(--surface-muted); border-radius: var(--r-sm); padding: var(--sp-2) var(--sp-3); margin: var(--sp-3) 0 0; }
.inv-hold { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.inv-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.inv-log li { display: flex; gap: var(--sp-3); padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); min-width: 0; }
.inv-log li:last-child { border-bottom: 0; }
.inv-log li.voided { opacity: 0.55; }
.inv-log li.voided b { text-decoration: line-through; }
.inv-log li .grow { min-width: 0; }
.inv-log-ic { width: 28px; height: 28px; flex: 0 0 28px; border-radius: var(--r-pill); display: grid; place-items: center; background: var(--surface-muted); color: var(--ink-3); }
.inv-log-ic svg { width: 14px; height: 14px; }
.inv-log-ic.k-pickup, .inv-log-ic.k-stock_out, .inv-log-ic.k-handover { background: var(--accent-bg); color: var(--accent-ink); }
.inv-log-ic.k-deliver { background: color-mix(in srgb, var(--tone-violet) 14%, var(--mix-bg)); color: var(--tone-violet); }
.inv-log-ic.k-return, .inv-log-ic.k-stock_in, .inv-log-ic.k-receive, .inv-log-ic.k-check, .inv-log-ic.k-found { background: var(--ok-bg-soft); color: var(--ok-strong); }
.inv-log-ic.k-lost, .inv-log-ic.k-condition, .inv-log-ic.k-repair { background: var(--warn-bg-soft); color: var(--warn-strong); }
.inv-route { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--ink-2); }
.inv-route svg { width: 12px; height: 12px; color: var(--ink-3); }
.inv-log.wide li { padding: var(--sp-3) 0; }
/* forms */
.inv-kinds { max-width: 100%; }
.inv-person { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.inv-person .combo-btn { flex: 1 1 180px; min-width: 0; }
.inv-person input { flex: 1 1 180px; min-width: 0; }
.inv-photos { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.inv-pthumb { position: relative; width: 72px; height: 72px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); }
.inv-pthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.inv-pthumb .x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: var(--r-pill); border: 0; display: grid; place-items: center; background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: var(--shadow-sm); }
.inv-pthumb .x svg { width: 12px; height: 12px; }
.inv-addph { width: 72px; height: 72px; border-radius: var(--r-sm); border: 1px dashed var(--field-line-strong); background: var(--surface-muted); color: var(--ink-3); display: grid; place-items: center; align-content: center; gap: 2px; font: inherit; font-size: var(--fs-xs); cursor: pointer; }
.inv-addph svg { width: 18px; height: 18px; }
.inv-movehead { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--surface-muted); margin-bottom: var(--sp-4); }
.inv-pick, .inv-checklist { max-height: min(48vh, 440px); overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.inv-pickrow { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--line); cursor: pointer; min-width: 0; }
.inv-pickrow:last-child { border-bottom: 0; }
.inv-pickrow.taken { background: var(--warn-bg-soft); }
.inv-pickrow select.input { width: auto; }
.inv-pq { width: 72px; flex: 0 0 72px; }
.inv-free { font-size: var(--fs-xs); font-weight: var(--fw-semibold); white-space: nowrap; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
.inv-free.ok { color: var(--ok-strong); }
.inv-free.no { color: var(--warn-strong); }
.inv-clash { margin: 0 0 var(--sp-3); padding-left: var(--sp-4); font-size: var(--fs-sm); display: grid; gap: 4px; }
.inv-places { display: grid; gap: 2px; }
.inv-place { display: flex; align-items: center; gap: var(--sp-1); padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.inv-scan { position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--surface-inverse); aspect-ratio: 4 / 3; }
.inv-scan video { width: 100%; height: 100%; object-fit: cover; display: block; }
.inv-scan-frame { position: absolute; inset: 18%; border: 2px solid var(--on-accent); border-radius: var(--r-md); box-shadow: 0 0 0 999px color-mix(in srgb, var(--surface-inverse) 45%, transparent); }
/* a project's Inventory tab */
.inv-sechead { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-3); flex-wrap: wrap; }
.inv-sechead h3 { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-md); margin: 0; }
.inv-sechead h3 svg { width: 16px; height: 16px; color: var(--ink-3); }
.inv-holds { display: grid; gap: 2px; }
.inv-hrow, .inv-mrow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--sp-3); padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.inv-hrow:last-child, .inv-mrow:last-child { border-bottom: 0; }
.inv-hmain { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; cursor: pointer; }
.inv-hacts { display: flex; gap: var(--sp-1); justify-content: flex-end; align-items: center; }
.inv-merch { display: grid; }
.inv-mhead, .inv-mrow { grid-template-columns: minmax(0, 1fr) 82px 74px 64px 104px auto; }
.inv-mhead { display: grid; gap: var(--sp-3); font-size: var(--fs-xs); color: var(--ink-3); font-weight: var(--fw-semibold); padding-bottom: var(--sp-1); border-bottom: 1px solid var(--line); }
.inv-mnum { font-variant-numeric: tabular-nums; font-size: var(--fs-sm); }
@media (max-width: 900px) {
  .inv-row { grid-template-columns: auto 44px minmax(0, 1fr) auto; grid-template-areas: "tick ph main state" "tick ph where qty"; row-gap: 2px; }
  .inv-row > .inv-tick { grid-area: tick; } .inv-row > .inv-ph { grid-area: ph; } .inv-row > .inv-main { grid-area: main; } .inv-row > .inv-where { grid-area: where; } .inv-row > .inv-qty { grid-area: qty; } .inv-row > .inv-state { grid-area: state; }
  .inv-mhead { display: none; }
  .inv-mrow { grid-template-columns: repeat(4, auto) 1fr; }
  .inv-mrow > .inv-hmain { grid-column: 1 / -1; }
  .inv-mrow > .inv-hacts { grid-column: auto; }
}
@media (max-width: 640px) {
  .inv-hrow { grid-template-columns: minmax(0, 1fr) auto; }
  .inv-hrow > .inv-hacts { grid-column: 1 / -1; justify-content: flex-start; }
  .inv-filters select.input { flex: 1 1 140px; max-width: none; }
  .inv-acts .btn { flex: 1 1 auto; }
  .inv-bulk { bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); }
}
/* QR labels (views/labels.js): the sheet on screen as it will print */
.lbl-pages { display: grid; gap: var(--sp-5); justify-content: center; padding: var(--sp-4) 0; }
.lbl-sheet { background: var(--surface); color: var(--doc-ink); box-shadow: var(--shadow-md); display: grid; align-content: start; }
.lbl-sheet.a4 { width: 210mm; min-height: 297mm; grid-template-columns: repeat(3, 70mm); grid-auto-rows: 37mm; padding-top: 0.5mm; }
.lbl-sheet.big { width: 210mm; min-height: 297mm; grid-template-columns: repeat(2, 99.1mm); grid-auto-rows: 57mm; column-gap: 2.5mm; padding: 13.5mm 0 0 4.65mm; }
.lbl-sheet.roll { width: 62mm; height: 29mm; grid-template-columns: 62mm; grid-auto-rows: 29mm; }
.lbl { display: flex; align-items: center; gap: 2.5mm; padding: 2.5mm 3mm; overflow: hidden; outline: 1px dashed var(--doc-line); outline-offset: -1px; font-family: Arial, Helvetica, sans-serif; }
.lbl.blank { outline-color: transparent; }
.lbl-qr { flex: 0 0 auto; width: 28mm; height: 28mm; }
.lbl-qr svg { width: 100%; height: 100%; display: block; }
.lbl-text { min-width: 0; display: grid; gap: 0.8mm; }
.lbl-code { font-family: var(--font-mono); font-weight: var(--fw-bold); font-size: 12pt; letter-spacing: var(--ls-wide); }
.lbl-name { font-size: 8pt; font-weight: var(--fw-semibold); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lbl-sub { font-size: 6.5pt; color: var(--doc-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbl-own { font-size: 5.5pt; color: var(--doc-ink-3); text-transform: uppercase; letter-spacing: var(--ls-caps); }
.lbl-sheet.big .lbl { gap: 4mm; padding: 4mm 5mm; }
.lbl-sheet.big .lbl-qr { width: 44mm; height: 44mm; }
.lbl-sheet.big .lbl-code { font-size: 16pt; }
.lbl-sheet.big .lbl-name { font-size: 11pt; -webkit-line-clamp: 3; }
.lbl-sheet.big .lbl-sub { font-size: 8.5pt; white-space: normal; }
.lbl-sheet.big .lbl-own { font-size: 7pt; }
.lbl-sheet.roll .lbl { padding: 1.5mm 2mm; gap: 2mm; }
.lbl-sheet.roll .lbl-qr { width: 25mm; height: 25mm; }
.lbl-sheet.roll .lbl-code { font-size: 11pt; }
.lbl-sheet.roll .lbl-name { font-size: 7.5pt; }
@page inv-a4 { size: A4; margin: 0; @bottom-right { content: none; } }
@page inv-roll { size: 62mm 29mm; margin: 0; @bottom-right { content: none; } }
@media print {
  .lbl-pages { display: block; padding: 0; }
  .lbl-sheet { box-shadow: none; break-after: page; }
  .lbl-sheet:last-child { break-after: auto; }
  .lbl-sheet.a4, .lbl-sheet.big { page: inv-a4; min-height: 0; }
  .lbl-sheet.roll { page: inv-roll; }
  .lbl { outline: none; }
}
@media (prefers-reduced-motion: reduce) { .inv-row, .inv-chip { transition: none; } }

/* ---------------------------------------------------------------- comment threads on a quotation (2026-11-17)
   core/quote-threads.js: the review link (public/quote.html) and Kelar's "Comments on the quotation". Cards beside
   the sheet at their line's height (data-mode="rail"), or stacked under it with the open one docked at the foot of
   the screen (data-mode="stack": phones, narrow dialogs). Plain cards: one shadow on the open one, no glow. */
.qt { position: relative; }
.qt-bar { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.qt-count { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--ink-2); }
.qt-count svg { width: 16px; height: 16px; color: var(--accent); }
.qt-count b { color: var(--ink); }
.qt-nav { display: inline-flex; gap: 2px; }
.qt-hint { flex-basis: 100%; display: none; }
.qt-doc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 320px); gap: var(--sp-4); align-items: start; }
.qt-sheet { min-width: 0; overflow-x: auto; }
.qt-sheet .doc-page { margin: 0 0 var(--sp-4); }
.qt-rail { position: relative; min-width: 0; }
.qt[data-mode="rail"] .qt-card { position: absolute; left: 0; right: 0; top: 0; }
.qt.qt-ready[data-mode="rail"] .qt-card { transition: transform var(--t-med) var(--ease-out), left var(--t-fast) var(--ease-std), box-shadow var(--t-fast) var(--ease-std); }
.qt[data-mode="rail"] .qt-card.on { left: calc(-1 * var(--sp-3)); right: var(--sp-3); z-index: 2; }
.qt[data-mode="stack"] .qt-doc { grid-template-columns: minmax(0, 1fr); }
.qt[data-mode="stack"] .qt-sheet .doc-page { margin: 0 auto var(--sp-4); }
.qt[data-mode="stack"] .qt-rail { display: grid; gap: var(--sp-2); }
.qt[data-mode="stack"] .qt-hint { display: block; }
.qt-card { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); padding: var(--sp-3); box-shadow: var(--shadow-sm); cursor: pointer; font-size: var(--fs-sm); color: var(--ink); outline: none; }
.qt-card:hover { border-color: var(--line-hover); }
.qt-card:focus-visible { box-shadow: var(--ring); }
.qt-card.on { cursor: default; border-color: var(--line-accent); box-shadow: var(--shadow-lg); }
.qt-card.in-dock { border-color: var(--line-accent); background: var(--accent-bg); }
/* a resolved thread stays on the page, dimmed but readable (2026-11-17) */
.qt-card.resolved { background: var(--surface-sunken); box-shadow: none; }
.qt-card.resolved .qt-text { color: var(--ink-2); }
.qt-card.resolved:not(.on) .qt-av, .qt-card.resolved:not(.on) .qt-e > .av { opacity: 0.7; }
.qt-card.resolved.on { background: var(--surface); }
.qt-top { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); min-width: 0; }
.qt-line { display: inline-flex; align-items: center; gap: var(--sp-1); min-width: 0; flex: 1 1 auto; padding: 0; border: 0; background: none; color: var(--ink-3); font: inherit; font-size: var(--fs-xs); text-align: left; cursor: pointer; }
.qt-line.gen { cursor: default; }
.qt-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qt-line svg { width: 13px; height: 13px; flex: none; }
.qt-line b, .qt-n { flex: none; min-width: 18px; height: 18px; padding: 0 4px; border-radius: var(--r-pill); background: var(--warn-solid); color: var(--on-accent); font-size: var(--fs-xs); display: inline-grid; place-items: center; }
button.qt-line:hover span { color: var(--ink); text-decoration: underline; }
.qt-act { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 var(--sp-2); border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-semibold); cursor: pointer; }
.qt-act svg { width: 14px; height: 14px; }
.qt-act.ok:hover { border-color: var(--ok); color: var(--ok); background: var(--ok-bg); }
.qt-act:hover { border-color: var(--line-hover); color: var(--ink); }
.qt-x { flex: none; width: 28px; height: 28px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: var(--r-pill); background: none; color: var(--ink-3); cursor: pointer; }
.qt-x svg { width: 16px; height: 16px; }
.qt-x:hover { background: var(--surface-sunken); color: var(--ink); }
.qt-e { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--sp-2); align-items: start; }
.qt-e + .qt-e, .qt-more + .qt-e { margin-top: var(--sp-3); }
.qt-e:not(.lead) { padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.qt-av { width: 28px; height: 28px; border-radius: var(--r-pill); background: var(--c, var(--accent)); color: var(--surface); display: inline-grid; place-items: center; font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-wide); flex: none; }
.qt-av.sm { width: 24px; height: 24px; font-size: var(--fs-2xs); }
.qt-e > .av { width: 28px; height: 28px; }
.qt-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--sp-2); line-height: var(--lh-snug); }
.qt-who b { font-weight: var(--fw-semibold); color: var(--ink); }
.qt-who time { font-size: var(--fs-xs); color: var(--ink-3); }
.qt-team { font-size: var(--fs-xs); color: var(--accent-ink); }
.qt-new { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--accent-ink); background: var(--accent-bg); border-radius: var(--r-pill); padding: 0 var(--sp-2); }
.qt-text { margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: var(--lh-normal); color: var(--ink); }
.qt-card:not(.on) .qt-text { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.qt-more { display: block; margin: var(--sp-2) 0 0 36px; padding: 0; border: 0; background: none; color: var(--accent-ink); font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-semibold); cursor: pointer; }
.qt-was { display: flex; align-items: center; gap: var(--sp-1); margin-bottom: var(--sp-2); padding: 2px var(--sp-2); border-radius: var(--r-pill); background: var(--ok-bg); color: var(--ok); font-size: var(--fs-xs); width: fit-content; max-width: 100%; }
.qt-was svg, .qt-step svg { width: 14px; height: 14px; flex: none; }
.qt-was b, .qt-step b { font-weight: var(--fw-semibold); }
.qt-step { display: flex; align-items: center; gap: var(--sp-1); margin-top: var(--sp-3); padding-top: var(--sp-2); border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--ink-3); }
.qt-step.resolved { color: var(--ok); }
.qt-step time { color: var(--ink-3); }
.qt-step + .qt-e { margin-top: var(--sp-3); }
.qt-filter button .muted { margin-left: 2px; }
.qt-sum { display: block; margin-top: 2px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qt-compose { display: grid; gap: var(--sp-2); margin-top: var(--sp-3); }
.qt-compose textarea { min-height: 38px; resize: none; line-height: var(--lh-normal); }
.qt-cbar { display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-2); }
.qt-msg { flex: 1 1 auto; min-width: 0; color: var(--ink-3); }
.qt-empty { padding: var(--sp-3); border: 1px dashed var(--line); border-radius: var(--r-md); }
.qt-dock { position: sticky; bottom: 0; z-index: 4; margin-top: var(--sp-3); padding-bottom: env(safe-area-inset-bottom, 0); }
.qt-dock .qt-card { max-height: min(62vh, 520px); overflow-y: auto; box-shadow: var(--shadow-lg); }
.doc-tbl tr.qc-hover > td { background: var(--accent-bg); }
.qt-row { display: flex; align-items: center; gap: var(--sp-2); width: 100%; padding: var(--sp-2); border: 0; border-radius: var(--r-sm); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.qt-row:hover { background: var(--surface-sunken); }
.qt-row > .grow { display: flex; flex-direction: column; gap: 1px; }
.qt-row > svg { width: 16px; height: 16px; color: var(--ink-3); flex: none; }
.qt-list { display: grid; gap: 2px; }
.modal.qt-modal { width: min(1260px, 100%); }
.qt-modal .qt-bar { top: calc(-1 * var(--sp-2)); } /* flush with the top of the dialog's scrolling body */
@media (max-width: 640px) {
  .qt-bar { padding: var(--sp-2); }
  .qt-compose textarea, .qt-compose input { font-size: calc(var(--fs-lg) + 1px); } /* 16px: no zoom on iPhone */
  .qt-act span { display: none; }
  .qt-act { width: 32px; justify-content: center; padding: 0; }
}
@media (prefers-reduced-motion: reduce) { .qt[data-mode="rail"] .qt-card { transition: none; } }
@media print { .qt-bar, .qt-rail, .qt-dock { display: none !important; } .qt-doc { display: block; } }

/* Co-leads and supporting people of a serial event's date (2026-11-17, events-ui.js, core/series.js) */
.ev-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.ev-people .field > .btn { align-self: flex-start; margin-top: var(--sp-2); }
.ev-plist { display: flex; flex-direction: column; gap: var(--sp-1); }
.ev-prow { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; padding: var(--sp-1) var(--sp-2); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.ev-plabel { flex: 0 0 auto; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--accent-ink); background: var(--accent-bg); border-radius: var(--r-pill); padding: 2px var(--sp-2); white-space: nowrap; }
.ev-chips { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.ev-pchip { display: inline-flex; align-items: center; gap: var(--sp-1); max-width: 100%; padding: 2px 2px 2px var(--sp-1); border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); font-size: var(--fs-sm); }
.ev-pchip-x { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-3); cursor: pointer; }
.ev-pchip-x:hover { background: var(--surface-hover); color: var(--ink); }
.ev-pchip-x svg { width: 12px; height: 12px; }
.ev-leads { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); min-width: 0; }
.ev-team { display: inline-flex; align-items: center; gap: var(--sp-1); flex: 0 0 auto; }
.ev-team-sup { display: inline-flex; padding-left: var(--sp-1); border-left: 1px solid var(--line); opacity: 0.85; }
@media (max-width: 640px) { .ev-people { grid-template-columns: minmax(0, 1fr); } }
.pc-date { grid-template-columns: 56px minmax(0, 1fr) auto auto; }
.pc-date .ev-team .av { --s: 18px; }
.ce-chip .avs { margin-left: 2px; }
.ce-chip .avs .av { --s: 18px; }
.ce-team { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); margin: calc(var(--sp-2) * -1) 0 var(--sp-3); }

/* ------------------------------------------------------------ Quotation editor: live editing (2026-11-18)
   Who else is in the quotation (faces by the save state), the line each of them is on (an accent edge and their
   first name), and lines someone else changed (a short flash). Presence is state, so it takes the one accent. */
.qe-people { display: inline-flex; align-items: center; gap: var(--sp-2); }
.qe-people:empty { display: none; }
.ql.peer { box-shadow: inset 2px 0 0 var(--accent); }
.ql-peer { position: absolute; right: var(--sp-8); top: calc(var(--sp-2) * -1); padding: 0 var(--sp-2); border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-size: var(--fs-2xs); line-height: var(--lh-base); pointer-events: none; white-space: nowrap; z-index: var(--z-sticky); }
.ql.just-in { animation: qc-flash 1.6s var(--ease-out); }
@media (prefers-reduced-motion: reduce) { .ql.just-in { animation: none; } }

/* ------------------------------------------------------------ Quotation editor: sub-sections (2026-11-18)
   A heading inside a section with its own subtotal; the lines under it are indented on a thin guide, so the
   breakdown reads at a glance. Plainer than a section: no fill, a semibold title. */
.ql.section.subsec { background: transparent; border-top: 1px solid var(--line); }
.ql.section.subsec textarea { font-weight: var(--fw-semibold); }
.ql.section.subsec .sub-mark { display: inline-flex; color: var(--ink-3); padding-top: var(--sp-1); }
.ql.section.subsec .sub-mark svg { width: 14px; height: 14px; }
.ql.section.subsec .sec-sub { font-weight: var(--fw-semibold); }
.ql.in-sub > textarea[data-f="description"] { box-shadow: inset 2px 0 0 var(--surface-muted); padding-left: var(--sp-3); margin-left: var(--sp-3); width: calc(100% - var(--sp-3)); }
.ql.section.subsec.hl { background: var(--warn-bg); }

/* ------------------------------------------------------------ Printed quotation: sub-sections (2026-11-18)
   The heading semibold on white, its lines indented, its Sub Total in italics (lighter than a section's). */
.doc-tbl tr.subsec td { font-weight: var(--fw-semibold); border-top: 1px solid var(--doc-line-strong); }
.doc-tbl td.in-sub { padding-left: var(--sp-4); }
.doc-tbl tr.subtot td { font-style: italic; color: var(--doc-ink-2); }
.doc-tbl.tele tr.subsec td { padding-top: var(--sp-2); }
@media print { .doc-tbl tr.subsec { break-after: avoid; } .doc-tbl tr.subtot { break-before: avoid; } }
.apv-l-sub td { padding-top: var(--sp-2); font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--ink-2); } /* 2026-11-18: a sub-section in the approval panel */
.bl-tbl tr.bl-subsec td { padding-top: var(--sp-2); border-bottom: 0; } /* 2026-11-18: a sub-section on the Finance tab's budget */
.bl-tbl tr.bl-subsec svg { width: 13px; height: 13px; margin-right: var(--sp-1); color: var(--ink-3); vertical-align: -2px; }

/* ---------------------------------------------------------------- Ground handling (2026-11-18, views/ground.js, public/ground.html)
   Each car is a block: its standby time, driver and plate, then its guests, each with the tracker's steps as one row of
   buttons. Colour only for state: green when done, amber for "now" and a guest who should have landed. */
.form-grid.gh-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .form-grid.gh-g3 { grid-template-columns: minmax(0, 1fr); } }
.gh-fs { border: 1px solid var(--line-2); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4) var(--sp-4); margin: 0; display: grid; gap: var(--sp-3); }
.gh-fs legend { display: inline-flex; align-items: center; gap: var(--sp-1); padding: 0 var(--sp-1); font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ink-2); }
.gh-fs legend svg { width: 14px; height: 14px; }
.gh-sum { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); font-size: var(--fs-md); color: var(--ink-2); margin-bottom: var(--sp-3); }
.gh-warn { display: inline-flex; align-items: center; gap: var(--sp-1); color: var(--warn); font-weight: var(--fw-semibold); }
.gh-warn svg { width: 14px; height: 14px; }
.gh-run { border: 1px solid var(--line-2); border-radius: var(--r-md); margin-top: var(--sp-3); background: var(--surface); overflow: hidden; }
.gh-run.soon { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn); }
.gh-run.done .gh-run-head { background: var(--ok-bg-soft); }
.gh-run.loose { border-style: dashed; }
.gh-run-head { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-4); background: var(--surface-muted); }
.gh-run.loose .gh-run-head, .gh-run.self .gh-run-head { grid-template-columns: minmax(0, 1fr); }
.gh-run-time { display: flex; flex-direction: column; line-height: var(--lh-tight); }
.gh-run-time b { font-size: var(--fs-xl); font-variant-numeric: tabular-nums; }
.gh-run-time span { font-size: var(--fs-2xs); color: var(--ink-3); text-transform: uppercase; letter-spacing: var(--ls-caps); }
.gh-run-main { min-width: 0; }
.gh-run-acts { display: flex; align-items: center; gap: var(--sp-2); }
.gh-none { padding: var(--sp-3) var(--sp-4); margin: 0; }
.gh-g { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--line); }
.gh-g.st-cancelled { opacity: 0.5; }
.gh-g.late { background: var(--warn-bg-soft); }
.gh-g-time { display: flex; flex-direction: column; font-size: var(--fs-sm); line-height: var(--lh-snug); font-variant-numeric: tabular-nums; }
.gh-g-time b { font-size: var(--fs-md); }
.gh-g-time a { color: var(--accent); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.gh-g-who { min-width: 0; }
.gh-g-sub a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); }
.tag.gh-food { background: var(--warn-bg); color: var(--warn); }
.gh-steps { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-pill); overflow: hidden; background: var(--surface); }
.gh-step { border: 0; background: transparent; font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--ink-3); padding: 0 var(--sp-3); height: var(--ctl-h-sm); display: inline-flex; align-items: center; gap: var(--sp-1); cursor: pointer; white-space: nowrap; transition: background var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std); }
.gh-step + .gh-step { border-left: 1px solid var(--line); }
.gh-step svg { width: 12px; height: 12px; }
.gh-step:hover:not(:disabled) { background: var(--accent-bg); color: var(--accent-ink); }
.gh-step.done { background: var(--ok-bg); color: var(--ok); }
.gh-step.cur { background: var(--ok); color: var(--surface); }
.gh-step:disabled { cursor: default; }
.gh-step:focus-visible { outline: none; box-shadow: inset var(--ring); }
.gh-steps.car .gh-step { height: calc(var(--ctl-h-sm) - 4px); }
.gh-foods { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.gh-tbl td { vertical-align: top; }
.gh-tbl tr.dim { opacity: 0.5; }
.gh-pick { max-height: 280px; overflow: auto; border: 1px solid var(--line-2); border-radius: var(--r-md); }
.gh-pick-row { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-top: 1px solid var(--line); font-size: var(--fs-md); cursor: pointer; }
.gh-pick-row:first-child { border-top: 0; }
.gh-sug { padding: var(--sp-2) 0; border-top: 1px solid var(--line); }
@media (max-width: 900px) {
  .gh-g { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .gh-g .gh-steps { grid-column: 1 / -1; grid-row: 2; }
  .gh-run-head { grid-template-columns: 56px minmax(0, 1fr); }
  .gh-run-acts { grid-column: 1 / -1; justify-content: space-between; }
  .gh-steps { display: flex; }
  .gh-steps .gh-step { flex: 1; justify-content: center; padding: 0 var(--sp-1); }
}

/* 2026-11-23 quotation editor: moving lines with the pointer (views/quotation.js › moving lines) */
.ql .handle { touch-action: none; }
.ql.ql-moving { opacity: .38; }
body.ql-dragging, body.ql-dragging * { cursor: grabbing !important; user-select: none; }
.ql-ghost { position: fixed; left: 0; top: 0; z-index: var(--z-drag); pointer-events: none; display: inline-flex; align-items: center; gap: var(--sp-2); max-width: 320px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line-accent); box-shadow: var(--shadow-lg); font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ink); }
.ql-ghost span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ql-ghost svg { width: 14px; height: 14px; color: var(--accent); flex: none; }
.ql-dropbar { position: fixed; z-index: var(--z-drag); height: 3px; border-radius: var(--r-pill); background: var(--accent); pointer-events: none; }

/* 2026-11-23 quotation editor: review comments floating over the editor (views/quote-float-ui.js) */
.qcf { position: fixed; right: var(--sp-4); bottom: calc(88px + env(safe-area-inset-bottom, 0px)); z-index: var(--z-popover); }
.qcf[hidden] { display: none; }
.qcf-pillbtn { display: inline-flex; align-items: center; gap: var(--sp-2); height: 38px; padding: 0 var(--sp-4); border-radius: var(--r-pill); border: 1px solid var(--line-accent); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.qcf-pillbtn svg { width: 16px; height: 16px; color: var(--accent); }
.qcf-pillbtn b { color: var(--accent-ink, var(--accent)); }
.qcf.qcf-open { width: min(400px, calc(100vw - 2 * var(--sp-4))); max-height: min(70vh, 640px); display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
.qcf-head { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--line); }
.qcf-head > b { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); }
.qcf-head > b svg { width: 15px; height: 15px; color: var(--accent); }
.qcf-list { overflow-y: auto; padding: var(--sp-3); display: grid; gap: var(--sp-2); align-content: start; }
.qcf-list .qt-card { cursor: pointer; box-shadow: none; }
.qcf-list .qt-card.on { cursor: default; box-shadow: none; }
.qcf-reply { margin-top: var(--sp-2); display: inline-flex; align-items: center; gap: 4px; }
.qcf-reply svg { width: 13px; height: 13px; }
.qcf-client { font-size: var(--fs-xs); color: var(--ink-3); }
.qcf-empty { padding: var(--sp-4); text-align: center; }
.qcf-foot { padding: var(--sp-2) var(--sp-3); border-top: 1px solid var(--line); }
.ql.ql-flash { animation: ql-flash 1.6s ease-out; }
@keyframes ql-flash { 0%, 30% { background: var(--warn-bg); box-shadow: inset 3px 0 0 var(--warn); } 100% { background: transparent; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .ql.ql-flash { animation: none; background: var(--warn-bg); } }
@media (max-width: 640px) { .qcf { right: var(--sp-2); left: var(--sp-2); bottom: calc(var(--tabbar-h, 0px) + 80px); } .qcf.qcf-open { width: auto; } .qcf.qcf-pill { left: auto; } }

/* 2026-11-23 agenda: speakers, MC script, steady editing */
/* The Agenda tab's list card shares its class with the calendar's side list (.ag-list, a 70vh box that scrolls): on the
   Agenda tab it must not scroll by itself, or every redraw puts it back at its top (the "drags upwards" the owner saw). */
.card.ag-list[data-frame] { max-height: none; overflow: visible; }
.ag-rows .ag-row { scroll-margin-block: 96px; }
/* several speakers: a small box each, side by side when there is room */
.ag-spk { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--sp-1); min-width: 0; }
.ag-spk-one { display: inline-flex; align-items: center; flex: 0 1 auto; min-width: 0; max-width: 100%; position: relative; }
.ag-spk-one .input { flex: 1; min-width: 9ch; field-sizing: content; }
.ag-spk:not(:has(.ag-spk-one + .ag-spk-one)) .ag-spk-one { flex: 1 1 auto; }
.ag-spk-x { flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-3); cursor: pointer; visibility: hidden; }
.ag-spk-x svg { width: 11px; height: 11px; }
.ag-spk-x:hover { background: var(--surface-muted); color: var(--danger); }
.ag-row:hover .ag-spk-x, .ag-spk-one:focus-within .ag-spk-x, .ag-spk-x:focus-visible { visibility: visible; }
.ag-spk-add { flex: none; display: inline-flex; align-items: center; gap: 2px; height: 20px; padding: 0 var(--sp-2); border: 1px dashed var(--line-2); border-radius: var(--r-pill); background: transparent; color: var(--ink-3); font: inherit; font-size: var(--fs-2xs); font-weight: var(--fw-semibold); cursor: pointer; visibility: hidden; }
.ag-spk-add svg { width: 11px; height: 11px; }
.ag-spk-add:hover { color: var(--accent); border-color: var(--accent); }
.ag-row:hover .ag-spk-add, .ag-row:focus-within .ag-spk-add, .ag-spk-add:focus-visible { visibility: visible; }
@media (hover: none) { .ag-spk-x, .ag-spk-add { visibility: visible; } .ag-spk-x { width: 28px; height: 28px; } .ag-spk-add { height: 26px; } }
/* the MC script, on the FOH view */
.ag-script { grid-column: 2 / -1; }
.ag-script textarea { width: 100%; min-height: 44px; resize: vertical; line-height: var(--lh-base); font-size: var(--fs-sm); background: var(--surface); }
.ag-scripttag { display: inline-flex; align-items: center; gap: 4px; border: 0; cursor: pointer; font: inherit; font-size: var(--fs-2xs); font-weight: var(--fw-semibold); }
.ag-scripttag svg { width: 11px; height: 11px; }
.ag-mcprev { display: grid; gap: var(--sp-2); }
.ag-mcrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 260px); gap: 2px var(--sp-3); align-items: center; padding: var(--sp-2) 0; border-top: 1px solid var(--line); }
.ag-mcsec { min-width: 0; font-size: var(--fs-sm); }
.ag-mcsec .tiny { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-mcrow > .tiny { grid-column: 2; }
.ag-mcwarn { color: var(--warn); }
@media (max-width: 640px) { .ag-mcrow { grid-template-columns: minmax(0, 1fr); } .ag-mcrow > .tiny { grid-column: 1; } }
@media (max-width: 720px) { .ag-script { grid-column: 1 / -1; } }
/* the printed MC script (print/agenda/:id?foh=1&script=1), after the rundown, in the shape of the team's script doc */
.doc-page .ag-mc { font-family: Arial, sans-serif; color: var(--doc-ink-2); }
.doc-page .ag-mc-title { font-family: Arial, sans-serif; font-size: 14px; font-weight: var(--fw-bold); color: var(--doc-ink); text-transform: uppercase; letter-spacing: 0.06em; text-align: center; margin: 4mm 0 5mm; }
.doc-page .ag-mc-day { display: flex; gap: 10px; align-items: baseline; background: var(--doc-ag-band); color: var(--doc-ag-band-ink); padding: 6px 9px; font-size: 11px; margin: 0 0 4mm; }
.doc-page .ag-mc-day b { text-transform: uppercase; letter-spacing: 0.06em; }
.doc-page .ag-mc-item { margin: 0 0 6mm; }
.doc-page .ag-mc-h { font-family: Arial, sans-serif; font-size: 12px; font-weight: var(--fw-bold); color: var(--doc-ink); margin: 0 0 1mm; padding-bottom: 1.5mm; border-bottom: 1.5px solid var(--doc-ag-band); }
.doc-page .ag-mc-spk { font-size: 10px; color: var(--doc-ink-3); margin: 0 0 2mm; }
.doc-page .ag-mc-note { font-size: 9.5px; font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: 0.06em; color: var(--doc-ag-band); margin: 2mm 0 1mm; }
.doc-page .ag-mc-cue { display: flex; align-items: center; gap: 8px; margin: 3mm 0; font-size: 10px; font-weight: var(--fw-bold); color: var(--doc-ink); text-transform: uppercase; letter-spacing: 0.04em; }
.doc-page .ag-mc-cue::before, .doc-page .ag-mc-cue::after { content: ""; flex: 1; border-top: 1px dashed var(--doc-ink-3); }
.doc-page .ag-mc-cue span:empty { display: none; }
.doc-page .ag-mc-say { font-size: 11px; line-height: 1.55; margin: 0 0 2.5mm; white-space: normal; }
@media print {
  .doc-page .ag-mc-item.short { break-inside: avoid; }
  .doc-page .ag-mc-h, .doc-page .ag-mc-day { break-after: avoid; page-break-after: avoid; }
  .doc-page .ag-mc-cue, .doc-page .ag-mc-note { break-after: avoid; }
}

/* 2026-11-23 quotation editor: a change offered to the other side of a Claim / Actual pair (views/pair-sync-ui.js) */
.ps-sync { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin: calc(-1 * var(--sp-2)) 0 var(--sp-4); font-size: var(--fs-sm); }
.ps-sync.quiet { justify-content: flex-end; }
.ps-sync.on { padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line-accent); border-radius: var(--r-md); background: var(--accent-bg); }
.ps-sync.on > svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
.ps-sync .grow { min-width: 200px; }
.ps-sync-mode { display: inline-flex; align-items: center; gap: var(--sp-1); }
.ps-sync-mode select { height: 24px; padding: 0 var(--sp-2); font-size: var(--fs-xs); width: auto; }
.ps-sync-list { display: grid; gap: var(--sp-2); max-height: 50vh; overflow-y: auto; }

/* 2026-11-23 travel: group flights from several cities */
/* One destination and date, a row per city with its people, the fare out and back; rows turn into cards on phones
   (views/groupflights-ui.js, docs/group-flights.md). */
.tg .card-head h3 .muted { font-weight: var(--fw-medium); }
.tg-set { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-3); }
.tg-set .mf > span, .tg-dlg .mf > span { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--ink-3); }
.tg-set .input { width: 100%; }
.tg-bar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-2); }
.tg-bar > .small svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.tg-prog { color: var(--ink-2); min-width: 0; }
.tg-prog svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.tg-table { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.tg-row { display: grid; grid-template-columns: 28px minmax(170px, 1.3fr) 64px minmax(150px, 1fr) minmax(150px, 1fr) 120px 32px; gap: var(--sp-2); align-items: start; padding: var(--sp-2) var(--sp-3); border-top: 1px solid var(--line); scroll-margin-top: calc(var(--top-h) + 80px); }
.tg.oneway .tg-row { grid-template-columns: 28px minmax(170px, 1.3fr) 64px minmax(150px, 1fr) 120px 32px; }
.tg-row:first-child { border-top: 0; }
.tg-head { background: var(--well); font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--ink-3); align-items: center; }
.tg-row.local { background: var(--well); }
.tg-row.noap .tg-code { border-color: var(--warn); }
.tg-row.flash { box-shadow: inset 0 0 0 2px var(--accent); }
.tg-tick { padding-top: 6px; }
.tg.nolive .tg-tick { visibility: hidden; } /* ticks choose what to search: nothing to search without the SerpApi key */
.tg-place { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tg-place .input { width: 100%; }
.tg-ap { display: flex; align-items: center; flex-wrap: wrap; gap: 4px var(--sp-1); }
.tg-ap .tg-code { width: 64px; flex: none; text-transform: uppercase; }
.tg-apname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.tg-flag { font-size: var(--fs-xs); color: var(--ink-3); display: inline-flex; align-items: center; gap: 3px; }
.tg-flag.warn { color: var(--warn); font-weight: var(--fw-semibold); }
.tg-flag svg { width: 12px; height: 12px; }
.tg-alt { font-size: var(--fs-xs); padding: 1px var(--sp-2); }
.tg-pax .input { width: 100%; }
.tg-way { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tg-wl { display: none; }
.tg-fl { text-align: left; font-size: var(--fs-sm); line-height: var(--lh-snug); }
.tg-way small { font-size: var(--fs-xs); }
.tg-fare { width: 100%; }
.tg-r { text-align: right; }
.tg-total { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-variant-numeric: tabular-nums; padding-top: 6px; }
.tg-total small { font-size: var(--fs-xs); color: var(--ink-3); }
.tg-menu { padding-top: 2px; }
.tg-none { padding: var(--sp-3); margin: 0; }
.tg-addone { justify-self: start; margin: var(--sp-1) var(--sp-2); }
.tg-foot { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin-top: var(--sp-3); }
.tg-sum { font-size: var(--fs-sm); color: var(--ink-2); flex: 1 1 260px; }
.tg-grand { font-variant-numeric: tabular-nums; }
.tg-grand b { font-size: var(--fs-lg); }
.tg-tag { font-family: var(--font-body); font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--ink-2); background: var(--well); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 1px var(--sp-2); }
.trip-item .tg-tag { background: var(--surface); }
.tg-fold { display: flex; align-items: flex-start; gap: var(--sp-2); width: 100%; text-align: left; padding: var(--sp-2) var(--sp-3); border: 1px dashed var(--line-2); border-radius: var(--r-md); background: transparent; color: var(--ink-2); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.tg-fold:hover { border-color: var(--accent); color: var(--ink); }
.tg-fold svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.tg-prev { display: flex; flex-direction: column; gap: var(--sp-2); }
.tg-prev table { max-height: 260px; }
.tg-prev .tbl { display: block; max-height: 260px; overflow-y: auto; }
.tg-notes { margin: 0; padding-left: var(--sp-4); display: grid; gap: 2px; }
.tg-dlg .tg-set { margin: 0; }

@media (max-width: 900px) {
  .tg-head { display: none; }
  .tg-row, .tg.oneway .tg-row { grid-template-columns: 24px minmax(0, 1fr) 72px 32px; grid-template-areas: "tick place pax menu" ". out out out" ". back back back" ". total total total"; }
  .tg.oneway .tg-row { grid-template-areas: "tick place pax menu" ". out out out" ". total total total"; }
  .tg-tick { grid-area: tick; }
  .tg-place { grid-area: place; }
  .tg-pax { grid-area: pax; }
  .tg-menu { grid-area: menu; }
  .tg-way[data-gway="out"] { grid-area: out; }
  .tg-way[data-gway="back"] { grid-area: back; }
  .tg-total { grid-area: total; flex-direction: row; justify-content: flex-end; align-items: baseline; gap: var(--sp-2); padding-top: 0; }
  .tg-wl { display: block; font-weight: var(--fw-bold); }
  .tg-row.local .tg-way, .tg-row.local .tg-total { display: none; }
}
/* ------------------------------------------------------------------ Mind maps (2026-11-24, views/map-ui.js)
   The team's points and the project's live branches on one canvas. A branch's tone is --mm-c (set by .t1 … .t8). */
.mm { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.mm-bar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); }
.mm-name { font: inherit; font-family: var(--font-display); font-size: var(--fs-xl); font-weight: var(--fw-bold); color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: var(--r-xs); padding: 2px var(--sp-2); margin: 0 0 0 calc(var(--sp-2) * -1); min-width: 0; width: min(100%, 420px); }
.mm-name:hover:not(.ro) { border-color: var(--line-2); }
.mm-name:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.mm-bar .btn[aria-pressed="true"] { background: var(--accent-bg); border-color: var(--line-accent); color: var(--accent-ink); }
.mm-view { position: relative; overflow: hidden; height: clamp(420px, calc(100dvh - 270px), 1600px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.mm-page .mm-view { height: clamp(420px, calc(100dvh - 190px), 1600px); }
.mm-view:focus-visible { outline: none; box-shadow: var(--ring); }
.mm-view.panning { cursor: grabbing; }
.mm-stage { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; }
.mm-links { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.mm-links path { fill: none; stroke: var(--mm-c); stroke-width: 1.75; opacity: 0.5; stroke-linecap: round; }
.mm-links path.main { stroke-width: 3; opacity: 0.7; }
.t0 { --mm-c: var(--accent); } .t1 { --mm-c: var(--mm-1); } .t2 { --mm-c: var(--mm-2); } .t3 { --mm-c: var(--mm-3); } .t4 { --mm-c: var(--mm-4); }
.t5 { --mm-c: var(--mm-5); } .t6 { --mm-c: var(--mm-6); } .t7 { --mm-c: var(--mm-7); } .t8 { --mm-c: var(--mm-8); }
.mm-n { position: absolute; left: 0; top: 0; display: flex; align-items: flex-start; gap: var(--sp-2); width: max-content; max-width: 250px; padding: 6px var(--sp-3); border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: var(--fs-md); line-height: var(--lh-snug); cursor: pointer; will-change: transform; }
.mm-n.in { animation: mm-in var(--t-med) var(--ease-out); }
@keyframes mm-in { from { opacity: 0; } }
.mm-n:hover { border-color: var(--mm-c); }
.mm-n.sel { border-color: var(--mm-c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--mm-c) 35%, transparent); }
.mm-n.drop { box-shadow: 0 0 0 3px var(--mm-c); }
.mm-n.dragging { opacity: 0.75; pointer-events: none; z-index: 5; box-shadow: var(--shadow-md); }
.mm-n.editing { cursor: text; border-color: var(--accent); }
.mm-body { min-width: 0; }
.mm-text { overflow-wrap: anywhere; min-width: 1ch; outline: none; }
.mm-n.editing .mm-text { user-select: text; -webkit-user-select: text; min-width: 60px; }
.mm-ph { color: var(--ink-4); }
.mm-n.done .mm-text { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-2); }
.mm-n.past { opacity: 0.6; }
/* a branch off the centre, a live branch and a section: tinted with the branch's tone */
.mm-n.k-live, .mm-n.k-section, .mm-n.k-meeting, .mm-n.k-group { background: color-mix(in srgb, var(--mm-c) 10%, var(--surface)); border-color: color-mix(in srgb, var(--mm-c) 28%, transparent); font-weight: var(--fw-semibold); }
.mm-n.k-live .mm-text, .mm-n.k-section .mm-text, .mm-n.k-group .mm-text { color: var(--mm-c); }
.mm-n.k-note.own { border-left: 3px solid var(--mm-c); }
.mm-n.k-note.own.left { border-left: 1px solid var(--line-2); border-right: 3px solid var(--mm-c); }
.mm-n.k-said { border-style: dashed; }
.mm-n.k-root { max-width: 300px; padding: var(--sp-3) var(--sp-5); border-radius: var(--r-lg); border-color: transparent; background: var(--cta-1); color: var(--on-accent); font-family: var(--font-display); font-size: var(--fs-lg); font-weight: var(--fw-bold); align-items: center; }
.mm-n.k-root.sel { box-shadow: 0 0 0 3px var(--line-accent); }
.mm-rootsub { font-size: var(--fs-xs); font-weight: var(--fw-medium); opacity: 0.85; }
.mm-n.k-root .mm-chip { background: transparent; color: inherit; padding: 0; }
.mm-n.k-root .mm-ring { color: var(--on-accent); width: 26px; height: 26px; }
.mm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); margin-top: 3px; font-weight: var(--fw-medium); }
.mm-chip { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-2xs); color: var(--ink-3); background: var(--surface-sunken); border-radius: var(--r-pill); padding: 1px 7px; white-space: nowrap; }
.mm-chip svg { width: 11px; height: 11px; }
.mm-chip.strong { color: var(--mm-c); font-weight: var(--fw-bold); background: transparent; padding-left: 0; }
.mm-chip.late { background: var(--danger-bg); color: var(--danger); }
.mm-chip.warn { background: var(--warn-bg); color: var(--warn); }
.mm-chip.doing, .mm-chip.now { background: var(--accent-bg); color: var(--accent-ink); }
.mm-sub { font-size: var(--fs-2xs); color: var(--ink-3); font-weight: var(--fw-medium); }
.mm-who .av { width: 18px; height: 18px; font-size: var(--fs-3xs); }
.mm-check { flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: var(--r-pill); border: 1.75px solid var(--mm-c); background: transparent; color: var(--surface); display: grid; place-items: center; padding: 0; cursor: pointer; }
.mm-check svg { width: 12px; height: 12px; stroke-width: 3; }
.mm-check[aria-pressed="true"] { background: var(--mm-c); }
.mm-check:hover:not(:disabled) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--mm-c) 22%, transparent); }
.mm-check:disabled { cursor: default; opacity: 0.6; }
.mm-check:focus-visible, .mm-fold:focus-visible { outline: none; box-shadow: var(--ring); }
.mm-ring { flex: none; width: 20px; height: 20px; color: var(--mm-c); margin-top: 0; }
.mm-ring circle { fill: none; stroke: currentColor; stroke-width: 3; opacity: 0.22; }
.mm-ring circle.v { opacity: 1; stroke-linecap: round; }
.mm-ic { flex: none; display: grid; place-items: center; width: 18px; height: 18px; color: var(--mm-c); margin-top: 1px; }
.mm-ic svg { width: 15px; height: 15px; }
.mm-note { flex: none; color: var(--ink-4); display: grid; place-items: center; margin-top: 2px; }
.mm-note svg { width: 13px; height: 13px; }
.mm-note:hover { color: var(--accent); }
.mm-fold { position: absolute; left: calc(100% + 5px); top: 50%; translate: 0 -50%; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--r-pill); border: 1px solid color-mix(in srgb, var(--mm-c) 45%, transparent); background: var(--surface); color: var(--mm-c); font: inherit; font-size: var(--fs-2xs); font-weight: var(--fw-bold); display: grid; place-items: center; cursor: pointer; }
.mm-fold svg { width: 11px; height: 11px; }
.mm-n.left .mm-fold { left: auto; right: calc(100% + 5px); }
.mm-n.left .mm-fold svg { rotate: 180deg; }
.mm-fold[aria-expanded="true"] { opacity: 0; }
.mm-n:hover .mm-fold, .mm-n.sel .mm-fold, .mm-fold:focus-visible { opacity: 1; }
.mm-tools { position: absolute; display: flex; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-pill); box-shadow: var(--shadow-md); z-index: 3; cursor: default; white-space: nowrap; }
.mm-tools[hidden] { display: none; }
.mm-tools .btn { border-color: transparent; background: transparent; }
.mm-tools .btn:hover { background: var(--surface-hover); }
.mm-zoom { position: absolute; right: var(--sp-3); bottom: var(--sp-3); display: flex; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-pill); cursor: default; z-index: 2; }
.mm-zoom .btn { border-color: transparent; min-width: 26px; justify-content: center; }
.mm-hint { position: absolute; left: var(--sp-3); bottom: var(--sp-3); pointer-events: none; background: color-mix(in srgb, var(--surface) 85%, transparent); border-radius: var(--r-xs); padding: 2px var(--sp-2); z-index: 1; }
.mm-colors { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding: var(--sp-2); }
.mm-dot { width: 24px; height: 24px; border-radius: var(--r-pill); border: 2px solid var(--surface); background: var(--mm-c); cursor: pointer; padding: 0; box-shadow: 0 0 0 1px var(--line-2); }
.mm-dot.on { box-shadow: 0 0 0 2px var(--mm-c); }
.mm-pre { white-space: pre-wrap; margin: 0; }
.mm-radios { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.mm-tabbar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.mm-tabbar .chip { max-width: 260px; cursor: pointer; font: inherit; font-size: var(--fs-sm); }
.mm-tabbar .chip svg { width: 14px; height: 14px; flex: none; }
.mm-where { display: flex; gap: var(--sp-4); margin-bottom: var(--sp-2); }
.mm-where a, .mm-where span { display: inline-flex; align-items: center; gap: var(--sp-1); }
.mm-where svg { width: 14px; height: 14px; }
.mm-starts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--sp-3); width: min(100%, 780px); margin: var(--sp-4) auto 0; text-align: left; }
.mm-start { display: flex; flex-direction: column; gap: var(--sp-1); align-items: flex-start; text-align: left; padding: var(--sp-4); border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; }
.mm-start:hover { border-color: var(--accent); }
.mm-start.first { border-color: var(--line-accent); background: var(--accent-bg); }
.mm-start:focus-visible { outline: none; box-shadow: var(--ring); }
.mm-start-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-pill); background: var(--surface); color: var(--accent); margin-bottom: var(--sp-1); }
.mm-start-ic svg { width: 18px; height: 18px; }
.mm-group { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--ink-3); margin: var(--sp-5) 0 var(--sp-2); }
.mm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-3); }
.mm-card { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-4); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); color: inherit; text-decoration: none; min-width: 0; }
.mm-card:hover { border-color: var(--line-hover); }
.mm-card-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-pill); background: var(--accent-bg); color: var(--accent); }
.mm-card-ic svg { width: 18px; height: 18px; }
.mm-card-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mm-card-main svg { width: 13px; height: 13px; flex: none; }
@media (max-width: 720px) {
  .mm-bar .btn span:not([data-hidelbl]) { display: none; }
  .mm-hint { display: none; }
  .mm-view, .mm-page .mm-view { height: clamp(360px, calc(100dvh - 330px), 1200px); }
  .mm-n { max-width: 210px; }
}
@media (prefers-reduced-motion: reduce) { .mm-n.in { animation: none; } }

/* 2026-11-25: Choose photos for the POE deck (views/deck-photos-ui.js), and the "Not in deck" mark on the POE page */
.pp { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.pp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); position: sticky; top: calc(-1 * var(--sp-4)); z-index: 2; background: var(--surface); padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.pp-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.pp-sec { margin: var(--sp-2) 0 0; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ink-3); }
.pp-mo { display: flex; flex-direction: column; gap: var(--sp-2); }
.pp-mo-head { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; font-size: var(--fs-sm); }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--sp-2); }
.pp-ph { position: relative; aspect-ratio: 4 / 3; padding: 0; border: 2px solid var(--accent); border-radius: var(--r-sm); overflow: hidden; background: var(--surface-sunken); cursor: pointer; }
.pp-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-tick { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.pp-tick svg { width: 12px; height: 12px; }
.pp-ph.off { border-color: transparent; }
.pp-ph.off img { opacity: 0.35; filter: grayscale(1); }
.pp-ph.off .pp-tick { background: var(--scrim); }
.pp-ph.off .pp-tick svg { visibility: hidden; }
.pp-ph:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ph-out { position: absolute; left: 4px; top: 4px; display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px 1px 4px; border-radius: var(--r-pill); background: var(--scrim); color: var(--on-accent); font-size: var(--fs-2xs); font-weight: var(--fw-semibold); }
.ph-out svg { width: 11px; height: 11px; }
.poe-ph:has(.ph-out) img { opacity: 0.55; }
/* 2026-11-25: a studio choice with more options than the side panel's width wraps instead of being cut off */
.st-choice .seg { flex-wrap: wrap; max-width: 100%; border-radius: var(--r-md); }
/* 2026-11-25: a table's cells in the deck preview (core/deck.js tableHtml) */
.dk-slide .dk-cell { box-sizing: border-box; padding: 0 0.5cqw; }

/* ---------------------------------------------------------------- The Library's reader (2026-11-25, views/reader-ui.js;
   docs/library-reader.md). Full screen like Apple Books: the page on its own colour (Paper, Sepia, Night), thin bars that
   step aside while reading, one or two pages, a slider at the foot. Motion: a short slide as a page turns, none under
   reduced motion. The page colours are --read-* tokens (the same in the light and dark looks). */
html.rd-open { overflow: hidden; }
.rd { --rd-bg: var(--read-paper); --rd-ink: var(--read-paper-ink); --rd-bar: var(--read-chrome); position: fixed; inset: 0; z-index: var(--z-modal); display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; grid-template-columns: minmax(0, 1fr); background: var(--rd-bg); color: var(--rd-ink); animation: rd-in var(--t-med) var(--ease-out); }
.rd[data-look="sepia"] { --rd-bg: var(--read-sepia); --rd-ink: var(--read-sepia-ink); }
.rd[data-look="night"] { --rd-bg: var(--read-night); --rd-ink: var(--read-night-ink); --rd-bar: var(--read-chrome-night); }
@keyframes rd-in { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }
.rd-top, .rd-foot { position: relative; z-index: 2; background: var(--rd-bar); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: transform var(--t-med) var(--ease-out), opacity var(--t-med) var(--ease-out); }
.rd-top { display: flex; align-items: center; gap: var(--sp-2); padding: calc(var(--sp-2) + env(safe-area-inset-top, 0px)) var(--sp-3) var(--sp-2); border-bottom: 1px solid color-mix(in srgb, var(--rd-ink) 10%, transparent); }
.rd-foot { padding: var(--sp-2) var(--sp-5) calc(var(--sp-3) + env(safe-area-inset-bottom, 0px)); border-top: 1px solid color-mix(in srgb, var(--rd-ink) 10%, transparent); }
.rd.bare .rd-top { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.rd.bare .rd-foot { transform: translateY(100%); opacity: 0; pointer-events: none; }
.rd-title { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; line-height: var(--lh-snug); }
.rd-title b { font-size: var(--fs-sm); max-width: 100%; }
.rd-title span { font-size: var(--fs-2xs); opacity: 0.65; max-width: 100%; }
.rd-btn { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 var(--sp-2); border: 0; border-radius: var(--r-pill); background: transparent; color: var(--rd-ink); font: inherit; font-weight: var(--fw-bold); cursor: pointer; }
.rd-btn svg { width: 19px; height: 19px; }
.rd-btn:hover { background: color-mix(in srgb, var(--rd-ink) 8%, transparent); }
.rd-btn.on { color: var(--accent); }
.rd-btn.on svg { fill: currentColor; }
.rd-stage { position: relative; min-width: 0; overflow: hidden; display: grid; place-items: center; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.rd-book { display: grid; place-items: center; width: 100%; height: 100%; }
.rd-spread { display: flex; justify-content: center; align-items: center; gap: 0; }
.rd-spread.two .rd-page:first-child { box-shadow: inset -18px 0 22px -18px rgba(0, 0, 0, 0.28), 0 6px 28px -10px rgba(0, 0, 0, 0.35); }
.rd-spread.two .rd-page:last-child { box-shadow: inset 18px 0 22px -18px rgba(0, 0, 0, 0.22), 0 6px 28px -10px rgba(0, 0, 0, 0.35); }
.rd-page { display: block; background: var(--read-paper); box-shadow: 0 6px 28px -10px rgba(0, 0, 0, 0.35); border-radius: var(--r-2xs); }
.rd[data-look="sepia"] .rd-page { filter: sepia(0.35) saturate(1.1) brightness(0.98); }
.rd[data-look="night"] .rd-page { filter: invert(0.9) hue-rotate(180deg) brightness(0.95); box-shadow: none; }
.rd-spread.scroll { align-items: flex-start; }
.rd-stage:has(.rd-spread.scroll) { place-items: start center; overflow-y: auto; padding: var(--sp-4) 0; touch-action: pan-y; }
.rd-spread.in-next { animation: rd-next var(--t-med) var(--ease-out); }
.rd-spread.in-prev { animation: rd-prev var(--t-med) var(--ease-out); }
@keyframes rd-next { from { opacity: 0.35; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes rd-prev { from { opacity: 0.35; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.rd-load { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); font-size: var(--fs-sm); opacity: 0.85; text-align: center; }
.rd-load-bar { width: 220px; height: 4px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--rd-ink) 14%, transparent); overflow: hidden; }
.rd-load-bar i { display: block; width: 4%; height: 100%; background: var(--accent); transition: width var(--t-fast) linear; }
.rd-scrub { width: 100%; accent-color: var(--accent); }
.rd-where { display: flex; justify-content: space-between; gap: var(--sp-3); font-size: var(--fs-xs); opacity: 0.75; margin-top: 2px; }
.rd-side { position: absolute; z-index: 3; top: 0; bottom: 0; left: 0; width: min(360px, 88vw); display: flex; flex-direction: column; background: var(--rd-bg); color: var(--rd-ink); border-right: 1px solid color-mix(in srgb, var(--rd-ink) 12%, transparent); box-shadow: var(--shadow-lg); animation: rd-side var(--t-med) var(--ease-out); padding-top: env(safe-area-inset-top, 0px); }
@keyframes rd-side { from { transform: translateX(-100%); } to { transform: none; } }
.rd-side-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-3); }
.rd-side-body { overflow-y: auto; padding: 0 var(--sp-2) var(--sp-4); }
.rd-toc { display: flex; align-items: center; gap: var(--sp-2); width: 100%; padding: 9px var(--sp-3); border: 0; border-radius: var(--r-sm); background: transparent; color: inherit; font: inherit; font-size: var(--fs-sm); text-align: left; cursor: pointer; }
.rd-toc span { flex: 1; min-width: 0; }
.rd-toc i { font-style: normal; font-size: var(--fs-2xs); opacity: 0.6; }
.rd-toc svg { width: 14px; height: 14px; }
.rd-toc.d1 { padding-left: var(--sp-6); font-size: var(--fs-xs); } .rd-toc.d2 { padding-left: var(--sp-8); font-size: var(--fs-xs); opacity: 0.85; }
.rd-toc:hover:not([disabled]) { background: color-mix(in srgb, var(--rd-ink) 7%, transparent); }
.rd-toc.on { background: color-mix(in srgb, var(--accent) 16%, transparent); font-weight: var(--fw-semibold); }
.rd-toc[disabled] { opacity: 0.5; cursor: default; }
.rd-side-empty, .rd-side-load { padding: var(--sp-4); font-size: var(--fs-sm); opacity: 0.75; }
.rd-pop { position: absolute; z-index: 3; top: calc(56px + env(safe-area-inset-top, 0px)); right: var(--sp-3); width: 280px; padding: var(--sp-3); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: var(--sp-2); font-size: var(--fs-sm); }
.rd-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.rd-theme { height: 44px; border-radius: var(--r-md); border: 2px solid transparent; font: inherit; font-weight: var(--fw-semibold); cursor: pointer; }
.rd-theme.t-paper { background: var(--read-paper); color: var(--read-paper-ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.rd-theme.t-sepia { background: var(--read-sepia); color: var(--read-sepia-ink); }
.rd-theme.t-night { background: var(--read-night); color: var(--read-night-ink); }
.rd-theme.on { border-color: var(--accent); }
.rd-layouts { display: flex; flex-direction: column; gap: 4px; }
.rd-layouts button { text-align: left; padding: 8px var(--sp-3); border-radius: var(--r-sm); border: 1px solid var(--line-2); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.rd-layouts button.on { border-color: var(--accent); background: var(--accent-bg); }
.rd-end { position: absolute; inset: auto 0 var(--sp-5) 0; z-index: 2; display: flex; justify-content: center; padding: 0 var(--sp-4); animation: rd-in var(--t-med) var(--ease-out); }
.rd-end-card { max-width: 460px; display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-4); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.rd-end-card > svg { width: 24px; height: 24px; color: var(--ok); }
.rd-end-card p { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); }
.rd-end-row { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
@media (max-width: 640px) { .rd-foot { padding-left: var(--sp-3); padding-right: var(--sp-3); } .rd-where span:last-child { display: none; } }
@media (prefers-reduced-motion: reduce) { .rd, .rd-side, .rd-end, .rd-spread.in-next, .rd-spread.in-prev { animation: none; } .rd-top, .rd-foot { transition: none; } }
/* 2026-11-26: zoom and Text only. A zoomed page scrolls both ways (and drags with a mouse); Text only is one column of
   the PDF's own words in the reader's type, sized by A− / A+. */
.rd-stage.zoomed { place-items: start; overflow: auto; touch-action: pan-x pan-y; cursor: grab; overscroll-behavior: contain; }
.rd-stage.zoomed.dragging { cursor: grabbing; }
.rd-stage.zoomed .rd-book { width: max-content; height: max-content; min-width: 100%; min-height: 100%; padding: var(--sp-3); box-sizing: border-box; }
.rd-stage:has(.rd-spread.scroll).zoomed { place-items: start; }
.rd-zoompill { flex: none; height: 30px; padding: 0 var(--sp-3); border: 0; border-radius: var(--r-pill); background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--rd-ink); font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-semibold); cursor: pointer; white-space: nowrap; }
.rd-stage.texty { display: block; overflow-y: auto; overflow-anchor: none; touch-action: pan-y; user-select: text; -webkit-user-select: text; overscroll-behavior: contain; }
.rd-stage.texty .rd-book { display: block; height: auto; }
.rd-text { max-width: 36em; margin: 0 auto; padding: var(--sp-6) var(--sp-5) var(--sp-8); font-family: var(--read-serif); line-height: var(--read-lh); color: var(--rd-ink); overflow-wrap: break-word; hyphens: auto; }
.rd-text[data-font="sans"] { font-family: var(--font-body); line-height: var(--lh-base); }
.rd-text p { margin: 0 0 0.85em; }
.rd-text h3 { margin: 1.3em 0 0.5em; color: inherit; font-family: inherit; letter-spacing: normal; font-size: 1.25em; line-height: var(--lh-snug); font-weight: var(--fw-bold); }
.rd-tp { position: relative; padding-top: var(--sp-2); }
.rd-tp + .rd-tp { margin-top: 1.4em; border-top: 1px solid color-mix(in srgb, var(--rd-ink) 10%, transparent); }
.rd-tp-no { margin-bottom: 0.6em; font-family: var(--font-body); font-size: var(--fs-2xs); letter-spacing: var(--ls-caps); text-transform: uppercase; opacity: 0.5; }
.rd-tp-pic { display: block; max-width: 100%; height: auto !important; margin: 0 auto 1em; }
.rd-tv-earlier { display: flex; margin: 0 auto var(--sp-4); }
.rd-tv-earlier[hidden], .rd-tv-more[hidden], .rd-tv-note[hidden] { display: none; }
.rd-tv-more { padding: var(--sp-5); text-align: center; opacity: 0.5; font-family: var(--font-body); }
.rd-tv-note { font-family: var(--font-body); font-size: var(--fs-sm); padding: var(--sp-3); border-radius: var(--r-md); background: color-mix(in srgb, var(--rd-ink) 7%, transparent); }
.rd-size { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: 2px; border-radius: var(--r-pill); background: var(--surface-sunken); }
.rd-size span { font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }
.rd-size-btn { width: 64px; height: 40px; border: 0; border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font-family: var(--read-serif); font-weight: var(--fw-bold); cursor: pointer; box-shadow: var(--shadow-sm); }
.rd-size-btn.sm { font-size: var(--fs-base); } .rd-size-btn.lg { font-size: var(--fs-2xl); }
.rd-pop-note { margin: 0; font-size: var(--fs-xs); color: var(--ink-3); }
.rd-fonts { align-self: flex-start; }
.rd-pop { max-height: calc(100% - 72px - env(safe-area-inset-top, 0px)); overflow-y: auto; }
@media (max-width: 640px) {
  .rd-text { padding: var(--sp-4) var(--sp-4) var(--sp-8); }
  .rd-pop { left: var(--sp-3); right: var(--sp-3); width: auto; }
  .rd-top { gap: 2px; padding-left: var(--sp-2); padding-right: var(--sp-2); }
  .rd-zoompill { padding: 0 var(--sp-2); }
}


/* A cover made from the book's own first page (2026-11-25): the picture fills the cover, the spine stays on top. */
.lc.has-img { background: var(--well); }
.lc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.lc.has-img .lc-face > :not(.lc-state):not(.lc-bar):not(.lc-pending) { display: none; }
.lc.has-img::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 6px 0 0 rgba(0, 0, 0, 0.22), inset 7px 0 0 rgba(255, 255, 255, 0.18); border-radius: inherit; }
.lc.book.has-img::before { display: none; }

/* 2026-11-26: a Library material's cover (views/learn.js coverDialog): the PDF's first page, another page, Kelar's
   drawn cover or a picture, each with a thumbnail. */
.lcv { display: flex; flex-direction: column; gap: var(--sp-2); }
.lcv-opt { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-3); border: 1px solid var(--line-2); border-radius: var(--r-md); }
.lcv-opt.on { border-color: var(--accent); background: var(--accent-bg); }
.lcv-thumb { flex: none; width: 72px; display: grid; place-items: center; }
.lcv-thumb img { display: block; width: 72px; height: 100px; object-fit: cover; border-radius: var(--r-2xs); box-shadow: var(--shadow-sm); background: var(--surface-muted); }
.lcv-thumb .lc { pointer-events: none; }
.lcv-ph { width: 72px; height: 100px; display: grid; place-items: center; border-radius: var(--r-2xs); background: var(--surface-muted); color: var(--ink-3); }
.lcv-ph svg { width: 22px; height: 22px; }
.lcv-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-1); }
.lcv-txt .btn { margin-top: 2px; }
.lcv-pg { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-sm); }
.lcv-pg input { width: 64px; }

/* 2026-11-27: reading on a phone made calmer (views/reader-ui.js): a hair-thin progress line, a quiet message pill over
   the page instead of toasts, the day's goal as a ring at the foot, pages that slide with the finger, contents lines. */
.rd-line { position: absolute; z-index: 3; left: 0; right: 0; top: 0; height: 2px; pointer-events: none; }
.rd-line i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform var(--t-med) var(--ease-out); opacity: 0.85; }
.rd-hint { position: absolute; z-index: 4; left: 50%; bottom: calc(var(--sp-4) + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); max-width: min(92%, 420px); display: flex; align-items: center; gap: var(--sp-2); padding: 9px var(--sp-4); border-radius: var(--r-pill); background: color-mix(in srgb, var(--rd-ink) 88%, transparent); color: var(--rd-bg); font-family: var(--font-body); font-size: var(--fs-sm); line-height: var(--lh-snug); box-shadow: var(--shadow-lg); pointer-events: none; animation: rd-hint-in var(--t-med) var(--ease-out); }
.rd-hint svg { width: 16px; height: 16px; flex: none; }
.rd-hint.out { opacity: 0; transform: translate(-50%, 6px); transition: opacity 0.25s ease, transform 0.25s ease; }
.rd-hint.goal { background: var(--ok); color: var(--on-accent); animation: rd-hint-pop 0.5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes rd-hint-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes rd-hint-pop { 0% { opacity: 0; transform: translate(-50%, 10px) scale(0.9); } 100% { opacity: 1; transform: translate(-50%, 0) scale(1); } }
.rd-where-l { display: inline-flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.rd-goal { display: inline-flex; align-items: center; gap: 5px; font-weight: var(--fw-semibold); white-space: nowrap; }
.rd-goal svg { width: 16px; height: 16px; transform: rotate(-90deg); }
.rd-goal circle { fill: none; stroke: color-mix(in srgb, var(--rd-ink) 16%, transparent); stroke-width: 3; }
.rd-goal circle.fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray 0.6s var(--ease-out); }
.rd-goal.done circle.fg { stroke: var(--ok); }
.rd-goal b { font-weight: inherit; }
.rd-load-cover { width: 132px; max-height: 190px; object-fit: cover; border-radius: var(--r-2xs); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.45); animation: rd-cover-breathe 1.6s ease-in-out infinite alternate; }
@keyframes rd-cover-breathe { from { transform: scale(0.985); } to { transform: scale(1.015); } }
.rd-load { transition: opacity 0.25s ease; }
.rd-load.out { opacity: 0; }
.rd-load.out, .rd-stage:has(.rd-book > *) .rd-load { position: absolute; inset: 0; justify-content: center; pointer-events: none; }
.rd-book { position: relative; }
.rd-book.sliding { overflow: hidden; }
.rd-pane { position: absolute; inset: 0; display: grid; place-items: center; will-change: transform; }
.rd-tline { display: flex; align-items: baseline; gap: var(--sp-2); margin: 0 0 0.35em; }
.rd-tline span { flex: 1; min-width: 0; }
.rd-tline i { font-style: normal; font-variant-numeric: tabular-nums; opacity: 0.55; font-size: 0.85em; }
.rd-tp-pic.cover { max-width: min(100%, 300px); margin: var(--sp-2) auto var(--sp-5); border-radius: var(--r-2xs); box-shadow: 0 12px 34px -14px rgba(0, 0, 0, 0.45); }
.rd-goals { align-self: flex-start; }
.rd-tv-earlier { opacity: 0.6; }
@media (max-width: 640px) { .rd-where { font-size: var(--fs-2xs); } .rd-hint { bottom: calc(var(--sp-3) + env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: reduce) { .rd-line i, .rd-goal circle.fg { transition: none; } .rd-hint, .rd-hint.goal, .rd-load-cover { animation: none; } }

/* 2026-11-28: books that flow (EPUB, Word, Markdown, text; core/book-formats.js). "Pages" lays a chapter out in CSS
   columns one screen wide (two on a wide screen) and slides them; "Scroll" is the book in one column. Kelar's reading
   type throughout: a publisher's own styles never come in. */
.rd-flowtext { font-family: var(--read-serif); line-height: var(--read-lh); color: var(--rd-ink); overflow-wrap: break-word; hyphens: auto; }
.rd-flowtext[data-font="sans"] { font-family: var(--font-body); line-height: var(--lh-base); }
.rd-flowtext p { margin: 0 0 0.8em; orphans: 2; widows: 2; }
.rd-flowtext h1, .rd-flowtext h2, .rd-flowtext h3, .rd-flowtext h4, .rd-flowtext h5, .rd-flowtext h6 { color: inherit; font-family: inherit; letter-spacing: normal; line-height: var(--lh-snug); margin: 1.1em 0 0.55em; break-after: avoid; }
.rd-flowtext h1 { font-size: 1.6em; } .rd-flowtext h2 { font-size: 1.35em; } .rd-flowtext h3 { font-size: 1.15em; } .rd-flowtext h4, .rd-flowtext h5, .rd-flowtext h6 { font-size: 1em; }
.rd-flowtext img { display: block; max-width: 100%; height: auto; margin: 1em auto; break-inside: avoid; }
.rd-flowtext blockquote { margin: 0 0 0.9em; padding-left: 1em; border-left: 3px solid color-mix(in srgb, var(--rd-ink) 22%, transparent); opacity: 0.9; }
.rd-flowtext ul, .rd-flowtext ol { margin: 0 0 0.9em; padding-left: 1.4em; }
.rd-flowtext li { margin-bottom: 0.3em; }
.rd-flowtext pre { white-space: pre-wrap; font-size: 0.85em; padding: 0.7em; border-radius: var(--r-sm); background: color-mix(in srgb, var(--rd-ink) 6%, transparent); break-inside: avoid; }
.rd-flowtext code { font-family: var(--font-mono); font-size: 0.88em; }
.rd-flowtext table { border-collapse: collapse; margin: 0 0 1em; font-size: 0.88em; break-inside: avoid; }
.rd-flowtext td, .rd-flowtext th { border: 1px solid color-mix(in srgb, var(--rd-ink) 18%, transparent); padding: 0.35em 0.55em; vertical-align: top; }
.rd-flowtext a { color: var(--accent); }
.rd-flowtext hr { border: 0; border-top: 1px solid color-mix(in srgb, var(--rd-ink) 18%, transparent); margin: 1.4em 0; }
.rd[data-look="night"] .rd-flowtext img { filter: brightness(0.9); }
.rd-colwrap { width: 100%; height: 100%; overflow: hidden; padding: var(--sp-6) var(--sp-8) var(--sp-5); box-sizing: border-box; }
.rd-colbody { height: 100%; column-fill: auto; will-change: transform; user-select: text; -webkit-user-select: text; } /* words can be selected: the device's Look Up, Translate, Copy (2026-11-28) */
.rd-colbody img { max-height: 62vh; object-fit: contain; }
.rd-colwrap.in-next { animation: rd-next var(--t-med) var(--ease-out); }
.rd-colwrap.in-prev { animation: rd-prev var(--t-med) var(--ease-out); }
.rd-ch + .rd-ch { margin-top: 2.2em; padding-top: 1.2em; border-top: 1px solid color-mix(in srgb, var(--rd-ink) 10%, transparent); }
.rd-ch + .rd-ch.cont { margin-top: 0; padding-top: 0; border-top: 0; }
@media (max-width: 640px) { .rd-colwrap { padding: var(--sp-4) var(--sp-5) var(--sp-3); } }
@media (prefers-reduced-motion: reduce) { .rd-colwrap.in-next, .rd-colwrap.in-prev { animation: none; } }

/* 2026-11-28: the reader for people new to e-books (views/reader-ui.js; docs/library-reader.md › The reader for
   everyone). Type in clear steps with three typefaces, spacing, margins and alignment; Page turn and Fade besides Slide
   (transform and opacity only, so the compositor draws them); a first-time hint; time left and chapter ticks at the
   foot; Back after a jump; Night's dimmer and warmer light; read aloud; the Aa sheet in three tabs, rising from the
   foot on a phone. Calm like the rest: flat surfaces, one accent, no glows. */
.rd { --rd-gutter: clamp(18px, 5vw, 56px); --rd-measure: 36em; }
.rd[data-margins="narrow"] { --rd-gutter: clamp(12px, 3vw, 28px); --rd-measure: 44em; }
.rd[data-margins="wide"] { --rd-gutter: clamp(28px, 9vw, 120px); --rd-measure: 30em; }
.rd-text { max-width: var(--rd-measure); padding-left: var(--rd-gutter); padding-right: var(--rd-gutter); }
.rd-colwrap { position: relative; padding-left: var(--rd-gutter); padding-right: var(--rd-gutter); }
.rd-text, .rd-flowtext, .rd-text[data-font="sans"], .rd-flowtext[data-font="sans"] { line-height: var(--rd-lh, var(--read-lh)); }
.rd-text[data-font="serif"], .rd-flowtext[data-font="serif"] { font-family: "Literata", var(--read-serif); }
.rd-text[data-font="sans"], .rd-flowtext[data-font="sans"] { font-family: var(--read-sans); }
.rd-text[data-font="easy"], .rd-flowtext[data-font="easy"] { font-family: "Atkinson Hyperlegible", var(--read-sans); letter-spacing: var(--read-easy-ls); word-spacing: var(--read-easy-ws); }
.rd-text[data-align="justify"] :is(p, li), .rd-flowtext[data-align="justify"] :is(p, li) { text-align: justify; }
.rd-text[data-align="justify"] .rd-tline { text-align: left; }
/* Night: the letters dimmer (the page shows through), a warmer light, and a PDF page darkened and warmed to match */
.rd[data-look="night"] :is(.rd-text, .rd-flowtext) { opacity: var(--rd-dimk, 1); }
.rd.warm[data-look="night"] { --rd-bg: var(--read-warm); --rd-ink: var(--read-warm-ink); }
.rd[data-look="night"] .rd-page { filter: invert(0.9) hue-rotate(180deg) brightness(var(--rd-bright, 0.95)) sepia(var(--rd-sepia, 0)); }
/* At night the reader's own sheet, hint and cards go dark with the page (the app's dark values, as --read-n-* tokens) */
.rd[data-look="night"] { --surface: var(--read-n-surface); --surface-sunken: var(--read-n-sunken); --surface-muted: var(--read-n-muted); --well: var(--read-n-muted); --ink: var(--read-n-ink); --ink-2: var(--read-n-ink2); --ink-3: var(--read-n-ink3); --line: var(--read-n-line); --line-2: var(--read-n-line2); --seg-track: var(--read-n-seg); --accent-bg: var(--read-n-accentbg); --glass-card-line: var(--read-n-line); --glass-btn: var(--read-n-surface); --glass-btn-hover: var(--read-n-muted); }
/* turning: Fade, and Page turn (a page on its left edge, the shade darkening it as it lifts) */
.rd-spread { position: relative; }
.rd-shade { position: absolute; inset: 0; z-index: 1; background: var(--read-shade); opacity: 0; pointer-events: none; border-radius: inherit; }
.rd-book.how-turn, .rd-book:has(> .rd-ghost) { perspective: 2400px; }
.rd-book.how-turn .rd-pane, .rd-ghost { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.rd-ghost { position: absolute; inset: 0; z-index: 2; background: var(--rd-bg); transform-origin: 0 50%; will-change: transform, opacity; box-shadow: 0 0 28px rgba(0, 0, 0, 0.16); }
.rd-spread.in-fade, .rd-colwrap.in-fade { animation: rd-fade var(--t-med) var(--ease-out); }
@keyframes rd-fade { from { opacity: 0; } to { opacity: 1; } }
/* the first time: three zones and one line on turning pages */
.rd-coach { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: var(--sp-4); background: color-mix(in srgb, var(--rd-bg) 84%, transparent); color: var(--rd-ink); font-family: var(--font-body); cursor: pointer; animation: rd-fade var(--t-med) var(--ease-out); }
.rd-coach-zones { position: absolute; inset: 0; display: grid; grid-template-columns: var(--edge, 30%) 1fr var(--edge, 30%); pointer-events: none; }
.rd-coach-zones:has(> span:only-child) { grid-template-columns: 1fr; }
.rd-coach-zones > span { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; padding: 0 var(--sp-1) 12vh; text-align: center; border-right: 1px dashed color-mix(in srgb, var(--rd-ink) 30%, transparent); }
.rd-coach-zones > span:last-child { border-right: 0; }
.rd-coach-zones b { font-size: var(--fs-sm); }
.rd-coach-zones i { font-size: var(--fs-2xs); font-style: normal; opacity: 0.7; }
.rd-coach-zones svg { width: 26px; height: 26px; opacity: 0.6; }
.rd-coach-card { position: relative; max-width: min(360px, 100%); display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-2); padding: var(--sp-4); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); cursor: default; }
.rd-coach-card p { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); line-height: var(--lh-snug); }
.rd-coach-card .rd-coach-note { font-size: var(--fs-xs); color: var(--ink-3); }
.rd-coach-card .btn { margin-top: var(--sp-1); }
/* Back after a jump */
.rd-back { position: absolute; z-index: 3; left: 50%; bottom: calc(var(--sp-3) + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; padding: 7px var(--sp-4); border: 0; border-radius: var(--r-pill); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-md); font: inherit; font-family: var(--font-body); font-size: var(--fs-sm); cursor: pointer; white-space: nowrap; animation: rd-hint-in var(--t-med) var(--ease-out); }
.rd-back[hidden] { display: none; }
.rd-back svg { width: 15px; height: 15px; }
.rd-stage:has(.rd-back:not([hidden])) .rd-hint { bottom: calc(var(--sp-4) + 46px + env(safe-area-inset-bottom, 0px)); }
/* the foot: chapter ticks under the slider, the time left a tap away from the book's */
.rd-scrubwrap { position: relative; }
.rd-ticks { position: absolute; left: 9px; right: 9px; top: 50%; height: 8px; margin-top: -4px; pointer-events: none; }
.rd-ticks i { position: absolute; top: 0; width: 2px; height: 8px; margin-left: -1px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--rd-ink) 28%, transparent); }
.rd-where { align-items: center; }
.rd-where-l { min-width: 0; }
.rd-where-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-left { flex: none; padding: 2px 6px; border: 0; border-radius: var(--r-sm); background: transparent; color: inherit; font: inherit; white-space: nowrap; cursor: pointer; }
.rd-left:hover { background: color-mix(in srgb, var(--rd-ink) 8%, transparent); }
/* a mouse at an edge that turns the page: a faint arrow there */
.rd-edge { position: absolute; z-index: 2; top: 50%; display: grid; place-items: center; width: 40px; height: 64px; margin-top: -32px; border-radius: var(--r-md); color: var(--rd-ink); opacity: 0; pointer-events: none; transition: opacity var(--t-fast) var(--ease-out); }
.rd-edge.prev { left: var(--sp-2); } .rd-edge.next { right: var(--sp-2); }
.rd-edge svg { width: 26px; height: 26px; }
.rd[data-edge="prev"] .rd-edge.prev, .rd[data-edge="next"] .rd-edge.next { opacity: 0.45; }
.rd[data-edge="prev"] .rd-stage, .rd[data-edge="next"] .rd-stage { cursor: pointer; }
.rd-offline { display: grid; place-items: center; width: 30px; height: 30px; color: var(--warn); }
.rd-offline[hidden] { display: none; }
.rd-offline svg { width: 17px; height: 17px; }
/* Aa: three tabs (Text, Page, More); every control fills the sheet's width */
.rd-pop { width: 320px; gap: var(--sp-2); }
.rd-tabs { display: grid; grid-template-columns: repeat(3, 1fr); align-self: stretch; margin-bottom: var(--sp-1); }
.rd-tabs button { justify-content: center; }
.rd-sheet { display: flex; flex-direction: column; gap: var(--sp-2); }
.rd-sheet[hidden] { display: none; }
.rd-sheet > b { margin-top: var(--sp-1); font-size: var(--fs-xs); color: var(--ink-2); }
.rd-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-self: stretch; }
.rd-seg button { justify-content: center; padding: 0 var(--sp-1); font-size: var(--fs-xs); white-space: nowrap; }
.rd-goals { align-self: stretch; }
.rd-steps { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; }
.rd-steps i { width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--line-2); transition: background var(--t-fast) var(--ease-out); }
.rd-steps i.on { background: var(--accent); }
.rd-sizeval { min-width: 44px; text-align: center; font-size: var(--fs-xs); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; color: var(--ink-2); }
.rd-fonts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.rd-font { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: var(--sp-2) var(--sp-1); border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-xs); cursor: pointer; }
.rd-font span { font-size: var(--fs-xl); line-height: var(--lh-tight); }
.rd-font.f-serif span { font-family: "Literata", var(--read-serif); }
.rd-font.f-sans span { font-family: var(--read-sans); }
.rd-font.f-easy span { font-family: "Atkinson Hyperlegible", var(--read-sans); }
.rd-font.on { border-color: var(--accent); background: var(--accent-bg); }
.rd-autos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.rd-autos button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px var(--sp-2); border: 1px solid var(--line-2); border-radius: var(--r-pill); background: transparent; color: inherit; font: inherit; font-size: var(--fs-xs); cursor: pointer; }
.rd-autos button.on { border-color: var(--accent); background: var(--accent-bg); }
.rd-autos svg { width: 14px; height: 14px; }
.rd-night { display: flex; flex-direction: column; gap: var(--sp-2); }
.rd-check { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-xs); color: var(--ink-2); cursor: pointer; }
.rd-keep { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-2); font-size: var(--fs-xs); color: var(--ink-2); }
.rd-keep > span { display: flex; align-items: flex-start; gap: 6px; }
.rd-keep svg { width: 15px; height: 15px; flex: none; }
/* read aloud: a bar over the foot, and the paragraph being read marked */
.rd-say { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: var(--sp-1); padding: 6px var(--sp-3); background: var(--rd-bar); border-top: 1px solid color-mix(in srgb, var(--rd-ink) 10%, transparent); font-family: var(--font-body); }
.rd-say[hidden] { display: none; }
.rd-say-main { width: 46px; height: 46px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.rd-say-rate { min-width: 46px; font-size: var(--fs-sm); }
.rd-say-voice { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-xs); color: inherit; opacity: 0.8; }
select.rd-say-voice { padding: 4px 6px; border: 1px solid color-mix(in srgb, var(--rd-ink) 18%, transparent); border-radius: var(--r-sm); background: transparent; font: inherit; font-size: var(--fs-xs); }
.rd-saying { background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: var(--r-xs, var(--r-sm)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
@media (max-width: 640px) {
  .rd-full { display: none; }
  .rd-pop { top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: min(72vh, 600px); border-radius: var(--r-xl) var(--r-xl) 0 0; padding-bottom: calc(var(--sp-4) + env(safe-area-inset-bottom, 0px)); animation: rd-sheet-up var(--t-med) var(--ease-out); }
  .rd-say-voice { max-width: 96px; }
  .rd-coach-zones > span { padding-bottom: 10vh; }
}
@keyframes rd-sheet-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
/* 2026-11-28: the Library's reading week and summary (views/learn.js): a day with a few minutes shows them faintly,
   a reading day (5 minutes or more) in the accent; the day's goal as a ring; Week / Month on My shelf with tiles, the
   minutes per day as bars (core/charts.js) and the books read. */
.lbh-day.some i { background: var(--accent-bg); color: var(--accent); }
.lbh-goal { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--ink-2); }
.lbh-goal svg { width: 22px; height: 22px; flex: none; transform: rotate(-90deg); }
.lbh-goal circle { fill: none; stroke: var(--line-2); stroke-width: 3; }
.lbh-goal circle.fg { stroke: var(--accent); stroke-linecap: round; }
.lbh-goal circle.fg.done { stroke: var(--ok); }
.lbh-goal b { color: var(--ink); font-weight: var(--fw-semibold); }
.lmr-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.lmr-head .lm-h { margin: 0; }
.lmr-span { min-width: 92px; text-align: center; }
.lmr-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-3); }
.lmr-tile { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-3); border-radius: var(--r-md); background: var(--surface-sunken); min-width: 0; }
.lmr-k { font-size: var(--fs-2xs); color: var(--ink-3); font-weight: var(--fw-semibold); }
.lmr-tile b { font-size: var(--fs-xl); color: var(--ink); }
.lmr-of { font-size: var(--fs-sm); color: var(--ink-3); font-weight: var(--fw-medium, var(--fw-semibold)); }
.lmr-sub { font-size: var(--fs-2xs); color: var(--ink-3); }
.lmr-books { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-2); }
@media (max-width: 640px) { .lmr-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lmr-head { align-items: flex-start; }
  .lmr-chart { overflow-x: auto; overscroll-behavior-x: contain; } .lmr-chart svg { min-width: 520px; } }
.pts-read { display: flex; align-items: flex-start; gap: var(--sp-2); color: var(--ink-2); }
.pts-read svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .rd-coach, .rd-back, .rd-pop, .rd-spread.in-fade, .rd-colwrap.in-fade { animation: none; } .rd-steps i { transition: none; } }

/* 2026-11-28: credit to whoever uploaded a Library material (shelf card, material page, reader's contents) */
.lc-by { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: var(--fs-2xs); color: var(--ink-3); min-width: 0; }
.lc-by .av { --s: 16px; font-size: var(--fs-3xs); flex: none; }
.li-credit { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--ink-2); }
.li-credit.muted { color: var(--ink-3); }
.rd-credit { display: flex; align-items: center; gap: 6px; margin: var(--sp-3) 0 0; padding: var(--sp-3) var(--sp-2) 0; border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent); font-size: var(--fs-2xs); opacity: .75; }
.rd-credit svg { width: 14px; height: 14px; flex: none; }

/* 2026-11-28: summaries that sell the book: the pitch, what you'll take away, and "Worth reading next" on Discover */
.li-pitch { font-size: var(--fs-md); line-height: var(--lh-base); }
.li-points { list-style: none; margin: var(--sp-2) 0 0; padding: 0; display: grid; gap: 6px; }
.li-points li { display: flex; gap: var(--sp-2); align-items: flex-start; line-height: var(--lh-normal); }
.li-points li svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--c, var(--accent)); }
.lb-pick { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-5); align-items: start; margin-bottom: var(--sp-4);
  padding: var(--sp-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--c); box-shadow: var(--shadow-sm); }
.lb-pick-cover .lc { width: 132px; }
.lb-pick-kick { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  text-transform: uppercase; letter-spacing: var(--ls-caps); color: var(--c); }
.lb-pick-kick svg { width: 14px; height: 14px; }
.lb-pick-title { margin: 6px 0 2px; font-size: var(--fs-xl); line-height: var(--lh-snug); }
.lb-pick-pitch { margin: var(--sp-3) 0 0; font-size: var(--fs-md); line-height: var(--lh-base); color: var(--ink); max-width: 68ch; }
.lb-pick .li-points { font-size: var(--fs-sm); max-width: 68ch; }
.lb-pick-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-4); }
.lb-pick-by { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: var(--fs-xs); color: var(--ink-3); }
.lb-pick-by .av { --s: 18px; font-size: var(--fs-3xs); }
@media (max-width: 640px) {
  .lb-pick { grid-template-columns: 1fr; padding: var(--sp-4); gap: var(--sp-3); }
  .lb-pick-cover { display: flex; justify-content: center; }
  .lb-pick-cover .lc { width: 112px; }
  .lb-pick-by { margin-left: 0; width: 100%; }
}

/* 2026-11-28: how the points were earned (by rule), worth a look, and Team points for the owner and directors */
.pts-kinds { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.pts-kind { display: grid; grid-template-columns: minmax(0, 1.4fr) 128px minmax(60px, 1fr) 52px; align-items: center; gap: var(--sp-3); padding: 5px var(--sp-2); border-radius: var(--r-sm); }
.pts-kind:hover { background: var(--surface-hover); }
.pts-kind .num { text-align: right; }
.pts-watch { list-style: none; margin: 0 0 var(--sp-2); padding: 0; display: grid; gap: 2px; }
.pts-watch li { display: flex; gap: var(--sp-3); padding: var(--sp-2); border-left: 3px solid var(--warn); background: var(--surface-hover); border-radius: var(--r-sm); }
.pts-team-wrap { overflow-x: auto; }
.pts-team { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.pts-team th { text-align: left; font-weight: var(--fw-semibold); color: var(--ink-3); font-size: var(--fs-xs); padding: 6px var(--sp-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.pts-team td { padding: 6px var(--sp-2); border-bottom: 1px solid var(--line); }
.pts-team th.num, .pts-team td.num { text-align: right; }
.pts-team tr:hover td { background: var(--surface-hover); }
.pts-team a { color: inherit; text-decoration: none; min-width: 0; }
.pts-flag { display: inline-flex; align-items: center; gap: 2px; color: var(--warn); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.pts-flag svg, .pts-watch svg { width: 13px; height: 13px; }
.lbr-pts { display: inline-flex; color: var(--ink-3); }
.lbr-pts svg { width: 14px; height: 14px; }
@media (max-width: 640px) {
  .pts-kind { grid-template-columns: minmax(0, 1fr) 52px; }
  .pts-kind .bar, .pts-kind .tiny { display: none; }
}
.lr-read { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: var(--fs-xs); color: var(--ink-3); }
.lr-read.warn { color: var(--warn); font-weight: var(--fw-semibold); }
.lr-read svg { width: 13px; height: 13px; flex: none; }

/* ---------------------------------------------------------------- 2026-11-29 agenda: boxes of several lines
   An item's cue, mic / slides / music and standby (FOH), then its room and remarks: labelled boxes on the same three
   columns, as tall as their text. Enter starts a new line. */
.ag-tags { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.ag-boxes { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); align-items: start; }
.ag-box { display: grid; gap: 2px; min-width: 0; }
.ag-box.wide { grid-column: span 2; }
.ag-box > span { padding-left: var(--sp-1); font-size: var(--fs-2xs); font-weight: var(--fw-semibold); color: var(--ink-3); }
.ag-box textarea.input { display: block; width: 100%; min-height: var(--ctl-h-sm); resize: none; overflow: hidden; field-sizing: content; line-height: var(--lh-base); overflow-wrap: anywhere; background: var(--surface); }
.doc-page table.ag-doc td.room, .doc-page table.ag-doc td.cue, .doc-page table.ag-doc td.tech, .doc-page table.ag-doc td.standby { white-space: pre-line; }
@media (max-width: 900px) { .ag-tags, .ag-boxes { grid-column: 1 / -1; } }
@media (max-width: 720px) { .ag-boxes { grid-template-columns: minmax(0, 1fr); } .ag-box.wide { grid-column: auto; } }

/* ------------------------------------------------------------ Agenda: editing together (2026-11-29)
   As on the quotation: faces by the save state, an accent edge and a name on the item each person is on, and a short
   flash on what someone else changed. Presence is state, so it takes the one accent. */
.ag-people { display: inline-flex; align-items: center; gap: var(--sp-2); margin-left: var(--sp-2); vertical-align: middle; }
.ag-fohnote { flex-wrap: wrap; }
.ag-fohnote > .grow { flex-basis: 220px; }
.ag-people:empty { display: none; }
.ag-row.peer { box-shadow: 0 0 0 1px var(--accent); }
.ag-peer { position: absolute; right: var(--sp-3); top: calc(var(--sp-2) * -1); max-width: calc(100% - var(--sp-6)); overflow: hidden; text-overflow: ellipsis; padding: 0 var(--sp-2); border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-size: var(--fs-2xs); line-height: var(--lh-base); pointer-events: none; white-space: nowrap; z-index: var(--z-sticky); }
.ag-row.just-in { animation: qc-flash 1.6s var(--ease-out); }
@media (prefers-reduced-motion: reduce) { .ag-row.just-in { animation: none; } }

/* ------------------------------------------------------------ Loading schedule (2026-11-30)
   core/loadin.js, the same on the Loading tab, its print and the vendors' page: a chart a day, as wide as the page. An
   area is a line: its name, its steps as bars (a tone each, always with the step's name), and under them what is done,
   the people and the notes. On a phone (or any narrow box) the bars go and each area is a list of its steps. */
.lod { container: lod / inline-size; }
.lod .p1, .lod-key .p1 { --c: var(--mm-1); } .lod .p2, .lod-key .p2 { --c: var(--mm-5); } .lod .p3, .lod-key .p3 { --c: var(--mm-4); }
.lod .p4, .lod-key .p4 { --c: var(--mm-6); } .lod .p5, .lod-key .p5 { --c: var(--mm-8); } .lod .p6, .lod-key .p6 { --c: var(--mm-3); }
.lod-day + .lod-day { margin-top: var(--sp-8); }
.lod-dayhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-1) var(--sp-3); margin-bottom: var(--sp-3); }
.lod-dayhead h2 { margin: 0; font-size: var(--fs-xl); font-weight: var(--fw-semibold); }
.lod-h { padding: 0 var(--sp-2); border-radius: var(--r-pill); background: var(--ink); color: var(--mix-bg); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.lod-facts { color: var(--ink-3); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.lod-ready { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--ink); font-size: var(--fs-sm); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }
.lod-ready::before { content: ""; width: 3px; height: 14px; border-radius: var(--r-pill); background: var(--danger); }
.lod-row { display: grid; grid-template-columns: 168px minmax(0, 1fr); column-gap: var(--sp-4); align-items: start; padding: var(--sp-2) 0; border-top: 1px solid var(--line); }
.lod-axis { padding: 0; border-top: 0; }
.lod-ticks { position: relative; height: 22px; font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.lod-ticks span { position: absolute; top: 2px; transform: translateX(-50%); }
.lod-ticks .first { transform: none; }
.lod-ticks .last { transform: translateX(-100%); }
.lod-name { min-width: 0; font-size: var(--fs-xs); color: var(--ink-3); overflow-wrap: anywhere; }
.lod-name b { display: block; font-size: var(--fs-md); font-weight: var(--fw-semibold); line-height: var(--lh-snug); color: var(--ink); }
.lod-name > span { display: block; }
.lod-name .tbc { font-style: italic; }
.lod-by { color: var(--ink); font-weight: var(--fw-semibold); }
.lod-pick { display: block; padding: 0; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.lod-pick:hover b { color: var(--accent); text-decoration: underline; }
.lod-track { position: relative; height: calc(var(--lanes) * 38px); }
.lod-line { position: absolute; z-index: 1; top: calc(var(--sp-2) * -1); bottom: calc(var(--sp-2) * -1); width: 1px; background: var(--line); }
.lod-shade { position: absolute; top: calc(var(--sp-2) * -1); bottom: calc(var(--sp-2) * -1); background: var(--surface-sunken); }
.lod-due { position: absolute; z-index: 2; top: calc(var(--sp-1) * -1); bottom: calc(var(--sp-1) * -1); width: 3px; margin-left: -1px; border-radius: var(--r-pill); background: var(--danger); }
.lod-bar { --lane: 0; container-type: inline-size; position: absolute; top: calc(var(--lane) * 38px); height: 36px; overflow: hidden; z-index: 1; border: 1px solid var(--surface); border-radius: var(--r-xs); background: color-mix(in srgb, var(--c) 20%, var(--mix-bg)); color: color-mix(in srgb, var(--c) 72%, var(--mix-ink)); }
.lod-bar.open { border-right: 2px dashed var(--c); border-radius: var(--r-xs) 0 0 var(--r-xs); }
.lod-bar b, .lod-bar small { display: block; padding-left: var(--sp-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: var(--lh-snug); }
.lod-bar b { margin-top: 2px; font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.lod-bar small { font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; opacity: 0.9; }
@container (max-width: 74px) { .lod-bar small { display: none; } .lod-bar b { margin-top: 9px; padding-left: 5px; } }
@container (max-width: 34px) { .lod-bar b { display: none; } }
.lod .is-event { --c: var(--ink); }
.lod .is-rehearsal { --c: var(--mm-8); }
.lod-bar.is-event { background: var(--ink); color: var(--mix-bg); }
.lod-bar.is-rehearsal { background: color-mix(in srgb, var(--ink) 20%, var(--mix-bg)); color: var(--ink); }
.lod-steps { grid-column: 2; display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); }
.lod-steps li { display: flex; gap: var(--sp-2); min-width: 0; padding-top: var(--sp-1); }
.lod-steps li.long, .lod-steps li.is-check { flex-basis: 100%; }
.lod-steps li.plain { display: none; }
.lod-time { flex: none; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lod-what { min-width: 0; overflow-wrap: anywhere; }
.lod-what b { color: color-mix(in srgb, var(--c, var(--ink)) 78%, var(--mix-ink)); font-weight: var(--fw-semibold); }
.lod-what em { color: var(--ink-3); font-style: normal; white-space: nowrap; }
.lod-what small { display: block; color: var(--ink-3); font-size: var(--fs-xs); white-space: pre-line; }
.lod-key { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); margin-top: var(--sp-4); font-size: var(--fs-xs); color: var(--ink-3); }
.lod-key span { display: inline-flex; align-items: center; gap: 6px; }
.lod-key i { width: 16px; height: 12px; border-radius: var(--r-xs); background: color-mix(in srgb, var(--c) 45%, var(--mix-bg)); }
.lod-key i.shade { background: var(--surface-muted); }
.lod-key i.due { width: 3px; background: var(--danger); }
@container lod (max-width: 680px) {
  .lod-axis, .lod-track, .lod-key { display: none; }
  .lod-row { grid-template-columns: minmax(0, 1fr); row-gap: var(--sp-1); padding: var(--sp-3) 0; }
  .lod-ready { margin-left: 0; width: 100%; }
  .lod-prog { margin-bottom: 0; }
  .lod-steps { grid-column: 1; display: grid; gap: var(--sp-1); }
  .lod-steps li, .lod-steps li.plain { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--sp-3); padding: 2px 0; }
  .lod-steps li:not(.is-check) .lod-what > b::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: var(--r-xs); background: var(--c, var(--line-2)); }
}
.lod-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.lod-chips button { min-height: 36px; padding: 6px var(--sp-4); border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-medium); cursor: pointer; overflow-wrap: anywhere; }
.lod-chips button:hover { border-color: var(--neutral-400); color: var(--ink); }
.lod-chips button.on { border-color: var(--ink); background: var(--ink); color: var(--mix-bg); }
.lod-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--sp-4) var(--sp-6); font-size: var(--fs-sm); }
.lod-info h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 var(--sp-1); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.lod-info h3 svg { width: 15px; height: 15px; color: var(--ink-3); }
.lod-info > div { min-width: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.lod-call { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); margin-top: 2px; }
.lod-infobox { padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.lod-infobox .lod-info { margin-top: var(--sp-3); }
.lod-alike { flex-wrap: wrap; }
.lod-alike > .grow { flex: 1 1 240px; }
.lod-area header > .btn { margin-left: auto; }
/* the team's Edit: an area, its vendor and ready-by time once, its steps under it */
.lod-edit { display: grid; gap: var(--sp-3); container: lodedit / inline-size; }
.lod-area { display: grid; gap: var(--sp-2); justify-items: start; padding: var(--sp-4); border: 1px solid var(--line-2); border-radius: var(--r-md); }
.lod-area > header { position: relative; display: flex; flex-wrap: wrap; align-items: end; gap: var(--sp-2) var(--sp-3); width: 100%; margin-bottom: var(--sp-1); }
.lod-f { display: grid; gap: 2px; flex: 1 1 130px; min-width: 0; font-size: var(--fs-xs); color: var(--ink-3); }
.lod-f > span:first-child { padding-left: 2px; }
.lod-f .input { width: 100%; }
.lod-dues { flex: 0 1 auto; }
.lod-due-in { display: grid; grid-template-columns: 142px 108px; gap: var(--sp-1); }
.lod-own { display: flex; align-items: center; min-height: var(--ctl-h-sm); font-size: var(--fs-sm); color: var(--ink-2); }
.lod-step { display: grid; grid-template-columns: 112px minmax(120px, 1.2fr) 142px auto 84px minmax(120px, 1.4fr) 28px; gap: var(--sp-2); align-items: start; width: 100%; }
.lod-step.own { grid-template-columns: 112px minmax(100px, 1.1fr) minmax(90px, 0.9fr) 142px auto 84px minmax(100px, 1.2fr) 28px; }
.lod-step .input { width: 100%; min-width: 0; }
.lod-step textarea.input { min-height: var(--ctl-h-sm); resize: none; field-sizing: content; line-height: var(--lh-base); padding-block: 4px; }
.lod-times { display: flex; align-items: center; gap: var(--sp-1); color: var(--ink-3); }
.lod-times .input { width: 104px; }
.lod-step > .btn { align-self: center; }
@container lodedit (max-width: 1000px) {
  .lod-step, .lod-step.own { grid-template-columns: 120px minmax(0, 1fr) auto 84px 28px; padding-bottom: var(--sp-3); border-bottom: 1px solid var(--line); }
  .lod-step [data-f="vendor"] { grid-column: 1 / -1; order: 1; }
  .lod-step .wide { order: 2; grid-column: 3 / -1; } .lod-step [data-f="task"] { grid-column: 1 / 3; }
}
@container lodedit (max-width: 560px) {
  .lod-step, .lod-step.own { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 28px; }
  .lod-area header > .btn { position: absolute; top: calc(var(--sp-2) * -1); right: 0; }
  .lod-step > * { order: 1; }
  .lod-step .wide, .lod-step [data-f="task"] { grid-column: 1 / -1; }
  .lod-step select { grid-column: 1; order: 0; } .lod-step [data-f="manpower"] { grid-column: 2; order: 0; } .lod-step > .btn { grid-column: 3; order: 0; }
  .lod-step [data-f="day"] { grid-column: 1 / -1; } .lod-times { grid-column: 1 / -1; } .lod-times .input { flex: 1; width: auto; }
}
@media (max-width: 640px) { .lod-area { padding: var(--sp-3); } .lod-chips button { min-height: 44px; } }
.lod-read { max-height: 46vh; overflow: auto; }
.lod-read td { vertical-align: top; }
.lod-read-day th { padding: var(--sp-2); background: var(--surface-sunken); text-align: left; font-size: var(--fs-sm); color: var(--ink); }
.lod-vendors { display: grid; gap: 0; }
.lod-vendor { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding: var(--sp-2) 0; border-top: 1px solid var(--line); }
.lod-vendor .grow { min-width: 180px; }
.lod-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
@media (max-width: 560px) { .lod-two { grid-template-columns: minmax(0, 1fr); } }
/* on paper */
.lod-doc .lod-info { margin-bottom: 5mm; font-size: var(--fs-xs); }
.lod-doc .lod-dayhead h2 { font-size: var(--fs-lg); }
@media print {
  .lod, .lod-key { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .lod-row, .lod-day, .lod-dayhead, .lod-info > div { break-inside: avoid; } /* a day that fits on a page stays whole */
  .lod-day:first-child { break-inside: auto; } /* it follows the heading: never a first page without a schedule */
  .lod-row { padding: 2px 0; }
  .lod-axis { padding: 0; }
  .lod-key { break-before: avoid; margin-top: var(--sp-2); }
  .lod-dayhead, .lod-axis { break-after: avoid; }
}
