/*! Across Core — across-core.css v3.0.7 · kit single-file build. Theme: [data-theme]. Contract: across-*. Generated — edit split sources. */


/* ===== colors_and_type.css ===== */
/* ===================================================================
   Across — Colors & Type
   Canonical design tokens for the Across suite.

   SOURCE OF TRUTH: synced DOWN from the Orbit Across app
   (design-system/colors_and_type.css in the Orbit project). Orbit is
   the master; this file is kept in step with what ships there.
   See DIVERGENCE.md for the full sync log.
   =================================================================== */

/* -------- Fonts -------------------------------------------------- */
/* Onest — the default human-facing typeface for Across. */
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/onest-4.woff2") format("woff2");
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/onest-5.woff2") format("woff2");
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/onest-6.woff2") format("woff2");
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/onest-7.woff2") format("woff2");
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../assets/fonts/onest-8.woff2") format("woff2");
}

/* Red Hat Mono — the brand monospace. Numbers, codes, timestamps, kbd,
   mono eyebrows. Bundled locally (variable wght 300–700, upright +
   italic) so the system works offline. */
@font-face {
  font-family: "Red Hat Mono";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../assets/fonts/RedHatMono-VariableFont_wght.ttf") format("truetype-variations");
}
@font-face {
  font-family: "Red Hat Mono";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("../assets/fonts/RedHatMono-Italic-VariableFont_wght.ttf") format("truetype-variations");
}

:root {
  /* ============================================================
     1. BRAND — identity v3 (Across Identity board, Oct 2026)
     The master is one colour: Obsidian on paper, Platinum on
     Obsidian. Each product has one colour, in a deep shade for
     paper and a base shade for Obsidian. Values from board p23.
     ============================================================ */
  --obsidian:     #0B0F14;     /* master on paper · dark surface */
  --platinum:     #E8EAEE;     /* master on Obsidian */
  --paper:        #FCFBF8;     /* light surface */

  --track-deep:   #0066CC;     /* Track on paper */
  --track-base:   #1589FF;     /* Track on Obsidian */
  --orbit-deep:   #16A34A;     /* Orbit on paper */
  --orbit-base:   #22C55E;     /* Orbit on Obsidian */
  --relay-deep:   #EA580C;     /* Relay on paper */
  --relay-base:   #FF5E00;     /* Relay on Obsidian */

  /* Older names, kept because components use them. Same values. */
  --track:        var(--track-base);
  --track-dark:   var(--track-deep);
  --relay:        var(--relay-base);
  --relay-dark:   var(--relay-deep);

  /* UI tints. Never used on a mark. */
  --track-light:  #60A5FA;
  --orbit-tint:   #4ADE80;
  --relay-light:  #FB923C;

  /* Mark ink: the colour a mark takes on the current surface.
     Swaps to the base shades in dark mode (below). Wordmarks always
     use --mark-across, never a product colour. */
  --mark-across:  var(--obsidian);
  --mark-track:   var(--track-deep);
  --mark-orbit:   var(--orbit-deep);
  --mark-relay:   var(--relay-deep);

  /* ---- Teal — UI only ----
     Links (and the legacy chrome slot). Never on, inside or beside a
     mark; not a brand colour. Teal deep fails on paper (2.8:1), so
     links on paper use --teal-ink (5.4:1). Focus rings stay on the
     product accent (--accent). */
  --teal:         #00F2FF;     /* links on Obsidian */
  --teal-dark:    #00A8B5;     /* tints and fills on paper; not for text */
  --teal-light:   #67E8F9;
  --teal-ink:     #00737C;     /* link text on paper */
  --link:         var(--teal-ink);
  --link-hover:   var(--text);
  /* Deprecated alias of --link (v3.0). */
  --brand:        var(--link);

  /* ============================================================
     2. PRIMITIVES — neutral ramp
     Bridges Platinum (200) to Obsidian (950).
     ============================================================ */
  --neutral-50:  #F9FAFB;
  --neutral-100: #F3F4F6;
  --neutral-200: #E8EAEE;   /* = Platinum */
  --neutral-300: #D1D5DB;
  --neutral-400: #9CA3AF;
  --neutral-500: #6B7280;
  --neutral-600: #4B5563;
  --neutral-700: #374151;
  --neutral-800: #1F2937;
  --neutral-900: #111827;
  --neutral-950: #0B0F14;   /* = Obsidian */

  /* Legacy aliases — keep existing components working. */
  --gray-50:  var(--neutral-50);
  --gray-100: var(--neutral-100);
  --gray-200: var(--neutral-200);
  --gray-300: var(--neutral-300);
  --gray-400: var(--neutral-400);
  --gray-500: var(--neutral-500);
  --gray-600: var(--neutral-600);
  --gray-700: var(--neutral-700);
  --gray-800: var(--neutral-800);
  --gray-900: var(--neutral-900);
  --gray-950: var(--neutral-950);

  /* ============================================================
     3. SEMANTIC — light theme (default)
     ============================================================ */
  /* Lighter warm paper — barely-there warmth in the undertone so it reads
     calm and brand-consistent next to the cool neutrals on type/borders.
     Lifts contrast/readability vs. a true bone/ivory; lighter than the
     legacy #FAF7F1 used at ui.acrossacross.com. */
  --bg:           var(--paper);   /* warm paper (canonical light surface) */
  --surface:      #FFFFFF;   /* clean white for cards */
  --surface-2:    #F2EEE5;   /* gentle warm beige for inset / muted blocks */
  --surface-hover: color-mix(in oklab, var(--surface) 94%, var(--text) 6%);

  /* Canonical interactive-row hover — accent-tinted, not neutral.
     A subtle 4% tint of the active product --accent. Used on every
     primary interactive row: tool cards, ledger rows, list items.
     Pair with the wing-wipe leading-edge accent (see §10 MOTION).
     Products that don't want product-tinted hover can override this
     back to var(--surface-hover). */
  --surface-hover-accent: color-mix(in oklab, var(--accent, var(--orbit-base)) 4%, var(--surface));

  --text:         #111827;
  --text-muted:   #4B5563;   /* WCAG AA on --bg */
  --text-subtle:  #6B7280;

  --border:        rgba(0,0,0,.08);
  --border-strong: rgba(0,0,0,.14);

  /* ------------------------------------------------------------
     SEMANTIC DATA ACCENTS — fixed, never rebound.
     CONTRACT: the product/brand accent (--accent, e.g. Orbit green)
     carries INTERACTION & IDENTITY — hovers, active states, focus,
     the wing-wipe. It is rebindable per product. The semantic
     accents below carry MEANING IN DATA — warnings, deltas, water,
     staleness — and must stay constant even when the brand accent
     is rethemed, or the data changes meaning under the user.
     ------------------------------------------------------------ */
  /* Warm — "down", "stale", "custom", "warning" */
  --accent-warm:        #C2410C;
  --accent-warm-strong: #B45309;
  --accent-warm-bg:     rgba(194, 65, 12, 0.10);
  --accent-warm-soft:   rgba(194, 65, 12, 0.05);
  --accent-warm-glow:   rgba(194, 65, 12, 0.12);
  --accent-warm-tint:   rgba(194, 65, 12, 0.025);
  /* Cool — "up vs home", "water/precip", "freezing", "informational" */
  --accent-cool:        #2563EB;
  --accent-cool-soft:   rgba(37, 99, 235, 0.10);
  --accent-cool-water:  #4F8FD9;

  /* Foreground aliases */
  --fg-1: var(--text);
  --fg-2: var(--text-muted);
  --fg-3: var(--text-subtle);

  /* ============================================================
     4. ACCENT CONTRAST
     -------------------------------------------------------------
     The legacy per-tool accent palette (--accent-time / -currency /
     -metrics / -weather / -places / -fx / -settings) was removed in the
     June 2026 overhaul. Product surfaces now take a single rebindable
     --accent (§4b); meaning-in-data uses the semantic --accent-warm* /
     --accent-cool* tokens.
     ============================================================ */
  --accent-contrast: #FFFFFF;

  /* ============================================================
     4b. PRODUCT ACCENT + APP-CHROME LAYER
     -------------------------------------------------------------
     The Orbit accent: the suite's signature green, mode-aware (deeper on
     light surfaces for contrast, brighter on obsidian). --accent is
     bound to it here so the canonical --surface-hover-accent and every
     component that reads var(--accent) resolves to the brand accent by
     default. Consuming products rebind --accent / --orbit if they own a
     different surface color.
     ============================================================ */
  --orbit:        var(--orbit-deep);  /* light-mode cut (#16A34A) */
  --orbit-soft:   color-mix(in oklab, var(--orbit) 14%, transparent);
  --orbit-softer: color-mix(in oklab, var(--orbit) 8%, transparent);
  --accent:       var(--orbit);

  /* App-chrome proxies — components read --app-* so a product can retheme
     its chrome without touching every rule. They pass through to the
     semantic tokens by default. */
  --app-bg:            var(--bg);
  --app-surface:       var(--surface);
  --app-surface-2:     var(--surface-2);
  --app-border:        var(--border);
  --app-border-strong: var(--border-strong);
  --app-text:          var(--text);
  --app-text-muted:    var(--text-muted);
  --app-text-subtle:   var(--text-subtle);
  --app-brand:         var(--brand);

  /* Topbar height used by the app shell + sticky kit nav. */
  --topbar-h:          56px;

  /* ============================================================
     5. STATE
     ============================================================ */
  --success: #16A34A;
  --warning: #D97706;
  --error:   #B91C1C;   /* red-700, 6.3:1 on paper (v3: was #DC2626, 4.7:1) */
  --info:    #2563EB;

  /* ============================================================
     6. SHADOWS & ELEVATION
     Crisper, more app-like — tuned for the Across suite apps
     ============================================================ */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.03);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 4px 12px rgba(0,0,0,.06);
  --shadow:    0 1px 6px rgba(0,0,0,.08);
  --shadow-2:  0 8px 28px -12px rgba(0,0,0,.22);   /* menu/popover panels */
  --shadow-lg: 0 4px 8px rgba(0,0,0,.06), 0 12px 24px rgba(0,0,0,.08);
  --shadow-xl: 0 22px 48px -24px rgba(0,0,0,.35);

  /* ============================================================
     7. RADII — three tiers, not a linear ramp
     -------------------------------------------------------------
     STRUCTURAL  (2–4px)   crisp, architectural — the default tier.
                           Cards, panels, inputs, buttons, spec
                           containers, ledger rows — anything that
                           reads as a "box" of content.
     SOFT PILL   (6px)     softer affordance for tappable pills:
                           forecast tabs, segmented-control buttons,
                           jump chips. Distinct from structural so
                           interactive controls read as interactive.
     PILL/CIRCLE (999px /  true pills, circular triggers (the menu
                  50%)     button, date-nav arrows, sync dots).
     -------------------------------------------------------------
     The previous ramp (4/6/8/10/12/16/20) is collapsed down. New
     consumers should reach for --radius (3px) by default; only the
     soft-pill tier and the full pill exist outside that range.
     ============================================================ */
  /* Structural tier — every "box" sits in 2–4px */
  --radius-xs:   2px;
  --radius-sm:   3px;
  --radius:      3px;       /* default — containers, inputs, panels, cards */
  --radius-md:   3px;
  --radius-lg:   4px;
  --radius-xl:   4px;
  --radius-2xl:  4px;

  /* Soft-pill tier — only for tappable interactive pills */
  --radius-soft: 6px;       /* forecast tabs, segmented buttons, jump chips */

  /* Full pill / circle */
  --radius-pill: 999px;

  /* Semantic aliases — prefer these when the intent is clear */
  --radius-structural:  var(--radius);       /* 3px — boxes */
  --radius-interactive: var(--radius-soft);  /* 6px — tappable pills */

  /* ============================================================
     7b. ARCHITECTURE — the "notebook" system
     -------------------------------------------------------------
     The structural language Orbit established: visible rules and
     graph/dot grids replace cards and elevations as the primary
     organizational device. Content sits directly on --bg; rules
     separate it. Use --rule INSTEAD of a 1px solid border around
     everything.
     ============================================================ */
  --rule:        color-mix(in oklab, var(--text) 12%,  transparent);  /* structural hairline */
  --rule-soft:   color-mix(in oklab, var(--text) 6%,   transparent);  /* faint divider */
  --grid-line:   color-mix(in oklab, var(--text) 4.5%, transparent);  /* graph paper */
  --grid-dot:    color-mix(in oklab, var(--text) 13%,  transparent);  /* dot grid */
  --grid-size:   26px;                                                /* graph cell */
  --wing-cut:    9px;                                                 /* one chamfered corner — used sparingly */

  /* ============================================================
     8. SPACING — strict 8px grid (4 sub-step)
     ============================================================ */
  --space-0:  0;
  --space-1:  4px;
  --space-2:  8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-8: 48px;
  --space-10: 64px;
  --space-12: 96px;

  /* ============================================================
     9. TYPOGRAPHY
     One family for humans, one for numbers.
     ============================================================ */
  --font-system: "Onest", ui-sans-serif, system-ui,
                 -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
                 sans-serif;
  --font-mono:   "Red Hat Mono", ui-monospace, "SF Mono", Monaco, Menlo,
                 Consolas, "Courier New", monospace;
  --font:        var(--font-system);

  /* Canonical scale — synced to ui.acrossacross.com.
     Note: --text-base is 14px (the Across body default), not 16px.
     Use --text-md for 16px. */
  --text-xs:    0.625rem;    /* 10px — Extra Small */
  --text-sm:    0.75rem;     /* 12px — Small */
  --text-nav:   0.8125rem;   /* 13px — Navigation */
  --text-base:  0.875rem;    /* 14px — Body (default) */
  --text-md:    1rem;        /* 16px — Body Large */
  --text-lg:    1.25rem;     /* 20px — Heading 4 */
  --text-xl:    1.5rem;      /* 24px — Heading 3 */
  --text-2xl:   2rem;        /* 32px — Heading 2 */
  --text-3xl:   2.5rem;      /* 40px — Heading 1 */
  --text-4xl:   3rem;        /* 48px — Display */
  --text-5xl:   4rem;        /* 64px — Hero (Across extension) */

  /* Step-based numeric scale (used in legacy components) */
  --size-10: .625rem;
  --size-12: .75rem;
  --size-13: .8125rem;
  --size-14: .875rem;
  --size-16: 1rem;
  --size-18: 1.125rem;
  --size-20: 1.25rem;
  --size-24: 1.5rem;
  --size-32: 2rem;
  --size-40: 2.5rem;
  --size-48: 3rem;
  --size-64: 4rem;

  --font-normal:    400;
  --font-medium:    500;
  --font-semibold:  600;
  --font-bold:      700;

  --leading-tight:    1.2;
  --leading-snug:     1.3;
  --leading-normal:   1.5;
  --leading-relaxed:  1.65;

  --tracking-tightest: -0.02em;
  --tracking-tight:    -0.01em;
  --tracking-normal:    0;
  --tracking-wide:      0.025em;
  --tracking-wider:     0.06em;        /* uppercase eyebrows */
  --tracking-widest:    0.16em;        /* logo-style display */

  /* ============================================================
     10. MOTION
     -------------------------------------------------------------
     PHILOSOPHY: motion is for interaction only — hover, click,
     focus, expand. Never idle. No spinning loops on decorative
     surfaces, no pulsing dots, no ambient drift.

     The wing-wipe is the UI's one signature gesture: an accent edge
     sweeps in from the leading edge of a hovered/active element,
     on --wing-easing over --wing-duration. Pair the wing-wipe
     with --surface-hover-accent on interactive rows so the tint
     and the wipe arrive together. It is a UI pattern, not part of
     the logo.

     The logo build (board p26): the pin appears, then each copy
     grows out of the one before it. Once per session on first
     load; never on idle, hover, scroll or loop; none with reduced
     motion. Total 600ms or less.
     ============================================================ */
  --wing-easing:   cubic-bezier(.22, 1, .36, 1);     /* @kind other */
  --wing-duration: 280ms;                             /* @kind other */
  --ease:          cubic-bezier(.4, 0, .2, 1);       /* @kind other */
  --ease-in:       cubic-bezier(.4, 0, 1, 1);        /* @kind other */
  --ease-out:      cubic-bezier(0, 0, .2, 1);        /* @kind other */
  --fast:  120ms;  /* @kind other */
  --med:   200ms;  /* @kind other */
  --slow:  320ms;  /* @kind other */
  --mark-easing:        cubic-bezier(.22, 1, .36, 1);  /* @kind other */
  --mark-build-pin:     120ms;  /* @kind other */
  --mark-build-copy:    160ms;  /* @kind other */
  --mark-build-stagger: 80ms;   /* @kind other */
  --mark-build-settle:  120ms;  /* @kind other */

  /* ============================================================
     11. LAYOUT
     ============================================================ */
  --shell-width:   1032px;
  --reading-width: 720px;

  /* ============================================================
     12. Z-INDEX
     ============================================================ */
  --z-negative:  -1;    /* @kind other */
  --z-base:       1;    /* @kind other */
  --z-elevated:  10;    /* @kind other */
  --z-dropdown:  35;    /* @kind other */
  --z-sticky:   200;    /* @kind other */
  --z-nav:      500;    /* @kind other */
  --z-overlay: 1000;    /* @kind other */
  --z-modal:   2000;    /* @kind other */
  --z-toast:   9999;    /* @kind other */
}

/* ============================================================
   DARK THEME
   ============================================================ */
[data-theme="dark"], :root.dark {
  --bg:         var(--obsidian);    /* #0B0F14 */
  --surface:    #131820;
  --surface-2:  #1B2129;
  --surface-hover: #181E26;
  --surface-hover-accent: color-mix(in oklab, var(--accent, var(--orbit-base)) 6%, var(--surface));

  --text:        #F3F4F6;
  --text-muted:  #D1D5DB;
  --text-subtle: #9CA3AF;

  --border:        rgba(255,255,255,.08);
  --border-strong: rgba(255,255,255,.14);

  /* Architecture tokens read a touch brighter on obsidian so hairlines
     and grids stay legible against the dark ground. */
  --rule:      color-mix(in oklab, var(--text) 14%, transparent);
  --rule-soft: color-mix(in oklab, var(--text) 7%,  transparent);
  --grid-line: color-mix(in oklab, var(--text) 6%,  transparent);
  --grid-dot:  color-mix(in oklab, var(--text) 16%, transparent);

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow:    0 1px 10px rgba(0,0,0,.45);
  --shadow-2:  0 8px 28px -10px rgba(0,0,0,.6);
  --shadow-lg: 0 4px 8px rgba(0,0,0,.4), 0 12px 24px rgba(0,0,0,.5);

  /* Brighter Orbit green reads better on obsidian than the deeper cut. */
  --orbit:     var(--orbit-base);
  /* Marks take the base shades; links take bright teal. */
  --mark-across: var(--platinum);
  --mark-track:  var(--track-base);
  --mark-orbit:  var(--orbit-base);
  --mark-relay:  var(--relay-base);
  --link:        var(--teal);

  /* Semantic state — lift to 400-weight for ≥ 4.5:1 contrast on obsidian.
     Light-mode originals stay in :root; these override only in dark. */
  --error: #F87171;   /* red-400,  6.95:1 vs #0B0F14 */
  --info:  #60A5FA;   /* blue-400, 7.56:1 vs #0B0F14 */
}

/* System-dark: plain :root scope inside the media query so tokens register
   cleanly. A manual light choice is restored by the [data-theme="light"]
   block BELOW, which is declared later and therefore wins the cascade. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:         #0B0F14;
    --surface:    #131820;
    --surface-2:  #1B2129;
    --surface-hover: #181E26;
    --surface-hover-accent: color-mix(in oklab, var(--accent, var(--orbit-base)) 6%, var(--surface));
    --text:        #F3F4F6;
    --text-muted:  #D1D5DB;
    --text-subtle: #9CA3AF;
    --border:        rgba(255,255,255,.08);
    --border-strong: rgba(255,255,255,.14);
    --rule:      color-mix(in oklab, var(--text) 14%, transparent);
    --rule-soft: color-mix(in oklab, var(--text) 7%,  transparent);
    --grid-line: color-mix(in oklab, var(--text) 6%,  transparent);
    --grid-dot:  color-mix(in oklab, var(--text) 16%, transparent);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow:    0 1px 10px rgba(0,0,0,.45);
    --shadow-2:  0 8px 28px -10px rgba(0,0,0,.6);
    --shadow-lg: 0 4px 8px rgba(0,0,0,.4), 0 12px 24px rgba(0,0,0,.5);
    --orbit:     var(--orbit-base);
    --mark-across: var(--platinum);
    --mark-track:  var(--track-base);
    --mark-orbit:  var(--orbit-base);
    --mark-relay:  var(--relay-base);
    --link:        var(--teal);

    /* Semantic state — same dark overrides as [data-theme="dark"] above */
    --error: #F87171;
    --info:  #60A5FA;
  }
}

