/* ==========================================================================
   WB Design System — Layer 2: Semantic Tokens
   Source of truth: .cursor/rules/token-conventions.mdc § Capa 2
   All values MUST reference Layer 1 primitives (--wb-color-*, --wb-spacing-*, etc.)
   NEVER write raw values here — use var(--wb-<primitive>) instead.
   Dark mode: [data-theme="dark"] attribute on the root element.
   Shadow DOM note: CSS custom properties inherit through the Shadow DOM boundary.
   ========================================================================== */

:root {
  /* ── Color / Background ─────────────────────────────────────────────── */
  --wb-color-background-default: var(--wb-color-gray-50); /* background-color: page/app background */

  /* ── Color / Surface ────────────────────────────────────────────────── */
  /* ✅ Use: background-color of cards, panels, hover surfaces               */
  /* ❌ Do not use: text, borders                                           */
  --wb-color-surface-default:   var(--wb-color-gray-100);
  --wb-color-surface-subtle:    var(--wb-color-gray-200);
  --wb-color-surface-muted:     var(--wb-color-gray-300);
  --wb-color-surface-emphasis:  var(--wb-color-gray-400);
  --wb-color-surface-disabled:  var(--wb-color-gray-alpha-10);

  /* ── Color / Action / Primary ───────────────────────────────────────── */
  /* ✅ Use: background-color of buttons/actions per state                  */
  /* ❌ Do not use: shadows, non-interactive borders                        */
  /* Hover uses yellow-400 (L=0.85, delta -0.055 from default L=0.905) for a
     subtle darkening step. Active drops to yellow-600 (L=0.78) for a more
     pronounced press feedback. Previous hover was yellow-600 — too large a jump. */
  --wb-color-action-primary-default:    var(--wb-color-yellow-500);
  --wb-color-action-primary-hover:      var(--wb-color-yellow-400);
  --wb-color-action-primary-active:     var(--wb-color-yellow-600);
  --wb-color-action-primary-focus:      var(--wb-color-yellow-500);
  --wb-color-action-primary-disabled:   var(--wb-color-gray-300);

  /* ── Color / Action / Secondary ─────────────────────────────────────── */
  /* ✅ Use: background-color of buttons/actions per state                  */
  /* ❌ Do not use: shadows, non-interactive borders                        */
  /* blue-600 (oklch 0.510) over blue-500 (oklch 0.600): fixes WCAG 2.1 AA 1.4.3.
     blue-500 with gray-50 text yields ≈3.8:1 (fails); blue-600 yields ≈5.5:1. */
  --wb-color-action-secondary-default:  var(--wb-color-blue-600);
  --wb-color-action-secondary-hover:    var(--wb-color-blue-700);
  --wb-color-action-secondary-active:   var(--wb-color-blue-800);
  --wb-color-action-secondary-focus:    var(--wb-color-blue-600);
  --wb-color-action-secondary-disabled: var(--wb-color-gray-300);

  /* ── Color / Action / Destructive ───────────────────────────────────── */
  /* ✅ Use: background-color of buttons/actions per state                  */
  /* ❌ Do not use: shadows, non-interactive borders                        */
  --wb-color-action-destructive-default:    var(--wb-color-red-500);
  --wb-color-action-destructive-hover:      var(--wb-color-red-600);
  --wb-color-action-destructive-active:     var(--wb-color-red-700);
  --wb-color-action-destructive-focus:      var(--wb-color-red-500);
  --wb-color-action-destructive-disabled:   var(--wb-color-gray-300);

  /* ── Color / Action / Adaptive ──────────────────────────────────────── */
  /* ✅ Use: hover/active fill behind Color/Text/Default (ghost/outline btn) */
  /* ❌ Do not use: primary/secondary solid fills; text; borders             */
  /* Mode-aware AA: light = yellow under gray-950; dark = blue under gray-50.
     Consumed today only by Button ghost/outline hover·active.              */
  --wb-color-action-adaptive-hover:  var(--wb-color-yellow-400);
  --wb-color-action-adaptive-active: var(--wb-color-yellow-600);

  /* ── Color / Feedback ───────────────────────────────────────────────── */
  /* ✅ Use: background-color, color, or border-color for feedback states   */
  /* ❌ Do not use: elevations, shadows                                     */
  --wb-color-feedback-success: var(--wb-color-green-500);
  --wb-color-feedback-error:   var(--wb-color-red-500);
  --wb-color-feedback-warning: var(--wb-color-yellow-500);

  /* ── Color / Text ───────────────────────────────────────────────────── */
  /* ✅ Use: color property on text elements                                     */
  /* ❌ Do not use: backgrounds, borders, or icon fills (use Color/Icon for that) */
  --wb-color-text-default:    var(--wb-color-gray-950);
  --wb-color-text-secondary:  var(--wb-color-gray-700);
  --wb-color-text-muted:      var(--wb-color-gray-500);
  --wb-color-text-disabled:   var(--wb-color-gray-400);
  /* icon or text on dark/colored surfaces — always light regardless of theme */
  --wb-color-text-inverse:    var(--wb-color-gray-50);

  /* Color/Text/Action removed — non-flipping on-fill colors live on Button
     roles (Fixed-dark / Fixed-light → gray primitives). See components.css. */

  /* ── Color / Border ─────────────────────────────────────────────────── */
  /* ✅ Use: border-color, outline-color — borders and outlines             */
  /* ❌ Do not use: backgrounds, text                                       */
  /* border-default → on background; on-surface-* → on surface levels      */
  --wb-color-border-default:                 var(--wb-color-gray-700); /* border-color: standard hairline on page background */
  --wb-color-border-on-surface-default:      var(--wb-color-gray-700); /* border-color: hairline on surface-default */
  --wb-color-border-on-surface-subtle:       var(--wb-color-gray-800); /* border-color: hairline on surface-subtle / surface-muted */
  --wb-color-border-on-surface-strong:       var(--wb-color-gray-800); /* border-color: hairline on surface-emphasis */
  --wb-color-border-on-surface-disabled:     var(--wb-color-gray-alpha-40); /* border-color: inactive hairline on surfaces — no WCAG 1.4.11 promise */
  --wb-color-border-disabled:                var(--wb-color-gray-alpha-10);
  --wb-color-border-focus:                   var(--wb-color-action-primary-focus); /* outline-color: focus ring, all interactive components */

  /* ── Color / Icon ───────────────────────────────────────────────────── */
  /* ✅ Use: fill/color on standalone icons and icon-bearing components     */
  /* ❌ Do not use: text, backgrounds, borders                              */
  /* Same primitives as Color/Text — declared independently (not aliased)  */
  /* so each token is a discrete Figma variable and a discrete semantic     */
  /* concept. wb-icon reads these via the `variant` attribute selector.     */
  --wb-color-icon-default:   var(--wb-color-gray-950);   /* standard icon on default surface */
  --wb-color-icon-secondary: var(--wb-color-gray-700);   /* supporting / secondary-hierarchy icon */
  --wb-color-icon-muted:     var(--wb-color-gray-500);   /* decorative / very low-emphasis icon */
  --wb-color-icon-disabled:  var(--wb-color-gray-400);   /* icon inside a disabled component */
  --wb-color-icon-inverse:   var(--wb-color-gray-50);    /* icon on opposite-contrast surface (e.g. surface-emphasis); gray-950 in dark */
  --wb-color-icon-action:    var(--wb-color-action-primary-default);  /* yellow-500 — interactive standalone icon */
  --wb-color-icon-success:   var(--wb-color-feedback-success);        /* green-500  */
  --wb-color-icon-warning:   var(--wb-color-feedback-warning);        /* yellow-500 */
  --wb-color-icon-error:     var(--wb-color-feedback-error);          /* red-500    */

  /* ── Spacing / Inset (interior padding of components and sections) ──── */
  /* ✅ Use: component padding, section layout padding                      */
  /* ❌ Do not use: space between elements (use stack/inline instead)       */
  --wb-spacing-inset-xs:    var(--wb-spacing-4);    /* padding, gap (4px): extra-small inset for dense UI */
  --wb-spacing-inset-sm:    var(--wb-spacing-8);    /* padding, gap (8px): buttons, badges, chips */
  --wb-spacing-inset-md:    var(--wb-spacing-16);   /* padding, gap (16px): inputs, compact cards */
  --wb-spacing-inset-lg:    var(--wb-spacing-24);   /* padding, gap (24px): cards, panels (responsive: see @media) */
  --wb-spacing-inset-xl:    var(--wb-spacing-32);   /* padding, gap (32px): content sections */
  --wb-spacing-inset-2xl:   var(--wb-spacing-48);   /* padding, gap (48px): main sections */
  --wb-spacing-inset-3xl:   var(--wb-spacing-96);   /* padding, gap (96px): page containers (responsive: see @media) */

  /* ── Spacing / Stack (vertical space between elements, margin-bottom) ── */
  /* ✅ Use: vertical gap in flex-column, margin-bottom between blocks      */
  /* ❌ Do not use: padding (use inset), horizontal space (use inline)      */
  --wb-spacing-stack-xs:    var(--wb-spacing-4);    /* row-gap, margin-bottom (4px): between label and input, icon and text */
  --wb-spacing-stack-sm:    var(--wb-spacing-8);    /* row-gap, margin-bottom (8px): between compact list items */
  --wb-spacing-stack-md:    var(--wb-spacing-16);   /* row-gap, margin-bottom (16px): between form fields */
  --wb-spacing-stack-lg:    var(--wb-spacing-24);   /* row-gap, margin-bottom (24px): between field groups */
  --wb-spacing-stack-xl:    var(--wb-spacing-32);   /* row-gap, margin-bottom (32px): between form sections */
  --wb-spacing-stack-2xl:   var(--wb-spacing-48);   /* row-gap, margin-bottom (48px): between content blocks */
  --wb-spacing-stack-3xl:   var(--wb-spacing-96);   /* row-gap, margin-bottom (96px): between main page sections */

  /* ── Spacing / Inline (horizontal space between elements) ───────────── */
  /* ✅ Use: horizontal gap in flex-row, margin-right between elements      */
  /* ❌ Do not use: padding (use inset), vertical space (use stack)         */
  --wb-spacing-inline-xs:   var(--wb-spacing-4);    /* column-gap, margin-inline (4px): between icon and label in button */
  --wb-spacing-inline-sm:   var(--wb-spacing-8);    /* column-gap, margin-inline (8px): between badge and text */
  --wb-spacing-inline-md:   var(--wb-spacing-16);   /* column-gap, margin-inline (16px): between form columns */
  --wb-spacing-inline-lg:   var(--wb-spacing-24);   /* column-gap, margin-inline (24px): between action groups */
  --wb-spacing-inline-xl:   var(--wb-spacing-32);   /* column-gap, margin-inline (32px): between layout columns */
  --wb-spacing-inline-2xl:  var(--wb-spacing-48);   /* column-gap, margin-inline (48px): between large horizontal blocks */
  --wb-spacing-inline-3xl:  var(--wb-spacing-96);   /* column-gap, margin-inline (96px): extreme spacing (rare — document usage) */

  /* ── Typography / Font Size (semantic, 4 categories) ────────────────── */

  /* Body (line-height: 150%) */
  --wb-font-size-body-xs:      var(--wb-font-size-12);   /* font-size (12px): body extra-small */
  --wb-font-size-body-sm:      var(--wb-font-size-14);   /* font-size (14px): body small */
  --wb-font-size-body-md:      var(--wb-font-size-16);   /* font-size (16px): body medium */
  --wb-font-size-body-lg:      var(--wb-font-size-18);   /* font-size (18px): body large */

  /* Heading (line-height: 120%) */
  --wb-font-size-heading-sm:   var(--wb-font-size-18);   /* font-size (18px): heading small */
  --wb-font-size-heading-md:   var(--wb-font-size-20);   /* font-size (20px): heading medium */
  --wb-font-size-heading-lg:   var(--wb-font-size-24);   /* font-size (24px): heading large */
  --wb-font-size-heading-xl:   var(--wb-font-size-32);   /* font-size (32px): heading extra-large */

  /* Display (line-height: 100%) — base: mobile                            */
  /* ✅ Use: KPIs, hero numbers, marketing page titles                      */
  /* ❌ Do not use: content headings (use heading-*), body, labels          */
  /* → At LG: display-lg=64px, display-xl=96px (responsive: see @media)   */
  --wb-font-size-display-sm:   var(--wb-font-size-24);   /* mobile base */
  --wb-font-size-display-md:   var(--wb-font-size-32);   /* mobile base */
  --wb-font-size-display-lg:   var(--wb-font-size-40);   /* mobile base → 48@md → 64@lg */
  --wb-font-size-display-xl:   var(--wb-font-size-48);   /* mobile base → 64@md → 96@lg */

  /* Label (line-height: 140%) */
  --wb-font-size-label-xs:     var(--wb-font-size-10);   /* font-size (10px): label extra-small */
  --wb-font-size-label-sm:     var(--wb-font-size-12);   /* font-size (12px): label small */
  --wb-font-size-label-md:     var(--wb-font-size-14);   /* font-size (14px): label medium */
  --wb-font-size-label-lg:     var(--wb-font-size-16);   /* font-size (16px): label large */

  /* ── Typography / Line Height ───────────────────────────────────────── */
  --wb-line-height-body-xs:    var(--wb-line-height-150); /* line-height (1.5): body extra-small */
  --wb-line-height-body-sm:    var(--wb-line-height-150); /* line-height (1.5): body small */
  --wb-line-height-body-md:    var(--wb-line-height-150); /* line-height (1.5): body medium */
  --wb-line-height-body-lg:    var(--wb-line-height-150); /* line-height (1.5): body large */
  --wb-line-height-heading-sm: var(--wb-line-height-120); /* line-height (1.2): heading small */
  --wb-line-height-heading-md: var(--wb-line-height-120); /* line-height (1.2): heading medium */
  --wb-line-height-heading-lg: var(--wb-line-height-120); /* line-height (1.2): heading large */
  --wb-line-height-heading-xl: var(--wb-line-height-120); /* line-height (1.2): heading extra-large */
  --wb-line-height-display-sm: var(--wb-line-height-100); /* line-height (1.0): display small */
  --wb-line-height-display-md: var(--wb-line-height-100); /* line-height (1.0): display medium */
  --wb-line-height-display-lg: var(--wb-line-height-100); /* line-height (1.0): display large */
  --wb-line-height-display-xl: var(--wb-line-height-100); /* line-height (1.0): display extra-large */
  --wb-line-height-label-xs:   var(--wb-line-height-140); /* line-height (1.4): label extra-small */
  --wb-line-height-label-sm:   var(--wb-line-height-140); /* line-height (1.4): label small */
  --wb-line-height-label-md:   var(--wb-line-height-140); /* line-height (1.4): label medium */
  --wb-line-height-label-lg:   var(--wb-line-height-140); /* line-height (1.4): label large */

  /* ── Typography / Font Family ───────────────────────────────────────── */
  /* ✅ Use body for paragraphs, heading for titles, display for KPIs      */
  /* ❌ Do not use numbers for prose — only for amounts/tabular codes       */
  --wb-font-family-body:    var(--wb-font-family-sans);
  --wb-font-family-heading: var(--wb-font-family-sans);
  --wb-font-family-display: var(--wb-font-family-sans);
  --wb-font-family-numbers: var(--wb-font-family-mono);

  /* ── Typography / Font Weight ───────────────────────────────────────── */
  --wb-font-weight-body:     var(--wb-font-weight-400); /* font-weight (400): body text */
  --wb-font-weight-emphasis: var(--wb-font-weight-500); /* font-weight (500): labels, badges */
  --wb-font-weight-heading:  var(--wb-font-weight-700); /* font-weight (700): headings */
  --wb-font-weight-display:  var(--wb-font-weight-900); /* font-weight (900): display text */

  /* ── Typography / Letter Spacing ────────────────────────────────────── */
  --wb-letter-spacing-display: var(--wb-letter-spacing-100);  /* -1% */
  --wb-letter-spacing-heading: var(--wb-letter-spacing-200);  /*  0% */
  --wb-letter-spacing-body:    var(--wb-letter-spacing-200);  /*  0% */
  --wb-letter-spacing-label:   var(--wb-letter-spacing-200);  /*  0% */
  --wb-letter-spacing-numbers: var(--wb-letter-spacing-200);  /*  0% */

  /* ── Borders / Border Radius ────────────────────────────────────────── */
  /* ✅ Use the correct semantic token for each component                   */
  /* ❌ Do not use raw px values or primitive tokens directly               */
  /* Figma collection Shape (modes Default / Sharpened / Rounded).          */
  /* Global flip: [data-shape="sharpened|rounded"] on an ancestor (like     */
  /* [data-theme="dark"]). Button uses --wb-button-border-radius (own row). */
  --wb-border-radius-none:      var(--wb-border-radius-0);
  --wb-border-radius-tag:       var(--wb-border-radius-100);   /*  4px — chips, tags */
  --wb-border-radius-component: var(--wb-border-radius-200);   /*  6px — inputs, default controls */
  --wb-border-radius-card:      var(--wb-border-radius-300);   /*  8px — cards, panels */
  --wb-border-radius-modal:     var(--wb-border-radius-400);   /* 12px — modals, drawers */
  --wb-border-radius-pill:      var(--wb-border-radius-full);  /* pill — badges / button Rounded */

  /* ── Borders / Border Width ─────────────────────────────────────────── */
  --wb-border-width-default: var(--wb-border-width-100);    /* 1px */
  --wb-border-width-medium:   var(--wb-border-width-200);    /* 2px */
  --wb-border-width-strong:  var(--wb-border-width-300);    /* 4px */

  /* ── Elevation — color aliases (mode-aware) ─────────────────────────── */
  /* ✅ Use: card shadows, modals, tooltips                                 */
  /* ❌ Do not use: borders (use border-color), backgrounds (use surface-*) */
  /* Light mode default — semantic alias points to the 950 primitive set   */
  --wb-color-elevation-subtle:  var(--wb-color-elevation-950-subtle);
  --wb-color-elevation-default: var(--wb-color-elevation-950-default);
  --wb-color-elevation-strong:  var(--wb-color-elevation-950-strong);

  /* ── Elevation — composite box-shadow aliases ────────────────────────── */
  /* Geometry from Capa 1 primitives; color flips automatically per mode.  */
  /* Sm=level 1 (1 layer) · Default=level 2 · Md=3 · Lg=4 · Xl=5 · 2Xl=6 */
  --wb-elevation-none:    none;
  --wb-elevation-sm:      var(--wb-elevation-offset-x) var(--wb-elevation-1-offset-y)
                          var(--wb-elevation-1-blur) var(--wb-elevation-1-spread)
                          var(--wb-color-elevation-subtle);
  --wb-elevation-default: var(--wb-elevation-offset-x) var(--wb-elevation-2-l1-offset-y)
                          var(--wb-elevation-2-l1-blur) var(--wb-elevation-2-l1-spread)
                          var(--wb-color-elevation-default),
                          var(--wb-elevation-offset-x) var(--wb-elevation-2-l2-offset-y)
                          var(--wb-elevation-2-l2-blur) var(--wb-elevation-2-l2-spread)
                          var(--wb-color-elevation-default);
  --wb-elevation-md:      var(--wb-elevation-offset-x) var(--wb-elevation-3-l1-offset-y)
                          var(--wb-elevation-3-l1-blur) var(--wb-elevation-3-l1-spread)
                          var(--wb-color-elevation-default),
                          var(--wb-elevation-offset-x) var(--wb-elevation-3-l2-offset-y)
                          var(--wb-elevation-3-l2-blur) var(--wb-elevation-3-l2-spread)
                          var(--wb-color-elevation-default);
  --wb-elevation-lg:      var(--wb-elevation-offset-x) var(--wb-elevation-4-l1-offset-y)
                          var(--wb-elevation-4-l1-blur) var(--wb-elevation-4-l1-spread)
                          var(--wb-color-elevation-default),
                          var(--wb-elevation-offset-x) var(--wb-elevation-4-l2-offset-y)
                          var(--wb-elevation-4-l2-blur) var(--wb-elevation-4-l2-spread)
                          var(--wb-color-elevation-default);
  --wb-elevation-xl:      var(--wb-elevation-offset-x) var(--wb-elevation-5-l1-offset-y)
                          var(--wb-elevation-5-l1-blur) var(--wb-elevation-5-l1-spread)
                          var(--wb-color-elevation-default),
                          var(--wb-elevation-offset-x) var(--wb-elevation-5-l2-offset-y)
                          var(--wb-elevation-5-l2-blur) var(--wb-elevation-5-l2-spread)
                          var(--wb-color-elevation-default);
  --wb-elevation-2xl:     var(--wb-elevation-offset-x) var(--wb-elevation-6-offset-y)
                          var(--wb-elevation-6-blur) var(--wb-elevation-6-spread)
                          var(--wb-color-elevation-strong);

  /* ── Motion / Duration ─────────────────────────────────────────────────── */
  /* ✅ Use: animation-duration, transition-duration                         */
  /* ❌ Do not use: component-layer --wb-spinner-* duration tokens           */
  /* Theme-independent — single mode (Figma collection `Motion`, mode Value). */
  /* Declared in :root only — no [data-theme="dark"] / @media overrides.    */
  --wb-motion-duration-fast:    var(--wb-duration-200);  /* 200ms — micro interactions */
  --wb-motion-duration-default: var(--wb-duration-300);  /* 300ms — standard transitions */
  --wb-motion-duration-slow:    var(--wb-duration-1000); /* 1000ms — continuous spin / long motion */
}

