/* Design tokens — generated from the product token set. Do not edit by hand. */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../assets/fonts/web/IBMPlexSans-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../assets/fonts/web/IBMPlexSans-Bold.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/web/public-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/web/public-sans-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../assets/fonts/web/public-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../assets/fonts/web/public-sans-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/web/IBMPlexMono-Regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("../assets/fonts/web/IBMPlexMono-SemiBold.woff2") format("woff2"); }

:root {
  --brand-primary: #123C4C;
  --brand-primary-hover: #0C2A36;
  --brand-primary-active: #08222C;
  --brand-primary-tint: #E4F0EE;
  --brand-accent: #0E6E68;

  --space-0: 0;
  --space-1: 4px;
  --space-2: 6px;
  --space-3: 8px;
  --space-4: 11px;
  --space-5: 14px;
  --space-6: 18px;
  --space-7: 24px;
  --space-8: 32px;
  --space-9: 44px;
  --space-10: 128px;
  --space-px: 1px;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.8125rem;
  --font-size-base: 13.5px;
  --font-size-md: 1.125rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 1.875rem;
  --font-size-3xl: 2.25rem;
  --font-size-4xl: 3rem;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --line-height-tight: 1.15;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;
  --letter-spacing-tight: -0.02em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.04em;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;
  --max-width-content: 1120px;
  --max-width-wide: 960px;
  --max-width-page: 1280px;
  --max-width-phone: 460px;
  --border-width-thin: 1px;
  --border-width-base: 1.5px;
  --border-width-control: 2px;
  --opacity-disabled: .45;
  --duration-instant: 50ms;
  --duration-fast: 140ms;
  --duration-normal: 240ms;
  --duration-slow: 400ms;
  --duration-slower: 600ms;
  --easing-default: cubic-bezier(0.4, 0, 0.2, 1);
  --easing-in: cubic-bezier(0.4, 0, 1, 1);
  --easing-out: cubic-bezier(0, 0, 0.2, 1);
  --easing-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --risk-low: #3F7D2C;
  --risk-low-tint: #EAF2E4;
  --risk-low-border: #7FA86A;
  --risk-low-strong: #2E6B22;
  --risk-medium: #B4700F;
  --risk-medium-tint: #F8EDD9;
  --risk-medium-border: #C79A3E;
  --risk-medium-strong: #7A4A06;
  --risk-high: #C43D2F;
  --risk-high-tint: #FBEAE7;
  --risk-high-border: #C43D2F;
  --risk-high-strong: #7E241A;
  --shadow-focus: 0 0 0 3px rgba(31,92,77,0.45);
  --shadow-focus-inverse: 0 0 0 3px #4FBFB4;
  --shadow-focus-chrome: 0 0 0 3px #4FBFB4;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  --font-ui: 'Public Sans', system-ui, -apple-system, sans-serif;
  --font-weight-regular: 400;
  --font-size-display: 28px;
  --font-weight-display: 700;
  --line-height-display: 1.15;
  --font-size-display-lg: 44px;
  --font-size-eyebrow: 10.5px;
  --font-weight-eyebrow: 600;
  --line-height-eyebrow: 1;
  --font-size-title: 21px;
  --font-weight-title: 700;
  --line-height-title: 1.25;
  --font-size-section: 15px;
  --font-weight-section: 700;
  --line-height-section: 1.3;
  --font-size-body: 13.5px;
  --font-weight-body: 400;
  --line-height-body: 1.55;
  --font-size-small: 12px;
  --font-weight-small: 400;
  --line-height-small: 1.5;
  --font-size-meta: 11.5px;
  --font-weight-meta: 400;
  --line-height-meta: 1.5;
  --font-size-button: 14px;
  --font-weight-button: 700;
  --line-height-button: 1;
  --font-size-number: 26px;
  --font-weight-number: 700;
  --line-height-number: 1;
  --line-height-snug: 1.3;
  --letter-spacing-eyebrow: .14em;
  --letter-spacing-title: -.02em;
  --radius-field: 10px;
  --radius-ops-control: 9px;
  --radius-card: 12px;
  --radius-button: 13px;
  --radius-sheet-top: 20px;
  --radius-sheet-bottom: 27px;
  --size-sheet-handle-width: 38px;
  --size-sheet-handle-height: 4px;
  --font-size-9-5: 9.5px;
  --font-size-10: 10px;
  --font-size-10-5: 10.5px;
  --font-size-11: 11px;
  --font-size-12: 12px;
  --font-size-12-5: 12.5px;
  --font-size-13: 13px;
  --font-size-14: 14px;
  --font-size-16: 16px;
  --font-size-19: 19px;
  --font-size-20: 20px;
  --radius-chip-sm: 5px;
  --radius-row: 11px;
  --radius-panel: 14px;
  --size-close: 28px;
  --size-switch-track-width: 40px;
  --size-switch-track-height: 22px;
  --size-switch-thumb: 18px;
  --size-switch-row: 56px;
  --size-initials: 36px;
  --size-add-row: 48px;
  --space-sheet-top: 9px;
  --space-sheet-x: 16px;
  --space-sheet-bottom: 18px;
  --radius-pill: 999px;
  --border-width-hairline: 1px;
  --border-width-focus: 2px;
  --min-tap-target-emergency: 64px;
  --border-width-bar: 4px;
  --border-width-ring: 7px;
  --size-progress-bar: 5px;
  --duration-expand: 340ms;
  --easing-entrance: cubic-bezier(.2, .7, .2, 1);
  --easing-exit: cubic-bezier(.4, 0, 1, 1);
  --opacity-muted: .65;
  --opacity-watermark: .06;
  --max-width-prose: 62ch;
  --max-width-screen: 376px;
  --space-ops-rail-button-y: 12px;
  --space-ops-tab-x: 12px;
  --size-ops-login-field: 44px;

  --color-bg-primary: #F7F5F0;
  --color-bg-surface: #FFFFFF;
  --color-bg-tertiary: #F0EDE6;
  --color-bg-inverse: #123C4C;
  --color-text-primary: #123C4C;
  --color-text-secondary: #3E443F;
  --color-text-tertiary: #656C66;
  --color-text-inverse: #F7F5F0;
  --color-text-link: #1E5266;
  --color-border-primary: #E2DED4;
  --color-border-secondary: #8A8577;
  --color-border-focus: #0E6E68;
  --color-button-primary-fill: #123C4C;
  --color-action-border: #0E6E68;
  --color-button-primary-fill-hover: #0C2A36;
  --color-button-primary-fill-active: #08222C;
  --color-button-primary-label: #FFFFFF;
  --color-action-foreground: #123C4C;
  --color-nav-active-fg: #0E6E68;
  --color-surface-branded: #E4F0EE;
  --color-acute-fill: #C43D2F;
  --color-acute-fill-text: #FFFFFF;
  --color-acute-border: #A0301F;
  --color-bg-chrome: #123C4C;
  --color-text-on-chrome: #FFFFFF;
  --color-text-on-chrome-muted: #9DAFB4;
  --color-accent-on-chrome: #4FBFB4;
  --color-button-on-chrome-label: #071A22;
  --color-button-on-chrome-fill-hover: #6FCFC6;
  --color-button-on-chrome-fill-active: #3EA89E;
  --color-bg-raised: #FCFBF8;
  --color-bg-workspace: #E4E8E3;
  --color-bg-grid: #D8DDD7;
  --color-bg-overlay-panel: rgba(247, 245, 240, .94);
  --color-status-success-surface: #F0F5F2;
  --color-status-info-surface: #EFF4F6;
  --color-status-warning-surface: #FDF8EF;
  --color-status-error-surface: #FDF3F1;
  --color-status-info-surface-strong: #CFDDE3;
  --color-status-success-border: #CFE0D6;
  --color-status-info-border: #CFDEE4;
  --color-status-warning-border: #E7D3B0;
  --color-status-error-border: #EBC9C4;
  --color-category-water: #1E5266;
  --color-category-food: #2F6B4F;
  --color-category-energy: #B4700F;
  --color-category-medical: #C43D2F;
  --color-category-documents: #5A625C;
  --color-category-hygiene: #8A6BA8;
  --color-category-hygiene-strong: #6F4F8E;
  --color-hint-surface: #E3EDF1;
  --color-hint-fg: #1E5266;
  --color-note-hint-surface: #E3EDF1;
  --color-note-hint-fg: #1E5266;
  --color-note-info-surface: #EFF4F6;
  --color-note-info-fg: #1E5266;
  --color-note-error-surface: #FDF3F1;
  --color-note-error-fg: #A0301F;
  --color-note-error-border: #E8BFB7;
  --color-home-sky: #BBD3EB;
  --color-home-ground: #F7F5F0;
  --color-home-tagline: #123C4C;
  --color-home-glass: rgba(255, 255, 255, 0.92);
  --color-home-glass-opaque: #FFFFFF;
  --color-home-safe-disc: #E3EFE8;
  --color-home-safe-fg: #2F6B4F;
  --color-home-muted: #656C66;
  --color-home-chevron: #0E6E68;
  --color-home-status-edge: rgba(255, 255, 255, 0.7);
  --color-home-row-edge: rgba(18, 60, 76, 0.12);
  --shadow-home-status: 0 6px 20px rgba(18, 60, 76, 0.10);
  --shadow-home-row: 0 2px 8px rgba(18, 60, 76, 0.08);
  --color-text-on-glass: #4F5650;
  --color-glass-surface: rgba(255, 255, 255, 0.92);
  --color-glass-border: rgba(255, 255, 255, 0.7);
  --shadow-glass: 0 6px 20px rgba(18, 60, 76, 0.10);
  --blur-glass: 12px;
  --color-status-success-surface-strong: #E3EFE8;
  --color-level-3-page: #0F3442;
  --color-level-3-scrim: rgba(15, 52, 66, 0.73);
  --color-overlay-on-level: rgba(0, 0, 0, 0.2);
  --color-overlay-light-fill: rgba(255, 255, 255, 0.1);
  --color-overlay-light-border: rgba(255, 255, 255, 0.3);
  --color-tag-surface: rgba(18, 60, 76, 0.08);
  --color-level-1-on-dark: #9CC3D6;
  --color-level-2-on-dark: #E7B860;
  --color-level-3-on-dark: #FF9C8F;
  --color-level-4-on-dark: #FFB4A8;
  --color-switch-track-on: #2F6B4F;
  --color-switch-track-off: #8A8577;
  --color-switch-thumb: #FFFFFF;
  --color-primary-deep: #123C4C;
  --color-accent: #0E6E68;
  --color-accent-scrim: #358580;
  --color-accent-on-inverse: #4FBFB4;
  --color-border-focus-inverse: #4FBFB4;
  --color-action-on-inverse: #4FBFB4;
  --color-border-focus-chrome: #4FBFB4;
  --color-hover-on-inverse: rgba(255, 255, 255, 0.12);
  --shadow-popover: 0 8px 24px rgba(18, 60, 76, 0.2);
  --color-text-inverse-muted: #C6D4DF;
  --color-text-inverse-subtle: #8FA3AD;
  --color-status-success: #2F6B4F;
  --color-status-success-text: #FFFFFF;
  --color-status-warning: #96600C;
  --color-status-error: #C43D2F;
  --color-status-error-hover: #A32F23;
  --color-status-error-text: #FFFFFF;
  --color-status-info: #1E5266;
  --color-progress-track: #E2DED4;
  --color-overlay: rgba(18, 60, 76, 0.45);
  --shadow-sm: 0 1px 2px rgba(18, 60, 76, 0.05);
  --shadow-md: 0 6px 18px rgba(18, 60, 76, 0.10);
  --shadow-lg: 0 18px 48px rgba(18, 60, 76, 0.18);
  --color-border-inner: #EFEBE3;
  --color-grabber: #D6D1C6;
  --color-chevron: #A8ADA5;
  --color-overlay-sheet: rgba(18, 60, 76, 0.62);
  --shadow-sheet: 0 -14px 34px rgba(18, 60, 76, 0.28);
  --color-emergency-bg: #FBEBE8;
  --color-emergency-fg: #8A1F14;
  --color-emergency-solid: #8A1F14;
  --color-emergency-solid-text: #FFF2EF;
  --color-ops-rail-active-bg: #E3EDF1;
  --color-ops-rail-active-fg: #1E5266;
  --color-ops-titlebar-bg: #123C4C;
  --color-ops-titlebar-fg: #F7F5F0;
  --color-ops-titlebar-subtitle: #8FA3AD;
  --color-ops-titlebar-control-hover: #0C2A36;
  --color-ops-titlebar-control-bg: #254C5A;
  --color-ops-titlebar-status-idle: #F2CB84;
  --color-ops-titlebar-status-active: #5FBF8C;
  --color-ops-titlebar-divider: #385B69;
  --color-map-empty-bg: #B3B8B2;
  --color-map-attribution-bg: rgba(255, 255, 255, 0.88);
  --color-map-control-border: #123C4C;
  --shadow-ops-titlebar-focus: 0 0 0 3px #F7F5F0;
  --color-login-waiting: #B3B8B2;
  --color-level-1: #3E6C82;
  --color-level-1-surface: #EEF3F6;
  --color-level-1-fg: #2C5568;
  --color-level-2: #96600C;
  --color-level-2-surface: #FDF8EF;
  --color-level-2-fg: #7A4E09;
  --color-level-3: #C43D2F;
  --color-level-3-surface: #FDF3F1;
  --color-level-3-fg: #A0301F;
  --color-level-4: #8A1F14;
  --color-level-4-surface: #8A1F14;
  --color-level-4-fg: #FFF2EF;
  --shadow-focus: 0 0 0 3px #0E6E68;
  --shadow-focus-inverse: 0 0 0 3px #4FBFB4;
  --shadow-focus-chrome: 0 0 0 3px #4FBFB4;
  --brand-font: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --color-bg-primary: #0B1E26;
  --color-bg-surface: #12303C;
  --color-bg-tertiary: #1A3C48;
  --color-bg-inverse: #F7F5F0;
  --color-text-primary: #EAF1F2;
  --color-text-secondary: #C7D4D7;
  --color-text-tertiary: #9DAFB4;
  --color-text-inverse: #123C4C;
  --color-text-link: #7FC7DA;
  --color-border-primary: #24454F;
  --color-border-secondary: #5E8A96;
  --color-action-border: #4FBFB4;
  --color-border-focus: #4FBFB4;
  --color-button-primary-fill: #1D6D80;
  --color-button-primary-fill-hover: #24849A;
  --color-button-primary-fill-active: #15586A;
  --color-button-primary-label: #FFFFFF;
  --color-action-foreground: #EAF1F2;
  --color-nav-active-fg: #4FBFB4;
  --color-surface-branded: #14332F;
  --color-acute-fill: #C43D2F;
  --color-acute-fill-text: #FFFFFF;
  --color-acute-border: #FFB3A8;
  --color-bg-chrome: #071A22;
  --color-text-on-chrome: #FFFFFF;
  --color-text-on-chrome-muted: #9DAFB4;
  --color-accent-on-chrome: #4FBFB4;
  --color-button-on-chrome-label: #071A22;
  --color-button-on-chrome-fill-hover: #6FCFC6;
  --color-button-on-chrome-fill-active: #3EA89E;
  --color-bg-raised: #14343F;
  --color-bg-workspace: #1F3A40;
  --color-bg-grid: #16282E;
  --color-bg-overlay-panel: rgba(9, 28, 36, .92);
  --color-status-success-surface: #14332F;
  --color-status-info-surface: #132F3A;
  --color-status-warning-surface: #2C2413;
  --color-status-error-surface: #33150F;
  --color-status-info-surface-strong: #1B4150;
  --color-status-success-border: #22463A;
  --color-status-info-border: #2A5260;
  --color-status-warning-border: #4A3A18;
  --color-status-error-border: #4C241D;
  --color-category-water: #7FC7DA;
  --color-category-food: #5FBF8C;
  --color-category-energy: #E0A63C;
  --color-category-medical: #F0796A;
  --color-category-documents: #7E8C90;
  --color-category-hygiene: #C1A5DC;
  --color-category-hygiene-strong: #C1A5DC;
  --color-hint-surface: #17333F;
  --color-hint-fg: #A9CBD8;
  --color-note-hint-surface: #17333F;
  --color-note-hint-fg: #A9CBD8;
  --color-note-info-surface: #132F3A;
  --color-note-info-fg: #7FC7DA;
  --color-note-error-surface: #33150F;
  --color-note-error-fg: #FFB3A8;
  --color-note-error-border: #5C2A21;
  --color-home-sky: #BBD3EB;
  --color-home-ground: #F7F5F0;
  --color-home-tagline: #123C4C;
  --color-home-glass: rgba(255, 255, 255, 0.92);
  --color-home-glass-opaque: #FFFFFF;
  --color-home-safe-disc: #E3EFE8;
  --color-home-safe-fg: #2F6B4F;
  --color-home-muted: #656C66;
  --color-home-chevron: #0E6E68;
  --color-home-status-edge: rgba(255, 255, 255, 0.7);
  --color-home-row-edge: rgba(18, 60, 76, 0.12);
  --shadow-home-status: 0 6px 20px rgba(18, 60, 76, 0.10);
  --shadow-home-row: 0 2px 8px rgba(18, 60, 76, 0.08);
  --color-text-on-glass: #4F5650;
  --color-glass-surface: rgba(255, 255, 255, 0.92);
  --color-glass-border: rgba(255, 255, 255, 0.7);
  --shadow-glass: 0 6px 20px rgba(18, 60, 76, 0.10);
  --blur-glass: 12px;
  --color-status-success-surface-strong: #E3EFE8;
  --color-level-3-page: #0F3442;
  --color-level-3-scrim: rgba(15, 52, 66, 0.73);
  --color-overlay-on-level: rgba(0, 0, 0, 0.2);
  --color-overlay-light-fill: rgba(255, 255, 255, 0.1);
  --color-overlay-light-border: rgba(255, 255, 255, 0.3);
  --color-tag-surface: rgba(255, 255, 255, 0.08);
  --color-level-1-on-dark: #9CC3D6;
  --color-level-2-on-dark: #E7B860;
  --color-level-3-on-dark: #FF9C8F;
  --color-level-4-on-dark: #FFB4A8;
  --color-switch-track-on: #5FBF8C;
  --color-switch-track-off: #5E8A96;
  --color-switch-thumb: #0B1E26;
  --color-primary-deep: #A9CBD8;
  --color-accent: #4FBFB4;
  --color-accent-scrim: #6BC9C0;
  --color-accent-on-inverse: #0E6E68;
  --color-border-focus-inverse: #0E6E68;
  --color-action-on-inverse: #0E6E68;
  --color-border-focus-chrome: #4FBFB4;
  --color-hover-on-inverse: rgba(18, 60, 76, 0.10);
  --shadow-popover: 0 8px 24px rgba(0, 0, 0, 0.45);
  --color-text-inverse-muted: #3E443F;
  --color-text-inverse-subtle: #656C66;
  --color-status-success: #5FBF8C;
  --color-status-success-text: #0B1E26;
  --color-status-warning: #E0A63C;
  --color-status-error: #F0796A;
  --color-status-error-hover: #F79488;
  --color-status-error-text: #2E100C;
  --color-status-info: #7FC7DA;
  --color-progress-track: #06141A;
  --color-overlay: rgba(4, 14, 18, 0.62);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
  --color-border-inner: #24454F;
  --color-grabber: #24454F;
  --color-chevron: #9DAFB4;
  --color-overlay-sheet: rgba(4, 14, 18, 0.62);
  --shadow-sheet: 0 -14px 34px rgba(0, 0, 0, 0.55);
  --color-emergency-bg: #2E100C;
  --color-emergency-fg: #FFB3A8;
  --color-emergency-solid: #B3281A;
  --color-emergency-solid-text: #FFF2EF;
  --color-ops-rail-active-bg: #1A3C48;
  --color-ops-rail-active-fg: #EAF1F2;
  --color-ops-titlebar-bg: #1A3C48;
  --color-ops-titlebar-fg: #EAF1F2;
  --color-ops-titlebar-subtitle: #C7D4D7;
  --color-ops-titlebar-control-hover: #12303C;
  --color-ops-titlebar-control-bg: #2C4C57;
  --color-ops-titlebar-status-idle: #F2CB84;
  --color-ops-titlebar-status-active: #5FBF8C;
  --color-ops-titlebar-divider: #3F5B65;
  --color-map-empty-bg: #1A3C48;
  --color-map-attribution-bg: rgba(18, 48, 60, 0.88);
  --color-map-control-border: #F7F5F0;
  --shadow-ops-titlebar-focus: 0 0 0 3px #EAF1F2;
  --color-login-waiting: #C7D4D7;
  --color-level-1: #7FA8BD;
  --color-level-1-surface: #14303C;
  --color-level-1-fg: #BBD3DF;
  --color-level-2: #E0A63C;
  --color-level-2-surface: #2C2413;
  --color-level-2-fg: #F2CB84;
  --color-level-3: #F0796A;
  --color-level-3-surface: #33150F;
  --color-level-3-fg: #FFB3A8;
  --color-level-4: #E8503A;
  --color-level-4-surface: #B3281A;
  --color-level-4-fg: #FFF2EF;
  --shadow-focus: 0 0 0 3px #4FBFB4;
  --shadow-focus-inverse: 0 0 0 3px #0E6E68;
  --shadow-focus-chrome: 0 0 0 3px #4FBFB4;
  --brand-font: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-mode="acute"]) {
    --color-bg-primary: #0B1E26;
    --color-bg-surface: #12303C;
    --color-bg-tertiary: #1A3C48;
    --color-bg-inverse: #F7F5F0;
    --color-text-primary: #EAF1F2;
    --color-text-secondary: #C7D4D7;
    --color-text-tertiary: #9DAFB4;
    --color-text-inverse: #123C4C;
    --color-text-link: #7FC7DA;
    --color-border-primary: #24454F;
    --color-border-secondary: #5E8A96;
    --color-action-border: #4FBFB4;
    --color-border-focus: #4FBFB4;
    --color-button-primary-fill: #1D6D80;
    --color-button-primary-fill-hover: #24849A;
    --color-button-primary-fill-active: #15586A;
    --color-button-primary-label: #FFFFFF;
    --color-action-foreground: #EAF1F2;
    --color-nav-active-fg: #4FBFB4;
    --color-surface-branded: #14332F;
    --color-acute-fill: #C43D2F;
    --color-acute-fill-text: #FFFFFF;
    --color-acute-border: #FFB3A8;
    --color-bg-chrome: #071A22;
    --color-text-on-chrome: #FFFFFF;
    --color-text-on-chrome-muted: #9DAFB4;
    --color-accent-on-chrome: #4FBFB4;
    --color-button-on-chrome-label: #071A22;
    --color-button-on-chrome-fill-hover: #6FCFC6;
    --color-button-on-chrome-fill-active: #3EA89E;
    --color-bg-raised: #14343F;
    --color-bg-workspace: #1F3A40;
    --color-bg-grid: #16282E;
    --color-bg-overlay-panel: rgba(9, 28, 36, .92);
    --color-status-success-surface: #14332F;
    --color-status-info-surface: #132F3A;
    --color-status-warning-surface: #2C2413;
    --color-status-error-surface: #33150F;
    --color-status-info-surface-strong: #1B4150;
    --color-status-success-border: #22463A;
    --color-status-info-border: #2A5260;
    --color-status-warning-border: #4A3A18;
    --color-status-error-border: #4C241D;
    --color-category-water: #7FC7DA;
    --color-category-food: #5FBF8C;
    --color-category-energy: #E0A63C;
    --color-category-medical: #F0796A;
    --color-category-documents: #7E8C90;
    --color-category-hygiene: #C1A5DC;
    --color-category-hygiene-strong: #C1A5DC;
    --color-hint-surface: #17333F;
    --color-hint-fg: #A9CBD8;
    --color-note-hint-surface: #17333F;
    --color-note-hint-fg: #A9CBD8;
    --color-note-info-surface: #132F3A;
    --color-note-info-fg: #7FC7DA;
    --color-note-error-surface: #33150F;
    --color-note-error-fg: #FFB3A8;
    --color-note-error-border: #5C2A21;
    --color-home-sky: #BBD3EB;
    --color-home-ground: #F7F5F0;
    --color-home-tagline: #123C4C;
    --color-home-glass: rgba(255, 255, 255, 0.92);
    --color-home-glass-opaque: #FFFFFF;
    --color-home-safe-disc: #E3EFE8;
    --color-home-safe-fg: #2F6B4F;
    --color-home-muted: #656C66;
    --color-home-chevron: #0E6E68;
    --color-home-status-edge: rgba(255, 255, 255, 0.7);
    --color-home-row-edge: rgba(18, 60, 76, 0.12);
    --shadow-home-status: 0 6px 20px rgba(18, 60, 76, 0.10);
    --shadow-home-row: 0 2px 8px rgba(18, 60, 76, 0.08);
    --color-text-on-glass: #4F5650;
    --color-glass-surface: rgba(255, 255, 255, 0.92);
    --color-glass-border: rgba(255, 255, 255, 0.7);
    --shadow-glass: 0 6px 20px rgba(18, 60, 76, 0.10);
    --blur-glass: 12px;
    --color-status-success-surface-strong: #E3EFE8;
    --color-level-3-page: #0F3442;
    --color-level-3-scrim: rgba(15, 52, 66, 0.73);
    --color-overlay-on-level: rgba(0, 0, 0, 0.2);
    --color-overlay-light-fill: rgba(255, 255, 255, 0.1);
    --color-overlay-light-border: rgba(255, 255, 255, 0.3);
    --color-tag-surface: rgba(255, 255, 255, 0.08);
    --color-level-1-on-dark: #9CC3D6;
    --color-level-2-on-dark: #E7B860;
    --color-level-3-on-dark: #FF9C8F;
    --color-level-4-on-dark: #FFB4A8;
    --color-switch-track-on: #5FBF8C;
    --color-switch-track-off: #5E8A96;
    --color-switch-thumb: #0B1E26;
    --color-primary-deep: #A9CBD8;
    --color-accent: #4FBFB4;
    --color-accent-scrim: #6BC9C0;
    --color-accent-on-inverse: #0E6E68;
    --color-border-focus-inverse: #0E6E68;
    --color-action-on-inverse: #0E6E68;
    --color-border-focus-chrome: #4FBFB4;
    --color-hover-on-inverse: rgba(18, 60, 76, 0.10);
    --shadow-popover: 0 8px 24px rgba(0, 0, 0, 0.45);
    --color-text-inverse-muted: #3E443F;
    --color-text-inverse-subtle: #656C66;
    --color-status-success: #5FBF8C;
    --color-status-success-text: #0B1E26;
    --color-status-warning: #E0A63C;
    --color-status-error: #F0796A;
    --color-status-error-hover: #F79488;
    --color-status-error-text: #2E100C;
    --color-status-info: #7FC7DA;
    --color-progress-track: #06141A;
    --color-overlay: rgba(4, 14, 18, 0.62);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
    --color-border-inner: #24454F;
    --color-grabber: #24454F;
    --color-chevron: #9DAFB4;
    --color-overlay-sheet: rgba(4, 14, 18, 0.62);
    --shadow-sheet: 0 -14px 34px rgba(0, 0, 0, 0.55);
    --color-emergency-bg: #2E100C;
    --color-emergency-fg: #FFB3A8;
    --color-emergency-solid: #B3281A;
    --color-emergency-solid-text: #FFF2EF;
    --color-ops-rail-active-bg: #1A3C48;
    --color-ops-rail-active-fg: #EAF1F2;
    --color-ops-titlebar-bg: #1A3C48;
    --color-ops-titlebar-fg: #EAF1F2;
    --color-ops-titlebar-subtitle: #C7D4D7;
    --color-ops-titlebar-control-hover: #12303C;
    --color-ops-titlebar-control-bg: #2C4C57;
    --color-ops-titlebar-status-idle: #F2CB84;
    --color-ops-titlebar-status-active: #5FBF8C;
    --color-ops-titlebar-divider: #3F5B65;
    --color-map-empty-bg: #1A3C48;
    --color-map-attribution-bg: rgba(18, 48, 60, 0.88);
    --color-map-control-border: #F7F5F0;
    --shadow-ops-titlebar-focus: 0 0 0 3px #EAF1F2;
    --color-login-waiting: #C7D4D7;
    --color-level-1: #7FA8BD;
    --color-level-1-surface: #14303C;
    --color-level-1-fg: #BBD3DF;
    --color-level-2: #E0A63C;
    --color-level-2-surface: #2C2413;
    --color-level-2-fg: #F2CB84;
    --color-level-3: #F0796A;
    --color-level-3-surface: #33150F;
    --color-level-3-fg: #FFB3A8;
    --color-level-4: #E8503A;
    --color-level-4-surface: #B3281A;
    --color-level-4-fg: #FFF2EF;
    --shadow-focus: 0 0 0 3px #4FBFB4;
    --shadow-focus-inverse: 0 0 0 3px #0E6E68;
    --shadow-focus-chrome: 0 0 0 3px #4FBFB4;
    --brand-font: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  }
}

