/* Lacy Digital Labs Design System v0.1.0 — GENERATED from tokens/tokens.json. Do not edit by hand. */
/* Accent: Willis Gold (OKLCH hue 72). Modes: [data-mode="light|dark"] (auto via prefers-color-scheme). Density: [data-density="comfortable|compact|dense"] on <html> or any subtree (default comfortable). */

:root {
  --ldl-font-display: 'Space Grotesk', system-ui, -apple-system, 'Hiragino Sans', 'Yu Gothic UI', Meiryo, 'PingFang SC', 'Microsoft YaHei', 'Malgun Gothic', 'Noto Sans CJK', 'Noto Sans Arabic', 'Geeza Pro', 'Noto Sans Hebrew', 'Noto Sans Thai', 'Noto Sans Devanagari', 'Noto Sans', sans-serif;
  --ldl-font-body: 'Hanken Grotesk', system-ui, -apple-system, 'Hiragino Sans', 'Yu Gothic UI', Meiryo, 'PingFang SC', 'Microsoft YaHei', 'Malgun Gothic', 'Noto Sans CJK', 'Noto Sans Arabic', 'Geeza Pro', 'Noto Sans Hebrew', 'Noto Sans Thai', 'Noto Sans Devanagari', 'Noto Sans', sans-serif;
  --ldl-font-mono: 'Space Mono', ui-monospace, 'SF Mono', Menlo, Consolas, 'Noto Sans Mono CJK', 'Hiragino Sans', 'PingFang SC', 'Malgun Gothic', 'Noto Sans Mono', 'Yu Gothic UI', Meiryo, 'Microsoft YaHei', 'Noto Sans CJK', 'Noto Sans Arabic', 'Geeza Pro', 'Noto Sans Hebrew', 'Noto Sans Thai', 'Noto Sans Devanagari', 'Noto Sans', monospace;
  --ldl-weight-regular: 400;
  --ldl-weight-medium: 500;
  --ldl-weight-semibold: 600;
  --ldl-weight-bold: 700;
  --ldl-control-leading: 1.25;
  --ldl-space-0: 0px;
  --ldl-space-1: 4px;
  --ldl-space-2: 8px;
  --ldl-space-3: 12px;
  --ldl-space-4: 16px;
  --ldl-space-5: 20px;
  --ldl-space-6: 24px;
  --ldl-space-8: 32px;
  --ldl-space-10: 40px;
  --ldl-space-12: 48px;
  --ldl-space-16: 64px;
  --ldl-space-24: 96px;
  --ldl-space-px: 1px;
  --ldl-space-0_5: 2px;
  --ldl-space-1_5: 6px;
  --ldl-radius-xs: 4px;
  --ldl-radius-sm: 6px;
  --ldl-radius-md: 9px;
  --ldl-radius-lg: 14px;
  --ldl-radius-xl: 20px;
  --ldl-radius-full: 999px;
  --ldl-radius-icon: 22%;
  --ldl-icon-sm: 16px;
  --ldl-icon-md: 20px;
  --ldl-icon-lg: 24px;
  --ldl-motion-fast: 150ms;
  --ldl-motion-normal: 300ms;
  --ldl-motion-slow: 500ms;
  --ldl-motion-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ldl-motion-easeOut: cubic-bezier(0.16, 1, 0.3, 1);
  --ldl-z-base: 0;
  --ldl-z-dropdown: 1000;
  --ldl-z-sticky: 1100;
  --ldl-z-overlay: 1200;
  --ldl-z-modal: 1300;
  --ldl-z-toast: 1400;
  --ldl-z-tooltip: 1500;
  --ldl-focus-width: 2px;
  --ldl-focus-offset: 2px;
  --ldl-focus-color: var(--ldl-accent);
  --ldl-touch-target: 44px;
  --ldl-opacity-hover: 0.06;
  --ldl-opacity-pressed: 0.12;
  --ldl-opacity-dragged: 0.16;
  --ldl-opacity-disabled-content: 0.38;
  --ldl-opacity-disabled-container: 0.12;
  --ldl-settings-nav-w: 200px;
  --ldl-settings-pane-max: 720px;
  --ldl-settings-modal-h: 720px;
  --ldl-palette-w: 620px;
  --ldl-splash-w: 420px;
  --ldl-splash-h: 260px;
  --ldl-dialog-w: 560px;
  --ldl-sidebar-w: 220px;
  --ldl-sidebar-rail-w: 56px;
  --ldl-tooltip-delay: 400ms;
  --ldl-sheet-medium: 52vh;
  --ldl-sheet-large: 92vh;
  --ldl-sheet-max-w: 640px;
  --ldl-sheet-side-w: clamp(280px, 36vw, 340px);
  --ldl-tabbar-item-h: 50px;
  --ldl-tabbar-rail-w: 64px;
  --ldl-list-row-touch: 52px;
  --ldl-touch-ui-font: 15px;
  --ldl-touch-ui-font-sm: 13px;
  --ldl-toast-max: 3;
  --ldl-section-pad: clamp(56px, 10vw, 76px);
  --ldl-page-hero-pad-top: 64px;
  --ldl-page-hero-pad-bottom: 56px;
  --ldl-cta-band-pad: 52px;
  --ldl-cta-band-pad-sm: 32px;
  --ldl-cta-band-radius: var(--ldl-radius-xl);
  --ldl-store-badge-h: var(--ldl-touch-target);
  --ldl-store-badge-w: calc(var(--ldl-store-badge-h) * 3.9025);
  --ldl-maxw: 1200px;
  --ldl-maxw-tight: 920px;
  --ldl-content-w: 720px;
  --ldl-bp-sm: 560px;
  --ldl-bp-md: 760px;
  --ldl-bp-lg: 940px;
  --ldl-bp-xl: 1024px;
  --ldl-bp-xxl: 1200px;
  --ldl-seq-1: oklch(0.95 0.03 74);
  --ldl-seq-2: oklch(0.88 0.07 73);
  --ldl-seq-3: oklch(0.80 0.11 72);
  --ldl-seq-4: oklch(0.72 0.15 72);
  --ldl-seq-5: oklch(0.58 0.13 68);
  --ldl-seq-6: oklch(0.42 0.09 62);
  --ldl-div-1: oklch(0.55 0.17 27);
  --ldl-div-2: oklch(0.68 0.13 30);
  --ldl-div-3: oklch(0.83 0.07 35);
  --ldl-div-4: oklch(0.93 0.008 250);
  --ldl-div-5: oklch(0.83 0.06 245);
  --ldl-div-6: oklch(0.68 0.11 248);
  --ldl-div-7: oklch(0.55 0.14 250);
  --ldl-type-display1-size: clamp(40px, 6.6vw, 78px);
  --ldl-type-display1-weight: 600;
  --ldl-type-display1-leading: 1.04;
  --ldl-type-display1-tracking: -0.02em;
  --ldl-type-display2-size: clamp(34px, 5vw, 58px);
  --ldl-type-display2-weight: 600;
  --ldl-type-display2-leading: 1.05;
  --ldl-type-display2-tracking: -0.02em;
  --ldl-type-h1-size: clamp(30px, 4vw, 46px);
  --ldl-type-h1-weight: 600;
  --ldl-type-h1-leading: 1.08;
  --ldl-type-h1-tracking: -0.02em;
  --ldl-type-h2-size: clamp(22px, 2.6vw, 30px);
  --ldl-type-h2-weight: 600;
  --ldl-type-h2-leading: 1.15;
  --ldl-type-h2-tracking: -0.015em;
  --ldl-type-h3-size: 20px;
  --ldl-type-h3-weight: 600;
  --ldl-type-h3-leading: 1.25;
  --ldl-type-h3-tracking: -0.01em;
  --ldl-type-body-lg-size: 18px;
  --ldl-type-body-lg-weight: 400;
  --ldl-type-body-lg-leading: 1.55;
  --ldl-type-body-lg-tracking: 0;
  --ldl-type-body-size: 15px;
  --ldl-type-body-weight: 400;
  --ldl-type-body-leading: 1.55;
  --ldl-type-body-tracking: 0;
  --ldl-type-body-sm-size: 13px;
  --ldl-type-body-sm-weight: 400;
  --ldl-type-body-sm-leading: 1.5;
  --ldl-type-body-sm-tracking: 0;
  --ldl-type-label-size: 12px;
  --ldl-type-label-weight: 600;
  --ldl-type-label-leading: 1.3;
  --ldl-type-label-tracking: 0;
  --ldl-type-caption-size: 11px;
  --ldl-type-caption-weight: 400;
  --ldl-type-caption-leading: 1.4;
  --ldl-type-caption-tracking: 0;
  --ldl-type-kicker-size: 12.5px;
  --ldl-type-kicker-weight: 400;
  --ldl-type-kicker-leading: 1.2;
  --ldl-type-kicker-tracking: 0.14em;
  --ldl-type-section-size: clamp(26px, 3.4vw, 40px);
  --ldl-type-section-weight: 600;
  --ldl-type-section-leading: 1.1;
  --ldl-type-section-tracking: -0.02em;
  --ldl-type-lead-size: clamp(17px, 1.6vw, 20px);
  --ldl-type-lead-weight: 400;
  --ldl-type-lead-leading: 1.5;
  --ldl-type-lead-tracking: 0;
  --ldl-type-mono-size: 13px;
  --ldl-type-mono-weight: 400;
  --ldl-type-mono-leading: 1.5;
  --ldl-type-mono-tracking: 0;
  --ldl-kicker-prefix: "// ";
  --ldl-lantern-scripture-font: 'Charis SIL', Georgia, 'Times New Roman', serif;

  --ldl-fs-scale: 1; /* accessibility zoom — user-overridable, independent of density */
  --ldl-base-font: 17px;
  --ldl-ui-font: 15px;
  --ldl-ui-font-sm: 12px;
  --ldl-type-fineprint: 12.5px;
  --ldl-control-h: 48px;
  --ldl-control-py: 13px;
  --ldl-control-px: 22px;
  --ldl-control-radius: var(--ldl-radius-full);
  --ldl-card-radius: var(--ldl-radius-lg);
  --ldl-card-pad: 24px;
  --ldl-row-gap: 16px;
  --ldl-appbar-h: 60px;
  --ldl-iconbtn-size: 40px;

  /* light mode (default) */
  --ldl-accent-h: 72;
  --ldl-accent-label: "Willis Gold";
  --ldl-accent: oklch(0.56 0.15 72);
  --ldl-accent-ink: oklch(0.47 0.15 72);
  --ldl-accent-soft: oklch(0.955 0.032 72);
  --ldl-accent-line: oklch(0.86 0.06 72);
  --ldl-on-accent: #ffffff;
  --ldl-brand-gold: #c5872b;
  --ldl-brand-gold-soft: #f6ead4;
  --ldl-brand-ink: #161b23;
  --ldl-paper: oklch(0.985 0.004 95);
  --ldl-paper2: oklch(0.962 0.006 95);
  --ldl-card: #ffffff;
  --ldl-recessed: oklch(0.945 0.006 95);
  --ldl-overlay: rgba(20,24,40,0.45);
  --ldl-ink: oklch(0.22 0.018 265);
  --ldl-ink2: oklch(0.44 0.02 265);
  --ldl-ink3: oklch(0.52 0.015 265);
  --ldl-ink-dim: oklch(0.70 0.012 265);
  --ldl-line: oklch(0.905 0.006 265);
  --ldl-line2: oklch(0.85 0.008 265);
  --ldl-inverse-bg: oklch(0.22 0.018 265);
  --ldl-inverse-ink: oklch(0.985 0.004 95);
  --ldl-inverse-ink2: oklch(0.82 0.01 265);
  --ldl-inverse-line: oklch(0.40 0.02 265);
  --ldl-inverse-border: oklch(0.22 0.018 265);
  --ldl-store-badge-bg: #000000;
  --ldl-store-badge-ink: #ffffff;
  --ldl-store-badge-line: #a6a6a6;
  --ldl-success: oklch(0.52 0.14 150);
  --ldl-success-soft: oklch(0.95 0.04 150);
  --ldl-on-success: #ffffff;
  --ldl-warning: oklch(0.62 0.16 55);
  --ldl-warning-soft: oklch(0.95 0.05 65);
  --ldl-on-warning: oklch(0.20 0.02 55);
  --ldl-warning-ink: oklch(0.52 0.15 55);
  --ldl-error: oklch(0.55 0.19 27);
  --ldl-error-soft: oklch(0.95 0.04 25);
  --ldl-on-error: #ffffff;
  --ldl-info: oklch(0.52 0.14 250);
  --ldl-info-soft: oklch(0.95 0.03 250);
  --ldl-on-info: #ffffff;
  --ldl-words-of-christ: oklch(0.387 0.150 266.4);
  --ldl-shadow-sm: 0 1px 2px rgba(20,24,40,0.06), 0 2px 6px rgba(20,24,40,0.05);
  --ldl-shadow-md: 0 4px 12px rgba(20,24,40,0.08), 0 8px 24px rgba(20,24,40,0.07);
  --ldl-shadow-lg: 0 8px 24px rgba(20,24,40,0.10), 0 30px 70px rgba(20,24,40,0.12);
  --ldl-shadow-modal: 0 12px 40px rgba(20,24,40,0.22);
  --ldl-series-1: oklch(0.47 0.15 72);
  --ldl-series-2: oklch(0.47 0.14 250);
  --ldl-series-3: oklch(0.47 0.15 150);
  --ldl-series-4: oklch(0.47 0.16 40);
  --ldl-series-5: oklch(0.47 0.14 305);
  --ldl-series-6: oklch(0.47 0.12 195);
  --ldl-series-7: oklch(0.47 0.17 350);
  --ldl-series-8: oklch(0.47 0.1 100);
  --ldl-highlight-amber: oklch(0.9 0.075 85);
  --ldl-highlight-amber-line: oklch(0.655 0.15 85);
  --ldl-highlight-sage: oklch(0.9 0.075 145);
  --ldl-highlight-sage-line: oklch(0.64 0.15 145);
  --ldl-highlight-sky: oklch(0.9 0.075 230);
  --ldl-highlight-sky-line: oklch(0.64 0.15 230);
  --ldl-highlight-rose: oklch(0.9 0.075 355);
  --ldl-highlight-rose-line: oklch(0.675 0.15 355);
  --ldl-mark-color: #c5872b;
  --ldl-mark-soft: #f6ead4;
  --ldl-mark-ink: #161b23;
  --ldl-inverse-accent: oklch(0.82 0.13 72);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 72);
  --ldl-inverse-accent-line: oklch(0.42 0.08 72);
  --ldl-lantern-words-of-christ: oklch(0.387 0.150 266.4);
  color-scheme: light;
}

:root[data-mode="dark"] {
  --ldl-accent-h: 72;
  --ldl-accent-label: "Willis Gold";
  --ldl-accent: oklch(0.72 0.15 72);
  --ldl-accent-ink: oklch(0.82 0.13 72);
  --ldl-accent-soft: oklch(0.285 0.06 72);
  --ldl-accent-line: oklch(0.42 0.08 72);
  --ldl-on-accent: oklch(0.16 0.02 265);
  --ldl-brand-gold: #e0a03f;
  --ldl-brand-gold-soft: #3a2e17;
  --ldl-brand-ink: #f2f4f7;
  --ldl-paper: oklch(0.185 0.014 265);
  --ldl-paper2: oklch(0.225 0.017 265);
  --ldl-card: oklch(0.235 0.018 265);
  --ldl-recessed: oklch(0.165 0.013 265);
  --ldl-overlay: rgba(0,0,0,0.6);
  --ldl-ink: oklch(0.965 0.004 95);
  --ldl-ink2: oklch(0.78 0.012 265);
  --ldl-ink3: oklch(0.62 0.012 265);
  --ldl-ink-dim: oklch(0.50 0.012 265);
  --ldl-line: oklch(0.33 0.02 265);
  --ldl-line2: oklch(0.40 0.022 265);
  --ldl-inverse-bg: oklch(0.235 0.018 265);
  --ldl-inverse-ink: oklch(0.965 0.004 95);
  --ldl-inverse-ink2: oklch(0.78 0.012 265);
  --ldl-inverse-line: oklch(0.40 0.022 265);
  --ldl-inverse-border: oklch(0.40 0.022 265);
  --ldl-store-badge-bg: #000000;
  --ldl-store-badge-ink: #ffffff;
  --ldl-store-badge-line: #a6a6a6;
  --ldl-success: oklch(0.75 0.15 150);
  --ldl-success-soft: oklch(0.30 0.06 150);
  --ldl-on-success: oklch(0.16 0.02 265);
  --ldl-warning: oklch(0.78 0.15 60);
  --ldl-warning-soft: oklch(0.32 0.07 55);
  --ldl-on-warning: oklch(0.16 0.02 265);
  --ldl-warning-ink: oklch(0.78 0.15 60);
  --ldl-error: oklch(0.70 0.19 25);
  --ldl-error-soft: oklch(0.30 0.09 25);
  --ldl-on-error: oklch(0.16 0.02 265);
  --ldl-info: oklch(0.75 0.13 250);
  --ldl-info-soft: oklch(0.30 0.06 250);
  --ldl-on-info: oklch(0.16 0.02 265);
  --ldl-words-of-christ: oklch(0.80 0.10 266.4);
  --ldl-shadow-sm: 0 1px 2px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.35);
  --ldl-shadow-md: 0 4px 12px rgba(0,0,0,0.45), 0 8px 24px rgba(0,0,0,0.4);
  --ldl-shadow-lg: 0 8px 24px rgba(0,0,0,0.5), 0 30px 70px rgba(0,0,0,0.55);
  --ldl-shadow-modal: 0 12px 40px rgba(0,0,0,0.6);
  --ldl-series-1: oklch(0.72 0.15 72);
  --ldl-series-2: oklch(0.70 0.14 250);
  --ldl-series-3: oklch(0.75 0.15 150);
  --ldl-series-4: oklch(0.72 0.16 40);
  --ldl-series-5: oklch(0.68 0.14 305);
  --ldl-series-6: oklch(0.78 0.12 195);
  --ldl-series-7: oklch(0.70 0.17 350);
  --ldl-series-8: oklch(0.72 0.10 100);
  --ldl-highlight-amber: oklch(0.34 0.1 85);
  --ldl-highlight-amber-line: oklch(0.54 0.15 85);
  --ldl-highlight-sage: oklch(0.34 0.1 145);
  --ldl-highlight-sage-line: oklch(0.54 0.15 145);
  --ldl-highlight-sky: oklch(0.34 0.1 230);
  --ldl-highlight-sky-line: oklch(0.54 0.15 230);
  --ldl-highlight-rose: oklch(0.34 0.1 355);
  --ldl-highlight-rose-line: oklch(0.54 0.15 355);
  --ldl-mark-color: #e0a03f;
  --ldl-mark-soft: #3a2e17;
  --ldl-mark-ink: #f2f4f7;
  --ldl-inverse-accent: oklch(0.82 0.13 72);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 72);
  --ldl-inverse-accent-line: oklch(0.42 0.08 72);
  --ldl-lantern-words-of-christ: oklch(0.80 0.10 266.4);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) {
    --ldl-accent-h: 72;
    --ldl-accent-label: "Willis Gold";
    --ldl-accent: oklch(0.72 0.15 72);
    --ldl-accent-ink: oklch(0.82 0.13 72);
    --ldl-accent-soft: oklch(0.285 0.06 72);
    --ldl-accent-line: oklch(0.42 0.08 72);
    --ldl-on-accent: oklch(0.16 0.02 265);
    --ldl-brand-gold: #e0a03f;
    --ldl-brand-gold-soft: #3a2e17;
    --ldl-brand-ink: #f2f4f7;
    --ldl-paper: oklch(0.185 0.014 265);
    --ldl-paper2: oklch(0.225 0.017 265);
    --ldl-card: oklch(0.235 0.018 265);
    --ldl-recessed: oklch(0.165 0.013 265);
    --ldl-overlay: rgba(0,0,0,0.6);
    --ldl-ink: oklch(0.965 0.004 95);
    --ldl-ink2: oklch(0.78 0.012 265);
    --ldl-ink3: oklch(0.62 0.012 265);
    --ldl-ink-dim: oklch(0.50 0.012 265);
    --ldl-line: oklch(0.33 0.02 265);
    --ldl-line2: oklch(0.40 0.022 265);
    --ldl-inverse-bg: oklch(0.235 0.018 265);
    --ldl-inverse-ink: oklch(0.965 0.004 95);
    --ldl-inverse-ink2: oklch(0.78 0.012 265);
    --ldl-inverse-line: oklch(0.40 0.022 265);
    --ldl-inverse-border: oklch(0.40 0.022 265);
    --ldl-store-badge-bg: #000000;
    --ldl-store-badge-ink: #ffffff;
    --ldl-store-badge-line: #a6a6a6;
    --ldl-success: oklch(0.75 0.15 150);
    --ldl-success-soft: oklch(0.30 0.06 150);
    --ldl-on-success: oklch(0.16 0.02 265);
    --ldl-warning: oklch(0.78 0.15 60);
    --ldl-warning-soft: oklch(0.32 0.07 55);
    --ldl-on-warning: oklch(0.16 0.02 265);
    --ldl-warning-ink: oklch(0.78 0.15 60);
    --ldl-error: oklch(0.70 0.19 25);
    --ldl-error-soft: oklch(0.30 0.09 25);
    --ldl-on-error: oklch(0.16 0.02 265);
    --ldl-info: oklch(0.75 0.13 250);
    --ldl-info-soft: oklch(0.30 0.06 250);
    --ldl-on-info: oklch(0.16 0.02 265);
    --ldl-words-of-christ: oklch(0.80 0.10 266.4);
    --ldl-shadow-sm: 0 1px 2px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.35);
    --ldl-shadow-md: 0 4px 12px rgba(0,0,0,0.45), 0 8px 24px rgba(0,0,0,0.4);
    --ldl-shadow-lg: 0 8px 24px rgba(0,0,0,0.5), 0 30px 70px rgba(0,0,0,0.55);
    --ldl-shadow-modal: 0 12px 40px rgba(0,0,0,0.6);
    --ldl-series-1: oklch(0.72 0.15 72);
    --ldl-series-2: oklch(0.70 0.14 250);
    --ldl-series-3: oklch(0.75 0.15 150);
    --ldl-series-4: oklch(0.72 0.16 40);
    --ldl-series-5: oklch(0.68 0.14 305);
    --ldl-series-6: oklch(0.78 0.12 195);
    --ldl-series-7: oklch(0.70 0.17 350);
    --ldl-series-8: oklch(0.72 0.10 100);
    --ldl-highlight-amber: oklch(0.34 0.1 85);
    --ldl-highlight-amber-line: oklch(0.54 0.15 85);
    --ldl-highlight-sage: oklch(0.34 0.1 145);
    --ldl-highlight-sage-line: oklch(0.54 0.15 145);
    --ldl-highlight-sky: oklch(0.34 0.1 230);
    --ldl-highlight-sky-line: oklch(0.54 0.15 230);
    --ldl-highlight-rose: oklch(0.34 0.1 355);
    --ldl-highlight-rose-line: oklch(0.54 0.15 355);
    --ldl-mark-color: #e0a03f;
    --ldl-mark-soft: #3a2e17;
    --ldl-mark-ink: #f2f4f7;
    --ldl-inverse-accent: oklch(0.82 0.13 72);
    --ldl-inverse-accent-soft: oklch(0.285 0.06 72);
    --ldl-inverse-accent-line: oklch(0.42 0.08 72);
    --ldl-lantern-words-of-christ: oklch(0.80 0.10 266.4);
    color-scheme: dark;
  }
}

[data-density="comfortable"] {
  --ldl-base-font: 17px;
  --ldl-ui-font: 15px;
  --ldl-ui-font-sm: 12px;
  --ldl-type-fineprint: 12.5px;
  --ldl-control-h: 48px;
  --ldl-control-py: 13px;
  --ldl-control-px: 22px;
  --ldl-control-radius: var(--ldl-radius-full);
  --ldl-card-radius: var(--ldl-radius-lg);
  --ldl-card-pad: 24px;
  --ldl-row-gap: 16px;
  --ldl-appbar-h: 60px;
  --ldl-iconbtn-size: 40px;
  --ldl-iconbtn-icon: var(--ldl-icon-md);
}

:root[data-density="compact"], [data-density="compact"] {
  --ldl-base-font: 14px;
  --ldl-ui-font: 14px;
  --ldl-ui-font-sm: 11px;
  --ldl-type-fineprint: 12px;
  --ldl-control-h: 36px;
  --ldl-control-py: 8px;
  --ldl-control-px: 16px;
  --ldl-control-radius: var(--ldl-radius-md);
  --ldl-card-radius: var(--ldl-radius-md);
  --ldl-card-pad: 16px;
  --ldl-row-gap: 12px;
  --ldl-appbar-h: 48px;
  --ldl-iconbtn-size: 34px;
  --ldl-iconbtn-icon: var(--ldl-icon-md);
}

:root[data-density="dense"], [data-density="dense"] {
  --ldl-base-font: 12px;
  --ldl-ui-font: 12px;
  --ldl-ui-font-sm: 10.5px;
  --ldl-type-fineprint: 12px;
  --ldl-control-h: 26px;
  --ldl-control-py: 4px;
  --ldl-control-px: 10px;
  --ldl-control-radius: var(--ldl-radius-xs);
  --ldl-card-radius: var(--ldl-radius-xs);
  --ldl-card-pad: 12px;
  --ldl-row-gap: 8px;
  --ldl-appbar-h: 34px;
  --ldl-iconbtn-size: 26px;
  --ldl-iconbtn-icon: var(--ldl-icon-sm);
}

[data-density]:not(:root) { font-size: calc(var(--ldl-base-font) * var(--ldl-fs-scale)); }