/* Manual light — wins over system-dark because it comes later in the file. */
[data-theme="light"] {
  --bg:           #FCFBF8;
  --surface:      #FFFFFF;
  --surface-2:    #F2EEE5;
  --surface-hover: color-mix(in oklab, var(--surface) 94%, var(--text) 6%);
  --surface-hover-accent: color-mix(in oklab, var(--accent, var(--orbit-base)) 4%, var(--surface));
  --text:         #111827;
  --text-muted:   #4B5563;
  --text-subtle:  #6B7280;
  --border:        rgba(0,0,0,.08);
  --border-strong: rgba(0,0,0,.14);
  --rule:        color-mix(in oklab, var(--text) 12%,  transparent);
  --rule-soft:   color-mix(in oklab, var(--text) 6%,   transparent);
  --grid-line:   color-mix(in oklab, var(--text) 4.5%, transparent);
  --grid-dot:    color-mix(in oklab, var(--text) 13%,  transparent);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 4px 12px rgba(0,0,0,.06);
  --shadow:    0 1px 6px rgba(0,0,0,.08);
  --shadow-2:  0 8px 28px -12px rgba(0,0,0,.22);
  --shadow-lg: 0 4px 8px rgba(0,0,0,.06), 0 12px 24px rgba(0,0,0,.08);
  --orbit:     var(--orbit-deep);
  --mark-across: var(--obsidian);
  --mark-track:  var(--track-deep);
  --mark-orbit:  var(--orbit-deep);
  --mark-relay:  var(--relay-deep);
  --link:        var(--teal-ink);
  --error:       #B91C1C;
  --info:        #2563EB;
}

/* Inside Relay, warnings use the error colour (with an icon, set by the
   component), never orange — Relay's own colour is orange. */
[data-accent="relay"] { --warning: var(--error); }

/* =================================================================
   SEMANTIC ELEMENT STYLES
   Use these to "just write HTML" and get the brand for free.
   ================================================================= */
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  color: var(--text);
  margin: 0 0 var(--space-3);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}
h1 { font-size: var(--text-4xl); font-weight: 700; letter-spacing: var(--tracking-tightest); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); font-weight: var(--font-semibold); }
h6 { font-size: var(--text-base); font-weight: var(--font-semibold);
     text-transform: uppercase; letter-spacing: var(--tracking-wider);
     color: var(--text-muted); }

p { margin: 0 0 var(--space-3); text-wrap: pretty; }
small { font-size: var(--text-sm); color: var(--text-muted); }

code, pre, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
code {
  padding: 0.1em 0.35em;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}
/* Inside a code block the chip would paint every line separately. */
pre code { padding: 0; background: none; border-radius: 0; }

/* The signature "eyebrow" — uppercase, wide-tracked */
.across-eyebrow, [data-eyebrow] {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Mono eyebrow — the canonical section/category label used inside tool
   surfaces and on category headers. Same uppercase + wide-tracking idea
   as .across-eyebrow but in the mono family, at a smaller size, with a quieter
   colour. Reach for this on tool pages; .across-eyebrow stays for marketing. */
.across-eyebrow-mono {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

/* The signature "rule" — a thin obsidian hairline.
   Prefer using the --rule token directly as a 1px background on a
   container's border-bottom; .across-rule / <hr> remain for inline use. */
.across-rule, hr {
  border: 0;
  height: 1px;
  background: var(--rule, var(--border-strong));
  margin: var(--space-5) 0;
}

/* Links in running text: teal, UI only. Classed anchors (buttons,
   nav items) keep their own colour. */
:where(a:not([class])) { color: var(--link); text-underline-offset: 2px; }
:where(a:not([class])):hover { color: var(--link-hover); }

::selection { background: color-mix(in oklab, var(--accent) 30%, transparent); }

/* =================================================================
   FOUNDATION UTILITIES — synced to ui.acrossacross.com
   ================================================================= */

/* -------- Layout Grid (12-col, 8px gap) ------------------------- */
.across-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-4);
}
.across-col-span-1  { grid-column: span 1 / span 1; }
.across-col-span-2  { grid-column: span 2 / span 2; }
.across-col-span-3  { grid-column: span 3 / span 3; }
.across-col-span-4  { grid-column: span 4 / span 4; }
.across-col-span-5  { grid-column: span 5 / span 5; }
.across-col-span-6  { grid-column: span 6 / span 6; }
.across-col-span-7  { grid-column: span 7 / span 7; }
.across-col-span-8  { grid-column: span 8 / span 8; }
.across-col-span-9  { grid-column: span 9 / span 9; }
.across-col-span-10 { grid-column: span 10 / span 10; }
.across-col-span-11 { grid-column: span 11 / span 11; }
.across-col-span-12 { grid-column: span 12 / span 12; }

/* -------- Aspect Ratio ------------------------------------------ */
.across-aspect-video    { aspect-ratio: 16 / 9; object-fit: cover; }
.across-aspect-square   { aspect-ratio: 1 / 1;  object-fit: cover; }
.across-aspect-portrait { aspect-ratio: 3 / 4;  object-fit: cover; }
.across-aspect-wide     { aspect-ratio: 21 / 9; object-fit: cover; }

/* -------- Separator --------------------------------------------- */
.across-separator {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: var(--space-4) 0;
}
.across-separator--vertical {
  display: inline-block;
  width: 1px;
  align-self: stretch;
  background: var(--border);
  margin: 0 var(--space-3);
}

/* -------- Scroll Area ------------------------------------------- */
.across-scroll-area {
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.across-scroll-area::-webkit-scrollbar { width: 8px; height: 8px; }
.across-scroll-area::-webkit-scrollbar-track { background: transparent; }
.across-scroll-area::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-pill);
}
.across-scroll-area::-webkit-scrollbar-thumb:hover {
  background: var(--text-subtle);
}

/* =================================================================
   DOCUMENTED PATTERNS — codified from Orbit Across

   These aren't "components" — they're foundational patterns that
   any Across product should be able to use straight from this file
   without reverse-engineering the application stylesheet.
   ================================================================= */

/* -------- Dashed "add" affordance ----------------------------------
   The canonical "add something here" button across Across products
   (Add city, Add currency, Add metric). A dashed border that snaps to
   SOLID + accent on hover/focus, signalling "this slot accepts a new
   item" distinctly from a regular .across-btn. Pair with a "plus" icon. */
.across-btn-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: transparent;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition:
    border-color var(--fast) var(--ease),
    color        var(--fast) var(--ease),
    background   var(--fast) var(--ease);
}
.across-btn-add i { font-size: 14px; }
.across-btn-add:hover,
.across-btn-add:focus-visible {
  border-style: solid;
  border-color: var(--accent, var(--orbit-base));
  color:        var(--accent, var(--orbit-base));
  background:   color-mix(in oklab, var(--accent, var(--orbit-base)) 6%, transparent);
  outline: none;
}

/* .across-surface-paper — content sits on the paper, no card chrome.
   The canonical container for tool content (Orbit's "notebook" feel). */
.across-surface-paper {
  background: var(--bg);
  color: var(--text);
}

/* .across-row-interactive — the canonical interactive-row look.
   Subtle accent-tinted hover + soft transition. Use a leading-edge
   wing-wipe accent (3px bar, scaleY 0→1) on top for the full pattern. */
.across-row-interactive {
  position: relative;
  cursor: pointer;
  transition: background var(--fast) var(--ease);
}
.across-row-interactive:hover {
  background: var(--surface-hover-accent);
}


/* ===== components.css ===== */
/* ===================================================================
   Across — Components
   The reusable primitive vocabulary, synced DOWN from the Orbit Across
   /ui page ("Orbit primitives"). Buttons, inputs, dropdowns, toasts,
   drag-and-drop, modals/overlays, states, badges/alerts, tabs/nav, and
   controls. Product-specific compositions (currency ledger, timezone
   scrubber, etc.) stay in product stylesheets — see DIVERGENCE.md.

   Components read the --app-* chrome proxies and --orbit accent, both
   defined in colors_and_type.css §4b, so this file resolves standalone.
   =================================================================== */

/* ============================================================
   01 · BUTTONS
   ============================================================ */
.across-btn {
  position: relative;
  box-sizing: border-box;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; height: 34px; line-height: 1;
  background: var(--app-surface);
  color: var(--app-text);
  border: 1px solid var(--app-border-strong);
  border-radius: var(--radius-sm);
  font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: all var(--fast) var(--ease);
}
.across-btn:hover {
  /* Border stays exactly as it rests — the wing-wipe (plus a whisper of
     background lift) is the entire hover signal. No outline darkening.
     Synced from Orbit Across (master). */
  border-color: var(--app-border-strong);
  background: color-mix(in oklab, var(--app-text) 2.5%, var(--app-surface));
}
.across-btn i { font-size: 15px; line-height: 1; flex: none; }
.across-btn:disabled, .across-btn[disabled] { opacity: .5; cursor: not-allowed; }

.across-btn--primary {
  background: var(--orbit); color: #fff;
  border-color: var(--orbit);
}

/* Suite-accent buttons — one per surface (Track / Orbit / Relay).
   Mirror --primary's architecture; the wing-wipe rides the base ::before. */
.across-btn--track { background: var(--mark-track); color: #fff; border-color: var(--mark-track); }
.across-btn--orbit { background: var(--orbit); color: #fff; border-color: var(--orbit); }
.across-btn--relay { background: var(--mark-relay); color: #fff; border-color: var(--mark-relay); }
.across-btn--primary:hover {
  background: color-mix(in oklab, var(--orbit) 88%, black);
  border-color: color-mix(in oklab, var(--orbit) 88%, black);
}
.across-btn--ghost { background: transparent; border-color: transparent; color: var(--app-text-muted); }
.across-btn--ghost:hover { background: var(--app-surface-2); color: var(--app-text); }

.across-btn--danger {
  color: var(--error);
  border-color: color-mix(in oklab, var(--error) 30%, var(--app-border));
}
.across-btn--danger:hover { background: color-mix(in oklab, var(--error) 6%, transparent); border-color: var(--error); }

.across-btn--sm { height: 28px; padding: 4px 10px; font-size: 12px; }
.across-btn--lg { height: 40px; padding: 10px 18px; font-size: 14px; }
.across-btn--icon { width: 32px; padding: 0; justify-content: center; }
.across-btn.is-loading { color: rgba(255,255,255,.85); }

.across-btn__spinner {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  animation: spin 800ms linear infinite;
  display: inline-block;
}

/* The Wing — the one signature gesture. An accent edge wipes across the
   base of a button on hover/press (interaction only, never idle). */
.across-btn::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--orbit);
  clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  transform: scaleX(0); transform-origin: left center;
  transition: transform var(--wing-duration) var(--wing-easing);
  pointer-events: none;
}
.across-btn--icon::after, .across-btn--ghost::after { display: none; }
.across-btn--primary::after { background: color-mix(in oklab, #fff 60%, transparent); }
.across-btn--danger::after  { background: var(--error); }
.across-btn:hover::after, .across-btn:active::after { transform: scaleX(1); }

/* ============================================================
   Wing-wipe utility — the one signature gesture, reusable.
   Put .across-wing-wipe on any position:relative; overflow:hidden host
   (cards, rows, launchers). The accent edge wipes in from the
   leading edge on hover/active/focus, then retreats. Interaction
   only. Honours --accent so it follows the surface's one accent.
   ============================================================ */
.across-wing-wipe { position: relative; overflow: hidden; }
.across-wing-wipe::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--accent, var(--orbit));
  clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  transform: scaleX(0); transform-origin: left center;
  transition: transform var(--wing-duration) var(--wing-easing);
  pointer-events: none;
}
.across-wing-wipe:hover::after, .across-wing-wipe:active::after, .across-wing-wipe:focus-visible::after { transform: scaleX(1); }

/* ============================================================
   Live pill — the "LIVE" status chip used on live-data surfaces.
   Mono, uppercase, the live --orbit accent. (Promoted to the kit
   so the docs, the Orbit app, and the data table share one.)
   ============================================================ */
.across-live-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em;
  font-weight: 600; text-transform: uppercase; color: var(--orbit);
  background: color-mix(in oklab, var(--orbit) 12%, transparent);
  padding: 5px 10px; border-radius: var(--radius-pill);
}
.across-live-pill__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orbit); }

/* Dashed "add" affordance — see also .across-btn-add in colors_and_type.css.
   .across-addcity is the Orbit alias used inside tools. */
.across-addcity {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 12px;
  padding: 8px 14px;
  background: transparent;
  border: 1px dashed var(--app-border-strong);
  border-radius: var(--radius);
  color: var(--app-text-muted);
  font: inherit; font-size: 12.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.across-addcity i { font-size: 14px; }
.across-addcity:hover:not(:disabled) {
  border-style: solid; border-color: var(--orbit);
  color: var(--orbit); background: var(--orbit-softer);
}
.across-addcity:disabled { opacity: .5; cursor: not-allowed; }

/* Configure link — quiet text+icon action for tool heads */
.across-tool-configure-link {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-size: 13px; font-weight: 500;
  color: var(--app-text-muted);
  padding: 8px 14px; border-radius: var(--radius-sm);
  border: 0; background: transparent; cursor: pointer;
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.across-tool-configure-link:hover { color: var(--app-text); background: var(--app-surface-2); }
.across-tool-configure-link i { font-size: 16px; }

/* Circular trigger (menu / nav arrows) */
.across-menu-trigger {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: var(--app-surface); color: var(--app-text);
  border: 1px solid var(--app-border-strong); border-radius: 50%;
  cursor: pointer; position: relative;
  transition: all var(--fast) var(--ease);
}
.across-menu-trigger i { font-size: 16px; }
.across-menu-trigger:hover { background: color-mix(in oklab, var(--app-text) 4%, var(--app-surface)); border-color: var(--app-text-subtle); }
.across-nav-arrow {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--app-border); background: var(--app-surface);
  display: grid; place-items: center; font-size: 13px; cursor: pointer;
  color: var(--app-text-muted);
  transition: all var(--fast) var(--ease);
}
.across-nav-arrow:hover { color: var(--orbit); border-color: var(--orbit); }

/* Soft-pill chips — quick-amount + jump chips (interactive 6px radius) */
.across-chip-quick {
  padding: 5px 12px;
  background: transparent;
  border: 1px solid var(--app-border);
  border-radius: var(--radius-soft);
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 11.5px; font-weight: 500;
  color: var(--app-text-muted); cursor: pointer;
  transition: all var(--fast) var(--ease);
}
.across-chip-quick:hover { border-color: var(--app-border-strong); color: var(--app-text); }
.across-chip-quick.is-active { border-color: var(--orbit); background: var(--orbit-softer); color: var(--orbit); }

/* ============================================================
   02 · INPUTS
   ============================================================ */
.across-input {
  display: block; width: 100%;
  padding: 8px 12px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-sm);
  font: inherit; font-size: 13px; color: var(--app-text);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.across-input:hover { border-color: var(--app-border-strong); }
.across-input:focus { outline: none; border-color: var(--orbit); box-shadow: 0 0 0 3px var(--orbit-softer); }
.across-input.is-error { border-color: var(--error); }
.across-input.is-error:focus { box-shadow: 0 0 0 3px color-mix(in oklab, var(--error) 15%, transparent); }
.across-input.is-success { border-color: var(--success); }
.across-input.is-success:focus { box-shadow: 0 0 0 3px color-mix(in oklab, var(--success) 15%, transparent); }
textarea.across-input { resize: vertical; min-height: 60px; }

.across-input-wrap { position: relative; }
.across-input-wrap__icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--app-text-subtle); }
.across-input-wrap .across-input { padding-left: 32px; }

.across-input-msg { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; }
.across-input-msg--error   { color: var(--error); }
.across-input-msg--success { color: var(--success); }

.across-number-input {
  display: inline-flex; align-items: center;
  border: 1px solid var(--app-border); border-radius: var(--radius-sm);
  background: var(--app-surface); overflow: hidden;
}
.across-number-input button { width: 32px; height: 32px; background: transparent; border: 0; cursor: pointer; color: var(--app-text-muted); font-size: 16px; }
.across-number-input button:hover { background: var(--app-surface-2); color: var(--app-text); }
.across-number-input input {
  width: 140px; padding: 0 8px; height: 32px;
  background: transparent; border: 0; outline: none;
  font: inherit; font-size: 13px; text-align: center;
  border-left: 1px solid var(--app-border); border-right: 1px solid var(--app-border);
}

/* Checkbox / Radio
   `across-checkbox` is the suite-contract spelling (see PORT-PLAN §A.1);
   `across-check` is retained as a backward-compatible alias so both
   resolve during migration. The two are listed side-by-side rather than
   renamed destructively. */
.across-check, .across-checkbox, .across-radio {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; cursor: pointer; user-select: none; line-height: 1.3;
}
.across-check input, .across-checkbox input, .across-radio input { position: absolute; opacity: 0; pointer-events: none; }
.across-check input + span, .across-checkbox input + span, .across-radio input + span {
  width: 16px; height: 16px; flex-shrink: 0;
  background: var(--app-surface);
  border: 1.5px solid var(--app-border-strong);
  display: grid; place-items: center;
  transition: all var(--fast) var(--ease);
}
.across-check input + span, .across-checkbox input + span { border-radius: 4px; }
.across-radio input + span { border-radius: 50%; }
.across-check input:checked + span, .across-checkbox input:checked + span { background: var(--orbit); border-color: var(--orbit); }
.across-check input:checked + span::after, .across-checkbox input:checked + span::after {
  content: ""; width: 8px; height: 5px;
  border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff;
  transform: translateY(-1px) rotate(-45deg);
}
.across-radio input:checked + span { border-color: var(--orbit); }
.across-radio input:checked + span::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orbit); }

/* Slider */
.across-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px;
  background: color-mix(in oklab, var(--app-text) 15%, transparent);
  border-radius: 3px; outline: none; margin: 8px 0;
}
.across-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--orbit); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.across-slider::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--orbit); border: 0; cursor: pointer; }

/* ============================================================
   03 · DROPDOWNS — Combobox (filterable)
   ============================================================ */
.across-combobox { position: relative; display: inline-block; min-width: 240px; }
.across-combobox__trigger {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 12px; background: var(--app-surface);
  border: 1px solid var(--app-border); border-radius: var(--radius-sm);
  font: inherit; font-size: 13px; color: var(--app-text); cursor: pointer; text-align: left;
  transition: border-color var(--fast) var(--ease);
}
.across-combobox__trigger:hover { border-color: var(--app-border-strong); }
.across-combobox.is-open .across-combobox__trigger { border-color: var(--orbit); box-shadow: 0 0 0 3px var(--orbit-softer); }
.across-combobox__trigger > i { margin-left: auto; color: var(--app-text-subtle); }
.across-combobox__placeholder { color: var(--app-text-subtle); }
.across-combobox__menu {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; min-width: 280px;
  background: var(--app-surface); border: 1px solid var(--app-border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown, 35); overflow: hidden;
}
.across-combobox__search { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--app-border); }
.across-combobox__search i { color: var(--app-text-subtle); }
.across-combobox__search input { flex: 1; background: transparent; border: 0; font: inherit; font-size: 13px; color: var(--app-text); outline: none; }
.across-combobox__clear { width: 22px; height: 22px; display: grid; place-items: center; background: transparent; border: 0; cursor: pointer; color: var(--app-text-subtle); border-radius: 4px; }
.across-combobox__clear:hover { color: var(--app-text); background: var(--app-surface-2); }
.across-combobox__list { max-height: 280px; overflow-y: auto; padding: 4px; }
.across-combobox__opt {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; background: transparent; border: 0;
  font: inherit; font-size: 13px; color: var(--app-text); cursor: pointer; text-align: left; border-radius: 4px;
}
.across-combobox__opt.is-active, .across-combobox__opt:hover { background: var(--app-surface-2); }
.across-combobox__opt.is-selected { color: var(--orbit); }
.across-combobox__check { margin-left: auto; color: var(--orbit); }
.across-combobox__empty { display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 24px; color: var(--app-text-subtle); font-size: 12.5px; }
.across-combobox__empty i { font-size: 22px; }
.across-cur-row { display: flex; align-items: center; gap: 8px; }
.across-cur-row__flag { font-size: 15px; }
.across-cur-row__code { font-weight: 600; }
.across-cur-row__name { color: var(--app-text-muted); font-size: 12.5px; }

/* Select-style button (non-filterable) */
.across-select-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  background: var(--app-surface); border: 1px solid var(--app-border);
  border-radius: var(--radius-sm); font: inherit; font-size: 13px;
  cursor: pointer; min-width: 240px;
  transition: border-color var(--fast) var(--ease);
}
.across-select-btn:hover { border-color: var(--app-border-strong); }
.across-select-btn i { margin-left: auto; color: var(--app-text-subtle); }

/* ============================================================
   04 · TOASTS
   ============================================================ */