[data-mode="acute"] {
  --color-bg-primary: #04161C;
  --color-bg-surface: #08222B;
  --color-bg-tertiary: #0D2F3A;
  --color-bg-inverse: #FFFFFF;
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #E6F0F2;
  --color-text-tertiary: #BFD2D6;
  --color-text-inverse: #04161C;
  --color-text-link: #8FD8EC;
  --color-border-primary: #537F8D;
  --color-border-secondary: #7FA8BD;
  --color-border-focus: #FFFFFF;
  --color-button-primary-fill: #FFFFFF;
  --color-action-border: #6FE0D4;
  --color-button-primary-fill-hover: #E2ECEE;
  --color-button-primary-fill-active: #C9D9DC;
  --color-button-primary-label: #04161C;
  --color-action-foreground: #FFFFFF;
  --color-nav-active-fg: #6FE0D4;
  --color-surface-branded: #0A2E2A;
  --color-acute-fill: #D42A16;
  --color-acute-fill-text: #FFFFFF;
  --color-acute-border: #FFB4A8;
  --color-bg-chrome: #071A22;
  --color-text-on-chrome: #FFFFFF;
  --color-text-on-chrome-muted: #9DAFB4;
  --color-accent-on-chrome: #4FBFB4;
  --color-button-on-chrome-label: #071A22;
  --color-button-on-chrome-fill-hover: #6FCFC6;
  --color-button-on-chrome-fill-active: #3EA89E;
  --color-bg-raised: #14343F;
  --color-bg-workspace: #1F3A40;
  --color-bg-grid: #16282E;
  --color-bg-overlay-panel: rgba(9, 28, 36, .92);
  --color-status-success-surface: #14332F;
  --color-status-info-surface: #132F3A;
  --color-status-warning-surface: #2C2413;
  --color-status-error-surface: #33150F;
  --color-status-info-surface-strong: #1B4150;
  --color-status-success-border: #22463A;
  --color-status-info-border: #2A5260;
  --color-status-warning-border: #4A3A18;
  --color-status-error-border: #4C241D;
  --color-category-water: #8FD8EC;
  --color-category-food: #64D69B;
  --color-category-energy: #FFC24D;
  --color-category-medical: #FF6B57;
  --color-category-documents: #BFD2D6;
  --color-category-hygiene: #D3BCEB;
  --color-category-hygiene-strong: #D3BCEB;
  --color-hint-surface: #17333F;
  --color-hint-fg: #A9CBD8;
  --color-note-hint-surface: #17333F;
  --color-note-hint-fg: #A9CBD8;
  --color-note-info-surface: #132F3A;
  --color-note-info-fg: #8FD8EC;
  --color-note-error-surface: #3A130C;
  --color-note-error-fg: #FFB4A8;
  --color-note-error-border: #5C2A21;
  --color-home-sky: #BBD3EB;
  --color-home-ground: #F7F5F0;
  --color-home-tagline: #123C4C;
  --color-home-glass: rgba(255, 255, 255, 0.92);
  --color-home-glass-opaque: #FFFFFF;
  --color-home-safe-disc: #E3EFE8;
  --color-home-safe-fg: #2F6B4F;
  --color-home-muted: #656C66;
  --color-home-chevron: #0E6E68;
  --color-home-status-edge: rgba(255, 255, 255, 0.7);
  --color-home-row-edge: rgba(18, 60, 76, 0.12);
  --shadow-home-status: 0 6px 20px rgba(18, 60, 76, 0.10);
  --shadow-home-row: 0 2px 8px rgba(18, 60, 76, 0.08);
  --color-text-on-glass: #4F5650;
  --color-glass-surface: rgba(255, 255, 255, 0.92);
  --color-glass-border: rgba(255, 255, 255, 0.7);
  --shadow-glass: 0 6px 20px rgba(18, 60, 76, 0.10);
  --blur-glass: 12px;
  --color-status-success-surface-strong: #E3EFE8;
  --color-level-3-page: #0F3442;
  --color-level-3-scrim: rgba(15, 52, 66, 0.73);
  --color-overlay-on-level: rgba(0, 0, 0, 0.2);
  --color-overlay-light-fill: rgba(255, 255, 255, 0.1);
  --color-overlay-light-border: rgba(255, 255, 255, 0.3);
  --color-tag-surface: rgba(255, 255, 255, 0.08);
  --color-level-1-on-dark: #9CC3D6;
  --color-level-2-on-dark: #E7B860;
  --color-level-3-on-dark: #FF9C8F;
  --color-level-4-on-dark: #FFB4A8;
  --color-switch-track-on: #5FBF8C;
  --color-switch-track-off: #5E8A96;
  --color-switch-thumb: #0B1E26;
  --color-primary-deep: #A9CBD8;
  --color-accent: #6FE0D4;
  --color-accent-scrim: #86E5DB;
  --color-accent-on-inverse: #0E6E68;
  --color-border-focus-inverse: #0E6E68;
  --color-action-on-inverse: #0E6E68;
  --color-border-focus-chrome: #4FBFB4;
  --color-hover-on-inverse: rgba(18, 60, 76, 0.10);
  --shadow-popover: 0 8px 24px rgba(0, 0, 0, 0.7);
  --color-text-inverse-muted: #3E443F;
  --color-text-inverse-subtle: #656C66;
  --color-status-success: #64D69B;
  --color-status-success-text: #04161C;
  --color-status-warning: #FFC24D;
  --color-status-error: #FF6B57;
  --color-status-error-hover: #FF8A79;
  --color-status-error-text: #04161C;
  --color-status-info: #8FD8EC;
  --color-progress-track: #0D2F3A;
  --color-overlay: rgba(0, 0, 0, 0.72);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.8);
  --color-border-inner: #537F8D;
  --color-grabber: #537F8D;
  --color-chevron: #BFD2D6;
  --color-overlay-sheet: rgba(0, 0, 0, 0.72);
  --shadow-sheet: 0 -14px 34px rgba(0, 0, 0, 0.8);
  --color-emergency-bg: #3A0F09;
  --color-emergency-fg: #FFB4A8;
  --color-emergency-solid: #D42A16;
  --color-emergency-solid-text: #FFFFFF;
  --color-ops-rail-active-bg: #0D2F3A;
  --color-ops-rail-active-fg: #FFFFFF;
  --color-ops-titlebar-bg: #0D2F3A;
  --color-ops-titlebar-fg: #FFFFFF;
  --color-ops-titlebar-subtitle: #E6F0F2;
  --color-ops-titlebar-control-hover: #08222B;
  --color-ops-titlebar-control-bg: #20404A;
  --color-ops-titlebar-status-idle: #F2CB84;
  --color-ops-titlebar-status-active: #5FBF8C;
  --color-ops-titlebar-divider: #34505A;
  --color-map-empty-bg: #0D2F3A;
  --color-map-attribution-bg: rgba(13, 47, 58, 0.88);
  --color-map-control-border: #F7F5F0;
  --shadow-ops-titlebar-focus: 0 0 0 3px #FFFFFF;
  --color-login-waiting: #E6F0F2;
  --color-level-1: #9AC4D6;
  --color-level-1-surface: #0A2733;
  --color-level-1-fg: #CFE4ED;
  --color-level-2: #FFC24D;
  --color-level-2-surface: #2E2410;
  --color-level-2-fg: #FFDA95;
  --color-level-3: #FF6B57;
  --color-level-3-surface: #3A130C;
  --color-level-3-fg: #FFB4A8;
  --color-level-4: #FF7C66;
  --color-level-4-surface: #D42A16;
  --color-level-4-fg: #FFFFFF;
  --shadow-focus: 0 0 0 3px #FFFFFF;
  --shadow-focus-inverse: 0 0 0 3px #0E6E68;
  --shadow-focus-chrome: 0 0 0 3px #4FBFB4;
  --brand-font: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
}