/* ---------- brands — set data-brand on :root or any subtree; default is willis ---------- */
[data-brand="willis"] { /* Willis — default accent willis */
  --ldl-accent-h: 72;
  --ldl-accent-label: "Willis Gold";
  --ldl-accent: oklch(0.56 0.15 72);
  --ldl-accent-ink: oklch(0.47 0.15 72);
  --ldl-accent-soft: oklch(0.955 0.032 72);
  --ldl-accent-line: oklch(0.86 0.06 72);
  --ldl-on-accent: #ffffff;
  --ldl-mark-color: #c5872b;
  --ldl-mark-soft: #f6ead4;
  --ldl-mark-ink: #161b23;
  --ldl-inverse-accent: oklch(0.82 0.13 72);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 72);
  --ldl-inverse-accent-line: oklch(0.42 0.08 72);
  --ldl-focus-color: var(--ldl-accent);
  --ldl-kicker-prefix: "// ";
}
:root[data-mode="dark"][data-brand="willis"], :root[data-mode="dark"] [data-brand="willis"] {
  --ldl-accent-h: 72;
  --ldl-accent-label: "Willis Gold";
  --ldl-accent: oklch(0.72 0.15 72);
  --ldl-accent-ink: oklch(0.82 0.13 72);
  --ldl-accent-soft: oklch(0.285 0.06 72);
  --ldl-accent-line: oklch(0.42 0.08 72);
  --ldl-on-accent: oklch(0.16 0.02 265);
  --ldl-mark-color: #e0a03f;
  --ldl-mark-soft: #3a2e17;
  --ldl-mark-ink: #f2f4f7;
  --ldl-inverse-accent: oklch(0.82 0.13 72);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 72);
  --ldl-inverse-accent-line: oklch(0.42 0.08 72);
}
[data-brand="lantern"] { /* Lantern Bible — default accent willis */
  --ldl-accent-h: 72;
  --ldl-accent-label: "Willis Gold";
  --ldl-accent: oklch(0.56 0.15 72);
  --ldl-accent-ink: oklch(0.47 0.15 72);
  --ldl-accent-soft: oklch(0.955 0.032 72);
  --ldl-accent-line: oklch(0.86 0.06 72);
  --ldl-on-accent: #ffffff;
  --ldl-mark-color: #B8934A;
  --ldl-mark-soft: #F0EADC;
  --ldl-mark-ink: #0F1B2E;
  --ldl-inverse-accent: oklch(0.82 0.13 72);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 72);
  --ldl-inverse-accent-line: oklch(0.42 0.08 72);
  --ldl-focus-color: var(--ldl-accent);
  --ldl-kicker-prefix: "";
}
:root[data-mode="dark"][data-brand="lantern"], :root[data-mode="dark"] [data-brand="lantern"] {
  --ldl-accent-h: 72;
  --ldl-accent-label: "Willis Gold";
  --ldl-accent: oklch(0.72 0.15 72);
  --ldl-accent-ink: oklch(0.82 0.13 72);
  --ldl-accent-soft: oklch(0.285 0.06 72);
  --ldl-accent-line: oklch(0.42 0.08 72);
  --ldl-on-accent: oklch(0.16 0.02 265);
  --ldl-mark-color: #B8934A;
  --ldl-mark-soft: #0F1B2E;
  --ldl-mark-ink: #F0EADC;
  --ldl-inverse-accent: oklch(0.82 0.13 72);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 72);
  --ldl-inverse-accent-line: oklch(0.42 0.08 72);
}
[data-brand="cardloom"] { /* CardLoom — default accent loom */
  --ldl-accent-h: 280;
  --ldl-accent-label: "Loom Indigo";
  --ldl-accent: oklch(0.56 0.15 280);
  --ldl-accent-ink: oklch(0.47 0.15 280);
  --ldl-accent-soft: oklch(0.955 0.032 280);
  --ldl-accent-line: oklch(0.86 0.06 280);
  --ldl-on-accent: #ffffff;
  --ldl-mark-color: #6C63FF;
  --ldl-mark-soft: #EEF0FF;
  --ldl-mark-ink: #161b23;
  --ldl-inverse-accent: oklch(0.82 0.13 280);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 280);
  --ldl-inverse-accent-line: oklch(0.42 0.08 280);
  --ldl-focus-color: var(--ldl-accent);
  --ldl-kicker-prefix: "// ";
}
:root[data-mode="dark"][data-brand="cardloom"], :root[data-mode="dark"] [data-brand="cardloom"] {
  --ldl-accent-h: 280;
  --ldl-accent-label: "Loom Indigo";
  --ldl-accent: oklch(0.72 0.15 280);
  --ldl-accent-ink: oklch(0.82 0.13 280);
  --ldl-accent-soft: oklch(0.285 0.06 280);
  --ldl-accent-line: oklch(0.42 0.08 280);
  --ldl-on-accent: oklch(0.16 0.02 265);
  --ldl-mark-color: #A5B4FC;
  --ldl-mark-soft: oklch(0.285 0.06 280);
  --ldl-mark-ink: #f2f4f7;
  --ldl-inverse-accent: oklch(0.82 0.13 280);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 280);
  --ldl-inverse-accent-line: oklch(0.42 0.08 280);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"])[data-brand="willis"], :root:not([data-mode="light"]) [data-brand="willis"] {
    --ldl-accent-h: 72;
    --ldl-accent-label: "Willis Gold";
    --ldl-accent: oklch(0.72 0.15 72);
    --ldl-accent-ink: oklch(0.82 0.13 72);
    --ldl-accent-soft: oklch(0.285 0.06 72);
    --ldl-accent-line: oklch(0.42 0.08 72);
    --ldl-on-accent: oklch(0.16 0.02 265);
    --ldl-mark-color: #e0a03f;
    --ldl-mark-soft: #3a2e17;
    --ldl-mark-ink: #f2f4f7;
    --ldl-inverse-accent: oklch(0.82 0.13 72);
    --ldl-inverse-accent-soft: oklch(0.285 0.06 72);
    --ldl-inverse-accent-line: oklch(0.42 0.08 72);
  }
  :root:not([data-mode="light"])[data-brand="lantern"], :root:not([data-mode="light"]) [data-brand="lantern"] {
    --ldl-accent-h: 72;
    --ldl-accent-label: "Willis Gold";
    --ldl-accent: oklch(0.72 0.15 72);
    --ldl-accent-ink: oklch(0.82 0.13 72);
    --ldl-accent-soft: oklch(0.285 0.06 72);
    --ldl-accent-line: oklch(0.42 0.08 72);
    --ldl-on-accent: oklch(0.16 0.02 265);
    --ldl-mark-color: #B8934A;
    --ldl-mark-soft: #0F1B2E;
    --ldl-mark-ink: #F0EADC;
    --ldl-inverse-accent: oklch(0.82 0.13 72);
    --ldl-inverse-accent-soft: oklch(0.285 0.06 72);
    --ldl-inverse-accent-line: oklch(0.42 0.08 72);
  }
  :root:not([data-mode="light"])[data-brand="cardloom"], :root:not([data-mode="light"]) [data-brand="cardloom"] {
    --ldl-accent-h: 280;
    --ldl-accent-label: "Loom Indigo";
    --ldl-accent: oklch(0.72 0.15 280);
    --ldl-accent-ink: oklch(0.82 0.13 280);
    --ldl-accent-soft: oklch(0.285 0.06 280);
    --ldl-accent-line: oklch(0.42 0.08 280);
    --ldl-on-accent: oklch(0.16 0.02 265);
    --ldl-mark-color: #A5B4FC;
    --ldl-mark-soft: oklch(0.285 0.06 280);
    --ldl-mark-ink: #f2f4f7;
    --ldl-inverse-accent: oklch(0.82 0.13 280);
    --ldl-inverse-accent-soft: oklch(0.285 0.06 280);
    --ldl-inverse-accent-line: oklch(0.42 0.08 280);
  }
}

/* ---------- named accent ramps — set data-accent on :root; default is Willis Gold ---------- */
:root[data-accent="willis"] { /* Willis Gold (hue 72) */
  --ldl-accent-h: 72;
  --ldl-accent-label: "Willis Gold";
  --ldl-accent: oklch(0.56 0.15 72);
  --ldl-accent-ink: oklch(0.47 0.15 72);
  --ldl-accent-soft: oklch(0.955 0.032 72);
  --ldl-accent-line: oklch(0.86 0.06 72);
  --ldl-on-accent: #ffffff;
  --ldl-inverse-accent: oklch(0.82 0.13 72);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 72);
  --ldl-inverse-accent-line: oklch(0.42 0.08 72);
}
:root[data-mode="dark"][data-accent="willis"] {
  --ldl-accent-h: 72;
  --ldl-accent-label: "Willis Gold";
  --ldl-accent: oklch(0.72 0.15 72);
  --ldl-accent-ink: oklch(0.82 0.13 72);
  --ldl-accent-soft: oklch(0.285 0.06 72);
  --ldl-accent-line: oklch(0.42 0.08 72);
  --ldl-on-accent: oklch(0.16 0.02 265);
  --ldl-inverse-accent: oklch(0.82 0.13 72);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 72);
  --ldl-inverse-accent-line: oklch(0.42 0.08 72);
}
:root[data-accent="crimson"] { /* Crimson (hue 15) */
  --ldl-accent-h: 15;
  --ldl-accent-label: "Crimson";
  --ldl-accent: oklch(0.56 0.15 15);
  --ldl-accent-ink: oklch(0.47 0.15 15);
  --ldl-accent-soft: oklch(0.955 0.032 15);
  --ldl-accent-line: oklch(0.86 0.06 15);
  --ldl-on-accent: #ffffff;
  --ldl-inverse-accent: oklch(0.82 0.13 15);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 15);
  --ldl-inverse-accent-line: oklch(0.42 0.08 15);
}
:root[data-mode="dark"][data-accent="crimson"] {
  --ldl-accent-h: 15;
  --ldl-accent-label: "Crimson";
  --ldl-accent: oklch(0.72 0.15 15);
  --ldl-accent-ink: oklch(0.82 0.13 15);
  --ldl-accent-soft: oklch(0.285 0.06 15);
  --ldl-accent-line: oklch(0.42 0.08 15);
  --ldl-on-accent: oklch(0.16 0.02 265);
  --ldl-inverse-accent: oklch(0.82 0.13 15);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 15);
  --ldl-inverse-accent-line: oklch(0.42 0.08 15);
}
:root[data-accent="desert"] { /* Desert Clay (hue 45) */
  --ldl-accent-h: 45;
  --ldl-accent-label: "Desert Clay";
  --ldl-accent: oklch(0.56 0.15 45);
  --ldl-accent-ink: oklch(0.47 0.15 45);
  --ldl-accent-soft: oklch(0.955 0.032 45);
  --ldl-accent-line: oklch(0.86 0.06 45);
  --ldl-on-accent: #ffffff;
  --ldl-inverse-accent: oklch(0.82 0.13 45);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 45);
  --ldl-inverse-accent-line: oklch(0.42 0.08 45);
}
:root[data-mode="dark"][data-accent="desert"] {
  --ldl-accent-h: 45;
  --ldl-accent-label: "Desert Clay";
  --ldl-accent: oklch(0.72 0.15 45);
  --ldl-accent-ink: oklch(0.82 0.13 45);
  --ldl-accent-soft: oklch(0.285 0.06 45);
  --ldl-accent-line: oklch(0.42 0.08 45);
  --ldl-on-accent: oklch(0.16 0.02 265);
  --ldl-inverse-accent: oklch(0.82 0.13 45);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 45);
  --ldl-inverse-accent-line: oklch(0.42 0.08 45);
}
:root[data-accent="forest"] { /* Forest Green (hue 143) */
  --ldl-accent-h: 143;
  --ldl-accent-label: "Forest Green";
  --ldl-accent: oklch(0.56 0.15 143);
  --ldl-accent-ink: oklch(0.47 0.15 143);
  --ldl-accent-soft: oklch(0.955 0.032 143);
  --ldl-accent-line: oklch(0.86 0.06 143);
  --ldl-on-accent: #ffffff;
  --ldl-inverse-accent: oklch(0.82 0.13 143);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 143);
  --ldl-inverse-accent-line: oklch(0.42 0.08 143);
}
:root[data-mode="dark"][data-accent="forest"] {
  --ldl-accent-h: 143;
  --ldl-accent-label: "Forest Green";
  --ldl-accent: oklch(0.72 0.15 143);
  --ldl-accent-ink: oklch(0.82 0.13 143);
  --ldl-accent-soft: oklch(0.285 0.06 143);
  --ldl-accent-line: oklch(0.42 0.08 143);
  --ldl-on-accent: oklch(0.16 0.02 265);
  --ldl-inverse-accent: oklch(0.82 0.13 143);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 143);
  --ldl-inverse-accent-line: oklch(0.42 0.08 143);
}
:root[data-accent="harbor"] { /* Harbor Teal (hue 192) */
  --ldl-accent-h: 192;
  --ldl-accent-label: "Harbor Teal";
  --ldl-accent: oklch(0.56 0.15 192);
  --ldl-accent-ink: oklch(0.47 0.15 192);
  --ldl-accent-soft: oklch(0.955 0.032 192);
  --ldl-accent-line: oklch(0.86 0.06 192);
  --ldl-on-accent: #ffffff;
  --ldl-inverse-accent: oklch(0.82 0.13 192);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 192);
  --ldl-inverse-accent-line: oklch(0.42 0.08 192);
}
:root[data-mode="dark"][data-accent="harbor"] {
  --ldl-accent-h: 192;
  --ldl-accent-label: "Harbor Teal";
  --ldl-accent: oklch(0.72 0.15 192);
  --ldl-accent-ink: oklch(0.82 0.13 192);
  --ldl-accent-soft: oklch(0.285 0.06 192);
  --ldl-accent-line: oklch(0.42 0.08 192);
  --ldl-on-accent: oklch(0.16 0.02 265);
  --ldl-inverse-accent: oklch(0.82 0.13 192);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 192);
  --ldl-inverse-accent-line: oklch(0.42 0.08 192);
}
:root[data-accent="polar"] { /* Polar Ice (hue 215) */
  --ldl-accent-h: 215;
  --ldl-accent-label: "Polar Ice";
  --ldl-accent: oklch(0.56 0.15 215);
  --ldl-accent-ink: oklch(0.47 0.15 215);
  --ldl-accent-soft: oklch(0.955 0.032 215);
  --ldl-accent-line: oklch(0.86 0.06 215);
  --ldl-on-accent: #ffffff;
  --ldl-inverse-accent: oklch(0.82 0.13 215);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 215);
  --ldl-inverse-accent-line: oklch(0.42 0.08 215);
}
:root[data-mode="dark"][data-accent="polar"] {
  --ldl-accent-h: 215;
  --ldl-accent-label: "Polar Ice";
  --ldl-accent: oklch(0.72 0.15 215);
  --ldl-accent-ink: oklch(0.82 0.13 215);
  --ldl-accent-soft: oklch(0.285 0.06 215);
  --ldl-accent-line: oklch(0.42 0.08 215);
  --ldl-on-accent: oklch(0.16 0.02 265);
  --ldl-inverse-accent: oklch(0.82 0.13 215);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 215);
  --ldl-inverse-accent-line: oklch(0.42 0.08 215);
}
:root[data-accent="standard"] { /* Standard Blue (hue 249) */
  --ldl-accent-h: 249;
  --ldl-accent-label: "Standard Blue";
  --ldl-accent: oklch(0.56 0.15 249);
  --ldl-accent-ink: oklch(0.47 0.15 249);
  --ldl-accent-soft: oklch(0.955 0.032 249);
  --ldl-accent-line: oklch(0.86 0.06 249);
  --ldl-on-accent: #ffffff;
  --ldl-inverse-accent: oklch(0.82 0.13 249);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 249);
  --ldl-inverse-accent-line: oklch(0.42 0.08 249);
}
:root[data-mode="dark"][data-accent="standard"] {
  --ldl-accent-h: 249;
  --ldl-accent-label: "Standard Blue";
  --ldl-accent: oklch(0.72 0.15 249);
  --ldl-accent-ink: oklch(0.82 0.13 249);
  --ldl-accent-soft: oklch(0.285 0.06 249);
  --ldl-accent-line: oklch(0.42 0.08 249);
  --ldl-on-accent: oklch(0.16 0.02 265);
  --ldl-inverse-accent: oklch(0.82 0.13 249);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 249);
  --ldl-inverse-accent-line: oklch(0.42 0.08 249);
}
:root[data-accent="blue-moon"] { /* Blue Moon (hue 271) */
  --ldl-accent-h: 271;
  --ldl-accent-label: "Blue Moon";
  --ldl-accent: oklch(0.56 0.15 271);
  --ldl-accent-ink: oklch(0.47 0.15 271);
  --ldl-accent-soft: oklch(0.955 0.032 271);
  --ldl-accent-line: oklch(0.86 0.06 271);
  --ldl-on-accent: #ffffff;
  --ldl-inverse-accent: oklch(0.82 0.13 271);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 271);
  --ldl-inverse-accent-line: oklch(0.42 0.08 271);
}
:root[data-mode="dark"][data-accent="blue-moon"] {
  --ldl-accent-h: 271;
  --ldl-accent-label: "Blue Moon";
  --ldl-accent: oklch(0.72 0.15 271);
  --ldl-accent-ink: oklch(0.82 0.13 271);
  --ldl-accent-soft: oklch(0.285 0.06 271);
  --ldl-accent-line: oklch(0.42 0.08 271);
  --ldl-on-accent: oklch(0.16 0.02 265);
  --ldl-inverse-accent: oklch(0.82 0.13 271);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 271);
  --ldl-inverse-accent-line: oklch(0.42 0.08 271);
}
:root[data-accent="amethyst"] { /* Amethyst (hue 310) */
  --ldl-accent-h: 310;
  --ldl-accent-label: "Amethyst";
  --ldl-accent: oklch(0.56 0.15 310);
  --ldl-accent-ink: oklch(0.47 0.15 310);
  --ldl-accent-soft: oklch(0.955 0.032 310);
  --ldl-accent-line: oklch(0.86 0.06 310);
  --ldl-on-accent: #ffffff;
  --ldl-inverse-accent: oklch(0.82 0.13 310);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 310);
  --ldl-inverse-accent-line: oklch(0.42 0.08 310);
}
:root[data-mode="dark"][data-accent="amethyst"] {
  --ldl-accent-h: 310;
  --ldl-accent-label: "Amethyst";
  --ldl-accent: oklch(0.72 0.15 310);
  --ldl-accent-ink: oklch(0.82 0.13 310);
  --ldl-accent-soft: oklch(0.285 0.06 310);
  --ldl-accent-line: oklch(0.42 0.08 310);
  --ldl-on-accent: oklch(0.16 0.02 265);
  --ldl-inverse-accent: oklch(0.82 0.13 310);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 310);
  --ldl-inverse-accent-line: oklch(0.42 0.08 310);
}
:root[data-accent="rose"] { /* Rose (hue 350) */
  --ldl-accent-h: 350;
  --ldl-accent-label: "Rose";
  --ldl-accent: oklch(0.56 0.15 350);
  --ldl-accent-ink: oklch(0.47 0.15 350);
  --ldl-accent-soft: oklch(0.955 0.032 350);
  --ldl-accent-line: oklch(0.86 0.06 350);
  --ldl-on-accent: #ffffff;
  --ldl-inverse-accent: oklch(0.82 0.13 350);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 350);
  --ldl-inverse-accent-line: oklch(0.42 0.08 350);
}
:root[data-mode="dark"][data-accent="rose"] {
  --ldl-accent-h: 350;
  --ldl-accent-label: "Rose";
  --ldl-accent: oklch(0.72 0.15 350);
  --ldl-accent-ink: oklch(0.82 0.13 350);
  --ldl-accent-soft: oklch(0.285 0.06 350);
  --ldl-accent-line: oklch(0.42 0.08 350);
  --ldl-on-accent: oklch(0.16 0.02 265);
  --ldl-inverse-accent: oklch(0.82 0.13 350);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 350);
  --ldl-inverse-accent-line: oklch(0.42 0.08 350);
}
:root[data-accent="monochrome"] { /* Monochrome (hue 265) */
  --ldl-accent-h: 265;
  --ldl-accent-label: "Monochrome";
  --ldl-accent: oklch(0.56 0 265);
  --ldl-accent-ink: oklch(0.47 0 265);
  --ldl-accent-soft: oklch(0.955 0 265);
  --ldl-accent-line: oklch(0.86 0 265);
  --ldl-on-accent: #ffffff;
  --ldl-inverse-accent: oklch(0.82 0 265);
  --ldl-inverse-accent-soft: oklch(0.285 0 265);
  --ldl-inverse-accent-line: oklch(0.42 0 265);
}
:root[data-mode="dark"][data-accent="monochrome"] {
  --ldl-accent-h: 265;
  --ldl-accent-label: "Monochrome";
  --ldl-accent: oklch(0.72 0 265);
  --ldl-accent-ink: oklch(0.82 0 265);
  --ldl-accent-soft: oklch(0.285 0 265);
  --ldl-accent-line: oklch(0.42 0 265);
  --ldl-on-accent: oklch(0.16 0.02 265);
  --ldl-inverse-accent: oklch(0.82 0 265);
  --ldl-inverse-accent-soft: oklch(0.285 0 265);
  --ldl-inverse-accent-line: oklch(0.42 0 265);
}
:root[data-accent="loom"] { /* Loom Indigo (hue 280) */
  --ldl-accent-h: 280;
  --ldl-accent-label: "Loom Indigo";
  --ldl-accent: oklch(0.56 0.15 280);
  --ldl-accent-ink: oklch(0.47 0.15 280);
  --ldl-accent-soft: oklch(0.955 0.032 280);
  --ldl-accent-line: oklch(0.86 0.06 280);
  --ldl-on-accent: #ffffff;
  --ldl-inverse-accent: oklch(0.82 0.13 280);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 280);
  --ldl-inverse-accent-line: oklch(0.42 0.08 280);
}
:root[data-mode="dark"][data-accent="loom"] {
  --ldl-accent-h: 280;
  --ldl-accent-label: "Loom Indigo";
  --ldl-accent: oklch(0.72 0.15 280);
  --ldl-accent-ink: oklch(0.82 0.13 280);
  --ldl-accent-soft: oklch(0.285 0.06 280);
  --ldl-accent-line: oklch(0.42 0.08 280);
  --ldl-on-accent: oklch(0.16 0.02 265);
  --ldl-inverse-accent: oklch(0.82 0.13 280);
  --ldl-inverse-accent-soft: oklch(0.285 0.06 280);
  --ldl-inverse-accent-line: oklch(0.42 0.08 280);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"])[data-accent="willis"] {
    --ldl-accent-h: 72;
    --ldl-accent-label: "Willis Gold";
    --ldl-accent: oklch(0.72 0.15 72);
    --ldl-accent-ink: oklch(0.82 0.13 72);
    --ldl-accent-soft: oklch(0.285 0.06 72);
    --ldl-accent-line: oklch(0.42 0.08 72);
    --ldl-on-accent: oklch(0.16 0.02 265);
    --ldl-inverse-accent: oklch(0.82 0.13 72);
    --ldl-inverse-accent-soft: oklch(0.285 0.06 72);
    --ldl-inverse-accent-line: oklch(0.42 0.08 72);
  }
  :root:not([data-mode="light"])[data-accent="crimson"] {
    --ldl-accent-h: 15;
    --ldl-accent-label: "Crimson";
    --ldl-accent: oklch(0.72 0.15 15);
    --ldl-accent-ink: oklch(0.82 0.13 15);
    --ldl-accent-soft: oklch(0.285 0.06 15);
    --ldl-accent-line: oklch(0.42 0.08 15);
    --ldl-on-accent: oklch(0.16 0.02 265);
    --ldl-inverse-accent: oklch(0.82 0.13 15);
    --ldl-inverse-accent-soft: oklch(0.285 0.06 15);
    --ldl-inverse-accent-line: oklch(0.42 0.08 15);
  }
  :root:not([data-mode="light"])[data-accent="desert"] {
    --ldl-accent-h: 45;
    --ldl-accent-label: "Desert Clay";
    --ldl-accent: oklch(0.72 0.15 45);
    --ldl-accent-ink: oklch(0.82 0.13 45);
    --ldl-accent-soft: oklch(0.285 0.06 45);
    --ldl-accent-line: oklch(0.42 0.08 45);
    --ldl-on-accent: oklch(0.16 0.02 265);
    --ldl-inverse-accent: oklch(0.82 0.13 45);
    --ldl-inverse-accent-soft: oklch(0.285 0.06 45);
    --ldl-inverse-accent-line: oklch(0.42 0.08 45);
  }
  :root:not([data-mode="light"])[data-accent="forest"] {
    --ldl-accent-h: 143;
    --ldl-accent-label: "Forest Green";
    --ldl-accent: oklch(0.72 0.15 143);
    --ldl-accent-ink: oklch(0.82 0.13 143);
    --ldl-accent-soft: oklch(0.285 0.06 143);
    --ldl-accent-line: oklch(0.42 0.08 143);
    --ldl-on-accent: oklch(0.16 0.02 265);
    --ldl-inverse-accent: oklch(0.82 0.13 143);
    --ldl-inverse-accent-soft: oklch(0.285 0.06 143);
    --ldl-inverse-accent-line: oklch(0.42 0.08 143);
  }
  :root:not([data-mode="light"])[data-accent="harbor"] {
    --ldl-accent-h: 192;
    --ldl-accent-label: "Harbor Teal";
    --ldl-accent: oklch(0.72 0.15 192);
    --ldl-accent-ink: oklch(0.82 0.13 192);
    --ldl-accent-soft: oklch(0.285 0.06 192);
    --ldl-accent-line: oklch(0.42 0.08 192);
    --ldl-on-accent: oklch(0.16 0.02 265);
    --ldl-inverse-accent: oklch(0.82 0.13 192);
    --ldl-inverse-accent-soft: oklch(0.285 0.06 192);
    --ldl-inverse-accent-line: oklch(0.42 0.08 192);
  }
  :root:not([data-mode="light"])[data-accent="polar"] {
    --ldl-accent-h: 215;
    --ldl-accent-label: "Polar Ice";
    --ldl-accent: oklch(0.72 0.15 215);
    --ldl-accent-ink: oklch(0.82 0.13 215);
    --ldl-accent-soft: oklch(0.285 0.06 215);
    --ldl-accent-line: oklch(0.42 0.08 215);
    --ldl-on-accent: oklch(0.16 0.02 265);
    --ldl-inverse-accent: oklch(0.82 0.13 215);
    --ldl-inverse-accent-soft: oklch(0.285 0.06 215);
    --ldl-inverse-accent-line: oklch(0.42 0.08 215);
  }
  :root:not([data-mode="light"])[data-accent="standard"] {
    --ldl-accent-h: 249;
    --ldl-accent-label: "Standard Blue";
    --ldl-accent: oklch(0.72 0.15 249);
    --ldl-accent-ink: oklch(0.82 0.13 249);
    --ldl-accent-soft: oklch(0.285 0.06 249);
    --ldl-accent-line: oklch(0.42 0.08 249);
    --ldl-on-accent: oklch(0.16 0.02 265);
    --ldl-inverse-accent: oklch(0.82 0.13 249);
    --ldl-inverse-accent-soft: oklch(0.285 0.06 249);
    --ldl-inverse-accent-line: oklch(0.42 0.08 249);
  }
  :root:not([data-mode="light"])[data-accent="blue-moon"] {
    --ldl-accent-h: 271;
    --ldl-accent-label: "Blue Moon";
    --ldl-accent: oklch(0.72 0.15 271);
    --ldl-accent-ink: oklch(0.82 0.13 271);
    --ldl-accent-soft: oklch(0.285 0.06 271);
    --ldl-accent-line: oklch(0.42 0.08 271);
    --ldl-on-accent: oklch(0.16 0.02 265);
    --ldl-inverse-accent: oklch(0.82 0.13 271);
    --ldl-inverse-accent-soft: oklch(0.285 0.06 271);
    --ldl-inverse-accent-line: oklch(0.42 0.08 271);
  }
  :root:not([data-mode="light"])[data-accent="amethyst"] {
    --ldl-accent-h: 310;
    --ldl-accent-label: "Amethyst";
    --ldl-accent: oklch(0.72 0.15 310);
    --ldl-accent-ink: oklch(0.82 0.13 310);
    --ldl-accent-soft: oklch(0.285 0.06 310);
    --ldl-accent-line: oklch(0.42 0.08 310);
    --ldl-on-accent: oklch(0.16 0.02 265);
    --ldl-inverse-accent: oklch(0.82 0.13 310);
    --ldl-inverse-accent-soft: oklch(0.285 0.06 310);
    --ldl-inverse-accent-line: oklch(0.42 0.08 310);
  }
  :root:not([data-mode="light"])[data-accent="rose"] {
    --ldl-accent-h: 350;
    --ldl-accent-label: "Rose";
    --ldl-accent: oklch(0.72 0.15 350);
    --ldl-accent-ink: oklch(0.82 0.13 350);
    --ldl-accent-soft: oklch(0.285 0.06 350);
    --ldl-accent-line: oklch(0.42 0.08 350);
    --ldl-on-accent: oklch(0.16 0.02 265);
    --ldl-inverse-accent: oklch(0.82 0.13 350);
    --ldl-inverse-accent-soft: oklch(0.285 0.06 350);
    --ldl-inverse-accent-line: oklch(0.42 0.08 350);
  }
  :root:not([data-mode="light"])[data-accent="monochrome"] {
    --ldl-accent-h: 265;
    --ldl-accent-label: "Monochrome";
    --ldl-accent: oklch(0.72 0 265);
    --ldl-accent-ink: oklch(0.82 0 265);
    --ldl-accent-soft: oklch(0.285 0 265);
    --ldl-accent-line: oklch(0.42 0 265);
    --ldl-on-accent: oklch(0.16 0.02 265);
    --ldl-inverse-accent: oklch(0.82 0 265);
    --ldl-inverse-accent-soft: oklch(0.285 0 265);
    --ldl-inverse-accent-line: oklch(0.42 0 265);
  }
  :root:not([data-mode="light"])[data-accent="loom"] {
    --ldl-accent-h: 280;
    --ldl-accent-label: "Loom Indigo";
    --ldl-accent: oklch(0.72 0.15 280);
    --ldl-accent-ink: oklch(0.82 0.13 280);
    --ldl-accent-soft: oklch(0.285 0.06 280);
    --ldl-accent-line: oklch(0.42 0.08 280);
    --ldl-on-accent: oklch(0.16 0.02 265);
    --ldl-inverse-accent: oklch(0.82 0.13 280);
    --ldl-inverse-accent-soft: oklch(0.285 0.06 280);
    --ldl-inverse-accent-line: oklch(0.42 0.08 280);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html.ldl, :root {
  /* iOS silently inflates text in wide/overflowing blocks unless this is pinned. Our scaling
     is intentional (--ldl-fs-scale); we don't want the OS second-guessing it. */
  -webkit-text-size-adjust: 100%;
}
body.ldl {
  margin: 0;
  background: var(--ldl-paper);
  color: var(--ldl-ink);
  font-family: var(--ldl-font-body);
  font-size: calc(var(--ldl-base-font) * var(--ldl-fs-scale));
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* The safety net. A long unbroken string — a file path, a URL, a German compound, a 40-char
     palette command — otherwise punches out of its container, and with nothing clipping the
     body that becomes a page-level horizontal scroll. Horizontal page scroll is the one
     unforgivable mobile bug, so it is defended here once rather than per-component. */
  overflow-wrap: break-word;
}
/* Replaced elements never exceed their column (a chart canvas, a screenshot, an SVG diagram). */
img, svg, video, canvas, iframe { max-width: 100%; }
/* Preformatted text scrolls itself instead of widening the page. */
pre { overflow-x: auto; max-width: 100%; }
.ldl-wrap { max-width: var(--ldl-maxw); margin-inline: auto; padding-inline: var(--ldl-space-6); }
.ldl-wrap-tight { max-width: var(--ldl-maxw-tight); }

/* Bidi isolation. User content (a callsign, a filename, a URL) dropped into a sentence in the
   opposite direction will otherwise scramble the punctuation around it — the classic
   "(W1AW ‏(2024" bug in an Arabic UI. Wrap any interpolated foreign-direction string in this. */
.ldl-bidi { unicode-bidi: isolate; }

/* ---------- type helpers ---------- */
.ldl-display1 { font-family: var(--ldl-font-display); font-size: var(--ldl-type-display1-size); font-weight: var(--ldl-type-display1-weight); line-height: var(--ldl-type-display1-leading); letter-spacing: var(--ldl-type-display1-tracking); text-wrap: balance; }
.ldl-h1 { font-family: var(--ldl-font-display); font-size: var(--ldl-type-h1-size); font-weight: var(--ldl-type-h1-weight); line-height: var(--ldl-type-h1-leading); letter-spacing: var(--ldl-type-h1-tracking); text-wrap: balance; }
.ldl-h2 { font-family: var(--ldl-font-display); font-size: var(--ldl-type-h2-size); font-weight: var(--ldl-type-h2-weight); line-height: var(--ldl-type-h2-leading); letter-spacing: var(--ldl-type-h2-tracking); }
.ldl-h3 { font-family: var(--ldl-font-display); font-size: var(--ldl-type-h3-size); font-weight: var(--ldl-type-h3-weight); line-height: var(--ldl-type-h3-leading); }
.ldl-mono { font-family: var(--ldl-font-mono); }
.ldl-kicker { font-family: var(--ldl-font-mono); font-size: var(--ldl-type-kicker-size); letter-spacing: var(--ldl-type-kicker-tracking); text-transform: uppercase; color: var(--ldl-accent-ink); }
.ldl-kicker::before { content: var(--ldl-kicker-prefix); opacity: 0.6; }
.ldl-muted { color: var(--ldl-ink3); }

/* ---------- buttons ---------- */
.ldl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--ldl-space-2);
  font-family: var(--ldl-font-body); font-weight: var(--ldl-weight-semibold);
  font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); line-height: var(--ldl-control-leading);
  min-height: var(--ldl-control-h);
  padding: var(--ldl-control-py) var(--ldl-control-px);
  border-radius: var(--ldl-control-radius);
  border: 1px solid var(--ldl-line2);
  background: var(--ldl-card); color: var(--ldl-ink);
  cursor: pointer; transition: transform var(--ldl-motion-fast) var(--ldl-motion-ease), background var(--ldl-motion-fast), border-color var(--ldl-motion-fast);
  /* an <a class="ldl-btn"> (every website CTA is a link) must not inherit the link underline */
  text-decoration: none;
  /* A button sizes to its content, so a long label simply makes it wider than the screen — and
     German runs ~35% longer than English ("Verbindungseinstellungen speichern"). max-width alone
     does NOT fix this: as a flex item the button's min-width defaults to auto, i.e. its
     min-content width, and min-width beats max-width. min-width:0 is what actually lets it
     shrink, and overflow-wrap is what lets the compound word break instead of pushing the page
     sideways. Caught by the preview's hostile section, which is exactly what it is for. */
  max-width: 100%; min-width: 0; overflow-wrap: break-word;
}
/* Hover is a POINTER capability, not a universal one. On iOS/Android :hover latches after a
   tap and stays until you tap elsewhere — so an unguarded lift leaves a button stuck mid-air
   and a card wearing accent-line, which is this system's SELECTION signal (see the green-vs-gold
   rule). Every hover-only visual therefore lives behind (hover: hover). :active is NOT guarded:
   the press-down is real on touch and is what gives a tap its feedback. */