/* ==========================================================================
   Dark mode — only tokens that change value
   Uses [data-theme="dark"] instead of .dark for Shadow DOM compatibility.
   The host consumer is responsible for propagating the attribute to the root.
   ========================================================================== */
[data-theme="dark"] {
  /* Elevation colors flip to the 50 primitive set (white-based shadows)  */
  --wb-color-elevation-subtle:  var(--wb-color-elevation-50-subtle);
  --wb-color-elevation-default: var(--wb-color-elevation-50-default);
  --wb-color-elevation-strong:  var(--wb-color-elevation-50-strong);

  --wb-color-background-default: var(--wb-color-gray-950);
  --wb-color-surface-default:    var(--wb-color-gray-900);
  --wb-color-surface-subtle:     var(--wb-color-gray-800);
  --wb-color-surface-muted:      var(--wb-color-gray-700);
  --wb-color-surface-emphasis:   var(--wb-color-gray-600);

  --wb-color-text-default:    var(--wb-color-gray-50);
  --wb-color-text-secondary:  var(--wb-color-gray-300);
  --wb-color-text-muted:      var(--wb-color-gray-500);
  --wb-color-text-disabled:   var(--wb-color-gray-600);
  --wb-color-text-inverse:    var(--wb-color-gray-950);

  /* Icon — same ramp as text, declared independently */
  --wb-color-icon-default:   var(--wb-color-gray-50);
  --wb-color-icon-secondary: var(--wb-color-gray-300);
  --wb-color-icon-disabled:  var(--wb-color-gray-600);
  --wb-color-icon-inverse:   var(--wb-color-gray-950);
  /* muted (gray-500), action, success, warning, error — idem light, no override */

  --wb-color-border-default:             var(--wb-color-gray-200);
  --wb-color-border-on-surface-default:  var(--wb-color-gray-200);
  --wb-color-border-on-surface-subtle:   var(--wb-color-gray-200);
  --wb-color-border-on-surface-strong:   var(--wb-color-gray-900);
  /* on-surface-disabled → gray-alpha-40 — idem light, no override */

  --wb-color-action-primary-hover:       var(--wb-color-yellow-400);
  --wb-color-action-primary-active:      var(--wb-color-yellow-300);
  /* Dark mode shifts one step lighter for hover feedback on dark backgrounds,
     but keeps blue-600 as default to maintain ≥4.5:1 contrast with gray-50 text. */
  --wb-color-action-secondary-default:   var(--wb-color-blue-600);
  --wb-color-action-secondary-hover:     var(--wb-color-blue-500);
  --wb-color-action-secondary-active:    var(--wb-color-blue-400);
  --wb-color-action-destructive-default: var(--wb-color-red-400);
  --wb-color-action-destructive-hover:   var(--wb-color-red-300);
  --wb-color-action-destructive-active:  var(--wb-color-red-200);
  /* Adaptive fills under Color/Text/Default — AA with gray-50 (≥4.5:1).
     blue-600 ≈5.5:1; blue-700 darker pressed step. blue-500 fails (~3.8:1). */
  --wb-color-action-adaptive-hover:  var(--wb-color-blue-600);
  --wb-color-action-adaptive-active: var(--wb-color-blue-700);
}