.across-toast-container {
  position: fixed; right: 20px; bottom: 20px;
  display: flex; flex-direction: column-reverse; gap: 10px;
  z-index: var(--z-toast, 9999); pointer-events: none;
}
.across-toast {
  pointer-events: auto;
  display: grid; grid-template-columns: 22px 1fr auto auto; gap: 12px; align-items: flex-start;
  min-width: 320px; max-width: 420px; padding: 12px 14px;
  background: var(--app-surface); border: 1px solid var(--app-border);
  border-left: 3px solid var(--orbit); border-radius: 4px 12px 12px 4px;
  box-shadow: var(--shadow-lg);
  animation: toast-in 280ms var(--wing-easing);
}
@keyframes toast-in { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.across-toast__icon { display: grid; place-items: center; font-size: 18px; line-height: 1; padding-top: 1px; }
.across-toast__body { min-width: 0; }
.across-toast__title { font-weight: 600; font-size: 13.5px; color: var(--app-text); }
.across-toast__desc { font-size: 12.5px; color: var(--app-text-muted); margin-top: 2px; }
.across-toast__action { background: transparent; border: 0; padding: 4px 8px; font: inherit; font-weight: 600; font-size: 12.5px; color: var(--orbit); cursor: pointer; border-radius: 4px; }
.across-toast__action:hover { background: var(--orbit-softer); }
.across-toast__close { width: 22px; height: 22px; display: grid; place-items: center; background: transparent; border: 0; cursor: pointer; color: var(--app-text-subtle); border-radius: 4px; }
.across-toast__close:hover { color: var(--app-text); background: var(--app-surface-2); }
.across-toast--success { border-left-color: var(--success); }
.across-toast--success .across-toast__icon { color: var(--success); }
.across-toast--info { border-left-color: var(--info); }
.across-toast--info .across-toast__icon { color: var(--info); }
.across-toast--warning { border-left-color: var(--warning); }
.across-toast--warning .across-toast__icon { color: var(--warning); }
.across-toast--error { border-left-color: var(--error); }
.across-toast--error .across-toast__icon { color: var(--error); }

/* ============================================================
   05 · DRAG & DROP — Sortable list
   ============================================================ */
.across-sortable { display: flex; flex-direction: column; border: 1px solid var(--app-border); border-radius: var(--radius-sm); overflow: hidden; }
.across-sortable__row {
  display: grid; grid-template-columns: 24px 32px 1fr auto; align-items: center; gap: 12px;
  padding: 10px 14px; background: var(--app-surface); border-top: 1px solid var(--app-border);
  cursor: grab; transition: background var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.across-sortable__row:first-child { border-top: 0; }
.across-sortable__row:hover { background: var(--app-surface-2); }
.across-sortable__row.is-dragging { opacity: 0.4; }
.across-sortable__row.is-over { background: var(--orbit-softer); border-top-color: var(--orbit); box-shadow: inset 0 2px 0 0 var(--orbit); }
.across-sortable__handle { color: var(--app-text-subtle); display: grid; place-items: center; }
.across-sortable__num { font-size: 11px; color: var(--app-text-subtle); letter-spacing: .08em; }
.across-sortable__main { display: flex; flex-direction: column; min-width: 0; }
.across-sortable__name { font-size: 13.5px; font-weight: 500; color: var(--app-text); }
.across-sortable__sub { font-size: 11.5px; color: var(--app-text-muted); }
.across-sortable__remove { width: 24px; height: 24px; display: grid; place-items: center; background: transparent; border: 0; color: var(--app-text-subtle); cursor: pointer; border-radius: 4px; }
.across-sortable__remove:hover { color: var(--error); background: color-mix(in oklab, var(--error) 10%, transparent); }

/* ============================================================
   06 · MODALS & OVERLAYS
   ============================================================ */
/* ─── Baseline a11y utilities ────────────────────────────────────────────────
   Every Across app needs these, and until now every app had to define them itself.
   Orbit did; a freshly scaffolded app did not — and the shared router creates its screen-reader
   live region with `class="visually-hidden"`, so an announcement rendered as ordinary text on the
   page: 18px tall, full width, in the layout flow. Verified in a browser before fixing.

   The clip-rect pattern rather than display:none, because a hidden element is not announced. */

.visually-hidden,
.across-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* "Skip to content" is the first tab stop on every page: invisible until focused, then a real,
   legible control. Without this it renders as a stray link in the top-left corner. */
.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: calc(var(--z-modal, 2000) + 10);
  padding: 10px 16px;
  border-radius: var(--radius, 8px);
  background: var(--app-surface);
  color: var(--app-text);
  border: 1px solid var(--app-border);
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--fast, 120ms) var(--ease, ease);
}
.skip-link:focus,
.skip-link:focus-visible { top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .skip-link { transition: none; }
}

/* Overlays are native <dialog>. The browser puts them in the top layer, so there is no
   z-index to manage and no backdrop ELEMENT — ::backdrop is a pseudo-element.
   Selectors keep the historic class names so existing markup keeps working; the kit
   promotes those elements to <dialog> at runtime. */
.across-modal-backdrop {
  /* dialog resets: it ships with a border, padding, and a centred margin box */
  border: 0; padding: 24px; background: transparent; color: inherit;
  max-width: 100vw; max-height: 100vh; width: 100%; height: 100%;
  overflow: visible;
  display: none;                       /* dialog is hidden until [open] */
  place-items: center;
}
.across-modal-backdrop[open] { display: grid; animation: fade-in 180ms var(--ease); }
.across-modal-backdrop::backdrop {
  background: rgba(11,15,20,0.45);
  animation: fade-in 180ms var(--ease);
}

/* Scroll lock, in one rule. This replaces a JS refcount that had to be incremented and
   decremented in matched pairs across every overlay — and whose mismatch unlocked the page
   behind a still-open overlay. */
body:has(dialog[open]) { overflow: hidden; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.across-modal {
  background: var(--app-surface); border: 1px solid var(--app-border);
  border-radius: var(--radius-lg); width: 100%; max-width: 520px;
  box-shadow: var(--shadow-xl);
  animation: modal-in 240ms var(--wing-easing);
}
@keyframes modal-in { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.across-modal__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--app-border); }
.across-modal__title { margin: 0; font-size: 16px; font-weight: 600; }
.across-modal__close { width: 28px; height: 28px; display: grid; place-items: center; background: transparent; border: 0; cursor: pointer; color: var(--app-text-subtle); border-radius: 4px; }
.across-modal__close:hover { color: var(--app-text); background: var(--app-surface-2); }
.across-modal__body { padding: 20px; display: flex; flex-direction: column; gap: 12px; font-size: 13.5px; color: var(--app-text); }
.across-modal__body p { margin: 0; color: var(--app-text-muted); }
.across-modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--app-border); background: var(--app-surface-2); }

/* Tooltip */
.across-tip { position: relative; display: inline-flex; }
.across-tip__bubble {
  position: absolute; pointer-events: none; opacity: 0;
  background: #0B0F14; color: #fff; padding: 5px 9px; border-radius: 4px;
  font-size: 11.5px; white-space: nowrap; transition: opacity 120ms ease;
  z-index: var(--z-overlay, 1000);
}
.across-tip:hover .across-tip__bubble, .across-tip:focus-within .across-tip__bubble { opacity: 1; }
.across-tip--top    .across-tip__bubble { bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); }
.across-tip--bottom .across-tip__bubble { top: calc(100% + 6px); left: 50%; transform: translateX(-50%); }
.across-tip--right  .across-tip__bubble { left: calc(100% + 6px); top: 50%; transform: translateY(-50%); }
.across-tip--left   .across-tip__bubble { right: calc(100% + 6px); top: 50%; transform: translateY(-50%); }

/* Popover */
.across-pop { position: relative; display: inline-block; }
.across-pop__panel {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px;
  background: var(--app-surface); border: 1px solid var(--app-border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown, 35); animation: pop-in 180ms var(--wing-easing);
}
@keyframes pop-in { from { transform: translateY(-4px); opacity: 0; } to { transform: none; opacity: 1; } }
.across-pop__body { display: flex; flex-direction: column; gap: 8px; padding: 12px; }

/* HScroll — horizontal scroller with edge fades + caret nudges */
.across-hscroll { position: relative; display: flex; align-items: center; flex: 1 1 auto; min-width: 0; }
.across-hscroll__scroll { flex: 1 1 auto; min-width: 0; display: flex; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
.across-hscroll__scroll::-webkit-scrollbar { display: none; }
.across-hscroll__scroll[data-fade-left="1"][data-fade-right="1"] { mask-image: linear-gradient(to right, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%); }
.across-hscroll__scroll[data-fade-left="1"][data-fade-right="0"] { mask-image: linear-gradient(to right, transparent 0, #000 20px, #000 100%); }
.across-hscroll__scroll[data-fade-left="0"][data-fade-right="1"] { mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent 100%); }
.across-hscroll__edge {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; display: grid; place-items: center;
  background: var(--app-bg); border: 1px solid var(--app-border);
  border-radius: 50%; color: var(--app-text-muted); cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: opacity var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
  z-index: 1;
}
.across-hscroll__edge--left { left: -6px; }
.across-hscroll__edge--right { right: -6px; }
.across-hscroll__edge.is-on { opacity: 1; pointer-events: auto; }
.across-hscroll__edge:hover { color: var(--app-text); border-color: var(--app-text-subtle); }
.across-hscroll__edge i { font-size: 13px; }

/* ============================================================
   07 · EMPTY / LOADING / ERROR
   ============================================================ */
.across-state {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 24px 16px; text-align: center;
  border: 1px dashed var(--app-border-strong); border-radius: var(--radius-sm);
}
.across-state__icon {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--app-surface-2); border-radius: 4px 12px 12px 4px;
  color: var(--app-text-muted); font-size: 22px;
}
.across-state__title { margin: 4px 0 0; font-size: 14px; font-weight: 600; }
.across-state__desc { margin: 0; font-size: 12.5px; color: var(--app-text-muted); max-width: 36ch; }
.across-state--error .across-state__icon { color: var(--error); background: color-mix(in oklab, var(--error) 8%, transparent); }

/* Skeleton — the one allowed ambient shimmer, for loading only */
.across-skeleton {
  display: inline-block;
  background: linear-gradient(90deg, var(--app-surface-2) 0%, var(--app-border) 50%, var(--app-surface-2) 100%);
  background-size: 200% 100%; animation: skel-shine 1.4s linear infinite;
}
@keyframes skel-shine { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Spinner — for active loading only (interaction-triggered), never idle decor */
.across-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--app-border-strong); border-top-color: var(--orbit);
  animation: spin 800ms linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Progress */
.across-progress { height: 6px; background: var(--app-surface-2); border-radius: 3px; overflow: hidden; }
.across-progress__bar { height: 100%; background: var(--orbit); border-radius: 3px; transition: width var(--med) var(--ease); }
.across-progress__bar--indeterminate { width: 30%; animation: progress-indet 1.4s var(--ease) infinite; }
@keyframes progress-indet { 0% { margin-left: -30%; } 100% { margin-left: 100%; } }

/* ============================================================
   08 · BADGES & ALERTS
   ============================================================ */
.across-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px; background: var(--app-surface-2);
  border: 1px solid var(--app-border); border-radius: 3px;
  font-size: 11.5px; font-weight: 500; color: var(--app-text-muted);
}
.across-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.across-badge--success { background: color-mix(in oklab, var(--success) 10%, transparent); color: var(--success); border-color: transparent; }
.across-badge--info    { background: color-mix(in oklab, var(--info) 10%, transparent); color: var(--info); border-color: transparent; }
.across-badge--warning { background: color-mix(in oklab, var(--warning) 12%, transparent); color: var(--warning); border-color: transparent; }
.across-badge--error   { background: color-mix(in oklab, var(--error) 10%, transparent); color: var(--error); border-color: transparent; }

.across-alert {
  display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: flex-start;
  padding: 12px 14px; background: var(--app-surface);
  border: 1px solid var(--app-border); border-left-width: 3px;
  border-radius: 4px 8px 8px 4px; font-size: 13px;
}
.across-alert i { font-size: 18px; padding-top: 1px; }
.across-alert strong { font-weight: 600; }
.across-alert--info    { border-left-color: var(--info); }
.across-alert--info i  { color: var(--info); }
.across-alert--success { border-left-color: var(--success); }
.across-alert--success i { color: var(--success); }
.across-alert--warning { border-left-color: var(--warning); }
.across-alert--warning i { color: var(--warning); }
.across-alert--error   { border-left-color: var(--error); }
.across-alert--error i { color: var(--error); }

/* Empty state — centered feedback for zero-content tool pages
   Usage:
   <div class="across-empty-state">
     <across-logo class="across-empty-state__mark" product="{product}" size="32"></across-logo>
     (legacy: <div class="across-empty-state__icon"><i class="ph-light ph-{icon}"></i></div>)
     <div class="across-empty-state__title" data-empty-title></div>
     <div class="across-empty-state__msg" data-empty-msg></div>
     <button class="across-btn across-btn--sm" data-empty-action>{label}</button>
   </div>
*/
.across-empty-state {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 48px 24px 40px;
  gap: 10px;
}
.across-empty-state__icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: var(--radius-pill);
  background: color-mix(in oklab, var(--info) 10%, transparent);
  color: var(--info);
  font-size: 22px;
  margin-bottom: 6px;
}
/* Product mark, static, 32px, no plate or tint (LOGO.md → In product UI) */
.across-empty-state__mark { display: block; margin-bottom: 8px; }
.across-empty-state__title {
  font-size: 15px; font-weight: 600;
  color: var(--app-text);
}
.across-empty-state__msg {
  font-size: 13px; line-height: 1.5;
  color: var(--app-text-muted);
  max-width: 320px;
}
.across-empty-state .across-btn { margin-top: 8px; }

/* Sync-status — local/synced/syncing/error/conflict awareness pill */
.across-sync-status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--app-text-muted);
}
.across-sync-status__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--app-text-subtle); flex-shrink: 0; }
.across-sync-status[data-state="local"]   .across-sync-status__dot { background: var(--app-text-subtle); }
.across-sync-status[data-state="synced"]  { color: var(--orbit); }
.across-sync-status[data-state="synced"]  .across-sync-status__dot { background: var(--orbit); }
.across-sync-status[data-state="syncing"] .across-sync-status__dot { background: var(--info); }
.across-sync-status[data-state="error"]   .across-sync-status__dot { background: var(--accent-warm); }
.across-sync-status[data-state="conflict"] { color: var(--accent-warm); }
.across-sync-status[data-state="conflict"] .across-sync-status__dot { background: var(--accent-warm); }

/* ============================================================
   09 · TABS & NAV
   ============================================================ */
.across-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--app-border); }
.across-tabs__tab {
  padding: 8px 12px; background: transparent; border: 0;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  font: inherit; font-size: 13px; font-weight: 500;
  color: var(--app-text-muted); cursor: pointer;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.across-tabs__tab:hover { color: var(--app-text); }
.across-tabs__tab.is-active { color: var(--app-text); border-bottom-color: var(--orbit); }

.across-pill-tabs { display: inline-flex; padding: 2px; background: color-mix(in oklab, var(--app-text) 5%, transparent); border: 0; border-radius: var(--radius-sm); }
.across-pill-tabs__tab { padding: 6px 14px; background: transparent; border: 0; border-radius: 4px; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--app-text-muted); cursor: pointer; }
.across-pill-tabs__tab.is-active { background: var(--app-surface); color: var(--app-text); box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 1px 6px rgba(0,0,0,.04); }

.across-breadcrumb { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--app-text-muted); }
.across-breadcrumb a { color: inherit; cursor: pointer; }
.across-breadcrumb a:hover { color: var(--app-text); }
.across-breadcrumb__sep { color: var(--app-text-subtle); }
.across-breadcrumb__current { color: var(--app-text); font-weight: 600; }

/* ============================================================
   10 · CONTROLS — toggle, segmented, number-format
   ============================================================ */
.across-st-seg { display: inline-flex; background: color-mix(in oklab, var(--app-text) 5%, transparent); border: 0; border-radius: var(--radius-sm); padding: 2px; gap: 2px; }
.across-st-seg__btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; background: transparent; border: 0; border-radius: 4px;
  color: var(--app-text-muted); font: inherit; font-size: 12.5px; font-weight: 500;
  cursor: pointer; transition: all var(--fast) var(--ease);
}
.across-st-seg__btn i { font-size: 14px; }
.across-st-seg__btn:hover { color: var(--app-text); background: color-mix(in oklab, var(--app-text) 4%, transparent); }
.across-st-seg__btn.is-active { background: var(--app-surface); color: var(--app-text); box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 1px 6px rgba(0,0,0,.04); }
.across-st-seg__btn.is-active:hover { background: var(--app-surface); }

.across-st-toggle { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 35px; background: transparent; border: 0; cursor: pointer; padding: 0; }
.across-st-toggle__track { width: 36px; height: 20px; border-radius: 3px; background: color-mix(in oklab, var(--app-text) 18%, transparent); transition: background var(--fast) var(--ease); position: relative; }
.across-st-toggle__thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform var(--wing-duration) var(--wing-easing); }
.across-st-toggle.is-on .across-st-toggle__track { background: var(--orbit); }
.across-st-toggle.is-on .across-st-toggle__thumb { transform: translateX(16px); }
.across-st-toggle__label { font-size: 12.5px; color: var(--app-text-muted); }

.across-st-numfmt { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.across-st-numfmt__opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 10px 12px; background: var(--app-surface);
  border: 1px solid var(--app-border); border-radius: var(--radius-sm);
  cursor: pointer; text-align: left; transition: all var(--fast) var(--ease);
}
.across-st-numfmt__opt:hover { border-color: var(--app-border-strong); }
.across-st-numfmt__opt.is-active { border-color: var(--orbit); background: var(--orbit-softer); }
.across-st-numfmt__sample { font-size: 14px; color: var(--app-text); }
.across-st-numfmt__region { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--app-text-subtle); }

/* Reference chip — labeled value pill (e.g. Marathon · 42.195 km) */
.across-ref-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 8px 5px 12px; background: transparent;
  border: 1px solid var(--app-border); border-radius: 3px;
  font: inherit; cursor: pointer; white-space: nowrap;
  transition: all var(--fast) var(--ease);
}
.across-ref-chip:hover { border-color: var(--orbit); background: var(--orbit-softer); }
.across-ref-chip__name { font-size: 11.5px; color: var(--app-text-muted); }
.across-ref-chip:hover .across-ref-chip__name { color: var(--app-text); }
.across-ref-chip__value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 11px; font-weight: 600; color: var(--app-text); padding: 2px 8px; border-radius: 3px; background: var(--app-surface-2); }
.across-ref-chip:hover .across-ref-chip__value { background: var(--app-surface); color: var(--orbit); }

/* ============================================================
   PANEL — bordered container (used to group content)
   ============================================================ */
.across-panel { background: var(--app-surface); border: 1px solid var(--app-border); border-radius: var(--radius-lg); overflow: hidden; }
.across-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--app-border); }
.across-panel__title { font-size: 13px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 8px; }
.across-panel__body { padding: 18px; }

/* Numeric helper — mono tabular figures */
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Reduced motion — collapse every transition/animation to one frame. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* ===== components-forms.css ===== */
/* ===================================================================
   Across — Forms (Phase 1)
   Nine form components, built against the Phase 0 rulings:
   warm paper + hairlines, 3px structural radius / 6px pill, Red Hat
   Mono for figures, the wing-wipe as the only signature gesture,
   borders that rest unchanged on hover, budgeted motion.

   Imported by styles.css after components.css. Reuses .across-input / .across-btn /
   .across-input-msg from components.css where possible.
   =================================================================== */

/* ============================================================
   1 · NATIVE SELECT  — styled <select> with a custom chevron
   ============================================================ */
.across-select { position: relative; display: inline-flex; width: 100%; }
.across-select__field {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  width: 100%; padding: 8px 34px 8px 12px;
  background: var(--app-surface);
  border: 1px solid var(--app-border); border-radius: var(--radius-sm);
  font: inherit; font-size: 13px; color: var(--app-text); cursor: pointer;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.across-select__field:hover { border-color: var(--app-border-strong); }
.across-select__field:focus { outline: none; border-color: var(--orbit); box-shadow: 0 0 0 3px var(--orbit-softer); }
.across-select__field:disabled { opacity: .5; cursor: not-allowed; }
.across-select__field option { color: var(--app-text); background: var(--app-surface); }
.across-select__chevron {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  color: var(--app-text-subtle); pointer-events: none; font-size: 15px;
}
.across-select:focus-within .across-select__chevron { color: var(--orbit); }
.across-select--sm .across-select__field { padding: 5px 30px 5px 10px; font-size: 12px; }
.across-select.is-error .across-select__field { border-color: var(--error); }

/* ============================================================
   2 · LABEL + FIELD  — the form-field scaffold
   ============================================================ */
.across-field { display: flex; flex-direction: column; gap: 6px; }
.across-field__label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--app-text);
  transition: color var(--fast) var(--ease);
}
.across-field:focus-within .across-field__label { color: var(--orbit); }
.across-field__req  { color: var(--error); font-weight: 700; }
.across-field__opt  { font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--app-text-subtle); }
.across-field__help { font-size: 12px; color: var(--app-text-muted); line-height: 1.45; }
.across-field__error { display: none; align-items: center; gap: 5px; font-size: 12px; color: var(--error); }
.across-field.is-error .across-field__error { display: inline-flex; }
.across-field.is-error .across-field__help { display: none; }
.across-field.is-error .across-field__label { color: var(--error); }