@media (hover: hover) {
  .ldl-btn:hover { border-color: var(--ldl-ink); }
  .ldl-btn-primary:hover { transform: translateY(-2px); box-shadow: var(--ldl-shadow-md); border-color: transparent; }
}
.ldl-btn:active { transform: translateY(1px); }
.ldl-btn-primary { background: var(--ldl-accent); color: var(--ldl-on-accent); border-color: transparent; }
.ldl-btn-ghost { background: transparent; }

/* ---------- surfaces ---------- */
.ldl-card {
  background: var(--ldl-card); border: 1px solid var(--ldl-line);
  border-radius: var(--ldl-card-radius); padding: var(--ldl-card-pad);
  transition: transform var(--ldl-motion-normal) var(--ldl-motion-ease), box-shadow var(--ldl-motion-normal), border-color var(--ldl-motion-normal);
}
@media (hover: hover) {
  .ldl-card-hover:hover { transform: translateY(-3px); box-shadow: var(--ldl-shadow-md); border-color: var(--ldl-accent-line); }
}
.ldl-panel { background: var(--ldl-paper2); border: 1px solid var(--ldl-line); border-radius: var(--ldl-card-radius); padding: var(--ldl-card-pad); }

/* ---------- inputs ---------- */
/* Controls carry an explicit leading (font.leading.control). Left alone, browsers reset them to
   line-height: normal, and on WebKitGTK (every Tauri app on Linux) "normal" comes from the
   tallest face in the fallback stack rather than the text size — a dense 12px select drew a 35px
   line box and a 56px-tall app-bar control. Chromium lands near 1.3x by luck, which is why
   Windows never showed it. */
.ldl-input, .ldl-select {
  font-family: var(--ldl-font-body); font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale));
  line-height: var(--ldl-control-leading);
  min-height: var(--ldl-control-h);
  padding: var(--ldl-control-py) var(--ldl-space-3);
  background: var(--ldl-recessed); color: var(--ldl-ink);
  border: 1px solid var(--ldl-line2); border-radius: var(--ldl-control-radius);
}
/* A native-appearance <select> on WebKit (Linux, macOS, iOS) IGNORES line-height and forces
   "normal" — so the leading above only lands once the native face is dropped. The kit therefore
   draws its own chevron: two hairline diagonals in currentColor (a data-URI SVG cannot read a
   token, and a select has no ::after to mask). Only the closed control changes — the list that
   opens is still the OS picker on every platform. [multiple]/[size] are list boxes, not
   drop-downs, and keep the native face. Physical background-position, so RTL flips it below. */
.ldl-select:not([multiple]):not([size]) {
  appearance: none;
  --ldl-chev: 0.35em;
  --ldl-chev-stroke: calc(50% - 0.75px), currentColor calc(50% - 0.75px), currentColor calc(50% + 0.75px), transparent calc(50% + 0.75px);
  padding-inline-end: calc(var(--ldl-space-3) * 2 + var(--ldl-chev) * 2);
  background-image:
    linear-gradient(45deg, transparent var(--ldl-chev-stroke)),
    linear-gradient(135deg, transparent var(--ldl-chev-stroke));
  background-size: var(--ldl-chev) var(--ldl-chev);
  background-repeat: no-repeat;
  background-position:
    right calc(var(--ldl-space-3) + var(--ldl-chev)) center,
    right var(--ldl-space-3) center;
}
[dir="rtl"] .ldl-select:not([multiple]):not([size]) {
  background-position:
    left var(--ldl-space-3) center,
    left calc(var(--ldl-space-3) + var(--ldl-chev)) center;
}
/* Bare form elements inside body.ldl take the page face instead of the engine's control font
   (Arial / Noto Sans / DejaVu Sans depending on the OS). :where() = zero specificity, so any
   class — the kit's or the app's — still wins. */
:where(body.ldl) :where(button, input, select, textarea) { font: inherit; }
/* Leading lives at the ROOT with zero specificity, not only under body.ldl. A JS-styled app (the
   "no app CSS" contract WillisLogger and WillisRig follow) never puts .ldl on <body>, so its text
   fell back to line-height: normal, which WebKitGTK sets at ~2.1x the type: WillisRig's
   fixed-height radio display collapsed (willisrig #36). body.ldl still sets 1.55 for the page. */
:where(html) { line-height: 1.55; }
:where(html) :where(button, input, select) { line-height: var(--ldl-control-leading); }
.ldl-input:focus, .ldl-select:focus { outline: 2px solid var(--ldl-accent); outline-offset: 1px; border-color: var(--ldl-accent); }

/* ---------- badges / pills ---------- */
.ldl-badge {
  display: inline-flex; align-items: center; gap: var(--ldl-space-1);
  font-family: var(--ldl-font-mono); font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale));
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 2px var(--ldl-space-2); border-radius: var(--ldl-radius-full);
  border: 1px solid var(--ldl-line2); color: var(--ldl-ink2);
}
.ldl-badge-accent  { background: var(--ldl-accent-soft); border-color: var(--ldl-accent-line); color: var(--ldl-accent-ink); }
.ldl-badge-success { background: var(--ldl-success-soft); border-color: transparent; color: var(--ldl-success); }
.ldl-badge-warning { background: var(--ldl-warning-soft); border-color: transparent; color: var(--ldl-warning-ink); }
.ldl-badge-error   { background: var(--ldl-error-soft); border-color: transparent; color: var(--ldl-error); }
.ldl-badge-info    { background: var(--ldl-info-soft); border-color: transparent; color: var(--ldl-info); }

/* ---------- node/diamond motif ---------- */
.ldl-node { display: inline-block; width: 7px; height: 7px; background: var(--ldl-accent); transform: rotate(45deg); }
.ldl-node-rule { display: flex; align-items: center; gap: var(--ldl-space-3); color: var(--ldl-line2); }
.ldl-node-rule::before, .ldl-node-rule::after { content: ""; height: 1px; background: var(--ldl-line); flex: 1; }

/* ---------- nav / header ---------- */
.ldl-nav {
  position: sticky; top: 0; z-index: var(--ldl-z-sticky); display: flex; align-items: center; gap: var(--ldl-space-4);
  padding: var(--ldl-space-3) var(--ldl-space-6); border-bottom: 1px solid var(--ldl-line);
  background: color-mix(in oklch, var(--ldl-paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
}
.ldl-nav .ldl-nav-spacer { flex: 1; }
/* :where(:not(...)) keeps this at (0,1,1) while leaving a CTA (.ldl-btn) or the brand alone. Bare
   ".ldl-nav a" out-specified .ldl-btn-primary, so an <a> CTA in the bar was painted ink2 on gold. */
.ldl-nav a:where(:not(.ldl-btn, .ldl-brand)) { color: var(--ldl-ink2); text-decoration: none; font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); }
.ldl-nav a { text-decoration: none; }
/* The links live in their own box so that below sm they can move somewhere else as a group.
   On desktop this is just a flex row and the bar looks exactly as it did. */
.ldl-nav-links { display: flex; align-items: center; gap: var(--ldl-space-4); }
/* Hamburger + scrim exist only on mobile. The CTA is deliberately NOT in here — it stays in the
   bar (see the mobile block).
   Note the descendant selector: the toggle is also a .ldl-iconbtn, which sets display:inline-grid
   at the SAME specificity and is defined later in this file — so a bare .ldl-nav-toggle rule
   loses on source order and the hamburger shows up on desktop. .ldl-nav .ldl-nav-toggle outranks
   it. The mobile override below has to match this specificity for the same reason. */
.ldl-nav .ldl-nav-toggle { display: none; }
.ldl-nav-scrim { display: none; }
/* [aria-current] is split out of the hover guard on purpose: "this is the page you are on" must
   survive on a device that has no hover. Only the hover half is pointer-gated. */
.ldl-nav a[aria-current]:where(:not(.ldl-btn, .ldl-brand)) { color: var(--ldl-ink); }
@media (hover: hover) { .ldl-nav a:where(:not(.ldl-btn, .ldl-brand)):hover { color: var(--ldl-ink); } }
.ldl-brand { display: inline-flex; align-items: center; gap: var(--ldl-space-2); font-family: var(--ldl-font-display); font-weight: var(--ldl-weight-bold); color: var(--ldl-ink); text-decoration: none; }
.ldl-brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--ldl-radius-md);
  background: var(--ldl-accent); color: var(--ldl-on-accent); font-family: var(--ldl-font-display); font-weight: var(--ldl-weight-bold);
}

/* ---------- tabs ---------- */
/* A bare flex row crushes tabs to min-content, which breaks labels mid-word into vertical
   letter-columns — and a localized label (German runs ~35% longer) or a long tab set overflows
   outright. The strip scrolls instead, with the scrollbar hidden and an edge fade so the
   scrollability is discoverable rather than a trap. */
.ldl-tabs {
  display: flex; gap: var(--ldl-space-1); border-bottom: 1px solid var(--ldl-line);
  overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.ldl-tabs::-webkit-scrollbar { display: none; }
/* Two things deliberately NOT here, both of which looked broken when they were:

   1. No edge-fade mask. A mask applies to the whole BORDER BOX, so it faded the strip's own
      border-bottom away at the right edge — on EVERY strip, including ones that fit and have
      nothing to scroll.
   2. No visible scrollbar. Setting overflow-x:auto silently computes overflow-y to auto as well
      (it cannot stay visible), and the tabs' -1px bottom margin is just enough to trip it — so a
      stray VERTICAL scrollbar appeared inside a horizontal strip.

   The affordance a scrolling strip actually needs is the half-clipped tab at its edge: readers
   already understand it, and it self-disables when everything fits. */
.ldl-tab {
  appearance: none; background: none; border: 0; cursor: pointer;
  padding: var(--ldl-space-2) var(--ldl-space-3); font: inherit; font-weight: var(--ldl-weight-semibold);
  font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); color: var(--ldl-ink3); border-bottom: 2px solid transparent; margin-bottom: -1px;
  flex: none; white-space: nowrap; scroll-snap-align: start;
}
/* aria-selected survives outside the hover guard — it is state, not decoration. */
.ldl-tab[aria-selected="true"] { color: var(--ldl-accent-ink); border-bottom-color: var(--ldl-accent); }
@media (hover: hover) { .ldl-tab:hover { color: var(--ldl-ink); } }

/* ---------- segmented control ---------- */
/* inline-flex sizes to content with no relationship to the viewport, so a 4-5 segment control
   at comfortable density simply overflows a phone. Cap it and let it scroll. */
.ldl-segmented {
  display: inline-flex; padding: 2px; gap: 2px; background: var(--ldl-recessed);
  border: 1px solid var(--ldl-line); border-radius: var(--ldl-control-radius);
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.ldl-segmented::-webkit-scrollbar { display: none; }
.ldl-segmented button { flex: none; white-space: nowrap; }
.ldl-segmented button {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale));
  padding: var(--ldl-space-1) var(--ldl-space-3); border-radius: calc(var(--ldl-control-radius) - 2px);
  background: transparent; color: var(--ldl-ink2);
}
/* Two accessible markup shapes, one look. A segmented control that is a set of independent
   toggles uses aria-pressed; one that is a single-choice group is a role="radiogroup" whose
   segments must be role="radio" + aria-checked — aria-pressed on a radiogroup's children is
   an ARIA mismatch and screen readers announce the state wrongly. Both selectors are
   supported so existing aria-pressed markup keeps working. */
.ldl-segmented button[aria-pressed="true"],
.ldl-segmented [role="radio"][aria-checked="true"] { background: var(--ldl-card); color: var(--ldl-ink); box-shadow: var(--ldl-shadow-sm); }

/* ---------- state-tinted buttons (cockpit apps) ---------- */
.ldl-btn-active { background: var(--ldl-success-soft); border-color: transparent; color: var(--ldl-success); }
.ldl-btn-locked { background: var(--ldl-warning-soft); border-color: transparent; color: var(--ldl-warning-ink); }
.ldl-btn-tx     { background: var(--ldl-error-soft); border-color: transparent; color: var(--ldl-error); }

/* ---------- stat / hero numeral ----------
   Big "brag" figures (QSO count, totals). Emphasis = GOLD, never success green.
   Add .ldl-stat-plain for neutral ink when the figure isn't a brand moment. */
.ldl-stat { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.ldl-stat-num {
  font-family: var(--ldl-font-display); font-weight: var(--ldl-weight-bold);
  font-size: calc(var(--ldl-base-font) * 2.4 * var(--ldl-fs-scale));
  letter-spacing: -0.03em; color: var(--ldl-accent); font-variant-numeric: tabular-nums;
}
.ldl-stat-plain .ldl-stat-num { color: var(--ldl-ink); }
.ldl-stat-label {
  font-family: var(--ldl-font-mono); text-transform: uppercase; letter-spacing: 0.16em;
  font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); color: var(--ldl-ink3);
  margin-top: var(--ldl-space-1);
}

/* ---------- status dot (live indicator) ----------
   The canonical home for green: a real-time positive state on a NEUTRAL surface.
   Base dot is neutral/idle; .is-live turns it success-green with a soft halo. */
.ldl-status { display: inline-flex; align-items: center; gap: var(--ldl-space-2); font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); color: var(--ldl-ink2); }
.ldl-status-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--ldl-ink3); }
.ldl-status-dot.is-live  { background: var(--ldl-success); box-shadow: 0 0 0 3px var(--ldl-success-soft); }
.ldl-status-dot.is-warn  { background: var(--ldl-warning); box-shadow: 0 0 0 3px var(--ldl-warning-soft); }
.ldl-status-dot.is-error { background: var(--ldl-error);   box-shadow: 0 0 0 3px var(--ldl-error-soft); }

/* ---------- switch ---------- */
.ldl-switch { position: relative; display: inline-block; width: 38px; height: 22px; }
.ldl-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
/* pointer-events: none — track and thumb are painted ABOVE the input, so without it they swallow
   the click and a switch not wrapped in a <label> is dead (willisrig #27). */
.ldl-switch .track { position: absolute; inset: 0; pointer-events: none; background: var(--ldl-line2); border-radius: 999px; transition: background var(--ldl-motion-fast); }
.ldl-switch .thumb { position: absolute; pointer-events: none; top: 2px; inset-inline-start: 2px; width: 18px; height: 18px; background: var(--ldl-card); border-radius: 50%; transition: transform var(--ldl-motion-fast) var(--ldl-motion-ease); box-shadow: var(--ldl-shadow-sm); }
.ldl-switch input:checked ~ .track { background: var(--ldl-accent); }
.ldl-switch input:checked ~ .thumb { transform: translateX(16px); }
.ldl-switch input:focus-visible ~ .track { outline: 2px solid var(--ldl-accent); outline-offset: 2px; }

/* ---------- progress ---------- */
.ldl-progress { height: 8px; background: var(--ldl-recessed); border-radius: 999px; overflow: hidden; }
.ldl-progress > i { display: block; height: 100%; background: var(--ldl-accent); border-radius: inherit; }

/* ---------- kbd ---------- */
/* inline-flex so a glyph or an .ldl-icon inside (↑ ↓ ↵) centres in the keycap instead of sitting
   on the mono face's baseline at its own size (#42). An icon is sized to the cap's text. */
.ldl-kbd {
  display: inline-flex; align-items: center; justify-content: center; gap: 2px; vertical-align: middle;
  font-family: var(--ldl-font-mono); font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); line-height: 1;
  padding: 3px 6px; background: var(--ldl-recessed); color: var(--ldl-ink2);
  border: 1px solid var(--ldl-line2); border-bottom-width: 2px; border-radius: var(--ldl-radius-xs);
}
.ldl-kbd > .ldl-icon, .ldl-kbd > svg { width: 1.1em; height: 1.1em; flex: none; }

/* ---------- accelerator field (#39) ----------
   A field for a user-set shortcut. At rest it shows the platform form (accel(): ⇧⌘N or
   Ctrl+Shift+N); while focused it shows the raw form ("mod+shift+N") to edit, or records a chord
   (bindingFromEvent()). It stores normalizeBinding() of what was typed and goes .is-invalid when
   that is null. Mono and centred, like the .ldl-kbd caps it renders as everywhere else. */
.ldl-accel-input { font-family: var(--ldl-font-mono); text-align: center; inline-size: 18ch; max-inline-size: 100%; }
.ldl-accel-input:not(:focus) { cursor: pointer; }

/* ---------- table ---------- */
/* A .ldl-table MUST live inside a .ldl-table-wrap. This is a CONTRACT, not a suggestion:
   width:100% is a hint that always loses to the sum of the columns' min-content widths, so a
   real 11-column QSO log (~800px) punches straight out of its card and scrolls the whole
   document sideways on a phone. The wrap is also what makes the sticky header work at all —
   position:sticky resolves against the nearest SCROLLING ancestor, and until now the system
   never provided one, so the header stuck to the viewport (floating over the app bar) or did
   nothing. The missing scroll container and the broken sticky header are one defect. */
.ldl-table-wrap {
  max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain;
}
.ldl-table { width: 100%; border-collapse: collapse; font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); }
/* min-width:max-content is scoped to a WRAPPED table on purpose. Applied to .ldl-table itself it
   would make an un-wrapped table (every consumer that hasn't migrated yet) overflow its parent
   MORE eagerly than before — a regression. Inside the wrap there is something to scroll, so
   letting the columns keep their natural width is right; outside it, the old crush-to-fit
   behaviour is still the safer failure. */
.ldl-table-wrap > .ldl-table { min-width: max-content; }
.ldl-table th { text-align: start; font-weight: var(--ldl-weight-semibold); color: var(--ldl-ink3);
  padding: var(--ldl-space-2) var(--ldl-space-3); border-bottom: 1px solid var(--ldl-line2);
  position: sticky; top: 0; background: var(--ldl-card); text-transform: uppercase; letter-spacing: 0.04em; font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); }
.ldl-table td { padding: var(--ldl-space-2) var(--ldl-space-3); border-bottom: 1px solid var(--ldl-line); }
.ldl-table .num { font-family: var(--ldl-font-mono); text-align: end; }
/* Row hover was the ONLY signal a row is interactive. On touch that signal does not exist, so
   rows read as static text — apps must mark the live one with [aria-selected], which works
   everywhere. Hover is the pointer-only bonus. */
.ldl-table tr[aria-selected="true"] td { background: var(--ldl-accent-soft); }
@media (hover: hover) { .ldl-table tr:hover td { background: var(--ldl-paper2); } }