:root {
  --min-tap-target: 44px;
  --control-height: 44px;
  --control-height-sm: 36px;
  --font-size-base: 13.5px;
  --card-padding: 14px;
  --row-padding-y: 11px;
}

[data-surface="acute-crisis"] {
  --min-tap-target: 64px;
  --control-height: 64px;
  --control-height-sm: 64px;
  --font-size-base: 15px;
  --card-padding: 18px;
  --row-padding-y: 16px;
  --font-size-display: 32px;
  --font-size-display-lg: 32px;
  --font-size-title: 24px;
  --line-height-title: 1.2;
  --font-size-section: 17px;
  --font-size-body: 15px;
  --line-height-body: 1.5;
  --font-size-small: 13.5px;
  --line-height-small: 1.45;
  --font-size-meta: 13px;
  --line-height-meta: 1.45;
  --font-size-eyebrow: 15px;
  --font-size-number: 30px;
  --font-size-button: 16px;
}

[data-surface="workbench-pointer"] {
  --min-tap-target: 32px;
  --control-height: 36px;
  --control-height-sm: 32px;
  --font-size-base: 12.5px;
  --card-padding: 10px;
  --row-padding-y: 8px;
  --font-size-display: 22px;
  --line-height-display: 1.2;
  --font-size-display-lg: 22px;
  --font-size-title: 17px;
  --font-size-section: 13px;
  --font-size-body: 12.5px;
  --line-height-body: 1.45;
  --font-size-small: 11.5px;
  --line-height-small: 1.4;
  --font-size-meta: 11px;
  --line-height-meta: 1.4;
  --font-size-number: 20px;
  --font-size-button: 12.5px;
  --font-weight-button: 600;
  --font-size-micro: 10.5px;
  --line-height-micro: 1.2;
  --radius-button: 10px;
}

[data-surface="operations-critical"] {
  --min-tap-target: 44px;
  --control-height: 44px;
  --control-height-sm: 44px;
  --font-size-base: 12.5px;
  --card-padding: 10px;
  --row-padding-y: 10px;
  --font-size-display: 22px;
  --line-height-display: 1.2;
  --font-size-display-lg: 22px;
  --font-size-title: 17px;
  --font-size-section: 13px;
  --font-size-body: 12.5px;
  --line-height-body: 1.45;
  --font-size-small: 11.5px;
  --line-height-small: 1.4;
  --font-size-meta: 11px;
  --line-height-meta: 1.4;
  --font-size-number: 20px;
  --font-size-button: 12.5px;
  --font-weight-button: 600;
  --font-size-micro: 10.5px;
  --line-height-micro: 1.2;
  --radius-button: 10px;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-instant: 0ms;
    --duration-fast: 0ms;
    --duration-normal: 0ms;
    --duration-slow: 0ms;
    --duration-slower: 0ms;
  }
}

/* ---- Components ---- */
.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  min-width: var(--min-tap-target);
  padding: 0 var(--space-4);
  border: var(--border-width-base) solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--brand-font);
  font-size: var(--font-size-button);
  font-weight: var(--font-weight-button);
  line-height: var(--line-height-button);
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--duration-fast) var(--easing-default),
    border-color var(--duration-fast) var(--easing-default),
    transform var(--duration-instant) var(--easing-default);
}
.ds-btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}
.ds-btn:active:not(:disabled):not([aria-disabled="true"]) {
  transform: scale(0.98);
}
.ds-btn:disabled,
.ds-btn[aria-disabled="true"] {
  opacity: var(--opacity-disabled);
  cursor: not-allowed;
}
.ds-btn--block {
  width: 100%;
}

/* Leading glyph of a Button. The edge rides on the label's 1em, so the dense size
   scales it without a rule of its own; the spacing is the base rule's gap. It does
   not shrink, so a long label wraps instead of squeezing the glyph. */
.ds-btn__icon {
  width: calc(1em + 4px);
  height: calc(1em + 4px);
  flex-shrink: 0;
}

/* The border-width-base ring from the base rule gets an explicit color. In a theme with an
   opaque fill this is invisible (same color, and the fill already paints under
   the border box). In a theme whose fill is transparent it is the ONLY thing
   that identifies the control — see --color-action-border. */
.ds-btn--primary {
  background: var(--color-button-primary-fill);
  color: var(--color-button-primary-label);
  border-color: var(--color-action-border);
}
.ds-btn--primary:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--color-button-primary-fill-hover);
}
.ds-btn--primary:active:not(:disabled):not([aria-disabled="true"]) {
  background: var(--color-button-primary-fill-active);
}

.ds-btn--secondary {
  background: transparent;
  color: var(--color-action-foreground);
  border-color: var(--color-action-foreground);
}
.ds-btn--secondary:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--color-bg-tertiary);
}

.ds-btn--ghost {
  background: transparent;
  color: var(--color-text-secondary);
}
.ds-btn--ghost:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--color-bg-tertiary);
}

/* Destructive action. Its own label token because no single foreground clears AA
   on the error fill in every theme, and its own hover fill because dimming with
   opacity would take the label's contrast down with it. */
.ds-btn--danger {
  background: var(--color-status-error);
  color: var(--color-status-error-text);
  border-color: var(--color-status-error);
}
.ds-btn--danger:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--color-status-error-hover);
  border-color: var(--color-status-error-hover);
}

/* Dense modifier for data workbenches, orthogonal to the surface-profile axis
   (a table row action next to a full-size form submit on the same page). It MAY
   undercut --min-tap-target: still well over the 24px of WCAG Target Size
   (Minimum), but below the 44px of Target Size (Enhanced) that the default size
   keeps. Whether it does is the profile's call — a surface may declare this
   height AT its control height, which removes the smaller minimum but NOT this
   rule's other two declarations: the padding and type size below still apply.
   Not for B2C or acute. Success-criterion numbers live in Button.tsx — a dotted
   version-like string here trips the determinism guard. */
