/* =====================================================================
 * freebeat.ai — Color + Type Foundations
 *
 * THREE SOURCES OF TRUTH, in priority order:
 *   1. FB - UI.fig  (the actually-implemented product UI)
 *      → wins for surfaces, buttons, page bgs, real component values.
 *        Authoritative for anything that ships. See UI-FIG-TRUTH.md.
 *   2. FB - Design System.fig  (style frames — abstract ramps)
 *      → wins for spacing, radius, elevation, blur, breakpoints, and
 *        the systemic ramps that don't ship as a single value. See FIG-TRUTH.md.
 *   3. FB - Brand Guidelines.pptx  (brand deck)
 *      → wins for the brand contract (Neon Pulse gradient, brand-name
 *        accent contracts). Aspirational values not implemented in the UI
 *        (e.g. #191B1F Background-Dark) are tracked but not used. See PPTX-TRUTH.md.
 *
 * Concrete reconciliations:
 *   • Surface ramp: --surface-s0..s5 maps to the UI-fig hex values
 *     (#0A0C11 / #111318 / #15171E / #1B202A / #292D37 / #333941),
 *     NOT the PPTX hexes (which include #191B1F that never shipped).
 *   • --on-brand-primary = #0A0C11 (matches the UI 1:1, 521× in fig).
 *   • Brand primary (#3CFF52), mint (#38D9A8), blue (#4259FF), lavender
 *     (#7182FF) all agree across all three sources.
 *
 * Spacing, radius, elevation, blur, breakpoints live in tokens.css.
 * ===================================================================== */

/* Imports must come before every other rule, or browsers drop them.
 * fig-themes.css: every FB - Design System / FB - UI fig variable, all modes (data-fb-* switches). */
@import url('./fig-themes.css');

/* ---------- WEBFONTS ---------------------------------------------------
 * Single brand face: Google Sans Flex (variable + statics, bundled).
 * --------------------------------------------------------------------- */
/* JetBrains Mono: fig `body_font_2`, the canonical mono, bundled (Latin, variable weight, OFL).
   Never an external @import here: a blocked font host then fails Vite's CSS preload and the app never boots. */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('./fonts/JetBrainsMono-latin-wght.woff2') format('woff2-variations');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}
/* Full variable face — exposes wght / wdth / opsz / slnt / GRAD / ROND axes.
   Prefer this file over the 5-axis legacy Variable.ttf; same family name so
   callers automatically pick this up. */