/* ---------- meter / readout (cockpit) ---------- */
.ldl-readout { font-family: var(--ldl-font-mono); font-size: calc(28px * var(--ldl-fs-scale)); color: var(--ldl-accent); letter-spacing: 1px; font-weight: var(--ldl-weight-bold); font-variant-numeric: tabular-nums; }
.ldl-readout-sm { font-size: calc(16px * var(--ldl-fs-scale)); letter-spacing: 0.5px; }
.ldl-readout-lg { font-size: calc(44px * var(--ldl-fs-scale)); letter-spacing: 0; }

/* A level bar: S-meter, SWR, ALC, power, a progress-like reading. role="meter" on .ldl-meter with
   aria-valuenow/min/max/valuetext; the app drives --val (0-1) and, optionally, --peak (0-1, a
   peak-hold tick). The native <meter> is not used: every engine styles its pseudo-elements
   differently and WebKitGTK ignores most of them.
   Zones are the TRACK, not the fill: --caution and --over (0-1) tint the track's upper range in
   warning-soft / error-soft, so the user sees where trouble starts before the needle gets there.
   The FILL is the accent (a reading, i.e. emphasis) and turns warning/error only when the app
   sets data-zone="caution|over" on the reading. Never green for "good": green means live. */
.ldl-meter {
  --val: 0; --peak: -1; --caution: 2; --over: 2;
  position: relative; display: block; inline-size: 100%;
  block-size: max(4px, calc(var(--ldl-control-h) / 4));
  background: linear-gradient(to right,
    var(--ldl-recessed) calc(var(--caution) * 100%),
    var(--ldl-warning-soft) 0 calc(var(--over) * 100%),
    var(--ldl-error-soft) 0);
  border: 1px solid var(--ldl-line); border-radius: var(--ldl-radius-xs); overflow: hidden;
}
.ldl-meter:dir(rtl) {
  background: linear-gradient(to left,
    var(--ldl-recessed) calc(var(--caution) * 100%),
    var(--ldl-warning-soft) 0 calc(var(--over) * 100%),
    var(--ldl-error-soft) 0);
}
.ldl-meter-fill {
  position: absolute; inset-block: 0; inset-inline-start: 0;
  inline-size: calc(clamp(0, var(--val), 1) * 100%);
  background: var(--ldl-accent); transition: inline-size var(--ldl-motion-fast) linear;
}
.ldl-meter[data-zone="caution"] .ldl-meter-fill { background: var(--ldl-warning); }
.ldl-meter[data-zone="over"] .ldl-meter-fill { background: var(--ldl-error); }
.ldl-meter-peak {
  position: absolute; inset-block: 0; inline-size: 2px; background: var(--ldl-ink);
  inset-inline-start: calc(clamp(0, var(--peak), 1) * 100% - 1px);
}
.ldl-meter:not([style*="--peak"]) .ldl-meter-peak { display: none; }
/* Optional scale under the bar: spans spaced evenly, start to end, in mono. */
.ldl-meter-scale {
  display: flex; justify-content: space-between; margin-block-start: 2px;
  font: calc(var(--ldl-ui-font-sm) * 0.9 * var(--ldl-fs-scale)) / 1 var(--ldl-font-mono);
  color: var(--ldl-ink3); font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce) { .ldl-meter-fill { transition: none; } }

/* ---------- toast ---------- */
.ldl-toast {
  display: flex; gap: var(--ldl-space-3); align-items: flex-start;
  background: var(--ldl-card); color: var(--ldl-ink); border: 1px solid var(--ldl-line);
  border-inline-start: 3px solid var(--ldl-accent); border-radius: var(--ldl-radius-md);
  padding: var(--ldl-space-3) var(--ldl-space-4); box-shadow: var(--ldl-shadow-md); max-width: 380px; z-index: var(--ldl-z-toast);
}
.ldl-toast-success { border-inline-start-color: var(--ldl-success); }
.ldl-toast-warning { border-inline-start-color: var(--ldl-warning); }
.ldl-toast-error   { border-inline-start-color: var(--ldl-error); }
.ldl-toast-info    { border-inline-start-color: var(--ldl-info); }
.ldl-toast-body { flex: 1; min-inline-size: 0; }
.ldl-toast-actions { display: flex; gap: var(--ldl-space-2); flex: none; }
/* Leading icon slot (#37). As on .ldl-alert, the semantic colour lives in the edge and the icon,
   never the words. warning-ink, not warning: warning is a fill, and this is a glyph on card. */
.ldl-toast-icon { flex: none; width: var(--ldl-icon-md); height: var(--ldl-icon-md); margin-block-start: 1px; color: var(--ldl-accent-ink); }
.ldl-toast-success .ldl-toast-icon { color: var(--ldl-success); }
.ldl-toast-warning .ldl-toast-icon { color: var(--ldl-warning-ink); }
.ldl-toast-error   .ldl-toast-icon { color: var(--ldl-error); }
.ldl-toast-info    .ldl-toast-icon { color: var(--ldl-info); }
/* Close: put it on a .ldl-iconbtn (which brings the hover layer, focus ring and touch target)
   with aria-label="Dismiss". This only sizes its icon and pulls it into the toast's corner;
   two classes, because .ldl-iconbtn is declared later at the same specificity. */
.ldl-toast .ldl-toast-close {
  --ldl-iconbtn-icon: var(--ldl-icon-sm);
  width: calc(var(--ldl-iconbtn-size) * 0.8); height: calc(var(--ldl-iconbtn-size) * 0.8);
  margin-block: calc(-1 * var(--ldl-space-1)); margin-inline-end: calc(-1 * var(--ldl-space-2));
}
/* Leaving (#37): add .is-leaving, remove the node on animationend. Under reduced motion it is
   a plain fade rather than none, so animationend still fires and the app needs no second path. */
.ldl-toast.is-leaving, .ldl-toast-host > .ldl-toast.is-leaving {
  animation: ldl-toast-out var(--ldl-motion-fast) var(--ldl-motion-ease) forwards; pointer-events: none;
}
@keyframes ldl-toast-out { to { opacity: 0; transform: translateY(8px); } }
@keyframes ldl-toast-fade { to { opacity: 0; } }

/* The stack every app was building by hand. Mount ONE host as a direct child of <body>: a
   position:fixed element inside an ancestor with transform, filter, perspective or contain is
   positioned against THAT ancestor, not the viewport, so a host inside an animated panel slides
   off with it (WillisMail hit this). The host is the live region: role="status" aria-live="polite"
   for the stack, and an error toast goes in with role="alert". Newest is LAST in the DOM, i.e.
   nearest the bottom edge; past appChrome.toast.maxVisible the oldest are hidden, not squeezed. */
.ldl-toast-host {
  position: fixed; z-index: var(--ldl-z-toast);
  inset-inline-end: var(--ldl-space-4);
  bottom: calc(max(var(--ldl-space-4), env(safe-area-inset-bottom)) + var(--ldl-keyboard-inset, 0px) + var(--ldl-toast-offset, 0px));
  display: flex; flex-direction: column; align-items: flex-end; gap: var(--ldl-space-2);
  max-block-size: calc(100vh - 2 * var(--ldl-space-4)); max-block-size: calc(100dvh - 2 * var(--ldl-space-4)); overflow: hidden;
  pointer-events: none;
}
.ldl-toast-host > .ldl-toast { pointer-events: auto; animation: ldl-toast-in var(--ldl-motion-normal) var(--ldl-motion-easeOut); }
.ldl-toast-host > .ldl-toast:nth-last-child(n + 4) { display: none; }
@keyframes ldl-toast-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  .ldl-toast-host > .ldl-toast { animation: none; }
  .ldl-toast.is-leaving, .ldl-toast-host > .ldl-toast.is-leaving { animation-name: ldl-toast-fade; }
}

/* ---------- modal ---------- */
/* dvh, not vh. The scrim is position:fixed so it spans the VISIBLE viewport, but vh resolves
   against the LARGE viewport (URL bar hidden). 10vh padding + an 84vh modal = 94% of a taller
   viewport crammed into a shorter box: on a phone with the URL bar showing, the bottom of a tall
   dialog is clipped below the fold — and because the scrim is fixed, the page CANNOT be scrolled
   to reach it. What is down there is .ldl-modal-foot: Cancel and the confirming action. A user
   could read a destructive warning and be unable to reach either button. overflow-y on the scrim
   is the backstop. */
.ldl-scrim { position: fixed; inset: 0; bottom: var(--ldl-keyboard-inset, 0px); background: var(--ldl-overlay); display: grid; place-items: start center; padding-top: 10vh; padding-top: 10dvh; z-index: var(--ldl-z-modal); overflow-y: auto; overscroll-behavior: contain; }
.ldl-modal {
  width: min(var(--ldl-dialog-w), 94vw); max-height: calc(84vh - var(--ldl-keyboard-inset, 0px)); max-height: calc(84dvh - var(--ldl-keyboard-inset, 0px)); overflow: auto; overscroll-behavior: contain;
  background: var(--ldl-card); border: 1px solid var(--ldl-line); border-radius: var(--ldl-radius-lg);
  box-shadow: var(--ldl-shadow-modal); padding: var(--ldl-space-6);
}

/* ---------- status bar (cockpit) ---------- */
/* The bottom-pinned bar is the worst home-indicator offender in the system: it is designed to
   sit on the bottom edge, which is exactly where iOS draws the home bar. */
.ldl-statusbar {
  display: flex; align-items: center; gap: var(--ldl-space-4); flex-wrap: wrap;
  padding: var(--ldl-space-2) var(--ldl-space-4); border-top: 1px solid var(--ldl-line);
  padding-block-end: max(var(--ldl-space-2), env(safe-area-inset-bottom));
  background: var(--ldl-paper2); color: var(--ldl-ink3);
  font-family: var(--ldl-font-mono); font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale));
}

/* ---------- marketing: hero dot-grid, marquee, pricing, footer ---------- */
.ldl-hero { position: relative; padding: var(--ldl-space-16) 0; }
.ldl-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(circle at 1px 1px, var(--ldl-line2) 1px, transparent 0);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 40%, transparent 100%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 40%, transparent 100%);
}
.ldl-marquee { overflow: hidden; background: var(--ldl-ink); color: var(--ldl-paper); padding: var(--ldl-space-3) 0; }
.ldl-marquee > div { display: inline-flex; gap: var(--ldl-space-8); white-space: nowrap; font-family: var(--ldl-font-mono); font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); text-transform: uppercase; letter-spacing: 0.1em; animation: ldl-marquee 32s linear infinite; }
/* Pause-on-hover is the only way to stop the scroll and actually read an item. On touch there
   is no hover, so the marquee would be permanently in motion and unreadable — pause on focus
   too, and where hover doesn't exist, don't animate at all rather than tease. */
.ldl-marquee:hover > div, .ldl-marquee:focus-within > div { animation-play-state: paused; }
@media (hover: none) { .ldl-marquee > div { animation: none; } }
@keyframes ldl-marquee { to { transform: translateX(-50%); } }
.ldl-price-feature { border-color: var(--ldl-accent-line); box-shadow: var(--ldl-shadow-md); }
.ldl-footer { border-top: 1px solid var(--ldl-line); padding: var(--ldl-space-12) 0; color: var(--ldl-ink3); }
.ldl-footer h4 { font-family: var(--ldl-font-mono); text-transform: uppercase; letter-spacing: 0.08em; font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); color: var(--ldl-ink2); }

/* ---------- interaction states: focus ring, state layers, disabled ---------- */

/* Global keyboard-focus ring — accent outline, zero-specificity :where() so authors can
   override. :focus-visible keeps pointer/touch focus quiet while keyboard focus is always
   visible. Modern browsers already clip the outline to the element's own border-radius. */
:where(a[href], area[href], button, input, select, textarea, summary,
  [tabindex]:not([tabindex="-1"]), [contenteditable="true"]):focus-visible {
  outline: var(--ldl-focus-width) solid var(--ldl-focus-color);
  outline-offset: var(--ldl-focus-offset);
}

/* Opt-in ring for custom/composite widgets that manage their own focus (roving tabindex,
   listboxes, comboboxes, draggable handles). Put .ldl-focus-ring on the focus host. */
.ldl-focus-ring:focus-visible,
.ldl-focus-ring:focus-within {
  outline: var(--ldl-focus-width) solid var(--ldl-focus-color);
  outline-offset: var(--ldl-focus-offset);
}

/* LDL controls opt in explicitly so the accent ring reads identically across them and
   overrides any earlier component :focus rule (e.g. the older .ldl-input:focus). */
.ldl-btn:focus-visible,
.ldl-input:focus-visible,
.ldl-select:focus-visible,
.ldl-tab:focus-visible,
.ldl-segmented button:focus-visible,
.ldl-switch input:focus-visible ~ .track {
  outline: var(--ldl-focus-width) solid var(--ldl-focus-color);
  outline-offset: var(--ldl-focus-offset);
}

/* State layers (Material 3 parity): a currentColor wash on ::after that composes over any
   background. isolation:isolate makes each control its own stacking context so the ::after
   at z-index:-1 paints ABOVE the control's fill but BELOW its label — text stays crisp.
   On .ldl-btn-primary currentColor is on-accent (light wash on gold); on secondary/tab it
   is ink (dark wash on card). Opacities scale hover -> pressed -> dragged. */
.ldl-btn, .ldl-tab, .ldl-segmented button { position: relative; isolation: isolate; }
.ldl-btn::after,
.ldl-tab::after,
.ldl-segmented button::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: currentColor; opacity: 0; pointer-events: none;
  transition: opacity var(--ldl-motion-fast) var(--ldl-motion-ease);
}
@media (hover: hover) {
  .ldl-btn:hover::after,
  .ldl-tab:hover::after,
  .ldl-segmented button:hover::after { opacity: var(--ldl-opacity-hover); }
}
.ldl-btn:active::after,
.ldl-tab:active::after,
.ldl-segmented button:active::after { opacity: var(--ldl-opacity-pressed); }
.ldl-btn.is-dragging::after,
.ldl-tab.is-dragging::after,
.ldl-btn[aria-grabbed="true"]::after { opacity: var(--ldl-opacity-dragged); }

/* ---------- disabled: [disabled] / [aria-disabled="true"] / .is-disabled ---------- */

/* Generic content fade (0.38) + not-allowed. [disabled] matches the native attribute on
   form controls; the ARIA/utility selectors cover <a role="button">, <div>, etc. */
.ldl-btn[disabled], .ldl-btn[aria-disabled="true"], .ldl-btn.is-disabled,
.ldl-input[disabled], .ldl-input[aria-disabled="true"], .ldl-input.is-disabled,
.ldl-select[disabled], .ldl-select[aria-disabled="true"], .ldl-select.is-disabled,
.ldl-tab[disabled], .ldl-tab[aria-disabled="true"], .ldl-tab.is-disabled,
.ldl-segmented button[disabled], .ldl-segmented button[aria-disabled="true"], .ldl-segmented button.is-disabled {
  cursor: not-allowed;
  opacity: var(--ldl-opacity-disabled-content);
  box-shadow: none;
  transform: none;
}
/* Neutralize hover lift + state layers while disabled. */
.ldl-btn[disabled]:hover, .ldl-btn[aria-disabled="true"]:hover, .ldl-btn.is-disabled:hover {
  transform: none; box-shadow: none; border-color: var(--ldl-line2);
}
.ldl-btn[disabled]::after, .ldl-btn[aria-disabled="true"]::after, .ldl-btn.is-disabled::after,
.ldl-tab[disabled]::after, .ldl-tab[aria-disabled="true"]::after, .ldl-tab.is-disabled::after,
.ldl-segmented button[disabled]::after, .ldl-segmented button.is-disabled::after { opacity: 0; }

/* Filled primary: Material-accurate two-level fade — container ink@12%, content ink@38% —
   instead of the flat 0.38 above. Works in both modes because ink flips per theme. */
.ldl-btn-primary[disabled], .ldl-btn-primary[aria-disabled="true"], .ldl-btn-primary.is-disabled {
  opacity: 1;
  background: color-mix(in oklab, var(--ldl-ink) calc(var(--ldl-opacity-disabled-container) * 100%), transparent);
  color: color-mix(in oklab, var(--ldl-ink) calc(var(--ldl-opacity-disabled-content) * 100%), transparent);
  border-color: transparent;
}

/* Disabled switch. */
.ldl-switch input[disabled] { cursor: not-allowed; }
.ldl-switch input[disabled] ~ .track,
.ldl-switch input[disabled] ~ .thumb { opacity: var(--ldl-opacity-disabled-content); }

@media (prefers-reduced-motion: reduce) {
  .ldl-btn::after, .ldl-tab::after, .ldl-segmented button::after { transition: none; }
}

/* ---------- forms & validation ---------- */
.ldl-form { display: flex; flex-direction: column; gap: var(--ldl-row-gap); }

/* field wrapper: label / control / message, stacked with a tight gap */
.ldl-field { display: flex; flex-direction: column; gap: var(--ldl-space-1_5); min-width: 0; border: 0; padding: 0; margin: 0; }
.ldl-field-row { flex-direction: row; align-items: center; gap: var(--ldl-space-2); }

/* label + gold required asterisk */
.ldl-label {
  display: inline-flex; align-items: center; gap: var(--ldl-space-1);
  font-family: var(--ldl-font-body); font-weight: var(--ldl-weight-semibold);
  font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); line-height: 1.3;
  color: var(--ldl-ink2);
}
.ldl-required { color: var(--ldl-accent); font-weight: var(--ldl-weight-bold); }
.ldl-required::after { content: "*"; }

/* helper + validation messages */
.ldl-help, .ldl-error-text, .ldl-success-text {
  font-family: var(--ldl-font-body); font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale));
  line-height: 1.4; margin: 0;
}
.ldl-help { color: var(--ldl-ink3); }
.ldl-error-text   { display: flex; align-items: flex-start; gap: var(--ldl-space-1); color: var(--ldl-error); }
.ldl-success-text { display: flex; align-items: flex-start; gap: var(--ldl-space-1); color: var(--ldl-success); }
.ldl-error-text .ldl-node   { background: var(--ldl-error); margin-top: 0.35em; }
.ldl-success-text .ldl-node { background: var(--ldl-success); margin-top: 0.35em; }

/* textarea — mirrors .ldl-input, taller and vertically resizable */
.ldl-textarea {
  font-family: var(--ldl-font-body); font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale));
  width: 100%; min-height: calc(var(--ldl-control-h) * 2.4); line-height: 1.5; resize: vertical;
  padding: var(--ldl-control-py) var(--ldl-space-3);
  background: var(--ldl-recessed); color: var(--ldl-ink);
  border: 1px solid var(--ldl-line2); border-radius: var(--ldl-control-radius);
  transition: border-color var(--ldl-motion-fast), outline-color var(--ldl-motion-fast);
}
.ldl-textarea:focus { outline: 2px solid var(--ldl-accent); outline-offset: 1px; border-color: var(--ldl-accent); }

/* shared placeholder + disabled affordances for text controls */
.ldl-input::placeholder, .ldl-textarea::placeholder { color: var(--ldl-ink-dim); opacity: 1; }
.ldl-input:disabled, .ldl-select:disabled, .ldl-textarea:disabled {
  background: var(--ldl-paper2); color: var(--ldl-ink-dim); cursor: not-allowed; opacity: 0.75;
}

/* validity states — semantic border + matching focus ring (never removes focus) */
.ldl-input.is-invalid, .ldl-select.is-invalid, .ldl-textarea.is-invalid { border-color: var(--ldl-error); }
.ldl-input.is-invalid:focus, .ldl-select.is-invalid:focus, .ldl-textarea.is-invalid:focus { outline-color: var(--ldl-error); border-color: var(--ldl-error); }
.ldl-input.is-valid, .ldl-select.is-valid, .ldl-textarea.is-valid { border-color: var(--ldl-success); }
.ldl-input.is-valid:focus, .ldl-select.is-valid:focus, .ldl-textarea.is-valid:focus { outline-color: var(--ldl-success); border-color: var(--ldl-success); }

/* fieldset grouping */
.ldl-fieldset {
  display: flex; flex-direction: column; gap: var(--ldl-row-gap); min-width: 0; margin: 0;
  border: 1px solid var(--ldl-line); border-radius: var(--ldl-card-radius); padding: var(--ldl-card-pad);
}
.ldl-legend {
  padding: 0 var(--ldl-space-2); margin-inline-start: calc(var(--ldl-space-2) * -1);
  font-family: var(--ldl-font-body); font-weight: var(--ldl-weight-semibold);
  font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); color: var(--ldl-ink);
}

/* accent-tinted checkbox & radio (native rendering tinted via accent-color) */
.ldl-checkbox, .ldl-radio {
  flex: 0 0 auto; margin: 0; cursor: pointer; accent-color: var(--ldl-accent);
  width: calc(var(--ldl-ui-font) * var(--ldl-fs-scale) + 2px);
  height: calc(var(--ldl-ui-font) * var(--ldl-fs-scale) + 2px);
}
.ldl-checkbox:focus-visible, .ldl-radio:focus-visible { outline: 2px solid var(--ldl-accent); outline-offset: 2px; }
.ldl-checkbox:disabled, .ldl-radio:disabled { cursor: not-allowed; opacity: 0.6; }

/* inline option row: checkbox/radio next to its text */
.ldl-option {
  display: inline-flex; align-items: center; gap: var(--ldl-space-2); cursor: pointer;
  font-family: var(--ldl-font-body); font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); color: var(--ldl-ink);
}
.ldl-option input:disabled ~ span { color: var(--ldl-ink-dim); cursor: not-allowed; }

/* ---------- icons ---------- */
.ldl-icon {
  display: inline-block;
  flex: none;
  width: var(--ldl-icon-md);
  height: var(--ldl-icon-md);
  vertical-align: -0.15em;
  color: inherit;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: miter;
}
.ldl-icon-sm { width: var(--ldl-icon-sm); height: var(--ldl-icon-sm); }
.ldl-icon-lg { width: var(--ldl-icon-lg); height: var(--ldl-icon-lg); }
.ldl-icon-accent { color: var(--ldl-accent); }

/* ---------- loading / skeleton ---------- */
.ldl-skeleton {
  display: block;
  position: relative;
  overflow: hidden;
  min-height: 1em;
  border-radius: inherit;
  background-color: var(--ldl-recessed);
  background-image: linear-gradient(
    90deg,
    var(--ldl-recessed) 0%,
    color-mix(in oklch, var(--ldl-line2) 65%, var(--ldl-recessed)) 50%,
    var(--ldl-recessed) 100%
  );
  background-size: 200% 100%;
  background-repeat: no-repeat;
  background-position: 200% 0;
  animation: ldl-skeleton-shimmer 1.4s ease-in-out infinite;
}
/* shape helpers — each sets its own radius so `inherit` on the base is overridden intentionally */
.ldl-skeleton-text { height: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); border-radius: var(--ldl-radius-xs); margin-block: 0.35em; }
.ldl-skeleton-text:last-child { width: 72%; }
.ldl-skeleton-title { height: calc(var(--ldl-type-h3-size) * var(--ldl-fs-scale)); width: 45%; border-radius: var(--ldl-radius-sm); margin-block: 0.4em; }
.ldl-skeleton-circle { border-radius: var(--ldl-radius-full); }
.ldl-skeleton-btn { height: var(--ldl-control-h); width: 120px; border-radius: var(--ldl-control-radius); }
@keyframes ldl-skeleton-shimmer { to { background-position: -200% 0; } }

/* ---------- spinner ---------- */
.ldl-spinner {
  display: inline-block; vertical-align: -0.2em;
  width: 1.2em; height: 1.2em;
  border-radius: 50%;
  border: 2px solid var(--ldl-accent-line);
  border-top-color: var(--ldl-accent);
  animation: ldl-spin 0.7s linear infinite;
}
.ldl-spinner-sm { width: 0.9em; height: 0.9em; border-width: 2px; }
.ldl-spinner-lg { width: 2.25em; height: 2.25em; border-width: 3px; }
@keyframes ldl-spin { to { transform: rotate(360deg); } }
@keyframes ldl-spinner-fade { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ---------- empty state ---------- */
.ldl-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: var(--ldl-space-3);
  padding: var(--ldl-space-10) var(--ldl-space-6);
  color: var(--ldl-ink2);
}
.ldl-empty-icon {
  display: grid; place-items: center;
  width: 56px; height: 56px; margin-bottom: var(--ldl-space-1);
  border-radius: var(--ldl-radius-full);
  background: var(--ldl-accent-soft); color: var(--ldl-accent-ink);
}
.ldl-empty-icon svg { width: 24px; height: 24px; }
.ldl-empty-icon .ldl-node { width: 14px; height: 14px; }
.ldl-empty-title {
  font-family: var(--ldl-font-display); font-weight: var(--ldl-weight-semibold);
  font-size: calc(var(--ldl-type-h3-size) * var(--ldl-fs-scale));
  line-height: var(--ldl-type-h3-leading); letter-spacing: var(--ldl-type-h3-tracking);
  color: var(--ldl-ink); text-wrap: balance; margin: 0;
}
.ldl-empty-msg {
  color: var(--ldl-ink3); max-width: 46ch; margin: 0 auto;
  font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); line-height: 1.5;
}
.ldl-empty-actions { display: flex; flex-wrap: wrap; gap: var(--ldl-space-2); justify-content: center; margin-top: var(--ldl-space-2); }

/* ---------- error page ---------- */
.ldl-errorpage {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: var(--ldl-space-4);
  min-height: 60vh; padding: var(--ldl-space-12) var(--ldl-space-6);
}
.ldl-errorpage-code {
  font-family: var(--ldl-font-display); font-weight: var(--ldl-weight-bold);
  font-size: clamp(72px, 16vw, 160px); line-height: 0.9; letter-spacing: -0.04em;
  color: var(--ldl-brand-gold); margin: 0;
}
.ldl-errorpage-title {
  font-family: var(--ldl-font-display); font-weight: var(--ldl-weight-semibold);
  font-size: calc(var(--ldl-type-h2-size) * var(--ldl-fs-scale));
  line-height: var(--ldl-type-h2-leading); letter-spacing: var(--ldl-type-h2-tracking);
  color: var(--ldl-ink); text-wrap: balance; margin: 0;
}
.ldl-errorpage-msg {
  color: var(--ldl-ink3); max-width: 48ch; margin: 0 auto;
  font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); line-height: 1.55;
}
.ldl-errorpage-actions { display: flex; flex-wrap: wrap; gap: var(--ldl-space-3); justify-content: center; margin-top: var(--ldl-space-2); }

/* reduced motion: skeleton falls back to a static fill; spinner swaps rotation for a gentle opacity pulse */
@media (prefers-reduced-motion: reduce) {
  .ldl-skeleton { animation: none; background-image: none; background-color: var(--ldl-recessed); }
  .ldl-spinner {
    animation: ldl-spinner-fade 1.3s ease-in-out infinite;
    border-color: var(--ldl-accent-line); border-top-color: var(--ldl-accent);
  }
}