/* ==========================================================================
   Shape modes — Figma collection Shape (Default / Sharpened / Rounded)
   Set [data-shape] on an ancestor (same pattern as [data-theme]).
   Button uses --wb-button-border-radius (components.css); local
   :host([rounded]|[sharpened]) overrides that token only.
   ========================================================================== */
[data-shape="sharpened"] {
  --wb-border-radius-none:      var(--wb-border-radius-0);
  --wb-border-radius-tag:       var(--wb-border-radius-0);
  --wb-border-radius-component: var(--wb-border-radius-0);
  --wb-border-radius-card:      var(--wb-border-radius-0);
  --wb-border-radius-modal:     var(--wb-border-radius-0);
  --wb-border-radius-pill:      var(--wb-border-radius-0);
  --wb-button-border-radius:    var(--wb-border-radius-none);
}

[data-shape="rounded"] {
  --wb-border-radius-none:      var(--wb-border-radius-0);
  --wb-border-radius-tag:       var(--wb-border-radius-300);   /*  8px */
  --wb-border-radius-component: var(--wb-border-radius-400);   /* 12px */
  --wb-border-radius-card:      var(--wb-border-radius-500);   /* 16px */
  --wb-border-radius-modal:     var(--wb-border-radius-700);   /* 24px */
  --wb-border-radius-pill:      var(--wb-border-radius-full);
  --wb-button-border-radius:    var(--wb-border-radius-pill);
}