/* Horizontal layout — label sits left of the control */
.across-field--row { flex-direction: row; align-items: baseline; gap: 16px; }
.across-field--row .across-field__label { flex: 0 0 160px; padding-top: 8px; align-self: flex-start; }
.across-field--row .across-field__control { flex: 1; min-width: 0; }

/* ============================================================
   3 · FIELDSET  — legend + grouped fields on a hairline
   ============================================================ */
.across-fieldset { border: 0; margin: 0; padding: 0; }
.across-fieldset__legend {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 0 0 10px; margin-bottom: 18px;
  border-bottom: 1px solid var(--rule);
  font-size: 13px; font-weight: 600; color: var(--app-text);
}
.across-fieldset__legend .across-eyebrow-mono { color: var(--app-text-subtle); }
.across-fieldset__hint { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--app-text-subtle); }
.across-fieldset__body { display: flex; flex-direction: column; gap: 18px; }

/* ============================================================
   4 · INPUT GROUP  — addons + joined controls share one border
   ============================================================ */
.across-input-group { display: inline-flex; width: 100%; align-items: stretch; }
.across-input-group > * { position: relative; border-radius: 0; }
.across-input-group > :first-child { border-top-left-radius: var(--radius-sm); border-bottom-left-radius: var(--radius-sm); }
.across-input-group > :last-child  { border-top-right-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); }
/* collapse the shared seam so adjacent borders read as one hairline */
.across-input-group > * + * { margin-left: -1px; }
.across-input-group .across-input:focus,
.across-input-group .across-select__field:focus,
.across-input-group .across-btn:focus-visible { z-index: 2; }
.across-input-group__addon {
  display: inline-flex; align-items: center; white-space: nowrap;
  padding: 8px 12px;
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  color: var(--app-text-muted); font-size: 13px;
}
.across-input-group__addon--mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
/* let joined buttons stretch to the input's height instead of their fixed 34px */
.across-input-group .across-btn { height: auto; border-color: var(--app-border); }

/* ============================================================
   5 · TOGGLE GROUP  — selectable segmented set (single / multi)
   ============================================================ */
.across-toggle-group {
  display: inline-flex; padding: 2px; gap: 2px;
  background: color-mix(in oklab, var(--app-text) 5%, transparent);
  border-radius: var(--radius-soft);
}
.across-toggle-group__btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px;
  background: transparent; border: 0; border-radius: 4px;
  font: inherit; font-size: 12.5px; font-weight: 500;
  color: var(--app-text-muted); cursor: pointer;
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.across-toggle-group__btn i { font-size: 15px; }
.across-toggle-group__btn:hover { color: var(--app-text); }
.across-toggle-group__btn[aria-pressed="true"],
.across-toggle-group__btn.is-on {
  background: var(--app-surface); color: var(--orbit);
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.across-toggle-group__btn:disabled { opacity: .45; cursor: not-allowed; }

/* ============================================================
   6 · FILE UPLOAD / DROPZONE
   ============================================================ */
.across-dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 30px 20px; text-align: center; cursor: pointer;
  background: var(--app-surface);
  border: 1.5px dashed var(--app-border-strong); border-radius: var(--radius-sm);
  color: var(--app-text-muted);
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.across-dropzone:hover { border-color: var(--orbit); }
.across-dropzone.is-dragover {
  border-color: var(--orbit); border-style: solid;
  background: var(--surface-hover-accent);
}
.across-dropzone__icon {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--app-surface-2); border-radius: var(--radius-sm);
  color: var(--app-text-muted); font-size: 21px;
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.across-dropzone.is-dragover .across-dropzone__icon { color: var(--orbit); background: var(--orbit-softer); }
.across-dropzone__title { font-size: 13.5px; font-weight: 600; color: var(--app-text); }
.across-dropzone__title b { color: var(--orbit); }
.across-dropzone__hint { font-size: 12px; color: var(--app-text-subtle); }

.across-file-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.across-file-item {
  display: grid; grid-template-columns: 28px 1fr auto auto; align-items: center; gap: 12px;
  padding: 9px 12px;
  background: var(--app-surface);
  border: 1px solid var(--app-border); border-radius: var(--radius-sm);
}
.across-file-item__icon { color: var(--app-text-subtle); font-size: 17px; }
.across-file-item__name { font-size: 13px; color: var(--app-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.across-file-item__size { font-family: var(--font-mono); font-size: 11.5px; color: var(--app-text-subtle); font-variant-numeric: tabular-nums; }
.across-file-item__remove {
  width: 24px; height: 24px; display: grid; place-items: center;
  background: transparent; border: 0; cursor: pointer;
  color: var(--app-text-subtle); border-radius: 4px;
}
.across-file-item__remove:hover { color: var(--error); background: color-mix(in oklab, var(--error) 10%, transparent); }

/* ============================================================
   7 · CHIP / TAG INPUT
   ============================================================ */
.across-chip-input {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  width: 100%; padding: 6px 8px; min-height: 38px;
  background: var(--app-surface);
  border: 1px solid var(--app-border); border-radius: var(--radius-sm);
  cursor: text;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.across-chip-input:focus-within { border-color: var(--orbit); box-shadow: 0 0 0 3px var(--orbit-softer); }
.across-chip-input__chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 6px 3px 10px;
  background: var(--orbit-softer); border: 1px solid var(--orbit-soft);
  border-radius: var(--radius-soft);
  font-size: 12.5px; color: var(--orbit); white-space: nowrap;
}
.across-chip-input__chip-x {
  display: grid; place-items: center; width: 16px; height: 16px;
  background: transparent; border: 0; cursor: pointer;
  color: var(--orbit); opacity: .7; border-radius: 50%; font-size: 13px;
}
.across-chip-input__chip-x:hover { opacity: 1; background: var(--orbit-soft); }
.across-chip-input__field {
  flex: 1; min-width: 90px; border: 0; outline: none; background: transparent;
  font: inherit; font-size: 13px; color: var(--app-text); padding: 3px 2px;
}
.across-chip-input__field::placeholder { color: var(--app-text-subtle); }
/* invalid token (e.g. a malformed email) — distinct, and click-to-edit */
.across-chip-input__chip--invalid {
  background: color-mix(in oklab, var(--error) 10%, transparent);
  border-color: color-mix(in oklab, var(--error) 45%, transparent);
  color: var(--error); cursor: pointer;
}
.across-chip-input__chip--invalid > i { font-size: 13px; }
.across-chip-input__chip--invalid .across-chip-input__chip-x { color: var(--error); }
.across-chip-input__chip--invalid .across-chip-input__chip-x:hover { background: color-mix(in oklab, var(--error) 18%, transparent); }
.across-chip-input.is-error { border-color: color-mix(in oklab, var(--error) 45%, transparent); }
.across-chip-input__error { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 12px; color: var(--error); }

/* ============================================================
   8 · COLOR INPUT  — curated brand swatches + value field
   ============================================================ */
.across-color-input { display: flex; flex-direction: column; gap: 10px; }
.across-color-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.across-color-swatch {
  position: relative; width: 30px; height: 30px;
  border-radius: var(--radius-sm); cursor: pointer; padding: 0;
  border: 1px solid color-mix(in oklab, var(--app-text) 14%, transparent);
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.across-color-swatch:hover { transform: translateY(-1px); }
.across-color-swatch.is-selected { box-shadow: 0 0 0 2px var(--app-surface), 0 0 0 4px var(--orbit); }
.across-color-swatch.is-selected::after {
  content: "\2713"; position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 13px; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.across-color-value {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 11px; align-self: flex-start;
  background: var(--app-surface); border: 1px solid var(--app-border);
  border-radius: var(--radius-sm);
}
.across-color-value__dot { width: 18px; height: 18px; border-radius: var(--radius-xs); border: 1px solid color-mix(in oklab, var(--app-text) 14%, transparent); }
.across-color-value__hex { font-family: var(--font-mono); font-size: 13px; color: var(--app-text); text-transform: uppercase; letter-spacing: .04em; }
/* custom-color swatch — opens the native picker (curated swatches stay the default) */
.across-color-swatch--custom { overflow: hidden; display: grid; place-items: center; color: #fff; }
.across-color-swatch--custom > i { font-size: 15px; pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.across-color-swatch--custom input[type="color"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; cursor: pointer; }

/* ============================================================
   9 · INPUT OTP  — segmented one-time-code entry
   ============================================================ */
.across-otp { display: inline-flex; align-items: center; gap: 8px; }
.across-otp__slot {
  width: 44px; height: 52px; text-align: center;
  background: var(--app-surface);
  border: 1px solid var(--app-border); border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 22px; font-weight: 600; color: var(--app-text);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.across-otp__slot:focus { outline: none; border-color: var(--orbit); box-shadow: 0 0 0 3px var(--orbit-softer); }
.across-otp__slot.is-filled { border-color: var(--app-border-strong); }
.across-otp__sep { width: 10px; height: 1px; background: var(--app-border-strong); }
.across-otp.is-error .across-otp__slot { border-color: var(--error); }

/* ============================================================
   10 · COMBOBOX — multi-select extension
   Extends the .across-combobox vocabulary in components.css §03 with a
   multi-select mode: checkbox rows, a count in the trigger, and
   select-all / clear. (Single-select searchable combobox already
   ships in components.css + the Primitives <Combobox>.)
   ============================================================ */
.across-combobox__face { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.across-combobox__val { flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.across-combobox__count {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; flex: none;
  background: var(--orbit); color: #fff; border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums;
}
/* leading checkbox marker for multi options */
.across-combobox__opt-check {
  flex: none; width: 16px; height: 16px; border-radius: var(--radius-xs);
  border: 1.5px solid var(--app-border-strong); display: grid; place-items: center;
  color: #fff; transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.across-combobox__opt-check i { font-size: 11px; opacity: 0; transition: opacity var(--fast) var(--ease); }
.across-combobox--multi .across-combobox__opt.is-selected { color: var(--app-text); background: transparent; }
.across-combobox--multi .across-combobox__opt.is-selected .across-combobox__opt-check { background: var(--orbit); border-color: var(--orbit); }
.across-combobox--multi .across-combobox__opt.is-selected .across-combobox__opt-check i { opacity: 1; }
.across-combobox--multi .across-combobox__opt.is-active,
.across-combobox--multi .across-combobox__opt:hover { background: var(--app-surface-2); }
/* footer actions */
.across-combobox__foot { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-top: 1px solid var(--app-border); }
.across-combobox__foot button { background: transparent; border: 0; font: inherit; font-size: 12px; font-weight: 500; color: var(--app-text-muted); cursor: pointer; padding: 5px 9px; border-radius: 4px; }
.across-combobox__foot button:hover { color: var(--app-text); background: var(--app-surface-2); }
.across-combobox__foot button[data-act="clear"] { margin-left: auto; }


/* ===== components-nav.css ===== */
/* ===================================================================
   Across — App chrome & navigation (Phase 2)
   Ten surfaces: Section header, Item (list row), Theme switcher,
   Pagination, Menu (dropdown + context), Menubar, Navigation menu,
   App Sidebar, Command menu (⌘K). Built against the Phase 0 rulings —
   warm paper + hairlines, 3px / 6px radius, Red Hat Mono figures,
   wing-wipe on interactive rows, budgeted motion.

   Imported by styles.css after components-forms.css. Reuses .across-btn /
   .across-badge / pop-in + modal-in keyframes from components.css.
   =================================================================== */

/* ============================================================
   1 · SECTION HEADER — title + actions row on a hairline
   ============================================================ */
.across-section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 12px; margin-bottom: 18px; border-bottom: 1px solid var(--rule); }
.across-section-header__titles { min-width: 0; }
.across-section-header__eyebrow { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--app-text-subtle); font-weight: 600; }
.across-section-header__title { font-size: 18px; font-weight: 600; margin: 4px 0 0; }
.across-section-header__desc { font-size: 13px; color: var(--app-text-muted); margin: 4px 0 0; line-height: 1.45; }
.across-section-header__actions { display: flex; gap: 8px; flex: none; }

/* ============================================================
   2 · ITEM — canonical interactive list row
   ============================================================ */
.across-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; background: transparent; border: 0; border-radius: var(--radius-sm); cursor: pointer; text-align: left; font: inherit; color: var(--app-text); position: relative; transition: background var(--fast) var(--ease); }
.across-item::after { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; background: var(--orbit); border-radius: 1px; transform: scaleY(0); transform-origin: center; transition: transform var(--wing-duration) var(--wing-easing); }
.across-item:hover { background: var(--surface-hover-accent); }
.across-item:hover::after, .across-item.is-active::after { transform: scaleY(1); }
.across-item.is-active { background: var(--surface-hover-accent); }
.across-item__lead { display: grid; place-items: center; width: 30px; height: 30px; color: var(--app-text-muted); font-size: 18px; }
.across-item__lead--avatar { background: var(--orbit); color: #fff; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; }
.across-item__main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.across-item__label { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.across-item__sub { font-size: 12px; color: var(--app-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.across-item__trail { display: flex; align-items: center; gap: 10px; color: var(--app-text-subtle); font-size: 12px; }
.across-item__meta { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ============================================================
   3 · THEME SWITCHER — light / dark / system
   ============================================================ */
.across-theme-switch { display: inline-flex; padding: 2px; gap: 2px; background: color-mix(in oklab, var(--app-text) 5%, transparent); border-radius: var(--radius-soft); }
.across-theme-switch__btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: transparent; border: 0; border-radius: 4px; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--app-text-muted); cursor: pointer; transition: color var(--fast) var(--ease), background var(--fast) var(--ease); }
.across-theme-switch__btn i { font-size: 15px; }
.across-theme-switch__btn:hover { color: var(--app-text); }
.across-theme-switch__btn.is-on { background: var(--app-surface); color: var(--orbit); box-shadow: 0 1px 2px rgba(0,0,0,.05); }

/* ============================================================
   4 · PAGINATION
   ============================================================ */
.across-pagination { display: inline-flex; align-items: center; gap: 4px; }
.across-pagination__btn { min-width: 32px; height: 32px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm); font: inherit; font-size: 13px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--app-text-muted); cursor: pointer; transition: background var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.across-pagination__btn:hover:not(:disabled) { background: var(--app-surface-2); color: var(--app-text); }
.across-pagination__btn.is-active { background: var(--orbit); color: #fff; border-color: var(--orbit); }
.across-pagination__btn:disabled { opacity: .4; cursor: not-allowed; }
.across-pagination__ellipsis { padding: 0 4px; color: var(--app-text-subtle); }

/* ============================================================
   5 · MENU — dropdown + context (shared surface)
   ============================================================ */
.across-menu { min-width: 210px; padding: 5px; background: var(--app-surface); border: 1px solid var(--app-border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.across-menu__label { padding: 6px 10px 4px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--app-text-subtle); }
.across-menu__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; background: transparent; border: 0; border-radius: 4px; font: inherit; font-size: 13px; color: var(--app-text); cursor: pointer; text-align: left; transition: background var(--fast) var(--ease); }
.across-menu__item:hover, .across-menu__item.is-active { background: var(--app-surface-2); }
.across-menu__item > i { font-size: 16px; color: var(--app-text-muted); }
.across-menu__item--danger { color: var(--error); }
.across-menu__item--danger > i { color: var(--error); }
.across-menu__item--danger:hover { background: color-mix(in oklab, var(--error) 10%, transparent); }
.across-menu__item:disabled { opacity: .45; cursor: not-allowed; }
.across-menu__shortcut { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--app-text-subtle); letter-spacing: .04em; }
.across-menu__check { margin-left: auto; color: var(--orbit); }
.across-menu__sep { height: 1px; background: var(--app-border); margin: 5px 0; }

.across-dropdown { position: relative; display: inline-block; }
.across-dropdown > .across-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: var(--z-dropdown, 35); animation: pop-in 160ms var(--wing-easing); }
.across-dropdown--right > .across-menu { left: auto; right: 0; }
.across-context-menu { position: fixed; z-index: var(--z-dropdown, 40); animation: pop-in 120ms var(--wing-easing); }
.across-context-surface { display: grid; place-items: center; padding: 32px; border: 1px dashed var(--app-border-strong); border-radius: var(--radius-sm); color: var(--app-text-subtle); font-size: 13px; user-select: none; }

/* ============================================================
   6 · MENUBAR — app-style horizontal menu row
   ============================================================ */
.across-menubar { display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: var(--app-surface); border: 1px solid var(--app-border); border-radius: var(--radius-sm); }
.across-menubar__item { padding: 5px 11px; background: transparent; border: 0; border-radius: 4px; font: inherit; font-size: 13px; color: var(--app-text); cursor: pointer; transition: background var(--fast) var(--ease); }
.across-menubar__item:hover, .across-menubar__item.is-open { background: var(--app-surface-2); }

/* ============================================================
   7 · NAVIGATION MENU — header mega-menu
   ============================================================ */
.across-nav-menu { display: inline-flex; align-items: center; gap: 2px; }
.across-nav-menu__entry { position: relative; }
.across-nav-menu__trigger { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; background: transparent; border: 0; border-radius: var(--radius-sm); font: inherit; font-size: 13.5px; font-weight: 500; color: var(--app-text-muted); cursor: pointer; transition: color var(--fast) var(--ease); }
.across-nav-menu__trigger:hover, .across-nav-menu__entry.is-open .across-nav-menu__trigger { color: var(--app-text); }
.across-nav-menu__trigger > i { font-size: 14px; transition: transform var(--fast) var(--ease); }
.across-nav-menu__entry.is-open .across-nav-menu__trigger > i { transform: rotate(180deg); }
.across-nav-menu__panel { position: absolute; top: calc(100% + 8px); left: 0; min-width: 420px; padding: 10px; background: var(--app-surface); border: 1px solid var(--app-border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); z-index: var(--z-dropdown, 35); animation: pop-in 160ms var(--wing-easing); display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.across-nav-menu__link { display: flex; gap: 11px; padding: 11px; border-radius: 4px; cursor: pointer; transition: background var(--fast) var(--ease); }
.across-nav-menu__link:hover { background: var(--app-surface-2); }
.across-nav-menu__link > i { font-size: 19px; color: var(--orbit); margin-top: 1px; }
.across-nav-menu__link-t { font-size: 13px; font-weight: 600; }
.across-nav-menu__link-d { font-size: 12px; color: var(--app-text-muted); line-height: 1.4; margin-top: 2px; }

/* ============================================================
   8 · APP SIDEBAR — the product shell backbone (flagship)
   ============================================================ */
.across-sidebar { display: flex; flex-direction: column; width: 252px; background: var(--app-bg); border-right: 1px solid var(--rule); transition: width var(--med, 200ms) var(--ease); }
.across-sidebar__head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; }
.across-sidebar__brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; }
/* v3: the brand slot takes the logo, never typed text.
   __brand-name holds the product lockup (<across-logo lockup="horizontal" size="24">);
   __brand-mark holds the symbol and shows only on the collapsed rail (24px fill). */
.across-sidebar__brand-mark { flex: none; width: 24px; height: 24px; display: none; place-items: center; }
.across-sidebar.is-collapsed .across-sidebar__brand-mark { display: grid; }
.across-sidebar__brand-name { display: inline-flex; align-items: center; min-width: 0; }
.across-sidebar__collapse { margin-left: auto; flex: none; width: 28px; height: 28px; display: grid; place-items: center; background: transparent; border: 0; border-radius: 4px; color: var(--app-text-subtle); cursor: pointer; transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
.across-sidebar__collapse:hover { background: var(--app-surface-2); color: var(--app-text); }
.across-sidebar__body { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 8px; display: flex; flex-direction: column; gap: 14px; }
.across-sidebar__group { display: flex; flex-direction: column; gap: 2px; }
.across-sidebar__group-label { padding: 4px 10px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--app-text-subtle); white-space: nowrap; }
.across-sidebar__item { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 11px; padding: 8px 10px; background: transparent; border: 0; border-radius: var(--radius-sm); font: inherit; font-size: 13.5px; font-weight: 500; color: var(--app-text-muted); cursor: pointer; text-align: left; position: relative; white-space: nowrap; transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
.across-sidebar__item > i { font-size: 18px; justify-self: center; }
.across-sidebar__item:hover { background: var(--surface-hover-accent); color: var(--app-text); }
.across-sidebar__item.is-active { color: var(--orbit); background: var(--surface-hover-accent); }
.across-sidebar__item.is-active::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 2.5px; border-radius: 2px; background: var(--orbit); }
.across-sidebar__label { overflow: hidden; text-overflow: ellipsis; }
.across-sidebar__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--app-text-subtle); }
.across-sidebar__dot--live { background: var(--success, #16A34A); }
.across-sidebar__badge { font-family: var(--font-mono); font-size: 10px; font-variant-numeric: tabular-nums; background: var(--app-surface-2); color: var(--app-text-muted); border-radius: var(--radius-pill); padding: 1px 7px; }
.across-sidebar__item.is-active .across-sidebar__badge { background: var(--orbit); color: #fff; }
.across-sidebar__foot { border-top: 1px solid var(--rule); padding: 8px; }
.across-sidebar__profile { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 6px; background: transparent; border: 0; border-radius: var(--radius-sm); cursor: pointer; text-align: left; font: inherit; transition: background var(--fast) var(--ease); }
.across-sidebar__profile:hover { background: var(--app-surface-2); }
.across-sidebar__avatar { flex: none; width: 30px; height: 30px; border-radius: var(--radius-pill); background: var(--orbit); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.across-sidebar__profile-main { min-width: 0; text-align: left; }
.across-sidebar__profile-name, .across-sidebar__profile-sub { display: block; }
.across-sidebar__profile-name { font-size: 13px; font-weight: 600; color: var(--app-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.across-sidebar__profile-sub { font-size: 11.5px; color: var(--app-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.across-sidebar__profile > i { color: var(--app-text-subtle); }

/* collapsed rail */
.across-sidebar.is-collapsed { width: 60px; }
.across-sidebar.is-collapsed .across-sidebar__brand-name,
.across-sidebar.is-collapsed .across-sidebar__group-label,
.across-sidebar.is-collapsed .across-sidebar__label,
.across-sidebar.is-collapsed .across-sidebar__badge,
.across-sidebar.is-collapsed .across-sidebar__dot,
.across-sidebar.is-collapsed .across-sidebar__profile-main,
.across-sidebar.is-collapsed .across-sidebar__profile > i { display: none; }
.across-sidebar.is-collapsed .across-sidebar__item { grid-template-columns: 1fr; }
.across-sidebar.is-collapsed .across-sidebar__profile { grid-template-columns: 1fr; justify-items: center; }
.across-sidebar.is-collapsed .across-sidebar__head { justify-content: center; }

/* ============================================================
   9 · COMMAND MENU — ⌘K spotlight (flagship)
   ============================================================ */
.across-command-menu-backdrop { position: fixed; inset: 0; background: rgba(17,24,39,.42); backdrop-filter: blur(2px); z-index: var(--z-modal, 2000); display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; }
.across-command-menu { width: 100%; max-width: 560px; background: var(--app-surface); border: 1px solid var(--app-border); border-radius: var(--radius-sm); box-shadow: var(--shadow-xl, 0 24px 60px -20px rgba(0,0,0,.4)); overflow: hidden; animation: modal-in 200ms var(--wing-easing); }
.across-command-menu__search { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--app-border); }
.across-command-menu__search > i { font-size: 18px; color: var(--app-text-subtle); }
.across-command-menu__search input { flex: 1; background: transparent; border: 0; outline: none; font: inherit; font-size: 15px; color: var(--app-text); }
.across-command-menu__search input::placeholder { color: var(--app-text-subtle); }
.across-command-menu__list { max-height: 340px; overflow-y: auto; padding: 8px; }
.across-command-menu__group-label { padding: 8px 10px 4px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--app-text-subtle); }
.across-command-menu__item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; background: transparent; border: 0; border-radius: 4px; font: inherit; font-size: 13.5px; color: var(--app-text); cursor: pointer; text-align: left; }
.across-command-menu__item > i { font-size: 18px; color: var(--app-text-muted); flex: none; }
.across-command-menu__item.is-active { background: var(--surface-hover-accent); }
.across-command-menu__item.is-active > i { color: var(--orbit); }
.across-command-menu__item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.across-command-menu__item-sub { color: var(--app-text-subtle); font-size: 12px; }
.across-command-menu__shortcut { display: flex; gap: 4px; margin-left: auto; }
.across-command-menu__empty { padding: 44px 20px; text-align: center; color: var(--app-text-subtle); font-size: 13px; }
.across-command-menu__empty i { font-size: 26px; display: block; margin-bottom: 8px; }
.across-command-menu__foot { display: flex; align-items: center; gap: 18px; padding: 9px 16px; border-top: 1px solid var(--app-border); font-family: var(--font-mono); font-size: 11px; color: var(--app-text-subtle); }
.across-command-menu__foot span { display: inline-flex; align-items: center; gap: 6px; }

/* keyboard hint — shared kbd token */
.across-kbd { font-family: var(--font-mono); font-size: 10px; line-height: 1.6; color: var(--app-text-muted); background: var(--app-surface-2); border: 1px solid var(--app-border); border-radius: 3px; padding: 1px 5px; min-width: 16px; text-align: center; display: inline-block; }


/* ===== components-overlays.css ===== */
/* ===================================================================
   Across — Overlays & feedback (Phase 3)
   Eight transient surfaces that sit on top of the shell:
   Drawer / Sheet, Alert dialog, Banner, Hover card, Sonner (stacked
   toasts), Notification badge, Status indicator, Scroll-to-top.

   Built against the Phase 0 rulings — warm paper + hairlines, 3px /
   6px radius, Red Hat Mono figures, wing-wipe where a surface is a
   row, and the motion budget: the ONLY idle motion here is the
   sync-status pulse (sanctioned) and toast enter/exit. Everything
   else is interaction-only.

   Imported by styles.css after components-nav.css. Reuses .across-btn /
   .across-badge / .across-toast and the fade-in / modal-in / pop-in keyframes from
   components.css; adds drawer-slide, banner and hovercard keyframes.
   =================================================================== */

/* ============================================================
   1 · DRAWER / SHEET — edge-anchored panel + backdrop
   ============================================================ */
.across-drawer {
  border: 0; padding: 0; background: transparent; color: inherit;
  max-width: 100vw; max-height: 100vh; width: 100%; height: 100%;
  overflow: visible;
  display: none;
}
.across-drawer[open] { display: block; }
.across-drawer::backdrop { background: rgba(11,15,20,.45); animation: fade-in var(--med) var(--ease); }

/* Kept only so markup that still carries a backdrop div does not paint a second scrim over
   ::backdrop. New markup omits the element entirely. */
.across-drawer__backdrop { display: none; }

.across-drawer__panel {
  position: absolute; display: flex; flex-direction: column;
  background: var(--app-surface); box-shadow: var(--shadow-xl);
  /* decelerate, no overshoot — a calm, intentional slide rather than a bounce */
  transition: transform var(--slow) var(--ease-out);
}
/* edge anchoring — direction matches purpose (drawers from their edge) */
.across-drawer__panel { top: 0; bottom: 0; right: 0; width: min(420px, 92vw); border-left: 1px solid var(--rule); transform: translateX(100%); }
.across-drawer--left  .across-drawer__panel { right: auto; left: 0; border-left: 0; border-right: 1px solid var(--rule); transform: translateX(-100%); }
.across-drawer--bottom .across-drawer__panel { top: auto; left: 0; right: 0; width: auto; max-height: 82vh; border-left: 0; border-top: 1px solid var(--rule); border-radius: var(--radius) var(--radius) 0 0; transform: translateY(100%); }
.across-drawer.is-open .across-drawer__panel { transform: none; }

.across-drawer__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--rule); }
.across-drawer__titles { min-width: 0; }
.across-drawer__eyebrow { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--app-text-subtle); font-weight: 600; }
.across-drawer__title { margin: 4px 0 0; font-size: 17px; font-weight: 600; }
.across-drawer__desc { margin: 5px 0 0; font-size: 13px; color: var(--app-text-muted); line-height: 1.5; }
.across-drawer__close { flex: none; width: 30px; height: 30px; display: grid; place-items: center; background: transparent; border: 0; border-radius: 4px; color: var(--app-text-subtle); cursor: pointer; font-size: 18px; transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
.across-drawer__close:hover { background: var(--app-surface-2); color: var(--app-text); }
.across-drawer__body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; font-size: 13.5px; color: var(--app-text); }
.across-drawer__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--rule); background: var(--app-surface-2); }
.across-drawer--bottom .across-drawer__foot { background: var(--app-surface); }
/* grab handle on the bottom sheet */
.across-drawer__grab { width: 38px; height: 4px; border-radius: var(--radius-pill); background: var(--app-border-strong); margin: 8px auto 0; }
/* mobile — side drawers go full-width; the bottom sheet keeps a safe-area inset */
@media (max-width: 480px) {
  .across-drawer__panel { width: 100%; }
  .across-drawer--bottom .across-drawer__panel { width: auto; padding-bottom: env(safe-area-inset-bottom, 0); }
  .across-drawer__head { padding: 16px; }
  .across-drawer__body { padding: 16px; }
  .across-drawer__foot { padding: 12px 16px; }
  .across-modal-backdrop,
  .across-alert-dialog-backdrop {
    padding: 16px;
  }
  .across-modal__foot,
  .across-alert-dialog__foot {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 8px;
    padding: 12px 16px;
  }
  .across-modal__foot .across-btn,
  .across-alert-dialog__foot .across-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
   2 · ALERT DIALOG — confirm / destructive (vs. generic Modal)
   ============================================================ */
.across-alert-dialog-backdrop { position: fixed; inset: 0; z-index: var(--z-modal, 2000); display: grid; place-items: center; padding: 24px; background: rgba(11,15,20,.45); animation: fade-in 180ms var(--ease); }
.across-alert-dialog {
  width: 100%; max-width: 420px; background: var(--app-surface);
  border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--shadow-xl); overflow: hidden;
  animation: modal-in 200ms var(--wing-easing);
}
.across-alert-dialog__body { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 22px 22px 18px; }
.across-alert-dialog__icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius-pill); font-size: 20px; background: var(--orbit-softer); color: var(--orbit); }
.across-alert-dialog__title { margin: 2px 0 0; font-size: 16px; font-weight: 600; }
.across-alert-dialog__desc { margin: 7px 0 0; font-size: 13.5px; color: var(--app-text-muted); line-height: 1.55; }
.across-alert-dialog__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--rule); background: var(--app-surface-2); }
/* destructive cast */
.across-alert-dialog--danger .across-alert-dialog__icon { background: color-mix(in oklab, var(--error) 12%, transparent); color: var(--error); }

/* ============================================================
   3 · BANNER — full-width dismissible notice (vs. inline Alert)
   ============================================================ */
.across-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; background: var(--app-surface);
  border: 1px solid var(--rule); border-radius: var(--radius);
  color: var(--app-text); font-size: 13.5px;
  position: relative; overflow: hidden;
}
/* leading accent rail — colour carries the semantic */
.across-banner::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--orbit); }
.across-banner__icon { flex: none; font-size: 18px; color: var(--orbit); display: grid; place-items: center; }
.across-banner__body { flex: 1; min-width: 0; line-height: 1.45; }
.across-banner__body strong { font-weight: 600; }
.across-banner__body span { color: var(--app-text-muted); }
.across-banner__actions { flex: none; display: flex; align-items: center; gap: 8px; }
.across-banner__close { flex: none; width: 26px; height: 26px; display: grid; place-items: center; background: transparent; border: 0; border-radius: 4px; color: var(--app-text-subtle); cursor: pointer; font-size: 16px; transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
.across-banner__close:hover { background: var(--app-surface-2); color: var(--app-text); }
.across-banner.is-leaving { animation: banner-out 160ms var(--ease-in) forwards; }
@keyframes banner-out { to { opacity: 0; transform: translateY(-6px); } }
/* variants — only the rail + icon recolour; ground stays paper */
.across-banner--info::before    { background: var(--info); }    .across-banner--info .across-banner__icon    { color: var(--info); }
.across-banner--success::before { background: var(--success); } .across-banner--success .across-banner__icon { color: var(--success); }
.across-banner--warning::before { background: var(--warning); } .across-banner--warning .across-banner__icon { color: var(--warning); }
.across-banner--error::before   { background: var(--error); }   .across-banner--error .across-banner__icon   { color: var(--error); }
/* filled accent variant — for the one top-of-app announcement */
.across-banner--accent { background: var(--orbit); border-color: var(--orbit); color: #fff; }
.across-banner--accent::before { display: none; }
.across-banner--accent .across-banner__icon { color: #fff; }
.across-banner--accent .across-banner__body span { color: color-mix(in oklab, #fff 80%, transparent); }
.across-banner--accent .across-banner__close { color: color-mix(in oklab, #fff 75%, transparent); }
.across-banner--accent .across-banner__close:hover { background: rgba(255,255,255,.15); color: #fff; }

/* ============================================================
   4 · HOVER CARD — rich preview on hover-intent
   The 400ms intent delay lives in JS (matches tooltip timing);
   the panel itself just fades + lifts on mount.
   ============================================================ */
.across-hover-card { position: relative; display: inline-block; }
.across-hover-card__trigger { color: var(--orbit); font-weight: 600; cursor: pointer; text-decoration: none; border-bottom: 1px dotted color-mix(in oklab, var(--orbit) 50%, transparent); }
.across-hover-card__panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: var(--z-dropdown, 35);
  width: 300px; padding: 16px; background: var(--app-surface);
  border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--shadow-2); animation: pop-in 120ms var(--ease-out);
}
.across-hover-card__top { display: flex; align-items: center; gap: 12px; }
.across-hover-card__avatar { flex: none; width: 44px; height: 44px; border-radius: var(--radius-pill); background: var(--orbit); color: #fff; display: grid; place-items: center; font-size: 16px; font-weight: 600; }
.across-hover-card__name { font-size: 14px; font-weight: 600; }
.across-hover-card__handle { font-family: var(--font-mono); font-size: 12px; color: var(--app-text-subtle); }
.across-hover-card__bio { margin: 12px 0 0; font-size: 13px; color: var(--app-text-muted); line-height: 1.5; }
.across-hover-card__stats { display: flex; gap: 18px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--rule-soft); }
.across-hover-card__stat b { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; }
.across-hover-card__stat span { font-size: 11.5px; color: var(--app-text-subtle); margin-left: 5px; }

/* ============================================================
   5 · SONNER — stacked, collapsing toasts (evolution of .across-toast)
   Bottom-right. Positions are JS-driven (one absolute-stacked layout
   pass on every push / dismiss / hover) so variable-height toasts
   never overlap or bleed text. Collapsed: the newest is full; the two
   behind peek as scaled cards with their content hidden. Hover fans
   them into a real list. Enter / exit is sanctioned motion.
   ============================================================ */
.across-sonner { position: fixed; right: 20px; bottom: 20px; z-index: var(--z-toast, 9999); width: 360px; max-width: calc(100vw - 40px); }
.across-sonner__toast {
  position: absolute; left: 0; right: 0; bottom: 0; box-sizing: border-box;
  display: grid; grid-template-columns: 20px 1fr auto; gap: 11px; align-items: flex-start;
  padding: 13px 14px;
  background: var(--app-surface); border: 1px solid var(--rule);
  border-radius: var(--radius); box-shadow: var(--shadow-2);
  transform-origin: center bottom; opacity: 0;     /* layout() sets transform + opacity */
  transition: transform var(--med) var(--ease-out), opacity var(--med) var(--ease);
}
/* collapsed: the cards behind the newest hide their content → a clean
   peeking deck instead of overlapping, bleeding text */
.across-sonner:not(.is-expanded) .across-sonner__toast:not(:first-child) > * { opacity: 0; }
.across-sonner__toast > * { transition: opacity var(--fast) var(--ease); }
.across-sonner__icon { display: grid; place-items: center; font-size: 18px; line-height: 1; padding-top: 1px; color: var(--app-text-muted); }
.across-sonner__body { min-width: 0; }
.across-sonner__title { font-size: 13.5px; font-weight: 600; color: var(--app-text); }
.across-sonner__desc { font-size: 12.5px; color: var(--app-text-muted); margin-top: 2px; line-height: 1.45; }
.across-sonner__time { font-family: var(--font-mono); font-size: 10.5px; color: var(--app-text-subtle); margin-top: 4px; }
.across-sonner__close { width: 22px; height: 22px; display: grid; place-items: center; background: transparent; border: 0; border-radius: 4px; cursor: pointer; color: var(--app-text-subtle); font-size: 14px; opacity: 0; transition: opacity var(--fast) var(--ease), background var(--fast) var(--ease), color var(--fast) var(--ease); }
.across-sonner__toast:first-child .across-sonner__close, .across-sonner.is-expanded .across-sonner__close { opacity: 1; }
.across-sonner__close:hover { background: var(--app-surface-2); color: var(--app-text); }
.across-sonner__toast--success .across-sonner__icon { color: var(--success); }
.across-sonner__toast--info    .across-sonner__icon { color: var(--info); }
.across-sonner__toast--warning .across-sonner__icon { color: var(--warning); }
.across-sonner__toast--error   .across-sonner__icon { color: var(--error); }

/* ============================================================
   6 · NOTIFICATION BADGE — count / dot anchored to a trigger
   ============================================================ */
.across-notif { position: relative; display: inline-flex; }
.across-notif__badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 10px; font-weight: 600; line-height: 1;
  color: #fff; background: var(--error);
  border: 2px solid var(--app-surface); border-radius: var(--radius-pill);
}
.across-notif__badge--accent { background: var(--orbit); }
.across-notif__badge--dot { min-width: 0; width: 10px; height: 10px; padding: 0; top: -2px; right: -2px; }
.across-notif__badge--mono { background: var(--app-surface-2); color: var(--app-text-muted); border-color: var(--app-surface); }
/* trigger chrome so the demo button reads as a real icon button */
.across-notif__trigger { width: 38px; height: 38px; display: grid; place-items: center; background: var(--app-surface); border: 1px solid var(--rule); border-radius: var(--radius); color: var(--app-text-muted); cursor: pointer; font-size: 19px; transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
.across-notif__trigger:hover { background: var(--app-surface-2); color: var(--app-text); }

/* ============================================================
   7 · STATUS INDICATOR — presence dot + label
   online / idle / busy / offline are STATIC (Phase 0 §07).
   --syncing is the one sanctioned exception: it pulses while a real
   background process runs, then settles to a static dot + mono time.
   ============================================================ */
.across-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--app-text-muted); }
.across-status__dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--app-text-subtle); position: relative; }
.across-status--online  .across-status__dot { background: var(--success); }
.across-status--idle    .across-status__dot { background: var(--warning); }
.across-status--busy    .across-status__dot { background: var(--error); }
.across-status--offline .across-status__dot { background: var(--app-text-subtle); }
.across-status--offline { color: var(--app-text-subtle); }
/* ring variant — a hairline halo for the "current user" dot */
.across-status--ring .across-status__dot { box-shadow: 0 0 0 3px color-mix(in oklab, var(--success) 22%, transparent); }
.across-status__time { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 11.5px; color: var(--app-text-subtle); }
/* syncing — sanctioned ambient pulse (only while actually syncing) */
.across-status--syncing .across-status__dot { background: var(--orbit); }
.across-status--syncing .across-status__dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--orbit); animation: status-pulse 1.6s var(--ease) infinite; }
@keyframes status-pulse { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(2.6); opacity: 0; } }