/* ---------- data-viz chart tooltip ---------- */
.ldl-chart-tooltip {
  background: var(--ldl-card);
  border: 1px solid var(--ldl-line);
  border-radius: var(--ldl-card-radius);
  box-shadow: var(--ldl-shadow-md);
  padding: var(--ldl-space-2) var(--ldl-space-3);
  font-family: var(--ldl-font-body);
  font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale));
  color: var(--ldl-ink3);
  max-width: 240px;
  pointer-events: none;
}
.ldl-chart-tooltip .title {
  font-family: var(--ldl-font-display);
  font-weight: var(--ldl-weight-semibold);
  color: var(--ldl-ink);
  margin-bottom: var(--ldl-space-1);
}
.ldl-chart-tooltip .row { color: var(--ldl-ink2); display: flex; align-items: center; gap: var(--ldl-space-2); }
.ldl-chart-tooltip .row b { color: var(--ldl-ink); font-variant-numeric: tabular-nums; margin-inline-start: auto; }
.ldl-chart-tooltip .units { color: var(--ldl-ink-dim); margin-top: var(--ldl-space-1); }

/* ---------- responsive layout: container, grid, visibility ----------
   The @media pixel values below are HARDCODED copies of tokens.json
   layout.breakpoints (sm 560 / md 760 / lg 940 / xl 1024 / xxl 1200) — CSS @media
   cannot reference var(). The same values are emitted as reference vars
   --ldl-bp-sm..xxl (see build.mjs). If you change the breakpoints in
   tokens, update every @media query in this block to match. */

/* Container: centered, capped width + fluid inline padding.
   Override the cap per-instance via --ldl-container-max, or use the
   modifier classes. Padding steps up from space-4 to space-6 at md. */
.ldl-container {
  width: 100%;
  max-width: var(--ldl-container-max, var(--ldl-maxw));
  margin-inline: auto;
  padding-inline: var(--ldl-space-4);
}
.ldl-container-tight   { --ldl-container-max: var(--ldl-maxw-tight); }
.ldl-container-content { --ldl-container-max: var(--ldl-content-w); }
.ldl-container-fluid   { --ldl-container-max: none; }
@media (min-width: 760px) {
  .ldl-container { padding-inline: var(--ldl-space-6); }
}

/* Auto-fill responsive grid: as many equal columns as fit, each at
   least --ldl-grid-min wide (default 240px). min() clamps the track so
   a card never overflows a container narrower than --ldl-grid-min. */
.ldl-grid {
  display: grid;
  gap: var(--ldl-grid-gap, var(--ldl-space-5));
  grid-template-columns: repeat(auto-fill, minmax(min(var(--ldl-grid-min, 240px), 100%), 1fr));
}

/* Explicit column counts. All collapse to a single column below md
   (760px), then step up: cols-2 -> 2 at md; cols-3 -> 2 at md then 3 at
   lg (940px); cols-4 -> 2 at md then 4 at lg. */
.ldl-cols-2,
.ldl-cols-3,
.ldl-cols-4 {
  display: grid;
  gap: var(--ldl-grid-gap, var(--ldl-space-5));
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .ldl-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .ldl-cols-3 { grid-template-columns: repeat(2, 1fr); }
  .ldl-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 940px) {
  .ldl-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .ldl-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Small-screen visibility helpers (breakpoint sm = 560px).
   .ldl-hide-sm  -> hidden below sm, natural display at/above sm.
   .ldl-show-sm  -> visible below sm, hidden at/above sm.
   No rule sets a positive display value, so each element keeps its own
   natural display (block/flex/grid/inline) when shown. */
@media (max-width: 559.98px) {
  .ldl-hide-sm { display: none !important; }
}
@media (min-width: 560px) {
  .ldl-show-sm { display: none !important; }
}

/* ==========================================================================
   APP SHELL — app bar, menus, command palette, settings, splash, about.
   One shell language for every LDL app (desktop + mobile).

   Right-cluster order is FIXED, left to right: help (?) · settings (cog) ·
   command palette. Palette is pinned far right; those three are icon-only
   (tooltip + aria-label), everything else in the bar uses words.
   Touch targets grow to 44px on coarse pointers (see the pointer query at the
   end of this block) — that is what makes the same markup usable on mobile.
   ========================================================================== */

/* ---------- icon button (the cog / ? / palette affordance) ---------- */
.ldl-iconbtn {
  display: inline-grid; place-items: center; flex: none;
  width: var(--ldl-iconbtn-size); height: var(--ldl-iconbtn-size);
  padding: 0; border: 1px solid transparent; border-radius: var(--ldl-radius-md);
  background: transparent; color: var(--ldl-ink2); cursor: pointer;
  /* icon-only, but a fallback glyph or a badge count still renders text — in the body face, not
     the engine's button font, at leading 1 so the grid cell centres the icon exactly */
  font: inherit; font-family: var(--ldl-font-body); line-height: 1;
  position: relative; isolation: isolate;
  transition: color var(--ldl-motion-fast), background var(--ldl-motion-fast);
}
@media (hover: hover) { .ldl-iconbtn:hover { color: var(--ldl-ink); } }
.ldl-iconbtn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: currentColor; opacity: 0; pointer-events: none;
  transition: opacity var(--ldl-motion-fast) var(--ldl-motion-ease);
}
@media (hover: hover) { .ldl-iconbtn:hover::after { opacity: var(--ldl-opacity-hover); } }
.ldl-iconbtn:active::after { opacity: var(--ldl-opacity-pressed); }
/* open popover / active panel: gold selection wash — this is an "emphasis/current" state, so it is accent, not success */
.ldl-iconbtn[aria-expanded="true"], .ldl-iconbtn.is-active {
  background: var(--ldl-accent-soft); color: var(--ldl-accent-ink); border-color: var(--ldl-accent-line);
}
.ldl-iconbtn[disabled], .ldl-iconbtn.is-disabled { cursor: not-allowed; opacity: var(--ldl-opacity-disabled-content); }
.ldl-iconbtn[disabled]::after { opacity: 0; }
.ldl-iconbtn .ldl-icon { width: var(--ldl-iconbtn-icon, var(--ldl-icon-md)); height: var(--ldl-iconbtn-icon, var(--ldl-icon-md)); }

/* ---------- appearance toggle (.ldl-action-mode) ----------
   A three-state CYCLE over appChrome.modeCycle: system -> light -> dark -> system.
   The icon shows the CURRENT SETTING: monitor = following the system, sun = pinned light,
   moon = pinned dark. (It used to show the destination of a two-way flip. That rule assumed the
   screen already tells you the mode you are in. Under "system" it can't: a dark screen may be
   pinned dark or following a dark OS. Without a visible state, the step INTO system changes
   nothing on screen and the tap looks broken.)
   "System" is the ABSENCE of data-mode, which is what lets the prefers-color-scheme fallback
   paint the right palette. So the icon is correct on first paint with no JS: ship all three
   glyphs and let [data-mode] pick. The aria-label/title must name the setting AND the next step:
   "Appearance: System. Switch to light". Use modeLabel() / nextMode() from theme.ts. */
.ldl-action-mode .ldl-icon { display: none; }
:root:not([data-mode]) .ldl-action-mode .ldl-icon-system,
:root[data-mode="light"] .ldl-action-mode .ldl-icon-sun,
:root[data-mode="dark"] .ldl-action-mode .ldl-icon-moon { display: block; }

/* ---------- app bar ---------- */
/* position:sticky is REQUIRED, not optional: z-index is inert on a statically-positioned box,
   so --ldl-z-sticky here was a promise the CSS didn't keep and every consumer had to add the
   position itself. Sticky is also where the notch inset has to live — padding-block-start keeps
   the title and icon buttons out from under the Dynamic Island once an app ships
   viewport-fit=cover (which any full-screen sheet requires; see docs/app-chrome.md). The max()
   means the inset only ever ADDS space, never removes it on a device without a notch. */
.ldl-appbar {
  position: sticky; top: 0;
  display: flex; align-items: center; gap: var(--ldl-space-3);
  min-height: var(--ldl-appbar-h);
  padding-inline: max(var(--ldl-space-4), env(safe-area-inset-left)) max(var(--ldl-space-4), env(safe-area-inset-right));
  padding-block-start: env(safe-area-inset-top);
  background: var(--ldl-paper2); border-bottom: 1px solid var(--ldl-line);
  z-index: var(--ldl-z-sticky);
}
/* The app NAME is the one thing in the bar that outranks the bar. It steps up a
   size from the bar's ui-font and goes bold display — at ui-font/semibold it
   reads as just another control. Everything beside it (context, clock, menus)
   stays at ui-font, which is what gives the name its hierarchy. */
.ldl-appbar-title {
  display: inline-flex; align-items: center; gap: var(--ldl-space-2);
  font-family: var(--ldl-font-display); font-weight: var(--ldl-weight-bold);
  font-size: calc(var(--ldl-ui-font) * 1.15 * var(--ldl-fs-scale));
  letter-spacing: -0.01em; color: var(--ldl-ink);
  white-space: nowrap;
}
/* the secondary label riding beside the name: profile, document, log ("MainLog").
   Muted and at ui-font, so it never competes with the name. */
.ldl-appbar-context {
  font-family: var(--ldl-font-body); font-weight: var(--ldl-weight-regular);
  font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); color: var(--ldl-ink3);
  white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis;
}
.ldl-appbar-spacer { flex: 1 1 auto; min-width: var(--ldl-space-3); }
/* right cluster: help, settings, palette — in that order, palette last */
.ldl-appbar-actions { display: flex; align-items: center; gap: var(--ldl-space-1); margin-inline-start: auto; flex: none; }

/* in-window menu bar (Electron/web apps with no system menu: WillisMD Pro) */
.ldl-menubar { display: flex; align-items: center; gap: 2px; min-width: 0; }
.ldl-menubar-btn {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale));
  color: var(--ldl-ink2); padding: var(--ldl-space-1) var(--ldl-space-3);
  border-radius: var(--ldl-radius-sm); white-space: nowrap;
}
@media (hover: hover) { .ldl-menubar-btn:hover { color: var(--ldl-ink); background: var(--ldl-recessed); } }
.ldl-menubar-btn[aria-expanded="true"] { background: var(--ldl-accent-soft); color: var(--ldl-accent-ink); }

/* ---------- menu / dropdown (menu bar panels, overflow, tier-1 settings popover) ---------- */
.ldl-menu {
  min-width: 200px; max-width: min(340px, 92vw); padding: var(--ldl-space-1);
  background: var(--ldl-card); border: 1px solid var(--ldl-line);
  border-radius: var(--ldl-radius-md); box-shadow: var(--ldl-shadow-md);
  z-index: var(--ldl-z-dropdown);
}
/* min-width:0 is load-bearing: a flexible label against a white-space:nowrap trailing shortcut
   ("Command Palette" + "Ctrl+K") cannot shrink without it, so a long or localized command name
   pushes the shortcut out of the menu. */
.ldl-menu-item {
  display: flex; align-items: center; gap: var(--ldl-space-2); width: 100%; min-width: 0;
  appearance: none; border: 0; background: transparent; cursor: pointer; text-align: start;
  font: inherit; font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); color: var(--ldl-ink);
  padding: var(--ldl-space-1_5) var(--ldl-space-2); border-radius: var(--ldl-radius-sm);
  overflow-wrap: anywhere;
}
/* [aria-selected] is the keyboard/roving-focus highlight — it must NOT be pointer-gated.
   Real focus on an item gets the SAME fill, not the global ring (#43): a native menu opened from
   the keyboard highlights its first item, and a 2px gold box around it read as an error. The
   fill is the focus indicator, so forced-colors mode, which drops backgrounds, gets an outline. */
.ldl-menu-item[aria-selected="true"], .ldl-menu-item:focus-visible { background: var(--ldl-recessed); }
.ldl-menu-item:focus, .ldl-menu-item:focus-visible { outline: none; }
@media (forced-colors: active) { .ldl-menu-item:focus-visible { outline: 2px solid Highlight; outline-offset: -2px; } }
@media (hover: hover) { .ldl-menu-item:hover { background: var(--ldl-recessed); } }
.ldl-menu-item[aria-checked="true"] { color: var(--ldl-accent-ink); }
.ldl-menu-item[disabled], .ldl-menu-item.is-disabled { cursor: not-allowed; opacity: var(--ldl-opacity-disabled-content); }
.ldl-menu-item .ldl-icon { width: var(--ldl-icon-sm); height: var(--ldl-icon-sm); color: var(--ldl-ink3); }
.ldl-menu-shortcut {
  margin-inline-start: auto; padding-inline-start: var(--ldl-space-4);
  font-family: var(--ldl-font-mono); font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale));
  color: var(--ldl-ink-dim); white-space: nowrap;
}
.ldl-menu-sep { height: 1px; margin: var(--ldl-space-1) 0; background: var(--ldl-line); border: 0; }
.ldl-menu-label {
  font-family: var(--ldl-font-mono); text-transform: uppercase; letter-spacing: 0.1em;
  font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); color: var(--ldl-ink3);
  padding: var(--ldl-space-2) var(--ldl-space-2) var(--ldl-space-1);
}

/* ---------- command palette ---------- */
.ldl-palette-scrim {
  position: fixed; inset: 0; bottom: var(--ldl-keyboard-inset, 0px); z-index: var(--ldl-z-modal);
  background: var(--ldl-overlay); display: grid; place-items: start center; padding-top: 12vh; padding-top: 12dvh;
}
.ldl-palette {
  display: flex; flex-direction: column; width: min(var(--ldl-palette-w), 94vw); max-height: 68vh; max-height: 68dvh; overflow: hidden;
  background: var(--ldl-card); border: 1px solid var(--ldl-line);
  border-radius: var(--ldl-radius-lg); box-shadow: var(--ldl-shadow-modal);
}
.ldl-palette-search { display: flex; align-items: center; gap: var(--ldl-space-3); padding: var(--ldl-space-3) var(--ldl-space-4); border-bottom: 1px solid var(--ldl-line); }
.ldl-palette-search .ldl-icon { color: var(--ldl-ink3); }
.ldl-palette-input {
  flex: 1; min-width: 0; appearance: none; border: 0; outline: 0; background: transparent;
  font-family: var(--ldl-font-body); font-size: calc(var(--ldl-base-font) * var(--ldl-fs-scale));
  color: var(--ldl-ink);
}
.ldl-palette-input::placeholder { color: var(--ldl-ink-dim); }
/* The search row IS the field (#42): no ring or box on the input itself, or an app's global
   input:focus rule draws a second box inside the palette. Two classes' worth of specificity so
   it beats input:focus; the row's bottom hairline turns gold as the focus indicator instead. */
.ldl-palette .ldl-palette-input:is(:focus, :focus-visible) { outline: none; box-shadow: none; border: 0; background: transparent; }
.ldl-palette-search:focus-within { border-bottom-color: var(--ldl-accent-line); }
@media (forced-colors: active) { .ldl-palette-search:focus-within { outline: 2px solid Highlight; outline-offset: -2px; } }
.ldl-palette-list { overflow-y: auto; overscroll-behavior: contain; padding: var(--ldl-space-1); margin: 0; list-style: none; }
.ldl-palette-group {
  font-family: var(--ldl-font-mono); text-transform: uppercase; letter-spacing: 0.1em;
  font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); color: var(--ldl-ink3);
  padding: var(--ldl-space-3) var(--ldl-space-2) var(--ldl-space-1);
}
.ldl-palette-item {
  display: flex; align-items: center; gap: var(--ldl-space-3); width: 100%; min-width: 0;
  appearance: none; border: 0; background: transparent; cursor: pointer; text-align: start;
  font: inherit; font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); color: var(--ldl-ink);
  padding: var(--ldl-space-2) var(--ldl-space-3); border-radius: var(--ldl-radius-sm);
  border-inline-start: 2px solid transparent;
  overflow-wrap: anywhere;
}
.ldl-palette-item .ldl-icon { color: var(--ldl-ink3); width: var(--ldl-icon-sm); height: var(--ldl-icon-sm); }
/* the highlighted row is a SELECTION, so it is gold — never green */
.ldl-palette-item[aria-selected="true"] {
  background: var(--ldl-accent-soft); color: var(--ldl-accent-ink); border-inline-start-color: var(--ldl-accent);
}
.ldl-palette-item[aria-selected="true"] .ldl-icon { color: var(--ldl-accent-ink); }
.ldl-palette-hint { margin-inline-start: auto; color: var(--ldl-ink3); font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); }
.ldl-palette-item[aria-selected="true"] .ldl-palette-hint { color: var(--ldl-accent-ink); }
.ldl-palette-footer {
  display: flex; align-items: center; gap: var(--ldl-space-4); flex-wrap: wrap;
  padding: var(--ldl-space-2) var(--ldl-space-4); border-top: 1px solid var(--ldl-line);
  background: var(--ldl-paper2); color: var(--ldl-ink3);
  font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale));
}
.ldl-palette-footer > * { display: inline-flex; align-items: center; gap: var(--ldl-space-1_5); }
.ldl-palette-footer .ldl-kbd { min-inline-size: 1.75em; }

/* ---------- settings: one anatomy, three tiers ----------
   Tier 1 popover  -> .ldl-menu + .ldl-setting rows (a handful of toggles)
   Tier 2 modal    -> .ldl-modal.ldl-modal-sheet > .ldl-settings   (the default)
   Tier 3 page     -> .ldl-settings.ldl-settings-page              (deep settings)
   All three use the same .ldl-settings-nav / .ldl-settings-pane / .ldl-setting parts,
   so an app can graduate tiers without a redesign. */
.ldl-settings { display: grid; grid-template-columns: var(--ldl-settings-nav-w) minmax(0, 1fr); min-height: 0; }
.ldl-settings-page { min-height: 100%; }
/* Tier 2 has its OWN size on desktop. It used to inherit the 560px dialog width and size to the
   pane's content, so the window jumped every time you changed category (WillisMail #250, and
   WillisRig invented its own 980x720). Nav + pane + the modal's padding, fixed height; the pane
   scrolls. Below sm the mobile block makes it full-screen.
   The frame is for SETTINGS only (#35). .ldl-modal-sheet on its own means "full-screen on a
   phone" and stays content-sized on desktop: WillisMail has 17 such dialogs, and a one-line
   Copy Link dialog came out 720px tall when every sheet took this frame. It applies when
   .ldl-settings is a direct child, or by .ldl-modal-settings where a framework wraps it. */
.ldl-modal-sheet:has(> .ldl-settings), .ldl-modal-settings {
  width: min(calc(var(--ldl-settings-nav-w) + var(--ldl-settings-pane-max) + 2 * var(--ldl-space-6)), 94vw);
  height: min(var(--ldl-settings-modal-h), calc(86vh - var(--ldl-keyboard-inset, 0px))); height: min(var(--ldl-settings-modal-h), calc(86dvh - var(--ldl-keyboard-inset, 0px)));
  max-height: none; display: flex; flex-direction: column;
}
.ldl-modal-sheet > .ldl-settings, .ldl-modal-settings .ldl-settings { flex: 1 1 auto; min-height: 0; }
.ldl-settings-nav {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-y: auto;
  padding: var(--ldl-space-2); border-inline-end: 1px solid var(--ldl-line); background: var(--ldl-paper2);
}
.ldl-settings-nav-item {
  display: flex; align-items: center; gap: var(--ldl-space-2); width: 100%;
  appearance: none; border: 0; background: transparent; cursor: pointer; text-align: start;
  font: inherit; font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); color: var(--ldl-ink2);
  padding: var(--ldl-space-2) var(--ldl-space-3); border-radius: var(--ldl-radius-sm);
}
@media (hover: hover) { .ldl-settings-nav-item:hover { background: var(--ldl-recessed); color: var(--ldl-ink); } }
/* current category = gold selection */
.ldl-settings-nav-item[aria-current="true"], .ldl-settings-nav-item[aria-selected="true"] {
  background: var(--ldl-accent-soft); color: var(--ldl-accent-ink); font-weight: var(--ldl-weight-semibold);
}
.ldl-settings-nav-item[aria-current="true"] .ldl-node { margin-inline-start: auto; }
.ldl-settings-pane { overflow-y: auto; overscroll-behavior: contain; padding: var(--ldl-card-pad); max-width: var(--ldl-settings-pane-max); }
.ldl-settings-back { display: none; }

.ldl-settings-group { display: flex; flex-direction: column; gap: 0; margin-bottom: var(--ldl-space-6); }
.ldl-settings-group-title {
  font-family: var(--ldl-font-display); font-weight: var(--ldl-weight-semibold);
  font-size: calc(var(--ldl-type-h3-size) * var(--ldl-fs-scale)); color: var(--ldl-ink);
  margin: 0 0 var(--ldl-space-1);
}
.ldl-settings-group-desc { color: var(--ldl-ink3); font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); margin: 0 0 var(--ldl-space-2); }

/* the atom every tier shares: label + description on the start edge, control on the end edge.
   The label column keeps min(16em, 100%) and the control may shrink, so a control wider than
   the row (a dozen checkboxes, a long segmented control) wraps onto its own line below the
   label instead of squeezing the label to a letter per line. Short controls stay beside it. */
.ldl-setting {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--ldl-space-2) var(--ldl-space-4);
  padding: var(--ldl-space-3) 0; border-bottom: 1px solid var(--ldl-line); min-width: 0;
}
.ldl-setting:last-child { border-bottom: 0; }
.ldl-setting-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 0; min-width: min(16em, 100%); }
.ldl-setting-label { font-weight: var(--ldl-weight-semibold); font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); color: var(--ldl-ink); }
.ldl-setting-desc { color: var(--ldl-ink3); font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); line-height: 1.4; max-width: 52ch; }
.ldl-setting-control { flex: 0 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--ldl-space-2); }
.ldl-setting-danger .ldl-setting-label { color: var(--ldl-error); }

/* ---------- splash ----------
   A real, borderless window shown only when boot exceeds appChrome.splashDelayMs
   (400ms) so fast starts never flash it. Add .ldl-splash-fill to reuse the exact
   same layout as an in-window loading state (Electron/web, or mobile cold start). */
.ldl-splash {
  display: flex; flex-direction: column; gap: var(--ldl-space-2);
  width: var(--ldl-splash-w); height: var(--ldl-splash-h);
  padding: var(--ldl-space-6);
  background: var(--ldl-paper); color: var(--ldl-ink);
  border: 1px solid var(--ldl-line); border-radius: var(--ldl-radius-lg);
  box-shadow: var(--ldl-shadow-lg); overflow: hidden; position: relative;
}
.ldl-splash-fill { width: 100%; height: 100vh; height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
.ldl-splash::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, var(--ldl-line2) 1px, transparent 0);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 30% 20%, #000 10%, transparent 100%);
          mask-image: radial-gradient(ellipse 60% 60% at 30% 20%, #000 10%, transparent 100%);
}
.ldl-splash > * { position: relative; z-index: 1; }
.ldl-splash-mark { width: 44px; height: 44px; color: var(--ldl-brand-gold); }
.ldl-splash-name {
  font-family: var(--ldl-font-display); font-weight: var(--ldl-weight-semibold);
  font-size: calc(var(--ldl-type-h2-size) * var(--ldl-fs-scale)); line-height: 1.1;
  letter-spacing: -0.02em; color: var(--ldl-ink); margin: var(--ldl-space-2) 0 0;
}
.ldl-splash-version { font-family: var(--ldl-font-mono); font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); color: var(--ldl-ink3); }
.ldl-splash-progress { margin-top: auto; height: 4px; }
.ldl-splash-status {
  font-family: var(--ldl-font-mono); font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale));
  color: var(--ldl-ink3); min-height: 1.4em;
}
.ldl-splash-status::before { content: var(--ldl-kicker-prefix); color: var(--ldl-accent-ink); opacity: 0.7; }
.ldl-splash-legal { font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); color: var(--ldl-ink-dim); }

/* indeterminate progress — for boots with no measurable percentage */
.ldl-progress.is-indeterminate > i { width: 35%; animation: ldl-progress-slide 1.2s var(--ldl-motion-ease) infinite; }
@keyframes ldl-progress-slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(320%); }
}

/* ---------- about ---------- */
.ldl-about { display: flex; flex-direction: column; gap: var(--ldl-space-4); min-width: 0; }
.ldl-about-head { display: flex; align-items: center; gap: var(--ldl-space-4); }
.ldl-about-mark { width: 56px; height: 56px; flex: none; color: var(--ldl-brand-gold); }
.ldl-about-name {
  font-family: var(--ldl-font-display); font-weight: var(--ldl-weight-semibold);
  font-size: calc(var(--ldl-type-h2-size) * var(--ldl-fs-scale)); line-height: 1.1;
  letter-spacing: -0.02em; color: var(--ldl-ink); margin: 0;
}
.ldl-about-version { font-family: var(--ldl-font-mono); font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); color: var(--ldl-ink3); }
.ldl-about-desc { color: var(--ldl-ink2); font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); margin: 0; max-width: 60ch; }
/* canonical link order: Website · Privacy · Terms · Licenses (in-app) · Support */
.ldl-about-links { display: flex; flex-wrap: wrap; gap: var(--ldl-space-2) var(--ldl-space-4); }
.ldl-about-links a, .ldl-about-links button {
  display: inline-flex; align-items: center; gap: var(--ldl-space-1);
  appearance: none; border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale));
  color: var(--ldl-accent-ink); text-decoration: none;
}
@media (hover: hover) {
  .ldl-about-links a:hover, .ldl-about-links button:hover { text-decoration: underline; }
}
.ldl-about-links .ldl-icon { width: var(--ldl-icon-sm); height: var(--ldl-icon-sm); }
.ldl-about-legal { color: var(--ldl-ink3); font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); margin: 0; }
/* license / third-party notices: scrollable, selectable, offline — never a link-out */
.ldl-license {
  font-family: var(--ldl-font-mono); font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); line-height: 1.6;
  white-space: pre-wrap; overflow-wrap: anywhere; user-select: text;
  max-height: 44vh; max-height: 44dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: var(--ldl-space-3); margin: 0;
  background: var(--ldl-recessed); color: var(--ldl-ink2);
  border: 1px solid var(--ldl-line); border-radius: var(--ldl-card-radius);
}
.ldl-license-entry { border-bottom: 1px solid var(--ldl-line); padding-block: var(--ldl-space-3); }
.ldl-license-entry:last-child { border-bottom: 0; }
.ldl-license-name { font-weight: var(--ldl-weight-semibold); color: var(--ldl-ink); }
.ldl-license-spdx { font-family: var(--ldl-font-mono); color: var(--ldl-ink3); font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); }