@font-face {
  font-family: 'Google Sans Flex';
  src: url('./fonts/GoogleSansFlex-VariableFont_GRAD_ROND_opsz_slnt_wdth_wght.ttf') format('truetype-variations'),
       url('./fonts/GoogleSansFlex-VariableFont_GRAD_ROND_opsz_slnt_wdth_wght.ttf') format('truetype'),
       url('./fonts/GoogleSansFlex-Variable.ttf') format('truetype-variations'),
       url('./fonts/GoogleSansFlex-Variable.ttf') format('truetype');
  font-weight: 100 1000;
  font-stretch: 25% 151%;
  font-style: oblique -10deg 0deg;
  font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex';
  src: url('./fonts/GoogleSansFlex-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex';
  src: url('./fonts/GoogleSansFlex-Medium.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex';
  src: url('./fonts/GoogleSansFlex-SemiBold.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex';
  src: url('./fonts/GoogleSansFlex-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}


:root, [data-fb-theme], [data-fb-primitives], [data-fb-color-type], [data-fb-radius], [data-fb-space], [data-fb-font], [data-fb-typography] {
  /* ===================================================================
   * COLOR / BLACK — 14 alpha steps (fig Color/Black)
   * ================================================================= */
  --color-black-6:    rgba(0,0,0,0.06);   /* #0000000F */
  --color-black-9:    rgba(0,0,0,0.09);   /* #00000017 */
  --color-black-12:   rgba(0,0,0,0.12);   /* #0000001F */
  --color-black-18:   rgba(0,0,0,0.18);   /* #0000002E */
  --color-black-24:   rgba(0,0,0,0.24);   /* #0000003D */
  --color-black-32:   rgba(0,0,0,0.32);   /* #00000052 */
  --color-black-40:   rgba(0,0,0,0.40);   /* #00000066 */
  --color-black-48:   rgba(0,0,0,0.48);   /* #0000007A */
  --color-black-56:   rgba(0,0,0,0.56);   /* #0000008F */
  --color-black-64:   rgba(0,0,0,0.64);   /* #000000A3 */
  --color-black-72:   rgba(0,0,0,0.72);   /* #000000B8 */
  --color-black-80:   rgba(0,0,0,0.80);   /* #000000CC */
  --color-black-88:   rgba(0,0,0,0.88);   /* #000000E0 */
  --color-black-100:  #000000;

  /* ===================================================================
   * COLOR / WHITE — 14 alpha steps (fig Color/White)
   * ================================================================= */
  --color-white-6:    rgba(255,255,255,0.06);   /* #FFFFFF0F */
  --color-white-9:    rgba(255,255,255,0.09);   /* #FFFFFF17 */
  --color-white-12:   rgba(255,255,255,0.12);   /* #FFFFFF1F */
  --color-white-18:   rgba(255,255,255,0.18);   /* #FFFFFF2E */
  --color-white-24:   rgba(255,255,255,0.24);   /* #FFFFFF3D */
  --color-white-32:   rgba(255,255,255,0.32);   /* #FFFFFF52 */
  --color-white-40:   rgba(255,255,255,0.40);   /* #FFFFFF66 */
  --color-white-48:   rgba(255,255,255,0.48);   /* #FFFFFF7A */
  --color-white-56:   rgba(255,255,255,0.56);   /* #FFFFFF8F */
  --color-white-64:   rgba(255,255,255,0.64);   /* #FFFFFFA3 */
  --color-white-72:   rgba(255,255,255,0.72);   /* #FFFFFFB8 */
  --color-white-80:   rgba(255,255,255,0.80);   /* #FFFFFFCC */
  --color-white-88:   rgba(255,255,255,0.88);   /* #FFFFFFE0 */
  --color-white-100:  #FFFFFF;

  /* Transparent (fig Transparent group) */
  --color-transparent-black: rgba(0,0,0,0);
  --color-transparent-white: rgba(255,255,255,0);

  /* ===================================================================
   * BRAND — Brand blue (PRIMARY brand color, fig Brand/Brand blue)
   * ================================================================= */
  --brand-blue-100:    #ECEEFF;
  --brand-blue-200:    #D0D6FF;
  --brand-blue-300:    #B3BDFF;
  --brand-blue-400:    #7B8BFF;
  --brand-blue-500:    #4259FF;          /* base */
  --brand-blue-500-a1: rgba(66,89,255,0.12);  /* #4259FF1F */
  --brand-blue-500-a2: rgba(66,89,255,0.20);  /* #4259FF33 */
  --brand-blue-500-a3: rgba(66,89,255,0.24);  /* #4259FF3D */
  --brand-blue-500-a4: rgba(66,89,255,0.40);  /* #4259FF66 */
  --brand-blue-500-a5: rgba(66,89,255,0.56);  /* #4259FF8F */
  --brand-blue-600:    #3B50E6;
  --brand-blue-700:    #283599;
  --brand-blue-800:    #1E2873;
  --brand-blue-900:    #141B4D;
  --brand-blue-950:    #121742;
  --brand-blue:        var(--brand-blue-500);
  /* Text-on-brand-blue (fig: White/100 + White/72) */
  --on-brand-blue-primary: var(--fig-theme-text-and-icon-primary-on-primary, var(--color-white-100));
  --on-brand-blue-secondary:  var(--color-white-72);

  /* BRAND / Atomize — fig duplicates Brand blue under "Atomize" name (alias group) */
  --brand-atomize-100: var(--brand-blue-100);
  --brand-atomize-200: var(--brand-blue-200);
  --brand-atomize-300: var(--brand-blue-300);
  --brand-atomize-400: var(--brand-blue-400);
  --brand-atomize-500: var(--brand-blue-500);
  --brand-atomize-600: var(--brand-blue-600);
  --brand-atomize-700: var(--brand-blue-700);
  --brand-atomize-800: var(--brand-blue-800);
  --brand-atomize-900: var(--brand-blue-900);
  --brand-atomize-950: var(--brand-blue-950);

  /* BRAND — green (fig Brand/green) — chartreuse-electric */
  --brand-green-100:    #F2FFC4;
  --brand-green-200:    #E0FF90;
  --brand-green-300:    #C2FF50;
  --brand-green-400:    #ABF830;
  --brand-green-500:    #8EE600;          /* base */
  --brand-green-500-a1: rgba(142,230,0,0.12);
  --brand-green-500-a2: rgba(142,230,0,0.20);
  --brand-green-500-a3: rgba(142,230,0,0.24);
  --brand-green-500-a4: rgba(142,230,0,0.40);
  --brand-green-500-a5: rgba(142,230,0,0.56);
  --brand-green-600:    #62B800;
  --brand-green-700:    #438B00;
  --brand-green-800:    #326D07;
  --brand-green-900:    #2B5C0B;
  --brand-green-950:    #173400;
  --brand-green:        var(--brand-green-500);
  /* Text-on-brand-green (fig: Black/100 + Black/72) */
  --on-brand-green-primary:    var(--color-black-100);
  --on-brand-green-secondary:  var(--color-black-72);

  /* BRAND — yellow (fig Brand/yellow) */
  --brand-yellow-100:    #FCFFDC;
  --brand-yellow-200:    #FCFFBC;
  --brand-yellow-300:    #FEFFA6;
  --brand-yellow-400:    #FFFB7A;
  --brand-yellow-500:    #FFF360;          /* base */
  --brand-yellow-500-a1: rgba(255,243,96,0.12);
  --brand-yellow-500-a2: rgba(255,243,96,0.20);
  --brand-yellow-500-a3: rgba(255,243,96,0.24);
  --brand-yellow-500-a4: rgba(255,243,96,0.40);
  --brand-yellow-500-a5: rgba(255,243,96,0.56);
  --brand-yellow-600:    #FFDE29;
  --brand-yellow-700:    #F2B701;
  --brand-yellow-800:    #C78F0E;
  --brand-yellow-900:    #AA7414;
  --brand-yellow-950:    #633E05;
  --brand-yellow:        var(--brand-yellow-500);
  /* Text-on-brand-yellow (fig: Black/100 + Black/72 ; success-pair uses White) */
  --on-brand-yellow-primary:    var(--color-black-100);
  --on-brand-yellow-secondary:  var(--color-black-72);

  /* ===================================================================
   * BRAND — neon (the actual product UI palette, FB-UI.fig)
   * The UI ships with electric neon green/mint as the primary action
   * color, NOT the chartreuse #8EE600 declared in the system fig.
   * Use --brand-neon-* on product surfaces to match shipped UI.
   * Use --brand-green-* (chartreuse) for marketing/system specs.
   * ================================================================= */
  --brand-neon-100:    #E2FFE6;
  --brand-neon-200:    #B8FFC2;
  --brand-neon-300:    #7DFF94;
  --brand-neon-400:    #3CFF52;          /* base — the canonical hero green */
  --brand-neon-500:    #23FF65;          /* alt fill, slightly more saturated */
  --brand-neon-400-a1: rgba(60,255,82,0.12);
  --brand-neon-400-a2: rgba(60,255,82,0.20);
  --brand-neon-400-a3: rgba(60,255,82,0.30);
  --brand-neon-400-a4: rgba(60,255,82,0.45);
  --brand-neon-400-a5: rgba(60,255,82,0.60);
  --brand-neon-600:    #28C73F;
  --brand-neon-700:    #1E9E32;
  --brand-neon-800:    #157923;
  --brand-neon-900:    #0E5418;
  --brand-neon-glow:   rgba(71,197,59,0.45);   /* 4px 20px glow seen in fig */
  --brand-neon:        var(--brand-neon-400);

  /* ===================================================================
   * CANONICAL BRAND TOKENS (PPTX slide 6)
   *
   * The PPTX brand guide names FOUR brand colors. Refer to these
   * names in product code instead of the systemic --brand-blue-* /
   * --brand-neon-* scales — those scales remain as ramp-building
   * material but the names below are the contract with the brand.
   * ================================================================= */
  --brand-primary: var(--fig-theme-primary-green, #3CFF52);   /* PPTX "Secondary" — hero neon green */
  --brand-accent-mint: var(--fig-theme-primary-green-soft, #38D9A8);   /* PPTX "Accent" — mid-gradient mint */
  --brand-accent-blue: var(--fig-theme-primary-blue, #4259FF);   /* PPTX "Accent" — CTA / focus blue */
  --brand-accent-lavender: var(--fig-theme-primary-blue-soft, #7182FF);   /* gradient end-stop (PPTX slide 7) */

  /* Text-on-brand contracts (UI-fig: actual #0A0C11 is used 521× as text-on-neon) */
  --on-brand-primary:     #0A0C11;   /* text on #3CFF52 (UI-fig actual value) */
  --on-brand-mint:        #07221A;   /* near-black on #38D9A8 */
  --on-brand-blue:        #FFFFFF;   /* white on #4259FF */

  /* Mint sibling — also drawn from UI fig (#38D9A8, #23FFBD) */
  --brand-mint-400:    #38D9A8;
  --brand-mint-500:    #23FFBD;
  --brand-mint:        var(--brand-mint-400);

  /* Lavender — PPTX gradient end-stop + UI-fig 283× use (#7182FF). Close to
     but DISTINCT from --brand-blue-400 (#7B8BFF) which is the fig Brand/blue
     systemic stop. Always reach for --brand-accent-lavender on product. */
  --brand-lavender:    #7182FF;

  /* Legacy aliases — keep prior token names compiling */
  --brand-blue-soft:   var(--brand-accent-lavender);   /* old name for lavender (#7182FF) */

  /* Legacy heritage accents (kept for older mocks; new code → brand-neon-*) */
  --brand-green-legacy: var(--brand-neon-400);
  --brand-mint-legacy:  var(--brand-mint-400);

  /* ===================================================================
   * THEME 2 — Warm-tone (fig "🌈 Theme" alternate mode)
   *
   * The fig declares a second theme mode using warm-toned grays + a
   * more vivid success green. Carried here so designs can opt into it
   * (apply `data-theme="warm"` at the root). Currently NOT the default
   * shipped theme.
   *
   * Values sourced from FB - Design System.fig variable graph (openfig
   * extraction, 2026-05-25):
   *   --warm-s0  #1E1C1B  warm base (replaces #0A0C11)
   *   --warm-s1  #282624  warm panel
   *   --warm-s2  #47443E  warm card-raised
   *   --success-vivid  #00D627  alt theme primary success
   * ================================================================= */
  --warm-s0:           #1E1C1B;
  --warm-s1:           #282624;
  --warm-s2:           #47443E;
  --success-vivid:     #00D627;

  /* ===================================================================
   * BRAND — Project Y sub-brand (fig "Brand/Project — Y")
   *
   * Secondary product family using a magenta/purple palette. Distinct
   * from Project X (chartreuse #8EE600). Surfaces hexes from the fig
   * variable graph — full 100→950 scale carried for product use.
   * Use --brand-magenta-* on Project Y surfaces; on the default
   * (Project X / freebeat-flagship) palette these stay unused.
   * ================================================================= */
  --brand-magenta-100:   #FFE4F7;
  --brand-magenta-200:   #FFC2EB;
  --brand-magenta-300:   #FF8FD9;
  --brand-magenta-400:   #FF52BD;
  --brand-magenta-500:   #E63CFF;       /* base — Project Y primary */
  --brand-magenta-500-a1: rgba(230,60,255,0.12);
  --brand-magenta-500-a2: rgba(230,60,255,0.20);
  --brand-magenta-500-a3: rgba(230,60,255,0.24);
  --brand-magenta-500-a4: rgba(230,60,255,0.40);
  --brand-magenta-500-a5: rgba(230,60,255,0.56);
  --brand-magenta-600:   #C939E6;
  --brand-magenta-700:   #9C2EB8;
  --brand-magenta-800:   #722085;
  --brand-magenta-900:   #4F1859;
  --brand-magenta-950:   #2D0E33;
  --brand-magenta:       var(--brand-magenta-500);

  /* Purple sibling — the cooler half of Project Y */
  --brand-purple-100:    #ECE0FF;
  --brand-purple-200:    #D4B8FF;
  --brand-purple-300:    #B388FF;
  --brand-purple-400:    #9159FF;
  --brand-purple-500:    #7A33E8;       /* base */
  --brand-purple-600:    #6428C7;
  --brand-purple-700:    #4F1F9C;
  --brand-purple-800:    #3A1873;
  --brand-purple-900:    #251049;
  --brand-purple-950:    #15082A;
  --brand-purple:        var(--brand-purple-500);

  /* Text-on-magenta / on-purple */
  --on-brand-magenta:    var(--color-white-100);
  --on-brand-purple:     var(--color-white-100);

  /* ===================================================================
   * COLOR / DANGER (fig Color/Danger)
   * ================================================================= */
  --danger-50:     #FFF3F2;
  --danger-100:    #FFE4E1;
  --danger-200:    #FFC7C2;
  --danger-300:    #FF9A90;
  --danger-400:    #FF6B5D;
  --danger-500:    #ED4030;
  --danger-500-a1: rgba(237,64,48,0.12);
  --danger-500-a2: rgba(237,64,48,0.20);
  --danger-500-a3: rgba(237,64,48,0.24);
  --danger-500-a4: rgba(237,64,48,0.40);
  --danger-500-a5: rgba(237,64,48,0.56);
  --danger-600:    #DF2917;
  --danger-700:    #BA1E0F;
  --danger-800:    #A1120B;
  --danger-900:    #800E08;
  --danger-950:    #4B0300;

  /* ===================================================================
   * COLOR / DARK (fig Color/Dark — separate from Gray, charcoal scale)
   * ================================================================= */
  --dark-100:    #F4F4F4;
  --dark-200:    #EEEEEE;
  --dark-300:    #E1E1E1;
  --dark-400:    #C7C7C7;
  --dark-500:    #3A3A3A;
  --dark-500-a1: rgba(58,58,58,0.10);
  --dark-500-a2: rgba(58,58,58,0.18);
  --dark-500-a3: rgba(58,58,58,0.24);
  --dark-500-a4: rgba(58,58,58,0.36);
  --dark-500-a5: rgba(58,58,58,0.52);
  --dark-600:    #2E2E2E;
  --dark-700:    #242424;
  --dark-800:    #1A1A1A;
  --dark-900:    #151515;
  --dark-950:    #0A0A0A;

  /* ===================================================================
   * COLOR / GRAY (fig Color/Gray — used for surface ramp s0..s5)
   * ================================================================= */
  --gray-50:     #F9F9FA;
  --gray-100:    #F2F2F4;
  --gray-200:    #ECECF0;
  --gray-300:    #DDDFE4;
  --gray-400:    #C3C6CC;
  --gray-500:    #AFB3BB;
  --gray-600:    #8C929C;
  --gray-700:    #5B616D;
  --gray-800:    #333941;
  --gray-900:    #1B202A;
  --gray-950:    #0A0C11;

  /* ===================================================================
   * COLOR / INFO (fig Color/Info)
   * ================================================================= */
  --info-50:     #EFFAFF;
  --info-100:    #DFF3FF;
  --info-200:    #B8EAFF;
  --info-300:    #78DAFF;
  --info-400:    #18C1FF;
  --info-500:    #06B1F1;
  --info-500-a1: rgba(6,177,241,0.12);
  --info-500-a2: rgba(6,177,241,0.20);
  --info-500-a3: rgba(6,177,241,0.24);
  --info-500-a4: rgba(6,177,241,0.40);
  --info-500-a5: rgba(6,177,241,0.56);
  --info-600:    #008ECE;
  --info-700:    #0071A7;
  --info-800:    #025F8A;
  --info-900:    #084F72;
  --info-950:    #06324B;

  /* ===================================================================
   * COLOR / SUCCESS (fig Color/Success — distinct from Brand/green)
   * ================================================================= */
  --success-50:     #F4FAF3;
  --success-100:    #E3F6E2;
  --success-200:    #C8EBC7;
  --success-300:    #9CDA9B;
  --success-400:    #69C068;
  --success-500:    #409B3F;
  --success-500-a1: rgba(64,155,63,0.12);
  --success-500-a2: rgba(64,155,63,0.20);
  --success-500-a3: rgba(64,155,63,0.24);
  --success-500-a4: rgba(64,155,63,0.40);
  --success-500-a5: rgba(64,155,63,0.56);
  --success-600:    #338732;
  --success-700:    #2C6A2B;
  --success-800:    #265526;
  --success-900:    #214622;
  --success-950:    #0D260E;

  /* ===================================================================
   * COLOR / WARNING (fig Color/Warning)
   * ================================================================= */
  --warning-50:     #FFFEEA;
  --warning-100:    #FFFBC4;
  --warning-200:    #FFF67B;
  --warning-300:    #FFEB38;
  --warning-400:    #FFE020;
  --warning-500:    #FFC30A;
  --warning-500-a1: rgba(255,195,10,0.12);
  --warning-500-a2: rgba(255,195,10,0.20);
  --warning-500-a3: rgba(255,195,10,0.24);
  --warning-500-a4: rgba(255,195,10,0.40);
  --warning-500-a5: rgba(255,195,10,0.56);
  --warning-600:    #E4A000;
  --warning-700:    #B47500;
  --warning-800:    #885304;
  --warning-900:    #6C4007;
  --warning-950:    #3F2300;

  /* ===================================================================
   * SURFACE SCALE — aligned 1:1 with FB - UI.fig (shipped product)
   *
   * Each step is a hex value that appears in the actual fig:
   *   s0 #0A0C11 — base page bg + text-on-neon       (521× in UI-fig)
   *   s1 #111318 — section bg, landing scroll fade (153×)
   *   s2 #15171E — inset, landing ellipses          (90×)
   *   s3 #1B202A — inner panels, agent canvas      (167×)
   *   s4 #292D37 — raised card                      (PPTX Surface 1)
   *   s5 #333941 — raised card (more)              (337×, PPTX Surface 2)
   *
   * The UI applies a flat `rgba(255,255,255,0.03)` overlay on top of s0
   * for the actual page bg — use --surface-page-bg for that composed
   * gradient or just `background: var(--surface-page-bg);` on any frame.
   *
   * The PPTX-named `#191B1F` (Background-Dark) is NOT in the shipped UI;
   * --surface-bg-pptx keeps it accessible for brand-doc comparison but is
   * not the default page bg.
   * ================================================================= */
  --surface-base:    #0A0C11;           /* the literal page-bg hex — figma Gray-950 */
  --surface-base-lift: rgba(255,255,255,0.03);  /* the +3% overlay */
  --surface-page-bg: linear-gradient(rgba(255,255,255,0.03), rgba(255,255,255,0.03)),
                     linear-gradient(#0A0C11, #0A0C11);   /* composed page bg */

  --surface-bg: var(--fig-theme-surface-s0, #0A0C11);           /* semantic alias — "app/page background" */
  --surface-section: #111318;           /* section bg / landing fade target */
  --surface-panel: var(--fig-theme-surface-s1, #1B202A);           /* inner panel / agent canvas */
  --surface-card-1:  #292D37;           /* raised card     (PPTX Surface 1) */
  --surface-card-2: var(--fig-theme-surface-s2, #333941);           /* raised card more (PPTX Surface 2) */
  --surface-well:    #15171E;           /* inset well / popover bg */

  /* PPTX-only aspirational — not implemented in shipped UI, kept for parity */
  --surface-bg-pptx: #191B1F;

  /* Numbered ramp — s0 deepest → s5 lightest. */
  --surface-s0: var(--fig-theme-surface-s0, #0A0C11);            /* base page bg */
  --surface-s1:     #111318;            /* section */
  --surface-s2:     #15171E;            /* well / inset */
  --surface-s3: var(--fig-theme-surface-s1, #1B202A);            /* panel */
  --surface-s4:     #292D37;            /* card */
  --surface-s5: var(--fig-theme-surface-s2, #333941);            /* card raised */
  --surface-white: var(--fig-theme-surface-white, var(--color-white-100));
  --surface-black:  var(--color-black-100);

  /* ===================================================================
   * SURFACE / THEME RAMP — Design System fig abstract scale
   *
   * The "Theme" group of FB - Design System.fig declares a Gray-mapped
   * surface ramp distinct from the UI-fig values above:
   *
   *   theme-s0 = Gray/950  #0A0C11  "Base Void Black"
   *   theme-s1 = Gray/900  #1B202A  "Dark Panel Charcoal"
   *   theme-s2 = Gray/800  #333941  "Structured Surface Slate"
   *   theme-s3 = Gray/700  #5B616D  "Mid Hierarchy Gray"
   *   theme-s4 = Gray/600  #8C929C  "Soft Structural Gray"
   *   theme-s5 = Gray/500  #AFB3BB  (palette top stop)
   *
   * Use these when you're rendering the design-system specimen frames
   * (i.e. you want the ABSTRACT ramp). For shipping product use the
   * --surface-s0..s5 tokens above (UI-fig values).
   * ================================================================= */
  --surface-theme-s0: var(--fig-theme-surface-s0, var(--gray-950));   /* #0A0C11 */
  --surface-theme-s1: var(--fig-theme-surface-s1, var(--gray-900));   /* #1B202A */
  --surface-theme-s2: var(--fig-theme-surface-s2, var(--gray-800));   /* #333941 */
  --surface-theme-s3: var(--fig-theme-surface-s3, var(--gray-700));   /* #5B616D */
  --surface-theme-s4: var(--fig-theme-surface-s4, var(--gray-600));   /* #8C929C */
  --surface-theme-s5: var(--fig-theme-surface-s5, var(--gray-500));   /* #AFB3BB */

  /* ===================================================================
   * INVERSE BLACK / WHITE — fig "Inverse_black" / "Inverse_white" groups
   *
   * Direct aliases to the alpha primitives. Designed for surfaces whose
   * polarity is the opposite of the global theme:
   *   inverse-black-* — black alpha on a light surface
   *   inverse-white-* — white alpha on a dark surface
   * ================================================================= */
  --inverse-black-alpha-6:    var(--color-black-6);
  --inverse-black-alpha-9:    var(--color-black-9);
  --inverse-black-alpha-12:   var(--color-black-12);
  --inverse-black-alpha-18:   var(--color-black-18);
  --inverse-black-alpha-24:   var(--color-black-24);
  --inverse-black-alpha-32:   var(--color-black-32);
  --inverse-black-alpha-40:   var(--color-black-40);
  --inverse-black-alpha-48:   var(--color-black-48);
  --inverse-black-alpha-56:   var(--color-black-56);
  --inverse-black-alpha-64:   var(--color-black-64);
  --inverse-black-alpha-72:   var(--color-black-72);
  --inverse-black-alpha-80:   var(--color-black-80);
  --inverse-black-alpha-88:   var(--color-black-88);
  --inverse-black-alpha-solid: var(--color-black-100);

  --inverse-white-alpha-6:    var(--color-white-6);
  --inverse-white-alpha-9:    var(--color-white-9);
  --inverse-white-alpha-12:   var(--color-white-12);
  --inverse-white-alpha-18:   var(--color-white-18);
  --inverse-white-alpha-24:   var(--color-white-24);
  --inverse-white-alpha-32:   var(--color-white-32);
  --inverse-white-alpha-40:   var(--color-white-40);
  --inverse-white-alpha-48:   var(--color-white-48);
  --inverse-white-alpha-56:   var(--color-white-56);
  --inverse-white-alpha-64:   var(--color-white-64);
  --inverse-white-alpha-72:   var(--color-white-72);
  --inverse-white-alpha-80:   var(--color-white-80);
  --inverse-white-alpha-88:   var(--color-white-88);
  --inverse-white-alpha-solid: var(--color-white-100);

  /* ===================================================================
   * SEMANTIC EMPHASIS — punchy / med / low / base + alpha-soft variants
   *
   * Each semantic family has six emphasis levels (fig Frame1973773419):
   *   *_high_em        → /400 (solid, vivid)
   *   *_med_em         → /500 (solid, base)
   *   *_low_em         → /900 (solid, deep)
   *   *_base_em        → /950 (solid, deepest)
   *   *_low_em_alpha   → /500_alpha_5  (~56% — translucent badge fill)
   *   *_base_em_alpha  → /500_alpha_3  (~24% — translucent tint)
   *
   * Use *_high/med/low/base for solid surfaces (icons, text, deep bg);
   * use the *_alpha pair for soft on-dark fills that blend with surface.
   * ================================================================= */
  --primary-high-em:     var(--brand-blue-400);   /* #7B8BFF */
  --primary-med-em: var(--fig-theme-surface-primary-med-em, var(--brand-blue-500));   /* #4259FF */
  --primary-low-em:      var(--brand-blue-900);   /* #141B4D */
  --primary-base-em:     var(--brand-blue-950);   /* #121742 */
  --primary-low-em-alpha: var(--fig-theme-surface-primary-low-em-alpha, var(--brand-blue-500-a5));
  --primary-base-em-alpha: var(--brand-blue-500-a3);
  /* legacy short names */
  --primary-low-alpha: var(--fig-theme-surface-primary-low-em-alpha, var(--brand-blue-500-a5));
  --primary-base-alpha: var(--fig-theme-surface-primary-base-em-alpha, var(--brand-blue-500-a2));

  --info-high-em:         var(--info-400);
  --info-med-em:          var(--info-500);
  --info-low-em:          var(--info-900);
  --info-base-em:         var(--info-950);
  --info-low-em-alpha:    var(--info-500-a5);
  --info-base-em-alpha: var(--fig-theme-surface-info-base-em-alpha, var(--info-500-a3));

  --success-high-em: var(--fig-theme-surface-success-high-em, var(--success-400));
  --success-med-em:       var(--success-500);
  --success-low-em: var(--fig-theme-surface-success-low-em, var(--success-900));
  --success-base-em:      var(--success-950);
  --success-low-em-alpha: var(--success-500-a5);
  --success-base-em-alpha:var(--success-500-a3);

  --warning-high-em: var(--fig-theme-surface-warning-high-em, var(--warning-400));
  --warning-med-em:       var(--warning-500);
  --warning-low-em:       var(--warning-900);
  --warning-base-em:      var(--warning-950);
  --warning-low-em-alpha: var(--fig-theme-surface-warning-low-em-alpha, var(--warning-500-a5));
  --warning-base-em-alpha:var(--warning-500-a3);

  --danger-high-em: var(--fig-theme-surface-danger-high-em, var(--danger-400));
  --danger-med-em:        var(--danger-500);
  --danger-low-em:        var(--danger-900);
  --danger-base-em:       var(--danger-950);
  --danger-low-em-alpha: var(--fig-theme-surface-danger-low-em-alpha, var(--danger-500-a5));
  --danger-base-em-alpha: var(--danger-500-a3);

  /* ===================================================================
   * TEXT / ICON (dark bg)
   *
   * Two parallel encodings of the same 4-step intent:
   *   • PPTX hex (--text-pptx-*) — explicit, no compositing artifacts.
   *     Use on noisy surfaces, hero backgrounds, gradient bands.
   *   • Figma white-alpha (--text-*-em) — composites with the underlying
   *     surface so it auto-tints under colored panels. Default for app UI.
   *
   * The hex and alpha versions are intentionally near-equivalent in
   * perceived luminance on Background-Dark (#191B1F):
   *   White/100 ↔ #FFFFFF   White/72 ≈ #C6C8CA   White/48 ≈ #95989C   White/32 ≈ #74787E
   * ================================================================= */
  --text-pptx-high: var(--fig-theme-text-and-icon-high-em, #FFFFFF);     /* Text_high */
  --text-pptx-med:  #C6C8CA;     /* Text 1 */
  --text-pptx-low:  #95989C;     /* Text 2 */
  --text-pptx-base: #74787E;     /* Text 3 */

  --text-high-em: var(--fig-theme-text-and-icon-high-em, var(--color-white-100));   /* h1, primary copy */
  --text-med-em: var(--fig-theme-text-and-icon-med-em, var(--color-white-72));    /* body paragraph */
  --text-low-em: var(--fig-theme-text-and-icon-low-em, var(--color-white-48));    /* captions, helper */
  --text-base-em: var(--fig-theme-text-and-icon-base-em, var(--color-white-32));    /* placeholders, disabled */
  --text-on-neutral: var(--fig-theme-text-and-icon-text-on-neutral, var(--color-black-100));  /* text atop bright/neon surfaces */

  /* ===================================================================
   * OUTLINE — fig Outline frame (4 levels mapped to White alpha tokens)
   *   high_em → White/12 · med_em → White/9 · low_em → White/6 · base_em → White/3
   *
   * Outline_inverse — for light-surface panels embedded in dark contexts.
   *   black            → Color/Black/100 (solid hairline, rare)
   *   inverse_white    → Color/White/100 (solid hairline on dark)
   *   white            → Color/White/100 (alias)
   * ================================================================= */
  --outline-high-em: var(--fig-theme-outline-high-em, var(--color-white-12));
  --outline-med-em: var(--fig-theme-outline-med-em, var(--color-white-9));
  --outline-low-em: var(--fig-theme-outline-low-em, var(--color-white-6));
  --outline-base-em: var(--fig-theme-outline-base-em, rgba(255,255,255,0.03));

  --outline-inverse-black: var(--fig-theme-outline-black, var(--color-black-100));
  --outline-inverse-white: var(--fig-theme-outline-inverse-white, var(--color-white-100));
  --outline-inverse-black-high-em: var(--color-black-12);
  --outline-inverse-black-med-em:  var(--color-black-9);
  --outline-inverse-black-low-em:  var(--color-black-6);
  --outline-inverse-black-base-em: rgba(0,0,0,0.03);

  /* ===================================================================
   * DISABLED / HOVER OVERLAYS — fig-exact (Color-Palette-skill / Surface/Special)
   *   disabled_high_em  → White/24    disabled_med_em  → White/18
   *   disabled_low_em   → White/12    disabled_base_em → White/9
   *   hover_overlay         → Black/6
   *   hover_overlay_inverse → White/3 (rgba(255,255,255,0.03))
   * ================================================================= */
  --disabled-high-em: var(--color-white-24);
  --disabled-med-em:  var(--color-white-18);
  --disabled-low-em:  var(--color-white-12);
  --disabled-base-em: var(--color-white-9);
  --hover-overlay: var(--fig-theme-surface-hover-overlay, var(--color-black-6));
  --hover-overlay-inverse: var(--fig-theme-surface-hover-overlay-inverse, rgba(255,255,255,0.03));

  /* ===================================================================
   * SURFACE / SPECIAL — fig-exact blur + alpha overlays
   * (Color-Palette-skill — Surface "Special" group)
   *
   * These are the named-token equivalents of the floating-surface
   * background fills used by glass cards, modals, dropmenus, tooltips,
   * progress docks and badge backgrounds. The component recipes below
   * (--modal-bg, --popover-bg, --badge-bg, --progress-bg) all derive
   * from these primitives.
   * ================================================================= */
  --surface-blur-base-light: var(--fig-theme-surface-special-blur-base-light, rgba(36, 36, 36, 0.80));   /* #242424CC */
  --surface-blur-base-dark: var(--fig-theme-surface-special-blur-base-dark, rgba(36, 36, 36, 0.96));   /* #242424F5 */
  --surface-secondary-alpha: var(--fig-theme-surface-special-secondary-alpha-base, rgba(46, 46, 46, 0.80));   /* #2E2E2ECC */

  /* Mobile glass — heavier alpha (0.92) than the desktop modal recipe (0.80)
     because mobile surfaces sit over a much more variable background (camera,
     fullscreen content, gradient artwork) and need stronger luminance lift.
     Used by mobile-primitives.jsx toasts, mini-player, action sheets. */
  --surface-mobile-glass:        rgba(46, 46, 46, 0.92);
  --surface-mobile-glass-blur:   blur(24px);

  /* ===================================================================
   * GLOW SHADOWS — soft brand-color halos for hero/CTA states
   * (Numeric e1..e6 elevation tokens live in tokens.css.)
   *
   * PPTX slide 11 rule: reduce neon-green saturation 5–10% for ambient
   * glow + apply layer blur to enhance diffusion. The rgba values below
   * already encode the de-saturated glow color (#47C53B-ish).
   * ================================================================= */
  --shadow-glow-neon:    0 0 24px rgba(60, 255, 82, 0.55);   /* PPTX brand-primary halo */
  --shadow-glow-mint:    0 0 24px rgba(56, 217, 168, 0.45);  /* PPTX accent-mint halo */
  --shadow-glow-blue:    0 0 24px rgba(66, 89, 255, 0.45);   /* PPTX accent-blue halo */
  --shadow-glow-lavender:0 0 24px rgba(113, 130, 255, 0.45); /* gradient end-stop halo */
  /* Legacy alias — was bound to figma Brand/green #8EE600 (chartreuse),
     remapped to the PPTX-canonical neon green for parity. */
  --shadow-glow-green:   var(--shadow-glow-neon);

  /* Surface "Effects" — fig Surface frame
   *   Special_sm: e1 lift + inset darken (default soft-lift card)        */
  --shadow-special-sm:  0 1px 2px -1.5px rgba(0,0,0,0.06),
                        inset 0 -4px 6px 0 rgba(0,0,0,0.09);

  /* ===================================================================
   * BACKGROUND GRADIENTS
   *
   * --gradient-neon-pulse — THE signature freebeat brand gradient
   * (PPTX slide 6 + slide 7 "Neon Pulse"). Three stops at 100% each,
   * smooth transition; never insert a neutral mid-stop and never apply
   * at low opacity over neutral fill — both create the muddy "gray
   * fogging" the brand guide explicitly forbids.
   *
   * Use cases: hero text masks (background-clip: text), focal-shape
   * fills, additive-blended overlays on dark surfaces. NOT for body
   * copy and NOT for full-bleed page backgrounds.
   *
   * --gradient-halo — the brand's ambient atmospheric radial used
   * across landing/marketing pages. Dark green core (#257918) fading
   * to transparent dark-blue. Composited under brand shapes to create
   * the signature aurora bloom. Distinct from Neon Pulse: this is the
   * low-saturation background glow; Neon Pulse is the high-saturation
   * foreground gradient.
   * ================================================================= */
  --gradient-neon-pulse:
    linear-gradient(90deg, #3CFF52 0%, #38D9A8 50%, #7182FF 100%);
  --gradient-neon-pulse-vertical:
    linear-gradient(180deg, #3CFF52 0%, #38D9A8 50%, #7182FF 100%);
  /* Hero-text gradient (slide 6 + product hero) — short two-stop alias */
  --gradient-brand-text:
    linear-gradient(90deg, #3CFF52 0%, #7182FF 100%);

  /* Brand ambient halo — used on landing/marketing background masks */
  --gradient-halo:
    radial-gradient(rgb(37,121,24) 74%, rgba(58,80,146,0) 100%);
  --halo-green-core: #257918;          /* dark green core stop */
  --halo-blue-fade:  #3A5092;          /* dark blue fade stop */

  /* Existing app gradients — preserved */
  --gradient-agent-button: linear-gradient(90deg, #FFFFFF 0.85%, #F2FFE1 84%, #E5FEDC 99.15%);
  --gradient-task:         linear-gradient(118deg, rgba(225, 237, 215, 0.20) -47.79%, rgba(225, 237, 215, 0.00) 100%);
  --gradient-result:       linear-gradient(118deg, rgba(215, 237, 217, 0.10) -47.79%, rgba(215, 237, 217, 0.00) 100%);
  --gradient-outline-secondary: linear-gradient(to bottom, rgba(255,255,255,0.03) 48%, rgba(255,255,255,0.06) 100%);

  /* ===================================================================
   * MOTION — durations + easings
   * ================================================================= */
  --duration-instant:  80ms;
  --duration-fast:     160ms;
  --duration-base:     240ms;
  --duration-slow:     360ms;
  --duration-slower:   480ms;
  --duration-ambient:  1400ms;
  --duration-ambient-slow: 2400ms;

  --ease-out-expo:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quint:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-quart:     cubic-bezier(0.5, 0, 0.75, 0);
  --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-spring:       cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-linear:       linear;

  /* ===================================================================
   * TYPOGRAPHY — fig Typography frame
   *   Single family, Google Sans Flex, weights 400/500/600/700.
   *   Canonical role tokens (--type-display-*, --type-heading-*,
   *   --type-title-*, --type-body-*, --type-caption-*, --type-overline,
   *   plus the fig-exact --type-ui-* interface scale) are declared in
   *   tokens.css. This block defines only the font-family vars and a
   *   small set of legacy `--text-*` aliases that older mocks reference.
   *   Prefer the `--type-*` tokens in new work.
   * ================================================================= */
  --font-sans:    'Google Sans Flex', system-ui, -apple-system, sans-serif;
  --font-display: 'Google Sans Flex', system-ui, -apple-system, sans-serif;
  --font-ui:      'Google Sans Flex', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', Menlo, Consolas, ui-monospace, monospace;

  /* Letter-spacing tokens (fig: Compact / Default / Open) */
  --tracking-compact: var(--fig-typography-typeface-letter-spacing-xs, -0.2px);   /* mid-scale heading */
  --tracking-default: 0;        /* body and interface */
  --tracking-open:    1px;      /* overline, sparse labels */

  /* Weight tokens (fig: 400 Regular · 500 Medium · 600 Semibold · 700 Bold) */
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* ---- Legacy --text-* aliases ---------------------------------------
   * Maps the old app-internal names to the canonical fig roles so
   * existing mocks compile without churn. New code should use the
   * `--type-*` tokens directly.
   * ----------------------------------------------------------------- */
  --text-display-lg: 700 76px/80px var(--font-display);   /* → type-display-3 */
  --text-display-md: 700 56px/60px var(--font-display);   /* → type-display-1 */
  --text-display-sm: 700 42px/48px var(--font-display);   /* between H5/H4 */

  --text-h1:      600 42px/48px var(--font-sans);   /* between heading-5 (40) and heading-6 (48) */
  --text-h2:      600 32px/40px var(--font-sans);   /* → type-heading-3 */
  --text-h3:      600 24px/32px var(--font-sans);   /* → type-heading-1 */
  --text-h4:      500 20px/28px var(--font-sans);   /* → type-title-2 */
  --text-title:   500 18px/26px var(--font-sans);   /* → type-title-1 */

  --text-body-lg: 400 16px/24px var(--font-sans);   /* → type-ui-title-default (used as body) */
  --text-body:    400 14px/20px var(--font-sans);   /* compact app body */
  --text-body-sm: 400 13px/18px var(--font-sans);   /* → type-ui-body-default */

  --text-caption: 500 12px/16px var(--font-sans);
  --text-micro:   500 10px/14px var(--font-sans);

  --text-code:    400 13px/20px var(--font-mono);
}

/* ---------- SEMANTIC BASE --------------------------------------------
 * Default page background = UI-fig formula (`#0A0C11` + 3% white overlay).
 * Use --surface-page-bg for the composed gradient, or --surface-bg / s0
 * for the bare hex.
 * ------------------------------------------------------------------ */
html, body {
  background: var(--surface-page-bg);
  color: var(--text-high-em);
  font: var(--text-body);
  -webkit-font-smoothing: antialiased;
}

h1 { font: var(--text-h1); letter-spacing: var(--tracking-compact); margin: 0; }
h2 { font: var(--text-h2); letter-spacing: var(--tracking-compact); margin: 0; }
h3 { font: var(--text-h3); margin: 0; }
h4 { font: var(--text-h4); margin: 0; }
p  { font: var(--text-body); color: var(--text-med-em); margin: 0; }
small { font: var(--text-caption); color: var(--text-low-em); }
code, pre { font: var(--text-code); }

/* ---------- HELPERS -------------------------------------------------- */
.fb-hairline { border: 1px solid var(--outline-high-em); }
.fb-card {
  background: var(--surface-s1);
  border: 1px solid var(--outline-med-em);
  border-radius: var(--radius_2xl);
  box-shadow: var(--elevation-e1);
}
.fb-glass {
  background: var(--color-black-48);
  backdrop-filter: blur(var(--blur-md));
  border: 1px solid var(--color-white-9);
}
.fb-glow-green { box-shadow: var(--shadow-glow-green); }
.fb-glow-blue  { box-shadow: var(--shadow-glow-blue); }


/* ===================================================================
 * BRAND NEON / MINT / LAVENDER (appended root — guaranteed parse)
 * Defined here as a separate rule to ensure browser parses them.
 * ================================================================= */
:root, [data-fb-theme], [data-fb-primitives], [data-fb-color-type], [data-fb-radius], [data-fb-space], [data-fb-font], [data-fb-typography] {
  --brand-neon-100: #E2FFE6;
  --brand-neon-200: #B8FFC2;
  --brand-neon-300: #7DFF94;
  --brand-neon-400: #3CFF52;
  --brand-neon-500: #23FF65;
  --brand-neon-400-a1: rgba(60,255,82,0.12);
  --brand-neon-400-a2: rgba(60,255,82,0.20);
  --brand-neon-400-a3: rgba(60,255,82,0.30);
  --brand-neon-400-a4: rgba(60,255,82,0.45);
  --brand-neon-400-a5: rgba(60,255,82,0.60);
  --brand-neon-600: #28C73F;
  --brand-neon-700: #1E9E32;
  --brand-neon-800: #157923;
  --brand-neon-900: #0E5418;
  --brand-neon-glow: rgba(71,197,59,0.45);
  --brand-neon: #3CFF52;
  --brand-mint-400: #38D9A8;
  --brand-mint-500: #23FFBD;
  --brand-mint: #38D9A8;
  --brand-lavender: #7182FF;

  /* PPTX-canonical brand contract (re-declared for parse-order safety) */
  --brand-primary: var(--fig-theme-primary-green, #3CFF52);
  --brand-accent-mint: var(--fig-theme-primary-green-soft, #38D9A8);
  --brand-accent-blue: var(--fig-theme-primary-blue, #4259FF);
  --brand-accent-lavender: var(--fig-theme-primary-blue-soft, #7182FF);

  /* UI-fig surfaces (re-declared) — NOT the PPTX values */
  --surface-base:    #0A0C11;
  --surface-base-lift: rgba(255,255,255,0.03);
  --surface-page-bg: linear-gradient(rgba(255,255,255,0.03), rgba(255,255,255,0.03)),
                     linear-gradient(#0A0C11, #0A0C11);
  --surface-bg: var(--fig-theme-surface-s0, #0A0C11);
  --surface-section: #111318;
  --surface-panel: var(--fig-theme-surface-s1, #1B202A);
  --surface-well:    #15171E;
  --surface-card-1:  #292D37;
  --surface-card-2: var(--fig-theme-surface-s2, #333941);
  --surface-bg-pptx: #191B1F;   /* aspirational only */

  /* PPTX text hex (re-declared) */
  --text-pptx-high: var(--fig-theme-text-and-icon-high-em, #FFFFFF);
  --text-pptx-med:  #C6C8CA;
  --text-pptx-low:  #95989C;
  --text-pptx-base: #74787E;

  /* Neon Pulse gradient (re-declared) */
  --gradient-neon-pulse:
    linear-gradient(90deg, #3CFF52 0%, #38D9A8 50%, #7182FF 100%);
  --gradient-brand-text:
    linear-gradient(90deg, #3CFF52 0%, #7182FF 100%);
  --gradient-halo:
    radial-gradient(rgb(37,121,24) 74%, rgba(58,80,146,0) 100%);

  /* Text-on-brand (re-declared with UI-fig value) */
  --on-brand-primary: #0A0C11;

  /* ===================================================================
   * COMPONENT RECIPES — fig-exact overlay surfaces
   *
   * Captured 1:1 from FB - UI.fig external-shared/{Modal, Dropmenu,
   * DirectionBottomCenter, Progress, ModalHeader, StateCheckedSizeSm,
   * TypeSwitchONSizeMd2}.
   *
   * These are the canonical recipes for every dark-floating surface
   * in the product. Use them on modals, popovers, tooltips, dropmenus,
   * feature-icon badges, and the floating progress dock.
   * ================================================================= */

  /* Modal surface — Color/Dark/600 @ 80% + blur(48) + White/12 border + r24 */
  --modal-bg: var(--fig-theme-surface-special-secondary-alpha-base, rgba(46, 46, 46, 0.80));    /* fig: Modal */
  --modal-blur:             blur(48px);                /* --blur-lg */
  --modal-border:           1px solid rgba(255, 255, 255, 0.12);  /* --outline-high-em */
  --modal-radius: var(--fig-radius-radius-component-radius-5xl, 24px);                       /* --radius_7xl */

  /* Dropmenu / tooltip surface — Color/Gray/800 + blur(48) + White/6 border + r16 */
  --popover-bg: var(--fig-theme-surface-s2, #333941);                   /* fig: Dropmenu list, Tooltip list_wrap = --surface-card-2 */
  --popover-blur:           blur(48px);
  --popover-border:         1px solid rgba(255, 255, 255, 0.06);  /* --outline-low-em */
  --popover-radius: var(--fig-radius-radius-component-radius-2xl, 16px);                       /* --radius_3xl */

  /* Floating-progress surface — Color/Black/72 + blur(36) + 2-layer shadow + r16 */
  --progress-bg:            rgba(0, 0, 0, 0.72);        /* --color-black-72 */
  --progress-blur:          blur(36px);
  --progress-radius: var(--fig-radius-radius-component-radius-2xl, 16px);
  --progress-shadow:        0 4px 8px rgba(0,0,0,0.10),
                            0 16px 32px rgba(0,0,0,0.18);

  /* Feature-icon badge — Color/Dark/600 @ 80% + blur(24) + inset highlight */
  --badge-bg: var(--fig-theme-surface-special-secondary-alpha-base, rgba(46, 46, 46, 0.80));
  --badge-blur:             blur(24px);
  --badge-shadow:           0 2px 1.5px -0.5px rgba(0,0,0,0.03),
                            inset 0 2px 3px 0 rgba(255,255,255,0.03);

  /* Floating shadow — the 4-layer 0.03 black stack used on Dropmenu + Tooltip */
  --shadow-floating:        0 32px 32px -16px rgba(0,0,0,0.03),
                            0 20px 20px -12px rgba(0,0,0,0.03),
                            0 3px  3px  -1.5px rgba(0,0,0,0.03),
                            0 1px  1px  -0.5px rgba(0,0,0,0.03);

  /* Checkbox/toggle on-state — brand-blue + inset light */
  --control-on-bg: var(--fig-theme-surface-primary-med-em, #4259FF);                    /* fig: Switch ON, Checkbox checked = --brand-accent-blue */
  --control-on-shadow:      0 1px 1px -0.5px rgba(0,0,0,0.03),
                            inset 0 3px 3px 0 rgba(255,255,255,0.12);

  /* ===================================================================
   * INPUT FIELD — fig Input component (Toolbox-Components/Input)
   *
   *   Cell (status=default, size=md):
   *     320w × 48h, radius 10, bg rgba(46,46,46,0.80) (modal-bg!),
   *     border 1px Black/3 (rgba(0,0,0,0.03)), padding 8 10, gap 4.
   *   Input_label / Hint_label:
   *     18h slot above + below cell, gap 4. 13/18 w500 White (label),
   *     13/18 w400 White/48 (hint).
   *   Text inside cell:
   *     Primary 13/18 w500 White/72, Secondary 13/18 w400 White/72.
   *     Icons (left/right): 18×18 with White/48 fill.
   *   Embedded button slot at right (TypePrimarySizeSmState4 = primary
   *     blue, sm, 32h, 71w).
   *
   *   Sizes scale linearly. xs/sm shrink to 28-32h with 12/16 text +
   *     16px icons + radius 8; xl grows to 56h + 18/24 text + radius
   *     14 + padding 12/14.
   *
   *   Product-Components also exposes a flat "Type=default, Size=md"
   *     input (no label/hint chrome) at 360×40, radius 10, bg
   *     Surface-s5 (#333941), border 1px White/3 (different alpha).
   *     Both recipes are valid — the toolbox one is for forms; the
   *     product one is for inline-search / nav-style inputs.
   * ================================================================= */

  /* Form input (with label + hint scaffold) */
  --input-cell-bg: var(--fig-theme-surface-special-secondary-alpha-base, rgba(46, 46, 46, 0.80));   /* = --modal-bg */
  --input-cell-border:      1px solid rgba(0,0,0,0.03);
  --input-cell-radius:      var(--radius_lg);          /* 10 */
  --input-cell-padding:     8px 10px;
  --input-cell-gap: var(--fig-space-space-xs, 4px);
  --input-cell-h-sm:        32px;
  --input-cell-h-md:        48px;
  --input-cell-h-lg:        52px;
  --input-cell-h-xl:        56px;
  --input-cell-text:        500 13px/18px var(--font-sans);   /* primary */
  --input-cell-text-color: var(--fig-theme-text-and-icon-med-em, var(--text-med-em));              /* White/72 */
  --input-cell-placeholder: var(--text-base-em);             /* White/32 */
  --input-cell-icon-color: var(--fig-theme-text-and-icon-low-em, var(--color-white-48));

  /* Inline / product input (no chrome) — bg = Surface-s5 */
  --input-inline-bg: var(--fig-theme-surface-s2, var(--surface-s5));              /* #333941 */
  --input-inline-border:    1px solid var(--outline-base-em);
  --input-inline-radius:    var(--radius_lg);                /* 10 */

  /* Textarea (Type=textarea, Size=xl) */
  --textarea-bg: var(--fig-theme-surface-s2, var(--surface-s5));
  --textarea-border:        1px solid var(--outline-base-em);
  --textarea-radius:        var(--radius_2xl);               /* 14 */
  --textarea-padding:       12px 14px;
  --textarea-text:          500 18px/24px var(--font-sans);
  --textarea-text-color: var(--fig-theme-text-and-icon-med-em, var(--text-med-em));

  /* ===================================================================
   * SLIDER — fig Slider component (Toolbox-Components/Slider)
   *
   *   Track:    height 6, radius 6, bg White/12
   *   Fill:     height 6, radius 12, Neon Pulse gradient
   *             (#3CFF52 → #38D9A8 → #7182FF, 0%→50%→100%)
   *   Thumb:    16×16 circle, bg Surface-s3 (#1B202A), centered -5px above
   *             track, double-layer micro-shadow
   * ================================================================= */
  --slider-track-h:         6px;
  --slider-track-bg:        var(--color-white-12);
  --slider-track-radius:    var(--radius_sm);            /* 6 */
  --slider-fill:            var(--gradient-neon-pulse);
  --slider-fill-radius:     var(--radius_xl);            /* 12 */
  --slider-thumb-size:      16px;
  --slider-thumb-bg: var(--fig-theme-surface-s1, var(--surface-s3));           /* #1B202A */
  --slider-thumb-shadow:    0 3px 3px -1.5px rgba(0,0,0,0.03),
                            0 1px 1px -0.5px rgba(0,0,0,0.03);

  /* Slider value tooltip — inverse (white-on-dark) pill with tail.
     Floats above the thumb on drag, displays the live value.
     Distinct from --popover-bg (dark glass) because it's the inverse. */
  --slider-tooltip-bg:      var(--color-white-80);              /* #FFFFFFCC */
  --slider-tooltip-color:   var(--color-black-100);
  --slider-tooltip-radius:  var(--radius_xs);                    /* 4 */
  --slider-tooltip-padding: 2px 6px;
  --slider-tooltip-font:    400 12px/16px var(--font-sans);
  --slider-tooltip-shadow:  0 20px 20px -12px rgba(0,0,0,0.03),
                            0  3px  3px -1.5px rgba(0,0,0,0.03),
                            0  1px  1px -0.5px rgba(0,0,0,0.03);

  /* ===================================================================
   * TAG — fig Tag component (Toolbox-Components/Tag)
   *
   *   Type=primary, Size=xs:
   *     h20 · radius 6 · padding 4 · gap 2 · bg --brand-accent-blue
   *     icons 12×12 white · primary 10/16 w700 · secondary 10/16 w500 white/72
   *   Type=neutral / success / warning / danger — same geometry, bg shifts
   *     to the semantic family's *_med_em.
   *
   *   Three sizes (per fig OverviewSidebar): xs (h20), sm (h24), md (h28).
   *   Tags carry icon + text + optional secondary text. NOT pill shape;
   *     radius is 6 (radius_sm) so they read as solid little blocks.
   * ================================================================= */
  --tag-radius:        var(--radius_sm);                  /* 6 */
  --tag-padding-xs: var(--fig-space-space-xs, 4px);
  --tag-padding-sm:    4px 6px;
  --tag-padding-md:    4px 8px;
  --tag-h-xs:          20px;
  --tag-h-sm:          24px;
  --tag-h-md:          28px;
  --tag-gap: var(--fig-space-space-xxs, 2px);
  --tag-text-xs:       700 10px/16px var(--font-sans);
  --tag-text-sm:       700 11px/16px var(--font-sans);
  --tag-text-md:       500 12px/16px var(--font-sans);

  /* ===================================================================
   * CHIP — fig Chips component (Toolbox-Components/Chips)
   *
   *   Type=selected, Size=md (active):
   *     h40 · radius 10 · padding 4/10 · gap 2 · bg --brand-accent-blue
   *     icons 18×18 · primary 13/24 w700 · secondary 13/24 w500
   *   Type=unselected: bg White/9, color White/72
   *   State=disabled: text/icon → White/32
   *
   *   Three sizes: sm (h32), md (h40), lg (h48). Larger than tags,
   *     selectable, support dual icons + secondary text.
   * ================================================================= */
  --chip-radius:       var(--radius_lg);                  /* 10 */
  --chip-h-sm:         32px;
  --chip-h-md:         40px;
  --chip-h-lg:         48px;
  --chip-padding-sm:   4px 8px;
  --chip-padding-md:   4px 10px;
  --chip-padding-lg:   6px 12px;
  --chip-gap: var(--fig-space-space-xxs, 2px);
  --chip-text-sm:      700 12px/18px var(--font-sans);
  --chip-text-md:      700 13px/24px var(--font-sans);
  --chip-text-lg:      700 14px/24px var(--font-sans);
  --chip-bg-selected: var(--fig-theme-surface-primary-med-em, var(--brand-accent-blue));
  --chip-bg-unselected: var(--fig-theme-surface-disabled-base-em, var(--color-white-9));
  --chip-color-selected:   var(--color-white-100);
  --chip-color-unselected: var(--color-white-72);
  --chip-color-disabled:   var(--color-white-32);

  /* ===================================================================
   * DROPMENU — fig Dropdown component (Toolbox-Components/Dropdown)
   *
   *   Container: radius 20, padding 8, bg rgba(36,36,36,0.96) + blur(48),
   *     border 1px Black/3, floating-shadow stack.
   *   Item (size=sm, state=default):
   *     400w × 54h, radius 12, padding 10 8 (top/bot 10, sides 8),
   *     gap 12. Icon 18×18 (left), Text wrap, optional right slot
   *     for secondary icons/tags.
   *     Primary text 13/18 w500 White/72.
   *     Secondary text 12/16 w400 Gray/600 (#8C929C).
   *   Item (size=sm, state=hover):
   *     SAME geometry, fill becomes a composite glass layer:
   *     White/3 over rgba(46,46,46,0.80) over Black/3 — i.e. hover
   *     overlay on top of the secondary alpha base.
   *
   *   Dropdown has 3 sizes per fig: sm (h54 row), lg, xl. Default = sm.
   * ================================================================= */
  --dropmenu-bg: var(--fig-theme-surface-special-blur-base-dark, rgba(36, 36, 36, 0.96));         /* --surface-blur-base-dark */
  --dropmenu-blur:           blur(48px);                      /* --blur-lg */
  --dropmenu-border:         1px solid rgba(0, 0, 0, 0.03);
  --dropmenu-radius:         var(--radius_5xl);               /* 20 */
  --dropmenu-padding: var(--fig-space-space-md, 8px);
  --dropmenu-shadow:         var(--shadow-floating);

  --dropmenu-item-radius:    var(--radius_xl);                /* 12 */
  --dropmenu-item-padding:   10px 8px;
  --dropmenu-item-gap: var(--fig-space-space-xl, 12px);
  --dropmenu-item-h-sm:      54px;
  --dropmenu-item-h-lg:      62px;
  --dropmenu-item-h-xl:      72px;
  --dropmenu-item-primary:   500 13px/18px var(--font-sans);
  --dropmenu-item-primary-color: var(--text-med-em);          /* White/72 */
  --dropmenu-item-primary-hover: var(--text-high-em);
  --dropmenu-item-secondary: 400 12px/16px var(--font-sans);
  --dropmenu-item-secondary-color: var(--gray-600);           /* #8C929C */
  --dropmenu-item-hover-bg:
    linear-gradient(rgba(255,255,255,0.03), rgba(255,255,255,0.03)),
    linear-gradient(rgba(46,46,46,0.80),    rgba(46,46,46,0.80)),
    linear-gradient(rgba(0,0,0,0.03),       rgba(0,0,0,0.03));

  /* ===================================================================
   * TAB NAVIGATION — fig Tab navigation component (Toolbox-Components)
   *
   *   This is the underline-indicator tab nav (NOT the segmented
   *   "Switcher"). Five sizes per fig (xs/sm/md/lg/xl), each ships
   *   with default + inactive + hover variants.
   *
   *   Tab nav item (size=xl, state=hover):
   *     228w × 32h, padding-bottom 8 (for the underline space).
   *     Icon 24×24 (left + right slots, optional).
   *     Primary 18/24 w700 — White (active) / White/48 (inactive).
   *     Secondary 18/24 w500 — White/72 (active) / White/32 (inactive).
   *
   *   Sizes scale: xs (h18), sm (h24), md (h32), lg (h40), xl (h48).
   *     Text scales 11/14 → 12/16 → 13/18 → 15/22 → 18/24.
   *
   *   Active state shows a 1-px white underline at the bottom of the
   *     tab cell. The whole tab frame carries a 1px white border in
   *     the fig, but the design intent (and what renders cleanly in
   *     a row of tabs) is just the bottom underline.
   * ================================================================= */
  --tab-nav-underline-color: var(--color-white-100);
  --tab-nav-underline-h:     1px;
  --tab-nav-gap-bottom: var(--fig-space-space-md, 8px);             /* space between text + underline */

  --tab-nav-text-active-primary:   var(--color-white-100);
  --tab-nav-text-active-secondary: var(--fig-theme-text-and-icon-low-em, var(--color-white-48));
  --tab-nav-text-inactive-primary: var(--fig-theme-text-and-icon-low-em, var(--color-white-48));
  --tab-nav-text-inactive-secondary: var(--fig-theme-text-and-icon-base-em, var(--color-white-32));

  --tab-nav-h-xs:   18px;
  --tab-nav-h-sm:   24px;
  --tab-nav-h-md:   32px;
  --tab-nav-h-lg:   40px;
  --tab-nav-h-xl:   48px;
  --tab-nav-text-xs: 700 11px/14px var(--font-sans);
  --tab-nav-text-sm: 700 12px/16px var(--font-sans);
  --tab-nav-text-md: 700 13px/18px var(--font-sans);
  --tab-nav-text-lg: 700 15px/22px var(--font-sans);
  --tab-nav-text-xl: 700 18px/24px var(--font-sans);

  /* ===================================================================
   * MODAL HEADER — fig ModalHeader / ModalHeader_wide
   *
   *   Modal_header (narrow, centered):
   *     534×276, padding 72/20/32/20, layout = column · gap 16
   *     Ambient visual: 810×187 ellipse + decorative image clipped
   *       by the header rect. (Renders as a soft top-bleed halo.)
   *     Feature icon: 64×64 centered at top 72
   *     Title: 25/36 w500 White, centered, letter-spacing -0.2
   *     Description: 13/18 w400 White/48, centered
   *
   *   Modal_header_wide (wide variant for confirmation modals):
   *     768×162, padding 72/20/32/20, layout = column · gap 16
   *     NO feature icon (title starts at top 72 directly).
   *     Title: 25/36 w500 White, centered, letter-spacing -0.2
   *     Description: 13/18 w400 White/48, centered (1-line)
   *
   *   Both carry a 1px White/3 hairline border at the top of the
   *     header section as a visual separator before body content.
   * ================================================================= */
  --modal-header-w:               534px;
  --modal-header-h:               276px;
  --modal-header-w-wide:          768px;
  --modal-header-h-wide:          162px;
  --modal-header-padding:         72px 20px 32px 20px;
  --modal-header-gap: var(--fig-space-space-3xl, 16px);
  --modal-header-border:          1px solid rgba(255,255,255,0.03);

  --modal-header-title:           500 25px/36px var(--font-display);
  --modal-header-title-tracking: var(--fig-typography-typeface-letter-spacing-xs, -0.2px);
  --modal-header-title-color:     var(--text-high-em);
  --modal-header-desc:            400 13px/18px var(--font-sans);
  --modal-header-desc-color:      var(--color-white-48);
  --modal-header-icon-size:       64px;
  --modal-header-icon-top:        72px;

  /* ===================================================================
   * ICON BUTTON — fig icon-only button (square, neutral xl)
   *
   *   Type=neutral, Size=xl, State=default/disabled:
   *     56×56 square, radius 14, bg White/9, blur(24)
   *     Icon 28×28 centered; color White/72 (default) / Gray-400
   *     (#C3C6CC) (disabled).
   *
   *   Five sizes per fig: xs (24px) / sm (32px) / md (40px) /
   *     lg (48px) / xl (56px). Each shrinks the icon proportionally
   *     (12/16/20/24/28) and adjusts radius (6/8/10/12/14).
   *   Type variants share button-family tokens (--btn-*); these
   *     icon-button tokens cover the SQUARE icon-only form.
   * ================================================================= */
  --icon-btn-size-xs:    24px;
  --icon-btn-size-sm:    32px;
  --icon-btn-size-md:    40px;
  --icon-btn-size-lg:    48px;
  --icon-btn-size-xl:    56px;
  --icon-btn-radius-xs:  var(--radius_sm);    /* 6 */
  --icon-btn-radius-sm:  var(--radius_md);    /* 8 */
  --icon-btn-radius-md:  var(--radius_lg);    /* 10 */
  --icon-btn-radius-lg:  var(--radius_xl);    /* 12 */
  --icon-btn-radius-xl:  var(--radius_2xl);   /* 14 */
  --icon-btn-icon-xs:    12px;
  --icon-btn-icon-sm:    16px;
  --icon-btn-icon-md:    20px;
  --icon-btn-icon-lg:    24px;
  --icon-btn-icon-xl:    28px;
  --icon-btn-bg-neutral: var(--color-white-9);
  --icon-btn-bg-glass:   rgba(46, 46, 46, 0.80);
  --icon-btn-blur:       blur(24px);
  --icon-btn-color: var(--fig-theme-text-and-icon-med-em, var(--text-med-em));
  --icon-btn-color-disabled: var(--fig-theme-text-and-icon-base-em, var(--color-white-32));

  /* ===================================================================
   * UPLOAD / DROP-ZONE — fig Components/components/Status{State}{Size}
   * (StatusDefault/Active/Loading/UploadedHover × SizeL/SizeS)
   *
   * Two sizes:
   *   L — 400×236, radius 12, padding 32, gap 20.   Primary upload.
   *   S — 124×120, radius 12, padding 24/12, gap 12.  Inline reference.
   *
   * Four shared states across both sizes:
   *   default  — bg White/6,  border 1px dashed White/9   (idle)
   *   active   — bg White/9,  border 1px dashed White/12  (drag-over)
   *   loading  — thumbnail bg + rgba(0,0,0,0.4) overlay + blur(24)
   *              + 1px solid black border
   *              · 27.35 × 14 Neon Pulse gradient bar centered
   *   uploaded — thumbnail bg + 1px solid black border
   *              · 70-tall (L) / 44-tall (S) bottom gradient mask
   *                rgba(0,0,0,0) → rgba(0,0,0,0.48)
   *              · L: 24×24 play + 13/18 w500 duration left / delete right
   *              · S: 24×24 delete centered
   *
   * Loading + uploaded states use the same fig source image
   * (assets/9137d9aa70d1.png) — substitute with the actual user upload
   * thumbnail in product.
   *
   * Separately, a 96.833 × 116.833 "style-card" upload tile lives at
   * /external-shared/StateUpload — when used INSIDE a row of style
   * cards (Style=02 Choose music). See --stylecard-upload-* below.
   * ================================================================= */
  --dropzone-radius:           var(--radius_xl);            /* 12 */
  --dropzone-blur:             blur(24px);

  /* Size L */
  --dropzone-w-l:              400px;
  --dropzone-h-l:              236px;
  --dropzone-padding-l: var(--fig-space-space-10xl, 32px);
  --dropzone-gap-l: var(--fig-space-space-5xl, 20px);

  /* Size S */
  --dropzone-w-s:              124px;
  --dropzone-h-s:              120px;
  --dropzone-padding-s:        24px 12px;
  --dropzone-gap-s: var(--fig-space-space-xl, 12px);

  /* State: default */
  --dropzone-bg-default:       var(--color-white-6);
  --dropzone-border-default:   1px dashed var(--color-white-9);

  /* State: active */
  --dropzone-bg-active: var(--fig-theme-surface-disabled-base-em, var(--color-white-9));
  --dropzone-border-active:    1px dashed var(--color-white-12);

  /* State: loading + uploaded — solid 1px black border, image bg substituted by caller */
  --dropzone-border-loaded:    1px solid rgb(0,0,0);
  --dropzone-overlay-loading:  rgba(0,0,0,0.4);

  /* State: uploaded — bottom-gradient mask */
  --dropzone-mask-h-l:         70px;
  --dropzone-mask-h-s:         44px;
  --dropzone-mask:             linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.48) 100%);

  /* Loading progress — fig Union.svg uses Neon Pulse gradient */
  --dropzone-progress-w:       27.35px;
  --dropzone-progress-h:       14px;
  --dropzone-progress-bg:      var(--gradient-neon-pulse);

  /* Text inside the drop-zone */
  --dropzone-title-l:          500 16px/24px var(--font-sans);
  --dropzone-title-s:          500 13px/18px var(--font-sans);
  --dropzone-title-color:      var(--color-white-100);
  --dropzone-helper:           400 12px/16px var(--font-sans);
  --dropzone-helper-color:     var(--color-white-72);
  --dropzone-format:           400 12px/16px var(--font-sans);
  --dropzone-format-color:     var(--color-white-48);
  --dropzone-duration:         500 13px/18px var(--font-sans);
  --dropzone-duration-color:   var(--color-white-100);

  /* ===================================================================
   * UPLOAD STYLE-CARD — fig /external-shared/StateUpload (node 779:46398)
   *
   * 96.833 × 116.833 tile that lives INSIDE a row of style cards
   * (Style=02 Choose music). Separate component from --dropzone-* above.
   * Card 96.833² · radius 16 · bg White/3 · 2px White/9 border · blur 24
   * Glyph + icon 20×20 White/48 · inline+bottom labels 10/14 White/48.
   * ================================================================= */
  --stylecard-upload-tile-w:        96.833px;
  --stylecard-upload-tile-h:        116.833px;
  --stylecard-upload-card-size:     96.833px;
  --stylecard-upload-card-radius:   var(--radius_3xl);     /* 16 */
  --stylecard-upload-card-bg:       rgba(255,255,255,0.03);
  --stylecard-upload-card-border:   2px solid var(--color-white-9);
  --stylecard-upload-card-blur:     blur(24px);
  --stylecard-upload-card-padding:  6px 2px;
  --stylecard-upload-card-bg-hover: var(--fig-theme-surface-disabled-base-em, var(--color-white-9));
  --stylecard-upload-card-border-hover: 2px solid var(--color-white-12);
  --stylecard-upload-glyph-size:    20px;
  --stylecard-upload-glyph-color:   var(--color-white-48);
  --stylecard-upload-text:          400 10px/14px var(--font-sans);
  --stylecard-upload-text-color: var(--fig-theme-text-and-icon-low-em, var(--color-white-48));

  /* Legacy aliases — keep old `--upload-*` tokens compiling for any callers */
  --upload-tile-w:           var(--stylecard-upload-tile-w);
  --upload-tile-h:           var(--stylecard-upload-tile-h);
  --upload-card-size:        var(--stylecard-upload-card-size);
  --upload-card-radius:      var(--stylecard-upload-card-radius);
  --upload-card-bg:          var(--stylecard-upload-card-bg);
  --upload-card-border:      var(--stylecard-upload-card-border);
  --upload-card-blur:        var(--stylecard-upload-card-blur);
  --upload-card-padding:     var(--stylecard-upload-card-padding);
  --upload-card-bg-hover: var(--fig-theme-surface-disabled-base-em, var(--stylecard-upload-card-bg-hover));
  --upload-card-border-hover:var(--stylecard-upload-card-border-hover);
  --upload-glyph-size:       var(--stylecard-upload-glyph-size);
  --upload-glyph-color:      var(--stylecard-upload-glyph-color);
  --upload-inline-text:      var(--stylecard-upload-text);
  --upload-inline-color:     var(--stylecard-upload-text-color);
  --upload-label:            var(--stylecard-upload-text);
  --upload-label-color: var(--fig-theme-text-and-icon-low-em, var(--stylecard-upload-text-color));

  /* ===================================================================
   * RICH TOOLTIP — fig /external-shared/DirectionBottomCenter
   *
   * A featured tooltip variant — bigger than the standard one-line
   * `--popover-bg` recipe. Carries a feature-icon badge, title,
   * description, optional video/image preview, and a CTA row.
   *
   * Five directional variants in the fig:
   *   bottom_center · top_center · left_center · right_center · top_right
   *
   * All share the same body recipe — only the pointer position changes.
   *
   *   Body: 280×302 (without pointer) · radius 16
   *         bg Surface-s5 (#333941) · backdrop-filter blur(48)
   *         box-shadow var(--shadow-floating)
   *         padding 12 · column · gap 12
   *
   *   Feature_icon: 32×32 pill · top-left
   *         bg rgba(46,46,46,0.80) · blur(24)
   *         shadow 0 2px 1.5px -0.5px rgba(0,0,0,0.03), inset 0 2px 3px 0 rgba(255,255,255,0.03)
   *         icon 20×20 white
   *
   *   Heading (top 56): 13/18 w500 White
   *   Description (top 78): 12/16 w400 White/48
   *   Video (top 110): 256×144 · radius 8 · floating-shadow
   *   CTAs (top 266): 24-tall row with tertiary xs buttons
   *
   *   Pointer: 16×8 · radius 1.5 · color matches body bg (#333941)
   *     Position depends on direction; for bottom_center it sits
   *     centered at the bottom edge, pointing down.
   * ================================================================= */
  --tooltip-rich-w:               280px;
  --tooltip-rich-h:               302px;
  --tooltip-rich-bg: var(--fig-theme-surface-s2, var(--surface-s5));              /* #333941 */
  --tooltip-rich-blur:            blur(48px);
  --tooltip-rich-radius:          var(--radius_3xl);              /* 16 */
  --tooltip-rich-padding: var(--fig-space-space-xl, 12px);
  --tooltip-rich-gap: var(--fig-space-space-xl, 12px);
  --tooltip-rich-shadow:          var(--shadow-floating);

  --tooltip-rich-icon-size:       32px;
  --tooltip-rich-icon-radius:     var(--radius_round);
  --tooltip-rich-icon-bg:         var(--badge-bg);
  --tooltip-rich-icon-shadow:     var(--badge-shadow);

  --tooltip-rich-title:           500 13px/18px var(--font-sans);
  --tooltip-rich-title-color:     var(--text-high-em);
  --tooltip-rich-desc:            400 12px/16px var(--font-sans);
  --tooltip-rich-desc-color:      var(--color-white-48);

  --tooltip-rich-media-radius:    var(--radius_md);                /* 8 */
  --tooltip-rich-media-shadow:    var(--shadow-floating);

  --tooltip-rich-pointer-w:       16px;
  --tooltip-rich-pointer-h:       8px;

  /* ===================================================================
   * SCROLLER — fig /external-shared/TypeVertical (Scroller)
   *
   * The fig's vertical scrollbar treatment for scrollable lists / sheets.
   * Used inside dropmenus, modals, and any tall content area.
   *
   *   Track:  8w · transparent · padding 4 2 (4 top/bot · 2 left/right)
   *   Thumb:  4w · 64h (default) · radius pill (1000)
   *           bg rgba(0,0,0,0.06) (--color-black-6)
   *           backdrop-filter: blur(24px)
   *           Hover thumb bg: --color-black-12
   *           Active thumb bg: --color-black-18
   *
   * Note: the fig spec colors the thumb with BLACK alpha + blur — this
   *   reads correctly on light surfaces (composes with the underlying
   *   content) and on dark glass (the blur lifts the local luminance
   *   under the thumb so it stays visible).
   * ================================================================= */
  --scroller-track-w:        8px;
  --scroller-track-padding:  4px 2px;
  --scroller-thumb-w:        4px;
  --scroller-thumb-min-h:    64px;
  --scroller-thumb-radius:   var(--radius_round);                 /* pill */
  --scroller-thumb-bg: var(--fig-theme-surface-hover-overlay, var(--color-black-6));
  --scroller-thumb-bg-hover: var(--color-black-12);
  --scroller-thumb-bg-active: var(--color-black-18);
  --scroller-thumb-blur:     blur(24px);

  /* ===================================================================
   * SWITCHER — fig segmented tab control (Toolbox-Components/Switcher)
   *
   *   Container (size=sm, type=secondary): h40, radius 12,
   *     bg Black/56, border 1px White/3, padding 4, gap 6
   *   Item (active):  radius 8, bg Surface-s5 + 6% black overlay,
   *     border 1px White/9, 3-layer drop shadow, 12/16 w500 white text
   *   Item (inactive): same geometry, transparent bg, no border,
   *     12/16 w500 White/48 text
   * ================================================================= */
  --switcher-bg:            var(--color-black-56);
  --switcher-border:        1px solid rgba(255,255,255,0.03);
  --switcher-radius:        var(--radius_xl);            /* 12 */
  --switcher-padding: var(--fig-space-space-xs, 4px);
  --switcher-gap: var(--fig-space-space-sm, 6px);
  --switcher-item-radius:   var(--radius_md);            /* 8 */
  --switcher-item-active-bg:
    linear-gradient(rgba(0,0,0,0.06), rgba(0,0,0,0.06)),
    linear-gradient(var(--surface-s5), var(--surface-s5));
  --switcher-item-active-border: 1px solid var(--outline-med-em);
  --switcher-item-active-shadow:
    0 20px 20px -12px rgba(0,0,0,0.03),
    0  3px  3px -1.5px rgba(0,0,0,0.03),
    0  1px  1px -0.5px rgba(0,0,0,0.03);
  --switcher-item-color:           var(--text-high-em);
  --switcher-item-inactive-color:  var(--text-low-em);   /* white/48 */

  /* ===================================================================
   * TOGGLE (Switch) — fig Toggle component (Toolbox-Components/Toggle)
   *
   *   OFF (size=md): 40×22 track radius 8, bg Surface-s0 (#0A0C11),
   *     pointer 22×18 r6 with dark→gray vertical gradient fill,
   *     shadow 0 2px 3px -1.5px rgba(0,0,0,0.48), padding 0 2px.
   *   ON  (size=md): track bg --brand-accent-blue (#4259FF), pointer
   *     22×18 white r6 with check svg, same shadow.
   *   ON_disabled:   track bg Surface-s0, pointer Surface-s5 (#333941)
   *     with check svg in Gray/600.
   * ================================================================= */
  --toggle-track-w:         40px;
  --toggle-track-h:         22px;
  --toggle-track-radius:    var(--radius_md);            /* 8 */
  --toggle-track-padding:   0 2px;
  --toggle-track-off-bg: var(--fig-theme-surface-s0, var(--surface-s0));
  --toggle-track-on-bg: var(--fig-theme-surface-primary-med-em, var(--brand-accent-blue));
  --toggle-pointer-w:       22px;
  --toggle-pointer-h:       18px;
  --toggle-pointer-radius:  var(--radius_sm);            /* 6 */
  --toggle-pointer-off-bg:  linear-gradient(var(--surface-s0) 0%, var(--gray-600) 100%);
  --toggle-pointer-on-bg:   var(--color-white-100);
  --toggle-pointer-shadow:  0 2px 3px -1.5px rgba(0,0,0,0.48);
  --toggle-pointer-disabled-bg: var(--fig-theme-surface-s2, var(--surface-s5));
}

/* ---------- COMPONENT HELPERS --------------------------------------- *
 * Drop these classes onto a div to get the fig-exact recipe with one
 * line. Override radius/padding/size from the call site as needed.
 * ----------------------------------------------------------------- */
.fb-modal {
  background: var(--modal-bg);
  backdrop-filter: var(--modal-blur);
  -webkit-backdrop-filter: var(--modal-blur);
  border: var(--modal-border);
  border-radius: var(--modal-radius);
}
.fb-popover,
.fb-dropmenu,
.fb-tooltip {
  background: var(--popover-bg);
  backdrop-filter: var(--popover-blur);
  -webkit-backdrop-filter: var(--popover-blur);
  border: var(--popover-border);
  border-radius: var(--popover-radius);
  box-shadow: var(--shadow-floating);
}
.fb-progress-dock {
  background: var(--progress-bg);
  backdrop-filter: var(--progress-blur);
  -webkit-backdrop-filter: var(--progress-blur);
  border-radius: var(--progress-radius);
  box-shadow: var(--progress-shadow);
}
.fb-feature-badge {
  background: var(--badge-bg);
  backdrop-filter: var(--badge-blur);
  -webkit-backdrop-filter: var(--badge-blur);
  box-shadow: var(--badge-shadow);
}

/* ----- Slider, Switcher, Toggle ----- *
 * Compose the fig-exact recipes onto a minimal markup. */

/* INPUT — three flavors:
   .fb-input        — toolbox form input (label + cell + hint scaffold)
   .fb-input-cell   — just the dark glass cell (use inside .fb-input or alone)
   .fb-input-inline — the product-style inline input (Surface-s5 fill)
   .fb-textarea     — multi-line, larger radius + padding */
.fb-input { display: flex; flex-direction: column; gap: var(--input-cell-gap); }
.fb-input-label,
.fb-input-hint { font: 500 13px/18px var(--font-sans); color: var(--text-high-em); }
.fb-input-hint { font-weight: 400; color: var(--text-low-em); }
.fb-input-cell {
  display: flex; align-items: center; gap: var(--input-cell-gap);
  height: var(--input-cell-h-md);
  padding: var(--input-cell-padding);
  border-radius: var(--input-cell-radius);
  background: var(--input-cell-bg);
  border: var(--input-cell-border);
  font: var(--input-cell-text);
  color: var(--input-cell-text-color);
}
.fb-input-cell.sm { height: var(--input-cell-h-sm); }
.fb-input-cell.lg { height: var(--input-cell-h-lg); }
.fb-input-cell.xl { height: var(--input-cell-h-xl); }
.fb-input-cell input,
.fb-input-cell textarea {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none;
  font: inherit; color: inherit;
}
.fb-input-cell input::placeholder,
.fb-input-cell textarea::placeholder { color: var(--input-cell-placeholder); }
.fb-input-cell svg { color: var(--input-cell-icon-color); flex: 0 0 auto; }

.fb-input-inline {
  display: flex; align-items: center; gap: 4px;
  height: 40px;
  padding: 8px 10px;
  border-radius: var(--input-inline-radius);
  background: var(--input-inline-bg);
  border: var(--input-inline-border);
  font: 500 13px/18px var(--font-sans);
  color: var(--text-med-em);
}

.fb-textarea {
  display: block;
  width: 100%;
  padding: var(--textarea-padding);
  border-radius: var(--textarea-radius);
  background: var(--textarea-bg);
  border: var(--textarea-border);
  font: var(--textarea-text);
  color: var(--textarea-text-color);
  outline: none;
  resize: vertical;
}
.fb-textarea::placeholder { color: var(--text-base-em); }

/* TAG — small solid block, three sizes (xs / sm / md). Apply a tone class
   to swap bg: .tone-primary, .tone-info, .tone-success, .tone-warning,
   .tone-danger. Default tone is primary (brand-accent-blue). */
.fb-tag {
  display: inline-flex; align-items: center;
  gap: var(--tag-gap);
  padding: var(--tag-padding-xs);
  border-radius: var(--tag-radius);
  background: var(--brand-accent-blue);
  color: var(--color-white-100);
  font: var(--tag-text-xs);
  height: var(--tag-h-xs);
  box-sizing: border-box;
}
.fb-tag.sm { padding: var(--tag-padding-sm); font: var(--tag-text-sm); height: var(--tag-h-sm); }
.fb-tag.md { padding: var(--tag-padding-md); font: var(--tag-text-md); height: var(--tag-h-md); }
.fb-tag.tone-neutral { background: var(--surface-s5);   color: var(--text-high-em); }
.fb-tag.tone-info    { background: var(--info-med-em); }
.fb-tag.tone-success { background: var(--success-med-em); }
.fb-tag.tone-warning { background: var(--warning-med-em); color: var(--text-on-neutral); }
.fb-tag.tone-danger  { background: var(--danger-med-em); }

/* CHIP — bigger than tag, selectable. Three sizes; toggle via .is-selected;
   disable via [data-disabled]. */
.fb-chip {
  display: inline-flex; align-items: center;
  gap: var(--chip-gap);
  padding: var(--chip-padding-md);
  border-radius: var(--chip-radius);
  background: var(--chip-bg-unselected);
  color: var(--chip-color-unselected);
  font: var(--chip-text-md);
  height: var(--chip-h-md);
  cursor: pointer;
  border: none;
  box-sizing: border-box;
  transition: background var(--duration-fast) var(--ease-out-expo),
              color var(--duration-fast) var(--ease-out-expo);
}
.fb-chip.sm { padding: var(--chip-padding-sm); font: var(--chip-text-sm); height: var(--chip-h-sm); }
.fb-chip.lg { padding: var(--chip-padding-lg); font: var(--chip-text-lg); height: var(--chip-h-lg); }
.fb-chip.is-selected {
  background: var(--chip-bg-selected);
  color: var(--chip-color-selected);
}
.fb-chip[data-disabled] {
  color: var(--chip-color-disabled);
  cursor: not-allowed;
  pointer-events: none;
}

/* DROPMENU — container + items.
   Container is also reachable via .fb-popover (the more general alias);
   .fb-dropmenu names it explicitly when the call site is a dropdown menu. */
.fb-dropmenu {
  background: var(--dropmenu-bg);
  backdrop-filter: var(--dropmenu-blur);
  -webkit-backdrop-filter: var(--dropmenu-blur);
  border: var(--dropmenu-border);
  border-radius: var(--dropmenu-radius);
  padding: var(--dropmenu-padding);
  box-shadow: var(--dropmenu-shadow);
  display: flex; flex-direction: column;
}
.fb-dropmenu-item {
  display: flex; align-items: center;
  gap: var(--dropmenu-item-gap);
  padding: var(--dropmenu-item-padding);
  border-radius: var(--dropmenu-item-radius);
  height: var(--dropmenu-item-h-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--dropmenu-item-primary-color);
  font: var(--dropmenu-item-primary);
  box-sizing: border-box;
  transition: background var(--duration-fast) var(--ease-out-expo),
              color var(--duration-fast) var(--ease-out-expo);
}
.fb-dropmenu-item:hover,
.fb-dropmenu-item.is-hover {
  background: var(--dropmenu-item-hover-bg);
  color: var(--dropmenu-item-primary-hover);
}
.fb-dropmenu-item .secondary {
  font: var(--dropmenu-item-secondary);
  color: var(--dropmenu-item-secondary-color);
}
.fb-dropmenu-item[data-size="lg"] { height: var(--dropmenu-item-h-lg); }
.fb-dropmenu-item[data-size="xl"] { height: var(--dropmenu-item-h-xl); }

/* TAB NAV — underline-style tabs. Five sizes via [data-size]. Active
   state shown via .is-active; underline draws via the ::after border. */
.fb-tab-nav { display: inline-flex; align-items: center; gap: 24px; }
.fb-tab-item {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding-bottom: var(--tab-nav-gap-bottom);
  font: var(--tab-nav-text-md);
  color: var(--tab-nav-text-inactive-primary);
  background: transparent;
  border: none; cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out-expo);
}
.fb-tab-item .secondary {
  font-weight: var(--weight-medium);
  color: var(--tab-nav-text-inactive-secondary);
}
.fb-tab-item.is-active { color: var(--tab-nav-text-active-primary); }
.fb-tab-item.is-active .secondary { color: var(--tab-nav-text-active-secondary); }
.fb-tab-item::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--tab-nav-underline-h);
  background: var(--tab-nav-underline-color);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: opacity var(--duration-fast) var(--ease-out-expo),
              transform var(--duration-base) var(--ease-out-expo);
}
.fb-tab-item.is-active::after { opacity: 1; transform: scaleX(1); }
.fb-tab-item[data-size="xs"] { font: var(--tab-nav-text-xs); }
.fb-tab-item[data-size="sm"] { font: var(--tab-nav-text-sm); }
.fb-tab-item[data-size="md"] { font: var(--tab-nav-text-md); }
.fb-tab-item[data-size="lg"] { font: var(--tab-nav-text-lg); }
.fb-tab-item[data-size="xl"] { font: var(--tab-nav-text-xl); }

/* MODAL HEADER — narrow (with icon) or wide (no icon). Drop the icon as
   a child for the narrow variant; the wide variant ships icon-less. */
.fb-modal-header {
  position: relative;
  box-sizing: border-box;
  width: var(--modal-header-w);
  min-height: var(--modal-header-h);
  padding: var(--modal-header-padding);
  display: flex; flex-direction: column;
  gap: var(--modal-header-gap);
  align-items: center;
  border-bottom: var(--modal-header-border);
}
.fb-modal-header.wide {
  width: var(--modal-header-w-wide);
  min-height: var(--modal-header-h-wide);
}
.fb-modal-header__title {
  font: var(--modal-header-title);
  letter-spacing: var(--modal-header-title-tracking);
  color: var(--modal-header-title-color);
  text-align: center;
  margin: 0;
}
.fb-modal-header__desc {
  font: var(--modal-header-desc);
  color: var(--modal-header-desc-color);
  text-align: center;
  margin: 0;
}
.fb-modal-header__icon {
  width: var(--modal-header-icon-size);
  height: var(--modal-header-icon-size);
  border-radius: 50%;
  background: var(--badge-bg);
  backdrop-filter: var(--badge-blur);
  -webkit-backdrop-filter: var(--badge-blur);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-high-em);
}

/* ICON BUTTON — square icon-only. Default size = md (40px). Pass
   [data-size] to scale; [data-glass] swaps to the dark-glass fill. */
.fb-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--icon-btn-size-md);
  height: var(--icon-btn-size-md);
  border-radius: var(--icon-btn-radius-md);
  background: var(--icon-btn-bg-neutral);
  color: var(--icon-btn-color);
  border: none;
  cursor: pointer;
  box-sizing: border-box;
  flex: 0 0 auto;
  transition: background var(--duration-fast) var(--ease-out-expo);
}
.fb-icon-btn[data-size="xs"] { width: var(--icon-btn-size-xs); height: var(--icon-btn-size-xs); border-radius: var(--icon-btn-radius-xs); }
.fb-icon-btn[data-size="sm"] { width: var(--icon-btn-size-sm); height: var(--icon-btn-size-sm); border-radius: var(--icon-btn-radius-sm); }
.fb-icon-btn[data-size="md"] { width: var(--icon-btn-size-md); height: var(--icon-btn-size-md); border-radius: var(--icon-btn-radius-md); }
.fb-icon-btn[data-size="lg"] { width: var(--icon-btn-size-lg); height: var(--icon-btn-size-lg); border-radius: var(--icon-btn-radius-lg); }
.fb-icon-btn[data-size="xl"] { width: var(--icon-btn-size-xl); height: var(--icon-btn-size-xl); border-radius: var(--icon-btn-radius-xl); }
.fb-icon-btn[data-glass] {
  background: var(--icon-btn-bg-glass);
  backdrop-filter: var(--icon-btn-blur);
  -webkit-backdrop-filter: var(--icon-btn-blur);
}
.fb-icon-btn[data-disabled] {
  color: var(--icon-btn-color-disabled);
  cursor: not-allowed;
  pointer-events: none;
}
.fb-icon-btn svg {
  width: var(--icon-btn-icon-md); height: var(--icon-btn-icon-md);
}
.fb-icon-btn[data-size="xs"] svg { width: var(--icon-btn-icon-xs); height: var(--icon-btn-icon-xs); }
.fb-icon-btn[data-size="sm"] svg { width: var(--icon-btn-icon-sm); height: var(--icon-btn-icon-sm); }
.fb-icon-btn[data-size="md"] svg { width: var(--icon-btn-icon-md); height: var(--icon-btn-icon-md); }
.fb-icon-btn[data-size="lg"] svg { width: var(--icon-btn-icon-lg); height: var(--icon-btn-icon-lg); }
.fb-icon-btn[data-size="xl"] svg { width: var(--icon-btn-icon-xl); height: var(--icon-btn-icon-xl); }

/* DROP-ZONE — fig Toolbox-Components Upload (4 states × 2 sizes).
   Markup: <div class="fb-dropzone" data-status="default|active|loading|uploaded"
                                    [data-size="s"]>
             <span class="fb-dropzone__help">…optional help icon…</span>
             <span class="fb-dropzone__icon">…default/active glyph…</span>
             <div class="fb-dropzone__text">
               <span class="fb-dropzone__title">…title…</span>
               <span class="fb-dropzone__helper">…helper…</span>
               <span class="fb-dropzone__format">…format hint…</span>
             </div>
             <button class="fb-dropzone__btn">Browse File</button>
             …or for loading:
             <span class="fb-dropzone__progress"></span>
             …or for uploaded:
             <div class="fb-dropzone__footer">duration + delete</div>
           </div>

   Loading/uploaded states use `background-image` set inline on the
   element. Token defaults assume a placeholder gradient — replace via
   `style="background: url(…) center/cover"` in product. */
.fb-dropzone {
  position: relative;
  box-sizing: border-box;
  width: var(--dropzone-w-l);
  height: var(--dropzone-h-l);
  padding: var(--dropzone-padding-l);
  gap: var(--dropzone-gap-l);
  border-radius: var(--dropzone-radius);
  backdrop-filter: var(--dropzone-blur);
  -webkit-backdrop-filter: var(--dropzone-blur);
  background: var(--dropzone-bg-default);
  border: var(--dropzone-border-default);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  overflow: hidden;
}
.fb-dropzone[data-size="s"] {
  width: var(--dropzone-w-s);
  height: var(--dropzone-h-s);
  padding: var(--dropzone-padding-s);
  gap: var(--dropzone-gap-s);
}
.fb-dropzone[data-status="active"] {
  background: var(--dropzone-bg-active);
  border: var(--dropzone-border-active);
}
.fb-dropzone[data-status="loading"],
.fb-dropzone[data-status="uploaded"] {
  border: var(--dropzone-border-loaded);
  padding: 14px;
}
.fb-dropzone[data-status="loading"]::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--dropzone-overlay-loading);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.fb-dropzone[data-status="uploaded"]::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: var(--dropzone-mask-h-l);
  background: var(--dropzone-mask);
  pointer-events: none;
}
.fb-dropzone[data-size="s"][data-status="uploaded"]::after {
  height: var(--dropzone-mask-h-s);
}

.fb-dropzone__icon {
  position: relative;
  width: 24px; height: 24px;
  color: var(--color-white-72);
  line-height: 0;
  flex: 0 0 auto;
}
.fb-dropzone__help {
  position: absolute;
  top: 10px; right: 10px;
  width: 16px; height: 16px;
  color: var(--color-white-32);
  line-height: 0;
}
.fb-dropzone__text {
  position: relative;
  display: flex; flex-direction: column; gap: 6px;
  align-items: center;
}
.fb-dropzone__title {
  font: var(--dropzone-title-l);
  color: var(--dropzone-title-color);
  margin: 0;
}
.fb-dropzone[data-size="s"] .fb-dropzone__title {
  font: var(--dropzone-title-s);
}
.fb-dropzone__helper {
  font: var(--dropzone-helper);
  color: var(--dropzone-helper-color);
  margin: 0;
}
.fb-dropzone__format {
  display: inline-flex; align-items: center; gap: 8px;
  font: var(--dropzone-format);
  color: var(--dropzone-format-color);
  margin: 0;
}
.fb-dropzone__btn {
  position: relative;
  height: 40px; padding: 0 16px;
  border-radius: 10px;
  background: var(--color-white-9);
  color: var(--color-white-100);
  font: 500 13px/40px var(--font-sans);
  border: none;
  cursor: pointer;
}
.fb-dropzone__progress {
  position: relative;
  width: var(--dropzone-progress-w);
  height: var(--dropzone-progress-h);
  background: var(--dropzone-progress-bg);
  border-radius: 7px;
}
.fb-dropzone__footer {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.fb-dropzone__duration {
  display: inline-flex; align-items: center; gap: 6px;
  font: var(--dropzone-duration);
  color: var(--dropzone-duration-color);
}
.fb-dropzone__delete {
  color: var(--color-white-100);
  line-height: 0;
  cursor: pointer;
}
.fb-dropzone[data-size="s"] .fb-dropzone__footer { justify-content: center; }

/* UPLOAD STYLE-CARD — compact 96.83 tile from fig /external-shared/StateUpload.
   Drop into a row of style cards as the "add your own" affordance. */
.fb-upload-stylecard {
  position: relative;
  width: var(--stylecard-upload-tile-w);
  height: var(--stylecard-upload-tile-h);
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  background: transparent;
  border: none; padding: 0;
  cursor: pointer;
  color: var(--stylecard-upload-glyph-color);
}
.fb-upload-stylecard__card {
  position: relative;
  width: var(--stylecard-upload-card-size);
  height: var(--stylecard-upload-card-size);
  border-radius: var(--stylecard-upload-card-radius);
  background: var(--stylecard-upload-card-bg);
  border: var(--stylecard-upload-card-border);
  backdrop-filter: var(--stylecard-upload-card-blur);
  -webkit-backdrop-filter: var(--stylecard-upload-card-blur);
  padding: var(--stylecard-upload-card-padding);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  box-sizing: border-box;
  transition: background var(--duration-fast) var(--ease-out-expo),
              border-color var(--duration-fast) var(--ease-out-expo);
}
.fb-upload-stylecard:hover .fb-upload-stylecard__card,
.fb-upload-stylecard.is-active .fb-upload-stylecard__card {
  background: var(--stylecard-upload-card-bg-hover);
  border: var(--stylecard-upload-card-border-hover);
}
.fb-upload-stylecard__glyph {
  width: var(--stylecard-upload-glyph-size);
  height: var(--stylecard-upload-glyph-size);
  color: var(--stylecard-upload-glyph-color);
  flex: 0 0 auto;
}
.fb-upload-stylecard__text,
.fb-upload-stylecard__label {
  font: var(--stylecard-upload-text);
  color: var(--stylecard-upload-text-color);
  text-align: center;
  margin: 0;
}

/* Legacy aliases — older mocks reference `.fb-upload` for the style-card */
.fb-upload                  { all: revert; }
.fb-upload                  { display: contents; }
.fb-upload__card,
.fb-upload__glyph,
.fb-upload__inline-text,
.fb-upload__help,
.fb-upload__label           { /* preserved selectors — see legacy block */ }

/* Restore the prior style-card recipe under the legacy class names so any
   existing markup keeps rendering. New code should use .fb-upload-stylecard
   or .fb-dropzone. */
.fb-upload {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  position: relative;
  position: relative;
  width: var(--upload-tile-w);
  height: var(--upload-tile-h);
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  background: transparent;
  border: none; padding: 0;
  cursor: pointer;
  color: var(--upload-glyph-color);
}
.fb-upload__card {
  position: relative;
  width: var(--upload-card-size);
  height: var(--upload-card-size);
  border-radius: var(--upload-card-radius);
  background: var(--upload-card-bg);
  border: var(--upload-card-border);
  backdrop-filter: var(--upload-card-blur);
  -webkit-backdrop-filter: var(--upload-card-blur);
  padding: var(--upload-card-padding);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  box-sizing: border-box;
  transition: background var(--duration-fast) var(--ease-out-expo),
              border-color var(--duration-fast) var(--ease-out-expo);
}
.fb-upload:hover .fb-upload__card,
.fb-upload.is-active .fb-upload__card {
  background: var(--upload-card-bg-hover);
  border: var(--upload-card-border-hover);
}
.fb-upload__glyph {
  width: var(--upload-glyph-size);
  height: var(--upload-glyph-size);
  color: var(--upload-glyph-color);
  flex: 0 0 auto;
}
.fb-upload__inline-text {
  font: var(--upload-inline-text);
  color: var(--upload-inline-color);
  text-align: center;
  margin: 0;
}
.fb-upload__help {
  position: absolute; top: 8px; right: 8px;
  width: 16px; height: 16px;
  color: var(--color-white-48);
  line-height: 0;
}
.fb-upload__label {
  font: var(--upload-label);
  color: var(--upload-label-color);
  text-align: center;
  margin: 0;
}

/* RICH TOOLTIP — body + optional feature-icon + media + CTAs.
   Default direction = bottom_center (pointer below the body, pointing down).
   Use [data-direction] to flip pointer to top/left/right/top_right. */
.fb-tooltip-rich {
  position: relative;
  width: var(--tooltip-rich-w);
  min-height: var(--tooltip-rich-h);
  background: var(--tooltip-rich-bg);
  backdrop-filter: var(--tooltip-rich-blur);
  -webkit-backdrop-filter: var(--tooltip-rich-blur);
  border-radius: var(--tooltip-rich-radius);
  padding: var(--tooltip-rich-padding);
  box-shadow: var(--tooltip-rich-shadow);
  display: flex; flex-direction: column;
  gap: var(--tooltip-rich-gap);
  box-sizing: border-box;
}
.fb-tooltip-rich__icon {
  width: var(--tooltip-rich-icon-size);
  height: var(--tooltip-rich-icon-size);
  border-radius: var(--tooltip-rich-icon-radius);
  background: var(--tooltip-rich-icon-bg);
  box-shadow: var(--tooltip-rich-icon-shadow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-high-em);
  flex: 0 0 auto;
}
.fb-tooltip-rich__title {
  font: var(--tooltip-rich-title);
  color: var(--tooltip-rich-title-color);
  margin: 0;
}
.fb-tooltip-rich__desc {
  font: var(--tooltip-rich-desc);
  color: var(--tooltip-rich-desc-color);
  margin: 0;
}
.fb-tooltip-rich__media {
  border-radius: var(--tooltip-rich-media-radius);
  box-shadow: var(--tooltip-rich-media-shadow);
  overflow: hidden;
  background: var(--color-white-9);
}
.fb-tooltip-rich__pointer {
  position: absolute;
  width: var(--tooltip-rich-pointer-w);
  height: var(--tooltip-rich-pointer-h);
  background: var(--tooltip-rich-bg);
  border-radius: 1.5px;
  pointer-events: none;
}
.fb-tooltip-rich[data-direction="bottom_center"] .fb-tooltip-rich__pointer,
.fb-tooltip-rich:not([data-direction]) .fb-tooltip-rich__pointer {
  left: 50%; bottom: -4px;
  transform: translateX(-50%) rotate(45deg);
}
.fb-tooltip-rich[data-direction="top_center"] .fb-tooltip-rich__pointer {
  left: 50%; top: -4px;
  transform: translateX(-50%) rotate(45deg);
}
.fb-tooltip-rich[data-direction="left_center"] .fb-tooltip-rich__pointer {
  top: 50%; left: -4px;
  transform: translateY(-50%) rotate(45deg);
}
.fb-tooltip-rich[data-direction="right_center"] .fb-tooltip-rich__pointer {
  top: 50%; right: -4px;
  transform: translateY(-50%) rotate(45deg);
}

/* SCROLLER — apply .fb-scroll to a scrollable container to get the fig
   webkit scrollbar treatment. Works in Chrome/Safari/Edge; Firefox falls
   back to its native theme. */
.fb-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--scroller-thumb-bg) transparent;
}
.fb-scroll::-webkit-scrollbar {
  width: var(--scroller-track-w);
  height: var(--scroller-track-w);
}
.fb-scroll::-webkit-scrollbar-track { background: transparent; }
.fb-scroll::-webkit-scrollbar-thumb {
  background: var(--scroller-thumb-bg);
  border-radius: var(--scroller-thumb-radius);
  border: 2px solid transparent;
  background-clip: padding-box;
  min-height: var(--scroller-thumb-min-h);
  backdrop-filter: var(--scroller-thumb-blur);
  -webkit-backdrop-filter: var(--scroller-thumb-blur);
}
.fb-scroll::-webkit-scrollbar-thumb:hover  { background: var(--scroller-thumb-bg-hover);  background-clip: padding-box; }
.fb-scroll::-webkit-scrollbar-thumb:active { background: var(--scroller-thumb-bg-active); background-clip: padding-box; }

/* SLIDER — apply to a wrapper containing [data-track] + [data-fill] + [data-thumb].
   Or use as a track on a <div role="slider"> directly. */
.fb-slider-track {
  position: relative;
  height: var(--slider-track-h);
  background: var(--slider-track-bg);
  border-radius: var(--slider-track-radius);
}
.fb-slider-fill {
  position: absolute; left: 0; top: 0; height: 100%;
  background: var(--slider-fill);
  border-radius: var(--slider-fill-radius);
}
.fb-slider-thumb {
  position: absolute; top: 50%;
  width: var(--slider-thumb-size); height: var(--slider-thumb-size);
  background: var(--slider-thumb-bg);
  border-radius: 50%;
  box-shadow: var(--slider-thumb-shadow);
  transform: translate(-50%, -50%);
}
.fb-slider-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  padding: var(--slider-tooltip-padding);
  background: var(--slider-tooltip-bg);
  color: var(--slider-tooltip-color);
  font: var(--slider-tooltip-font);
  border-radius: var(--slider-tooltip-radius);
  box-shadow: var(--slider-tooltip-shadow);
  pointer-events: none;
  white-space: nowrap;
}
.fb-slider-tooltip::after {
  content: "";
  position: absolute;
  left: 50%; top: 100%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--slider-tooltip-bg);
}

/* SWITCHER — container + items */
.fb-switcher {
  display: inline-flex; align-items: center;
  background: var(--switcher-bg);
  border: var(--switcher-border);
  border-radius: var(--switcher-radius);
  padding: var(--switcher-padding);
  gap: var(--switcher-gap);
}
.fb-switcher-item {
  border: 1px solid transparent;
  border-radius: var(--switcher-item-radius);
  padding: 4px 8px;
  font: var(--weight-medium) 12px/16px var(--font-sans);
  color: var(--switcher-item-inactive-color);
  background: transparent;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out-expo);
}
.fb-switcher-item.is-active {
  background: var(--switcher-item-active-bg);
  border: var(--switcher-item-active-border);
  box-shadow: var(--switcher-item-active-shadow);
  color: var(--switcher-item-color);
}

/* TOGGLE — track + thumb. Toggle ON via [data-on], disabled via [data-disabled].
   Render the thumb as a child .fb-toggle-thumb element (works with screenshot
   renderers that ignore CSS pseudo-elements). */
.fb-toggle {
  position: relative;
  width: var(--toggle-track-w);
  height: var(--toggle-track-h);
  border-radius: var(--toggle-track-radius);
  background: var(--toggle-track-off-bg);
  padding: var(--toggle-track-padding);
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out-expo);
}
.fb-toggle[data-on] {
  background: var(--toggle-track-on-bg);
  justify-content: flex-end;
}
.fb-toggle-thumb {
  display: block;
  flex: 0 0 auto;
  width: var(--toggle-pointer-w);
  height: var(--toggle-pointer-h);
  border-radius: var(--toggle-pointer-radius);
  background: var(--toggle-pointer-off-bg);
  box-shadow: var(--toggle-pointer-shadow);
}
.fb-toggle[data-on] .fb-toggle-thumb { background: var(--toggle-pointer-on-bg); }
.fb-toggle[data-disabled] .fb-toggle-thumb { background: var(--toggle-pointer-disabled-bg); }

/* ---------- BRAND-TEXT GRADIENT HELPER ----------------------------- *
 * Apply to a heading to mask the Neon Pulse gradient onto the type.
 * Use sparingly — hero / headline only. */
.fb-text-neon-pulse,
.fb-brand-text {
  background: var(--gradient-neon-pulse);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ===================================================================
 * OPTICAL-SIZE STATICS — five size-tuned families
 *
 * Variable face 'Google Sans Flex' (declared above) handles opsz natively,
 * but designers sometimes need a hand-tuned snapshot at a specific
 * optical size (icon caption vs hero headline). These five families
 * expose the static cuts shipped in /fonts as separate font-family
 * names. Pick by use:
 *
 *   --font-sans-9pt    badges, captions, small numerals
 *   --font-sans-24pt   body / UI labels (default reading)
 *   --font-sans-36pt   subheads / section titles
 *   --font-sans-72pt   page titles / strong heading
 *   --font-sans-120pt  hero display, marketing
 *
 * Each family carries the nine static weights 100→900.
 * ================================================================= */

/* --- 9pt --- */
@font-face {
  font-family: 'Google Sans Flex 9pt';
  src: url('./fonts/GoogleSansFlex_9pt-Thin.ttf') format('truetype');
  font-weight: 100; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 9pt';
  src: url('./fonts/GoogleSansFlex_9pt-ExtraLight.ttf') format('truetype');
  font-weight: 200; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 9pt';
  src: url('./fonts/GoogleSansFlex_9pt-Light.ttf') format('truetype');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 9pt';
  src: url('./fonts/GoogleSansFlex_9pt-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 9pt';
  src: url('./fonts/GoogleSansFlex_9pt-Medium.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 9pt';
  src: url('./fonts/GoogleSansFlex_9pt-SemiBold.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 9pt';
  src: url('./fonts/GoogleSansFlex_9pt-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 9pt';
  src: url('./fonts/GoogleSansFlex_9pt-ExtraBold.ttf') format('truetype');
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 9pt';
  src: url('./fonts/GoogleSansFlex_9pt-Black.ttf') format('truetype');
  font-weight: 900; font-style: normal; font-display: swap;
}

/* --- 24pt --- */
@font-face {
  font-family: 'Google Sans Flex 24pt';
  src: url('./fonts/GoogleSansFlex_24pt-Thin.ttf') format('truetype');
  font-weight: 100; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 24pt';
  src: url('./fonts/GoogleSansFlex_24pt-ExtraLight.ttf') format('truetype');
  font-weight: 200; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 24pt';
  src: url('./fonts/GoogleSansFlex_24pt-Light.ttf') format('truetype');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 24pt';
  src: url('./fonts/GoogleSansFlex_24pt-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 24pt';
  src: url('./fonts/GoogleSansFlex_24pt-Medium.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 24pt';
  src: url('./fonts/GoogleSansFlex_24pt-SemiBold.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 24pt';
  src: url('./fonts/GoogleSansFlex_24pt-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 24pt';
  src: url('./fonts/GoogleSansFlex_24pt-ExtraBold.ttf') format('truetype');
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 24pt';
  src: url('./fonts/GoogleSansFlex_24pt-Black.ttf') format('truetype');
  font-weight: 900; font-style: normal; font-display: swap;
}

/* --- 36pt --- */
@font-face {
  font-family: 'Google Sans Flex 36pt';
  src: url('./fonts/GoogleSansFlex_36pt-Thin.ttf') format('truetype');
  font-weight: 100; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 36pt';
  src: url('./fonts/GoogleSansFlex_36pt-ExtraLight.ttf') format('truetype');
  font-weight: 200; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 36pt';
  src: url('./fonts/GoogleSansFlex_36pt-Light.ttf') format('truetype');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 36pt';
  src: url('./fonts/GoogleSansFlex_36pt-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 36pt';
  src: url('./fonts/GoogleSansFlex_36pt-Medium.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 36pt';
  src: url('./fonts/GoogleSansFlex_36pt-SemiBold.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 36pt';
  src: url('./fonts/GoogleSansFlex_36pt-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 36pt';
  src: url('./fonts/GoogleSansFlex_36pt-ExtraBold.ttf') format('truetype');
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 36pt';
  src: url('./fonts/GoogleSansFlex_36pt-Black.ttf') format('truetype');
  font-weight: 900; font-style: normal; font-display: swap;
}

/* --- 72pt --- */
@font-face {
  font-family: 'Google Sans Flex 72pt';
  src: url('./fonts/GoogleSansFlex_72pt-Thin.ttf') format('truetype');
  font-weight: 100; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 72pt';
  src: url('./fonts/GoogleSansFlex_72pt-ExtraLight.ttf') format('truetype');
  font-weight: 200; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 72pt';
  src: url('./fonts/GoogleSansFlex_72pt-Light.ttf') format('truetype');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 72pt';
  src: url('./fonts/GoogleSansFlex_72pt-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 72pt';
  src: url('./fonts/GoogleSansFlex_72pt-Medium.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 72pt';
  src: url('./fonts/GoogleSansFlex_72pt-SemiBold.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 72pt';
  src: url('./fonts/GoogleSansFlex_72pt-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 72pt';
  src: url('./fonts/GoogleSansFlex_72pt-ExtraBold.ttf') format('truetype');
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 72pt';
  src: url('./fonts/GoogleSansFlex_72pt-Black.ttf') format('truetype');
  font-weight: 900; font-style: normal; font-display: swap;
}

/* --- 120pt --- */
@font-face {
  font-family: 'Google Sans Flex 120pt';
  src: url('./fonts/GoogleSansFlex_120pt-Thin.ttf') format('truetype');
  font-weight: 100; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 120pt';
  src: url('./fonts/GoogleSansFlex_120pt-ExtraLight.ttf') format('truetype');
  font-weight: 200; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 120pt';
  src: url('./fonts/GoogleSansFlex_120pt-Light.ttf') format('truetype');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 120pt';
  src: url('./fonts/GoogleSansFlex_120pt-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 120pt';
  src: url('./fonts/GoogleSansFlex_120pt-Medium.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 120pt';
  src: url('./fonts/GoogleSansFlex_120pt-SemiBold.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 120pt';
  src: url('./fonts/GoogleSansFlex_120pt-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 120pt';
  src: url('./fonts/GoogleSansFlex_120pt-ExtraBold.ttf') format('truetype');
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Google Sans Flex 120pt';
  src: url('./fonts/GoogleSansFlex_120pt-Black.ttf') format('truetype');
  font-weight: 900; font-style: normal; font-display: swap;
}

:root, [data-fb-theme], [data-fb-primitives], [data-fb-color-type], [data-fb-radius], [data-fb-space], [data-fb-font], [data-fb-typography] {
  --font-sans-9pt:   'Google Sans Flex 9pt',   'Google Sans Flex', system-ui, -apple-system, sans-serif;
  --font-sans-24pt:  'Google Sans Flex 24pt',  'Google Sans Flex', system-ui, -apple-system, sans-serif;
  --font-sans-36pt:  'Google Sans Flex 36pt',  'Google Sans Flex', system-ui, -apple-system, sans-serif;
  --font-sans-72pt:  'Google Sans Flex 72pt',  'Google Sans Flex', system-ui, -apple-system, sans-serif;
  --font-sans-120pt: 'Google Sans Flex 120pt', 'Google Sans Flex', system-ui, -apple-system, sans-serif;
}