.ds-btn--sm {
  min-height: var(--control-height-sm);
  min-width: var(--control-height-sm);
  padding: 0 var(--space-3);
  font-family: var(--brand-font);
  font-size: var(--font-size-small);
}
/* Acute mode revokes the dense modifier: size="sm" becomes a no-op there, so a
   crisis surface always gets the same control geometry as any other button. A
   documented "do not use sm here" is not enforcement — a caller could ship an
   undersized crisis control and nothing would object. Enforced HERE because the
   mode is what knows the rule; the button component stays context-free and needs
   no client-side theme lookup to be safe.

   It restores --control-height, and the reason is no longer about a density: the
   absolute target now belongs to the SURFACE profile, and a crisis surface raises
   it there. This rule has one job left — making size="sm" a no-op in acute mode,
   so a crisis control never ends up smaller than an ordinary one on the same
   surface.

   Two different properties, restored from two different tokens: the height half
   comes from --control-height, the width half from --min-tap-target. Neither is
   guaranteed to be an INCREASE: a profile may declare control-height-sm equal to
   both, and then this rule restores the same two numbers it revoked — while the
   padding and font-size below are restored regardless, which is what makes the
   modifier a genuine no-op in acute mode and only here. What the contract's
   validator rules out is the other direction, control-height-sm ABOVE either
   token: this rule would then hand back a LOWER minimum than the dense rule
   declared. What the profile owes is checked there, not here. */
[data-mode="acute"] .ds-btn--sm {
  min-height: var(--control-height);
  min-width: var(--min-tap-target);
  padding: 0 var(--space-4);
  font-family: var(--brand-font);
  font-size: var(--font-size-button);
}

/* Acute: an outline button (minimal fill). Uses surface-relative foreground so
   it stays legible on any theme, not just acute mode.

   The border is the ONLY channel that identifies this control — the fill is
   transparent, so there is nothing else to see. That makes it a control edge and
   binds it to WCAG Non-text Contrast (3:1), which color-border-primary does not
   owe: a product may legitimately keep that token as a decorative hairline.
   color-border-secondary is the token whose contract is "boundary that carries
   meaning", so the edge belongs there. No ratio is quoted here on purpose — this
   file is product-neutral, the number changes with every token set, and
   createBrandGuard is where it is actually checked.

   The variant name says acute and this rule applies in every theme — the two
   disagree. With the secondary token the edge carries the ratio its own token
   owes in every declared variant, so the name is a clarity problem, not an
   accessibility one; renaming it would break ButtonVariant, a public type. Left
   as a named follow-up. */
.ds-btn--acute {
  background: transparent;
  color: var(--color-text-primary);
  border-color: var(--color-border-secondary);
}
.ds-btn--acute:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--color-bg-tertiary);
}

/* ---- Buttons on chrome ----
   A dark title-bar ground (bg-chrome) cannot take the default button pairs. The container
   .ds-on-chrome paints the ground and the text, and re-colours the .ds-btn inside it
   (primary, secondary, ghost); a single button opts in with surface="chrome"
   (.ds-btn--on-chrome). The focus ring is the chrome ring. Both selector forms are more specific
   than the base variant rules; the single-button focus rule (.ds-btn--on-chrome:focus-visible)
   ties with .ds-btn:focus-visible and comes after it.
   Other controls inside the container keep their own colours (pairs not measured on this ground). */
.ds-on-chrome { background: var(--color-bg-chrome); color: var(--color-text-on-chrome); }
.ds-on-chrome .ds-btn--secondary,
.ds-btn--on-chrome.ds-btn--secondary,
.ds-on-chrome .ds-btn--ghost,
.ds-btn--on-chrome.ds-btn--ghost {
  color: var(--color-text-on-chrome);
  border-color: var(--color-text-on-chrome-muted);
  background: transparent;
}
.ds-on-chrome .ds-btn--ghost,
.ds-btn--on-chrome.ds-btn--ghost { border-color: transparent; }
.ds-on-chrome .ds-btn--secondary:hover:not(:disabled):not([aria-disabled="true"]),
.ds-btn--on-chrome.ds-btn--secondary:hover:not(:disabled):not([aria-disabled="true"]),
.ds-on-chrome .ds-btn--ghost:hover:not(:disabled):not([aria-disabled="true"]),
.ds-btn--on-chrome.ds-btn--ghost:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--color-overlay-light-fill); }
.ds-on-chrome .ds-btn--primary,
.ds-btn--on-chrome.ds-btn--primary {
  background: var(--color-accent-on-chrome);
  color: var(--color-button-on-chrome-label);
  border-color: var(--color-accent-on-chrome);
}
.ds-on-chrome .ds-btn--primary:hover:not(:disabled):not([aria-disabled="true"]),
.ds-btn--on-chrome.ds-btn--primary:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--color-button-on-chrome-fill-hover);
  border-color: var(--color-button-on-chrome-fill-hover);
}
.ds-on-chrome .ds-btn--primary:active:not(:disabled):not([aria-disabled="true"]),
.ds-btn--on-chrome.ds-btn--primary:active:not(:disabled):not([aria-disabled="true"]) {
  background: var(--color-button-on-chrome-fill-active);
  border-color: var(--color-button-on-chrome-fill-active);
}
.ds-on-chrome .ds-btn:focus-visible,
.ds-btn--on-chrome:focus-visible { box-shadow: var(--shadow-focus-chrome); }
@media (forced-colors: active) {
  .ds-on-chrome .ds-btn:focus-visible,
  .ds-btn--on-chrome:focus-visible { outline: var(--border-width-control) solid Highlight; }
}

.ds-card {
  background: var(--color-bg-surface);
  border: var(--border-width-thin) solid var(--color-border-primary);
  border-radius: var(--radius-lg);
  padding: var(--card-padding);
}

/* TapCard: a full-width tappable card (choices, navigation rows).

   At rest the border is a control edge, not decoration: the fill is the same
   surface a plain card uses, so the border is what says "this is tappable". It
   therefore uses color-border-secondary (contract: boundary that carries meaning,
   at least 3:1) and not color-border-primary (decorative hairline, which owes no
   ratio). Hover and selection move it to color-action-border below, and that token
   owes the same 3:1 on this surface — the guard checks both. Which of the two is
   the quieter one is a token-set decision that nothing here enforces: a set that
   makes them equal loses the state, without losing the perceivability. */
.ds-tapcard {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: var(--min-tap-target);
  padding: var(--card-padding);
  text-align: left;
  background: var(--color-bg-surface);
  border: var(--border-width-base) solid var(--color-border-secondary);
  border-radius: var(--radius-lg);
  /* The reading face at the body cut for whatever children carry (#372); the title sets the
     marking face itself. Brand with no weight drew brand 400, a cut no check requires. */
  font-family: var(--font-ui);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-body);
  color: var(--color-text-primary);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--easing-default),
    background-color var(--duration-fast) var(--easing-default);
}
/* Hover and selection are carried by the BORDER token, not the fill: a theme may
   set the fill to transparent (acute does), and a transparent border-color is not
   a subtle hover — it removes the border. Where the fill is opaque the two tokens
   hold the same value, so nothing changes visually. */
.ds-tapcard:hover:not(:disabled):not([aria-disabled="true"]) {
  border-color: var(--color-action-border);
}
.ds-tapcard:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}
/* The selected background is deliberately quiet (1.07 against the resting surface
   in acute, 1.15/1.18 elsewhere), so the border is what actually reports the
   selection — and it has to survive a transparent fill. */
.ds-tapcard--selected {
  border-color: var(--color-action-border);
  background: var(--color-surface-branded);
}
/* Icon well uses the theme-aware branded surface (not the theme-fixed badge
   tint) + the secondary action color, so the glyph stays visible in dark/acute
   instead of vanishing (acute's --color-button-primary-fill is transparent). */
.ds-tapcard__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-surface-branded);
  color: var(--color-action-foreground);
}
.ds-tapcard__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ds-tapcard__title {
  font-family: var(--brand-font);
  font-weight: var(--font-weight-semibold);
}
.ds-tapcard__subtitle {
  color: var(--color-text-secondary);
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-small);
  line-height: var(--line-height-small);
}

/* Badge — status pill (also serves as chip/tag). Tones reuse the risk tint
   scale (success=green, warning=amber, error=red — same hue intent) and the
   brand tint for info, so no extra tokens are needed. */
.ds-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-small);
  background: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
}
/* Foregrounds use theme-fixed "strong"/brand-active values (not the theme-
   variable semantic tokens) because the tints are theme-fixed light — this
   keeps every tone at >=4.5:1 in light, dark and acute. */
.ds-badge--info {
  background: var(--brand-primary-tint);
  color: var(--brand-primary-active);
}
.ds-badge--success {
  background: var(--risk-low-tint);
  color: var(--risk-low-strong);
}
.ds-badge--warning {
  background: var(--risk-medium-tint);
  color: var(--risk-medium-strong);
}
.ds-badge--error {
  background: var(--risk-high-tint);
  color: var(--risk-high-strong);
}

/* Emergency call (112) — hard-wired, deliberately prominent, works offline
   (tel: link needs no JS). The one loud element in the acute world. */
.ds-emergency {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: var(--control-height);
  padding: 0 var(--space-4);
  border: none;
  border-radius: var(--radius-md);
  background: var(--color-emergency-solid);
  color: var(--color-emergency-solid-text);
  font-family: var(--brand-font);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--duration-instant) var(--easing-default);
}
.ds-emergency:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}
.ds-emergency:active {
  transform: scale(0.99);
}

/* Table (B2B workbench) — dense; wraps in a scroll container so wide tables
   never force the page to scroll horizontally. */
.ds-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.ds-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-small);
  line-height: var(--line-height-small);
}
/* The header rule is decorative and the row dividers are not, which looks
   inconsistent and is the one place worth stating why. The header is already set
   apart by weight, colour and its own words, so its underline adds emphasis to a
   distinction the reader has anyway. Between two data rows there is no such
   redundancy: the divider is the only thing saying where one record ends, which is
   a boundary that carries meaning. Hence primary here and secondary on td. */
.ds-table th {
  padding: var(--row-padding-y) var(--space-3);
  text-align: left;
  color: var(--color-text-secondary);
  font-family: var(--font-ui);
  font-weight: var(--font-weight-semibold);
  border-bottom: var(--border-width-thin) solid var(--color-border-primary);
  white-space: nowrap;
}
.ds-table td {
  padding: var(--row-padding-y) var(--space-3);
  color: var(--color-text-primary);
  border-bottom: var(--border-width-thin) solid var(--color-border-secondary);
}
.ds-table tbody tr:hover {
  background: var(--color-bg-tertiary);
}
.ds-th-sort {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  /* Buttons do not inherit case and tracking on their own (UA: text-transform none); the data
     table's header sets both on the th. */
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}
.ds-th-sort:focus-visible {
  outline: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-focus);
}

/* Navigation — BottomNav (B2C) + Sidebar (B2B) */
.ds-bottomnav {
  display: flex;
  background: var(--color-bg-surface);
  border-top: var(--border-width-thin) solid var(--color-border-primary);
  padding: var(--space-2) 0 calc(var(--space-2) + env(safe-area-inset-bottom, 0px));
}
.ds-bottomnav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: var(--min-tap-target);
  color: var(--color-text-secondary);
  font-family: var(--font-ui);
  font-size: var(--font-size-meta);
  font-weight: var(--font-weight-meta);
  line-height: var(--line-height-meta);
  text-decoration: none;
}
.ds-bottomnav__item:focus-visible {
  outline: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-focus);
}
.ds-bottomnav__item.is-active {
  color: var(--color-nav-active-fg);
  font-family: var(--font-ui);
  font-weight: var(--font-weight-semibold);
}

/* SideRail — the tablet's navigation: the same paths as the BottomNav, on the
   left, because a held tablet's bottom edge is out of thumb reach.

   Every size here comes from a token. The design that specified this rail names
   104px/236px widths and 66px/52px targets; the widths are layout and are kept,
   the TARGETS are not — an entry that hardcodes its height stops honouring the
   surface profile the product declared, which is the defect the axis exists to
   prevent. min-height: var(--min-tap-target) means the rail grows with the
   profile instead of arguing with it. */
.ds-siderail {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  height: 100%;
  background: var(--color-bg-surface);
  border-right: var(--border-width-thin) solid var(--color-border-primary);
  padding: var(--space-3) var(--space-2);
}
.ds-siderail__brand {
  padding: var(--space-2) var(--space-2) var(--space-4);
}
.ds-siderail__group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
/* Pushes the trailing group to the bottom edge, so the split the accent entry
   makes is visible as a split rather than as a gap of arbitrary size.

   The sibling combinator is load-bearing, not tidiness. Written as
   .ds-siderail__group:last-child it also matches the SINGLE group of a rail that
   has no accent entry — every item would be pinned to the bottom of an otherwise
   empty rail, and no unit test would see it, because jsdom runs no layout. This
   only ever applies to a group that actually follows the split. */
.ds-siderail__accentslot + .ds-siderail__group {
  margin-top: auto;
}
.ds-siderail__item,
.ds-siderail__accent {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--min-tap-target);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-family: var(--font-ui);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  line-height: var(--line-height-body);
  text-decoration: none;
}
.ds-siderail__item:hover {
  background: var(--color-bg-tertiary);
}
.ds-siderail__item:focus-visible,
.ds-siderail__accent:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}
/* Same two redundant markers as .ds-sidebar__item.is-active, and for the same
   reason: where the action fill is transparent the pill vanishes and the border
   token is the only marker left. See the note above that rule. */
.ds-siderail__item.is-active {
  background: var(--color-button-primary-fill);
  color: var(--color-button-primary-label);
  box-shadow: inset 3px 0 0 0 var(--color-action-border);
}
/* The one filled call to action in the rail. It reaches the rail's left edge and
   rounds to the right only — a rail has no middle to lift a circle into, the way
   a tab bar does.

   IT IS THE PRIMARY FILL, NOT THE EMERGENCY ONE, and that is a deliberate
   deviation from the design this came from. There the entry is red, because
   there it is one product's incident-report flow. --color-emergency-solid is
   the loudest surface the token set has and it belongs to the hard-wired 112
   call; spending it on a navigation entry would make "go to a screen" shout as
   loudly as "call an ambulance", and it would bake one product's judgement into
   a product-neutral recipe. A product that wants this entry red says so through
   its own token values.

   (The source design itself records the red as unsettled: "Nicht entschieden,
   ob Melden auf dem Tablet diese Sonderstellung braucht.") */
.ds-siderail__accentslot {
  margin: var(--space-3) calc(var(--space-2) * -1) var(--space-3) calc(var(--space-2) * -1);
}
.ds-siderail__accent {
  background: var(--color-button-primary-fill);
  color: var(--color-button-primary-label);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding-left: var(--space-4);
  font-family: var(--brand-font);
  font-weight: var(--font-weight-bold);
}
.ds-siderail__accent:hover {
  background: var(--color-button-primary-fill-hover);
}
/* The accent entry is already filled, so the fill cannot also carry "you are
   here" — without this, an accent entry looks identical whether or not it is the
   current page. The stripe is the same marker .ds-siderail__item.is-active uses,
   which is what makes the two states legible side by side. */