/* Bare checkbox/radio wrapper — gives an unlabeled control a real hit area. */
.ldl-hit { display: inline-grid; place-items: center; }

@media (prefers-reduced-motion: reduce) {
  .ldl-iconbtn, .ldl-iconbtn::after { transition: none; }
  .ldl-progress.is-indeterminate > i { animation: none; width: 100%; opacity: 0.5; }
}

/* ---------- dialog anatomy (on .ldl-modal) ----------
   A dialog is a focused DECISION, not a page. Anatomy: head (title + close) /
   body / foot (actions). Action order is fixed: the confirming action is LAST,
   i.e. rightmost in LTR and leftmost in RTL — foot uses logical flex-end, so it
   mirrors on its own. Cancel is a plain .ldl-btn; never make both buttons look
   equally weighted. A destructive confirm uses .ldl-btn-danger, and the dialog
   takes .ldl-modal-danger so the title carries the error color too. */
.ldl-modal-head { display: flex; align-items: flex-start; gap: var(--ldl-space-3); margin-bottom: var(--ldl-space-4); }
.ldl-modal-title {
  font-family: var(--ldl-font-display); font-weight: var(--ldl-weight-semibold);
  font-size: calc(var(--ldl-type-h3-size) * var(--ldl-fs-scale)); line-height: 1.25;
  letter-spacing: -0.01em; color: var(--ldl-ink); margin: 0; text-wrap: balance;
}
.ldl-modal-desc { color: var(--ldl-ink2); margin: var(--ldl-space-1) 0 0; font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); }
.ldl-modal-close { margin-inline-start: auto; flex: none; }
.ldl-modal-body { color: var(--ldl-ink2); font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); line-height: 1.55; overscroll-behavior: contain; overflow-wrap: anywhere; }

/* BODY SCROLL LOCK — the #1 mobile modal bug. With a dialog, sheet or palette open, dragging on
   the scrim (or flicking past the end of the dialog) scrolls the PAGE BEHIND it, so dismissing
   the modal drops you somewhere you never navigated to. overscroll-behavior:contain stops the
   chain FROM a scrollable pane, but nothing stops a drag on the scrim itself.
   This cannot be done in CSS alone — preserving and restoring the scroll offset needs JS (the
   iOS position:fixed body dance). So the system ships the hook and the CONTRACT; the app adds
   and removes the class when it opens and closes an overlay. See docs/dialogs.md. */
.ldl-scroll-lock { overflow: hidden; touch-action: none; }
.ldl-modal-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: var(--ldl-space-2); flex-wrap: wrap;
  margin-top: var(--ldl-space-5); padding-top: var(--ldl-space-4); border-top: 1px solid var(--ldl-line);
}
/* a tertiary action ("Learn more") pinned opposite the confirm/cancel pair */
.ldl-modal-foot .ldl-foot-start { margin-inline-end: auto; }
.ldl-modal-danger .ldl-modal-title { color: var(--ldl-error); }

/* destructive action button — solid error. Distinct from .ldl-btn-tx, which is a
   cockpit TRANSMIT state, not a "this deletes your data" affordance. */
.ldl-btn-danger { background: var(--ldl-error); color: var(--ldl-on-error); border-color: transparent; }
@media (hover: hover) { .ldl-btn-danger:hover { filter: brightness(1.06); } }

/* ---------- tooltip ----------
   [data-tooltip] is the hover/focus affordance the icon-only app-bar cluster and
   the collapsed sidebar rail both depend on. It is PURELY VISUAL: a tooltip is not
   an accessible name, so the element MUST still carry aria-label (or visible text).
   Delay on hover (a pointer crossing a toolbar shouldn't strobe every icon); no
   delay on focus, because a keyboard user asked for it deliberately. */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  /* inset:auto first: .ldl-btn and .ldl-iconbtn draw their state layer on ::after with inset:0,
     and the leftover right:0/bottom:0 crushed every tooltip on a button to a sliver */
  position: absolute; inset: auto; left: 50%; top: calc(100% + 6px);
  transform: translateX(-50%);
  z-index: var(--ldl-z-tooltip);
  pointer-events: none; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--ldl-font-body); font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); line-height: 1.3;
  padding: var(--ldl-space-1) var(--ldl-space-2);
  background: var(--ldl-ink); color: var(--ldl-paper);
  border-radius: var(--ldl-radius-sm); box-shadow: var(--ldl-shadow-sm);
  opacity: 0; visibility: hidden;
  transition: opacity var(--ldl-motion-fast) var(--ldl-ease), visibility var(--ldl-motion-fast);
}
/* Sides (#36). Default is below, centred; centring uses physical left:50% + translateX(-50%),
   which is the same in both directions. The rest are LOGICAL, so they mirror under dir="rtl":
     top                      above, centred
     bottom-end / top-end     end-aligned: a header action at a container's end edge
     bottom-start / top-start start-aligned
     end / start              beside, vertically centred: an icon rail at the window's start
                              edge takes "end" (to its right in LTR, its left in RTL)
   A centred bubble on an edge control overhangs the window; pick the side that opens inward. */
[data-tooltip-side^="top"]::after { top: auto; bottom: calc(100% + 6px); }
[data-tooltip-side$="-end"]::after { left: auto; inset-inline-end: 0; transform: none; }
[data-tooltip-side$="-start"]::after { left: auto; inset-inline-start: 0; transform: none; }
[data-tooltip-side="end"]::after { left: auto; inset-inline-start: calc(100% + 6px); top: 50%; transform: translateY(-50%); }
[data-tooltip-side="start"]::after { left: auto; inset-inline-end: calc(100% + 6px); top: 50%; transform: translateY(-50%); }
[data-tooltip]:focus-visible::after { opacity: 1; visibility: visible; transition-delay: 0s; }
[data-tooltip][disabled]::after, [data-tooltip].is-disabled::after { display: none; }
@media (hover: hover) {
  [data-tooltip]:hover::after { opacity: 1; visibility: visible; transition-delay: var(--ldl-tooltip-delay); }
}
/* A TOOLTIP IS A POINTER-ONLY CONVENIENCE. On touch there is no hover, and :focus-visible
   deliberately stays quiet for touch focus (see interaction-states), so a tooltip can never be
   summoned by any gesture — it is not "hard to reach", it is unreachable. Remove it entirely
   there: left in, it is dead weight that can still overhang the viewport (a tooltip centered on
   the far-right palette icon extends ~100px past the edge and scrolls the page sideways).
   NEVER put information in a tooltip that the user needs. The corollary is the rail rule below. */
@media (hover: none) {
  [data-tooltip]::after { content: none; }
}
/* A button whose menu/popover is open has said what it does; its tooltip would sit on top of the
   very panel it opened (hover stays on the button). Gone while expanded. After the hover block
   on purpose: equal specificity. */
[data-tooltip][aria-expanded="true"]::after { content: none; }

/* ---------- inline alert / banner ----------
   The persistent middle ground between a transient .ldl-toast and a static
   .ldl-badge: "you are offline", "trial expires in 3 days". Semantic color lives in
   the leading edge and the icon; the TEXT stays ink/ink2 so it never becomes
   colored text on a tinted surface. */
.ldl-alert {
  display: flex; align-items: flex-start; gap: var(--ldl-space-3);
  padding: var(--ldl-space-3) var(--ldl-space-4);
  background: var(--ldl-paper2); color: var(--ldl-ink);
  border: 1px solid var(--ldl-line); border-inline-start: 3px solid var(--ldl-ink3);
  border-radius: var(--ldl-card-radius);
}
.ldl-alert-title { font-weight: var(--ldl-weight-semibold); color: var(--ldl-ink); margin: 0; font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); }
.ldl-alert-msg { color: var(--ldl-ink2); margin: var(--ldl-space-1) 0 0; font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); line-height: 1.45; }
.ldl-alert-body { min-width: 0; flex: 1; }
.ldl-alert-actions { display: flex; gap: var(--ldl-space-2); margin-top: var(--ldl-space-3); flex-wrap: wrap; }
.ldl-alert-close { margin-inline-start: var(--ldl-space-2); flex: none; }
.ldl-alert > .ldl-icon { flex: none; margin-top: 0.1em; }

.ldl-alert-info    { background: var(--ldl-info-soft);    border-color: var(--ldl-line); border-inline-start-color: var(--ldl-info); }
.ldl-alert-success { background: var(--ldl-success-soft); border-color: var(--ldl-line); border-inline-start-color: var(--ldl-success); }
.ldl-alert-warning { background: var(--ldl-warning-soft); border-color: var(--ldl-line); border-inline-start-color: var(--ldl-warning); }
.ldl-alert-error   { background: var(--ldl-error-soft);   border-color: var(--ldl-line); border-inline-start-color: var(--ldl-error); }
.ldl-alert-info    > .ldl-icon { color: var(--ldl-info); }
.ldl-alert-success > .ldl-icon { color: var(--ldl-success); }
.ldl-alert-warning > .ldl-icon { color: var(--ldl-warning-ink); }
.ldl-alert-error   > .ldl-icon { color: var(--ldl-error); }

/* ---------- sidebar / nav rail ----------
   Persistent side navigation (Logger, SDR, GSD). .is-rail collapses it to icons —
   which is exactly why every item needs data-tooltip AND aria-label: the label is
   the thing that disappears. Selection is gold (it is "current", not "success"). */
.ldl-sidebar {
  display: flex; flex-direction: column; gap: var(--ldl-space-1);
  inline-size: var(--ldl-sidebar-w); flex: none; min-height: 0; overflow-y: auto;
  padding: var(--ldl-space-2);
  background: var(--ldl-paper2); border-inline-end: 1px solid var(--ldl-line);
  transition: inline-size var(--ldl-motion-normal) var(--ldl-ease);
}
.ldl-sidebar-label {
  font-family: var(--ldl-font-mono); text-transform: uppercase; letter-spacing: 0.1em;
  font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); color: var(--ldl-ink3);
  padding: var(--ldl-space-3) var(--ldl-space-2) var(--ldl-space-1);
}
.ldl-sidebar-item {
  display: flex; align-items: center; gap: var(--ldl-space-2); inline-size: 100%;
  appearance: none; border: 0; background: transparent; cursor: pointer; text-align: start;
  font: inherit; font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); color: var(--ldl-ink2);
  min-height: var(--ldl-control-h); padding: 0 var(--ldl-space-2);
  border-radius: var(--ldl-control-radius); text-decoration: none; white-space: nowrap;
}
@media (hover: hover) { .ldl-sidebar-item:hover { background: var(--ldl-recessed); color: var(--ldl-ink); } }
.ldl-sidebar-item[aria-current], .ldl-sidebar-item.is-active {
  background: var(--ldl-accent-soft); color: var(--ldl-accent-ink); font-weight: var(--ldl-weight-semibold);
}
.ldl-sidebar-item .ldl-icon { inline-size: var(--ldl-icon-md); block-size: var(--ldl-icon-md); color: inherit; }
.ldl-sidebar-item .ldl-badge { margin-inline-start: auto; }
.ldl-sidebar-foot { margin-top: auto; }

.ldl-sidebar.is-rail { inline-size: var(--ldl-sidebar-rail-w); align-items: center; }
.ldl-sidebar.is-rail .ldl-sidebar-item { justify-content: center; padding: 0; }
/* the label and any trailing badge are what collapse away — hence the tooltip */
.ldl-sidebar.is-rail .ldl-sidebar-item > span,
.ldl-sidebar.is-rail .ldl-sidebar-item .ldl-badge,
.ldl-sidebar.is-rail .ldl-sidebar-label { display: none; }

/* THE RAIL UN-COLLAPSES WHERE THERE IS NO HOVER. The rail trades the label for a tooltip, and
   a tooltip needs a pointer — so on a tablet the rail is a column of bare glyphs with no gesture
   that can name them. (A screen-reader user is fine: aria-label is required and present. It is
   the SIGHTED TOUCH user who is stranded — the case a11y checklists miss.) Rather than invent a
   tap-to-reveal tooltip, give the label back: the rail is a pointer affordance, so it only
   exists for pointers. any-hover (not pointer:coarse) so a touchscreen laptop with a trackpad
   keeps its rail. */
@media (any-hover: none) {
  .ldl-sidebar.is-rail { inline-size: var(--ldl-sidebar-w); align-items: stretch; }
  .ldl-sidebar.is-rail .ldl-sidebar-item { justify-content: flex-start; padding: 0 var(--ldl-space-2); }
  .ldl-sidebar.is-rail .ldl-sidebar-item > span,
  .ldl-sidebar.is-rail .ldl-sidebar-label { display: revert; }
  .ldl-sidebar.is-rail .ldl-sidebar-item .ldl-badge { display: revert; margin-inline-start: auto; }
}

/* ---------- slider (range) ----------
   Continuous values in the cockpit apps: gain, volume, frequency.
   Firefox fills the track natively (::-moz-range-progress). WebKit/Blink has no
   such pseudo-element, so the filled portion is painted with a gradient driven by
   --val (0-100). Apps must keep it in sync:
     <input class="ldl-slider" type="range" style="--val:60" value="60"
            oninput="this.style.setProperty('--val', this.value)"> */
.ldl-slider {
  --ldl-slider-track: 4px;
  --ldl-slider-thumb: 14px;
  appearance: none; -webkit-appearance: none;
  inline-size: 100%; background: transparent; cursor: pointer;
  block-size: var(--ldl-slider-thumb); margin: 0;
}
.ldl-slider::-webkit-slider-runnable-track {
  block-size: var(--ldl-slider-track); border-radius: var(--ldl-radius-full);
  background: linear-gradient(to right,
    var(--ldl-accent) 0 calc(var(--val, 0) * 1%),
    var(--ldl-line2) calc(var(--val, 0) * 1%) 100%);
}
.ldl-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  inline-size: var(--ldl-slider-thumb); block-size: var(--ldl-slider-thumb);
  border-radius: 50%; background: var(--ldl-accent); border: 2px solid var(--ldl-card);
  box-shadow: var(--ldl-shadow-sm);
  margin-top: calc((var(--ldl-slider-track) - var(--ldl-slider-thumb)) / 2);
}
.ldl-slider::-moz-range-track {
  block-size: var(--ldl-slider-track); border-radius: var(--ldl-radius-full); background: var(--ldl-line2);
}
.ldl-slider::-moz-range-progress {
  block-size: var(--ldl-slider-track); border-radius: var(--ldl-radius-full); background: var(--ldl-accent);
}
.ldl-slider::-moz-range-thumb {
  inline-size: var(--ldl-slider-thumb); block-size: var(--ldl-slider-thumb);
  border-radius: 50%; background: var(--ldl-accent); border: 2px solid var(--ldl-card);
}
.ldl-slider:focus-visible { outline: var(--ldl-focus-width) solid var(--ldl-focus-color); outline-offset: var(--ldl-focus-offset); border-radius: var(--ldl-radius-full); }
.ldl-slider:disabled { cursor: not-allowed; opacity: var(--ldl-opacity-disabled-content); }
/* touch: grow the thumb without changing the density tier (matches .ldl-iconbtn) */
@media (pointer: coarse) { .ldl-slider { --ldl-slider-thumb: 20px; --ldl-slider-track: 6px; } }

/* ---------- toggle button (aria-pressed) — docs/controls.md ----------
   An on/off command that stays a BUTTON: NB, NR, Split, Bold, Mute. Not a .ldl-switch, which is a
   setting with a label. "On" is gold: it is the current/selected job, never success green. The
   label never changes with state; aria-pressed carries it. */
.ldl-btn[aria-pressed="true"], .ldl-iconbtn[aria-pressed="true"] {
  background: var(--ldl-accent-soft); color: var(--ldl-accent-ink); border-color: var(--ldl-accent-line);
}
@media (hover: hover) { .ldl-btn[aria-pressed="true"]:hover { border-color: var(--ldl-accent); } }

/* ---------- splitter (role="separator", focusable) — docs/controls.md ----------
   Resizes the panes either side of it. ALWAYS set aria-orientation: ARIA's default for a separator
   is horizontal, and a column divider is "vertical". The visible line is a 1px hairline; ::before
   is the hit area, 9px on a pointer and the touch target on a coarse pointer. The app owns the
   drag (pointer capture), the keys and aria-valuenow/min/max. */
.ldl-splitter {
  --ldl-splitter-hit: 9px;
  position: relative; flex: none; z-index: 1; background: var(--ldl-line); touch-action: none;
  block-size: 1px; inline-size: auto; align-self: stretch; cursor: row-resize;
  transition: background var(--ldl-motion-fast), box-shadow var(--ldl-motion-fast);
}
.ldl-splitter[aria-orientation="vertical"] { inline-size: 1px; block-size: auto; cursor: col-resize; }
.ldl-splitter::before { content: ""; position: absolute; inset-inline: 0; inset-block: calc((var(--ldl-splitter-hit) - 1px) / -2); }
.ldl-splitter[aria-orientation="vertical"]::before { inset-block: 0; inset-inline: calc((var(--ldl-splitter-hit) - 1px) / -2); }
@media (hover: hover) { .ldl-splitter:hover { background: var(--ldl-accent-line); box-shadow: 0 0 0 1px var(--ldl-accent-line); } }
.ldl-splitter.is-dragging, .ldl-splitter:focus-visible { background: var(--ldl-accent); box-shadow: 0 0 0 1px var(--ldl-accent); outline: none; }

/* ---------- sortable table headers — docs/controls.md ----------
   <th aria-sort="ascending|descending"><button class="ldl-th-sort">Name</button></th>. aria-sort
   goes ONLY on the sorted column (others omit it). The button inherits the header's mono/uppercase
   treatment; the arrow is gold on the sorted column (current = accent) and appears on hover or
   focus elsewhere, so the columns that sort are discoverable without twelve arrows at rest. */
.ldl-th-sort {
  display: inline-flex; align-items: center; gap: var(--ldl-space-1); max-inline-size: 100%;
  padding: 0; border: 0; background: transparent; cursor: pointer;
  font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; text-align: inherit;
}
.ldl-th-sort::after {
  content: ""; flex: none; inline-size: 5px; block-size: 5px; margin-block-start: 2px;
  border-block-start: 1.5px solid currentColor; border-inline-start: 1.5px solid currentColor;
  transform: rotate(225deg); opacity: 0; transition: opacity var(--ldl-motion-fast);
}
.ldl-table .num .ldl-th-sort { flex-direction: row-reverse; }
th[aria-sort] { color: var(--ldl-ink); }
th[aria-sort] .ldl-th-sort::after { opacity: 1; color: var(--ldl-accent-ink); }
th[aria-sort="ascending"] .ldl-th-sort::after { transform: rotate(45deg); margin-block: 2px 0; }
.ldl-th-sort:focus-visible::after { opacity: 0.6; }
@media (hover: hover) { .ldl-th-sort:hover::after { opacity: 0.6; } th[aria-sort] .ldl-th-sort:hover::after { opacity: 1; } }
@media (any-hover: none) { .ldl-th-sort::after { opacity: 0.35; } }

/* ---------- phone patterns (docs/mobile.md) ----------
   Upstreamed from WillisSDR's phone shell, where they were built and shipped first.
   Four pieces: a bottom SHEET with detents, a bottom TAB BAR, drill-in LIST rows, and an
   opt-in TOUCH SHELL. Landscape on a phone ("compact height": landscape AND under sm tall) is
   handled in CSS only — one DOM, no re-mount on rotation — by turning the tab bar into a
   leading rail and every sheet into a trailing side panel, because height is the scarce axis. */
@supports (height: 1dvh) {
  :root { --ldl-sheet-medium: 52dvh; --ldl-sheet-large: 92dvh; }
}

/* Bottom sheet. Detent is [data-detent="medium|large|auto"] (auto = content height, capped at
   large); the app owns the drag (snap to the nearest detent, below the lowest = dismiss).
   Modal sheets render .ldl-sheet-scrim; a .is-nonmodal sheet leaves the screen above it live —
   the reason medium exists. --ldl-keyboard-inset is the app's hook: set it from
   visualViewport (innerHeight - vv.height - vv.offsetTop) and the sheet rides above the
   on-screen keyboard instead of hiding the field being typed in. */
.ldl-sheet-scrim { position: fixed; inset: 0; z-index: var(--ldl-z-modal); background: var(--ldl-overlay); }
.ldl-sheet {
  position: fixed; inset-inline: 0; bottom: var(--ldl-keyboard-inset, 0px); z-index: var(--ldl-z-modal);
  margin-inline: auto; inline-size: min(100%, var(--ldl-sheet-max-w));
  display: flex; flex-direction: column; max-block-size: var(--ldl-sheet-large);
  background: var(--ldl-card); color: var(--ldl-ink);
  border: 1px solid var(--ldl-line); border-block-end: 0;
  border-start-start-radius: var(--ldl-radius-xl); border-start-end-radius: var(--ldl-radius-xl);
  box-shadow: var(--ldl-shadow-modal); outline: none;
  /* physical on purpose: safe-area insets are physical edges */
  padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right);
  transition: block-size var(--ldl-motion-fast) var(--ldl-ease), bottom var(--ldl-motion-fast) var(--ldl-ease);
}
.ldl-sheet[data-detent="medium"] { block-size: var(--ldl-sheet-medium); }
.ldl-sheet[data-detent="large"] { block-size: var(--ldl-sheet-large); }
.ldl-sheet.is-dragging { transition: none; }
/* The grabber is the drag target: touch-action none so the drag moves the SHEET, not the page. */
.ldl-sheet-grabber {
  flex: none; display: grid; place-items: center; block-size: var(--ldl-space-6);
  border: 0; background: transparent; padding: 0; touch-action: none; cursor: grab;
}
.ldl-sheet-grabber::before {
  content: ""; inline-size: 40px; block-size: 5px; border-radius: var(--ldl-radius-full); background: var(--ldl-line2);
}
.ldl-sheet-head {
  flex: none; display: flex; align-items: center; gap: var(--ldl-space-2);
  padding: 0 var(--ldl-space-2) var(--ldl-space-1) var(--ldl-space-4);
}
.ldl-sheet-title {
  margin: 0; flex: 1 1 auto; min-width: 0; font-family: var(--ldl-font-display);
  font-weight: var(--ldl-weight-semibold); letter-spacing: -0.02em;
  font-size: calc(var(--ldl-base-font) * 1.1 * var(--ldl-fs-scale));
}
.ldl-sheet-actions { margin-inline-start: auto; display: flex; align-items: center; gap: var(--ldl-space-1); }
.ldl-sheet-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: var(--ldl-space-1) var(--ldl-space-4) calc(var(--ldl-space-4) + env(safe-area-inset-bottom));
  display: grid; gap: var(--ldl-row-gap); align-content: start;
}
@media (prefers-reduced-motion: reduce) { .ldl-sheet { transition: none; } }

/* Bottom tab bar: 3-5 destinations, icon + label, never icon-only (no hover on a phone, so no
   tooltip to fall back on). Current tab is gold via aria-current="page" — "current" is an accent
   job, not success. .ldl-tabshell is the column that holds the content and the bar. */
.ldl-tabshell { display: flex; flex-direction: column; block-size: 100%; min-height: 0; }
.ldl-tabshell > :not(.ldl-tabbar) { flex: 1 1 auto; min-height: 0; }
.ldl-tabbar {
  flex: none; display: flex; gap: var(--ldl-space-1);
  padding: var(--ldl-space-1) var(--ldl-space-2) calc(var(--ldl-space-1) + env(safe-area-inset-bottom));
  background: var(--ldl-paper2); border-block-start: 1px solid var(--ldl-line);
}
.ldl-tabbar-item {
  flex: 1 1 0; min-width: 0; min-block-size: var(--ldl-tabbar-item-h);
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: var(--ldl-space-1); border: 0; border-radius: var(--ldl-control-radius);
  background: transparent; color: var(--ldl-ink3); cursor: pointer; text-decoration: none;
  font: inherit; font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); font-weight: var(--ldl-weight-semibold);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.ldl-tabbar-item .ldl-icon { inline-size: var(--ldl-icon-md); block-size: var(--ldl-icon-md); }
.ldl-tabbar-item > span { max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ldl-tabbar-item[aria-current], .ldl-tabbar-item.is-active { color: var(--ldl-accent-ink); }
.ldl-tabbar-item:active { background: var(--ldl-recessed); }
/* the keyboard owns the bottom edge while it is up (data-keyboard from watchKeyboardInset) */
:root[data-keyboard="open"] .ldl-tabbar { display: none; }
:root:has(.ldl-tabbar) { --ldl-toast-offset: calc(var(--ldl-tabbar-item-h) + var(--ldl-space-2)); }
:root[data-keyboard="open"] { --ldl-toast-offset: 0px; }

/* Drill-in list rows (settings list, inbox-style lists): label, optional trailing value, chevron.
   Taller than the touch floor on a coarse pointer — a row carries a label AND a value. */
.ldl-list {
  display: grid; margin: 0; padding: 0; list-style: none; overflow: hidden;
  background: var(--ldl-card); border: 1px solid var(--ldl-line); border-radius: var(--ldl-card-radius);
}
.ldl-list-row {
  display: flex; align-items: center; gap: var(--ldl-space-3); inline-size: 100%;
  min-block-size: var(--ldl-control-h); padding: var(--ldl-space-2) var(--ldl-space-4);
  border: 0; border-block-end: 1px solid var(--ldl-line); background: transparent; color: var(--ldl-ink);
  font: inherit; font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); text-align: start; text-decoration: none;
}
.ldl-list > :last-child, .ldl-list > li:last-child > .ldl-list-row { border-block-end: 0; }
:is(button, a).ldl-list-row { cursor: pointer; }
@media (hover: hover) { :is(button, a).ldl-list-row:hover { background: var(--ldl-recessed); } }
:is(button, a).ldl-list-row:active { background: var(--ldl-recessed); }
.ldl-list-row[aria-current] { background: var(--ldl-accent-soft); color: var(--ldl-accent-ink); }
/* nothing colored or dimmed on the gold wash (rule 1b): the trail takes the row ink */
.ldl-list-row[aria-current] .ldl-list-trail { color: inherit; }
.ldl-list-row.is-drill:has(> .ldl-list-trail)::after { margin-inline-start: var(--ldl-space-2); }
.ldl-list-trail { margin-inline-start: auto; color: var(--ldl-ink3); font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); }
/* the drill-in chevron: points inline-END, so it mirrors under RTL with the rest. It owns the
   auto margin when there is no trailing value; with one, the trail does and the chevron hugs it. */
.ldl-list-row.is-drill::after {
  content: ""; flex: none; inline-size: 7px; block-size: 7px; margin-inline-start: auto;
  border-block-start: 1.5px solid var(--ldl-ink3); border-inline-end: 1.5px solid var(--ldl-ink3); transform: rotate(45deg);
}