/* ============================================================
   8 · SCROLL-TO-TOP — floating return-to-top affordance
   Hidden until the user scrolls; appears on interaction only.
   ============================================================ */
.across-scroll-top {
  position: absolute; right: 16px; bottom: 16px; z-index: var(--z-elevated, 10);
  width: 42px; height: 42px; display: grid; place-items: center;
  background: var(--app-surface); border: 1px solid var(--rule);
  border-radius: var(--radius-pill); box-shadow: var(--shadow-2);
  color: var(--app-text-muted); cursor: pointer; font-size: 20px;
  opacity: 0; transform: translateY(8px) scale(.92); pointer-events: none;
  transition: opacity var(--med) var(--ease-out), transform var(--med) var(--wing-easing), color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.across-scroll-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.across-scroll-top:hover { background: var(--app-surface-2); color: var(--app-text); }

/* ============================================================
   9 · INSTALL — the "add this app" nudge and its step-by-step guide
   Rendered by the Across runtime (pwa/install-experience.js).
   The nudge is NOT modal: it never takes focus and sits below the
   app's own menus. The guide is a native <dialog> on the kit modal;
   on phones it settles at the bottom, next to the browser bar its
   steps point at. Glyphs draw the browser's real buttons inline, so
   "Share" can never be mistaken for an app's own share control.
   ============================================================ */
.across-install-nudge {
  position: fixed; z-index: var(--z-overlay, 1000);
  right: var(--space-5); bottom: calc(var(--space-5) + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box; width: 380px; max-width: calc(100vw - 2 * var(--space-4));
  display: grid; grid-template-columns: 40px 1fr auto; column-gap: var(--space-3); row-gap: var(--space-3);
  padding: var(--space-4);
  background: var(--app-surface); color: var(--app-text);
  border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-xl);
  opacity: 0; transform: translateY(8px);
  transition: opacity var(--med) var(--ease-out), transform var(--med) var(--ease-out);
}
.across-install-nudge.is-shown { opacity: 1; transform: none; }
/* the app's own icon — the exact tile that lands on the Home Screen or Dock */
.across-install-nudge__icon { grid-row: 1 / span 2; width: 40px; height: 40px; border-radius: 22%; display: block; object-fit: cover; }
/* DOM order is the reading and Tab order (text, action, close); the grid puts close top right */
.across-install-nudge__text { grid-column: 2; grid-row: 1; min-width: 0; }
.across-install-nudge__title { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.35; }
.across-install-nudge__body { margin: var(--space-1) 0 0; font-size: 13px; line-height: 1.45; color: var(--app-text-muted); }
.across-install-nudge__actions { grid-column: 2 / span 2; grid-row: 2; display: flex; gap: var(--space-2); }
.across-install-nudge__close { grid-column: 3; grid-row: 1; align-self: start; margin: calc(-1 * var(--space-2)) calc(-1 * var(--space-2)) 0 0; }
.across-install-nudge__close svg, .across-install-guide .across-modal__close svg { width: 16px; height: 16px; display: block; }
@media (max-width: 600px) {
  .across-install-nudge { left: var(--space-4); right: var(--space-4); width: auto; max-width: none; bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px)); }
}