.ds-siderail__accent.is-active {
  box-shadow: inset 4px 0 0 0 var(--color-action-border);
}
/* compact: the word moves under the icon and shrinks, so a narrow device keeps
   its content width. The tap target does NOT shrink — it is the axis's. */
.ds-siderail--compact .ds-siderail__item,
.ds-siderail--compact .ds-siderail__accent {
  flex-direction: column;
  gap: 2px;
  justify-content: center;
  padding: var(--space-2) var(--space-1);
  text-align: center;
}
.ds-siderail--compact .ds-siderail__label {
  font-family: var(--font-ui);
  font-size: var(--font-size-meta);
  font-weight: var(--font-weight-meta);
  line-height: var(--line-height-meta);
}
/* The accent entry keeps the marking face and its bold cut in the compact rail; it takes only the
   compact size and line height from the rule above (#372). */
.ds-siderail--compact .ds-siderail__accent .ds-siderail__label {
  font-family: var(--brand-font);
  font-weight: var(--font-weight-bold);
}
.ds-siderail--compact .ds-siderail__accent {
  padding-left: var(--space-1);
}

.ds-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ds-sidebar__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--min-tap-target);
  padding: var(--space-2) var(--space-3);
  /* Carried by EVERY item, active or not, so marking one does not shift the labels
     of the others. It is the fallback marker for a theme whose action fill is
     transparent — see .is-active below. */
  border-left: 3px solid transparent;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-family: var(--font-ui);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  line-height: var(--line-height-body);
  text-decoration: none;
}
.ds-sidebar__item:hover {
  background: var(--color-bg-tertiary);
}
.ds-sidebar__item:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}
/* Two markers, deliberately redundant. Where the action fill is opaque the filled
   pill carries the state and the stripe is invisible (the same colour as the fill
   it sits on). Where the fill is transparent the pill disappears and the stripe is
   the only marker left, which is why it uses the border token: in that case the
   stripe alone owes WCAG Non-text Contrast (3:1) against the surface it sits on, and only a
   product's token values decide whether it clears it.

   No ratio is named here on purpose. This file is product-neutral, and the number
   changes with every token set — the figure that used to stand here (3.65) was one
   product's, went stale when that product moved its accent, and nobody noticed
   because prose is not a test. The obligation lives here; the measurement lives in
   the consumer's contrast guard.

   The foreground stays color-button-primary-label, the token the brand guard
   already checks against the resolved fill. */
.ds-sidebar__item.is-active {
  background: var(--color-button-primary-fill);
  border-left-color: var(--color-action-border);
  color: var(--color-button-primary-label);
}

/* Form controls.

   The border is the only thing that marks a field: its fill is bg-surface and it
   sits on bg-primary, two surfaces a token set is free to place arbitrarily close
   to each other. So the edge carries WCAG Non-text Contrast alone and uses
   color-border-secondary, whose contract is a boundary that carries meaning. With
   color-border-primary — a decorative hairline that owes no ratio — a field can
   end up with no channel a person can see: not hard to read, but hard to FIND.
   The measured case that produced this rule is in the changeset; no ratio belongs
   here, because this file is product-neutral and createBrandGuard is where the
   number is actually checked. */
.ds-input,
.ds-select,
.ds-textarea {
  width: 100%;
  padding: 0 var(--space-3);
  min-height: var(--control-height);
  border: var(--border-width-base) solid var(--color-border-secondary);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  line-height: var(--line-height-body);
}
.ds-textarea {
  padding: var(--space-3);
  min-height: calc(var(--control-height) * 2);
  /* No line height of its own (#372): it keeps the body role's from the shared rule above, so a
     profile that overrides line-height-body reaches the textarea like the input and the select. */
  resize: vertical;
}
/* Monospaced content: markup, identifiers, anything whose column alignment carries
   meaning. A modifier rather than a separate component, because everything else about
   the control is unchanged. Replaces a Tailwind font-mono utility that stopped being
   generated the moment the file using it left the app that scanned for it. */
.ds-textarea--mono {
  font-family: var(--font-mono);
  /* Pinned rather than inherited from the body role: the mono slot delivers its own faces, and
     FIXED_FACES checks exactly this token against them (#372). */
  font-weight: var(--font-weight-normal);
}
/* Placeholder text is text: 4.5:1, not the 3:1 a de-emphasised hint might argue
   for. --color-text-tertiary measured 3.26 / 4.12 / 4.13 and failed in all three
   themes — the same token, and the same mistake, as the field hint in PR #36. */
.ds-input::placeholder,
.ds-textarea::placeholder {
  color: var(--color-text-secondary);
}
.ds-input:focus-visible,
.ds-select:focus-visible,
.ds-textarea:focus-visible {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: var(--shadow-focus);
}
.ds-input[aria-invalid="true"],
.ds-select[aria-invalid="true"],
.ds-textarea[aria-invalid="true"] {
  border-color: var(--color-status-error);
}
.ds-input:disabled,
.ds-select:disabled,
.ds-textarea:disabled {
  opacity: var(--opacity-disabled);
  cursor: not-allowed;
}

/* Select — a native picker in a themed box.

   Why a wrapper: the indicator has to be drawn from a TOKEN, and neither route works
   on the select itself. A <select> is a replaced element, so it has no usable
   ::after; a background-image data URI cannot read a CSS variable, which is exactly
   how a hardcoded arrow gets into a design system. So the wrapper owns the glyph and
   the select stays a plain native control.

   The glyph is two borders on a rotated square — no SVG, no asset, and it takes the
   token colour directly. pointer-events: none keeps the whole box clickable: without
   it the 7px glyph would swallow clicks aimed at the arrow, which is where people aim.

   The native indicator is suppressed because the platform draws it in the platform's
   colours: on the true-black acute surface a light-mode arrow is a bright patch, and
   on a dark surface it can disappear altogether. */
.ds-select-wrap {
  position: relative;
  display: block;
  width: 100%;
}
.ds-select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: var(--space-3);
  width: 7px;
  height: 7px;
  margin-top: -5px;
  border-right: 1.75px solid var(--color-text-secondary);
  border-bottom: 1.75px solid var(--color-text-secondary);
  transform: rotate(45deg);
  pointer-events: none;
}
.ds-select {
  /* Reserves the indicator's lane. With .ds-input's uniform padding a long option
     label ran underneath the arrow. */
  padding-right: calc(var(--space-3) * 2 + 7px);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.ds-select::-ms-expand {
  display: none;
}

.ds-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.ds-field__label {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-small);
  color: var(--color-text-secondary);
}
/* A hint is informational text and has to be readable. --color-text-tertiary is a
   de-emphasis colour, not a text colour: it misses WCAG Contrast (Minimum) — the 4.5:1
   for small text — in seven of the nine theme x surface combinations, measuring as low
   as 2.99 on the light page. --color-text-secondary clears all nine. Found by the admin
   a11y e2e suite, which reported it as a serious violation on the branding page's
   SPF/DKIM hint; the label already uses secondary, so the hint stays distinguishable by
   weight rather than by being too faint to read.

   Success criteria are named, never numbered, in this file: the comments are inlined
   into the generated stylesheet, and the determinism guard in css-determinism.test.ts
   rejects any dotted triple as a leaked version number — which a criterion number
   looks exactly like. */
.ds-field__hint {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-small);
  line-height: var(--line-height-small);
  color: var(--color-text-secondary);
}
.ds-field__error {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-small);
  line-height: var(--line-height-small);
  color: var(--color-status-error);
}

/* Overlay + Dialog/Sheet. Modal (centered, B2B) vs Sheet (bottom, B2C). */
.ds-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  background: var(--color-overlay);
}
.ds-overlay--modal {
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.ds-overlay--sheet {
  align-items: flex-end;
  justify-content: center;
}
.ds-dialog,
.ds-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: auto;
  padding: var(--space-5);
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-lg);
}
.ds-dialog {
  border-radius: var(--radius-lg);
}
.ds-sheet {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.ds-dialog__title,
.ds-sheet__title {
  margin-bottom: var(--space-3);
  font-family: var(--brand-font);
  font-size: var(--font-size-section);
  font-weight: var(--font-weight-section);
  line-height: var(--line-height-section);
  color: var(--color-text-primary);
}
/* Action row. Its own slot rather than trailing children so the actions keep a
   stable position and stay the last thing in the tab order. Wraps because two
   localized labels can be far wider in one language than another. */
.ds-dialog__footer,
.ds-sheet__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

/* Screen-reader-only text: removed from the visual layer, kept in the accessible
   tree. Used for the copy inside a live region whose visual form is a graphic —
   a live region announces its CONTENT, so the text has to exist in the DOM. */
.ds-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  clip-path: inset(50%);
}

/* Busy indicator. The ring is drawn with borders so it needs no SVG and no
   background image; the tinted quarter comes from the action color. Sized in em
   so it scales with the surrounding text.

   The duration deliberately comes from a token that the reduced-motion block
   zeroes; the explicit override further down restores a slow spin. That override
   MUST stay after the token block in the emitted sheet or the ring freezes — the
   ordering is asserted by a test, not left to chance. */
.ds-spinner {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  border: 2px solid var(--color-border-primary);
  border-top-color: var(--color-action-foreground);
  border-radius: var(--radius-full);
  animation: ds-spin var(--duration-slower) linear infinite;
}
@keyframes ds-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Hero imagery: a flat brand illustration in a tinted frame. The depth layers
   only animate in the enhanced variant, which the progressive-enhancement guard
   adds solely in the calm preparedness world (online, no reduced-motion/data-saver).
   The static SVG is always the baseline. */
.ds-hero {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--brand-primary-tint);
}
/* The inline SVG (viewBox 400x200) drives the height at 2:1 via height:auto —
   more robust than aspect-ratio on the flex-item wrapper, which can collapse. */
.ds-hero__scene {
  display: block;
  width: 100%;
  height: auto;
}
.ds-hero__content {
  position: absolute;
  inset: auto var(--space-4) var(--space-4) var(--space-4);
}
/* Enhanced: each depth plane floats slowly by its own amplitude/duration for a
   calm parallax. --_amp / --_dur are set per layer in the illustration. */
.ds-hero--enhanced .ds-hero__layer {
  will-change: transform;
  animation: ds-hero-float var(--_dur, 7s) ease-in-out infinite alternate;
}
@keyframes ds-hero-float {
  to {
    transform: translateY(var(--_amp, -6px));
  }
}
/* Belt-and-braces: even if something adds the enhanced class, never move for a
   user who asked for reduced motion. (The guard already prevents this.) */
@media (prefers-reduced-motion: reduce) {
  .ds-hero--enhanced .ds-hero__layer {
    animation: none;
  }
  /* Slowed, not stopped — a deliberate call against the stricter reading.
     The counter-argument is fair: a user asked for reduced motion, and the
     accessible signal is already carried by the live-region text, so the ring
     could simply stop. It does not, because for a SIGHTED reduced-motion user a
     frozen ring is indistinguishable from a hung UI, and that misinformation is
     the worse failure. 3s is a slow drift rather than a spin, and the wait is
     transient. Unlike the hero parallax above, this motion carries meaning. */
  .ds-spinner {
    animation-duration: 3s;
  }
}

/* A setting that has a state but no choice (e.g. the always-on consent
   purpose): no interactive role lives here, so there is no hover/focus/active
   state to style. The status/hint text is the small role in the reading face in
   the secondary colour, like Toggle's hint (the status line is additionally
   semibold); the
   spacing does not — Toggle sets an inline top margin on its hint, this
   layout instead spaces the label/status/hint stack via the flex container's
   gap, with only the status line adding its own top margin on top of that.

   All three text rules are qualified by the block class, which is not
   decoration: every one of them styles a paragraph, and a single class on a
   paragraph loses to any host rule of the form ".some-container p" — a class
   plus a type selector outranks a lone class. Component paragraphs then inherit
   a host page's body-copy size and margins, and the block's own type scale
   silently stops applying wherever the component is embedded. Qualifying with
   the block class costs one selector and makes these rules win by their own
   merit rather than by load order. The container rule needs no such treatment:
   it styles a div, which host body-copy rules do not target. */
.ds-setting-status {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2) 0;
}
.ds-setting-status .ds-setting-status__label {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-body);
  color: var(--color-text-primary);
}
.ds-setting-status .ds-setting-status__state {
  margin: var(--space-2) 0 0;
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-small);
  color: var(--color-text-secondary);
}
.ds-setting-status .ds-setting-status__hint {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-small);
  line-height: var(--line-height-small);
  color: var(--color-text-secondary);
}

/* AuthCard / PasskeyPrompt — the own login and registration surface (identity
   plan 2, task 9). Mechanic here, values from the consumer's tokens: every
   declaration reads a token, so a theme change reaches this surface without
   touching it.

   Text rules are qualified by the block class for the same reason
   .ds-setting-status's are: a lone class on a paragraph loses to any host rule
   of the form ".some-container p", and the block's own type scale then silently
   stops applying wherever it is embedded. */
.ds-auth-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  background: var(--color-bg-surface);
  border: var(--border-width-thin) solid var(--color-border-primary);
  border-radius: var(--radius-lg);
  padding: var(--card-padding);
}
.ds-auth-card .ds-auth-card__title {
  margin: 0;
  font-family: var(--brand-font);
  font-size: var(--font-size-title);
  font-weight: var(--font-weight-title);
  line-height: var(--line-height-title);
  color: var(--color-text-primary);
}
.ds-auth-card .ds-auth-card__description {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  line-height: var(--line-height-body);
  color: var(--color-text-secondary);
}
.ds-auth-card .ds-auth-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.ds-auth-card .ds-auth-card__footer {
  border-top: var(--border-width-thin) solid var(--color-border-secondary);
  padding-top: var(--space-3);
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-small);
  line-height: var(--line-height-small);
}