/* ==========================================================================
   Responsive — Breakpoints
   Only overrides tokens that change at each breakpoint.
   Figma collection: Layout (modes: Base / Md / Lg)
   ========================================================================== */

/* Md ≥ 768px */
@media (min-width: 768px) {
  :root {
    /* Inset */
    --wb-spacing-inset-lg:  var(--wb-spacing-32);
    --wb-spacing-inset-xl:  var(--wb-spacing-40);
    --wb-spacing-inset-2xl: var(--wb-spacing-96);
    --wb-spacing-inset-3xl: var(--wb-spacing-160);

    /* Stack — steps up at MD for large sections */
    --wb-spacing-stack-2xl: var(--wb-spacing-96);
    --wb-spacing-stack-3xl: var(--wb-spacing-160);

    /* Inline — same step as stack */
    --wb-spacing-inline-2xl: var(--wb-spacing-96);
    --wb-spacing-inline-3xl: var(--wb-spacing-160);

    /* Display — steps up one scale */
    --wb-font-size-display-sm: var(--wb-font-size-32);
    --wb-font-size-display-md: var(--wb-font-size-40);
    --wb-font-size-display-lg: var(--wb-font-size-48);
    --wb-font-size-display-xl: var(--wb-font-size-64);
  }
}

/* Lg ≥ 1024px */
@media (min-width: 1024px) {
  :root {
    /* Inset */
    --wb-spacing-inset-lg:  var(--wb-spacing-40);
    --wb-spacing-inset-xl:  var(--wb-spacing-48);
    --wb-spacing-inset-3xl: var(--wb-spacing-320);

    /* Stack */
    --wb-spacing-stack-3xl: var(--wb-spacing-320);

    /* Inline */
    --wb-spacing-inline-3xl: var(--wb-spacing-320);

    /* Display — maximum sizes */
    --wb-font-size-display-sm: var(--wb-font-size-40);
    --wb-font-size-display-md: var(--wb-font-size-48);
    --wb-font-size-display-lg: var(--wb-font-size-64);
    --wb-font-size-display-xl: var(--wb-font-size-96);
  }
}