/* the guide: a kit modal, bottom-anchored on phones */
.across-install-guide .across-modal { max-width: 440px; }
.across-install-guide .across-modal__body { gap: var(--space-4); }
@media (max-width: 600px) {
  .across-install-guide.across-modal-backdrop { padding: 0; place-items: end stretch; }
  .across-install-guide .across-modal {
    max-width: none; border-bottom: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}
.across-install-lead { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--app-text-muted); }
.across-install-steps { list-style: none; margin: 0; padding: 0; counter-reset: across-install-step; display: grid; gap: var(--space-3); }
.across-install-steps > li {
  counter-increment: across-install-step;
  display: grid; grid-template-columns: 24px 1fr; column-gap: var(--space-3); align-items: start;
  font-size: 14px; line-height: 1.75; color: var(--app-text);
}
.across-install-steps > li::before {
  content: counter(across-install-step);
  width: 24px; height: 24px; margin-top: 1px; box-sizing: border-box; display: grid; place-items: center;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 11.5px; font-weight: 600; line-height: 1;
  color: var(--app-text-muted); border: 1px solid var(--app-border-strong); border-radius: var(--radius-pill);
}
/* a browser button, drawn inline at text size */
.across-install-glyph {
  display: inline-grid; place-items: center; width: 26px; height: 22px; margin: 0 2px; vertical-align: -5px; box-sizing: border-box;
  color: var(--app-text); background: var(--app-surface-2);
  border: 1px solid var(--app-border); border-radius: var(--radius-soft);
}
.across-install-glyph svg { width: 16px; height: 16px; display: block; }
/* Steps as rows (3.0.4): number, the browser button as a tile, one short instruction and an
   optional hint. Replaces glyphs wedged mid-sentence, which wrapped awkwardly on phones. */
.across-install-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.across-install-list__item { display: grid; grid-template-columns: 12px 36px 1fr; column-gap: var(--space-3); align-items: start; }
.across-install-list__num {
  align-self: center; font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 12px; font-weight: 600; line-height: 1; color: var(--app-text-subtle); text-align: right;
}
.across-install-list__icon {
  width: 36px; height: 36px; box-sizing: border-box; display: grid; place-items: center;
  color: var(--app-text); background: var(--app-surface-2);
  border: 1px solid var(--app-border); border-radius: var(--radius-soft);
}
.across-install-list__icon svg { width: 20px; height: 20px; display: block; }
.across-install-list__text { min-height: 36px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.across-install-list__title { font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--app-text); }
.across-install-list__hint { margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--app-text-muted); }
/* a single-line row centres its number on the tile; a row with a hint keeps it on the title line */
.across-install-list__item:has(.across-install-list__hint) .across-install-list__num { align-self: start; margin-top: 12px; }
.across-install-tip {
  margin: 0; padding-top: var(--space-3); border-top: 1px solid var(--rule);
  font-size: 13px; line-height: 1.7; color: var(--app-text-muted);
}

/* ------------------------------------------------------------
   Share window — the runtime's ui/share-dialog.js builds it.
   A kit modal that says what it shares: title + summary, the link
   with Copy, then quick ways to send it. Bottom-anchored on phones,
   like the install guide.
   ------------------------------------------------------------ */
.across-share .across-modal { max-width: 440px; }
.across-share .across-modal__head { align-items: flex-start; gap: var(--space-3); }
.across-share .across-modal__close { flex: none; margin: calc(-1 * var(--space-1)) calc(-1 * var(--space-1)) 0 0; }
.across-share .across-modal__close svg { width: 16px; height: 16px; display: block; }
.across-share .across-modal__body { gap: var(--space-4); }
.across-share__titles { display: grid; gap: var(--space-1); min-width: 0; }
.across-share__summary { margin: 0; font-size: 13px; line-height: 1.45; color: var(--app-text-subtle); overflow-wrap: anywhere; }
/* figures inside the summary (an amount, a value) are data: mono, tabular */
.across-share__num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.across-share__link { display: flex; gap: var(--space-2); }
.across-share__url { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 13px; color: var(--app-text-muted); text-overflow: ellipsis; }
.across-share__copy { flex: none; justify-content: center; }
.across-share__copy svg { width: 16px; height: 16px; display: block; }
.across-share__copy .across-share__done { display: none; }
.across-share__copy.is-copied .across-share__done { display: block; }
.across-share__copy.is-copied .across-share__link-icon { display: none; }
.across-share__hint { margin: calc(-1 * var(--space-2)) 0 0; font-size: 13px; line-height: 1.45; color: var(--app-text-muted); }
.across-share__send { display: grid; gap: var(--space-2); }
.across-share__label { margin: 0; }
.across-share__targets { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: var(--space-1); }
.across-share__target {
  display: grid; justify-items: center; gap: var(--space-2); width: 100%;
  padding: var(--space-2) 0; border: 0; border-radius: var(--radius-sm);
  background: none; color: var(--app-text-muted); font: inherit; font-size: 13px; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.across-share__target:hover { color: var(--app-text); background: var(--app-surface-2); }
.across-share__target:focus-visible { outline: 2px solid var(--orbit); outline-offset: 2px; }
.across-share__icon {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--app-border-strong); color: var(--app-text);
}
.across-share__icon svg { width: 18px; height: 18px; display: block; }
.across-share__note {
  margin: 0; padding-top: var(--space-3); border-top: 1px solid var(--rule);
  font-size: 13px; line-height: 1.5; color: var(--app-text-subtle);
}
@media (max-width: 600px) {
  .across-share.across-modal-backdrop { padding: 0; place-items: end stretch; }
  .across-share .across-modal {
    max-width: none; border-bottom: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .across-share__link { flex-direction: column; }
  .across-share__copy { height: 44px; }
  .across-share__targets { grid-template-columns: repeat(4, 1fr); }
}

/* ------------------------------------------------------------
   Reduced motion — collapse the sanctioned pulse + slides.
   (Global rule in components.css already zeroes durations; this
   stops the sync pulse from looping and keeps end-states visible.)
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .across-status--syncing .across-status__dot::after { animation: none; opacity: 0; }
  .across-drawer__panel { transition: opacity var(--fast) var(--ease); }
  .across-install-nudge { transform: none; transition: opacity var(--fast) var(--ease); }
}


/* ===== components-data.css ===== */
/* ===================================================================
   Across — Data display (Phase 4 · flagships)
   The "working surfaces" where real data lives.

   This file ships the FLAGSHIP pair for review:
     · Table       — static, styled ledger markup (the base)
     · Data table  — the interactive surface built ON .across-table
                     (sort · select · sticky head · density · wing-wipe
                      rows · skeleton + empty states; pairs with the
                      Phase 2 .across-pager for pagination)
     · Calendar    — month grid, lifted VERBATIM from the Orbit time-zone
                     tool (.across-tzm-cal) so the system has exactly ONE
                     calendar look. Monday-start by default (a future
                     user setting flips week-start).
     · Date field  — the trigger pill that opens the calendar popover
     · Date range  — two-month range selection on the same engine

   Built against the Phase 0 rulings — warm paper + hairlines, 3px/6px
   radius, Red Hat Mono tabular figures, the wing-wipe as the one
   signature row gesture, and the motion budget (no idle motion; the
   skeleton shimmer is the sole sanctioned loading exception).

   Imported by styles.css after components-overlays.css.
   =================================================================== */

/* ============================================================
   1 · TABLE — static styled ledger (the base markup)
   A ruled ledger on paper: hairline rows, no outer box by default,
   mono tabular numerics, right-aligned number columns.
   ============================================================ */
.across-table { width: 100%; border-collapse: collapse; font-size: 13.5px; color: var(--app-text); }
.across-table thead th {
  text-align: left; font-weight: 600; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--app-text-subtle); padding: 10px 14px; border-bottom: 1px solid var(--rule); white-space: nowrap;
}
.across-table tbody td { padding: 12px 14px; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }
.across-table tbody tr:last-child td { border-bottom: 0; }
.across-table tfoot td { padding: 11px 14px; border-top: 1px solid var(--rule); font-size: 12.5px; color: var(--app-text-muted); }
/* numeric columns — mono, tabular, right-aligned */
.across-table .num, .across-table th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.across-table .muted { color: var(--app-text-muted); }
/* boxed variant — when the table needs a frame (cards, panels) */
.across-table--boxed { border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.across-table--boxed thead th { background: color-mix(in oklab, var(--bg) 50%, var(--app-surface)); }
.across-table--boxed tbody td, .across-table--boxed thead th { padding-left: 16px; padding-right: 16px; }
/* zebra variant */
.across-table--zebra tbody tr:nth-child(even) { background: color-mix(in oklab, var(--app-text) 2.5%, transparent); }
/* compact density */
.across-table--compact thead th { padding: 7px 12px; }
.across-table--compact tbody td { padding: 7px 12px; }

/* ============================================================
   2 · DATA TABLE — interactive surface built on .across-table
   Wraps a .across-table in a frame that adds a sticky header, a scroll
   viewport, selectable rows with wing-wipe, sortable headers,
   density, and skeleton/empty states.
   ============================================================ */
.across-data-table { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--app-surface); overflow: hidden; }

/* toolbar — title, selection summary, density toggle, actions */
.across-data-table__bar { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.across-data-table__title { font-size: 14px; font-weight: 600; white-space: nowrap; }
.across-data-table__count { font-family: var(--font-mono); font-size: 11px; color: var(--app-text-subtle); }
.across-data-table__bar-spacer { flex: 1; }
/* selection summary chip — appears when rows are selected */
.across-data-table__selinfo { display: none; align-items: center; gap: 10px; font-size: 12.5px; color: var(--orbit); font-weight: 500; white-space: nowrap; }
.across-data-table.has-selection .across-data-table__selinfo { display: inline-flex; }
/* scope the swap to the TOOLBAR count only — the footer count shares the
   class and must stay put (otherwise the footer pager loses its space-between
   partner and snaps to the left when a row is selected) */
.across-data-table.has-selection .across-data-table__bar > .across-data-table__count { display: none; }
.across-data-table__selinfo .across-btn { margin-left: 2px; }

/* scoped search — a quick filter for THIS table (never ⌘K, which is global) */
.across-data-table__search { position: relative; display: inline-flex; align-items: center; }
.across-data-table__search i { position: absolute; left: 9px; font-size: 15px; color: var(--app-text-subtle); pointer-events: none; }
.across-data-table__search input {
  width: 180px; max-width: 42vw; box-sizing: border-box;
  padding: 7px 26px 7px 30px; font: inherit; font-size: 13px; color: var(--app-text);
  background: var(--app-surface); border: 1px solid var(--rule); border-radius: var(--radius-sm);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), width var(--med) var(--ease);
}
.across-data-table__search input::placeholder { color: var(--app-text-subtle); }
.across-data-table__search input:focus { outline: none; border-color: var(--orbit); box-shadow: 0 0 0 3px var(--orbit-softer); }
.across-data-table__search-clear { position: absolute; right: 6px; width: 18px; height: 18px; display: none; place-items: center; background: transparent; border: 0; border-radius: 4px; cursor: pointer; color: var(--app-text-subtle); font-size: 13px; }
.across-data-table__search.has-value .across-data-table__search-clear { display: grid; }
.across-data-table__search-clear:hover { background: var(--app-surface-2); color: var(--app-text); }

/* filter — a trigger + popover of status toggles, scoped to this table */
.across-data-table__filter { position: relative; }
.across-data-table__filter-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px;
  font: inherit; font-size: 13px; font-weight: 500; color: var(--app-text-muted);
  background: var(--app-surface); border: 1px solid var(--rule); border-radius: var(--radius-sm); cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.across-data-table__filter-btn:hover { background: var(--app-surface-2); color: var(--app-text); }
.across-data-table__filter.is-open .across-data-table__filter-btn { border-color: var(--orbit); color: var(--orbit); }
.across-data-table__filter-btn .across-data-table__filter-count { font-family: var(--font-mono); font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; display: none; align-items: center; justify-content: center; background: var(--orbit); color: #fff; border-radius: var(--radius-pill); }
.across-data-table__filter.has-active .across-data-table__filter-count { display: inline-flex; }
.across-data-table__filter-pop {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: var(--z-dropdown, 50);
  width: 200px; padding: 6px; background: var(--app-surface);
  border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-2);
  display: none; animation: pop-in 120ms var(--ease-out);
}
.across-data-table__filter.is-open .across-data-table__filter-pop { display: block; }
.across-data-table__filter-head { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--app-text-subtle); padding: 6px 8px 4px; }
.across-data-table__filter-opt { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; color: var(--app-text); }
.across-data-table__filter-opt:hover { background: var(--app-surface-2); }
.across-data-table__filter-opt .across-data-table-tag { margin-left: auto; pointer-events: none; }
.across-data-table__filter-foot { display: flex; justify-content: flex-end; padding: 4px 4px 2px; border-top: 1px solid var(--rule-soft); margin-top: 4px; }
.across-data-table__filter-clear { font: inherit; font-size: 12px; color: var(--app-text-subtle); background: none; border: 0; cursor: pointer; padding: 5px 8px; border-radius: var(--radius-sm); }
.across-data-table__filter-clear:hover { color: var(--app-text); background: var(--app-surface-2); }

/* no-results row inside the scroll (search/filter cleared everything) */
.across-data-table__noresults { padding: 36px 24px; text-align: center; color: var(--app-text-muted); font-size: 13px; }
.across-data-table__noresults strong { color: var(--app-text); font-weight: 600; }
/* density toggle — reuses the segmented look */
.across-data-table__density { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--radius-sm); overflow: hidden; }
.across-data-table__density button { display: grid; place-items: center; width: 30px; height: 28px; background: var(--app-surface); border: 0; cursor: pointer; color: var(--app-text-subtle); font-size: 15px; transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
.across-data-table__density button + button { border-left: 1px solid var(--rule); }
.across-data-table__density button:hover { color: var(--app-text); }
.across-data-table__density button.is-on { background: var(--surface-hover-accent); color: var(--orbit); }

/* scroll viewport — vertical scroll with a sticky header */
.across-data-table__scroll { max-height: 420px; overflow: auto; }
.across-data-table__scroll .across-table thead th { position: sticky; top: 0; z-index: 2; background: var(--app-surface); box-shadow: inset 0 -1px 0 var(--rule); }

/* selectable / sortable rows + cells */
.across-data-table .across-table tbody tr { position: relative; transition: background var(--fast) var(--ease); }
/* wing-wipe — the one signature gesture, leading-edge accent on hover/selected */
.across-data-table .across-table tbody td:first-child::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px;
  background: var(--orbit); border-radius: 1px; transform: scaleY(0); transform-origin: center;
  transition: transform var(--wing-duration) var(--wing-easing);
}
.across-data-table .across-table tbody tr:hover td:first-child::before,
.across-data-table .across-table tbody tr.is-selected td:first-child::before { transform: scaleY(1); }
.across-data-table .across-table tbody tr:hover { background: var(--surface-hover-accent); }
.across-data-table .across-table tbody tr.is-selected { background: var(--orbit-softer); }

/* selection checkbox column */
.across-data-table__check { width: 18px; height: 18px; }
.across-data-table th.across-data-table__checkcol, .across-data-table td.across-data-table__checkcol { width: 44px; padding-right: 0; text-align: center; }
.across-data-table-check {
  appearance: none; -webkit-appearance: none; width: 17px; height: 17px; margin: 0;
  border: 1.5px solid var(--app-border-strong); border-radius: var(--radius-xs); background: var(--app-surface);
  cursor: pointer; position: relative; vertical-align: middle; transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.across-data-table-check:hover { border-color: var(--orbit); }
.across-data-table-check:checked { background: var(--orbit); border-color: var(--orbit); }
.across-data-table-check:checked::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.across-data-table-check:indeterminate { background: var(--orbit); border-color: var(--orbit); }
.across-data-table-check:indeterminate::after { content: ""; position: absolute; left: 3px; right: 3px; top: 50%; height: 2px; transform: translateY(-50%); background: #fff; border-radius: 1px; }
.across-data-table-check:focus-visible { outline: 2px solid var(--orbit); outline-offset: 2px; }

/* sortable header */
.across-data-table th.is-sortable { cursor: pointer; user-select: none; transition: color var(--fast) var(--ease); }
.across-data-table th.is-sortable:hover { color: var(--app-text); }
.across-data-table th.is-sortable .across-data-table-sort { display: inline-flex; align-items: center; gap: 5px; }
.across-data-table th.num.is-sortable .across-data-table-sort { flex-direction: row-reverse; }
.across-data-table-sort__icon { font-size: 12px; opacity: 0; transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease); color: var(--orbit); }
.across-data-table th.is-sortable:hover .across-data-table-sort__icon { opacity: .45; }
.across-data-table th.is-sorted .across-data-table-sort__icon { opacity: 1; }
.across-data-table th.is-sorted.is-desc .across-data-table-sort__icon { transform: scaleY(-1); }
.across-data-table th.is-sorted { color: var(--app-text); }

/* skeleton loading — the ONE sanctioned ambient motion in this file */
.across-data-table.is-loading .across-data-table__scroll { position: relative; }
.across-data-table-skeleton td { padding: 13px 14px; }
.across-data-table-skel-bar { height: 11px; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--app-surface-2) 0%, color-mix(in oklab, var(--app-text) 8%, var(--app-surface-2)) 50%, var(--app-surface-2) 100%); background-size: 200% 100%; animation: dt-shimmer 1.3s var(--ease) infinite; }
@keyframes dt-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* empty state */
.across-data-table__empty { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 56px 24px; text-align: center; }
.across-data-table.is-empty .across-data-table__scroll { display: none; }
.across-data-table.is-empty .across-data-table__empty { display: flex; }
.across-data-table__empty-icon { font-size: 30px; color: var(--app-text-subtle); }
.across-data-table__empty-title { font-size: 14px; font-weight: 600; }
.across-data-table__empty-desc { font-size: 13px; color: var(--app-text-muted); max-width: 38ch; line-height: 1.5; }

/* footer — holds the Phase 2 pager */
.across-data-table__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.across-data-table__foot .across-data-table__count { font-size: 12px; }

/* status / delta cell helpers (data semantics — constant colours) */
.across-data-table-tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: var(--radius-pill); }
.across-data-table-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.across-data-table-tag--live { color: var(--success); background: color-mix(in oklab, var(--success) 12%, transparent); }
.across-data-table-tag--paused { color: var(--warning); background: color-mix(in oklab, var(--warning) 12%, transparent); }
.across-data-table-tag--stale { color: var(--app-text-subtle); background: var(--app-surface-2); }
.across-data-table-delta { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 12.5px; }
.across-data-table-delta--up { color: var(--accent-cool); }
.across-data-table-delta--down { color: var(--accent-warm); }

@media (max-width: 640px) {
  .across-data-table__scroll { max-height: 60vh; }
  .across-data-table .across-table { font-size: 12.5px; }
  .across-data-table th.hide-sm, .across-data-table td.hide-sm { display: none; }
}

/* ============================================================
   3 · CALENDAR — month grid
   Lifted verbatim from the Orbit time-zone tool (.across-tzm-cal) and
   renamed .across-calendar so the whole system shares ONE calendar style.
   Monday-start by default; .across-calendar--sunday flips the week.
   ============================================================ */