.ds-passkey-prompt {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.ds-passkey-prompt .ds-passkey-prompt__cta {
  border: var(--border-width-base) solid var(--color-action-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-family: var(--brand-font);
  font-size: var(--font-size-button);
  font-weight: var(--font-weight-button);
  line-height: var(--line-height-button);
  color: var(--color-action-foreground);
  background: var(--color-surface-branded);
}
.ds-passkey-prompt .ds-passkey-prompt__cta:focus-visible {
  outline: var(--border-width-base) solid var(--color-border-focus);
  outline-offset: var(--space-px);
}
/* The cancelled notice is ordinary secondary text on purpose: a dismissed
   dialog is a decision, not a fault, and styling it as a warning would tell the
   user their own choice went wrong. */
.ds-passkey-prompt .ds-passkey-prompt__notice {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-small);
  line-height: var(--line-height-small);
  color: var(--color-text-secondary);
}
/* An error does get the error colour, and the sentence carries the state
   regardless — so the colour reinforces and is never the only channel. */
.ds-passkey-prompt .ds-passkey-prompt__error {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-small);
  line-height: var(--line-height-small);
  color: var(--color-status-error-text);
}

/* ---- Icon-only button (IconButton) ----
   Size control-height-sm, never below min-tap-target (written out per rule: a recipe
   declares no custom property of its own). The hit area reaches at least
   44 high vertically (::before) even where the button is smaller; horizontally it stays
   the button width so neighbours in a group do not overlap. */
.ds-iconbtn {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: max(var(--control-height-sm), var(--min-tap-target));
  height: max(var(--control-height-sm), var(--min-tap-target));
  margin: 0;
  padding: 0;
  border: var(--border-width-thin) solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--easing-default),
    color var(--duration-fast) var(--easing-default);
}
.ds-iconbtn::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: max(100%, 44px, var(--min-tap-target)); /* 44: size from the design handover */
  transform: translateY(-50%);
}
.ds-iconbtn > svg { position: relative; flex: none; }
.ds-iconbtn:hover:not([aria-disabled="true"]) { background: var(--color-bg-tertiary); color: var(--color-text-primary); }
.ds-iconbtn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
/* Disabled: only the glyph fades so the tooltip stays readable (opacity on the button would
   pass to the child). The button stays focusable. */
.ds-iconbtn[aria-disabled="true"] { cursor: not-allowed; }
.ds-iconbtn[aria-disabled="true"] > svg { opacity: var(--opacity-disabled); }

/* bordered: the edge is the only sign of a control at rest, so it is border-secondary. */
.ds-iconbtn--bordered {
  width: calc(max(var(--control-height-sm), var(--min-tap-target)) + 2px);  /* 34 in workbench-pointer: size from the prototype */
  height: calc(max(var(--control-height-sm), var(--min-tap-target)) + 2px);
  border-color: var(--color-border-secondary);
}
/* danger: status-error as the glyph. The design system hovers on an error surface because
   status-error on bg-tertiary clears only 4.43 (light); this core has no such token, so the
   error note surface stands in. */
.ds-iconbtn--danger { color: var(--color-status-error); }
.ds-iconbtn--danger:hover:not([aria-disabled="true"]) { background: var(--color-note-error-surface); color: var(--color-status-error); }
/* inverse: on bg-inverse (close in the toast). */
.ds-iconbtn--inverse { color: var(--color-text-inverse); }
.ds-iconbtn--inverse:hover:not([aria-disabled="true"]) { background: var(--color-hover-on-inverse); color: var(--color-text-inverse); }
.ds-iconbtn--inverse:focus-visible { box-shadow: var(--shadow-focus-inverse); }
/* chrome: in the title bar. IconButton keeps the inverse pair until its own step; the core now
   has the chrome roles (spec ds-web-bausteine, non-goal). A product paints it on bg-chrome. */
.ds-iconbtn--chrome { color: var(--color-text-inverse); }
.ds-iconbtn--chrome:hover:not([aria-disabled="true"]) { background: var(--color-hover-on-inverse); color: var(--color-text-inverse); }
.ds-iconbtn--chrome:focus-visible { box-shadow: var(--shadow-focus-chrome); }
/* sm: the remove button in a FilterChip, 24 x 24 with a 14 glyph (size from the handover).
   The hit area grows horizontally too, up to min-tap-target: the chip has no other action. */
.ds-iconbtn--sm {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
}
.ds-iconbtn--sm::before {
  left: 50%;
  right: auto;
  width: max(100%, var(--min-tap-target));
  transform: translate(-50%, -50%);
}
/* Drawer trigger only below 1024px. */
@media (min-width: 1024px) { .ds-sidebar-toggle { display: none; } }

/* ---- Tooltip ----
   Fixed next to the button; the component sets left/top. It appears after duration-normal
   and fades in over duration-fast. Padding 6/8 is space-2/space-3 in every profile. */
.ds-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1100;
  transform: translate(-50%, -100%);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--color-bg-inverse);
  color: var(--color-text-inverse);
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-fast) var(--easing-out), visibility 0s linear var(--duration-fast);
}
.ds-tooltip.is-below { transform: translate(-50%, 0); }
.ds-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--duration-fast) var(--easing-out) var(--duration-normal), visibility 0s linear var(--duration-normal);
}
/* ---- "More actions" menu (ActionMenu) ----
   The component sets top and left/right and then visibility. Sizes 200 and 9/10 are
   from the prototype. The design source's card radius and hairline map to radius-lg and
   border-width-thin here (the core has no radius-card / border-width-hairline). */
.ds-actionmenu { display: inline-flex; }
.ds-menu {
  position: fixed;
  z-index: 1100;
  visibility: hidden;
  box-sizing: border-box;
  min-width: 200px;
  padding: var(--space-1);
  background: var(--color-bg-surface);
  border: var(--border-width-thin) solid var(--color-border-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-popover);
}
.ds-menu__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  box-sizing: border-box;
  width: 100%;
  min-height: var(--min-tap-target);
  padding: 9px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  line-height: var(--line-height-small);
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.ds-menu__item:hover:not([aria-disabled="true"]),
.ds-menu__item:focus { outline: none; background: var(--color-bg-tertiary); }
.ds-menu__item:focus-visible { box-shadow: var(--shadow-focus); }
.ds-menu__item > svg { flex: none; }
/* danger: status-error text; hover/focus on the error note surface, as for the danger IconButton. */
.ds-menu__item--danger { color: var(--color-status-error); }
.ds-menu__item--danger:hover:not([aria-disabled="true"]),
.ds-menu__item--danger:focus { background: var(--color-note-error-surface); }
.ds-menu__item[aria-disabled="true"] { cursor: not-allowed; opacity: var(--opacity-disabled); }

/* ---- Toast ----
   One live region per page, bottom right: 20 from the edge, 16 left and right below 641px, at
   most 440 wide (prototype measures). z-index 1050 sits above the dialog (1000) and below the
   menu and tooltip (1100). The action text takes action-on-inverse (the design's
   accent-on-inverse); createBrandGuard holds it to 4.5:1 on bg-inverse. */
.ds-toast-region {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1050;
  width: max-content;
  max-width: min(440px, calc(100vw - 40px));
  pointer-events: none;
}
.ds-toast {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 8px 10px 14px;      /* prototype measure */
  border-radius: var(--radius-lg);
  background: var(--color-bg-inverse);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-popover);
  font-family: var(--font-ui);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  line-height: var(--line-height-body);
  pointer-events: auto;
  animation: ds-toast-in var(--duration-normal) var(--easing-out);
}
.ds-toast__text { flex: 1; min-width: 0; margin: 0; }
.ds-toast__action {
  flex: none;
  min-height: var(--min-tap-target);
  padding: 0 var(--space-2);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-action-on-inverse);
  font-family: var(--font-ui);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
}
/* Hover underlines instead of filling: the accent on hover-on-inverse would clear less contrast. */
.ds-toast__action:hover { text-decoration: underline; text-underline-offset: 2px; }
.ds-toast__action:focus-visible { outline: none; box-shadow: var(--shadow-focus-inverse); }
@keyframes ds-toast-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 640px) {
  .ds-toast-region { left: 16px; right: 16px; bottom: 16px; width: auto; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ds-toast { animation: none; }
}

/* ---- FilterChip and FilterBar ----
   Ported from the prototype recipes of 21 November 2026 onto core tokens; the core has no
   status-info-border or hairline width, so: note-info-surface for the pill, color-border-primary
   (decorative, allowlisted: the pill is no control, its x is) for the edge, border-width-thin for
   the line. Padding is 4 / 4 / 4 / 12: the prototype's 10 left padding has no core step, and
   space-3 gives the text the room the pill radius takes away. */
.ds-filterchip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-1) var(--space-1) var(--space-3);
  border: var(--border-width-thin) solid var(--color-border-primary);
  border-radius: var(--radius-full);
  background: var(--color-note-info-surface);
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
}
.ds-filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}
.ds-filterbar__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.ds-filterbar__count {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
}

/* ---- ChoiceChip and ChoiceChipGroup ----
   Ported from the design recipe (components.css, 26 November 2026) onto core tokens. The resting
   edge is color-border-secondary, not the decorative hairline: it marks a control (WCAG non-text contrast).
   Selected, the edge comes from action-border rather than the fill, as on the primary button. The
   height is max(control-height-sm, min-tap-target) instead of the design's data-surface rule
   (product vocabulary), as on native. Inherited: a border-width-control outline with the padding
   reduced by the extra width so the pill does not jump; it comes after the selected rule and wins
   by order at equal specificity, because an inherited pill carries aria-checked too. */
.ds-choicechip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px; /* design answer literal: between space-2 and space-3, same both ways */
}
.ds-choicechip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: max(var(--control-height-sm), var(--min-tap-target));
  padding: 0 calc(var(--space-4) - var(--border-width-thin));
  border: var(--border-width-thin) solid var(--color-border-secondary);
  border-radius: var(--radius-full);
  background: var(--color-bg-surface);
  color: var(--color-text-secondary);
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
  cursor: pointer;
}
.ds-choicechip:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--color-bg-tertiary); }
.ds-choicechip:active:not(:disabled):not([aria-disabled="true"]) { background: var(--color-bg-tertiary); }
.ds-choicechip[aria-checked="true"],
.ds-choicechip[aria-pressed="true"] {
  background: var(--color-button-primary-fill);
  border-color: var(--color-action-border);
  color: var(--color-button-primary-label);
}
/* The rest hover above would put the light tertiary surface under the selected pill's label. */
.ds-choicechip[aria-checked="true"]:hover:not(:disabled):not([aria-disabled="true"]):not(.ds-choicechip--inherited),
.ds-choicechip[aria-pressed="true"]:hover:not(:disabled):not([aria-disabled="true"]):not(.ds-choicechip--inherited) {
  background: var(--color-button-primary-fill-hover);
}
/* Only the surface moves; the edge stays the carrying channel. */
.ds-choicechip[aria-checked="true"]:active:not(:disabled):not([aria-disabled="true"]):not(.ds-choicechip--inherited),
.ds-choicechip[aria-pressed="true"]:active:not(:disabled):not([aria-disabled="true"]):not(.ds-choicechip--inherited) {
  background: var(--color-button-primary-fill-active);
  border-color: var(--color-action-border);
}
.ds-choicechip:disabled { opacity: var(--opacity-disabled); cursor: default; }
.ds-choicechip:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.ds-choicechip.ds-choicechip--inherited {
  border: var(--border-width-control) solid var(--color-action-foreground);
  padding: 0 calc(var(--space-4) - var(--border-width-control));
  background: var(--color-bg-surface);
  color: var(--color-text-secondary);
}
.ds-choicechip--inherited svg[data-icon="check"] { color: var(--color-action-foreground); }
/* Forced colours drop box-shadow, so focus falls back to an outline there. */
@media (forced-colors: active) {
  .ds-choicechip:focus-visible { outline: var(--border-width-control) solid Highlight; }
}

/* ---- Note ----
   A tinted surface that carries one sentence, not a card: no shadow; an edge only on the error
   tone, and that edge is decorative like color-border-primary (the text carries). Each tone
   reads its own note roles (surface + fg), never a status or risk token. flush gives the padding
   to the content and stacks. */
.ds-note {
  display: flex;
  gap: var(--space-3);
  padding: var(--card-padding);
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  line-height: var(--line-height-small);
}
.ds-note--hint { background: var(--color-note-hint-surface); color: var(--color-note-hint-fg); }
.ds-note--info { background: var(--color-note-info-surface); color: var(--color-note-info-fg); }
.ds-note--error {
  background: var(--color-note-error-surface);
  color: var(--color-note-error-fg);
  border: var(--border-width-thin) solid var(--color-note-error-border);
}
.ds-note--flush { padding: 0; flex-direction: column; gap: 0; }
.ds-note__icon { flex-shrink: 0; display: inline-flex; }
.ds-note__body { min-width: 0; }

/* ---- Tabs ----
   A tab list over one panel. The list wraps instead of scrolling: a scrolling list clips the outer
   focus ring and anything that reaches past its edge. The list's baseline and the selected tab's
   indicator are control edges, not decoration, so they use color-border-secondary and
   color-action-border (the selection edge, like .ds-tapcard) rather than the decorative
   color-border-primary — not a …-fill token, which a theme may paint as a surface only; the indicator is the
   tab's own bottom border (so it stays visible on any wrapped line), heavier than the baseline,
   and the selected label is semibold, so the state is not carried by colour alone. */
.ds-tabs { display: flex; flex-direction: column; min-width: 0; }
.ds-tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  border-bottom: var(--border-width-thin) solid var(--color-border-secondary);
}
.ds-tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  box-sizing: border-box;
  min-height: var(--min-tap-target);
  padding: 0 var(--space-4);
  border: 0;
  border-bottom: var(--border-width-control) solid transparent;
  background: transparent;
  color: var(--color-text-secondary);
  font-family: var(--font-ui);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  white-space: nowrap;
  cursor: pointer;
}
.ds-tabs__tab:hover { color: var(--color-text-primary); background: var(--color-bg-tertiary); }
.ds-tabs__tab[aria-selected="true"] {
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  font-weight: var(--font-weight-semibold);
  border-bottom-color: var(--color-action-border);
}
.ds-tabs__tab:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.ds-tabs__badge {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-body);
  color: var(--color-text-secondary);
}
.ds-tabs__panel { padding-top: var(--space-4); }
/* Forced colours drop box-shadow, so focus falls back to an outline there. */
@media (forced-colors: active) {
  .ds-tabs__tab { border-bottom-color: Canvas; }
  .ds-tabs__tab[aria-selected="true"] { border-bottom-color: Highlight; }
  .ds-tabs__tab:focus-visible { outline: var(--border-width-control) solid Highlight; }
}