/* Touch shell — OPT-IN, on the root of a phone/tablet shell (not the marketing site): no
   double-tap zoom or 300ms delay, no rubber-band of the shell, no grey tap flash, and no text
   selection when a thumb rests on a control. Text a user would copy stays selectable. Pinch-zoom
   is untouched (touch-action: manipulation keeps it) — never reach for user-scalable=no. */
.ldl-touch-shell {
  touch-action: manipulation; overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none;
  -webkit-user-select: none; user-select: none;
}
.ldl-touch-shell :is(input, textarea, [contenteditable]:not([contenteditable="false"]), .ldl-selectable, .ldl-license) {
  -webkit-user-select: text; user-select: text; -webkit-touch-callout: default;
}

/* Compact height: a phone on its side. Height is the scarce axis, so the tab bar becomes a
   leading rail and sheets become a trailing full-height panel (52% of 375pt is 195pt — too
   short for anything). The grabber's vertical drag means nothing sideways, so it hides:
   Done, the scrim and back dismiss. 559.98px = layout.breakpoints.sm. */
@media (orientation: landscape) and (max-height: 559.98px) {
  .ldl-tabshell { flex-direction: row; }
  .ldl-tabbar {
    order: -1; flex-direction: column; justify-content: center; gap: var(--ldl-space-2);
    inline-size: var(--ldl-tabbar-rail-w); padding: var(--ldl-space-2) var(--ldl-space-1);
    padding-bottom: calc(var(--ldl-space-2) + env(safe-area-inset-bottom));
    padding-left: max(var(--ldl-space-1), env(safe-area-inset-left));
    border-block-start: 0; border-inline-end: 1px solid var(--ldl-line);
  }
  .ldl-tabbar-item { flex: none; inline-size: 100%; }
  .ldl-sheet {
    inset-block: 0 var(--ldl-keyboard-inset, 0px); inset-inline: auto 0; margin: 0;
    inline-size: min(calc(100vw - 120px), calc(var(--ldl-sheet-side-w) + env(safe-area-inset-right)));
    block-size: auto; max-block-size: none;
    border-block-end: 1px solid var(--ldl-line); border-inline-end: 0;
    border-radius: 0; border-start-start-radius: var(--ldl-radius-xl); border-end-start-radius: var(--ldl-radius-xl);
    padding-top: env(safe-area-inset-top); padding-left: 0;
  }
  .ldl-sheet[data-detent] { block-size: auto; }
  .ldl-sheet-grabber { display: none; }
  .ldl-sheet-head { padding-block-start: var(--ldl-space-3); }
}

/* ==========================================================================
   MARKETING SITE — docs/marketing.md
   Upstreamed from lacydigitallabs.com (site.css / pages.css), which hand-rolled each of these on
   5+ pages: the nav's <details> drawer and status pill, the inverse band, store badges, the
   per-platform price card, the page hero / section / CTA band scaffold, the FAQ, the filter chips
   and the fine print. Same look, built from tokens — and where the site broke a system rule
   (literal OKLCH greys, sub-12px mono, unguarded hover lifts, 34–40px tap targets) the system
   rule wins. Website-only in practice (comfortable density), but nothing here assumes it.
   ========================================================================== */

/* Screen-reader-only text: a struck-through price, an icon-only label, a brand name hidden on a
   phone. Visually gone, still read. Never put it on something focusable. */
.ldl-sr-only {
  position: absolute !important; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------- marketing nav: centred inner row, brand, links, status pill ---------- */
/* .ldl-nav-inner caps the row at --ldl-maxw while the bar's blur and hairline stay full-bleed. */
.ldl-nav:has(> .ldl-nav-inner) { padding: 0; }
.ldl-nav-inner {
  flex: 1; min-inline-size: 0; max-inline-size: var(--ldl-maxw); margin-inline: auto;
  display: flex; align-items: center; gap: var(--ldl-space-6);
  padding: var(--ldl-space-3) var(--ldl-space-6);
}
.ldl-nav-inner .ldl-nav-links { gap: var(--ldl-space-1); }
.ldl-nav-links a {
  padding: var(--ldl-space-2) var(--ldl-space-3); border-radius: var(--ldl-radius-md);
  font-weight: var(--ldl-weight-medium); white-space: nowrap;
  transition: color var(--ldl-motion-fast), background var(--ldl-motion-fast);
}
/* A nav CTA never wraps: two-line "Get the / apps" doubles the bar's height. */
.ldl-nav-cta { white-space: nowrap; }
.ldl-nav-links a[aria-current] { background: var(--ldl-paper2); }
@media (hover: hover) { .ldl-nav-links a:hover { background: var(--ldl-paper2); } }
/* An image mark (the Lattice SVG) instead of the lettered .ldl-brand-mark tile. */
.ldl-brand-logo { display: block; inline-size: 34px; block-size: 34px; flex: none; border-radius: var(--ldl-radius-md); box-shadow: var(--ldl-shadow-sm); }
.ldl-brand-name { font-weight: var(--ldl-weight-semibold); letter-spacing: var(--ldl-type-h3-tracking); font-size: calc(var(--ldl-base-font) * var(--ldl-fs-scale)); white-space: nowrap; }
.ldl-brand-suffix { color: var(--ldl-ink3); font-weight: var(--ldl-weight-medium); }
/* The status pill ("Local-first · no account"): a gold badge with a gold dot. Gold, not green —
   it states a brand promise, not a live connection (CLAUDE.md rule 1). It pulses gently; reduced
   motion stills it. Decorative chrome: it hides below lg, where the bar has no room for it. */
.ldl-nav-pill { flex: none; white-space: nowrap; gap: var(--ldl-space-2); padding: var(--ldl-space-1_5) var(--ldl-space-3); letter-spacing: 0.08em; }
.ldl-nav-pill .ldl-status-dot { background: var(--ldl-accent); box-shadow: none; animation: ldl-pulse 2.4s ease-in-out infinite; }
@keyframes ldl-pulse { 50% { opacity: 0.35; } }

/* MOBILE DRAWER — native <details>, so it opens with JavaScript off. The <summary> is the
   button: the browser gives it the button role, the expanded state, Enter/Space and the focus
   ring. It is a 44px target at every pointer, not only on touch. The drawer drops below the bar
   at the inline end, like the site's. Escape / outside-click / close-on-navigate are an optional
   six lines of script (docs/marketing.md); without them it still closes from the same button.
   Below lg (where the links stop fitting) the links hide and the burger shows — but ONLY in a
   nav that carries a .ldl-nav-mobile, so the JS drawer (.ldl-nav-toggle) keeps its own rules. */
.ldl-nav-mobile { display: none; position: relative; flex: none; }
.ldl-nav-mobile > summary { list-style: none; }
.ldl-nav-mobile > summary::-webkit-details-marker { display: none; }
.ldl-nav-burger {
  display: inline-grid; place-items: center; cursor: pointer;
  inline-size: var(--ldl-touch-target); block-size: var(--ldl-touch-target);
  border: 1px solid var(--ldl-line2); border-radius: var(--ldl-radius-md);
  background: var(--ldl-card); color: var(--ldl-ink);
  transition: border-color var(--ldl-motion-fast), background var(--ldl-motion-fast);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.ldl-nav-burger .ldl-icon { inline-size: var(--ldl-icon-md); block-size: var(--ldl-icon-md); }
.ldl-nav-burger .ldl-nav-burger-close { display: none; }
.ldl-nav-mobile[open] .ldl-nav-burger-menu { display: none; }
.ldl-nav-mobile[open] .ldl-nav-burger-close { display: block; }
/* open = the gold "current" wash, exactly like .ldl-iconbtn[aria-expanded="true"] */
.ldl-nav-mobile[open] > .ldl-nav-burger { background: var(--ldl-accent-soft); color: var(--ldl-accent-ink); border-color: var(--ldl-accent-line); }
@media (hover: hover) { .ldl-nav-burger:hover { border-color: var(--ldl-accent); } }
.ldl-nav-drawer {
  position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + var(--ldl-space-3));
  z-index: var(--ldl-z-dropdown);
  display: flex; flex-direction: column; gap: var(--ldl-space-0_5);
  min-inline-size: var(--ldl-sidebar-w); max-inline-size: calc(100vw - 2 * var(--ldl-space-4));
  max-block-size: calc(100vh - var(--ldl-space-24)); max-block-size: calc(100dvh - var(--ldl-space-24)); overflow-y: auto; overscroll-behavior: contain;
  padding: var(--ldl-space-2);
  background: var(--ldl-paper); border: 1px solid var(--ldl-line2); border-radius: var(--ldl-card-radius);
  box-shadow: var(--ldl-shadow-lg);
}
.ldl-nav-drawer a {
  display: flex; align-items: center; min-block-size: var(--ldl-touch-target);
  padding-inline: var(--ldl-space-3); border-radius: var(--ldl-radius-md);
  color: var(--ldl-ink2); font-weight: var(--ldl-weight-medium); text-decoration: none;
  font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale));
  transition: color var(--ldl-motion-fast), background var(--ldl-motion-fast);
}
/* the page you are on is the gold current wash — outside the hover guard, it is state */
.ldl-nav-drawer a[aria-current] { background: var(--ldl-accent-soft); color: var(--ldl-accent-ink); font-weight: var(--ldl-weight-semibold); }
@media (hover: hover) { .ldl-nav-drawer a:not([aria-current]):hover { background: var(--ldl-paper2); color: var(--ldl-ink); } }
.ldl-nav-drawer .ldl-btn { margin-block-start: var(--ldl-space-2); }

/* ---------- inverse surface ---------- */
/* An ink band in light, a raised card in dark (tokens.json → color.inverse). The surface
   re-points the core text, line and surface tokens at their inverse values, and the accent's
   TEXT roles at the ramp's dark stop (--ldl-inverse-accent*, derived per ramp), so a kicker,
   heading, .ldl-muted, ghost button, badge or chip nested inside needs no override at all.
   The accent FILL is left alone: a primary button keeps its gold and its gated label. Semantic
   status text is NOT remapped — never put success/error text on an inverse band. */
.ldl-inverse, .ldl-cta-band {
  --ldl-ink: var(--ldl-inverse-ink);
  --ldl-ink2: var(--ldl-inverse-ink2);
  --ldl-ink3: var(--ldl-inverse-ink2);
  --ldl-line: var(--ldl-inverse-line);
  --ldl-line2: var(--ldl-inverse-line);
  --ldl-paper: var(--ldl-inverse-bg);
  --ldl-paper2: var(--ldl-inverse-bg);
  --ldl-card: var(--ldl-inverse-bg);
  --ldl-accent-ink: var(--ldl-inverse-accent);
  --ldl-accent-soft: var(--ldl-inverse-accent-soft);
  --ldl-accent-line: var(--ldl-inverse-accent-line);
  --ldl-focus-color: var(--ldl-inverse-accent);
  background: var(--ldl-inverse-bg); color: var(--ldl-inverse-ink);
  color-scheme: dark;
}
/* a card that IS the inverse surface keeps an invisible edge in light, a rim in dark */
.ldl-card.ldl-inverse { border-color: var(--ldl-inverse-border); }

/* ---------- page scaffold: page hero, sections, CTA band ---------- */
/* Inner-page hero: dot grid fading from the top start corner, hairline under it. isolation keeps
   the grid at z-index -1 behind the content without a z-index on every child. */
.ldl-page-hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: var(--ldl-page-hero-pad-top) var(--ldl-page-hero-pad-bottom);
  border-block-end: 1px solid var(--ldl-line);
}
.ldl-page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, var(--ldl-line2) 1px, transparent 0);
  background-size: 30px 30px; opacity: 0.6;
  -webkit-mask-image: radial-gradient(110% 90% at 15% 0%, #000 30%, transparent 75%);
          mask-image: radial-gradient(110% 90% at 15% 0%, #000 30%, transparent 75%);
}
/* the fade starts at the inline-START corner, and a gradient position is physical */
[dir="rtl"] .ldl-page-hero::before {
  -webkit-mask-image: radial-gradient(110% 90% at 85% 0%, #000 30%, transparent 75%);
          mask-image: radial-gradient(110% 90% at 85% 0%, #000 30%, transparent 75%);
}
.ldl-page-hero-icon { display: block; inline-size: 76px; block-size: 76px; border-radius: var(--ldl-radius-icon); box-shadow: var(--ldl-shadow-sm); margin-block-end: var(--ldl-space-5); }
.ldl-page-hero-title {
  margin: var(--ldl-space-4) 0 0; font-family: var(--ldl-font-display);
  font-size: var(--ldl-type-display2-size); font-weight: var(--ldl-type-display2-weight);
  line-height: var(--ldl-type-display2-leading); letter-spacing: var(--ldl-type-display2-tracking); text-wrap: balance;
}
.ldl-lead, .ldl-page-hero-lead {
  font-size: var(--ldl-type-lead-size); line-height: var(--ldl-type-lead-leading); color: var(--ldl-ink2);
  max-inline-size: 620px;
}
.ldl-page-hero-lead { margin: var(--ldl-space-4) 0 0; }
.ldl-page-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ldl-space-3); margin-block-start: var(--ldl-space-6); }
.ldl-page-hero-meta {
  margin-block-start: var(--ldl-space-5); font-family: var(--ldl-font-mono);
  font-size: calc(var(--ldl-type-fineprint) * var(--ldl-fs-scale)); letter-spacing: 0.03em; color: var(--ldl-ink3);
}
.ldl-page-hero-meta a { color: var(--ldl-ink2); text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) { .ldl-page-hero-meta a:hover { color: var(--ldl-accent-ink); } }

/* Sections. .ldl-section-alt is self-sufficient (padding included) so it can stand alone. An
   inverse section is .ldl-section.ldl-inverse. */
.ldl-section, .ldl-section-alt { padding-block: var(--ldl-section-pad); }
.ldl-section-alt { background: var(--ldl-paper2); border-block: 1px solid var(--ldl-line); }
.ldl-section-head { max-inline-size: var(--ldl-content-w); margin-inline: auto; text-align: center; }
.ldl-section-head.is-start { margin-inline: 0; text-align: start; }
.ldl-section-title {
  margin: var(--ldl-space-3) 0 0; font-family: var(--ldl-font-display); color: inherit;
  font-size: var(--ldl-type-section-size); font-weight: var(--ldl-type-section-weight);
  line-height: var(--ldl-type-section-leading); letter-spacing: var(--ldl-type-section-tracking); text-wrap: balance;
}
.ldl-section-head > p { margin: var(--ldl-space-3) 0 0; color: var(--ldl-ink2); font-size: calc(var(--ldl-base-font) * var(--ldl-fs-scale)); }

/* CTA band: a rounded inverse panel, centred. .is-split is the two-column form (copy start,
   actions/chips end) — the site's consulting band. */
.ldl-cta-band {
  border: 1px solid var(--ldl-inverse-border); border-radius: var(--ldl-cta-band-radius);
  padding: var(--ldl-cta-band-pad); text-align: center;
}
.ldl-cta-band p { margin: var(--ldl-space-4) auto 0; max-inline-size: 520px; color: var(--ldl-ink2); font-size: calc(var(--ldl-base-font) * var(--ldl-fs-scale)); }
.ldl-cta-band-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--ldl-space-3); margin-block-start: var(--ldl-space-6); }
.ldl-cta-band.is-split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--ldl-space-10); align-items: center; text-align: start; }
.ldl-cta-band.is-split p { margin-inline: 0; }
.ldl-cta-band.is-split .ldl-cta-band-actions { justify-content: flex-start; }

/* ---------- store badges ---------- */
/* ONE geometry: height = --ldl-touch-target at every pointer (a badge is the conversion target),
   width = height x Apple's badge aspect (marketing.storeBadgeAspect). Four kinds:
     - Apple: Apple's own SVG in a link, .ldl-store-badge-img (never redrawn, never recoloured)
     - Microsoft: the <ms-store-badge> web component, .ldl-store-badge-ms (sized via ::part(img))
     - Google Play and direct / Linux: .ldl-store-badge, drawn here in the store tokens
   The visible legend inside a drawn badge mirrors the store artwork's proportions (it scales with
   the badge), so the link's aria-label is its accessible name — always set one. */
.ldl-store-badges { display: flex; flex-direction: column; align-items: center; gap: var(--ldl-space-3); }
.ldl-store-badges.is-row { flex-direction: row; flex-wrap: wrap; justify-content: center; }
.ldl-store-badges.is-start { align-items: flex-start; justify-content: flex-start; }
.ldl-store-badge {
  display: inline-flex; align-items: center; gap: var(--ldl-space-2); flex: none;
  box-sizing: border-box; block-size: var(--ldl-store-badge-h); inline-size: var(--ldl-store-badge-w);
  padding-inline: var(--ldl-space-3);
  background: var(--ldl-store-badge-bg); color: var(--ldl-store-badge-ink);
  border: 1px solid var(--ldl-store-badge-line); border-radius: var(--ldl-radius-md);
  text-decoration: none; cursor: pointer;
  transition: border-color var(--ldl-motion-fast);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
@media (hover: hover) { .ldl-store-badge:hover { border-color: var(--ldl-store-badge-ink); } }
.ldl-store-badge:active { transform: translateY(1px); }
.ldl-store-badge > :is(img, svg) { inline-size: calc(var(--ldl-store-badge-h) * 0.5); block-size: calc(var(--ldl-store-badge-h) * 0.5); flex: none; }
.ldl-store-badge-text { display: flex; flex-direction: column; min-inline-size: 0; line-height: 1; text-align: start; }
.ldl-store-badge-text small {
  font-family: var(--ldl-font-body); font-weight: var(--ldl-weight-medium); text-transform: uppercase; letter-spacing: 0.06em;
  font-size: calc(var(--ldl-store-badge-h) * 0.23); margin-block-end: 2px;
}
.ldl-store-badge-text strong {
  font-family: var(--ldl-font-display); font-weight: var(--ldl-weight-semibold); letter-spacing: 0.01em; white-space: nowrap;
  font-size: calc(var(--ldl-store-badge-h) * 0.375);
}
/* Apple: the link wraps the official image; the image sets the size */
.ldl-store-badge-link { display: inline-flex; flex: none; border-radius: var(--ldl-radius-md); }
.ldl-store-badge-img { display: block; block-size: var(--ldl-store-badge-h); inline-size: auto; max-inline-size: none; }
/* Microsoft: the component renders its own <img part="img">, with an UNGUARDED hover lift in its
   shadow DOM — neutralised here, since on touch it latches (docs/interaction-states.md). */
ms-store-badge.ldl-store-badge-ms { display: inline-block; flex: none; block-size: var(--ldl-store-badge-h); line-height: 0; }
ms-store-badge.ldl-store-badge-ms::part(img) { block-size: var(--ldl-store-badge-h); inline-size: auto; border-radius: var(--ldl-radius-md); transition: none; }
ms-store-badge.ldl-store-badge-ms::part(img):hover { transform: none; box-shadow: none; }
/* Optional price slot: any badge + its price, side by side. */
.ldl-store-option { display: inline-flex; align-items: center; gap: var(--ldl-space-3); }
.ldl-store-price {
  font-family: var(--ldl-font-display); font-weight: var(--ldl-weight-semibold); letter-spacing: -0.02em;
  font-size: calc(var(--ldl-base-font) * 1.3 * var(--ldl-fs-scale)); color: var(--ldl-accent-ink);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* ---------- price card (.ldl-plan) ---------- */
/* One platform, one price: name, sub-line, price, the store badge, fine print. Centred by
   default (the site's .platcard); .is-start for a left-aligned card with price rows (the
   homepage .price-card). The price is emphasis, so it is gold — never success green. */
.ldl-plan-grid { display: grid; gap: var(--ldl-space-5); grid-template-columns: repeat(auto-fit, minmax(min(var(--ldl-plan-min, 230px), 100%), 1fr)); }
.ldl-plan {
  display: flex; flex-direction: column; align-items: center; text-align: center; min-inline-size: 0;
  background: var(--ldl-card); color: var(--ldl-ink);
  border: 1px solid var(--ldl-line); border-radius: var(--ldl-card-radius);
  padding: calc(var(--ldl-card-pad) + var(--ldl-space-1)) var(--ldl-card-pad);
  transition: transform var(--ldl-motion-normal) var(--ldl-motion-ease), box-shadow var(--ldl-motion-normal), border-color var(--ldl-motion-normal);
}
@media (hover: hover) { .ldl-plan:hover { transform: translateY(-3px); box-shadow: var(--ldl-shadow-md); border-color: var(--ldl-accent-line); } }
.ldl-plan.is-start { align-items: stretch; text-align: start; }
.ldl-plan.is-featured { border-color: var(--ldl-accent-line); box-shadow: var(--ldl-shadow-md); }
.ldl-plan-name { font-family: var(--ldl-font-display); font-weight: var(--ldl-weight-semibold); font-size: var(--ldl-type-h3-size); line-height: var(--ldl-type-h3-leading); letter-spacing: var(--ldl-type-h3-tracking); }
.ldl-plan-sub { margin-block-start: var(--ldl-space-1); font-family: var(--ldl-font-mono); font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ldl-ink3); }
.ldl-plan-price {
  margin-block: var(--ldl-space-4) var(--ldl-space-1);
  font-family: var(--ldl-font-display); font-weight: var(--ldl-weight-semibold); line-height: 1.1; letter-spacing: -0.03em;
  font-size: calc(var(--ldl-base-font) * 2.25 * var(--ldl-fs-scale)); color: var(--ldl-accent-ink); font-variant-numeric: tabular-nums;
}
/* not on sale yet: the price slot says so in mono, muted (copy: "Coming soon") */
.ldl-plan.is-soon .ldl-plan-price {
  font-family: var(--ldl-font-mono); font-weight: var(--ldl-weight-regular); letter-spacing: 0.04em; text-transform: uppercase;
  font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); color: var(--ldl-ink3);
}
/* A time-limited price: the regular price struck through BEFORE the intro price, and the end date
   in .ldl-plan-until. When the offer ends, delete .is-intro, the <s> and the until line. */
.ldl-plan.is-intro .ldl-plan-price { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; column-gap: var(--ldl-space-2); }
.ldl-plan.is-intro.is-start .ldl-plan-price { justify-content: flex-start; }
.ldl-plan-was { font-size: 0.5em; font-weight: var(--ldl-weight-medium); letter-spacing: 0; color: var(--ldl-ink3); text-decoration: line-through; }
.ldl-plan-until { font-family: var(--ldl-font-mono); font-size: calc(var(--ldl-type-fineprint) * var(--ldl-fs-scale)); letter-spacing: 0.02em; color: var(--ldl-accent-ink); }
.ldl-plan-fine { margin-block-start: auto; padding-block-start: var(--ldl-space-4); font-family: var(--ldl-font-mono); font-size: calc(var(--ldl-type-fineprint) * var(--ldl-fs-scale)); line-height: 1.5; color: var(--ldl-ink3); }
.ldl-plan-fine a { color: var(--ldl-accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.ldl-plan > .ldl-btn { inline-size: 100%; margin-block-start: var(--ldl-space-4); }
.ldl-plan > .ldl-btn + .ldl-btn { margin-block-start: var(--ldl-space-2); }
.ldl-plan > .ldl-store-badges { margin-block-start: var(--ldl-space-4); }
/* Price rows: several platforms in one card (the homepage's multi-platform cards). */
.ldl-plan-rows { align-self: stretch; display: flex; flex-direction: column; margin: var(--ldl-space-4) 0; padding: 0; list-style: none; }
.ldl-plan-row { display: flex; align-items: center; justify-content: space-between; gap: var(--ldl-space-3); padding-block: var(--ldl-space-2); border-block-end: 1px solid var(--ldl-line); text-align: start; }
.ldl-plan-row:first-child { border-block-start: 1px solid var(--ldl-line); }
.ldl-plan-row-name { display: flex; flex-direction: column; font-weight: var(--ldl-weight-semibold); font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); color: var(--ldl-ink); }
.ldl-plan-row-name small { margin-block-start: 2px; font-family: var(--ldl-font-mono); font-weight: var(--ldl-weight-regular); font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ldl-ink3); }
.ldl-plan-row-price { flex: none; font-family: var(--ldl-font-display); font-weight: var(--ldl-weight-semibold); letter-spacing: -0.02em; font-size: calc(var(--ldl-base-font) * 1.3 * var(--ldl-fs-scale)); color: var(--ldl-accent-ink); font-variant-numeric: tabular-nums; }
.ldl-plan-row-price.is-soon { font-family: var(--ldl-font-mono); font-weight: var(--ldl-weight-regular); letter-spacing: 0.06em; text-transform: uppercase; font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); color: var(--ldl-ink3); }

/* ---------- FAQ accordion (<details>/<summary>) ---------- */
/* Native disclosure: Enter/Space toggle, the expanded state is announced, find-in-page opens a
   closed answer, and it works without script. Each question is its own <details>; do not add
   name="" to make it exclusive — readers compare answers. The chevron is drawn with PHYSICAL
   borders on purpose: down/up is the same in RTL. The list clips its corners, so the focus ring
   is drawn inset instead of being cut off. */
.ldl-faq {
  display: grid; max-inline-size: var(--ldl-content-w); margin-inline: auto;
  background: var(--ldl-card); border: 1px solid var(--ldl-line); border-radius: var(--ldl-card-radius); overflow: hidden;
}
.ldl-faq > details + details { border-block-start: 1px solid var(--ldl-line); }
.ldl-faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: var(--ldl-space-4);
  min-block-size: var(--ldl-touch-target); padding: var(--ldl-space-4) var(--ldl-space-5);
  list-style: none; cursor: pointer; color: var(--ldl-ink);
  font-family: var(--ldl-font-display); font-weight: var(--ldl-weight-semibold); line-height: 1.35;
  font-size: calc(var(--ldl-base-font) * var(--ldl-fs-scale));
  transition: color var(--ldl-motion-fast);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.ldl-faq-q::-webkit-details-marker { display: none; }