.across-calendar {
  width: 280px; background: var(--app-surface);
  border: 1px solid var(--app-border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow-2); padding: 12px; text-align: left;
}
.across-calendar__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.across-calendar__nav { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--app-border); background: var(--app-surface); display: grid; place-items: center; font-size: 12px; cursor: pointer; color: var(--app-text-muted); transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.across-calendar__nav:hover { color: var(--orbit); border-color: var(--orbit); }
.across-calendar__label { font-size: 13px; font-weight: 600; color: var(--app-text); }
.across-calendar__week { display: grid; grid-template-columns: repeat(7, 1fr); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--app-text-subtle); text-align: center; margin-bottom: 4px; }
.across-calendar__week > div { padding: 4px 0; }
.across-calendar__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.across-calendar__cell { aspect-ratio: 1; border: 0; background: transparent; font: inherit; font-size: 12px; color: var(--app-text); border-radius: 4px; cursor: pointer; font-variant-numeric: tabular-nums; transition: background var(--fast) var(--ease); position: relative; }
.across-calendar__cell:hover { background: var(--app-surface-2); }
.across-calendar__cell.is-empty, .across-calendar__cell.is-disabled { cursor: default; pointer-events: none; }
.across-calendar__cell.is-disabled { color: var(--app-text-subtle); opacity: .4; }
.across-calendar__cell.is-muted { color: var(--app-text-subtle); }     /* adjacent-month days */
.across-calendar__cell.is-today { color: var(--orbit); font-weight: 700; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--orbit) 30%, transparent); }
.across-calendar__cell.is-selected { background: var(--orbit); color: #fff; font-weight: 700; box-shadow: none; }
.across-calendar__cell.is-selected:hover { background: var(--orbit); }
/* range states */
.across-calendar__cell.in-range { background: var(--orbit-softer); color: var(--app-text); border-radius: 0; }
.across-calendar__cell.is-range-start { background: var(--orbit); color: #fff; font-weight: 700; border-radius: 4px 0 0 4px; }
.across-calendar__cell.is-range-end { background: var(--orbit); color: #fff; font-weight: 700; border-radius: 0 4px 4px 0; }
.across-calendar__cell.is-range-start.is-range-end { border-radius: 4px; }
.across-calendar__foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--app-border); display: flex; justify-content: center; }
.across-calendar__today { font: inherit; font-size: 11.5px; font-weight: 500; background: transparent; border: 0; color: var(--orbit); cursor: pointer; padding: 4px 8px; border-radius: var(--radius-sm); }
.across-calendar__today:hover { background: var(--orbit-softer); }

/* two-up range calendar */
.across-calendar--range { width: auto; }
.across-calendar--range .across-calendar__months { display: flex; gap: 18px; }
.across-calendar--range .across-calendar__month { width: 252px; }
.across-calendar--range .across-calendar__readout { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--app-border); font-size: 12.5px; }
.across-calendar__readout-dates { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--app-text); }
.across-calendar__readout-dates .sep { color: var(--app-text-subtle); margin: 0 6px; }
.across-calendar__readout-dates .placeholder { color: var(--app-text-subtle); }
@media (max-width: 600px) { .across-calendar--range .across-calendar__months { flex-direction: column; } }

/* ============================================================
   4 · DATE FIELD — trigger pill that opens the calendar popover
   Mirrors the Orbit .across-tzm-datebar__date trigger.
   ============================================================ */
.across-datepicker { position: relative; display: inline-block; }
.across-datepicker__trigger {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--app-surface); border: 1px solid var(--app-border);
  padding: 8px 12px; border-radius: var(--radius-sm); cursor: pointer;
  font: inherit; font-size: 13.5px; color: var(--app-text); white-space: nowrap;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.across-datepicker__trigger:hover { background: var(--app-surface-2); border-color: var(--app-border-strong); }
.across-datepicker.is-open .across-datepicker__trigger { border-color: var(--orbit); }
.across-datepicker__icon { font-size: 16px; color: var(--app-text-subtle); }
.across-datepicker.is-open .across-datepicker__icon { color: var(--orbit); }
.across-datepicker__value { font-weight: 500; }
.across-datepicker__value.is-empty { color: var(--app-text-subtle); font-weight: 400; }
.across-datepicker__caret { font-size: 12px; color: var(--app-text-subtle); transition: transform var(--fast) var(--ease); margin-left: 2px; }
.across-datepicker.is-open .across-datepicker__caret { transform: rotate(180deg); color: var(--orbit); }
/* popover wrapper — positions the .across-calendar under the trigger */
.across-datepicker__pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: var(--z-dropdown, 50); animation: pop-in 120ms var(--wing-easing); }
.across-datepicker__pop--right { left: auto; right: 0; }
.across-datepicker--range .across-datepicker__pop { left: 0; }

/* ============================================================
   5 · ACCORDION — disclosure list with meta + smooth expand
   Hairline rows on paper; the trigger carries the wing-wipe.
   Expansion uses the grid-rows 0fr→1fr technique (animates to
   content height with no JS measuring).
   ============================================================ */
.across-accordion { border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: var(--app-surface); }
.across-accordion__item { border-bottom: 1px solid var(--rule-soft); }
.across-accordion__item:last-child { border-bottom: 0; }
/* header wraps the expand trigger + the sibling hide control so the ✕
   can be centred over the row regardless of panel height */
.across-accordion__header { position: relative; }
.across-accordion__trigger {
  position: relative; width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 15px 16px; background: transparent; border: 0; cursor: pointer;
  font: inherit; text-align: left; color: var(--app-text);
  transition: background var(--fast) var(--ease);
}
/* wing-wipe leading edge */
.across-accordion__trigger::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; background: var(--orbit); border-radius: 1px; transform: scaleY(0); transform-origin: center; transition: transform var(--wing-duration) var(--wing-easing); }
.across-accordion__header:hover .across-accordion__trigger { background: var(--surface-hover-accent); }
.across-accordion__header:hover .across-accordion__trigger::before, .across-accordion__item.is-open .across-accordion__trigger::before { transform: scaleY(1); }
.across-accordion__icon { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--app-surface-2); color: var(--app-text-muted); font-size: 16px; }
.across-accordion__item.is-open .across-accordion__icon { background: var(--orbit-softer); color: var(--orbit); }
.across-accordion__titles { flex: 1; min-width: 0; }
.across-accordion__label { display: block; font-size: 14px; font-weight: 600; }
.across-accordion__sub { display: block; font-size: 12.5px; color: var(--app-text-muted); margin-top: 2px; }
.across-accordion__meta { flex: none; font-family: var(--font-mono); font-size: 11px; color: var(--app-text-subtle); }
/* chevron is the OUTERMOST trailing control (Swap layout); the gap to its
   left is the reserved slot the hide ✕ fades into on hover */
.across-accordion__caret { flex: none; font-size: 14px; color: var(--app-text-subtle); margin-left: 36px; transition: transform var(--med) var(--wing-easing); }
.across-accordion__item.is-open .across-accordion__caret { transform: rotate(180deg); color: var(--orbit); }
/* hide control — a separate sibling button (a11y), tucked just inboard of
   the chevron. Hover-reveal on desktop, persistent-dim on touch, visible on
   focus; warm only on its OWN hover so “remove” reads as deliberate. */
.across-accordion__hide {
  position: absolute; top: 50%; right: 32px; transform: translateY(-50%);
  width: 28px; height: 28px; display: grid; place-items: center;
  border: 0; border-radius: var(--radius-sm); background: transparent;
  color: var(--app-text-subtle); font-size: 15px; cursor: pointer; opacity: 0;
  transition: opacity var(--fast) var(--ease), background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.across-accordion__header:hover .across-accordion__hide,
.across-accordion__hide:focus-visible { opacity: 1; }
.across-accordion__hide:hover { background: var(--accent-warm-bg); color: var(--accent-warm); }
.across-accordion__hide:focus-visible { outline: 2px solid var(--accent-warm); outline-offset: 1px; }
@media (hover: none) { .across-accordion__hide { opacity: .5; } }
.across-accordion__item.is-leaving { overflow: hidden; }
.across-accordion__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--med) var(--ease-out); }
.across-accordion__item.is-open .across-accordion__panel { grid-template-rows: 1fr; }
.across-accordion__panel-inner { overflow: hidden; }
.across-accordion__body { padding: 0 16px 16px 58px; font-size: 13.5px; color: var(--app-text-muted); line-height: 1.6; }

/* ============================================================
   6 · AVATAR + GROUP — initials / image, sizes, stack, status
   Circle by default; status ring reuses the presence colours.
   ============================================================ */
.across-avatar {
  position: relative; flex: none; width: 40px; height: 40px;
  border-radius: var(--radius-pill); display: inline-grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 14px;
  background: var(--orbit-softer); color: var(--orbit); overflow: visible; user-select: none;
}
.across-avatar__img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.across-avatar--xs { width: 24px; height: 24px; font-size: 9px; }
.across-avatar--sm { width: 30px; height: 30px; font-size: 11px; }
.across-avatar--md { width: 40px; height: 40px; font-size: 14px; }
.across-avatar--lg { width: 52px; height: 52px; font-size: 17px; }
.across-avatar--xl { width: 72px; height: 72px; font-size: 24px; }
/* tonal variants — deterministic accents from the product colors */
.across-avatar--track { background: color-mix(in oklab, var(--track) 16%, transparent);  color: var(--track-dark); }
.across-avatar--orbit { background: color-mix(in oklab, var(--orbit-base) 16%, transparent);  color: var(--orbit-deep); }
.across-avatar--relay { background: color-mix(in oklab, var(--relay) 16%, transparent); color: var(--relay-dark); }
.across-avatar--teal  { background: color-mix(in oklab, var(--teal) 16%, transparent);  color: var(--teal-dark); }
/* square variant for product/workspace logos */
.across-avatar--square { border-radius: var(--radius); }
/* presence ring — bottom-right dot */
.across-avatar__status { position: absolute; right: -1px; bottom: -1px; width: 30%; height: 30%; min-width: 8px; min-height: 8px; border-radius: 50%; border: 2px solid var(--app-surface); background: var(--app-text-subtle); }
.across-avatar__status--online { background: var(--success); }
.across-avatar__status--idle { background: var(--warning); }
.across-avatar__status--busy { background: var(--error); }
/* upload overlay variant — hover to reveal a camera affordance (icon scales with the avatar font) */
.across-avatar--upload { cursor: pointer; }
.across-avatar__upload { position: absolute; inset: 0; border-radius: inherit; display: grid; place-items: center; background: rgba(11,15,20,.5); color: #fff; font-size: 1.5em; opacity: 0; transition: opacity var(--fast) var(--ease); }
.across-avatar--upload:hover .across-avatar__upload { opacity: 1; }

/* group — overlapping stack with an overflow chip */
.across-avatar-group { display: inline-flex; align-items: center; }
.across-avatar-group .across-avatar { border: 2px solid var(--app-surface); box-shadow: none; }
.across-avatar-group .across-avatar + .across-avatar, .across-avatar-group__more { margin-left: -10px; }
.across-avatar-group--sm .across-avatar + .across-avatar, .across-avatar-group--sm .across-avatar-group__more { margin-left: -7px; }
.across-avatar-group__more {
  position: relative; flex: none; width: 40px; height: 40px;
  border-radius: var(--radius-pill); display: inline-grid; place-items: center;
  background: var(--app-surface-2); color: var(--app-text-muted); border: 2px solid var(--app-surface);
  font-family: var(--font-mono); font-weight: 700; font-size: 11px; z-index: 1;
}
.across-avatar-group--sm .across-avatar-group__more { width: 30px; height: 30px; }

/* ============================================================
   7 · TIMELINE — vertical event rail with markers
   A hairline spine with dotted markers; mono timestamps.
   ============================================================ */
.across-timeline { position: relative; padding-left: 26px; }
.across-timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1.5px; background: var(--rule); }
.across-timeline__item { position: relative; padding: 0 0 22px; }
.across-timeline__item:last-child { padding-bottom: 0; }
.across-timeline__marker { position: absolute; left: -26px; top: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--app-surface); border: 2px solid var(--app-border-strong); display: grid; place-items: center; }
.across-timeline__marker::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--app-text-subtle); }
/* state markers — colour carries the semantic */
.across-timeline__item--done .across-timeline__marker { border-color: var(--success); }
.across-timeline__item--done .across-timeline__marker::after { background: var(--success); }
.across-timeline__item--active .across-timeline__marker { border-color: var(--orbit); box-shadow: 0 0 0 3px var(--orbit-softer); }
.across-timeline__item--active .across-timeline__marker::after { background: var(--orbit); }
.across-timeline__item--alert .across-timeline__marker { border-color: var(--error); }
.across-timeline__item--alert .across-timeline__marker::after { background: var(--error); }
/* timestamp sits in a marker-height box so it centres on the bullseye */
.across-timeline__time { display: flex; align-items: center; min-height: 16px; font-family: var(--font-mono); font-size: 11px; color: var(--app-text-subtle); letter-spacing: .02em; }
.across-timeline__title { font-size: 13.5px; font-weight: 600; color: var(--app-text); margin-top: 3px; }
.across-timeline__desc { font-size: 13px; color: var(--app-text-muted); line-height: 1.55; margin-top: 3px; }
.across-timeline__tag { display: inline-flex; align-items: center; margin-top: 6px; }

/* ============================================================
   8 · STAT / COUNT-UP — big mono metric, optional count-up
   The count-up is the sanctioned one-time reveal animation
   (MOTION.md); it runs once on first view, then sits static.
   ============================================================ */
.across-statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.across-stat { background: var(--app-surface); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.across-stat__label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--app-text-subtle); }
.across-stat__value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 34px; font-weight: 700; letter-spacing: -0.01em; color: var(--app-text); line-height: 1; }
.across-stat__value .across-stat__unit { font-size: 18px; font-weight: 600; color: var(--app-text-muted); margin-left: 2px; }
.across-stat__foot { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--app-text-muted); }
.across-stat__delta { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
/* Up/down are DATA semantics, not state: cool=up, warm=down — the fixed
   meaning-in-data accents (never the rebindable brand accent, never green
   which is the Orbit accent). Matches the .across-table delta cells. */
.across-stat__delta--up { color: var(--accent-cool); }
.across-stat__delta--down { color: var(--accent-warm); }
/* standalone (un-gridded) stat for hero numbers */
.across-stat--hero .across-stat__value { font-size: 52px; }

/* ============================================================
   9 · CODE BLOCK — mono block, filename/lang header, copy
   No live highlighting (per ruling); plain mono on a tinted
   ground with an optional caption.
   ============================================================ */
.across-code-block { border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: var(--app-surface); }
.across-code-block__head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--rule); background: color-mix(in oklab, var(--bg) 50%, var(--app-surface)); }
.across-code-block__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--app-border-strong); flex: none; }
.across-code-block__name { font-family: var(--font-mono); font-size: 12px; color: var(--app-text-muted); }
.across-code-block__lang { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--app-text-subtle); border: 1px solid var(--rule); border-radius: var(--radius-pill); padding: 1px 8px; }
.across-code-block__spacer { flex: 1; }
.across-code-block__copy { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12px; color: var(--app-text-muted); background: transparent; border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 4px 9px; cursor: pointer; transition: background var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.across-code-block__copy:hover { background: var(--app-surface-2); color: var(--app-text); }
.across-code-block__copy.is-copied { color: var(--success); border-color: color-mix(in oklab, var(--success) 45%, var(--rule)); }
.across-code-block__pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.65; color: var(--app-text); tab-size: 2; }
.across-code-block__pre code { font: inherit; }
/* gutter line-number variant */
.across-code-block--numbered .across-code-block__pre { counter-reset: ln; padding-left: 0; }
.across-code-block--numbered .across-code-block__pre .ln { display: block; counter-increment: ln; padding: 0 16px 0 52px; position: relative; }
.across-code-block--numbered .across-code-block__pre .ln::before { content: counter(ln); position: absolute; left: 0; width: 38px; text-align: right; color: var(--app-text-subtle); opacity: .6; }
.across-code-block__caption { padding: 9px 14px; border-top: 1px solid var(--rule-soft); font-size: 12px; color: var(--app-text-muted); line-height: 1.5; }

@media (prefers-reduced-motion: reduce) {
  .across-data-table-skel-bar { animation: none; }
  .across-accordion__panel { transition: none; }
}


/* ===== components-layout.css ===== */
/* ===================================================================
   Across Design System — Phase 5
   Layout, marketing & polish (the long tail).

   Re-expressed to the current language: warm paper + hairlines,
   3px/6px/pill radius tiers, the wing-wipe as the one gesture, one
   accent per surface. Nothing here carries a drop shadow on chrome —
   elevation is re-expressed as offset hairlines ("stacked paper").

   Built against PHASE-0-DECISIONS.md & MOTION.md.

   SECTIONS
     1 · Card (reconciled)  — Panel variants in the hairline language
     2 · Layout primitives  — stack / cluster / center / auto-grid
     3 · Icon button + group
     4 · Copy button
     5 · Resizable          — draggable split panes
     6 · Carousel           — scroll-snap slider (3 variants)
     7 · Marketing          — hero, sub-brand lockup, suite switcher,
                              header lockup, slim footer
   =================================================================== */

/* ===================================================================
   1 · CARD (RECONCILED)
   -------------------------------------------------------------------
   Phase 0 ruling: fold Card into Panel — flat hairline, --radius 3px,
   no drop shadow.

   DECISION (Phase 5 review, all flagships approved): Direction A —
   the Interactive Panel — is canonical. The Stacked-Paper and
   Notebook directions were retired. A plain `.across-card` is the flat
   hairline base; `.across-card--interactive` adds the hover signal
   (wing-wipe + 2.5% background lift). Color the accent with
   `.across-card--track / --orbit / --relay`.
   =================================================================== */

.across-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--space-5);
  color: var(--text);
}
.across-card__eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-subtle);
  margin-bottom: var(--space-3);
}
.across-card__eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orbit); }
.across-card__value {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 30px; font-weight: 600; letter-spacing: -.01em; line-height: 1;
}
.across-card__delta { font-family: var(--font-mono); font-size: 12.5px; margin-top: 6px; color: var(--text-muted); }
.across-card__delta--up { color: var(--orbit); }
.across-card__delta--down { color: var(--accent-warm); }
.across-card__title { font-size: var(--text-md); font-weight: 600; margin: 0 0 4px; }
.across-card__body { font-size: var(--text-nav); color: var(--text-muted); line-height: 1.5; margin: 0; }
.across-card__foot { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--rule-soft);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }

/* ---- Interactive Panel (canonical) ----
   A flat hairline card whose only hover signal is the wing-wipe
   (leading-edge accent sweep) plus a 2.5% background lift. Borders
   rest unchanged. No elevation, no shadow. */
.across-card--interactive {
  cursor: pointer; overflow: hidden;
  transition: background var(--fast) var(--ease);
}
.across-card--interactive::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--orbit);
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transform: scaleX(0); transform-origin: left center;
  transition: transform var(--wing-duration) var(--wing-easing);
  pointer-events: none;
}
.across-card--interactive:hover { background: var(--surface-hover-accent); }
.across-card--interactive:hover::after,
.across-card--interactive:active::after { transform: scaleX(1); }

/* Theme the card accent from the brand triad (no local vars — house style) */
.across-card--track .across-card__eyebrow .dot,
.across-card--track.across-card--interactive::after { background: var(--track-dark); }
.across-card--relay .across-card__eyebrow .dot,
.across-card--relay.across-card--interactive::after { background: var(--relay-dark); }
.across-card--orbit .across-card__eyebrow .dot,
.across-card--orbit.across-card--interactive::after { background: var(--orbit); }

/* ===================================================================
   2 · LAYOUT PRIMITIVES
   -------------------------------------------------------------------
   The four composition helpers Orbit leans on. They own spacing and
   flow only — never color or border. Gap-driven, so they survive
   drag-reorder / delete cleanly.
   =================================================================== */
.across-stack    { display: flex; flex-direction: column; gap: var(--space-4); }
.across-stack--1 { gap: var(--space-1); }
.across-stack--2 { gap: var(--space-2); }
.across-stack--3 { gap: var(--space-3); }
.across-stack--5 { gap: var(--space-5); }
.across-stack--6 { gap: var(--space-6); }

.across-cluster {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--space-3);
}
.across-cluster--between { justify-content: space-between; }
.across-cluster--end { justify-content: flex-end; }
.across-cluster--2 { gap: var(--space-2); }
.across-cluster--4 { gap: var(--space-4); }

.across-center {
  display: grid; place-items: center;
  box-sizing: border-box;
}
.across-center--text { text-align: center; }

.across-grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4);
}

/* ===================================================================
   3 · ICON BUTTON + BUTTON GROUP
   -------------------------------------------------------------------
   Icon button: formalized from the menu-trigger. Square, structural
   radius, same rest border as .across-btn, wing-wipe suppressed (too small
   to read) — the hover signal is the 2.5% lift only.
   =================================================================== */
.across-icon-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; padding: 0;
  background: var(--surface); color: var(--text-muted);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  cursor: pointer; font-size: 17px; line-height: 1;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.across-icon-btn:hover { background: color-mix(in oklab, var(--text) 2.5%, var(--surface)); color: var(--text); }