/* ---- Data table (Table with columns), BulkBar, Pager, RowActions ----
   Ported from the prototype recipes of 21 November 2026 onto core tokens. The design's
   text-size roles (font-size-table, -hint, -table-title) exist only in its comfortable step,
   which the core does not carry; the recipes take the grade the design names as their fallback
   (font-size-small, font-size-section). status-info-surface maps to note-info-surface,
   status-info-border to color-border-primary (allowlisted), the hairline to border-width-thin,
   the prototype's .1em and eyebrow tracking to letter-spacing-wide, the 2 subtitle gap to
   space-px. Literals that stay, as the design answer keeps them: selection column 36, checkbox
   16, row action gap 2, placeholder bar 10 high, radius 4, 72 % wide. */
.ds-datatable { display: flex; flex-direction: column; min-width: 0; }
.ds-datatable__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-3);
}
.ds-datatable__title {
  margin: 0;
  font-family: var(--brand-font);
  font-size: var(--font-size-section);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
}
.ds-datatable__subtitle {
  margin: var(--space-px) 0 0;
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  line-height: var(--line-height-small);
  color: var(--color-text-tertiary);
}
.ds-datatable__headactions { display: flex; gap: var(--space-2); flex: none; }
/* Column heads of the data table: uppercase meta in text-tertiary; the weight stays the
   semibold of .ds-table th. */
.ds-table--data th {
  font-family: var(--font-ui);
  font-size: var(--font-size-meta);
  line-height: 1;
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}
.ds-table--data th.is-end, .ds-table--data td.is-end { text-align: right; }
.ds-table--data td { vertical-align: middle; }
/* Hover and keyboard focus inside a row both lift it to bg-tertiary. The paint sits on the cells
   so the sticky name column moves with it. State rows (loading, empty, error) get no hover:
   status-error on bg-tertiary would fall below 4.5:1. */
.ds-table--data tbody tr:hover { background: transparent; }
.ds-table--data tbody tr:not(.ds-table__state):not(.ds-table__skeleton):hover > td,
.ds-table--data tbody tr:not(.ds-table__state):focus-within > td { background: var(--color-bg-tertiary); }
.ds-table--clickable tbody tr.is-clickable { cursor: pointer; }
.ds-table__name { display: inline-flex; align-items: center; gap: var(--space-2); }
.ds-table__link {
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.ds-table__link:hover { text-decoration: underline; }
.ds-table__link:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
/* The grip only says the row can move; it is aria-hidden, the arrow buttons are the way. */
.ds-table__grip { flex: none; color: var(--color-text-tertiary); cursor: grab; }
.ds-table .ds-table__select { width: 36px; box-sizing: border-box; padding-right: 0; } /* design answer literal */
/* accent-color takes color-accent, not the button fill: a theme may leave the fill transparent. */
.ds-table__check {
  display: block;
  width: 16px;                      /* design answer literal */
  height: 16px;
  margin: 0;
  accent-color: var(--color-accent);
  cursor: pointer;
}
.ds-table__check:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-sm); }
/* The buttons' overhang beyond the cell's line height (1lh) is taken back with a negative
   margin, so the row does not grow. */
.ds-table__actions { width: 1%; white-space: nowrap; text-align: right; }
.ds-rowactions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;                         /* design answer literal */
  margin-block: calc((max(var(--control-height-sm), var(--min-tap-target)) - 1lh) / -2);
}
.ds-table__bar {
  display: block;
  width: 72%;                       /* design answer literal, as are height and radius */
  height: 10px;
  border-radius: 4px;
  background: var(--color-bg-tertiary);
}
.ds-table__state > td { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.ds-table__empty { color: var(--color-text-secondary); }
.ds-table__error {
  color: var(--color-status-error);
  font-family: var(--font-ui);
  font-weight: var(--font-weight-semibold);
}
.ds-table__state .ds-btn { margin-top: var(--space-3); }
.ds-bulkbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: var(--color-note-info-surface);
  border-bottom: var(--border-width-thin) solid var(--color-border-primary);
}
.ds-bulkbar__count {
  margin-right: var(--space-2);
  font-family: var(--font-ui);
  font-size: var(--font-size-section);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-section);
  color: var(--color-text-primary);
}
.ds-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
}
.ds-pager__text {
  margin-right: var(--space-2);
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  line-height: 1;
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
}
/* From 641px the name column (and the selection before it) stays put while the table scrolls. */
@media (min-width: 641px) {
  .ds-table--data .is-name,
  .ds-table--selectable .ds-table__select {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--color-bg-surface);
  }
  .ds-table--selectable .is-name { left: 36px; } /* the selection column's width */
}
/* Below 641px every row becomes a card: no visible thead, one line per cell, "column name ·
   value". The line between cards is the only sign of where one record ends, so it is
   border-secondary like the table's row divider. */
@media (max-width: 640px) {
  .ds-table--data,
  .ds-table--data tbody,
  .ds-table--data tr,
  .ds-table--data td { display: block; }
  /* Hidden only visually (the .ds-sr-only pattern) rather than display:none, which would also
     remove the sort buttons and the select-all box. Whether the cells keep their column header
     in the accessibility tree is not promised here: some engines (WebKit) drop table semantics
     once the table is display:block. Each card line carries its column name via data-label. */
  .ds-table--data thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    white-space: nowrap;
    clip-path: inset(50%);
  }
  /* Its controls stay focusable, so the header shows while one holds focus (WCAG "Focus Visible"): a 1px
     clipped focus target is invisible. The header cells wrap within the card width. */
  .ds-table--data thead:focus-within {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    white-space: normal;
    clip-path: none;
  }
  .ds-table--data thead:focus-within tr { display: flex; flex-wrap: wrap; }
  .ds-table--data tbody tr {
    padding: var(--space-2) 0;
    border-bottom: var(--border-width-thin) solid var(--color-border-secondary);
  }
  .ds-table--data td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-1) var(--space-5);
    border-bottom: 0;
    text-align: right;
  }
  .ds-table--data td[data-label]::before {
    content: attr(data-label);
    flex: none;
    text-align: left;
    font-family: var(--font-ui);
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-small);
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
    color: var(--color-text-tertiary);
  }
  .ds-table--data td.ds-table__select { width: auto; justify-content: flex-start; }
  .ds-table--data td.ds-table__actions { width: auto; justify-content: flex-end; }
  .ds-table--data .ds-table__state > td,
  .ds-table--data .ds-table__skeleton > td { display: block; text-align: left; }
  .ds-rowactions { margin-block: 0; }
}

/* IconPicker (AD45): a grid of symbol-only fields. 44: size from the design handover, in every
   profile — workbench-pointer lowers --min-tap-target to 32, but a field carries no word, so the
   design keeps it at 44 there too. The field edge carries meaning (it is a control), hence
   color-border-secondary at rest and color-action-border when chosen, as on .ds-tapcard. */
.ds-iconpicker {
  display: grid;
  gap: var(--space-1);
}
@media (max-width: 420px) {
  .ds-iconpicker { grid-template-columns: repeat(auto-fill, max(44px, var(--min-tap-target))) !important; }
}
.ds-iconpicker__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max(44px, var(--min-tap-target));
  height: max(44px, var(--min-tap-target));
  padding: 0;
  background: var(--color-bg-surface);
  border: var(--border-width-base) solid var(--color-border-secondary);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--easing-default),
    background-color var(--duration-fast) var(--easing-default);
}
.ds-iconpicker__item:hover:not(:disabled) {
  border-color: var(--color-action-border);
}
.ds-iconpicker__item[aria-checked="true"] {
  background: var(--color-button-primary-fill);
  border-color: var(--color-action-border);
  color: var(--color-button-primary-label);
}
.ds-iconpicker__item:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}
.ds-iconpicker__item:disabled {
  cursor: not-allowed;
  opacity: var(--opacity-disabled);
}

/* Switch (web): the same token choices as the native Switch (see its comment): OFF track
   bg-tertiary with an action-border ring, ON track action-border, thumb bg-surface with its own
   ring; the state also sits in the thumb's position. Track 40 x 22 and thumb 18: sizes from the
   design handover. The button is the hit area, min-tap-target square, the track sits inside it. */
.ds-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--min-tap-target);
  min-height: var(--min-tap-target);
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: var(--radius-full);
  cursor: pointer;
}
.ds-switch:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}
.ds-switch[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: var(--opacity-disabled);
}
.ds-switch__track {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  width: 40px;
  height: 22px;
  background: var(--color-bg-tertiary);
  border: var(--border-width-base) solid var(--color-action-border);
  border-radius: var(--radius-full);
}
.ds-switch[aria-checked="true"] .ds-switch__track {
  justify-content: flex-end;
  background: var(--color-action-border);
}
.ds-switch__thumb {
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  background: var(--color-bg-surface);
  border: var(--border-width-base) solid var(--color-action-border);
  border-radius: var(--radius-full);
}
.ds-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 56px;
  padding: var(--space-2) 0;
}
.ds-switch-row__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.ds-switch-row__label {
  font-family: var(--font-ui);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-body);
  line-height: var(--line-height-body);
  color: var(--color-text-primary);
}
.ds-switch-row__hint {
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-small);
  line-height: var(--line-height-small);
  color: var(--color-text-secondary);
}

/* Landing page (WB03). Design tokens and the .ds-* component classes come from tokens.css.
   Layout dimensions that have no token live in the custom properties below, in one place. */
/* On :root, not .lp: html { scroll-padding-top } sits above .lp and cannot read a variable defined on it. */
:root {
  --lp-header-h: 68px;
  --lp-anchor-offset: 84px; /* header height plus air; anchored sections use it as scroll-margin-top */
  --lp-page-pad: 40px;
  --lp-hero-gap: 56px;
  --lp-section-pad: 88px;
  --lp-col-gap: 56px;
  /* Sizes of the drawn app picture; no token covers a phone mock-up. */
  --lp-phone-w: 270px;
  --lp-desk-w: 300px;
  --lp-desk-top: 70px;
  --lp-narrow-w: 860px; /* FAQ column */
  --lp-mock-h: 460px;
  --lp-shot-w: 440px;
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  min-height: 100vh;
}
html { scroll-padding-top: var(--lp-anchor-offset); }
body { margin: 0; }
[id] { scroll-margin-top: var(--lp-anchor-offset); }

.lp-in { max-width: var(--max-width-content); margin: 0 auto; padding: 0 var(--lp-page-pad); }

.lp-skip {
  position: absolute; left: -999px; top: var(--space-3); z-index: 9;
  background: var(--color-bg-raised); color: var(--color-text-primary);
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-md);
}
.lp-skip:focus { left: var(--space-5); box-shadow: var(--shadow-focus); }

/* Buttons are .ds-btn links; only the large form is local: min tap target plus --space-2 = 52px. */
.lp .ds-btn { text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; }
.lp .lp-lg { min-height: calc(var(--min-tap-target) + var(--space-2)); padding: 0 var(--space-8); font-size: var(--font-size-16); }

/* Header: sticky on chrome */
.lp-top { position: sticky; top: 0; z-index: 5; }
.lp-topin { display: flex; align-items: center; gap: var(--space-8); height: var(--lp-header-h); }
.lp-nav { display: flex; gap: var(--space-7); margin-right: auto; }
.lp-nav a {
  color: var(--color-text-on-chrome-muted); text-decoration: none;
  font: var(--font-weight-medium) var(--font-size-16) / 1 var(--font-ui);
  border-radius: var(--radius-sm); padding: var(--space-1) var(--space-2);
}
.lp-nav a:hover { color: var(--color-text-on-chrome); }
.lp-topacts { display: flex; gap: var(--space-3); margin-left: auto; }
.lp-lang--foot { display: none; }
.lp-top a:focus-visible, .lp-hero a:focus-visible, .lp-farm a:focus-visible, .lp-end a:focus-visible { outline: none; box-shadow: var(--shadow-focus-chrome); }
.lp a:focus-visible, .lp summary:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* Hero */
.lp-hero { padding: var(--space-10) 0; overflow: hidden; }
.lp-herogrid { display: grid; grid-template-columns: 1fr; gap: var(--lp-hero-gap); align-items: center; }
.lp-eb {
  margin: 0 0 var(--space-5); text-transform: uppercase; color: var(--color-accent-on-chrome);
  font: var(--font-weight-semibold) var(--font-size-13) / var(--line-height-eyebrow) var(--font-ui);
  letter-spacing: var(--letter-spacing-wide);
}
.lp-h1 {
  margin: 0; text-wrap: balance; color: var(--color-text-on-chrome);
  font: var(--font-weight-bold) var(--font-size-4xl) / var(--line-height-tight) var(--brand-font);
  letter-spacing: var(--letter-spacing-tight);
}
.lp-lead {
  margin: var(--space-7) 0 0; max-width: 34em; color: var(--color-text-on-chrome);
  font: var(--font-weight-regular) var(--font-size-19) / var(--line-height-relaxed) var(--font-ui);
}
.lp-ctas { display: flex; gap: var(--space-5); flex-wrap: wrap; margin-top: var(--space-8); }
.lp-facts {
  list-style: none; margin: var(--space-8) 0 0; padding: 0; display: flex; flex-wrap: wrap;
  gap: var(--space-4) var(--space-7); color: var(--color-text-on-chrome);
  font: var(--font-weight-medium) var(--font-size-14) / var(--line-height-snug) var(--font-ui);
}
.lp-facts li { display: flex; align-items: center; gap: var(--space-3); }
.lp-facts li::before { content: ""; width: var(--space-2); height: var(--space-2); border-radius: var(--radius-full); background: var(--color-accent-on-chrome); }