.ldl-faq-q::after {
  content: ""; flex: none; inline-size: 8px; block-size: 8px;
  border-right: 1.5px solid var(--ldl-accent-ink); border-bottom: 1.5px solid var(--ldl-accent-ink);
  transform: translateY(-25%) rotate(45deg); transition: transform var(--ldl-motion-fast) var(--ldl-motion-ease);
}
details[open] > .ldl-faq-q::after { transform: translateY(25%) rotate(-135deg); }
.ldl-faq-q:focus-visible { outline-offset: calc(-1 * (var(--ldl-focus-width) + var(--ldl-focus-offset))); }
@media (hover: hover) { .ldl-faq-q:hover { color: var(--ldl-accent-ink); } }
.ldl-faq-a { padding: 0 var(--ldl-space-5) var(--ldl-space-5); color: var(--ldl-ink2); font-size: calc(var(--ldl-ui-font) * var(--ldl-fs-scale)); line-height: 1.65; }
.ldl-faq-a > :first-child { margin-block-start: 0; }
.ldl-faq-a > :last-child { margin-block-end: 0; }
.ldl-faq-a a { color: var(--ldl-accent-ink); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- toggle chips (.ldl-chip-group) ---------- */
/* The PILL form of the pressed pattern (.ldl-segmented, .ldl-btn[aria-pressed]): filter chips
   over a list or table. Pressed is the gold current wash — never green. Two markup shapes:
   independent toggles use aria-pressed; one-of-N per group may instead be role="radiogroup" +
   role="radio" aria-checked (both styled). Label the group (role="group" aria-labelledby). A
   .ldl-chip on a <span> is a static tag pill. */
.ldl-chip-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--ldl-space-3) var(--ldl-space-6); }
.ldl-chip-group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ldl-space-2); }
.ldl-chip-label { font-family: var(--ldl-font-mono); font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ldl-ink3); }
.ldl-chip {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: var(--ldl-space-1_5);
  font-family: var(--ldl-font-mono); font-size: calc(var(--ldl-ui-font-sm) * var(--ldl-fs-scale)); line-height: var(--ldl-control-leading);
  padding: var(--ldl-space-2) var(--ldl-space-3); margin: 0;
  border: 1px solid var(--ldl-line2); border-radius: var(--ldl-radius-full);
  background: var(--ldl-card); color: var(--ldl-ink2); text-decoration: none;
  transition: border-color var(--ldl-motion-fast), background var(--ldl-motion-fast), color var(--ldl-motion-fast);
}
:is(button, a).ldl-chip { cursor: pointer; }
@media (hover: hover) { :is(button, a).ldl-chip:hover { border-color: var(--ldl-ink3); color: var(--ldl-ink); } }
:is(button, a).ldl-chip:active { transform: translateY(1px); }
.ldl-chip[aria-pressed="true"], .ldl-chip[role="radio"][aria-checked="true"] { border-color: var(--ldl-accent); background: var(--ldl-accent-soft); color: var(--ldl-accent-ink); }
@media (hover: hover) { .ldl-chip:is([aria-pressed="true"], [aria-checked="true"]):hover { border-color: var(--ldl-accent); color: var(--ldl-accent-ink); } }

/* ---------- fine print ---------- */
/* Legal lines, trademark notes, price small print. --ldl-type-fineprint has a FLOOR
   (marketing.fineprintFloorPx, 12px) instead of shrinking with density. */
.ldl-fineprint { font-size: calc(var(--ldl-type-fineprint) * var(--ldl-fs-scale)); line-height: 1.6; color: var(--ldl-ink3); }

/* ---------- marketing: responsive ---------- */
/* Four or more links plus the pill don't fit between lg and ~1200px (the links wrapped and the CTA
   squashed). The pill is decorative, so it goes first; a three-link nav keeps it down to lg. */
@media (max-width: 1199.98px) {
  .ldl-nav-inner:has(.ldl-nav-links > a:nth-child(4)) .ldl-nav-pill { display: none; }
}
@media (max-width: 939.98px) {
  .ldl-nav-mobile { display: block; }
  .ldl-nav:has(.ldl-nav-mobile) .ldl-nav-links { display: none; }
  .ldl-nav-pill { display: none; }
  .ldl-cta-band.is-split { grid-template-columns: minmax(0, 1fr); gap: var(--ldl-space-6); }
}
@media (max-width: 559.98px) {
  .ldl-nav-inner { gap: var(--ldl-space-2); padding-inline: var(--ldl-space-4); }
  /* The CTA stays in the bar (docs/app-chrome.md), so on a phone the brand gives up its words and
     keeps its mark: brand + "Get the apps" + the burger is ~410px wide, a phone is 360-390. The
     name stays in the accessibility tree, so the link keeps its accessible name. */
  .ldl-nav-inner:has(.ldl-nav-cta) .ldl-brand-name {
    position: absolute; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .ldl-cta-band { padding: var(--ldl-cta-band-pad-sm) var(--ldl-space-5); }
}
@media (pointer: coarse) {
  /* every marketing control reaches the touch target; the chip keeps its pill look */
  :is(button, a).ldl-chip { min-block-size: var(--ldl-touch-target); min-inline-size: var(--ldl-touch-target); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
}

/* ---------- mobile: the same shell, thumb-first ----------
   Below sm (560px) the shell reflows rather than shrinking:
   - app bar keeps settings + palette, drops help into the overflow menu
   - the in-window menu bar collapses behind the overflow (hamburger) button
   - palette and settings become full-screen sheets
   - settings switches to list -> drill-in detail via [data-view] on .ldl-settings
   Flutter (WillisGSD) mirrors this: AppBar actions + a Drawer for overflow,
   and a settings ListView that pushes a detail route.
   ORDER MATTERS: this block and the (pointer: coarse) block below override component
   base rules at equal specificity, so they must come AFTER every component they touch.
   They used to sit before the dialog/sidebar/slider sections, and those base rules won:
   the drawer lost its notch inset (#12), touch sidebar rows stayed 36px (#13), and the
   stacked mobile modal foot kept its auto margin. New components go ABOVE this line. */
.ldl-appbar-overflow { display: none; }
@media (max-width: 559.98px) {
  .ldl-appbar { gap: var(--ldl-space-2); padding-inline: var(--ldl-space-3); }
  .ldl-appbar-overflow { display: inline-grid; }
  .ldl-menubar { display: none; }
  /* help and the light/dark toggle collapse into the overflow menu. Theme is also reachable
     in Settings > Appearance, so the toggle is a shortcut, never the only path to it. */
  .ldl-action-help { display: none; }
  .ldl-action-mode { display: none; }

  /* full-screen sheet: palette, settings modal, about.
     A 100dvh sheet with square corners genuinely fills the screen — so under viewport-fit=cover
     its top row lands under the Dynamic Island and its bottom row (the action buttons) lands
     under the home indicator. The insets are what make "full-screen" honest. */
  .ldl-palette-scrim { padding-top: 0; }
  .ldl-palette {
    width: 100%; max-width: none; height: calc(100vh - var(--ldl-keyboard-inset, 0px)); height: calc(100dvh - var(--ldl-keyboard-inset, 0px)); max-height: none; border: 0; border-radius: 0;
    padding-block-start: env(safe-area-inset-top);
    padding-block-end: env(safe-area-inset-bottom);
  }
  .ldl-palette-footer { display: none; }

  .ldl-scrim:has(> :is(.ldl-modal-sheet, .ldl-modal-settings)) { padding-top: 0; place-items: stretch; }
  /* the Settings selectors are repeated so this out-specifies the desktop frame above */
  .ldl-modal-sheet, .ldl-modal-sheet:has(> .ldl-settings), .ldl-modal-settings {
    width: 100%; max-width: none; height: calc(100vh - var(--ldl-keyboard-inset, 0px)); height: calc(100dvh - var(--ldl-keyboard-inset, 0px)); max-height: none; border: 0; border-radius: 0;
    padding: var(--ldl-space-4);
    padding-block-start: max(var(--ldl-space-4), env(safe-area-inset-top));
    padding-block-end: max(var(--ldl-space-4), env(safe-area-inset-bottom));
  }

  /* settings: list -> detail. Default view is the category list. */
  .ldl-settings { grid-template-columns: minmax(0, 1fr); }
  .ldl-settings-nav { border-inline-end: 0; background: transparent; padding-inline: 0; }
  .ldl-settings-nav-item { padding-block: var(--ldl-space-3); border-bottom: 1px solid var(--ldl-line); border-radius: 0; }
  .ldl-settings-pane { max-width: none; padding-inline: 0; }
  .ldl-settings[data-view="detail"] .ldl-settings-nav { display: none; }
  .ldl-settings:not([data-view="detail"]) .ldl-settings-pane { display: none; }
  .ldl-settings[data-view="detail"] .ldl-settings-back { display: inline-flex; align-items: center; gap: var(--ldl-space-1); margin-bottom: var(--ldl-space-3); }

  /* a control that would be squeezed by a long label drops below it instead */
  .ldl-setting { align-items: flex-start; flex-direction: column; gap: var(--ldl-space-2); }
  .ldl-setting-control { width: 100%; }
  .ldl-setting-control > .ldl-select, .ldl-setting-control > .ldl-input { flex: 1; }
  .ldl-setting-row-inline { flex-direction: row; align-items: center; justify-content: space-between; }
  .ldl-setting-row-inline .ldl-setting-control { width: auto; }

  .ldl-splash {
    width: 100%; height: 100vh; height: 100dvh; border: 0; border-radius: 0;
    padding-block: max(var(--ldl-space-6), env(safe-area-inset-top)) max(var(--ldl-space-6), env(safe-area-inset-bottom));
  }
  .ldl-license { max-height: none; }

  /* SIDEBAR -> OFF-CANVAS DRAWER. At 220px the sidebar is 61% of a 360px screen, flex:none,
     and undismissable — it forced horizontal overflow. The shell already renders a hamburger
     (.ldl-appbar-overflow) that had nothing to open; this is what it opens. Apps toggle
     .is-open and should render .ldl-sidebar-scrim behind it. */
  .ldl-sidebar {
    position: fixed; inset-block: 0; inset-inline-start: 0; z-index: var(--ldl-z-overlay);
    inline-size: min(calc(var(--ldl-sidebar-w) * 1.4), 82vw);
    transform: translateX(-100%);
    transition: transform var(--ldl-motion-normal) var(--ldl-motion-ease);
    box-shadow: var(--ldl-shadow-lg);
    padding-block-start: max(var(--ldl-space-2), env(safe-area-inset-top));
    padding-block-end: max(var(--ldl-space-2), env(safe-area-inset-bottom));
  }
  /* translateX is PHYSICAL — logical properties can't express it, so RTL needs the mirror. */
  [dir="rtl"] .ldl-sidebar { transform: translateX(100%); }
  /* translateX(0), not the keyword none — same type as the closed state, so the transition has
     an unambiguous pair to interpolate. */
  .ldl-sidebar.is-open, [dir="rtl"] .ldl-sidebar.is-open { transform: translateX(0); }
  /* a rail makes no sense as a drawer: if it's open, it's showing labels */
  .ldl-sidebar.is-rail { inline-size: min(calc(var(--ldl-sidebar-w) * 1.4), 82vw); align-items: stretch; }
  .ldl-sidebar-scrim { position: fixed; inset: 0; bottom: var(--ldl-keyboard-inset, 0px); z-index: calc(var(--ldl-z-overlay) - 1); background: var(--ldl-overlay); }

  /* The app-bar title had white-space:nowrap and no min-width:0 — with three 44px icon buttons
     eating 132px of a 360px bar, a long (or localized) product name had nowhere to go. */
  .ldl-appbar-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .ldl-appbar-context { display: none; }

  /* Ragged two-line footers: the buttons wrapped at intrinsic width and right-aligned. Stack
     them full-width instead. Order stays DOM order, so "the confirming action is last" — the
     rule the destructive-dialog focus contract depends on — remains literally true. */
  .ldl-modal-foot { flex-direction: column; align-items: stretch; }
  .ldl-modal-foot .ldl-btn { width: 100%; }
  .ldl-modal-foot .ldl-foot-start { margin-inline-end: 0; order: -1; }

  /* A toast wider than the screen. Full-bleed at the bottom, where a thumb expects it. */
  .ldl-toast {
    position: fixed; inset-inline: var(--ldl-space-3); max-width: none;
    /* above the keyboard, and above a tab bar when the app has one (it sat on top of it) */
    bottom: calc(max(var(--ldl-space-3), env(safe-area-inset-bottom)) + var(--ldl-keyboard-inset, 0px) + var(--ldl-toast-offset, 0px));
  }
  /* In a host, the HOST is the fixed, full-bleed box and its toasts stack inside it. */
  .ldl-toast-host { inset-inline: var(--ldl-space-3); align-items: stretch;
    bottom: calc(max(var(--ldl-space-3), env(safe-area-inset-bottom)) + var(--ldl-keyboard-inset, 0px) + var(--ldl-toast-offset, 0px)); }
  .ldl-toast-host > .ldl-toast { position: static; }

  /* Cockpit status bar: keep it a one-line scrolling strip rather than letting 6-8 fields
     wrap into a block that eats a third of the screen. */
  .ldl-statusbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .ldl-statusbar::-webkit-scrollbar { display: none; }

  /* MARKETING NAV -> HAMBURGER + DRAWER.
     .ldl-nav is the website header, NOT the app bar, and it had no mobile story: a sticky,
     non-wrapping row of links plus a CTA that simply ran off a phone — and the CTA, the
     conversion path, was the first thing pushed off. The interim fix was to let it wrap, which
     stopped the page overflow and nothing more.
     This is the real thing, and it is the website's equivalent of the shell's overflow menu.
     Two deliberate choices:
       - The CTA STAYS IN THE BAR. Burying "Download" in a drawer nobody opens is how you lose
         the conversion. Only the navigation links move.
       - Hiding links is not a mobile nav. .ldl-hide-sm removes navigation; this relocates it,
         so every page a desktop visitor can reach, a phone visitor can reach too.
     flex-wrap stays as a safety net for a nav that has NOT adopted .ldl-nav-links yet: its bare
     <a> children still wrap instead of overflowing. */
  .ldl-nav { flex-wrap: wrap; gap: var(--ldl-space-2); padding-inline: var(--ldl-space-4); }
  .ldl-nav .ldl-nav-toggle { display: inline-grid; order: -1; }

  .ldl-nav-links {
    position: fixed; inset-block: 0; inset-inline-start: 0;
    z-index: var(--ldl-z-overlay);
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: var(--ldl-space-1);
    inline-size: min(320px, 82vw);
    padding: var(--ldl-space-4);
    padding-block-start: max(var(--ldl-space-6), env(safe-area-inset-top));
    padding-block-end: max(var(--ldl-space-4), env(safe-area-inset-bottom));
    background: var(--ldl-paper2);
    border-inline-end: 1px solid var(--ldl-line);
    box-shadow: var(--ldl-shadow-lg);
    overflow-y: auto; overscroll-behavior: contain;
    transform: translateX(-100%);
    transition: transform var(--ldl-motion-normal) var(--ldl-motion-ease);
  }
  /* translateX is PHYSICAL — logical properties cannot express it, so RTL needs the mirror. */
  [dir="rtl"] .ldl-nav-links { transform: translateX(100%); }
  /* The open state is translateX(0), not the keyword "none" — an explicit value of the same type
     as the closed state, so the transition has an unambiguous pair to interpolate between. */
  .ldl-nav-links.is-open, [dir="rtl"] .ldl-nav-links.is-open { transform: translateX(0); }

  /* In the drawer a link is a row, not an inline word — and it needs a real touch target. */
  .ldl-nav-links a {
    display: flex; align-items: center;
    min-block-size: var(--ldl-touch-target);
    padding-inline: var(--ldl-space-3);
    border-radius: var(--ldl-control-radius);
    font-size: calc(var(--ldl-base-font) * var(--ldl-fs-scale));
  }
  .ldl-nav-links a[aria-current] { background: var(--ldl-accent-soft); color: var(--ldl-accent-ink); font-weight: var(--ldl-weight-semibold); }

  .ldl-nav-scrim.is-open {
    display: block; position: fixed; inset: 0;
    z-index: calc(var(--ldl-z-overlay) - 1);
    background: var(--ldl-overlay);
  }
}

/* Touch/pen: EVERY target reaches --ldl-touch-target without changing the density tier.
   This used to cover five shell classes only, which meant that on a touch tablet every button
   and input in a dense cockpit app was a 26px target. The density tokens set the VISUAL size;
   this sets the HIT size, and they are allowed to disagree. */
@media (pointer: coarse) {
  .ldl-iconbtn { min-width: var(--ldl-touch-target); min-height: var(--ldl-touch-target); }
  .ldl-menu-item, .ldl-settings-nav-item, .ldl-palette-item, .ldl-menubar-btn { min-height: var(--ldl-touch-target); }

  /* core controls — the ones that were missing entirely */
  .ldl-btn, .ldl-input, .ldl-select, .ldl-tab,
  .ldl-segmented button, .ldl-sidebar-item { min-block-size: var(--ldl-touch-target); }
  /* a one-word segment ("On") was 44 tall and ~30 wide */
  .ldl-segmented button { min-inline-size: var(--ldl-touch-target); }
  /* the splitter's hit area grows to the touch target; the visible line stays 1px */
  .ldl-splitter::before { --ldl-splitter-hit: var(--ldl-touch-target); }
  /* A dialog's action row stays in view: .ldl-modal scrolls as one block, so in a tall form the
     foot was the LAST thing in it, under the keyboard and then below the fold. WebKit sticks it
     to the CONTENT edge, so it reaches down over the modal's bottom padding (from WillisMail). */
  .ldl-modal > .ldl-modal-foot, .ldl-modal > form > .ldl-modal-foot {
    position: sticky; z-index: 1; background: var(--ldl-card);
    bottom: calc(-1 * var(--ldl-space-6)); margin-bottom: calc(-1 * var(--ldl-space-6));
    padding-block: var(--ldl-space-3) var(--ldl-space-6);
  }
  /* the palette input is a bare borderless field with no padding — 20px tall on its own (#14) */
  .ldl-palette-input { min-block-size: var(--ldl-touch-target); }
  /* a drill-in row carries a label AND a value: taller than the floor */
  .ldl-list-row { min-block-size: var(--ldl-list-row-touch); }

  /* The touch tier (#23): inside the opt-in phone shell, the VISUAL size of compact and dense
     controls rises to the touch target too, not just the hit area. Outside the shell (a cockpit
     on a touchscreen laptop, a tablet running the desktop layout) density keeps its look.
     Comfortable already meets it. The second selector covers the shell class on <html> itself,
     where :root[data-density] would otherwise out-specify it; the third, a scoped
     [data-density] subtree inside the shell, which would otherwise reset the height to its tier. */
  :is(.ldl-touch-shell, :root[data-density].ldl-touch-shell, .ldl-touch-shell [data-density]):not([data-density="comfortable"]) {
    --ldl-control-h: var(--ldl-touch-target);
    --ldl-iconbtn-size: var(--ldl-touch-target);
    --ldl-ui-font: var(--ldl-touch-ui-font);
    --ldl-ui-font-sm: var(--ldl-touch-ui-font-sm);
  }

  /* min-height is INERT on a non-replaced inline box — these must become flex to take it */
  .ldl-nav a, .ldl-about-links a, .ldl-about-links button, .ldl-settings-back {
    display: inline-flex; align-items: center; min-block-size: var(--ldl-touch-target);
  }

  /* table layout ignores min-height on a cell; block-size is what it honors as a minimum */
  .ldl-table td, .ldl-table th { block-size: var(--ldl-touch-target); }

  /* Checkbox/radio are REPLACED elements (native appearance + accent-color): ::before/::after
     do not render and padding is ignored, so the hit area cannot be grown in place — and a
     44px checkbox is grotesque. The LABEL carries the target instead. A BARE checkbox (a
     table's select-all) has no label, so wrap it in .ldl-hit. */
  .ldl-option { min-block-size: var(--ldl-touch-target); }
  .ldl-checkbox, .ldl-radio { inline-size: 20px; block-size: 20px; }
  .ldl-hit { min-inline-size: var(--ldl-touch-target); min-block-size: var(--ldl-touch-target); }

  /* Keep the 38x22 switch visual; grow the invisible input that actually receives the tap.
     (Do not pack switches closer than the touch target — the input now overflows the visual.) */
  .ldl-switch input {
    inset-block-start: 50%; inset-inline-start: 50%; transform: translate(-50%, -50%);
    inline-size: var(--ldl-touch-target); block-size: var(--ldl-touch-target);
  }

  /* The slider's thumb grew, but its HIT BOX is the element, which was 14-20px tall. */
  .ldl-slider { block-size: var(--ldl-touch-target); }

  /* These pass today only because the docs compose them with .ldl-iconbtn. Nothing enforced it. */
  .ldl-modal-close, .ldl-alert-close {
    min-inline-size: var(--ldl-touch-target); min-block-size: var(--ldl-touch-target);
  }

  /* iOS Safari zooms the viewport when a focused input's font-size is under 16px — and EVERY
     density tier is under it (15 / 14 / 12). So today, tapping any text field on an iPhone
     lurches and zooms the page, including the marketing site's contact form. Floor the typed-into
     controls at 16px on touch only. max() (not a flat 16px) because --ldl-fs-scale is an
     accessibility multiplier: a user at 1.4x must not be SHRUNK back down to 16.
     The other fix — maximum-scale=1 / user-scalable=no — is forbidden: it "solves" the zoom by
     disabling pinch-zoom, which is an AA violation. */
  .ldl-input, .ldl-select, .ldl-textarea, .ldl-palette-input {
    font-size: max(16px, calc(var(--ldl-ui-font) * var(--ldl-fs-scale)));
  }

  /* Kill the translucent-black iOS tap flash — safe only because this system ships real
     :active and :focus-visible states to replace the feedback it removes. */
  .ldl-btn, .ldl-iconbtn, .ldl-tab, .ldl-segmented button, .ldl-menu-item,
  .ldl-palette-item, .ldl-settings-nav-item, .ldl-sidebar-item, .ldl-option {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation; /* also drops the legacy 300ms tap delay */
  }
  /* A vertical drag on a slider must move the VALUE, not scroll the page. */
  .ldl-slider { touch-action: none; }
}

/* ---------- RTL / direction-aware overrides ---------- */
/* Everything else in this layer uses logical properties (margin-inline,
   padding-inline, inset-inline-start, border-inline-start, text-align:start/end)
   and mirrors automatically under [dir="rtl"]. transform: translateX() is the one
   exception — it is physical by definition, so the two inline-axis animations get
   explicitly mirrored here. translateY lifts and rotate() are direction-neutral. */
[dir="rtl"] .ldl-switch input:checked ~ .thumb { transform: translateX(-16px); }
[dir="rtl"] .ldl-marquee > div { animation-name: ldl-marquee-rtl; }
@keyframes ldl-marquee-rtl { to { transform: translateX(50%); } }
/* the WebKit slider fill is a gradient, and gradient directions are physical */
[dir="rtl"] .ldl-slider::-webkit-slider-runnable-track {
  background: linear-gradient(to left,
    var(--ldl-accent) 0 calc(var(--val, 0) * 1%),
    var(--ldl-line2) calc(var(--val, 0) * 1%) 100%);
}

/* ---------- i18n: script-aware type ----------
   LDL's signature treatment — mono + UPPERCASE + wide tracking — is a LATIN device, and it does
   not survive translation:
     - text-transform:uppercase is a NO-OP in CJK (there are no cases), and without a correct
       lang it mangles Greek (accents must be stripped) and Turkish (dotted/dotless i).
     - letter-spacing BREAKS ARABIC. Arabic is cursive: the letters are joined, and adding
       tracking pulls them apart into disconnected stumps. This is a rendering bug, not a
       matter of taste — it makes the word wrong, not just ugly.
   So the treatment is scoped to the scripts it was designed for, in two tiers:

   1. DECORATIVE brand surfaces (.ldl-kicker, .ldl-marquee) are a Latin flourish. In a non-Latin
      locale they are simply removed rather than restyled into something that is neither the
      brand nor idiomatic. The heading they garnish still carries the meaning.
   2. FUNCTIONAL chrome (table headers, badges, menu and sidebar section labels, the cockpit
      readout) keeps its TEXT and sheds only the transform and the tracking. Hiding these would
      delete a table's headers — never do that in the name of brand.

   NONE of this fires unless the app sets lang on <html>. That is the consumer's job; a missing
   lang is the actual bug in most localized apps. See docs/i18n.md. */
:is(:lang(ja), :lang(zh), :lang(ko), :lang(ar), :lang(he), :lang(fa), :lang(ur), :lang(th), :lang(hi), :lang(bn), :lang(ta)) :is(.ldl-kicker, .ldl-marquee) { display: none; }

:is(:lang(ja), :lang(zh), :lang(ko), :lang(ar), :lang(he), :lang(fa), :lang(ur), :lang(th), :lang(hi), :lang(bn), :lang(ta)) :is(
  .ldl-badge,
  .ldl-table th,
  .ldl-stat-label,
  .ldl-menu-label,
  .ldl-palette-group,
  .ldl-sidebar-label,
  .ldl-footer h4,
  .ldl-statusbar,
  .ldl-readout
) {
  text-transform: none;
  letter-spacing: normal;
}

/* Tall scripts (Thai, Devanagari, Vietnamese) stack diacritics above AND below the baseline;
   1.55 clips them. Give the line room to breathe. */
:is(:lang(th), :lang(hi), :lang(bn), :lang(ta), :lang(vi)) body.ldl,
body.ldl:is(:lang(th), :lang(hi), :lang(bn), :lang(ta), :lang(vi)) {
  line-height: 1.75;
}

/* Headings are tracked -0.02em to tighten Latin display type. On CJK that closes up glyphs that
   are already designed on a fixed em box, so it just looks cramped. */
:is(:lang(ja), :lang(zh), :lang(ko), :lang(ar), :lang(he), :lang(fa), :lang(ur), :lang(th), :lang(hi), :lang(bn), :lang(ta)) :is(.ldl-display1, .ldl-h1, .ldl-h2, .ldl-h3, .ldl-modal-title, .ldl-about-name, .ldl-splash-name) {
  letter-spacing: normal;
}

/* CJK has no spaces, so a long unbroken run has no break opportunity and will overflow its
   container — the one place where breaking anywhere is correct rather than a last resort. */
:is(:lang(ja), :lang(zh), :lang(ko)) :is(.ldl-modal-body, .ldl-alert-msg, .ldl-menu-item, .ldl-palette-item, .ldl-setting-text) {
  line-break: strict;
  word-break: normal;
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  .ldl-marquee > div { animation: none; }
  .ldl-btn, .ldl-card, .ldl-switch .thumb { transition: none; }
  .ldl-sidebar, .ldl-nav-links { transition: none; }
  /* marketing (docs/marketing.md): the pill stops pulsing, nothing slides or turns */
  .ldl-nav-pill .ldl-status-dot { animation: none; }
  .ldl-plan, .ldl-faq-q, .ldl-faq-q::after, .ldl-store-badge, .ldl-chip, .ldl-nav-burger, .ldl-nav-drawer a, .ldl-nav-links a { transition: none; }
  /* the tooltip still appears — only the fade and the hover delay go away */
  [data-tooltip]::after { transition: none; transition-delay: 0s; }
}