.across-icon-btn:disabled { opacity: .5; cursor: not-allowed; }
.across-icon-btn--sm { width: 28px; height: 28px; font-size: 15px; }
.across-icon-btn--lg { width: 40px; height: 40px; font-size: 19px; }
.across-icon-btn--ghost { border-color: transparent; background: transparent; }
.across-icon-btn--ghost:hover { background: var(--surface-2); }
.across-icon-btn--primary { background: var(--orbit); border-color: var(--orbit); color: #fff; }
.across-icon-btn--primary:hover { background: color-mix(in oklab, var(--orbit) 88%, black); color: #fff; }
.across-icon-btn.is-active { color: var(--orbit); border-color: color-mix(in oklab, var(--orbit) 45%, var(--rule)); background: var(--surface-hover-accent); }

/* Button group — joined controls sharing one border. The wing-wipe is
   suppressed inside a group (the joined seam is the structure); the
   pressed/active member carries the accent tint. */
.across-btn-group { display: inline-flex; }
.across-btn-group > .across-btn,
.across-btn-group > .across-icon-btn { border-radius: 0; }
.across-btn-group > :first-child { border-radius: var(--radius) 0 0 var(--radius); }
.across-btn-group > :last-child  { border-radius: 0 var(--radius) var(--radius) 0; }
.across-btn-group > * + * { margin-left: -1px; }
.across-btn-group > .across-btn::after { display: none; }
.across-btn-group > :hover, .across-btn-group > :focus-visible { position: relative; z-index: 1; }
.across-btn-group > .is-active {
  position: relative; z-index: 1;
  color: var(--orbit);
  border-color: color-mix(in oklab, var(--orbit) 45%, var(--border-strong));
  background: var(--surface-hover-accent);
}
.across-btn-group--attached { border-radius: var(--radius); }

/* ===================================================================
   4 · COPY BUTTON  (standalone, formalized from the code-block copy)
   -------------------------------------------------------------------
   A ghost-leaning button with a fixed minimum width so the label can
   swap "Copy" → "Copied" without the layout jumping. Confirm state is
   driven by .is-copied (set in JS); no idle motion.
   =================================================================== */
.across-copy-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 92px; height: 30px; padding: 0 12px;
  background: var(--surface); color: var(--text-muted);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.across-copy-btn i { font-size: 15px; }
.across-copy-btn:hover { background: color-mix(in oklab, var(--text) 2.5%, var(--surface)); color: var(--text); }
.across-copy-btn.is-copied {
  color: var(--orbit);
  border-color: color-mix(in oklab, var(--orbit) 45%, var(--border-strong));
  background: var(--surface-hover-accent);
}
.across-copy-btn--ghost { border-color: transparent; background: transparent; }
.across-copy-btn--icon { min-width: 0; width: 30px; padding: 0; }

/* ===================================================================
   5 · RESIZABLE  (draggable split panes)
   -------------------------------------------------------------------
   A flex container of panes split by a draggable hairline handle. The
   handle is a 1px rule at rest with an 11px hit area; on hover/drag it
   thickens to the accent. Sizes are written to flex-basis by JS.
   =================================================================== */
.across-resizable {
  display: flex; width: 100%;
  border: 1px solid var(--rule); border-radius: var(--radius);
  overflow: hidden; background: var(--surface);
}
.across-resizable--vertical { flex-direction: column; }
.across-resizable__pane { min-width: 0; min-height: 0; overflow: auto; }
.across-resizable__handle {
  position: relative; flex: 0 0 auto;
  width: 11px; align-self: stretch; cursor: col-resize;
  background: transparent; border: 0; padding: 0;
  display: grid; place-items: center;
  touch-action: none;
}
.across-resizable--vertical > .across-resizable__handle { width: auto; height: 11px; cursor: row-resize; }
.across-resizable__handle::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(var(--rule), var(--rule)) center / 1px 100% no-repeat;
}
.across-resizable--vertical > .across-resizable__handle::before {
  background: linear-gradient(var(--rule), var(--rule)) center / 100% 1px no-repeat;
}
.across-resizable__grip {
  position: relative; z-index: 1;
  width: 3px; height: 26px; border-radius: var(--radius-pill);
  background: var(--border-strong);
  transition: background var(--fast) var(--ease), height var(--fast) var(--ease);
}
.across-resizable--vertical .across-resizable__grip { width: 26px; height: 3px; }
.across-resizable__handle:hover .across-resizable__grip,
.across-resizable__handle.is-dragging .across-resizable__grip { background: var(--orbit); }
.across-resizable__handle:hover::before,
.across-resizable__handle.is-dragging::before {
  background: linear-gradient(var(--orbit), var(--orbit)) center / 1px 100% no-repeat;
}
.across-resizable--vertical > .across-resizable__handle:hover::before,
.across-resizable--vertical > .across-resizable__handle.is-dragging::before {
  background: linear-gradient(var(--orbit), var(--orbit)) center / 100% 1px no-repeat;
}
.across-resizable.is-resizing { user-select: none; }
.across-resizable.is-resizing * { cursor: inherit; }

/* a sample pane dressing used in the showcase */
.across-pane-demo { padding: var(--space-5); height: 100%; box-sizing: border-box; }
.across-pane-demo__label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-subtle); margin-bottom: var(--space-2); }

/* ===================================================================
   6 · CAROUSEL  (scroll-snap slider — no auto-advance, per MOTION.md)
   -------------------------------------------------------------------
   Three reviewable variants on one base: controls (arrows + dots),
   minimal (swipe only), and peek (partial neighbours visible).
   =================================================================== */
.across-carousel { position: relative; }
.across-carousel__viewport {
  display: flex; gap: var(--space-4);
  overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none;
  padding-bottom: 2px;
}
.across-carousel__viewport::-webkit-scrollbar { display: none; }
.across-carousel__slide {
  scroll-snap-align: center; flex: 0 0 100%; min-width: 0;
}
.across-carousel--peek .across-carousel__slide { flex-basis: 78%; scroll-snap-align: center; }
.across-carousel--cards .across-carousel__slide { flex-basis: clamp(240px, 42%, 320px); scroll-snap-align: start; }

/* a generic slide surface used in the demos */
.across-carousel-card {
  height: 100%; box-sizing: border-box;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--surface); padding: var(--space-6);
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 180px;
}
.across-carousel-card__kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--orbit); margin-bottom: var(--space-2); }
.across-carousel-card__title { font-size: var(--text-lg); margin: 0 0 6px; }
.across-carousel-card__body { font-size: var(--text-nav); color: var(--text-muted); margin: 0; line-height: 1.5; }

/* arrows — reuse icon-btn shape, pulled to the edges */
.across-carousel__controls { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-4); }
.across-carousel__arrows { display: inline-flex; gap: var(--space-2); }
.across-carousel__arrow[disabled] { opacity: .35; cursor: not-allowed; }

/* dots */
.across-carousel__dots { display: inline-flex; gap: 8px; align-items: center; }
.across-carousel__dot {
  width: 7px; height: 7px; padding: 0; border-radius: 50%;
  background: var(--border-strong); border: 0; cursor: pointer;
  transition: background var(--fast) var(--ease), width var(--fast) var(--ease), border-radius var(--fast) var(--ease);
}
.across-carousel__dot.is-active { background: var(--orbit); width: 18px; border-radius: var(--radius-pill); }
.across-carousel__count { font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 12px; color: var(--text-subtle); }

/* ===================================================================
   7 · MARKETING SURFACES
   -------------------------------------------------------------------
   Promoted from the com kit and re-expressed: warm paper,
   hairlines, the wing-wipe on CTAs. No decoration from the marks
   (identity v3 defines no supporting graphics). Product colours are
   allowed only when pointing at the products they name.
   =================================================================== */

/* ---- Hero ---- */
.across-m-hero {
  position: relative; overflow: hidden;
  padding: var(--space-10) var(--space-8) var(--space-12);
  border: 1px solid var(--rule); border-radius: var(--radius);
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / var(--grid-size) var(--grid-size),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / var(--grid-size) var(--grid-size),
    var(--bg);
}
.across-m-hero__inner { position: relative; z-index: 1; max-width: 60ch; }
.across-m-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--text-subtle);
  margin-bottom: var(--space-4);
}
.across-m-hero__title {
  font-size: clamp(38px, 5.4vw, 64px); font-weight: 700;
  letter-spacing: var(--tracking-tightest); line-height: 1.02;
  margin: 0 0 var(--space-4); text-wrap: balance;
}
.across-m-hero__lede { font-size: var(--text-md); color: var(--text-muted); line-height: 1.55; margin: 0 0 var(--space-6); max-width: 52ch; }
.across-m-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
/* v3: the tri-stripe .across-m-hero__wing (the retired mark as decoration) is removed. */
.across-m-hero__wing { display: none; }
/* centered layout variant */
.across-m-hero--centered { text-align: center; }
.across-m-hero--centered .across-m-hero__inner { max-width: 64ch; margin: 0 auto; }
.across-m-hero--centered .across-m-hero__eyebrow,
.across-m-hero--centered .across-m-hero__lede { margin-left: auto; margin-right: auto; }
.across-m-hero--centered .across-m-hero__actions { justify-content: center; }

/* ---- Logo (identity v3) ----
   Marks, wordmarks and lockups come only from <across-logo> / AcrossLogo
   (brand/across-logo.js), which draws them from the generated artwork.
   The old .across-lockup (stripe SVG + typed uppercase wordmark) is retired. */
across-logo { display: inline-flex; line-height: 0; vertical-align: middle; flex-shrink: 0; }
across-logo svg { display: block; }
/* Showcase plate: a master lockup, a divider, then the product lockups */
.across-lockup-plate {
  display: grid; grid-template-columns: auto 1px 1fr; align-items: center; gap: var(--space-6);
}
.across-lockup-plate__divider { width: 1px; align-self: stretch; background: var(--rule); }
.across-lockup-plate__subs { display: flex; flex-wrap: wrap; gap: var(--space-5) var(--space-6); }
.across-lockup-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.across-lockup-cell__cap { font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: var(--text-subtle); white-space: nowrap; }
@media (max-width: 760px) {
  .across-lockup-plate { grid-template-columns: 1fr; gap: var(--space-5); }
  .across-lockup-plate__divider { display: none; }
}

/* ---- Suite switcher (dropdown of the three products) ---- */
.across-suite { position: relative; display: inline-block; }
.across-suite__trigger {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  height: 34px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); color: var(--text);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background var(--fast) var(--ease);
}
.across-suite__trigger:hover { background: color-mix(in oklab, var(--text) 2.5%, var(--surface)); }
.across-suite__trigger .ph-caret-down { font-size: 14px; color: var(--text-subtle); transition: transform var(--fast) var(--ease); }
.across-suite.is-open .across-suite__trigger .ph-caret-down { transform: rotate(180deg); }
.across-suite__menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: var(--z-dropdown);
  min-width: 320px; padding: 6px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  display: none;   /* show/hide via display so the open state never depends on a transition completing */
}
.across-suite.is-open .across-suite__menu { display: block; animation: suite-menu-in var(--med) var(--ease-out); }
@keyframes suite-menu-in { from { transform: translateY(-4px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .across-suite.is-open .across-suite__menu { animation: none; } }
.across-suite__item {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 12px; padding: 10px;
  border-radius: var(--radius); text-decoration: none; color: var(--text);
  transition: background var(--fast) var(--ease);
}
.across-suite__item + .across-suite__item { margin-top: 2px; }
.across-suite__item:hover { background: var(--surface-hover-accent); }
/* wing-wipe on the leading edge of a hovered suite item, in that product's color */
.across-suite__item::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--orbit);
  transform: scaleY(0); transform-origin: top center;
  transition: transform var(--wing-duration) var(--wing-easing);
}
.across-suite__item:hover::after { transform: scaleY(1); }
.across-suite__item--track::after { background: var(--track-dark); }
.across-suite__item--orbit::after { background: var(--orbit); }
.across-suite__item--relay::after { background: var(--relay-dark); }
/* v3: the product mark (24px fill) replaces the Phosphor stand-in and its tinted tile.
   Markup: <span class="across-suite__icon"><across-logo product="track" size="24"></across-logo></span> */
.across-suite__icon {
  width: 36px; height: 36px; flex-shrink: 0;
  display: grid; place-items: center;
}
.across-suite__name { display: block; font-weight: 600; font-size: 14px; }
.across-suite__desc { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---- Header lockup (logo + suite switcher + theme toggle row) ---- */
.across-m-header {
  display: flex; align-items: center; gap: var(--space-4);
  padding: 12px var(--space-5);
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--surface);
}
.across-m-header__brand { display: inline-flex; align-items: center; gap: 12px; }
.across-m-header__divider { width: 1px; height: 22px; background: var(--rule); }
.across-m-header__spacer { flex: 1; }
.across-m-header__search {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 10px; min-width: 220px;
  background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--radius);
  color: var(--text-subtle); font-size: 13px; cursor: text;
}
.across-m-header__search .across-kbd {
  margin-left: auto; font-family: var(--font-mono); font-size: 10px;
  padding: 2px 6px; border-radius: var(--radius-xs);
  background: var(--surface); border: 1px solid var(--rule); color: var(--text-subtle);
}
@media (max-width: 680px) { .across-m-header__search { display: none; } }

/* ---- Slim brand footer ---- */
.across-m-footer {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  flex-wrap: wrap; padding: var(--space-5);
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--surface);
  font-size: 12.5px; color: var(--text-muted);
}
.across-m-footer__links { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.across-m-footer__links a { color: var(--text-muted); text-decoration: none; }
.across-m-footer__links a:hover { color: var(--text); }
.across-m-footer__meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-subtle); }


/* ===== components-parity.css ===== */
/* ===================================================================
   Across — Phase B component parity
   Closes the gaps the live repo documents that the kit hadn't yet:
   the canonical `across-switch` contract name (aliased onto the
   existing st-toggle implementation), switch sizes, and full
   checkbox / radio parity — sizes, with-description rows, and the
   horizontal radio group. Imported last by styles.css so it layers
   cleanly over components.css.
   =================================================================== */

/* -------------------------------------------------------------------
   SWITCH — canonical `across-switch` (alias of .across-st-toggle)
   Same visual contract; consuming apps compose against across-switch.
   ------------------------------------------------------------------- */
.across-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; background: transparent; border: 0; cursor: pointer; padding: 0; }
.across-switch__track {
  width: 36px; height: 20px; border-radius: 3px;
  background: color-mix(in oklab, var(--app-text) 18%, transparent);
  transition: background var(--fast) var(--ease); position: relative; flex: none;
}
.across-switch__thumb {
  position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,.2);
  transition: transform var(--wing-duration) var(--wing-easing);
}
.across-switch.is-on .across-switch__track { background: var(--accent, var(--orbit)); }
.across-switch.is-on .across-switch__thumb { transform: translateX(16px); }
.across-switch__label { font-size: 12.5px; color: var(--app-text-muted); }
.across-switch:focus-visible { outline: 2px solid var(--accent, var(--orbit)); outline-offset: 3px; border-radius: var(--radius-sm); }
.across-switch[aria-disabled="true"], .across-switch:disabled { opacity: .5; cursor: not-allowed; }

/* Sizes — apply to both the canonical switch and the legacy st-toggle */
.across-switch--sm .across-switch__track,
.across-st-toggle--sm .across-st-toggle__track { width: 28px; height: 16px; }
.across-switch--sm .across-switch__thumb,
.across-st-toggle--sm .across-st-toggle__thumb { width: 12px; height: 12px; }
.across-switch--sm.is-on .across-switch__thumb,
.across-st-toggle--sm.is-on .across-st-toggle__thumb { transform: translateX(12px); }
/* compact switches opt out of the standard control min-height */
.across-switch--sm, .across-st-toggle--sm { min-height: 0; }

.across-switch--lg .across-switch__track,
.across-st-toggle--lg .across-st-toggle__track { width: 46px; height: 26px; border-radius: 4px; }
.across-switch--lg .across-switch__thumb,
.across-st-toggle--lg .across-st-toggle__thumb { width: 22px; height: 22px; }
.across-switch--lg.is-on .across-switch__thumb,
.across-st-toggle--lg.is-on .across-st-toggle__thumb { transform: translateX(20px); }

/* Accent variant — pins the on-state to brand orbit even when --accent
   is rebound (e.g. a destructive surface that still wants the brand cue). */
.across-switch--accent.is-on .across-switch__track,
.across-st-toggle--accent.is-on .across-st-toggle__track { background: var(--orbit-base); }

/* -------------------------------------------------------------------
   CHECKBOX / RADIO — sizes
   ------------------------------------------------------------------- */
.across-check--sm input + span, .across-checkbox--sm input + span, .across-radio--sm input + span { width: 14px; height: 14px; }
.across-check--sm input:checked + span::after, .across-checkbox--sm input:checked + span::after { width: 6px; height: 4px; }
.across-radio--sm input:checked + span::after { width: 6px; height: 6px; }

.across-check--lg input + span, .across-checkbox--lg input + span, .across-radio--lg input + span { width: 20px; height: 20px; }
.across-check--lg input:checked + span::after, .across-checkbox--lg input:checked + span::after { width: 10px; height: 6px; border-left-width: 2px; border-bottom-width: 2px; }
.across-radio--lg input:checked + span::after { width: 10px; height: 10px; }
.across-check--lg, .across-checkbox--lg, .across-radio--lg { font-size: 14px; }

/* Indeterminate checkbox — the dash state (JS sets .indeterminate / class) */
.across-check input:indeterminate + span, .across-checkbox input:indeterminate + span,
.across-check.is-indeterminate input + span, .across-checkbox.is-indeterminate input + span { background: var(--orbit); border-color: var(--orbit); }
.across-check input:indeterminate + span::after, .across-checkbox input:indeterminate + span::after,
.across-check.is-indeterminate input + span::after, .across-checkbox.is-indeterminate input + span::after {
  content: ""; width: 8px; height: 0; border: 0;
  border-top: 1.5px solid #fff; transform: none; border-radius: 1px;
}

/* -------------------------------------------------------------------
   WITH-DESCRIPTION — a two-line choice row (title + helper)
   <label class="across-check across-check--desc">
     <input type="checkbox"><span></span>
     <span class="across-choice__text">
       <span class="across-choice__title">Label</span>
       <span class="across-choice__desc">Helper copy</span>
     </span>
   </label>
   ------------------------------------------------------------------- */
.across-check--desc, .across-checkbox--desc, .across-radio--desc { align-items: flex-start; gap: 10px; }
.across-check--desc span:first-of-type, .across-checkbox--desc span:first-of-type,
.across-radio--desc span:first-of-type { margin-top: 1px; }
.across-choice__text { display: flex; flex-direction: column; gap: 2px; }
.across-choice__title { font-size: 13.5px; font-weight: 500; color: var(--app-text); line-height: 1.35; }
.across-choice__desc { font-size: 12px; color: var(--app-text-subtle); line-height: 1.45; }

/* -------------------------------------------------------------------
   RADIO / CHECK GROUP — vertical by default, horizontal modifier
   ------------------------------------------------------------------- */
.across-radio-group, .across-check-group { display: flex; flex-direction: column; gap: 12px; }
.across-radio-group--row, .across-check-group--row { flex-direction: row; flex-wrap: wrap; gap: 18px; align-items: center; }

/* Boxed choice — the selectable card row used in settings/onboarding */
.across-choice-box {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--app-border); border-radius: var(--radius);
  cursor: pointer; transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.across-choice-box:hover { border-color: var(--app-border-strong); background: var(--surface-hover-accent); }
.across-choice-box:has(input:checked) { border-color: var(--accent, var(--orbit)); background: color-mix(in oklab, var(--accent, var(--orbit)) 5%, transparent); }



/* ============================================================
   A11y — keyboard focus ring (v2.0.1)
   Zero-specificity (:where) safety net so every keyboard-focusable
   control shows a clear ring. The wing-wipe is decorative and not a
   sufficient focus indicator on its own; buttons/links/tabs/menu items
   had no ring. Component-specific focus styles (switch, data-table
   check, inputs' box-shadow ring) keep their own treatment — :where()
   never overrides them, and inputs/selects are intentionally excluded.
   ============================================================ */
:where(a[href], button, [tabindex], summary, .across-tab, .across-menu__item):focus-visible {
  outline: 2px solid var(--accent, var(--orbit));
  outline-offset: 2px;
}

/* ============================================================
   View Transitions — cross-document page animations (v2.1.11)
   Transition animations for MPA apps using Turbo 8.
   The opt-in is handled by <meta name="view-transition" content="same-origin">
   in the HTML (Turbo 8's method). DO NOT also add CSS @view-transition here —
   having both causes a double-transition conflict.
   SPA apps never trigger cross-document transitions, so these
   pseudo-element styles are inert in SPA context.
   ============================================================ */

/* Default root transition — subtle cross-fade */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) {
    animation: across-vt-fade-out 0.15s ease-out both;
  }
  ::view-transition-new(root) {
    animation: across-vt-fade-in 0.15s ease-in both;
  }
}

@keyframes across-vt-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes across-vt-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Named transitions — persistent shell elements morph across pages */
.across-topbar { view-transition-name: across-topbar; }
.across-footer { view-transition-name: across-footer; }

/* Keyboard reordering — see enhanceSortable. The handle is a real tab stop, so it needs a
   visible focus state and a clear "grabbed" state; without them the keyboard path exists but
   is invisible, which is barely better than not having it. */
.across-sortable__handle {
  cursor: grab;
  border-radius: 4px;
}
.across-sortable__handle:focus-visible {
  outline: 2px solid var(--accent, #6366f1);
  outline-offset: 2px;
}
.across-sortable__row.is-grabbed {
  outline: 2px dashed var(--accent, #6366f1);
  outline-offset: -2px;
  background: var(--app-surface-2, rgba(127, 127, 127, 0.08));
}
.across-sortable__row.is-grabbed .across-sortable__handle { cursor: grabbing; }

/* Touch screens: every text field is at least 16px. iOS Safari zooms the page into a focused
   field under 16px and leaves it zoomed after, so typing in a search or an amount threw the
   page off screen (Orbit BUG-070). Last in the file so it follows each field's own rule;
   `pointer: coarse` leaves mouse-and-keyboard screens at their compact sizes. */
@media (pointer: coarse) {
  .across-input,
  .across-select__field,
  .across-select--sm .across-select__field,
  .across-number-input input,
  .across-combobox__search input,
  .across-chip-input__field,
  .across-command-menu__search input { font-size: 16px; }
}