/* Hero picture: phone and desk window, drawn from tokens (app and page share the light theme) */
.lp-mock { position: relative; height: var(--lp-mock-h); }
.lp-phone {
  position: absolute; right: var(--space-7); top: 0; width: var(--lp-phone-w); z-index: 2; display: grid; gap: var(--space-3);
  padding: var(--space-6) var(--space-5) var(--space-7); background: var(--color-bg-primary); color: var(--color-text-primary);
  border: var(--space-3) solid var(--color-bg-chrome); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
}
.lp-ph-top { display: flex; justify-content: space-between; padding: var(--space-1); font: var(--font-weight-semibold) var(--font-size-13) / 1 var(--font-ui); }
.lp-ph-top span:last-child { font-weight: var(--font-weight-medium); color: var(--color-text-secondary); }
.lp-ph-warn {
  display: grid; gap: var(--space-1); padding: var(--space-4); border-radius: var(--radius-md);
  background: var(--color-level-2-surface); border: var(--border-width-thin) solid var(--color-level-2); color: var(--color-level-2-fg);
  font: var(--font-weight-regular) var(--font-size-13) / var(--line-height-snug) var(--font-ui);
}
.lp-ph-warn b { font: var(--font-weight-bold) var(--font-size-14) / var(--line-height-snug) var(--font-ui); }
.lp-ph-badge {
  justify-self: start; padding: var(--space-1) var(--space-3); border-radius: var(--radius-full);
  background: var(--color-level-2); color: var(--color-bg-surface);
  font: var(--font-weight-semibold) var(--font-size-12) / var(--line-height-tight) var(--font-ui);
}
.lp-ph-card, .lp-ph-row {
  display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4); border-radius: var(--radius-md);
  background: var(--color-bg-surface); border: var(--border-width-hairline) solid var(--color-border-primary);
}
.lp-ph-card b { display: block; font: var(--font-weight-semibold) var(--font-size-14) / var(--line-height-snug) var(--font-ui); }
.lp-ph-card span { font: var(--font-weight-regular) var(--font-size-12) / var(--line-height-snug) var(--font-ui); color: var(--color-text-secondary); }
.lp-ph-row { gap: var(--space-3); font: var(--font-weight-medium) var(--font-size-13) / var(--line-height-snug) var(--font-ui); }
.lp-ring { position: relative; width: var(--space-9); height: var(--space-9); flex: none; }
.lp-ring svg { width: 100%; height: 100%; fill: none; stroke-width: 5; stroke-linecap: round; }
.lp-ring-track { stroke: var(--color-border-primary); }
.lp-ring-fill { stroke: var(--color-accent); }
.lp-ring span { position: absolute; inset: 0; display: grid; place-items: center; font: var(--font-weight-bold) var(--font-size-12) / 1 var(--font-ui); color: var(--color-text-primary); }
.lp-dot { width: var(--space-3); height: var(--space-3); border-radius: var(--radius-full); background: var(--color-level-2); flex: none; }
.lp-dot--ok { background: var(--color-accent); }
.lp-desk {
  position: absolute; left: 0; top: var(--lp-desk-top); width: var(--lp-desk-w); z-index: 1; overflow: hidden;
  background: var(--color-bg-surface); color: var(--color-text-primary); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
}
.lp-desk-bar { display: flex; gap: var(--space-2); padding: var(--space-3) var(--space-4); background: var(--color-bg-tertiary); }
.lp-desk-bar i { width: var(--space-3); height: var(--space-3); border-radius: var(--radius-full); background: var(--color-border-primary); }
.lp-desk-body { display: grid; gap: var(--space-1); padding: var(--space-6) var(--space-7); font: var(--font-weight-regular) var(--font-size-13) / var(--line-height-snug) var(--font-ui); }
.lp-desk-body > b { margin-bottom: var(--space-4); font: var(--font-weight-semibold) var(--font-size-md) / var(--line-height-snug) var(--font-ui); }
.lp-tab { display: grid; gap: var(--space-2); padding: var(--space-4) 0; border-top: var(--border-width-hairline) solid var(--color-bg-tertiary); }
.lp-tab > span { display: flex; justify-content: space-between; max-width: 190px; }
.lp-tab small { font: var(--font-weight-regular) var(--font-size-12) / 1 var(--font-ui); color: var(--color-text-secondary); }
.lp-bar { height: var(--space-2); max-width: 190px; border-radius: var(--radius-sm); background: var(--color-bg-tertiary); overflow: hidden; }
.lp-bar span { display: block; height: 100%; background: var(--color-accent); }

/* Scenario band */
.lp-band { background: var(--color-bg-surface); border-bottom: var(--border-width-hairline) solid var(--color-border-primary); padding: var(--space-7) 0; }
.lp-bandt { margin: 0 0 var(--space-5); color: var(--color-text-secondary); font: var(--font-weight-semibold) var(--font-size-14) / var(--line-height-snug) var(--font-ui); }
.lp-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-3); }
.lp-chips li {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-5);
  border: var(--border-width-hairline) solid var(--color-border-primary); border-radius: var(--radius-full); background: var(--color-bg-primary);
  font: var(--font-weight-medium) var(--font-size-14) / 1 var(--font-ui);
}
.lp-chips svg { color: var(--color-accent); flex: none; }

/* Sections and text */
.lp-sec { padding: var(--lp-section-pad) 0; }
.lp-sec--alt { background: var(--color-bg-surface); border-top: var(--border-width-hairline) solid var(--color-border-primary); border-bottom: var(--border-width-hairline) solid var(--color-border-primary); }
.lp-ebd {
  margin: 0 0 var(--space-3); text-transform: uppercase; color: var(--color-accent);
  font: var(--font-weight-semibold) var(--font-size-13) / var(--line-height-eyebrow) var(--font-ui); letter-spacing: var(--letter-spacing-wide);
}
.lp-h2 {
  margin: 0; max-width: 22em; text-wrap: balance; color: var(--color-text-primary);
  font: var(--font-weight-bold) var(--font-size-3xl) / var(--line-height-tight) var(--brand-font); letter-spacing: var(--letter-spacing-tight);
}
.lp-h2--inv { color: var(--color-text-on-chrome); }
.lp-h3 { margin: 0; color: var(--color-text-primary); font: var(--font-weight-semibold) var(--font-size-19) / var(--line-height-snug) var(--font-ui); }
.lp-h3--lg { font-size: var(--font-size-xl); }
.lp-p { margin: var(--space-3) 0 0; color: var(--color-text-secondary); font: var(--font-weight-regular) var(--font-size-16) / var(--line-height-body) var(--font-ui); }
.lp-intro { max-width: 46em; }
.lp-after { margin-top: var(--space-7); }
.lp-lead--sm { font-size: var(--font-size-md); }
.lp-list { margin: var(--space-5) 0 0; padding: 0; list-style: none; display: grid; gap: var(--space-3); }
.lp-list li { position: relative; padding-left: var(--space-7); color: var(--color-text-primary); font: var(--font-weight-regular) var(--font-size-16) / var(--line-height-normal) var(--font-ui); }
.lp-list li::before { content: ""; position: absolute; left: var(--space-1); top: .6em; width: var(--space-2); height: var(--space-2); border-radius: var(--radius-full); background: var(--color-accent); }
.lp-link { color: var(--color-text-link); font-weight: var(--font-weight-semibold); }
.lp-ficon {
  display: grid; place-items: center; width: var(--space-9); height: var(--space-9); flex: none; border-radius: var(--radius-md);
  background: var(--color-surface-branded); color: var(--color-action-foreground);
}

/* Features: two rows with an app excerpt, then two short blocks */
.lp-frow { display: grid; grid-template-columns: 1fr 1fr; gap: var(--lp-col-gap); align-items: center; margin-top: var(--space-9); }
.lp-frow--rev .lp-ftext { order: 2; }
.lp-shot {
  box-sizing: border-box; width: 100%; max-width: var(--lp-shot-w); justify-self: center; padding: var(--space-7);
  background: var(--color-bg-surface); border: var(--border-width-hairline) solid var(--color-border-primary); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); color: var(--color-text-primary); font: var(--font-weight-regular) var(--font-size-14) / var(--line-height-snug) var(--font-ui);
}
.lp-shot-h { margin: var(--space-6) 0 var(--space-3); font: var(--font-weight-semibold) var(--font-size-14) / var(--line-height-snug) var(--font-ui); }
.lp-shot > .lp-shot-h:first-child { margin-top: 0; }
.lp-shot-steps { margin: 0; padding-left: var(--space-7); display: grid; gap: var(--space-2); }
.lp-shot .lp-tab > span, .lp-shot .lp-bar { max-width: none; }
.lp-fpair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8) calc(var(--space-8) + var(--space-3)); margin-top: var(--space-10); padding-top: var(--space-8); border-top: var(--border-width-hairline) solid var(--color-border-primary); }
.lp-fsmall { display: flex; gap: var(--space-6); align-items: flex-start; }

/* How */
.lp-steps { list-style: none; margin: var(--space-9) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8); }
.lp-steps li { display: flex; gap: var(--space-5); align-items: flex-start; }
.lp-stepnr {
  display: grid; place-items: center; width: var(--space-9); height: var(--space-9); flex: none; border-radius: var(--radius-full);
  background: var(--color-button-primary-fill); color: var(--color-button-primary-label); font: var(--font-weight-bold) var(--font-size-md) / 1 var(--font-ui);
}

/* Web and app */
.lp-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7); margin-top: var(--space-9); }
.lp-tcard { padding: var(--space-8); background: var(--color-bg-surface); border: var(--border-width-hairline) solid var(--color-border-primary); border-radius: var(--radius-lg); }
.lp-thead { display: flex; align-items: center; gap: var(--space-5); color: var(--color-accent); }
.lp-note { margin: var(--space-6) 0 0; color: var(--color-text-secondary); font: var(--font-weight-regular) var(--font-size-14) / var(--line-height-normal) var(--font-ui); }

/* Farming, on chrome */
.lp-farm { padding: var(--lp-section-pad) 0; background: var(--color-bg-chrome); color: var(--color-text-on-chrome); }
.lp-farmgrid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--lp-col-gap); align-items: start; }
.lp-farm .ds-btn { margin-top: var(--space-8); }
.lp-farmlist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-5); }
.lp-farmlist li { display: flex; gap: var(--space-6); padding: var(--space-7); border-radius: var(--radius-md); border: var(--border-width-hairline) solid var(--color-border-secondary); background: var(--color-bg-chrome); }
.lp-farmlist svg { margin-top: var(--space-1); color: var(--color-accent-on-chrome); flex: none; }
.lp-farmlist b { display: block; font: var(--font-weight-semibold) var(--font-size-16) / var(--line-height-snug) var(--font-ui); }
.lp-farmlist span { display: block; margin-top: var(--space-1); color: var(--color-text-on-chrome-muted); font: var(--font-weight-regular) var(--font-size-14) / var(--line-height-normal) var(--font-ui); }

/* Privacy */
.lp-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8); margin-top: var(--space-8); padding-top: var(--space-8); border-top: var(--border-width-hairline) solid var(--color-border-primary); }
.lp-titem .lp-ficon { margin-bottom: var(--space-5); }

/* FAQ */
.lp-narrow { max-width: var(--lp-narrow-w); }
.lp-faq { margin-top: var(--space-8); border-top: var(--border-width-hairline) solid var(--color-border-primary); }
.lp-faq details { padding: var(--space-1) 0; border-bottom: var(--border-width-hairline) solid var(--color-border-primary); }
.lp-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: var(--space-6); padding: var(--space-6) 0; border-radius: var(--radius-sm); font: var(--font-weight-semibold) var(--font-size-md) / var(--line-height-snug) var(--font-ui); }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; color: var(--color-accent); font: var(--font-weight-regular) var(--font-size-xl) / 1 var(--font-ui); }
.lp-faq details[open] summary::after { content: "\2212"; }
.lp-faq details p { margin: 0 0 var(--space-6); max-width: 46em; }

/* Organisations, closing, footer */
.lp-org { display: flex; justify-content: space-between; align-items: center; gap: var(--space-9); padding: var(--space-9); background: var(--color-bg-surface); border: var(--border-width-hairline) solid var(--color-border-primary); border-radius: var(--radius-lg); }
.lp-org .lp-h2 { font-size: var(--font-size-xl); }
.lp-end { padding: var(--lp-section-pad) 0; background: var(--color-bg-chrome); text-align: center; }
.lp-endin { display: grid; justify-items: center; }
.lp-end .lp-ctas { justify-content: center; }
.lp-foot { padding: var(--space-8) 0; background: var(--color-bg-surface); border-top: var(--border-width-hairline) solid var(--color-border-primary); }
.lp-footin { display: grid; grid-template-columns: 1fr auto; gap: var(--space-6) var(--space-9); align-items: start; }
.lp-meta { margin: var(--space-3) 0 0; color: var(--color-text-secondary); font: var(--font-weight-regular) var(--font-size-14) / var(--line-height-snug) var(--font-ui); }
.lp-sos { margin: 0; color: var(--color-text-primary); font: var(--font-weight-regular) var(--font-size-16) / var(--line-height-snug) var(--font-ui); }
.lp-legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-7); padding-top: var(--space-6); border-top: var(--border-width-hairline) solid var(--color-border-primary); }
.lp-legal a { color: var(--color-text-link); font: var(--font-weight-regular) var(--font-size-14) / var(--line-height-snug) var(--font-ui); }

@media (max-width: 1279px) {
  .lp-desk { display: none; }
  .lp-phone { right: auto; left: 50%; transform: translateX(-50%); }
}

@media (max-width: 1023px) {
  :root { --lp-page-pad: 28px; }
  .lp-nav { display: none; }
  .lp-topacts { margin-left: auto; }
  .lp-herogrid, .lp-farmgrid { grid-template-columns: 1fr; gap: var(--space-9); }
  .lp-mock { height: 420px; max-width: 560px; margin: 0 auto; width: 100%; }
  .lp-frow, .lp-fpair { grid-template-columns: 1fr; gap: var(--space-7); }
  .lp-frow--rev .lp-ftext { order: 0; }
  .lp-steps, .lp-trust { grid-template-columns: 1fr; gap: var(--space-6); }
  .lp-org { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 767px) {
  .lp-topacts .lp-lang { display: none; }
  .lp-lang--foot { display: inline-flex; align-items: center; min-height: var(--min-tap-target); margin-top: var(--space-2); color: var(--color-text-link); font: var(--font-weight-regular) var(--font-size-14) / var(--line-height-snug) var(--font-ui); }
  :root { --lp-page-pad: 16px; --lp-header-h: 60px; --lp-anchor-offset: 76px; }
  .lp-topin { gap: var(--space-5); }
  .lp-topacts { gap: var(--space-1); }
  .lp-topacts .ds-btn { min-height: var(--min-tap-target); padding: 0 var(--space-4); font-size: var(--font-size-14); }
  .lp-lead-more { display: none; }
  .lp-hero { padding: var(--space-9) 0; }
  .lp-h1 { font-size: var(--font-size-3xl); }
  .lp-ctas .ds-btn { width: 100%; }
  :root { --lp-section-pad: 56px; }
  .lp-mock { display: none; }
  .lp-h2 { font-size: var(--font-size-2xl); }
  .lp-two { grid-template-columns: 1fr; }
  .lp-tcard { padding: var(--space-7); }
  .lp-org { padding: var(--space-7) var(--space-6); }
  .lp-footin { grid-template-columns: 1fr; }
}
