/* ==============================================================
   reactlive-surface — Surface UI Kit
   Admin & dashboard surfaces, HeroUI Pro flavor.
   Design tokens: see docs/design-system.md
   ============================================================== */

/* Self-hosted Inter. Must stay above every rule — @import is only
   valid at the top of a stylesheet.

   Manrope was tried here and reverted — rejected as hard to read. See
   §13/§15 of SESSION-CHANGES-v8.6.md if it ever comes back up; the two
   things that bit were its 200-800 weight axis (no 900) and its subsets
   not covering `→` U+2192 or `★` U+2605, both of which this app renders. */
@import url('fonts/inter.css');
@import url('fonts/reactlive.css');

/* ── Design Tokens ───────────────────────────────────────────────
   HeroUI v3 token system (alpha-36 source). Highlights:
     • Accent is azure (`#3B82F6`) in light and its 400 step (`#60A5FA`)
       in dark — see the Accent block. Legacy `--rlx-primary` aliases to
       `--rlx-accent` so v2-era code keeps rendering correctly.
     • v3 drops `secondary` (purple) — `--rlx-secondary` also aliases
       to accent so anything still referencing it stays usable.
     • Surface ramp collapses from 4 → 3 (`surface-1/2/3`). The legacy
       `content1-4` names alias onto the v3 ramp.
     • Status colors switched to v3 OKLCH defaults. They render exact
       in modern browsers; the RGB triplets below are approximations
       for the kit's `rgb(var(--*-rgb) / opacity)` overlay pattern.
   ────────────────────────────────────────────────────────────── */
:root {
  /* ── Base anchors ── */
  --rlx-white:   #FFFFFF;
  --rlx-black:   #000000;
  --rlx-snow:    #FCFCFC;   /* v3 oklch(0.9911 0 0) */
  --rlx-eclipse: #1B1B1B;   /* v3 oklch(0.2221 0 0) */

  /* ── Neutral scale (Tailwind v4 neutral, what v3's accent reads from) ── */
  --rlx-neutral-50:  #FAFAFA;
  --rlx-neutral-100: #F5F5F5;
  --rlx-neutral-200: #E5E5E5;
  --rlx-neutral-300: #D4D4D4;
  --rlx-neutral-400: #ADADAD;
  --rlx-neutral-500: #737373;
  --rlx-neutral-600: #525252;
  --rlx-neutral-700: #404040;
  --rlx-neutral-800: #262626;
  --rlx-neutral-900: #171717;
  --rlx-neutral-950: #0A0A0A;

  /* The `default` scale aliases to the neutral scale (was zinc in v2). */
  --rlx-default-50:  var(--rlx-neutral-50);
  --rlx-default-100: var(--rlx-neutral-100);
  --rlx-default-200: var(--rlx-neutral-200);
  --rlx-default-300: var(--rlx-neutral-300);
  --rlx-default-400: var(--rlx-neutral-400);
  --rlx-default-500: var(--rlx-neutral-500);
  --rlx-default-600: var(--rlx-neutral-600);
  --rlx-default-700: var(--rlx-neutral-700);
  --rlx-default-800: var(--rlx-neutral-800);
  --rlx-default-900: var(--rlx-neutral-900);

  /* ════════════════════════════════════════════════════════
     v3 image-derived token set (light)
     Tokens are grouped exactly the way the docs page groups
     them: Background / Surface / Separator / Foreground /
     Form field / Default / Accent / Danger / Warning / Success.
     Most groups carry the base + secondary/tertiary or
     hover/soft/soft-hover/soft-foreground variants the docs show.
     ════════════════════════════════════════════════════════ */

  /* ── Cool neutrals — the light theme's surface greys ──
     Tinted toward the accent, the way the dark theme's surfaces already are
     (#141926 carries +18 blue over red, #1E2433 carries +21). The Tailwind
     neutral ramp above is dead neutral (+0), so a saturated accent element
     sitting on it — a selected segmented-control thumb, a primary button on a
     panel — reads as belonging to a different palette than its own backdrop.
     Each value stays within ~1% luminance of the grey it replaces, so the
     contrast ratios documented below are unaffected; only the hue moves. */
  /* ── Reference palette — "MildUI Environment" ──
     The named palette, taken verbatim except where noted. Nine colours in four
     groups: two canvas atmospheres, two surfaces, two inks, three pastel
     accents — plus the brand azure, which is the one saturated colour in the
     set and the only one that is not from the named palette. The neutral
     family carries a consistent cool-blue bias (Surface Alt is +4 blue over
     red) where the previous reference was grey-green, so the azure sits in it
     rather than on top of it. Everything else in this file reads the palette
     through these tokens; nothing else should hardcode a brand hex. */
  /* The brand azure. Every accent role in both themes derives from this or
     from a step of the same ramp — see the Accent block and --rlx-primary-N. */
  --rlx-ref-azure:    #3B82F6;   /* Azure       — the accent               */
  --rlx-ref-ground:   #D7DFE9;   /* Mist Blue   — page ground             */
  --rlx-ref-ground-2: #D9E1DB;   /* Sage Mist   — warmer ground variant   */
  --rlx-ref-ink:      #1F2024;   /* Charcoal    — headings, filled buttons */
  /* Muted Gray, verbatim. It clears AA exactly where the palette assigns it —
     "secondary text, icons and supportive elements" on a surface: 4.91 on
     white, 4.54 on Surface Alt. It does NOT clear on any of the grounds or
     accents (3.66 on Mist Blue, 3.14 on Sage Green), so secondary text placed
     straight on a canvas needs a local step down — see .pcd-sidebar, which
     does exactly that. Previously #686868, which cleared by a wider margin but
     was not a palette colour. */
  --rlx-ref-sub:      #6B717B;   /* Muted Gray  — secondary text          */
  --rlx-ref-fill:     #F4F6F8;   /* Surface Alt — list rows, fills        */
  /* Not in the palette: it names no hairline. Derived by taking the old
     #E7E7E7 and applying Surface Alt's own tint ratio, so it sits in the
     family at unchanged luminance (+0.005). */
  --rlx-ref-line:     #E5E8EC;   /* hairlines, pill outlines  (derived)   */
  /* Lavender under a second name. It was --rlx-accent-soft's source while the
     accent was ink; the accent is azure now and washes down to its own ramp,
     so nothing reads this — kept because the palette names it, and because
     spark.css still overrides it. --rlx-ref-violet is the live alias. */
  --rlx-ref-info:     #C9D1E3;   /* Lavender    — unconsumed, see above   */
  --rlx-ref-violet:   #C9D1E3;   /* Lavender    — accent 1                */
  --rlx-ref-sage:     #BFD5B8;   /* Sage Green  — accent 2                */
  --rlx-ref-lime:     #EEF59A;   /* Lemon Lime  — accent 3                */

  /* ── Semantic palette — "MildUI Semantic" ──
     Six status colours built to sit in the same environment: same softness,
     same chroma range as the three accents above. They are FILLS, not text.
     None of them clears 3:1 as text on white (1.31 to 2.22), so every one of
     them takes ink on top, and the "coloured text" case — a danger menu item,
     a warning label — is served by the -soft-foreground of each block below,
     which is the same hue darkened until it clears. */
  --rlx-ref-danger:       #E79A95;   /* critical, destructive     */
  --rlx-ref-warning:      #F2C27B;   /* caution, potential risk   */
  --rlx-ref-important:    #C9B7F2;   /* high priority, key info   */
  --rlx-ref-notification: #AFCFF5;   /* informational, unread     */
  --rlx-ref-success:      #BFD8A6;   /* completed, positive       */
  --rlx-ref-attention:    #E8E58E;   /* needs review              */

  /* Re-tinted from violet-grey into the palette's blue family, and terminating
     on Mist Blue so the ramp ends on a palette colour rather than near one.
     The top two hold the old ~1% luminance budget; 200 and 300 run +3% and
     +5% lighter, which only ever raises the contrast of what sits on them. */
  --rlx-cool-50:  #F9FBFD;
  --rlx-cool-100: #F4F6F8;   /* = Surface Alt */
  --rlx-cool-200: #E7EBF0;
  --rlx-cool-300: #D7DFE9;   /* = Mist Blue   */

  /* ── Background group ── */
  --rlx-background:           var(--rlx-ref-ground);    /* pale grey-green ground */
  --rlx-background-secondary: var(--rlx-cool-100);
  --rlx-background-tertiary:  var(--rlx-cool-200);
  --rlx-background-inverse:   var(--rlx-neutral-950);

  /* ── Surface group ── */
  --rlx-surface:              var(--rlx-white);
  --rlx-surface-secondary:    var(--rlx-ref-fill);
  --rlx-surface-tertiary:     var(--rlx-cool-200);

  /* ── Separator group (low contrast) ── */
  --rlx-separator:            var(--rlx-ref-line);
  --rlx-separator-secondary:  var(--rlx-cool-300);
  --rlx-separator-tertiary:   #B3BAC6;   /* re-tinted into the blue family, dL +0.009 */

  /* ── Foreground group ── */
  /* Darkened from --rlx-eclipse (#1B1B1B, the v3 value) to the ramp's darkest
     step. Not a contrast fix — eclipse already ran 17.2:1 on a card — but a
     density one: the default text now reads heavier against the kit's white
     surfaces and the console's canvas. --rlx-text and --rlx-text-strong alias
     this, so all body copy and headings follow.
     Deliberately NOT applied to the other --rlx-eclipse consumers: link, field
     and the on-fill foregrounds (default / warning / success) still take the
     v3 value, since text sitting on a coloured fill is a different job. */
  --rlx-foreground:           var(--rlx-ref-ink);
  /* Darkened from neutral-500 (#737373, ~3.76:1 on #E5E5E5 — fails AA)
     to #5b5b5b (~5.39:1 on #E5E5E5) so muted text clears 4.5:1 on the
     content2/content3 surfaces while staying clearly muted vs foreground. */
  --rlx-foreground-muted:     var(--rlx-ref-sub);
  --rlx-foreground-segment:   var(--rlx-white);
  --rlx-foreground-overlay:   var(--rlx-white);
  --rlx-foreground-link:      var(--rlx-eclipse);

  /* ── Form field group ── */
  --rlx-field-bg:             var(--rlx-white);
  --rlx-field-bg-hover:       var(--rlx-cool-200);
  --rlx-field-bg-focus:       var(--rlx-white);
  --rlx-field-foreground:     var(--rlx-eclipse);
  --rlx-field-placeholder:    var(--rlx-neutral-500);

  /* ── Default semantic (neutral chip) ── */
  --rlx-default:              var(--rlx-cool-100);
  --rlx-default-hover:        var(--rlx-cool-200);
  --rlx-default-foreground:   var(--rlx-eclipse);

  /* ── Accent (azure) ── */
  /* The accent is the brand azure again, after a spell as ink. A filled
     control is a blue pill with a white label, and the three pastels go back
     to carrying categorical colour rather than all colour. hover / soft /
     soft-hover / soft-foreground are the ramp's own steps (600 / 100 / 200 /
     700), so the whole block moves together if the base ever moves.

     CONTRAST — the one thing to know about this accent: white on #3B82F6 is
     3.68:1. That clears the 3:1 that non-text UI (fills, borders, focus
     rings) is held to, and the 3:1 for large text, but NOT the 4.5:1 for
     normal-size text. A filled control carrying a 13-14px label is therefore
     below AA on its label. --rlx-accent-hover (#2563EB, 5.17:1) clears it, so
     swapping base and hover is the fix if that becomes a requirement. */
  --rlx-accent:                 var(--rlx-ref-azure);
  --rlx-accent-hover:           #2563EB;   /* White on it: 5.17:1 */
  --rlx-accent-foreground:      var(--rlx-white);
  --rlx-accent-soft:            #DBEAFE;
  --rlx-accent-soft-hover:      #BFDBFE;   /* Charcoal on it: 12.79:1 */
  --rlx-accent-soft-foreground: #1D4ED8;   /* 6.68 white · 5.47 soft */

  /* ── Status blocks ──
     Six tokens each, and the shape carries the whole rule for using them:

       --rlx-X                 the palette colour. A FILL.
       --rlx-X-hover           same hue, one step down.
       --rlx-X-foreground      what goes ON the fill. Ink, on all six.
       --rlx-X-soft            pale wash of the same hue.
       --rlx-X-soft-hover      the wash, one step up.
       --rlx-X-soft-foreground the hue darkened until it is legible. This is
                               the ONLY one of the six that may be text.

     hover / soft / soft-hover / soft-foreground are derived, holding hue and
     saturation and moving lightness only — the palette names the base and
     nothing else. Each soft-foreground is the darkest step that clears 4.5:1
     on white, on Surface Alt, and on its own soft wash simultaneously. */

  /* ── Status: Danger ── */
  --rlx-danger:                 var(--rlx-ref-danger);
  --rlx-danger-hover:           #DF7872;
  --rlx-danger-foreground:      var(--rlx-foreground);   /* 7.33:1 */
  --rlx-danger-soft:            #F6D9D7;
  --rlx-danger-soft-hover:      #F2C6C4;
  --rlx-danger-soft-foreground: #B53229;                 /* 6.08 white · 4.58 soft */

  /* ── Status: Warning ── */
  --rlx-warning:                 var(--rlx-ref-warning);
  --rlx-warning-hover:           #EEB054;
  --rlx-warning-foreground:      var(--rlx-foreground);  /* 9.90:1 */
  --rlx-warning-soft:            #FAE8CD;
  --rlx-warning-soft-hover:      #F8DDB5;
  --rlx-warning-soft-foreground: #935D0E;                /* 5.51 white · 4.59 soft */

  /* ── Status: Success ── */
  --rlx-success:                 var(--rlx-ref-success);
  --rlx-success-hover:           #A9CB88;
  --rlx-success-foreground:      var(--rlx-foreground);  /* 10.53:1 */
  --rlx-success-soft:            #E7F0DD;
  --rlx-success-soft-hover:      #DBE9CD;
  --rlx-success-soft-foreground: #547533;                /* 5.29 white · 4.51 soft */

  /* ── Status: Notification ── */
  --rlx-notification:                 var(--rlx-ref-notification);
  --rlx-notification-hover:           #88B8F0;
  --rlx-notification-foreground:      var(--rlx-foreground);  /* 10.13:1 */
  --rlx-notification-soft:            #E1EDFB;
  --rlx-notification-soft-hover:      #D2E4F9;
  --rlx-notification-soft-foreground: #1967C5;                /* 5.54 white · 4.68 soft */

  /* ── Status: Important ── */
  --rlx-important:                 var(--rlx-ref-important);
  --rlx-important-hover:           #AD92EB;
  --rlx-important-foreground:      var(--rlx-foreground);     /* 8.94:1 */
  --rlx-important-soft:            #EAE4FA;
  --rlx-important-soft-hover:      #E1D7F8;
  --rlx-important-soft-foreground: #7547DE;                   /* 5.66 white · 4.57 soft */

  /* ── Status: Attention ── */
  --rlx-attention:                 var(--rlx-ref-attention);
  --rlx-attention-hover:           #E1DD6A;
  --rlx-attention-foreground:      var(--rlx-foreground);     /* 12.42:1 */
  --rlx-attention-soft:            #F6F5D4;
  --rlx-attention-soft-hover:      #F2F0C0;
  --rlx-attention-soft-foreground: #747118;                   /* 5.10 white · 4.60 soft */

  /* ── Panel + muted shortcuts (used by other kit tokens) ── */
  --rlx-panel:                var(--rlx-surface);
  --rlx-panel-foreground:     var(--rlx-foreground);
  --rlx-muted:                var(--rlx-foreground-muted);

  /* ── 3-step surface ramp (legacy alias to surface group) ── */
  --rlx-surface-1: var(--rlx-surface);
  --rlx-surface-2: var(--rlx-surface-secondary);
  --rlx-surface-3: var(--rlx-surface-tertiary);

  /* Lines & overlays */
  --rlx-border:               var(--rlx-separator);
  --rlx-divider:              var(--rlx-separator);
  --rlx-focus:                var(--rlx-accent);
  --rlx-overlay:              var(--rlx-black);

  /* ── Legacy aliases (v2 → v3 mapping; kit components keep working) ── */
  --rlx-primary:              var(--rlx-accent);

  /* ── Pastel accents ──
     The reference carries colour in soft fills, not in its controls: the
     "Top Seller by Country" bars, and by extension anything categorical.
     Ink reads 11.9–14.2:1 on all three, so they take --rlx-foreground. */
  --rlx-tint-1:               var(--rlx-ref-violet);
  --rlx-tint-2:               var(--rlx-ref-sage);
  --rlx-tint-3:               var(--rlx-ref-lime);
  --rlx-tint-foreground:      var(--rlx-foreground);
  --rlx-primary-foreground:   var(--rlx-accent-foreground);
  --rlx-secondary:            var(--rlx-accent);
  --rlx-secondary-foreground: var(--rlx-accent-foreground);
  --rlx-content1:             var(--rlx-surface);
  --rlx-content2:             var(--rlx-surface-secondary);
  --rlx-content3:             var(--rlx-surface-tertiary);
  --rlx-content4:             var(--rlx-surface-tertiary);

  /* Brand 50-900 scale, so any direct `--rlx-primary-N` reference resolves to
     a coherent step of the same hue the accent is on. Back to azure from the
     neutral ramp it carried while the accent was ink; 500 is the accent
     itself, and 600/700 are the same values the accent block's hover and
     soft-foreground take, so the two agree by construction. */
  --rlx-primary-50:  #EFF6FF;
  --rlx-primary-100: #DBEAFE;
  --rlx-primary-200: #BFDBFE;
  --rlx-primary-300: #93C5FD;
  --rlx-primary-400: #60A5FA;
  --rlx-primary-500: var(--rlx-accent);     /* follows --rlx-accent */
  --rlx-primary-600: var(--rlx-accent-hover);
  --rlx-primary-700: var(--rlx-accent-soft-foreground);
  --rlx-primary-800: #1E40AF;
  --rlx-primary-900: #1E3A8A;
  --rlx-secondary-50:  var(--rlx-primary-50);
  --rlx-secondary-100: var(--rlx-primary-100);
  --rlx-secondary-200: var(--rlx-primary-200);
  --rlx-secondary-300: var(--rlx-primary-300);
  --rlx-secondary-400: var(--rlx-primary-400);
  --rlx-secondary-500: var(--rlx-primary-500);
  --rlx-secondary-600: var(--rlx-primary-600);
  --rlx-secondary-700: var(--rlx-primary-700);
  --rlx-secondary-800: var(--rlx-primary-800);
  --rlx-secondary-900: var(--rlx-primary-900);

  /* (The success / warning / danger 50-900 scales are gone. Thirty
     declarations of the old saturated Tailwind ramps, zero references
     anywhere in the kit or the apps — the foundations page the comment
     claimed as a consumer does not name a single step — and every value in
     them was off the palette. The six tokens per status above are the whole
     API now.) */

  /* Info is Notification under its v2 name — same six tokens, aliased so kit
     components written against `info` keep working. */
  --rlx-info:                     var(--rlx-notification);
  --rlx-info-hover:               var(--rlx-notification-hover);
  --rlx-info-foreground:          var(--rlx-notification-foreground);
  --rlx-info-soft:                var(--rlx-notification-soft);
  --rlx-info-soft-hover:          var(--rlx-notification-soft-hover);
  --rlx-info-soft-foreground:     var(--rlx-notification-soft-foreground);

  /* RGB triplets for `rgb(var(--*-rgb) / opacity)` overlays. */
  --rlx-accent-rgb:    59 130 246;      /* #3B82F6 — see --rlx-accent */
  --rlx-primary-rgb:   59 130 246;
  /* The three pastels as tuples, so a component can wash one down to a card
     tint instead of reaching for an alpha of the accent — which now tints
     blue, so a categorical fill has to say which pastel it means. */
  --rlx-tint-1-rgb:    201 209 227;     /* #C9D1E3 Lavender   */
  --rlx-tint-2-rgb:    191 213 184;     /* #BFD5B8 Sage Green */
  --rlx-tint-3-rgb:    238 245 154;     /* #EEF59A Lemon Lime */
  /* The wash behind an AI-grouped question card. A SEMANTIC token, not one of
     the three categorical pastels above, because the card is not a category —
     it is a state ("this was grouped for you"). It used tint-3 directly, and
     tint-3 in this palette is Lemon Lime: at 40% over the surface that mixes
     to a dull olive, which is how a stack of AI cards ended up looking like
     an unrelated warning colour. Lavender is the same pastel family, has no
     hue collision with success/warning, and stays quiet under text.
     Skins that carry their own agentic colour point this back at whichever
     tint means AI for them (see spark.css). */
  --rlx-ai-wash-rgb:   201 209 227;     /* #C9D1E3 Lavender */
  --rlx-secondary-rgb: 59 130 246;   /* = accent; secondary is an alias */
  --rlx-success-rgb:      191 216 166;  /* #BFD8A6 */
  --rlx-warning-rgb:      242 194 123;  /* #F2C27B */
  --rlx-danger-rgb:       231 154 149;  /* #E79A95 */
  --rlx-notification-rgb: 175 207 245;  /* #AFCFF5 */
  --rlx-important-rgb:    201 183 242;  /* #C9B7F2 */
  --rlx-attention-rgb:    232 229 142;  /* #E8E58E */
  --rlx-default-rgb:   115 115 115;     /* neutral-500 */
  --rlx-info-rgb:      var(--rlx-notification-rgb);

  /* ── Text helpers ── */
  --rlx-text:        var(--rlx-foreground);
  --rlx-text-muted:  var(--rlx-muted);
  /* Sits between the palette's two inks, which name nothing for it, so it takes
     Muted Gray's hue at neutral-600's luminance (dL +0.001) rather than staying
     dead-neutral in an otherwise cool family — the same re-tinting rule the
     cool surface ramp above follows. Clears comfortably everywhere: 7.75 on
     white, 7.15 on Surface Alt, 6.00 on the console canvas. */
  --rlx-text-sub:    #4D535D;
  --rlx-text-strong: var(--rlx-foreground);
  /* The fourth ink tone, and the one that made the design read as calm:
     a step BELOW muted, for section eyebrows, tab counts and the
     trailing glyph on a row — things that are read once and must never
     compete with what they label. Collapsing it into muted is what
     flattens a dark interface. */
  --rlx-text-faint:  #6E7480;

  /* ── Typography ── */
  --rlx-font:      'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --rlx-font-mono: ui-monospace, 'Fira Mono', SFMono-Regular, 'Menlo', monospace;

  /* ── Type roles ──
     The scale below says which sizes exist. These say which size each JOB
     gets — the thing that was missing, and why the kit and the console
     between them rendered a "title" at four sizes and a tracked-caps
     eyebrow at three.

     Pairs rather than a `font` shorthand: the shorthand resets family and
     line-height at every call site and almost no rule here sets either.

     NOT for: emoji, display numerals, or glyphs fitted to a shape — an
     avatar's initials are `calc(--rlx-avatar-size * .4)` on purpose, so
     they scale with the circle rather than sitting on a text scale. */
  --rlx-type-display-size:   var(--rlx-fs-3xl);     /* 26 / 700 */
  --rlx-type-display-weight: var(--rlx-fw-bold);
  --rlx-type-title-size:     var(--rlx-fs-medium);   /* 16 / 700 */
  --rlx-type-title-weight:   var(--rlx-fw-bold);
  --rlx-type-subtitle-size:  var(--rlx-fs-base);     /* 15 / 700 */
  --rlx-type-subtitle-weight:var(--rlx-fw-bold);
  --rlx-type-strong-size:    var(--rlx-fs-small);    /* 14 / 600 */
  --rlx-type-strong-weight:  var(--rlx-fw-semibold);
  --rlx-type-caps-size:      var(--rlx-fs-micro);    /* 11 / 600 */
  --rlx-type-caps-weight:    var(--rlx-fw-semibold);
  --rlx-type-body-size:      var(--rlx-fs-mini);     /* 13 / 400 */
  --rlx-type-body-weight:    var(--rlx-fw-normal);
  --rlx-type-meta-size:      var(--rlx-fs-tiny);     /* 12 / 400 */
  --rlx-type-meta-weight:    var(--rlx-fw-normal);

  /* `control` is the seventh role and it was always here in practice —
     button, tab, chip, nav row and menu item each reached past the map
     for a size and a weight of their own, which is how the kit ended up
     with 12/500, 14/500 and 16/500 all meaning "a button label". The
     design settles it at 13/600 and uses that one pairing for every
     interactive label in the interface, selected or not; selection is
     carried by ground and ink, never by the label growing. */
  --rlx-type-control-size:   var(--rlx-fs-mini);     /* 13 / 600 */
  --rlx-type-control-weight: var(--rlx-fw-semibold);

  /* `micro` is one step below `tiny`, for caps labels, badge counts and
     meta text. It exists because ~30 rules had drifted into the 9–11px
     range one half-pixel at a time; anything smaller than this should
     be questioned rather than added. */
  --rlx-fs-micro:  .6875rem;  --rlx-lh-micro:  1rem;      /* 11 */
  --rlx-fs-tiny:   .75rem;    --rlx-lh-tiny:   1rem;      /* 12 */
  --rlx-fs-mini:   .8125rem;  --rlx-lh-mini:   1.125rem;  /* 13 */
  --rlx-fs-small:  .875rem;   --rlx-lh-small:  1.25rem;   /* 14 */
  --rlx-fs-base:   .9375rem;  --rlx-lh-base:   1.375rem;  /* 15 */
  --rlx-fs-medium: 1rem;      --rlx-lh-medium: 1.5rem;    /* 16 */
  --rlx-fs-large:  1.125rem;  --rlx-lh-large:  1.75rem;   /* 18 */

  --rlx-fs-xl:  1.25rem;      /* 20 */
  --rlx-fs-2xl: 1.375rem;     /* 22 — the event title */
  --rlx-fs-3xl: 1.625rem;     /* 26 — the focused question */
  --rlx-fs-4xl: 1.875rem;     /* 30 */

  /* Icon glyph sizes. Deliberately NOT the text scale — an icon beside
     14px text is not itself "14px text", and coupling the two means a
     type change silently resizes every icon. */
  --rlx-icon-sm: 14px;
  --rlx-icon-md: 16px;
  --rlx-icon-lg: 18px;
  --rlx-icon-xl: 24px;

  /* Tracking. Uppercase micro-labels need positive tracking to stay
     legible at size; display text needs negative. Prefer these over
     a hand-picked em value — that habit produced eleven near-identical
     tracking values across the kit and the apps. */
  --rlx-tracking-tight:  -.02em;
  --rlx-tracking-normal:  0;
  --rlx-tracking-wide:    .02em;
  --rlx-tracking-wider:   .06em;
  --rlx-tracking-widest:  .1em;
  /* Decorative display caps only — the date-badge month, the event-wall
     headers. Genuinely needs more air than a UI label; not a licence to
     keep inventing values above `widest`. */
  --rlx-tracking-ultra:   .14em;

  --rlx-fw-normal:    400;
  --rlx-fw-medium:    500;
  --rlx-fw-semibold:  600;
  --rlx-fw-bold:      700;
  --rlx-fw-extrabold: 800;

  --rlx-lh-tight:   1.2;
  --rlx-lh-snug:    1.35;
  --rlx-lh-normal:  1.5;
  --rlx-lh-relaxed: 1.65;

  /* ── Spacing (4 px base) ── */
  --rlx-space-1:  4px;
  --rlx-space-2:  8px;
  --rlx-space-3:  12px;
  --rlx-space-4:  16px;
  --rlx-space-5:  20px;
  --rlx-space-6:  24px;
  --rlx-space-8:  32px;
  --rlx-space-12: 48px;
  --rlx-space-16: 64px;

  /* ── Radius ──
     This scale INVERTED at the console design pass, and the inversion
     is the single biggest visual change in the kit, so it is worth
     stating plainly:

       before — cards 20px, every control a full pill
       after  — cards 14/16px, controls 8/9px, pills reserved

     A pill now means one of four things and nothing else: a badge, a
     dot, a switch track, or a bar (progress / poll / avatar). Buttons,
     nav rows, segmented tracks, tab chips and inputs are all rounded
     rectangles. Reaching for `--rlx-radius-full` on a rectangular
     control is the mistake this scale exists to prevent.

     `inset` is the tier a surface nested INSIDE a card takes — the
     quoted post in a proposal, the poll preview, the audience-sees
     panel. It sits between the control radius and the card radius on
     purpose: a 14px box inside a 14px box reads as a mistake. */
  --rlx-radius-xs:    6px;   /* tab chip, small caps chip            */
  --rlx-radius-sm:    8px;   /* icon button, ghost button, seg track */
  --rlx-radius-md:    9px;   /* THE control radius — buttons, rows   */
  --rlx-radius-inset: 12px;  /* a surface inside a card              */
  --rlx-radius-lg:   14px;   /* cards                                */
  --rlx-radius-xl:   16px;   /* panels                               */
  --rlx-radius-2xl:  20px;   /* the app shell                        */
  --rlx-radius-full: 9999px; /* badges, dots, switches, bars, avatars*/
  --rlx-radius:      var(--rlx-radius-md);

  /* ── Borders ── */
  --rlx-border-width-sm: 1px;
  --rlx-border-width-md: 2px;
  --rlx-border-width-lg: 3px;
  --rlx-divider-weight:  1px;

  /* ── Shadows (three-layer composites) — tightened so cards have a
     defined edge instead of floating in fog. The 0 1px halo defines
     the silhouette; the second layer carries the elevation. */
  /* Pure black, low alpha, and NO `0 0 0 1px` ring layer. That ring was a
     hairline border wearing a shadow's clothes — surfaces that dropped their
     real border still came out outlined. Depth is the blur now. */
  --rlx-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .04);
  --rlx-shadow-md: 0 1px 2px 0 rgb(0 0 0 / .04), 0 4px 12px -3px rgb(0 0 0 / .06);
  --rlx-shadow-lg: 0 2px 6px -2px rgb(0 0 0 / .05), 0 12px 32px -6px rgb(0 0 0 / .09);
  --rlx-shadow:    var(--rlx-shadow-md);

  /* ── Z-index scale ── */
  --rlx-z-base:     0;
  --rlx-z-raised:   10;
  --rlx-z-dropdown: 100;
  --rlx-z-sticky:   200;
  --rlx-z-overlay:  300;
  --rlx-z-modal:    400;
  --rlx-z-toast:    500;
  --rlx-z-tooltip:  600;

  /* ── Motion ── */
  --rlx-duration-fast: 150ms;
  --rlx-duration:      250ms;
  --rlx-duration-slow: 400ms;
  --rlx-duration-exit: 300ms;

  --rlx-ease-default: cubic-bezier(.4, 0, .2, 1);
  --rlx-ease-out:     cubic-bezier(0, 0, .2, 1);
  --rlx-ease-in:      cubic-bezier(.4, 0, 1, 1);
  --rlx-ease-spring:  cubic-bezier(.32, .72, 0, 1);

  --rlx-transition-default: var(--rlx-duration) var(--rlx-ease-default);

  /* ── Focus ring ── */
  --rlx-focus-ring: 0 0 0 2px var(--rlx-background), 0 0 0 4px var(--rlx-focus);

  /* ── Opacity ── */
  --rlx-opacity-disabled: .5;
  --rlx-opacity-muted:    .65;
  --rlx-opacity-hover:    .9;

  /* ── Sidebar layout (Pro flavor) ── */
  --rlx-sidebar-width:           260px;
  --rlx-sidebar-width-collapsed: 68px;
  --rlx-sidebar-duration:        200ms;
  --rlx-sidebar-item-radius:     12px;
  --rlx-sidebar-item-height:     48px;
  --rlx-sidebar-item-gap:        2px;
  --rlx-sidebar-icon-size:       20px;
  /* Active accent. Mapped to primary; override to recolor. */
  --rlx-sidebar-accent:          var(--rlx-primary);
  --rlx-sidebar-accent-rgb:      var(--rlx-primary-rgb);
  /* Chevron used as a CSS mask on sidebar item ::after. */
  --rlx-chevron-right-mask:      url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m9 18 6-6-6-6'/></svg>");

  /* ── Dash shell layout (rail | secondary | main) ── */
  --rlx-col-header-height:       80px;
  --rlx-dashshell-secondary:     280px;

  /* ── Scrollbar (light) ── */
  --rlx-scroll-size:        10px;
  --rlx-scroll-track:       transparent;
  --rlx-scroll-thumb:       rgba(0, 0, 0, .18);
  --rlx-scroll-thumb-hover: rgba(0, 0, 0, .32);

  /* ── Input surfaces (light) ──
     The default scale is a fixed light-to-dark zinc ramp, so a tinted
     input bg has to pick *opposite ends* of the ramp per theme. Light
     uses the light ramp steps; the dark block below uses the same
     scale's dark steps. */
  --rlx-input-bg:              var(--rlx-default-100);
  --rlx-input-bg-hover:        var(--rlx-default-200);
  --rlx-input-border:          var(--rlx-default-200);
  --rlx-input-border-hover:    var(--rlx-default-400);
  --rlx-input-border-focus:    var(--rlx-foreground);
}

/* ── Dark theme (auto via system pref) — v3 values ──────────────
   Light theme only: the guard below used to be
   `:root:not([data-theme="light"])`, which let a dark-preference OS
   pick these up whenever the attribute was missing. It now requires
   an explicit opt-in, which only the Wall sets. Restore the `:not()`
   form to bring system-preference dark back. */
@media (prefers-color-scheme: dark) {
  :root[data-theme="dark"] {
    /* Background group — near-black navy canvas (matches Main.png). */
    --rlx-background:           #06080F;
    --rlx-background-secondary: #0A0D16;
    --rlx-background-tertiary:  #11151F;
    --rlx-background-inverse:   var(--rlx-neutral-50);

    /* Surface group — navy-tinted tiers; elevation reads through tone. */
    --rlx-surface:              #0E121C;
    --rlx-surface-secondary:    #141926;
    --rlx-surface-tertiary:     #1E2433;

    /* Separator group — low-contrast navy rules. */
    --rlx-separator:            #1C2130;
    --rlx-separator-secondary:  #262D3D;
    --rlx-separator-tertiary:   #333B4D;

    /* Foreground group */
    --rlx-foreground:           #F6F7FB;
    --rlx-foreground-muted:     #A6ABBD;
    --rlx-foreground-segment:   #333B4D;
    --rlx-foreground-overlay:   #1A1F2B;
    --rlx-foreground-link:      #F6F7FB;

    /* Form field group */
    --rlx-field-bg:             #141926;
    --rlx-field-bg-hover:       #1E2433;
    --rlx-field-bg-focus:       #141926;
    --rlx-field-foreground:     #F6F7FB;
    --rlx-field-placeholder:    #8B91A6;

    /* Default semantic */
    --rlx-default:              #141926;
    --rlx-default-hover:        #1E2433;
    --rlx-default-foreground:   #F6F7FB;

    /* Accent — the azure, lifted one ramp step for the navy canvas. */
    /* #3B82F6 itself is only 3.19:1 on this ground; the 400 step clears
       7.34:1 while still reading as the same brand colour. Same move the
       console's dark band makes (see desktop.css §4.3). */
    --rlx-accent:                 #60A5FA;   /* the light accent is too dark here */
    --rlx-accent-hover:           #93C5FD;
    /* Ink, not white. A bright fill wants dark type on it: eclipse runs
       7.88:1 under this where white manages 2.66:1. */
    --rlx-accent-foreground:      var(--rlx-eclipse);
    --rlx-accent-soft:            #14294A;
    --rlx-accent-soft-hover:      #1B3768;
    --rlx-accent-soft-foreground: #93C5FD;   /* 8.19:1 on the soft well */

    /* The same six palette colours as light. What flips is which role they
    fill: on a dark ground a pastel IS the legible text (7.6-13.4:1), so it
    serves as -soft-foreground, and -soft becomes a deep well of the same
    hue rather than a pale wash. The base stays a fill with ink on it. */
    --rlx-danger:                  var(--rlx-ref-danger);
    --rlx-danger-hover:                 #DF7872;
    --rlx-danger-foreground:            var(--rlx-eclipse);
    --rlx-danger-soft:                  #380F0D;
    --rlx-danger-soft-hover:            #4D1511;
    --rlx-danger-soft-foreground: var(--rlx-ref-danger);

    --rlx-warning:                var(--rlx-ref-warning);
    --rlx-warning-hover:                #EEB054;
    --rlx-warning-foreground:           var(--rlx-eclipse);
    --rlx-warning-soft:                 #3F2806;
    --rlx-warning-soft-hover:           #563708;
    --rlx-warning-soft-foreground: var(--rlx-ref-warning);

    --rlx-success:                var(--rlx-ref-success);
    --rlx-success-hover:                #A9CB88;
    --rlx-success-foreground:           var(--rlx-eclipse);
    --rlx-success-soft:                 #223015;
    --rlx-success-soft-hover:           #2F421D;
    --rlx-success-soft-foreground: var(--rlx-ref-success);

    --rlx-notification:      var(--rlx-ref-notification);
    --rlx-notification-hover:           #88B8F0;
    --rlx-notification-foreground:      var(--rlx-eclipse);
    --rlx-notification-soft:            #08203D;
    --rlx-notification-soft-hover:      #0A2C54;
    --rlx-notification-soft-foreground: var(--rlx-ref-notification);

    --rlx-important:            var(--rlx-ref-important);
    --rlx-important-hover:              #AD92EB;
    --rlx-important-foreground:         var(--rlx-eclipse);
    --rlx-important-soft:               #190B3A;
    --rlx-important-soft-hover:         #220E50;
    --rlx-important-soft-foreground: var(--rlx-ref-important);

    --rlx-attention:            var(--rlx-ref-attention);
    --rlx-attention-hover:              #E1DD6A;
    --rlx-attention-foreground:         var(--rlx-eclipse);
    --rlx-attention-soft:               #39380C;
    --rlx-attention-soft-hover:         #4E4C10;
    --rlx-attention-soft-foreground: var(--rlx-ref-attention);

    /* Aliases */
    --rlx-panel:                var(--rlx-surface);
    --rlx-panel-foreground:     var(--rlx-foreground);
    --rlx-muted:                var(--rlx-foreground-muted);
    --rlx-surface-1:            var(--rlx-surface);
    --rlx-surface-2:            var(--rlx-surface-secondary);
    --rlx-surface-3:            var(--rlx-surface-tertiary);

    --rlx-border:  var(--rlx-separator);
    --rlx-divider: var(--rlx-separator);
    --rlx-focus:   var(--rlx-accent);
    --rlx-overlay: var(--rlx-black);

    /* Legacy aliases */
    --rlx-primary:              var(--rlx-accent);
    --rlx-primary-foreground:   var(--rlx-accent-foreground);
    --rlx-secondary:            var(--rlx-accent);
    --rlx-secondary-foreground: var(--rlx-accent-foreground);
    --rlx-content1:             var(--rlx-panel);
    --rlx-content2:             var(--rlx-surface-2);
    --rlx-content3:             var(--rlx-surface-3);
    --rlx-content4:             var(--rlx-surface-3);

    /* RGB triplets — recomputed for dark values. */
    --rlx-accent-rgb:    96 165 250;   /* #60A5FA — the dark-theme accent */
    --rlx-primary-rgb:   96 165 250;   /* #60A5FA — --rlx-primary follows it */
    --rlx-secondary-rgb: 96 165 250;   /* = accent; secondary is an alias */
    --rlx-default-rgb:   20 25 38;      /* surface-secondary */
    --rlx-success-rgb:      191 216 166;
    --rlx-warning-rgb:      242 194 123;
    --rlx-danger-rgb:       231 154 149;
    --rlx-notification-rgb: 175 207 245;
    --rlx-important-rgb:    201 183 242;
    --rlx-attention-rgb:    232 229 142;

    --rlx-text:        var(--rlx-foreground);
    --rlx-text-muted:  var(--rlx-muted);
    --rlx-text-sub:    #8B91A6;
    --rlx-text-strong: var(--rlx-foreground);

    --rlx-shadow-sm: 0 0 5px 0 rgb(0 0 0 / .05), 0 2px 10px 0 rgb(0 0 0 / .2),  inset 0 0 1px 0 rgb(255 255 255 / .15);
    --rlx-shadow-md: 0 0 15px 0 rgb(0 0 0 / .06), 0 2px 30px 0 rgb(0 0 0 / .22), inset 0 0 1px 0 rgb(255 255 255 / .15);
    --rlx-shadow-lg: 0 0 30px 0 rgb(0 0 0 / .07), 0 30px 60px 0 rgb(0 0 0 / .26), inset 0 0 1px 0 rgb(255 255 255 / .15);

    --rlx-scroll-thumb:       rgba(255, 255, 255, .14);
    --rlx-scroll-thumb-hover: rgba(255, 255, 255, .28);

    /* Input surfaces (dark) — pick the dark end of the zinc ramp so
       a "tinted" input reads as a slightly lifted dark chip. */
    --rlx-input-bg:              #141926;
    --rlx-input-bg-hover:        #1E2433;
    --rlx-input-border:          #262D3D;
    --rlx-input-border-hover:    #3A4257;
    --rlx-input-border-focus:    var(--rlx-foreground);
  }
}

/* ── Dark theme (explicit override) — v3 values ──────────────── */
:root[data-theme="dark"] {
  /* Background group — near-black navy canvas (matches Main.png). */
  --rlx-background:           #06080F;
  --rlx-background-secondary: #0A0D16;
  --rlx-background-tertiary:  #11151F;
  --rlx-background-inverse:   var(--rlx-neutral-50);

  /* Surface group — navy-tinted tiers; elevation reads through tone. */
  --rlx-surface:              #0E121C;
  --rlx-surface-secondary:    #141926;
  --rlx-surface-tertiary:     #1E2433;

  /* Separator group — low-contrast navy rules. */
  --rlx-separator:            #1C2130;
  --rlx-separator-secondary:  #262D3D;
  --rlx-separator-tertiary:   #333B4D;

  /* Foreground group */
  --rlx-foreground:           #F6F7FB;
  --rlx-foreground-muted:     #A6ABBD;
  --rlx-foreground-segment:   #333B4D;
  --rlx-foreground-overlay:   #1A1F2B;
  --rlx-foreground-link:      #F6F7FB;

  /* Form field group */
  --rlx-field-bg:             #141926;
  --rlx-field-bg-hover:       #1E2433;
  --rlx-field-bg-focus:       #141926;
  --rlx-field-foreground:     #F6F7FB;
  --rlx-field-placeholder:    #8B91A6;

  /* Default semantic */
  --rlx-default:              #141926;
  --rlx-default-hover:        #1E2433;
  --rlx-default-foreground:   #F6F7FB;

  /* Accent — the azure, lifted one ramp step for the navy canvas. */
  /* #3B82F6 itself is only 3.19:1 on this ground; the 400 step clears
     7.34:1 while still reading as the same brand colour. Same move the
     console's dark band makes (see desktop.css §4.3). */
  --rlx-accent:                 #60A5FA;   /* the light accent is too dark here */
  --rlx-accent-hover:           #93C5FD;
  /* Ink, not white. A bright fill wants dark type on it: eclipse runs
     7.88:1 under this where white manages 2.66:1. */
  --rlx-accent-foreground:      var(--rlx-eclipse);
  --rlx-accent-soft:            #14294A;
  --rlx-accent-soft-hover:      #1B3768;
  --rlx-accent-soft-foreground: #93C5FD;   /* 8.19:1 on the soft well */

  /* The same six palette colours as light. What flips is which role they
  fill: on a dark ground a pastel IS the legible text (7.6-13.4:1), so it
  serves as -soft-foreground, and -soft becomes a deep well of the same
  hue rather than a pale wash. The base stays a fill with ink on it. */
  --rlx-danger:                  var(--rlx-ref-danger);
  --rlx-danger-hover:                 #DF7872;
  --rlx-danger-foreground:            var(--rlx-eclipse);
  --rlx-danger-soft:                  #380F0D;
  --rlx-danger-soft-hover:            #4D1511;
  --rlx-danger-soft-foreground: var(--rlx-ref-danger);

  --rlx-warning:                var(--rlx-ref-warning);
  --rlx-warning-hover:                #EEB054;
  --rlx-warning-foreground:           var(--rlx-eclipse);
  --rlx-warning-soft:                 #3F2806;
  --rlx-warning-soft-hover:           #563708;
  --rlx-warning-soft-foreground: var(--rlx-ref-warning);

  --rlx-success:                var(--rlx-ref-success);
  --rlx-success-hover:                #A9CB88;
  --rlx-success-foreground:           var(--rlx-eclipse);
  --rlx-success-soft:                 #223015;
  --rlx-success-soft-hover:           #2F421D;
  --rlx-success-soft-foreground: var(--rlx-ref-success);

  --rlx-notification:      var(--rlx-ref-notification);
  --rlx-notification-hover:           #88B8F0;
  --rlx-notification-foreground:      var(--rlx-eclipse);
  --rlx-notification-soft:            #08203D;
  --rlx-notification-soft-hover:      #0A2C54;
  --rlx-notification-soft-foreground: var(--rlx-ref-notification);

  --rlx-important:            var(--rlx-ref-important);
  --rlx-important-hover:              #AD92EB;
  --rlx-important-foreground:         var(--rlx-eclipse);
  --rlx-important-soft:               #190B3A;
  --rlx-important-soft-hover:         #220E50;
  --rlx-important-soft-foreground: var(--rlx-ref-important);

  --rlx-attention:            var(--rlx-ref-attention);
  --rlx-attention-hover:              #E1DD6A;
  --rlx-attention-foreground:         var(--rlx-eclipse);
  --rlx-attention-soft:               #39380C;
  --rlx-attention-soft-hover:         #4E4C10;
  --rlx-attention-soft-foreground: var(--rlx-ref-attention);

  /* Aliases */
  --rlx-panel:                var(--rlx-surface);
  --rlx-panel-foreground:     var(--rlx-foreground);
  --rlx-muted:                var(--rlx-foreground-muted);
  --rlx-surface-1:            var(--rlx-surface);
  --rlx-surface-2:            var(--rlx-surface-secondary);
  --rlx-surface-3:            var(--rlx-surface-tertiary);

  --rlx-border:  var(--rlx-separator);
  --rlx-divider: var(--rlx-separator);
  --rlx-focus:   var(--rlx-accent);
  --rlx-overlay: var(--rlx-black);

  /* Legacy aliases */
  --rlx-primary:              var(--rlx-accent);
  --rlx-primary-foreground:   var(--rlx-accent-foreground);
  --rlx-secondary:            var(--rlx-accent);
  --rlx-secondary-foreground: var(--rlx-accent-foreground);
  --rlx-content1:             var(--rlx-panel);
  --rlx-content2:             var(--rlx-surface-2);
  --rlx-content3:             var(--rlx-surface-3);
  --rlx-content4:             var(--rlx-surface-3);

  --rlx-accent-rgb:    96 165 250;   /* #60A5FA — the dark-theme accent */
  --rlx-primary-rgb:   96 165 250;   /* #60A5FA — --rlx-primary follows it */
  --rlx-secondary-rgb: 96 165 250;   /* = accent; secondary is an alias */
  --rlx-default-rgb:   20 25 38;
  --rlx-success-rgb:      191 216 166;
  --rlx-warning-rgb:      242 194 123;
  --rlx-danger-rgb:       231 154 149;
  --rlx-notification-rgb: 175 207 245;
  --rlx-important-rgb:    201 183 242;
  --rlx-attention-rgb:    232 229 142;

  --rlx-text:        var(--rlx-foreground);
  --rlx-text-muted:  var(--rlx-muted);
  --rlx-text-sub:    #8B91A6;
  --rlx-text-strong: var(--rlx-foreground);

  --rlx-shadow-sm: 0 0 5px 0 rgb(0 0 0 / .05), 0 2px 10px 0 rgb(0 0 0 / .2),  inset 0 0 1px 0 rgb(255 255 255 / .15);
  --rlx-shadow-md: 0 0 15px 0 rgb(0 0 0 / .06), 0 2px 30px 0 rgb(0 0 0 / .22), inset 0 0 1px 0 rgb(255 255 255 / .15);
  --rlx-shadow-lg: 0 0 30px 0 rgb(0 0 0 / .07), 0 30px 60px 0 rgb(0 0 0 / .26), inset 0 0 1px 0 rgb(255 255 255 / .15);

  --rlx-scroll-thumb:       rgba(255, 255, 255, .14);
  --rlx-scroll-thumb-hover: rgba(255, 255, 255, .28);

  --rlx-input-bg:              #141926;
  --rlx-input-bg-hover:        #1E2433;
  --rlx-input-border:          #262D3D;
  --rlx-input-border-hover:    #3A4257;
  --rlx-input-border-focus:    var(--rlx-foreground);
}

/* ── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    /* Delay has to be zeroed too, not just duration. A staggered entrance
       uses `animation-fill-mode: both`, so during its delay the element is
       held at the `from` keyframe — opacity 0. Killing only the duration
       leaves the item invisible for the length of its delay, which for the
       last row of a staggered list is a third of a second of blank space. */
    animation-delay: 0ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  [data-reduced-motion="allow"],
  [data-reduced-motion="allow"]::before,
  [data-reduced-motion="allow"]::after {
    animation-duration: revert !important;
    animation-iteration-count: revert !important;
    transition-duration: revert !important;
    animation-delay: revert !important;
    transition-delay: revert !important;
  }
}

/* ─────────────────────────────────────────────────────────────
   Motion utilities — entrance, stagger and expand
   ─────────────────────────────────────────────────────────────
   Three opt-in primitives, so a surface animates by adding a class
   rather than by hand-rolling keyframes:

     .rlx-stagger   a container whose children fade + rise in sequence
     .rlx-enter     one element entering on its own (a pushed row)
     .rlx-expand    a region that opens/closes to its natural height

   All three inherit the global reduced-motion switch above — it kills
   animation and transition duration on `*`, so nothing here needs its
   own `prefers-reduced-motion` block.

   Stagger economics: 28ms per item, and the delay is capped at the 12th
   child (~336ms to fully populate). Everything past the 12th shares the
   final delay, so a 20-item list and a 200-item list both finish in the
   same third of a second. An uncapped stagger is how you get a list that
   takes two seconds to appear, which reads as a bug rather than polish.
   ── */
:root {
  --rlx-stagger-step: 28ms;
  --rlx-enter-rise:   8px;
}

@keyframes rlx-enter { from { opacity: 0; transform: translateY(var(--rlx-enter-rise)); } to { opacity: 1; transform: none; } }
@keyframes rlx-exit  { to   { opacity: 0; transform: translateY(calc(var(--rlx-enter-rise) * -.5)); } }

/* One element entering on its own — a row pushed into a live list.

   `backwards`, deliberately not `both`. These animate `transform`, and the
   `to` keyframe is `transform: none` — under `both` the forwards half keeps
   that applied for the life of the element, and a CSS animation out-cascades
   plain inline styles. Any child positioned by an inline transform (a
   virtualized feed row placed with `translateY`) is then pinned to y=0 for
   good: a list of rows silently stacks into one. `backwards` holds the `from`
   state through the stagger delay, which is the ladder's whole trick, and the
   forwards half adds nothing anyway — this `to` state *is* the element's
   natural state. A future collision now degrades to a brief entrance flash
   instead of permanently collapsed content. (`.rlx-exit` below keeps `both`:
   an exit genuinely has to hold its end state until the node is removed.) */
.rlx-enter { animation: rlx-enter var(--rlx-duration) var(--rlx-ease-out) backwards; }

/* A container that populates. Children animate in document order; the
   delay ladder is capped so long lists don't crawl. */
.rlx-stagger > * { animation: rlx-enter var(--rlx-duration) var(--rlx-ease-out) backwards; }
.rlx-stagger > :nth-child(1)  { animation-delay: 0ms; }
.rlx-stagger > :nth-child(2)  { animation-delay: calc(var(--rlx-stagger-step) * 1); }
.rlx-stagger > :nth-child(3)  { animation-delay: calc(var(--rlx-stagger-step) * 2); }
.rlx-stagger > :nth-child(4)  { animation-delay: calc(var(--rlx-stagger-step) * 3); }
.rlx-stagger > :nth-child(5)  { animation-delay: calc(var(--rlx-stagger-step) * 4); }
.rlx-stagger > :nth-child(6)  { animation-delay: calc(var(--rlx-stagger-step) * 5); }
.rlx-stagger > :nth-child(7)  { animation-delay: calc(var(--rlx-stagger-step) * 6); }
.rlx-stagger > :nth-child(8)  { animation-delay: calc(var(--rlx-stagger-step) * 7); }
.rlx-stagger > :nth-child(9)  { animation-delay: calc(var(--rlx-stagger-step) * 8); }
.rlx-stagger > :nth-child(10) { animation-delay: calc(var(--rlx-stagger-step) * 9); }
.rlx-stagger > :nth-child(11) { animation-delay: calc(var(--rlx-stagger-step) * 10); }
/* 12th and beyond all land together — the cap. */
.rlx-stagger > :nth-child(n+12) { animation-delay: calc(var(--rlx-stagger-step) * 11); }

/* Leaving overrides arriving. Declared after the stagger ladder and matched
   on the container too, because `.rlx-stagger > *` and a bare `.rlx-exit`
   score the same specificity — a row leaving a staggered list would
   otherwise keep the entrance animation and never fade out. The delay reset
   matters for the same reason: it would inherit its position in the ladder. */
.rlx-exit,
.rlx-stagger > .rlx-exit { animation: rlx-exit var(--rlx-duration-fast) var(--rlx-ease-in) both; animation-delay: 0ms; }

/* Expand/collapse to natural height. `height: auto` can't interpolate, so
   the outer track goes 0fr → 1fr and the inner clips. `overflow: hidden`
   is what lets the grid track shrink below the content's intrinsic size
   (it zeroes the automatic minimum) — without it the region won't close.
   Same technique the Accordion already uses.

   The inner element must carry its vertical spacing as PADDING, not margin —
   a margin sits outside the border box and would show through a closed
   track. That padding is then zeroed while closed, because a box can never
   be shorter than its own padding: leave it on and an "empty" track still
   measures its padding tall. */
.rlx-expand { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--rlx-duration) var(--rlx-ease-default); }
.rlx-expand > * { overflow: hidden; min-height: 0; }
.rlx-expand:not([data-open="true"]) > * { padding-top: 0; padding-bottom: 0; margin: 0; }
.rlx-expand[data-open="true"] { grid-template-rows: 1fr; }
/* Fade the contents slightly behind the height so the text doesn't appear
   to be squeezed out of a closing box. */
.rlx-expand > * { opacity: 0; transition: opacity var(--rlx-duration-fast) var(--rlx-ease-default); }
.rlx-expand[data-open="true"] > * { opacity: 1; transition-delay: 60ms; }

/* ── Base reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: light; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark; }

body {
  font-family: var(--rlx-font);
  font-size: var(--rlx-fs-small);
  line-height: var(--rlx-lh-small);
  color: var(--rlx-text);
  background: var(--rlx-background);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--rlx-transition-default),
              color var(--rlx-transition-default);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }
button:focus-visible { outline: none; box-shadow: var(--rlx-focus-ring); border-radius: 6px; }
img, svg { display: block; max-width: 100%; }
hr {
  border: 0;
  border-top: var(--rlx-divider-weight) solid var(--rlx-divider);
  margin: var(--rlx-space-6) 0;
}
code, kbd, pre, samp { font-family: var(--rlx-font-mono); }

a.rlx-link {
  color: var(--rlx-primary);
  text-decoration: underline;
  text-decoration-color: rgb(var(--rlx-primary-rgb) / .35);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--rlx-duration-fast) var(--rlx-ease-default),
              color var(--rlx-duration-fast) var(--rlx-ease-default);
}
a.rlx-link:hover { text-decoration-color: currentColor; }

/* ── Micro-label ─────────────────────────────────────────────
   The uppercase caps label — section eyebrows, sidebar group
   headings, status captions, stat-tile labels.

   Compose this instead of re-picking a size/weight/tracking triple
   per component. Doing that by hand is how sibling labels ended up
   at five different trackings on the same screen. `--strong` is the
   louder variant used for live/status pills. */
.rlx-label-micro {
  font-size: var(--rlx-type-caps-size);
  line-height: var(--rlx-lh-micro);
  font-weight: var(--rlx-type-caps-weight);
  text-transform: uppercase;
  letter-spacing: var(--rlx-tracking-wider);
  color: var(--rlx-text-muted);
}
.rlx-label-micro--strong {
  font-weight: var(--rlx-fw-bold);
  letter-spacing: var(--rlx-tracking-widest);
}

/* ── Scroll utility ──────────────────────────────────────────
   Apply to any scroll container for a thin, unobtrusive scrollbar
   that stays out of the way: no track, the thumb is invisible at
   rest and fades in on hover/focus, and nothing shows at all when
   the content fits. The thumb is inset (transparent border +
   padding-box) so it reads as a slim pill. */
.rlx-scroll { scrollbar-width: thin; scrollbar-color: transparent transparent; }
.rlx-scroll:hover,
.rlx-scroll:focus-within { scrollbar-color: var(--rlx-scroll-thumb) transparent; }
.rlx-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.rlx-scroll::-webkit-scrollbar-track { background: transparent; }
.rlx-scroll::-webkit-scrollbar-thumb {
  background-color: transparent;
  border: 3px solid transparent;
  background-clip: padding-box;
  border-radius: var(--rlx-radius-full);
  transition: background-color var(--rlx-duration) var(--rlx-ease-default);
}
.rlx-scroll:hover::-webkit-scrollbar-thumb,
.rlx-scroll:focus-within::-webkit-scrollbar-thumb { background-color: var(--rlx-scroll-thumb); }
.rlx-scroll::-webkit-scrollbar-thumb:hover { background-color: var(--rlx-scroll-thumb-hover); }

/* ── Icon ─────────────────────────────────────────────────────
   Inline-SVG wrapper. Size driven by font-size, color by currentColor.
   ─────────────────────────────────────────────────────────── */
.rlx-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: inherit;
  line-height: 1;
  width: 1em;
  height: 1em;
}
.rlx-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke: currentColor;
  fill: none;
}
.rlx-icon-missing {
  width: 1em;
  height: 1em;
  border: 1px dashed currentColor;
  border-radius: 3px;
  font-size: .7em;
  opacity: .6;
  text-align: center;
  line-height: 1;
}

/* ── App shell ──────────────────────────────────────────────── */
.rlx-shell {
  display: grid;
  grid-template-columns: var(--rlx-sidebar-width) 1fr;
  min-height: 100vh;
  transition: grid-template-columns var(--rlx-sidebar-duration) var(--rlx-ease-default);
}
.rlx-shell[data-sidebar-collapsed="true"] {
  grid-template-columns: var(--rlx-sidebar-width-collapsed) 1fr;
}

.rlx-main {
  display: flex;
  flex-direction: column;
  min-width: 0; /* allow children with overflow:auto to shrink */
}

/* ── Shell topbar (sticky, holds the theme switcher) ────────── */
.rlx-shell-topbar {
  position: sticky;
  top: 0;
  z-index: var(--rlx-z-sticky);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--rlx-space-4);
  padding: var(--rlx-space-3) var(--rlx-space-6);
  background: color-mix(in srgb, var(--rlx-background) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: var(--rlx-divider-weight) solid var(--rlx-divider);
  min-height: 56px;
}
.rlx-shell-topbar-title {
  font-size: var(--rlx-type-strong-size);
  font-weight: var(--rlx-type-strong-weight);
  color: var(--rlx-text-sub);
  display: flex;
  align-items: center;
  gap: var(--rlx-space-2);
}
.rlx-shell-topbar-title strong {
  color: var(--rlx-text);
  font-weight: var(--rlx-fw-semibold);
}
.rlx-shell-topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--rlx-space-2);
}

/* ── Page content ───────────────────────────────────────────── */
.rlx-page {
  flex: 1;
  padding: var(--rlx-space-8) var(--rlx-space-8) var(--rlx-space-16);
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}
.rlx-page-header { margin-bottom: var(--rlx-space-8); }
.rlx-page-eyebrow {
  font-size: var(--rlx-type-caps-size);
  font-weight: var(--rlx-type-caps-weight);
  text-transform: uppercase;
  letter-spacing: var(--rlx-tracking-wider);
  color: var(--rlx-primary);
  margin: 0 0 var(--rlx-space-2);
}
.rlx-page-title {
  font-size: var(--rlx-type-display-size);
  font-weight: var(--rlx-type-display-weight);
  line-height: var(--rlx-lh-tight);
  color: var(--rlx-text-strong);
  letter-spacing: var(--rlx-tracking-tight);
  margin: 0 0 var(--rlx-space-3);
}
.rlx-page-lede {
  font-size: var(--rlx-type-body-size);
  line-height: var(--rlx-lh-small);
  color: var(--rlx-text-sub);
  max-width: 64ch;
  margin: 0; font-weight: var(--rlx-type-body-weight);}

.rlx-section { margin-bottom: var(--rlx-space-12); }
.rlx-section-header { margin-bottom: var(--rlx-space-4); }
.rlx-section-title {
  font-size: var(--rlx-type-title-size);
  font-weight: var(--rlx-type-title-weight);
  line-height: var(--rlx-lh-snug);
  color: var(--rlx-text-strong);
  letter-spacing: var(--rlx-tracking-tight);
  margin: 0 0 var(--rlx-space-1);
}
.rlx-section-sub {
  font-size: var(--rlx-type-body-size);
  color: var(--rlx-text-sub);
  margin: 0; font-weight: var(--rlx-type-body-weight);}

/* ── Card (used as token-display container) ─────────────────── */
.rlx-card {
  background: var(--rlx-content1);
  /* Borderless, like every other card in the set — the app's .pc-card, the two
     focal cards, the question and menu-grid rows. Elevation carries the edge.
     Kept on the smallest shadow rather than .pc-card's medium because this one
     nests inside other panels across the kit's demo pages. */
  border: 0;
  border-radius: var(--rlx-radius-lg);
  box-shadow: var(--rlx-shadow-sm);
  padding: var(--rlx-space-5);
}
.rlx-card + .rlx-card { margin-top: var(--rlx-space-4); }
.rlx-card-title {
  font-size: var(--rlx-type-subtitle-size);
  font-weight: var(--rlx-type-subtitle-weight);
  color: var(--rlx-text-strong);
  margin: 0 0 var(--rlx-space-1);
}
.rlx-card-sub {
  font-size: var(--rlx-type-body-size);
  color: var(--rlx-text-sub);
  margin: 0 0 var(--rlx-space-4); font-weight: var(--rlx-type-body-weight);}

/* ── Sidebar (HeroUI Pro flavor) ────────────────────────────── */
.rlx-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--rlx-content1);
  /* No horizontal padding — every inset is owned by the children, so the
     nav can scroll edge-to-edge and the scrollbar hugs the right side. */
  padding: var(--rlx-space-4) 0;
  gap: var(--rlx-space-4);
  overflow: hidden;
  transition: padding var(--rlx-sidebar-duration) var(--rlx-ease-default);
}
.rlx-shell[data-sidebar-collapsed="true"] .rlx-sidebar { padding: var(--rlx-space-4) 0; }

/* Hold the original horizontal inset on the chrome (brand / search / footer)
   and on each nav row, so only the nav's scroll track touches the edge. */
.rlx-sidebar-brand,
.rlx-sidebar-search,
.rlx-sidebar-footer,
.rlx-sidebar-group-label,
.rlx-sidebar-item {
  margin-inline: var(--rlx-space-3);
}
.rlx-shell[data-sidebar-collapsed="true"] .rlx-sidebar-item {
  margin-inline: 0;
}

/* Brand block */
.rlx-sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--rlx-space-3);
  padding: var(--rlx-space-2) var(--rlx-space-3);
  min-height: 44px;
}
.rlx-sidebar-brand-emblem {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--rlx-radius-md);
  background: linear-gradient(135deg, var(--rlx-primary), var(--rlx-secondary));
  color: var(--rlx-primary-foreground);
  font-weight: var(--rlx-fw-bold);
  font-size: var(--rlx-fs-small);
  box-shadow: var(--rlx-shadow-sm);
}
/* Image brand: strip the gradient chip so the bitmap shows
   pixel-exact in the 32px emblem slot. */
.rlx-sidebar-brand-emblem--image {
  background: none;
  box-shadow: none;
  border-radius: 0;
}
.rlx-sidebar-brand-emblem--image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.rlx-sidebar-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.rlx-sidebar-brand-name {
  font-size: var(--rlx-type-strong-size);
  font-weight: var(--rlx-type-strong-weight);
  color: var(--rlx-text-strong);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rlx-sidebar-brand-meta {
  font-size: var(--rlx-fs-tiny);
  color: var(--rlx-text-muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Collapse toggle (sits in topbar, but the icon set lives in sidebar context) */
.rlx-icon-btn {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--rlx-radius-sm);
  color: var(--rlx-text-sub);
  background: transparent;
  transition: background-color var(--rlx-duration-fast) var(--rlx-ease-default),
              color var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-icon-btn .rlx-icon { font-size: var(--rlx-icon-lg); }
.rlx-icon-btn:hover { background: var(--rlx-content2); color: var(--rlx-text-strong); }
.rlx-icon-btn[aria-pressed="true"] { color: var(--rlx-primary); background: var(--rlx-content2); }

/* Search slot */
.rlx-sidebar-search {
  display: flex;
  align-items: center;
  gap: var(--rlx-space-2);
  height: 36px;
  padding: 0 var(--rlx-space-3);
  border-radius: var(--rlx-radius-sm);
  background: var(--rlx-content2);
  border: 1px solid transparent;
  color: var(--rlx-text-muted);
  font-size: var(--rlx-fs-small);
  transition: border-color var(--rlx-duration-fast) var(--rlx-ease-default),
              background-color var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-sidebar-search:hover { border-color: var(--rlx-divider); }
.rlx-sidebar-search .rlx-icon { font-size: var(--rlx-icon-md); color: var(--rlx-text-muted); }
.rlx-sidebar-search-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rlx-sidebar-search-kbd {
  font-family: var(--rlx-font-mono);
  font-size: var(--rlx-fs-micro);
  color: var(--rlx-text-muted);
  background: var(--rlx-content1);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--rlx-divider);
  letter-spacing: var(--rlx-tracking-wider);
}

/* Nav list (scroll area between brand and footer) */
.rlx-sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--rlx-space-4);
  padding-right: 2px;
}
.rlx-sidebar-nav::-webkit-scrollbar { width: 6px; }
.rlx-sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--rlx-content3);
  border-radius: 999px;
}
.rlx-sidebar-nav::-webkit-scrollbar-thumb:hover { background: var(--rlx-default-400); }

.rlx-sidebar-group { display: flex; flex-direction: column; gap: var(--rlx-sidebar-item-gap); }
.rlx-sidebar-group + .rlx-sidebar-group { padding-top: var(--rlx-space-4); }
.rlx-sidebar-group-label {
  font-size: var(--rlx-type-caps-size);
  font-weight: var(--rlx-type-caps-weight);
  text-transform: uppercase;
  letter-spacing: var(--rlx-tracking-wider);
  color: var(--rlx-text-muted);
  padding: 0 var(--rlx-space-4) var(--rlx-space-2);
  white-space: nowrap;
  overflow: hidden;
}

.rlx-sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--rlx-space-4);
  height: var(--rlx-sidebar-item-height);
  padding: 0 var(--rlx-space-4);
  border-radius: var(--rlx-sidebar-item-radius);
  color: var(--rlx-text-sub);
  font-size: var(--rlx-fs-small);
  font-weight: var(--rlx-fw-medium);
  cursor: pointer;
  position: relative;
  transition: background-color var(--rlx-duration-fast) var(--rlx-ease-default),
              color var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-sidebar-item .rlx-icon {
  font-size: var(--rlx-sidebar-icon-size);
  color: inherit;
  transition: transform var(--rlx-duration-fast) var(--rlx-ease-default);
}
/* Trailing chevron — drawn from the same Lucide chevron-right path
   via CSS mask so it inherits color from the row and matches the
   stroke style of the leading icon. Hidden when a badge is present. */
.rlx-sidebar-item::after {
  content: "";
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: currentColor;
  opacity: .35;
  -webkit-mask: var(--rlx-chevron-right-mask) center / contain no-repeat;
          mask: var(--rlx-chevron-right-mask) center / contain no-repeat;
  transition: opacity var(--rlx-duration-fast) var(--rlx-ease-default),
              transform var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-sidebar-item:has(.rlx-sidebar-item-badge)::after { display: none; }

.rlx-sidebar-item-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rlx-sidebar-item-badge {
  font-size: var(--rlx-fs-micro);
  font-weight: var(--rlx-fw-semibold);
  padding: 2px 8px;
  border-radius: var(--rlx-radius-full);
  background: var(--rlx-content2);
  color: var(--rlx-text-sub);
  border: 1px solid var(--rlx-divider);
  letter-spacing: var(--rlx-tracking-wide);
}

.rlx-sidebar-item:hover {
  background: var(--rlx-content2);
  color: var(--rlx-text-strong);
}
.rlx-sidebar-item:hover .rlx-icon { transform: scale(.9); }
.rlx-sidebar-item:hover::after { opacity: .7; transform: translateX(2px); }

.rlx-sidebar-item[data-current="true"] {
  background: var(--rlx-content3);
  color: var(--rlx-text-strong);
}
.rlx-sidebar-item[data-current="true"]:hover .rlx-icon { transform: none; }
.rlx-sidebar-item[data-current="true"]::after { opacity: .7; }

.rlx-sidebar-item[data-disabled="true"] {
  cursor: not-allowed;
  opacity: var(--rlx-opacity-disabled);
}
.rlx-sidebar-item[data-disabled="true"]:hover {
  background: transparent;
  color: var(--rlx-text-sub);
}
.rlx-sidebar-item[data-disabled="true"]:hover .rlx-icon { color: var(--rlx-text-muted); }

.rlx-sidebar-item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--rlx-background), 0 0 0 4px var(--rlx-focus);
}

/* Footer (user chip + settings) */
.rlx-sidebar-footer {
  border-top: var(--rlx-divider-weight) solid var(--rlx-divider);
  padding-top: var(--rlx-space-3);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rlx-sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--rlx-space-3);
  padding: var(--rlx-space-2) var(--rlx-space-3);
  border-radius: var(--rlx-radius-md);
  transition: background-color var(--rlx-duration-fast) var(--rlx-ease-default);
  cursor: pointer;
}
.rlx-sidebar-user:hover { background: var(--rlx-content2); }
/* Non-interactive identity chip (no handler): drop the affordances. */
.rlx-sidebar-user:not([role="button"]) { cursor: default; }
.rlx-sidebar-user:not([role="button"]):hover { background: transparent; }
.rlx-sidebar-user-avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: var(--rlx-radius-full);
  background: linear-gradient(135deg, var(--rlx-secondary), var(--rlx-primary));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: var(--rlx-fw-semibold);
  font-size: var(--rlx-fs-tiny);
}
.rlx-sidebar-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.rlx-sidebar-user-name {
  font-size: var(--rlx-type-strong-size);
  font-weight: var(--rlx-type-strong-weight);
  color: var(--rlx-text-strong);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rlx-sidebar-user-email {
  font-size: var(--rlx-fs-tiny);
  color: var(--rlx-text-muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rlx-sidebar-user-avatar--image {
  background: var(--rlx-content3);
  padding: 0;
  overflow: hidden;
}
.rlx-sidebar-user-avatar--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rlx-sidebar-user-chevron {
  margin-left: auto;
  color: var(--rlx-text-muted);
  font-size: var(--rlx-icon-md);
  flex-shrink: 0;
}

/* Collapsed-rail mode: hide labels, badges, chevron, search label, brand text */
.rlx-shell[data-sidebar-collapsed="true"] .rlx-sidebar-item { justify-content: center; padding: 0; gap: 0; }
.rlx-shell[data-sidebar-collapsed="true"] .rlx-sidebar-item::after { display: none; }
.rlx-shell[data-sidebar-collapsed="true"] .rlx-sidebar-item .rlx-sidebar-item-label,
.rlx-shell[data-sidebar-collapsed="true"] .rlx-sidebar-item .rlx-sidebar-item-badge,
.rlx-shell[data-sidebar-collapsed="true"] .rlx-sidebar-brand-text,
.rlx-shell[data-sidebar-collapsed="true"] .rlx-sidebar-group-label,
.rlx-shell[data-sidebar-collapsed="true"] .rlx-sidebar-search-label,
.rlx-shell[data-sidebar-collapsed="true"] .rlx-sidebar-search-kbd,
.rlx-shell[data-sidebar-collapsed="true"] .rlx-sidebar-user-meta {
  display: none;
}
.rlx-shell[data-sidebar-collapsed="true"] .rlx-sidebar-search { padding: 0; justify-content: center; }
.rlx-shell[data-sidebar-collapsed="true"] .rlx-sidebar-user { justify-content: center; }
.rlx-shell[data-sidebar-collapsed="true"] .rlx-sidebar-user-chevron { display: none; }
.rlx-shell[data-sidebar-collapsed="true"] .rlx-sidebar-brand { justify-content: center; padding: var(--rlx-space-2) 0; }
.rlx-shell[data-sidebar-collapsed="true"] .rlx-sidebar-group-label::after {
  content: "—";
  display: block;
  color: var(--rlx-divider);
  padding: var(--rlx-space-1) 0;
}

/* ── Theme switcher (segmented control) ─────────────────────── */
.rlx-theme-switch {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  gap: 2px;
  background: var(--rlx-content2);
  border-radius: var(--rlx-radius-sm);
  /* No outer border — HeroUI's version sits flush against the page. */
}
.rlx-theme-switch-btn {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  /* Softer-than-circle so the selected state reads as a squircle
     against the pill container. */
  border-radius: var(--rlx-radius-sm);
  color: var(--rlx-text-muted);
  transition: background-color var(--rlx-duration-fast) var(--rlx-ease-default),
              color var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-theme-switch-btn .rlx-icon { font-size: var(--rlx-icon-md); }
.rlx-theme-switch-btn:hover { color: var(--rlx-text-strong); }
/* Subtle adjacent-layer fill instead of a high-contrast white chip:
   content3 reads as "one step deeper" against content2 in both themes
   (darker in light, lighter in dark) without the shadow halo. */
.rlx-theme-switch-btn[aria-pressed="true"] {
  background: var(--rlx-content3);
  color: var(--rlx-text-strong);
}
.rlx-theme-switch-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--rlx-content2), 0 0 0 4px var(--rlx-focus);
}

/* ── Foundations page — token visualizations ────────────────── */

/* Grid of swatches in a single color scale */
.rlx-swatch-row {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: var(--rlx-space-2);
}
.rlx-swatch-row + .rlx-swatch-row { margin-top: var(--rlx-space-3); }
.rlx-swatch-row-label {
  font-size: var(--rlx-type-caps-size);
  font-weight: var(--rlx-type-caps-weight);
  color: var(--rlx-text-sub);
  text-transform: uppercase;
  letter-spacing: var(--rlx-tracking-wider);
  margin-bottom: var(--rlx-space-2);
}
.rlx-swatch {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--rlx-fs-micro);
  color: var(--rlx-text-muted);
  min-width: 0;
}
.rlx-swatch-chip {
  height: 56px;
  border-radius: var(--rlx-radius-md);
  border: 1px solid var(--rlx-divider);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .04);
}
.rlx-swatch-step {
  font-weight: var(--rlx-fw-semibold);
  color: var(--rlx-text-sub);
  font-variant-numeric: tabular-nums;
}
.rlx-swatch-hex {
  font-family: var(--rlx-font-mono);
  font-size: var(--rlx-fs-micro);
  color: var(--rlx-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Semantic tokens grid */
.rlx-token-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--rlx-space-3);
}
.rlx-token-tile {
  display: flex;
  flex-direction: column;
  gap: var(--rlx-space-2);
  padding: var(--rlx-space-3);
  background: var(--rlx-content1);
  border: 1px solid var(--rlx-divider);
  border-radius: var(--rlx-radius-md);
}
.rlx-token-tile-chip {
  height: 44px;
  border-radius: var(--rlx-radius-sm);
  border: 1px solid var(--rlx-divider);
}
.rlx-token-tile-name {
  font-family: var(--rlx-font-mono);
  font-size: var(--rlx-type-meta-size);
  color: var(--rlx-text-strong); font-weight: var(--rlx-type-meta-weight);}
.rlx-token-tile-value {
  font-size: var(--rlx-fs-micro);
  color: var(--rlx-text-muted);
  font-family: var(--rlx-font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Radius demo */
.rlx-radius-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--rlx-space-4);
}
.rlx-radius-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--rlx-space-2);
}
.rlx-radius-tile-shape {
  height: 88px;
  background: linear-gradient(135deg, var(--rlx-content2), var(--rlx-content3));
  border: 1px solid var(--rlx-divider);
}
.rlx-radius-tile-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--rlx-font-mono);
  font-size: var(--rlx-fs-micro);
  color: var(--rlx-text-muted);
}
.rlx-radius-tile-meta strong {
  color: var(--rlx-text-strong);
  font-weight: var(--rlx-fw-semibold);
}

/* Shadow demo */
.rlx-shadow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--rlx-space-6);
  padding: var(--rlx-space-4);
  background: var(--rlx-content2);
  border-radius: var(--rlx-radius-md);
}
.rlx-shadow-tile {
  display: flex;
  flex-direction: column;
  gap: var(--rlx-space-3);
  padding: var(--rlx-space-4);
  background: var(--rlx-content1);
  border-radius: var(--rlx-radius-md);
  min-height: 100px;
}
.rlx-shadow-tile-sm { box-shadow: var(--rlx-shadow-sm); }
.rlx-shadow-tile-md { box-shadow: var(--rlx-shadow-md); }
.rlx-shadow-tile-lg { box-shadow: var(--rlx-shadow-lg); }
.rlx-shadow-tile-name {
  font-family: var(--rlx-font-mono);
  font-size: var(--rlx-type-meta-size);
  color: var(--rlx-text-strong); font-weight: var(--rlx-type-meta-weight);}
.rlx-shadow-tile-sub {
  font-size: var(--rlx-type-meta-size);
  color: var(--rlx-text-muted); font-weight: var(--rlx-type-meta-weight);}

/* Typography demo */
.rlx-type-stack {
  display: flex;
  flex-direction: column;
  gap: var(--rlx-space-4);
}
.rlx-type-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: baseline;
  gap: var(--rlx-space-4);
  padding-bottom: var(--rlx-space-3);
  border-bottom: 1px dashed var(--rlx-divider);
}
.rlx-type-row:last-child { border-bottom: 0; padding-bottom: 0; }
.rlx-type-row-label {
  font-family: var(--rlx-font-mono);
  font-size: var(--rlx-type-meta-size);
  color: var(--rlx-text-muted); font-weight: var(--rlx-type-meta-weight);}
.rlx-type-row-sample { color: var(--rlx-text-strong); }
.rlx-type-row-spec {
  font-family: var(--rlx-font-mono);
  font-size: var(--rlx-fs-micro);
  color: var(--rlx-text-sub);
  white-space: nowrap;
}

/* Spacing demo */
.rlx-space-stack { display: flex; flex-direction: column; gap: var(--rlx-space-3); }
.rlx-space-row {
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  align-items: center;
  gap: var(--rlx-space-4);
  font-family: var(--rlx-font-mono);
  font-size: var(--rlx-fs-micro);
  color: var(--rlx-text-muted);
}
.rlx-space-bar {
  height: 12px;
  background: var(--rlx-primary);
  border-radius: 3px;
  opacity: .85;
}
.rlx-space-row-label { color: var(--rlx-text-strong); }
.rlx-space-row-value { text-align: right; }

/* Motion demo */
.rlx-motion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--rlx-space-4);
}
.rlx-motion-tile {
  padding: var(--rlx-space-4);
  background: var(--rlx-content1);
  border: 1px solid var(--rlx-divider);
  border-radius: var(--rlx-radius-md);
  display: flex;
  flex-direction: column;
  gap: var(--rlx-space-3);
}
.rlx-motion-track {
  position: relative;
  height: 24px;
  background: var(--rlx-content2);
  border-radius: var(--rlx-radius-full);
  overflow: hidden;
}
.rlx-motion-dot {
  position: absolute;
  top: 50%;
  left: 4px;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border-radius: var(--rlx-radius-full);
  background: var(--rlx-primary);
}
.rlx-motion-tile[data-running="true"] .rlx-motion-dot {
  animation-name: rlx-motion-swing;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}
@keyframes rlx-motion-swing {
  from { left: 4px; }
  to   { left: calc(100% - 22px); }
}
.rlx-motion-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--rlx-font-mono);
  font-size: var(--rlx-fs-micro);
  color: var(--rlx-text-muted);
}
.rlx-motion-meta strong { color: var(--rlx-text-strong); font-weight: var(--rlx-fw-semibold); }

/* Z-index demo */
.rlx-z-stack {
  position: relative;
  height: 220px;
  background: var(--rlx-content2);
  border-radius: var(--rlx-radius-md);
  overflow: hidden;
}
.rlx-z-card {
  position: absolute;
  width: 180px;
  padding: var(--rlx-space-3) var(--rlx-space-4);
  background: var(--rlx-content1);
  border: 1px solid var(--rlx-divider);
  border-radius: var(--rlx-radius-md);
  box-shadow: var(--rlx-shadow-sm);
  font-family: var(--rlx-font-mono);
  font-size: var(--rlx-fs-micro);
  color: var(--rlx-text-strong);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rlx-z-card-sub { color: var(--rlx-text-muted); font-size: var(--rlx-type-meta-size); font-weight: var(--rlx-type-meta-weight);}

/* ── Primitives page — code/usage display ───────────────────── */
.rlx-code {
  background: var(--rlx-content2);
  border: 1px solid var(--rlx-divider);
  border-radius: var(--rlx-radius-md);
  padding: var(--rlx-space-3) var(--rlx-space-4);
  font-family: var(--rlx-font-mono);
  font-size: var(--rlx-fs-tiny);
  line-height: 1.55;
  color: var(--rlx-text);
  overflow-x: auto;
  white-space: pre;
  margin: 0;
}
.rlx-code-inline {
  font-family: var(--rlx-font-mono);
  font-size: .92em;
  background: var(--rlx-content2);
  border: 1px solid var(--rlx-divider);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--rlx-text-strong);
}

/* Code block — three-tab Preview / HTML / SDK demo wrapper.
   Tab strip on top using the kit's line tabs, panels share a
   bordered card body so the whole block reads as one unit. */
.rlx-codeblock {
  display: flex;
  flex-direction: column;
  background: var(--rlx-content1);
  border: 1px solid var(--rlx-divider);
  border-radius: var(--rlx-radius-lg);
  overflow: hidden;
}
.rlx-codeblock-tabs.rlx-tabs--line {
  padding: 0 var(--rlx-space-4);
  border-bottom: 1px solid var(--rlx-divider);
  background: var(--rlx-content2);
}
.rlx-codeblock-panels {
  position: relative;
}
.rlx-codeblock-panel {
  display: block;
}
.rlx-codeblock-panel[hidden] { display: none; }
.rlx-codeblock-panel--preview {
  padding: var(--rlx-space-6);
  background: var(--rlx-content2);
}
.rlx-codeblock-panel--code {
  position: relative;
}
.rlx-codeblock-pre {
  margin: 0;
  padding: var(--rlx-space-4) var(--rlx-space-5);
  background: var(--rlx-content1);
  font-family: var(--rlx-font-mono);
  font-size: var(--rlx-fs-tiny);
  line-height: 1.55;
  color: var(--rlx-text);
  overflow-x: auto;
  white-space: pre;
}
.rlx-codeblock-code { font-family: inherit; }
.rlx-codeblock-copy {
  position: absolute;
  top: var(--rlx-space-2);
  right: var(--rlx-space-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--rlx-radius-md);
  border: 1px solid var(--rlx-divider);
  background: var(--rlx-content2);
  color: var(--rlx-text-sub);
  font-size: var(--rlx-fs-micro);
  font-weight: var(--rlx-fw-medium);
  letter-spacing: var(--rlx-tracking-wide);
  cursor: pointer;
  transition: color var(--rlx-duration-fast) var(--rlx-ease-out),
              background var(--rlx-duration-fast) var(--rlx-ease-out),
              border-color var(--rlx-duration-fast) var(--rlx-ease-out);
}
.rlx-codeblock-copy:hover {
  color: var(--rlx-text-strong);
  background: var(--rlx-content3);
  border-color: var(--rlx-divider-strong, var(--rlx-divider));
}
.rlx-codeblock-copy:focus-visible {
  outline: 2px solid var(--rlx-focus, var(--rlx-primary));
  outline-offset: 2px;
}
.rlx-codeblock-copy[data-copied="true"] {
  color: var(--rlx-success-soft-foreground);
  border-color: rgb(var(--rlx-success-rgb) / .4);
  background: var(--rlx-success-soft);
}
.rlx-codeblock-copy .rlx-icon { font-size: var(--rlx-icon-sm); }
.rlx-api-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 2fr;
  gap: var(--rlx-space-4);
  padding: var(--rlx-space-3) 0;
  border-bottom: 1px dashed var(--rlx-divider);
  align-items: baseline;
}
.rlx-api-row:last-child { border-bottom: 0; }
.rlx-api-name {
  font-family: var(--rlx-font-mono);
  font-size: var(--rlx-type-strong-size);
  color: var(--rlx-text-strong);
  font-weight: var(--rlx-type-strong-weight);
}
.rlx-api-desc {
  font-size: var(--rlx-type-body-size);
  color: var(--rlx-text-sub);
  line-height: var(--rlx-lh-small); font-weight: var(--rlx-type-body-weight);}

.rlx-icon-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: var(--rlx-space-2);
}
.rlx-icon-gallery-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--rlx-space-2);
  padding: var(--rlx-space-3) var(--rlx-space-2);
  border: 1px solid var(--rlx-divider);
  border-radius: var(--rlx-radius-md);
  background: var(--rlx-content1);
  transition: border-color var(--rlx-duration-fast) var(--rlx-ease-default),
              transform var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-icon-gallery-tile:hover { border-color: var(--rlx-primary); transform: translateY(-1px); }
.rlx-icon-gallery-tile .rlx-icon { font-size: var(--rlx-icon-xl); color: var(--rlx-text-strong); }
.rlx-icon-gallery-tile-name {
  font-family: var(--rlx-font-mono);
  font-size: var(--rlx-type-meta-size);
  color: var(--rlx-text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%; font-weight: var(--rlx-type-meta-weight);}

.rlx-demo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--rlx-space-3);
  padding: var(--rlx-space-4);
  background: var(--rlx-content2);
  border-radius: var(--rlx-radius-md);
}
/* Vertical demo stack — used inside component-doc cards to space
   multiple example renders. Lives in surface.css (not page-local
   <style>) so the SPA router carries it across navigations. */
.rlx-demo-stack {
  display: flex;
  flex-direction: column;
  gap: var(--rlx-space-3);
  max-width: 480px;
}

.rlx-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--rlx-space-2);
  padding: 6px var(--rlx-space-3);
  background: var(--rlx-content1);
  border: 1px solid var(--rlx-divider);
  border-radius: var(--rlx-radius-sm);
  font-size: var(--rlx-fs-small);
  font-weight: var(--rlx-fw-medium);
  color: var(--rlx-text-strong);
  cursor: pointer;
  transition: background-color var(--rlx-duration-fast) var(--rlx-ease-default),
              border-color var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-mini-btn:hover { background: var(--rlx-content2); border-color: var(--rlx-default-300); }
.rlx-mini-btn .rlx-icon { font-size: var(--rlx-icon-sm); color: var(--rlx-text-sub); }
.rlx-mini-btn--primary {
  background: var(--rlx-primary);
  color: var(--rlx-primary-foreground);
  border-color: transparent;
}
.rlx-mini-btn--primary:hover { background: var(--rlx-primary-600); border-color: transparent; }
.rlx-mini-btn--primary .rlx-icon { color: currentColor; }

.rlx-demo-output {
  font-family: var(--rlx-font-mono);
  font-size: var(--rlx-fs-tiny);
  color: var(--rlx-text-sub);
  padding: var(--rlx-space-2) var(--rlx-space-3);
  background: var(--rlx-content1);
  border: 1px solid var(--rlx-divider);
  border-radius: var(--rlx-radius-sm);
  margin-top: var(--rlx-space-3);
  white-space: pre-wrap;
  min-height: 38px;
}

/* ── Button ──────────────────────────────────────────────────
   Component: minimal first cut.
   Class structure:
     .rlx-btn
       .rlx-btn--variant-{solid|bordered}
       .rlx-btn--color-{default|primary|warning}
       .rlx-btn--size-{sm|md}
       .rlx-btn--icon-only   (square, no label)
   ─────────────────────────────────────────────────────────── */
/* ── Button ─────────────────────────────────────────────────
   The kit's button uses a CSS-variable color hook (--rlx-btn-c,
   --rlx-btn-c-fg, --rlx-btn-c-rgb) set by the .rlx-btn--color-*
   class. Every variant then references those vars, so adding a
   color = one class with 3 var assignments, not 7 variant overrides.

   Sizing/spacing follows the same numeric scale as HeroUI's button
   (32/40/48 height, 64/80/96 min-width, weight 400, scale .97 on
   press, opacity .9 on hover for filled variants). */
.rlx-btn {
  /* Default the color hook to the neutral palette; per-color
     classes override these three vars. */
  --rlx-btn-c:     var(--rlx-default);
  --rlx-btn-c-fg:  var(--rlx-default-foreground);
  --rlx-btn-c-rgb: var(--rlx-default-rgb);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--rlx-space-2);
  /* Rounded rectangle, not a pill. The design's buttons are 8-9px in
     every position — header chrome, queue actions, the wall opener — and
     the only pills left in the interface are badges, dots, switch tracks
     and bars. See the radius scale for why that inverted. */
  border-radius: var(--rlx-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  font-family: inherit;
  font-weight: var(--rlx-type-control-weight);
  line-height: 1;
  transition:
    background-color var(--rlx-duration-fast) var(--rlx-ease-default),
    border-color     var(--rlx-duration-fast) var(--rlx-ease-default),
    color            var(--rlx-duration-fast) var(--rlx-ease-default),
    box-shadow       var(--rlx-duration-fast) var(--rlx-ease-default),
    opacity          var(--rlx-duration-fast) var(--rlx-ease-default),
    transform        var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--rlx-background), 0 0 0 4px var(--rlx-focus);
}
.rlx-btn:active:not([disabled]) { transform: scale(.98); }
.rlx-btn[disabled],
.rlx-btn[data-disabled="true"] {
  cursor: not-allowed;
  opacity: var(--rlx-opacity-disabled);
  transform: none;
  pointer-events: none;
}
.rlx-btn .rlx-icon { flex-shrink: 0; }

/* Full-width — for panel footers ("Manage Roles →"). Label aligns
   left, endContent (typically an arrow) pushes to the far right. */
.rlx-btn--full {
  display: flex;
  width: 100%;
  justify-content: space-between;
  text-align: left;
}
.rlx-btn--full .rlx-btn-label { margin-right: auto; }

/* Block — full-width with centered content (docked CTAs / actions). */
.rlx-btn--block { display: flex; width: 100%; }

/* ── Sizes ────────────────────────────────────────────────
   30 / 36 / 44. No min-width: the design sizes a button by its label
   and its padding — "Edit" and "Dismiss" are 150px wide only because
   the column they sit in is, not because the button has a floor. The
   old 64/80/96px minimums turned every short label into a slab.

   All three carry the same 13px/600 control label; only the box grows.
   Icons stay one step below the text they sit beside — see the icon
   scale for why they are not coupled. */
.rlx-btn--size-sm {
  height: 30px;
  padding: 0 var(--rlx-space-3);
  font-size: var(--rlx-fs-tiny);
  gap: 6px;
}
.rlx-btn--size-sm .rlx-icon { font-size: var(--rlx-icon-sm); }
.rlx-btn--size-sm.rlx-btn--icon-only { min-width: 30px; width: 30px; padding: 0; }

.rlx-btn--size-md {
  height: 36px;
  padding: 0 var(--rlx-space-3);
  font-size: var(--rlx-type-control-size);
  gap: var(--rlx-space-2);
}
.rlx-btn--size-md .rlx-icon { font-size: var(--rlx-icon-sm); }
.rlx-btn--size-md.rlx-btn--icon-only { min-width: 36px; width: 36px; padding: 0; }

.rlx-btn--size-lg {
  height: 44px;
  padding: 0 var(--rlx-space-4);
  font-size: var(--rlx-fs-small);
  gap: var(--rlx-space-2);
}
.rlx-btn--size-lg .rlx-icon { font-size: var(--rlx-icon-md); }
.rlx-btn--size-lg.rlx-btn--icon-only { min-width: 44px; width: 44px; padding: 0; }
/* Icon-only is a rounded SQUARE, not a circle. The design's close
   control is 30x30 at 8px; a circle there reads as an avatar. */
.rlx-btn--icon-only { border-radius: var(--rlx-radius-sm); }

/* ── Auth button ────────────────────────────────────────────
   A provider / sign-in button that can hold a remembered account inside it:
   [ provider icon ]  label            [ avatar ]
                      account email
   Left-aligned, two lines when an account is present, avatar pushed right. */
.rlx-authbtn {
  justify-content: flex-start;
  gap: var(--rlx-space-3);
  height: auto;
  min-height: 48px;
  padding-top: var(--rlx-space-2);
  padding-bottom: var(--rlx-space-2);
  text-align: left;
}
.rlx-authbtn-text { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; }
.rlx-authbtn-label { font-weight: var(--rlx-type-strong-weight); font-size: var(--rlx-type-strong-size);}
.rlx-authbtn-account {
  max-width: 100%;
  font-size: var(--rlx-fs-tiny);
  font-weight: var(--rlx-fw-normal);
  color: currentColor;
  opacity: .72;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rlx-authbtn > .rlx-avatar { margin-left: auto; flex-shrink: 0; }

/* ── Color hooks ────────────────────────────────────────── */
.rlx-btn--color-default {
  --rlx-btn-c:     var(--rlx-default);
  --rlx-btn-c-fg:  var(--rlx-default-foreground);
  --rlx-btn-c-ink: var(--rlx-default-foreground);
  --rlx-btn-c-soft: var(--rlx-content2);
  --rlx-btn-c-rgb: var(--rlx-default-rgb);
}
.rlx-btn--color-primary {
  --rlx-btn-c:     var(--rlx-primary);
  --rlx-btn-c-fg:  var(--rlx-primary-foreground);
  --rlx-btn-c-ink: var(--rlx-accent);
  --rlx-btn-c-soft: rgb(var(--rlx-accent-rgb) / .10);
  --rlx-btn-c-rgb: var(--rlx-primary-rgb);
}
.rlx-btn--color-secondary {
  --rlx-btn-c:     var(--rlx-secondary);
  --rlx-btn-c-fg:  var(--rlx-secondary-foreground);
  --rlx-btn-c-ink: var(--rlx-accent);
  --rlx-btn-c-soft: rgb(var(--rlx-accent-rgb) / .10);
  --rlx-btn-c-rgb: var(--rlx-secondary-rgb);
}
.rlx-btn--color-success {
  --rlx-btn-c:     var(--rlx-success);
  --rlx-btn-c-fg:  var(--rlx-success-foreground);
  --rlx-btn-c-ink: var(--rlx-success-soft-foreground);
  --rlx-btn-c-soft: var(--rlx-success-soft);
  --rlx-btn-c-rgb: var(--rlx-success-rgb);
}
.rlx-btn--color-warning {
  --rlx-btn-c:     var(--rlx-warning);
  --rlx-btn-c-fg:  var(--rlx-warning-foreground);
  --rlx-btn-c-ink: var(--rlx-warning-soft-foreground);
  --rlx-btn-c-soft: var(--rlx-warning-soft);
  --rlx-btn-c-rgb: var(--rlx-warning-rgb);
}
.rlx-btn--color-danger {
  --rlx-btn-c:     var(--rlx-danger);
  --rlx-btn-c-fg:  var(--rlx-danger-foreground);
  --rlx-btn-c-ink: var(--rlx-danger-soft-foreground);
  --rlx-btn-c-soft: var(--rlx-danger-soft);
  --rlx-btn-c-rgb: var(--rlx-danger-rgb);
}

/* ── Variants ───────────────────────────────────────────── */
/* -c is the FILL, -ink is the TEXT. They were one token until the status
   colours became pastels: bordered/light/flat/faded/ghost all set
   `color: var(--rlx-btn-c)`, which at #E79A95 on white is 2.2:1. */

/* solid: filled with the color, white/black foreground. */
.rlx-btn--variant-solid {
  background: var(--rlx-btn-c);
  color: var(--rlx-btn-c-fg);
  border-color: transparent;
}
.rlx-btn--variant-solid:hover:not([disabled]) {
  opacity: var(--rlx-opacity-hover);
}

/* bordered: 2px ring in the color, transparent fill. */
.rlx-btn--variant-bordered {
  background: transparent;
  color: var(--rlx-btn-c-ink);
  border-color: var(--rlx-btn-c-ink);
}
.rlx-btn--variant-bordered:hover:not([disabled]) {
  opacity: var(--rlx-opacity-hover);
}

/* light: transparent, color text, faint tinted bg on hover. */
.rlx-btn--variant-light {
  background: transparent;
  color: var(--rlx-btn-c-ink);
  border-color: transparent;
}
.rlx-btn--variant-light:hover:not([disabled]) {
  background: var(--rlx-btn-c-soft);
}

/* flat: soft tinted fill, color text. */
.rlx-btn--variant-flat {
  background: var(--rlx-btn-c-soft);
  color: var(--rlx-btn-c-ink);
  border-color: transparent;
}
.rlx-btn--variant-flat:hover:not([disabled]) {
  opacity: var(--rlx-opacity-hover);
}

/* faded: panel-style with the kit's neutral surface bg and a
   color-aware ring; reads as a softer alternative to bordered. */
.rlx-btn--variant-faded {
  background: var(--rlx-content2);
  color: var(--rlx-btn-c-ink);
  border-color: var(--rlx-default-200);
}
.rlx-btn--variant-faded:hover:not([disabled]) {
  background: var(--rlx-content3);
}

/* shadow: solid fill with a colored drop shadow underneath. */
.rlx-btn--variant-shadow {
  background: var(--rlx-btn-c);
  color: var(--rlx-btn-c-fg);
  border-color: transparent;
  box-shadow: 0 10px 20px -10px rgb(var(--rlx-btn-c-rgb) / .55);
}
.rlx-btn--variant-shadow:hover:not([disabled]) {
  opacity: var(--rlx-opacity-hover);
}

/* ghost: bordered at rest, fills with the color on hover. */
.rlx-btn--variant-ghost {
  background: transparent;
  color: var(--rlx-btn-c-ink);
  border-color: var(--rlx-btn-c-ink);
}
.rlx-btn--variant-ghost:hover:not([disabled]) {
  background: var(--rlx-btn-c);
  color: var(--rlx-btn-c-fg);
}

/* ── color="default" overrides ──────────────────────────────
   HeroUI v3 treats `default` as a neutral SURFACE token, not a
   saturated accent like primary/success. The generic variant
   rules above use `var(--rlx-btn-c)` as the text/border color,
   which works for accents but collapses for default — the
   surface color is too close to the page background to read.
   These overrides mirror HeroUI v3: text uses default-foreground,
   non-transparent surfaces use --rlx-default / --rlx-default-hover,
   and bordered/ghost use --rlx-divider for a visible neutral ring. */
.rlx-btn--variant-bordered.rlx-btn--color-default {
  color: var(--rlx-default-foreground);
  border-color: var(--rlx-divider);
}
.rlx-btn--variant-light.rlx-btn--color-default {
  color: var(--rlx-default-foreground);
}
.rlx-btn--variant-light.rlx-btn--color-default:hover:not([disabled]) {
  background: var(--rlx-default);
  opacity: 1;
}
.rlx-btn--variant-flat.rlx-btn--color-default {
  background: var(--rlx-default);
  color: var(--rlx-default-foreground);
}
.rlx-btn--variant-flat.rlx-btn--color-default:hover:not([disabled]) {
  background: var(--rlx-default-hover);
  opacity: 1;
}
.rlx-btn--variant-faded.rlx-btn--color-default {
  color: var(--rlx-default-foreground);
}
.rlx-btn--variant-ghost.rlx-btn--color-default {
  color: var(--rlx-default-foreground);
  border-color: var(--rlx-divider);
}
.rlx-btn--variant-ghost.rlx-btn--color-default:hover:not([disabled]) {
  background: var(--rlx-default);
  color: var(--rlx-default-foreground);
}

/* ── Avatar ──────────────────────────────────────────────────
   Circular user image with an initials fallback and an optional
   presence dot (online / away / busy / offline). Size flows from
   the --rlx-avatar-size hook so the initials and dot scale with it. */
.rlx-avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: var(--rlx-avatar-size, 36px);
  height: var(--rlx-avatar-size, 36px);
  border-radius: var(--rlx-radius-full);
  background: var(--rlx-content2);
  color: color-mix(in srgb, var(--rlx-foreground) 35%, var(--rlx-text-sub));   /* initials: text-sub alone missed AA in Spark — now 6.2+ */
  font-weight: var(--rlx-fw-semibold);
  font-size: calc(var(--rlx-avatar-size, 36px) * .4);
  line-height: 1;
  user-select: none;
}
/* xs is the in-card avatar — the asker's initials beside a quoted
   question, where 28px would outweigh the quote it labels. */
.rlx-avatar--size-xs { --rlx-avatar-size: 22px; }
.rlx-avatar--size-sm { --rlx-avatar-size: 28px; }
.rlx-avatar--size-md { --rlx-avatar-size: 36px; }
.rlx-avatar--size-lg { --rlx-avatar-size: 44px; }
.rlx-avatar--size-xl { --rlx-avatar-size: 56px; }
.rlx-avatar-img,
.rlx-avatar-initials {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.rlx-avatar-img { object-fit: cover; }
button.rlx-avatar { cursor: pointer; border: 0; padding: 0; }
.rlx-avatar:focus-visible { outline: none; box-shadow: var(--rlx-focus-ring); }

/* Presence dot — ringed in the page background so it reads on the image. */
.rlx-avatar-presence {
  position: absolute;
  right: 0;
  bottom: 0;
  width: calc(var(--rlx-avatar-size, 36px) * .28);
  height: calc(var(--rlx-avatar-size, 36px) * .28);
  border-radius: var(--rlx-radius-full);
  background: var(--rlx-default-400);
  box-shadow: 0 0 0 2px var(--rlx-background);
}
/* Badge — an icon disc on the same corner (createAvatar's `badge`), e.g. a
   lock for "has it claimed". Half the avatar, ink on the page colour, ringed
   like the dot. `--rlx-avatar-ring` lets a surface that isn't the page
   (a card, a row) ring it in its own colour. */
.rlx-avatar-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  place-items: center;
  width: max(14px, calc(var(--rlx-avatar-size, 36px) * .5));
  height: max(14px, calc(var(--rlx-avatar-size, 36px) * .5));
  border-radius: var(--rlx-radius-full);
  background: var(--rlx-foreground);
  color: var(--rlx-background);
  box-shadow: 0 0 0 2px var(--rlx-avatar-ring, var(--rlx-background));
  font-size: max(9px, calc(var(--rlx-avatar-size, 36px) * .3));
}
.rlx-avatar-presence--online  { background: var(--rlx-success); }
.rlx-avatar-presence--away    { background: var(--rlx-warning); }
.rlx-avatar-presence--busy    { background: var(--rlx-danger); }
.rlx-avatar-presence--offline { background: var(--rlx-default-400); }

/* ── Pill ────────────────────────────────────────────────────
   Compact rounded-full label chip. Optional leading dot or icon.
   Variants: solid (filled) · soft (tinted) · bordered. Color flows
   from a semantic color hook, like Button. */
.rlx-pill {
  /* Four, not three. --rlx-pill-c was doing double duty as the solid fill AND
     the label colour for the soft/bordered variants — which worked while the
     status colours were vivid and stopped working the moment they became
     pastels legible only as fills. -ink is the darkened hue each status now
     carries for exactly this. */
  --rlx-pill-c:     var(--rlx-default);
  --rlx-pill-c-fg:  var(--rlx-default-foreground);
  --rlx-pill-c-ink: var(--rlx-default-foreground);
  --rlx-pill-c-rgb: var(--rlx-default-rgb);
  display: inline-flex;
  align-items: center;
  gap: var(--rlx-space-2);
  height: 24px;
  padding: 0 10px;
  /* A chip, not a pill. The design's WEBINAR tag and ON THE WALL NOW
     eyebrow are both 6px rounded rectangles in tracked caps; only the
     status chip (size lg) is large enough to want a softer corner. */
  border-radius: var(--rlx-radius-xs);
  border: 1px solid transparent;
  font-size: var(--rlx-fs-micro);
  font-weight: var(--rlx-fw-semibold);
  letter-spacing: var(--rlx-tracking-wider);
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.rlx-pill--size-sm { height: 22px; padding: 0 9px; gap: 6px; }
.rlx-pill--size-md { height: 24px; }
/* lg is the STATUS chip — the Reconnecting pill in the header, and the
   only pill in the design that carries sentence case. It drops the caps
   treatment the two smaller sizes exist for. */
.rlx-pill--size-lg {
  height: 30px; padding: 0 11px;
  border-radius: var(--rlx-radius-sm);
  font-size: var(--rlx-fs-tiny);
  letter-spacing: var(--rlx-tracking-normal);
  text-transform: none;
}
.rlx-pill .rlx-icon { font-size: 1em; }
.rlx-pill-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: var(--rlx-radius-full);
  background: currentColor;
}

/* Color hooks */
.rlx-pill--color-default { --rlx-pill-c: var(--rlx-default); --rlx-pill-c-fg: var(--rlx-default-foreground); --rlx-pill-c-ink: var(--rlx-default-foreground); --rlx-pill-c-rgb: var(--rlx-default-rgb); }
.rlx-pill--color-primary { --rlx-pill-c: var(--rlx-primary); --rlx-pill-c-fg: var(--rlx-primary-foreground); --rlx-pill-c-ink: var(--rlx-accent); --rlx-pill-c-rgb: var(--rlx-primary-rgb); }
.rlx-pill--color-success { --rlx-pill-c: var(--rlx-success); --rlx-pill-c-fg: var(--rlx-success-foreground); --rlx-pill-c-ink: var(--rlx-success-soft-foreground); --rlx-pill-c-rgb: var(--rlx-success-rgb); }
.rlx-pill--color-warning { --rlx-pill-c: var(--rlx-warning); --rlx-pill-c-fg: var(--rlx-warning-foreground); --rlx-pill-c-ink: var(--rlx-warning-soft-foreground); --rlx-pill-c-rgb: var(--rlx-warning-rgb); }
.rlx-pill--color-danger { --rlx-pill-c: var(--rlx-danger); --rlx-pill-c-fg: var(--rlx-danger-foreground); --rlx-pill-c-ink: var(--rlx-danger-soft-foreground); --rlx-pill-c-rgb: var(--rlx-danger-rgb); }

/* Variants */
.rlx-pill--variant-solid    { background: var(--rlx-pill-c); color: var(--rlx-pill-c-fg); }
.rlx-pill--variant-soft     { background: rgb(var(--rlx-pill-c-rgb) / .35); color: var(--rlx-pill-c-ink); }
.rlx-pill--variant-bordered { background: transparent; color: var(--rlx-pill-c-ink); border-color: var(--rlx-pill-c); }
/* default is a neutral surface, not a saturated accent — match Button. */
.rlx-pill--variant-bordered.rlx-pill--color-default { color: var(--rlx-default-foreground); border-color: var(--rlx-divider); }
.rlx-pill--variant-soft.rlx-pill--color-default     { color: var(--rlx-default-foreground); }

/* ── Poll ────────────────────────────────────────────────────
   Live poll card. Voting state: question + radio options + submit.
   Results state (.showResults / cfg.results): percentage bars. The
   card is a focal surface: borderless, lifted on the largest of the three
   house shadows. (It carried an accent border + glow, which read as a blue
   halo while the accent was azure and as black chrome once it was not.) */
.rlx-poll {
  display: flex;
  flex-direction: column;
  gap: var(--rlx-space-4);
  padding: var(--rlx-space-6);
  background: var(--rlx-surface);
  border: 0;
  border-radius: var(--rlx-radius-lg);
  box-shadow: var(--rlx-shadow-lg);
}
/* Flat — drop the card chrome so the poll lays out on the page
   (e.g. a full-screen poll detail). */
.rlx-poll--flat { background: transparent; border: 0; box-shadow: none; padding: 0; }
.rlx-poll-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--rlx-space-3);
}
.rlx-poll-head-l { display: flex; align-items: center; gap: var(--rlx-space-2); min-width: 0; }
.rlx-poll-badge {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--rlx-radius-md);
  background: var(--rlx-accent-soft);
  color: var(--rlx-accent-soft-foreground);
}
.rlx-poll-label { color: var(--rlx-accent); font-weight: var(--rlx-type-strong-weight); font-size: var(--rlx-type-strong-size); }
.rlx-poll-pin { display: inline-flex; color: var(--rlx-text-muted); }
.rlx-poll-closes {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  color: var(--rlx-text-muted);
  font-size: var(--rlx-fs-small);
}
.rlx-poll-closes .rlx-icon { color: var(--rlx-text-muted); }
.rlx-poll-closes strong { color: var(--rlx-accent); font-weight: var(--rlx-fw-semibold); }
.rlx-poll-question {
  margin: var(--rlx-space-1) 0 0;
  font-size: var(--rlx-fs-2xl);   /* match the view/detail titles (Activity) */
  font-weight: var(--rlx-fw-extrabold);
  line-height: var(--rlx-lh-tight);
  letter-spacing: var(--rlx-tracking-tight);
  color: var(--rlx-foreground);
}
.rlx-poll-helper,
.rlx-poll-foot {
  display: flex;
  align-items: center;
  gap: var(--rlx-space-2);
  margin: 0;
  color: var(--rlx-text-muted);
  font-size: var(--rlx-fs-small);
}
.rlx-poll-helper .rlx-icon,
.rlx-poll-foot .rlx-icon { color: var(--rlx-accent); flex-shrink: 0; }
.rlx-poll-options { display: flex; flex-direction: column; gap: var(--rlx-space-3); }
.rlx-poll-option {
  display: flex;
  align-items: center;
  gap: var(--rlx-space-3);
  width: 100%;
  /* A poll option is a CONTROL, not a card: 36px at the control radius
     on the raised ground, which is what the design's preview shows. It
     was a 20px-rounded 56px slab carrying an 18px label. */
  min-height: 36px;
  padding: var(--rlx-space-2) var(--rlx-space-3);
  border: 1px solid transparent;
  border-radius: var(--rlx-radius-md);
  background: var(--rlx-content3);
  cursor: pointer;
  text-align: left;
  color: var(--rlx-foreground);
  font-weight: var(--rlx-fw-semibold);
  font-size: var(--rlx-fs-large);
  transition: border-color var(--rlx-duration-fast) var(--rlx-ease-default),
              background-color var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-poll-option:hover { background: var(--rlx-surface-secondary); }
.rlx-poll-option:focus-visible { outline: none; box-shadow: var(--rlx-focus-ring); }
.rlx-poll-radio {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  position: relative;
  border-radius: var(--rlx-radius-full);
  border: 2px solid var(--rlx-accent);
}
.rlx-poll-option[data-selected="true"] {
  border-color: var(--rlx-accent);
  background: var(--rlx-accent-soft);
}
.rlx-poll-option[data-selected="true"] .rlx-poll-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: var(--rlx-accent);
}
.rlx-poll-body { display: flex; flex-direction: column; gap: var(--rlx-space-4); }
.rlx-poll-submit { width: 100%; margin-top: var(--rlx-space-1); }
.rlx-poll-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--rlx-text-muted);
  font-size: var(--rlx-fs-small);
}
.rlx-poll-meta .rlx-icon { color: var(--rlx-text-muted); }

/* Labels wrap, and long unbroken tokens (URLs, IDs) break instead of
   overflowing the tile. */
.rlx-poll-option-label { min-width: 0; overflow-wrap: anywhere; }

/* Live-results option — radio + label + percentage, with a bar below. */
.rlx-poll-option--live { flex-direction: column; align-items: stretch; gap: var(--rlx-space-3); }
.rlx-poll-option-top { display: flex; align-items: center; gap: var(--rlx-space-3); }
.rlx-poll-option--live .rlx-poll-option-label { flex: 1; }
.rlx-poll-option-pct { flex-shrink: 0; font-weight: var(--rlx-fw-bold); font-size: var(--rlx-fs-large); color: var(--rlx-foreground); }
.rlx-poll-option--live[data-selected="true"] .rlx-poll-option-pct { color: var(--rlx-accent); }

/* ── Results state ──
   "Vote counted" status, one card per option with a percentage bar,
   the chosen option highlighted, a voters total, and a change button. */
.rlx-poll-counted {
  display: flex;
  align-items: center;
  gap: var(--rlx-space-2);
  margin: 0;
  color: var(--rlx-success-soft-foreground);
  font-weight: var(--rlx-fw-semibold);
  font-size: var(--rlx-fs-small);
}
.rlx-poll-counted .rlx-icon { color: var(--rlx-success-soft-foreground); }

.rlx-poll-result {
  display: flex;
  flex-direction: column;
  gap: var(--rlx-space-3);
  padding: var(--rlx-space-4);
  border: 1px solid var(--rlx-separator);
  border-radius: var(--rlx-radius-lg);
}
.rlx-poll-result--voted {
  border-color: var(--rlx-accent);
  background: var(--rlx-accent-soft);
}
.rlx-poll-result-top { display: flex; align-items: center; gap: var(--rlx-space-3); }
.rlx-poll-result-check {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--rlx-radius-full);
  background: var(--rlx-accent);
  color: var(--rlx-accent-foreground);
}
.rlx-poll-result-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.rlx-poll-result-label { font-weight: var(--rlx-type-strong-weight); font-size: var(--rlx-type-strong-size); color: var(--rlx-foreground); }
.rlx-poll-result-tag { font-size: var(--rlx-fs-small); font-weight: var(--rlx-fw-medium); color: var(--rlx-accent); }
.rlx-poll-result-pct { flex-shrink: 0; font-weight: var(--rlx-fw-bold); font-size: var(--rlx-fs-xl); color: var(--rlx-foreground); }
.rlx-poll-result--voted .rlx-poll-result-pct { color: var(--rlx-accent); }

.rlx-poll-bar {
  height: 8px;
  border-radius: var(--rlx-radius-full);
  background: var(--rlx-surface-tertiary);
  overflow: hidden;
}
.rlx-poll-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--rlx-accent);
  transition: width var(--rlx-duration-slow) var(--rlx-ease-out);
}

.rlx-poll-voters {
  display: flex;
  align-items: center;
  gap: var(--rlx-space-2);
  margin: 0;
  color: var(--rlx-text-muted);
  font-size: var(--rlx-fs-small);
}
.rlx-poll-voters .rlx-icon { color: var(--rlx-accent); }

/* ── List ────────────────────────────────────────────────────
   Vertical list container for items (e.g. Questions). */
.rlx-list { display: flex; flex-direction: column; gap: var(--rlx-space-3); }

/* ── Question ────────────────────────────────────────────────
   Question queue row: votes block · body (title + author) ·
   disclosure chevron. The whole row is a button. */
.rlx-question {
  display: flex;
  align-items: stretch;
  gap: var(--rlx-space-4);
  width: 100%;
  padding: var(--rlx-space-4);
  text-align: left;
  background: var(--rlx-surface);
  border: 0;
  border-radius: var(--rlx-radius-lg);
  box-shadow: var(--rlx-shadow-sm);
  color: var(--rlx-foreground);
  font: inherit;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.rlx-question:hover { background: var(--rlx-surface-secondary); box-shadow: var(--rlx-shadow-md); }
.rlx-question:active { transform: scale(.995); }
/* The focused question — accent ring + glow. */
.rlx-question--focus {
  border-color: rgb(var(--rlx-primary-rgb) / .55);
  box-shadow: 0 0 0 1px rgb(var(--rlx-primary-rgb) / .12),
              0 14px 32px -22px rgb(var(--rlx-primary-rgb) / .65);
}

/* The viewer's own upvote — accent tint on the votes block. Only the
   background/radius change; padding and borders stay put so the count
   sits in exactly the same place as on un-voted cards. */
.rlx-question--voted .rlx-question-votes {
  background: var(--rlx-accent-soft);
  background-clip: content-box;        /* tint wraps the count, not the right padding */
  border-right-color: transparent;
  border-radius: var(--rlx-radius-md);
}

/* Votes block — up arrow over a big count over a label, divided off. */
.rlx-question-votes {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 56px;
  padding-right: var(--rlx-space-4);
  border-right: 1px solid var(--rlx-separator);
}
.rlx-question-votes .rlx-icon { color: var(--rlx-primary); }
.rlx-question-count {
  font-size: var(--rlx-fs-xl);
  font-weight: var(--rlx-fw-extrabold);
  line-height: 1.1;
  color: var(--rlx-primary);
}
.rlx-question-votes-label {
  font-size: var(--rlx-type-meta-size);
  color: var(--rlx-text-muted); font-weight: var(--rlx-type-meta-weight);}

/* Body — title (wraps to ~2 lines) + author. */
.rlx-question-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.rlx-question-title {
  margin: 0;
  /* A pasted URL or a 120-char token otherwise renders at full width and
     drags the whole Q&A scroller sideways on a phone. */
  overflow-wrap: anywhere;
  font-size: var(--rlx-type-subtitle-size);
  font-weight: var(--rlx-type-subtitle-weight);
  line-height: var(--rlx-lh-tight);
  color: var(--rlx-foreground);
}
.rlx-question-author { font-size: var(--rlx-fs-small); color: var(--rlx-text-muted); }

/* Author + markers ("Answered", "3 replies") on one wrapping line. Only
   built when there is a marker; otherwise the author sits in the body as
   before. */
.rlx-question-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--rlx-space-3); }
.rlx-question-mark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--rlx-fs-small);
  font-weight: var(--rlx-fw-semibold);
  color: var(--rlx-text-sub);
  white-space: nowrap;
}
.rlx-question-mark--answered { color: var(--rlx-success-soft-foreground); }
/* The viewer's own question: a pill marker beside the author, and an accent
   edge down the card's left so it can be spotted while scrolling, before the
   marker can be read. Inset, so the card's box does not move. */
.rlx-question-mark--mine {
  padding: 1px 8px 1px 6px;
  border-radius: var(--rlx-radius-full);
  background: var(--rlx-accent-soft);
  color: var(--rlx-accent-soft-foreground);
}
.rlx-question--mine { box-shadow: inset 3px 0 0 var(--rlx-accent), var(--rlx-shadow-sm); }
.rlx-question--mine:hover { box-shadow: inset 3px 0 0 var(--rlx-accent), var(--rlx-shadow-md); }

/* The answer, shown under the question when the event shows answers next
   to questions. Three lines at most; the question's detail has the rest. */
.rlx-question-answer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
  padding: var(--rlx-space-2) var(--rlx-space-3);
  border-left: 3px solid var(--rlx-success);
  border-radius: var(--rlx-radius-sm);
  background: var(--rlx-success-soft);
}
.rlx-question-answer-by {
  font-size: var(--rlx-fs-tiny);
  font-weight: var(--rlx-fw-bold);
  color: var(--rlx-success-soft-foreground);
}
.rlx-question-answer-text {
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow-wrap: anywhere;
  font-size: var(--rlx-fs-small);
  line-height: var(--rlx-lh-normal);
  color: var(--rlx-foreground);
}
/* In a question's detail: the whole answer, no clamp. */
.rlx-question-answer--full .rlx-question-answer-text { display: block; -webkit-line-clamp: unset; line-clamp: none; }

.rlx-question-chev { flex-shrink: 0; display: flex; align-items: center; color: var(--rlx-text-sub); }

/* ── AI-grouped variant ──────────────────────────────────────
   An <article>: a lime-tinted card stacking the synthesised question
   (gutter · body) over the collapsible list of the original questions
   the AI grouped together.

   Was built on --rlx-warning throughout — card wash, count, tag, topic
   pill, source rule. Amber was defensible against the old azure accent,
   but this palette has no warm hue at all, so the whole variant now
   reads Lemon Lime, which is already the product's AI colour (see the
   console's --pcd-lime). The wash is layered over --rlx-surface rather
   than left as a bare alpha: it composites over the page ground
   otherwise, and this card is not always on white.

   40%: the strongest wash that still holds AA for the muted sub-lines
   sitting on it (4.63; foreground 15.32). */
/* 8%, not 40%. At 40% of a pale lavender on a light card this read as a
   tint; at 40% of a saturated hue on the dark ground it rendered as a
   solid indigo slab with the grouped questions inside it — the same
   failure the console's suggestion cards had, and the same fix: a card's
   ground is not where its identity goes. The AI tag at the top of the
   card carries it, next to the count, which is where the eye starts. */
.rlx-question--ai {
  display: block;
  background:
    linear-gradient(rgb(var(--rlx-ai-wash-rgb) / .08), rgb(var(--rlx-ai-wash-rgb) / .08)),
    var(--rlx-surface);
}
.rlx-question--ai:hover {
  background:
    linear-gradient(rgb(var(--rlx-ai-wash-rgb) / .14), rgb(var(--rlx-ai-wash-rgb) / .14)),
    var(--rlx-surface);
}
.rlx-question-row { display: flex; align-items: flex-start; gap: var(--rlx-space-4); }

/* Gutter — collapse chevron over a big warm vote count (no divider/label). */
.rlx-question-votes--ai { border-right: 0; padding-right: 0; gap: var(--rlx-space-1); justify-content: flex-start; }
.rlx-question--ai .rlx-question-count { font-size: var(--rlx-fs-2xl); color: var(--rlx-foreground); }
.rlx-question-collapse { display: flex; padding: 0; border: 0; background: transparent; color: var(--rlx-text-muted); cursor: pointer; }
.rlx-question-collapse:hover { color: var(--rlx-foreground); }
.rlx-question-collapse .rlx-icon { transition: transform var(--rlx-duration-fast) var(--rlx-ease-default); }
.rlx-question--ai[data-collapsed="true"] .rlx-question-collapse .rlx-icon { transform: rotate(180deg); }

/* Header — grouped tag · AI Summary action · avatar stack (pushed right). */
.rlx-question-aihead { display: flex; align-items: center; flex-wrap: wrap; gap: var(--rlx-space-2); margin-bottom: var(--rlx-space-1); }
.rlx-question-aitag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: var(--rlx-radius-xs);
  background: var(--rlx-accent);
  /* The accent fill's paired foreground, not a hand-picked ref colour. Lemon
     Lime on the accent measured 3.18:1 — the 14.08 noted here was from an
     older, much darker accent and never re-checked when the palette moved.
     `--rlx-accent-foreground` is defined per skin precisely for text on an
     accent fill (dark ink on Spark's light azure, white on light skin's deep
     blue), so it tracks the accent instead of drifting from it. */
  color: var(--rlx-accent-foreground);
  font-size: var(--rlx-fs-tiny);
  font-weight: var(--rlx-fw-bold);
}
.rlx-question-aisummary {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border: 0;
  border-radius: var(--rlx-radius-xs);
  background: var(--rlx-accent-soft);
  color: var(--rlx-accent-soft-foreground);
  font: inherit;
  font-size: var(--rlx-fs-tiny);
  font-weight: var(--rlx-fw-bold);
  cursor: pointer;
}
.rlx-question-aisummary:hover { background: var(--rlx-accent-soft-hover); }

/* The AI title sits a touch larger than a normal queue row. */
.rlx-question--ai .rlx-question-title { font-size: var(--rlx-fs-large); }

/* Overlapping avatar stacks (header + author line). */
.rlx-question-avatars { display: inline-flex; align-items: center; isolation: isolate; }
/* Earlier avatars sit ON TOP: each one's right edge — where the second
   initial of a 28px avatar sits — is the part the next avatar would cover
   ("MA" read as "M/"). Five levels covers the stack plus its "+N" chip. */
.rlx-question-avatars > * { position: relative; }
.rlx-question-avatars > :nth-child(1) { z-index: 5; }
.rlx-question-avatars > :nth-child(2) { z-index: 4; }
.rlx-question-avatars > :nth-child(3) { z-index: 3; }
.rlx-question-avatars > :nth-child(4) { z-index: 2; }
.rlx-question-avatars > :nth-child(5) { z-index: 1; }
.rlx-question-aihead .rlx-question-avatars { margin-left: auto; }
.rlx-question-avatars .rlx-avatar { box-shadow: 0 0 0 2px var(--rlx-surface); }
.rlx-question-avatars .rlx-avatar + .rlx-avatar,
.rlx-question-avatars .rlx-avatar + .rlx-question-avatars-more { margin-left: -6px; }
.rlx-question-avatars-more {
  display: inline-grid; place-items: center;
  min-width: 24px; height: 24px; padding: 0 5px;
  border-radius: var(--rlx-radius-full);
  background: var(--rlx-content3);
  box-shadow: 0 0 0 2px var(--rlx-surface);
  color: var(--rlx-text-sub);
  font-size: var(--rlx-fs-tiny);
  font-weight: var(--rlx-fw-bold);
}

/* Author line — chips + "Asked by …" summary. */
.rlx-question-grouped { display: flex; align-items: center; gap: var(--rlx-space-2); margin-top: 6px; }
.rlx-question-grouped-text { color: var(--rlx-text-muted); font-size: var(--rlx-fs-small); }

/* Sub-line — topic pill + relative time. */
.rlx-question-subline { display: flex; align-items: center; gap: var(--rlx-space-2); margin-top: var(--rlx-space-2); }
.rlx-question-topic {
  padding: 2px 10px;
  border: 1px solid rgb(var(--rlx-accent-rgb) / .25);
  border-radius: var(--rlx-radius-xs);
  color: var(--rlx-text-sub);
  font-size: var(--rlx-fs-tiny);
  font-weight: var(--rlx-fw-semibold);
}
.rlx-question-time { color: var(--rlx-text-muted); font-size: var(--rlx-fs-small); }

/* Sources toggle text ("Hide/Show original questions (N)"). */
.rlx-question-srctoggle {
  align-self: flex-start;
  margin-top: var(--rlx-space-3);
  padding: 0;
  border: 0;
  background: transparent;
  /* This link sits on the tinted wash of the AI card, not on the page. The
     bare accent is a fill colour and only reached 3.46:1 there;
     `--rlx-accent-soft-foreground` is the darker partner the kit already
     defines for accent text on a soft/tinted ground. */
  color: var(--rlx-accent-soft-foreground);
  font: inherit;
  font-size: var(--rlx-fs-small);
  font-weight: var(--rlx-fw-bold);
  cursor: pointer;
}
.rlx-question-srctoggle:hover { text-decoration: underline; }

/* The original questions, with a soft ink rule down the side. */
.rlx-question-sources {
  display: flex;
  flex-direction: column;
  gap: var(--rlx-space-3);
  /* Padding, not margin — see the .rlx-expand note. The utility zeroes it
     while the track is closed so the collapsed height is a true 0. */
  padding-top: var(--rlx-space-2);
  padding-left: var(--rlx-space-4);
  border-left: 2px solid rgb(var(--rlx-accent-rgb) / .20);
}
.rlx-question--ai[data-collapsed="true"] .rlx-question-srctoggle { /* stays visible */ }
/* Opening/closing is animated by the .rlx-expand track this list sits in —
   `display: none` can't be transitioned, so the visibility is driven by the
   track's grid rows, not by hiding the list. */
.rlx-question-source { display: flex; align-items: flex-start; gap: var(--rlx-space-2); }
.rlx-question-source .rlx-avatar { flex-shrink: 0; margin-top: 1px; }
.rlx-question-source-text { margin: 0; font-size: var(--rlx-fs-small); color: var(--rlx-text-sub); line-height: var(--rlx-lh-snug); }
.rlx-question-source-author { font-weight: var(--rlx-fw-bold); color: var(--rlx-foreground); }
.rlx-question-source-quote { font-style: italic; }
.rlx-question-more { margin: 0; padding-top: 2px; color: var(--rlx-text-muted); font-size: var(--rlx-fs-small); }

/* ── Textarea ────────────────────────────────────────────────
   Multiline input in a bordered box with an optional footer
   (leading slot + character counter). */
.rlx-textarea {
  display: flex;
  flex-direction: column;
  background: var(--rlx-input-bg);
  border: 1px solid var(--rlx-input-border);
  border-radius: var(--rlx-radius-lg);
  transition: border-color var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-textarea:focus-within { border-color: var(--rlx-input-border-focus); }
.rlx-textarea-input {
  width: 100%;
  resize: none;
  border: 0;
  background: transparent;
  outline: none;
  color: var(--rlx-field-foreground);
  font-family: inherit;
  font-size: var(--rlx-fs-large);
  line-height: var(--rlx-lh-normal);
  padding: var(--rlx-space-4);
  min-height: 140px;
}
.rlx-textarea-input::placeholder { color: var(--rlx-field-placeholder); }
.rlx-textarea-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--rlx-space-4) var(--rlx-space-4);
}
.rlx-textarea-foot-start { display: inline-flex; color: var(--rlx-text-muted); }
.rlx-textarea-count { font-size: var(--rlx-fs-small); color: var(--rlx-text-muted); }

/* ── Composer ────────────────────────────────────────────────
   Rich message input: textarea + attach toolbar (file · image ·
   emoji) + Post. Built by Surface.createComposer. */
.rlx-composer {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--rlx-input-bg);
  border: 1px solid var(--rlx-input-border);
  border-radius: var(--rlx-radius-lg);
  transition: border-color var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-composer:focus-within { border-color: var(--rlx-input-border-focus); }
.rlx-composer-input {
  width: 100%;
  resize: vertical;
  min-height: 64px;
  border: 0;
  background: transparent;
  outline: none;
  color: var(--rlx-field-foreground);
  font-family: inherit;
  font-size: var(--rlx-fs-small);
  line-height: var(--rlx-lh-normal);
  padding: var(--rlx-space-3) var(--rlx-space-3) var(--rlx-space-2);
}
.rlx-composer-input::placeholder { color: var(--rlx-field-placeholder); }
.rlx-composer-file { display: none; }

/* Attachment chips. */
.rlx-composer-attachments { display: flex; flex-wrap: wrap; gap: var(--rlx-space-2); padding: 0 var(--rlx-space-3) var(--rlx-space-2); }
.rlx-composer-attachments[hidden] { display: none; }
.rlx-composer-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 200px;
  padding: 4px 4px 4px 8px;
  border: 1px solid var(--rlx-separator);
  border-radius: var(--rlx-radius-md);
  background: var(--rlx-surface);
}
.rlx-composer-chip-thumb { width: 24px; height: 24px; border-radius: var(--rlx-radius-sm); object-fit: cover; flex-shrink: 0; }
.rlx-composer-chip-icon { display: inline-flex; flex-shrink: 0; color: var(--rlx-text-sub); }
.rlx-composer-chip-name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--rlx-type-strong-size); color: var(--rlx-text-sub); font-weight: var(--rlx-type-strong-weight);}
.rlx-composer-chip-remove { display: inline-flex; padding: 2px; border: 0; border-radius: var(--rlx-radius-full); background: transparent; color: var(--rlx-text-muted); cursor: pointer; }
.rlx-composer-chip-remove:hover { background: var(--rlx-content2); color: var(--rlx-foreground); }

/* Toolbar — tools left, counter + Post right. */
.rlx-composer-toolbar { display: flex; align-items: center; gap: var(--rlx-space-2); padding: var(--rlx-space-2); border-top: 1px solid var(--rlx-divider); }
.rlx-composer-tools { display: flex; align-items: center; gap: 2px; }
.rlx-composer-tool {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: 0; border-radius: var(--rlx-radius-md);
  background: transparent; color: var(--rlx-text-sub); cursor: pointer;
  transition: background-color var(--rlx-duration-fast) var(--rlx-ease-default), color var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-composer-tool:hover { background: var(--rlx-content2); color: var(--rlx-foreground); }
.rlx-composer-end { margin-left: auto; display: flex; align-items: center; gap: var(--rlx-space-2); }
.rlx-composer-count { font-size: var(--rlx-fs-tiny); color: var(--rlx-text-muted); }
.rlx-composer-post { border-radius: var(--rlx-radius-md); }

/* Emoji picker — a small grid floating above the toolbar. */
.rlx-composer-emoji {
  position: absolute;
  left: var(--rlx-space-2);
  bottom: 52px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  padding: var(--rlx-space-2);
  background: var(--rlx-surface);
  border: 1px solid var(--rlx-separator);
  border-radius: var(--rlx-radius-lg);
  box-shadow: var(--rlx-shadow-lg, 0 20px 50px -12px rgb(0 0 0 / .5));
}
.rlx-composer-emoji[hidden] { display: none; }
.rlx-composer-emoji-item {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 0; border-radius: var(--rlx-radius-md);
  background: transparent;
  font-size: 18px; line-height: 1;
  cursor: pointer;
}
.rlx-composer-emoji-item:hover { background: var(--rlx-content2); }

/* ── Switch ──────────────────────────────────────────────────
   On/off toggle. Accent track when on. */
.rlx-switch {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 20px;
  border-radius: var(--rlx-radius-full);
  background: var(--rlx-switch-off, var(--rlx-separator-tertiary));
  transition: background-color var(--rlx-duration) var(--rlx-ease-default);
}
.rlx-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: var(--rlx-radius-full);
  /* This was a hardcoded #fff and one of the three colours in the file
     that did not follow the skin. On the design's OFF track (#3F3F46)
     the thumb is #A1A1AA; white appears only once the track is filled,
     which the checked rule below restores. */
  background: var(--rlx-switch-thumb, #fff);
  box-shadow: var(--rlx-shadow-sm);
  transition: transform var(--rlx-duration) var(--rlx-ease-spring);
}
/* The ON fill is a hook, not a constant. The design uses the accent for
   a setting the presenter controls (what the audience sees) and success
   green for a wall element that is currently live — same control, two
   meanings, and the colour is what separates them. */
.rlx-switch[aria-checked="true"] { background: var(--rlx-switch-on, var(--rlx-accent)); }
.rlx-switch[aria-checked="true"] .rlx-switch-thumb { transform: translateX(16px); background: #fff; }
.rlx-switch:focus-visible { outline: none; box-shadow: var(--rlx-focus-ring); }

/* ── Setting Row ─────────────────────────────────────────────
   Leading icon · title + description · trailing control. */
.rlx-setting-row {
  display: flex;
  align-items: center;
  gap: var(--rlx-space-3);
  width: 100%;
  text-align: left;
  background: transparent;
  min-height: 38px;
  padding: var(--rlx-space-2) 0;
}
button.rlx-setting-row { cursor: pointer; }
.rlx-setting-row:focus-visible { outline: none; box-shadow: var(--rlx-focus-ring); border-radius: var(--rlx-radius-md); }
.rlx-setting-row-icon { flex-shrink: 0; display: grid; place-items: center; width: 24px; color: var(--rlx-foreground); }
.rlx-setting-row-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
/* `strong` (14/600), not `title` (18/700). This was the kit's loudest
   type outlier: a settings list rendered its row labels two steps larger
   than the panel heading above them. Every other row primitive — panel,
   timeline, activity item, question — is on the same role. */
.rlx-setting-row-title { font-weight: var(--rlx-type-strong-weight); font-size: var(--rlx-type-strong-size); color: var(--rlx-foreground); }
.rlx-setting-row-desc { font-size: var(--rlx-type-body-size); color: var(--rlx-text-muted); font-weight: var(--rlx-type-body-weight);}
.rlx-setting-row-trailing { flex-shrink: 0; display: inline-flex; align-items: center; color: var(--rlx-text-muted); }

/* ── Callout ─────────────────────────────────────────────────
   Informational block: leading icon, title, text. */
.rlx-callout { display: flex; gap: var(--rlx-space-3); }
.rlx-callout-icon { flex-shrink: 0; display: grid; place-items: center; }
.rlx-callout-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rlx-callout-title { font-weight: var(--rlx-type-title-weight); font-size: var(--rlx-type-title-size); color: var(--rlx-foreground); }
.rlx-callout-text { margin: 0; font-size: var(--rlx-fs-small); color: var(--rlx-text-muted); line-height: var(--rlx-lh-normal); }
.rlx-callout--plain .rlx-callout-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--rlx-radius-full);
  background: var(--rlx-content2);
  color: var(--rlx-foreground);
}
.rlx-callout--soft {
  align-items: flex-start;
  padding: var(--rlx-space-4);
  border-radius: var(--rlx-radius-lg);
  background: var(--rlx-content2);
}
.rlx-callout--soft .rlx-callout-icon { color: var(--rlx-text-muted); padding-top: 2px; }

/* ── Announcement ────────────────────────────────────────────
   Update/announcement card: colored badge + label + time, title,
   body, optional action. Color tints the badge, label, and action. */
.rlx-announcement {
  display: flex;
  flex-direction: column;
  gap: var(--rlx-space-3);
  padding: var(--rlx-space-5);
  background: var(--rlx-surface);
  border: 1px solid var(--rlx-separator);
  border-radius: var(--rlx-radius-lg);
}
.rlx-announcement-head { display: flex; align-items: center; gap: var(--rlx-space-2); }
.rlx-announcement-badge {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--rlx-radius-md);
}
.rlx-announcement-label { font-weight: var(--rlx-type-strong-weight); font-size: var(--rlx-type-strong-size); }
.rlx-announcement-pin { display: inline-flex; color: var(--rlx-text-muted); }
.rlx-announcement-time { margin-left: auto; flex-shrink: 0; font-size: var(--rlx-fs-small); color: var(--rlx-text-muted); }
.rlx-announcement-title {
  margin: 0;
  font-size: var(--rlx-type-display-size);   /* match Poll / Question content titles */
  font-weight: var(--rlx-type-display-weight);
  line-height: var(--rlx-lh-snug);
  color: var(--rlx-foreground);
}
.rlx-announcement-body { margin: 0; font-size: var(--rlx-fs-small); color: var(--rlx-text-sub); line-height: var(--rlx-lh-normal); }
.rlx-announcement-action { align-self: flex-start; }
/* Color hooks — badge fill + label/badge tint. */
.rlx-announcement--default .rlx-announcement-badge { background: var(--rlx-content2);              color: var(--rlx-text-sub); }
.rlx-announcement--default .rlx-announcement-label { color: var(--rlx-foreground); }
.rlx-announcement--primary .rlx-announcement-badge { background: rgb(var(--rlx-primary-rgb) / .16); color: var(--rlx-primary); }
.rlx-announcement--primary .rlx-announcement-label { color: var(--rlx-primary); }
.rlx-announcement--success .rlx-announcement-badge { background: var(--rlx-success-soft); color: var(--rlx-success-soft-foreground); }
.rlx-announcement--success .rlx-announcement-label { color: var(--rlx-success-soft-foreground); }
.rlx-announcement--warning .rlx-announcement-badge { background: var(--rlx-warning-soft); color: var(--rlx-warning-soft-foreground); }
.rlx-announcement--warning .rlx-announcement-label { color: var(--rlx-warning-soft-foreground); }
.rlx-announcement--danger  .rlx-announcement-badge { background: var(--rlx-danger-soft);  color: var(--rlx-danger-soft-foreground); }
.rlx-announcement--danger  .rlx-announcement-label { color: var(--rlx-danger-soft-foreground); }

/* ── Activity Item ───────────────────────────────────────────
   Typed feed row: colored icon chip · title + time · description.
   Unread shows an accent badge dot on the icon. */
.rlx-activity-item {
  display: flex;
  align-items: flex-start;
  gap: var(--rlx-space-3);
  width: 100%;
  text-align: left;
  padding: var(--rlx-space-3);
  background: var(--rlx-surface);
  border: 1px solid var(--rlx-separator);
  border-radius: var(--rlx-radius-lg);
}
button.rlx-activity-item { cursor: pointer; transition: border-color var(--rlx-duration-fast) var(--rlx-ease-default); }
button.rlx-activity-item:hover { border-color: var(--rlx-separator-secondary); }
.rlx-activity-item:focus-visible { outline: none; box-shadow: var(--rlx-focus-ring); }
/* Plain — drop the card chrome (keeps padding so icons stay aligned
   with neighbouring cards). For non-interactive rows. */
.rlx-activity-item--plain { background: transparent; border-color: transparent; }
.rlx-activity-item-icon {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--rlx-radius-md);
}
.rlx-activity-item-icon--default { background: var(--rlx-content2);                     color: var(--rlx-text-sub); }
.rlx-activity-item-icon--primary { background: var(--rlx-accent-soft);                   color: var(--rlx-accent-soft-foreground); }
.rlx-activity-item-icon--success { background: var(--rlx-success-soft);        color: var(--rlx-success-soft-foreground); }
.rlx-activity-item-icon--warning { background: var(--rlx-warning-soft);        color: var(--rlx-warning-soft-foreground); }
.rlx-activity-item-icon--danger  { background: var(--rlx-danger-soft);         color: var(--rlx-danger-soft-foreground); }
.rlx-activity-item--unread .rlx-activity-item-icon::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: var(--rlx-radius-full);
  background: var(--rlx-accent);
  box-shadow: 0 0 0 2px var(--rlx-surface);
}
.rlx-activity-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rlx-activity-item-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--rlx-space-2); }
.rlx-activity-item-title {
  min-width: 0;
  font-weight: var(--rlx-type-subtitle-weight);
  font-size: var(--rlx-type-subtitle-size);
  color: var(--rlx-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rlx-activity-item-time { flex-shrink: 0; font-size: var(--rlx-fs-tiny); color: var(--rlx-text-muted); }
.rlx-activity-item-desc {
  font-size: var(--rlx-type-body-size);
  color: var(--rlx-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap; font-weight: var(--rlx-type-body-weight);}

/* ── Reaction Bar ────────────────────────────────────────────
   Horizontally-scrollable row of reaction tiles (glyph + count +
   label), plus an optional "Add" tile. Active tile picks up accent. */
/* Balanced rows; tiles keep the 4-per-row width and rows centre. */
.rlx-reactionbar { display: flex; flex-direction: column; gap: var(--rlx-space-2); }
.rlx-reactionbar-row { display: flex; justify-content: center; gap: var(--rlx-space-2); }
.rlx-reaction {
  flex: 0 0 calc((100% - 3 * var(--rlx-space-2)) / 4);
  width: auto;
  /* Glyph · label — a big expressive tile. Counts are not shown (see
     .rlx-reaction-count below), so tiles are two rows: the emoji and its
     label, aligned across the row including the "Add" tile. */
  display: grid;
  grid-template-rows: 44px auto;
  align-items: center;
  justify-items: center;
  gap: 4px;
  padding: var(--rlx-space-3) var(--rlx-space-2);
  border: 1px solid var(--rlx-separator);
  border-radius: var(--rlx-radius-lg);
  background: var(--rlx-surface);
  cursor: pointer;
  transition: border-color var(--rlx-duration-fast) var(--rlx-ease-default),
              background-color var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-reaction:hover { border-color: var(--rlx-separator-secondary); }
.rlx-reaction[data-active="true"] { border-color: var(--rlx-accent); background: rgb(var(--rlx-accent-rgb) / .10); }
/* Emoji render at display size, not text size — off the scale on purpose. */
.rlx-reaction-glyph { grid-row: 1; display: inline-flex; align-items: center; justify-content: center; font-size: 34px; line-height: 1; color: var(--rlx-foreground); }
/* Counts are intentionally not displayed — reactions read as expressive
   taps, not a vote tally. The node is still created by createReactionBar
   but hidden across every app for one consistent look. */
.rlx-reaction-count { display: none; }
.rlx-reaction-label { grid-row: 2; font-size: var(--rlx-type-body-size); line-height: 1; color: var(--rlx-text-muted); white-space: nowrap; font-weight: var(--rlx-type-body-weight);}
/* The Add tile reads as an affordance, not a reaction: dashed + muted. */
.rlx-reaction--add { border-style: dashed; color: var(--rlx-text-sub); }
.rlx-reaction--add .rlx-reaction-glyph { color: var(--rlx-text-sub); }

/* Select mode — the same tiles used as a multi-select chooser: a check
   badge marks the enabled reactions. */
.rlx-reactionbar--select .rlx-reaction { position: relative; }
.rlx-reaction-check {
  position: absolute; top: 6px; right: 6px;
  display: none; place-items: center;
  width: 18px; height: 18px;
  border-radius: var(--rlx-radius-full);
  background: var(--rlx-accent); color: #fff;
}
.rlx-reaction[data-active="true"] .rlx-reaction-check { display: grid; }

/* Compact — all tiles share one row; a slightly smaller glyph so a full
   set (e.g. 5 + Add) fits a single line in a detail view. */
.rlx-reactionbar--compact .rlx-reactionbar-row { gap: var(--rlx-space-2); }
.rlx-reactionbar--compact .rlx-reaction {
  flex: 1 1 0;
  min-width: 0;
  grid-template-rows: 34px auto;
  padding: var(--rlx-space-2) 4px;
}
.rlx-reactionbar--compact .rlx-reaction-glyph { font-size: 26px; }
.rlx-reactionbar--compact .rlx-reaction-label {
  /* Two lines rather than an ellipsis ("Appla…"): a label may wrap at its
     spaces, and a set longer than five tiles moves to rows of four
     (createReactionBar), so a one-word label like "Applause" gets a tile wide
     enough to hold it. */
  font-size: var(--rlx-fs-tiny); max-width: 100%;
  white-space: normal; text-align: center; line-height: 1.15;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}

/* ── Comment ─────────────────────────────────────────────────
   Avatar · (author + time + more) · text · reply + likes. */
.rlx-comment { display: flex; gap: var(--rlx-space-3); }
.rlx-comment-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rlx-comment-head { display: flex; align-items: center; gap: var(--rlx-space-2); }
.rlx-comment-author { font-weight: var(--rlx-fw-semibold); font-size: var(--rlx-fs-small); color: var(--rlx-foreground); }
.rlx-comment-time { font-size: var(--rlx-fs-tiny); color: var(--rlx-text-muted); }
/* No negative right margin: it pulled the button 4px past the comment's edge,
   and inside any padding-less scroller (a comment list that scrolls) that 4px
   is a horizontal scrollbar. */
.rlx-comment-more { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; color: var(--rlx-text-muted); cursor: pointer; }
.rlx-comment-text { margin: 0; font-size: var(--rlx-fs-small); color: var(--rlx-text); line-height: var(--rlx-lh-normal); }
.rlx-comment-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--rlx-space-3); margin-top: 2px; }
.rlx-comment-reply { display: inline-flex; align-items: center; min-height: 24px; font-size: var(--rlx-fs-small); font-weight: var(--rlx-fw-medium); color: var(--rlx-text-sub); cursor: pointer; }
.rlx-comment-reply:hover { color: var(--rlx-foreground); }
.rlx-comment-like { margin-left: auto; display: inline-flex; align-items: center; min-height: 24px; gap: 5px; font-size: var(--rlx-fs-small); color: var(--rlx-text-muted); cursor: pointer; }
.rlx-comment-like[data-active="true"] { color: var(--rlx-accent); }

/* ── Dropdown ────────────────────────────────────────────────
   Select-style trigger + menu. */
.rlx-dropdown { position: relative; display: inline-block; }
.rlx-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 var(--rlx-space-3);
  border: 1px solid var(--rlx-divider);
  border-radius: var(--rlx-radius-sm);
  background: var(--rlx-surface);
  color: var(--rlx-foreground);
  font-size: var(--rlx-type-control-size);
  font-weight: var(--rlx-fw-medium);
  cursor: pointer;
  transition: border-color var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-dropdown-trigger--sm { height: 28px; padding: 0 var(--rlx-space-2) 0 var(--rlx-space-3); font-size: var(--rlx-fs-tiny); }
.rlx-dropdown-trigger:hover { border-color: var(--rlx-separator-secondary); }
.rlx-dropdown-trigger[aria-expanded="true"] { border-color: var(--rlx-accent); }
.rlx-dropdown-chevron { color: var(--rlx-text-muted); transition: transform var(--rlx-duration-fast) var(--rlx-ease-default); }
.rlx-dropdown-trigger[aria-expanded="true"] .rlx-dropdown-chevron { transform: rotate(180deg); }
.rlx-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: var(--rlx-z-dropdown);
  min-width: 168px;
  padding: var(--rlx-space-1);
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--rlx-surface);
  border: 1px solid var(--rlx-divider);
  border-radius: var(--rlx-radius-md);
  box-shadow: var(--rlx-shadow-lg);
  /* Long lists (timezones) stay compact — about seven rows, then scroll. */
  max-height: 272px;
  overflow-y: auto;
}
.rlx-dropdown-menu--end { left: auto; right: 0; }
/* Flipped: not enough room below the trigger, so open upward (set by JS). */
.rlx-dropdown-menu--up { top: auto; bottom: calc(100% + 6px); }
.rlx-dropdown-menu[hidden] { display: none; }   /* display:flex above would otherwise override [hidden] */
.rlx-dropdown-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--rlx-space-3);
  padding: var(--rlx-space-2) var(--rlx-space-3);
  border-radius: var(--rlx-radius-sm);
  color: var(--rlx-text-sub);
  font-size: var(--rlx-fs-small);
  text-align: left;
  cursor: pointer;
}
.rlx-dropdown-option:hover { background: var(--rlx-content2); color: var(--rlx-text-strong); }
/* Text-on-surface accent: the accent pulled 30% toward the foreground — lighter
   on dark, darker on light — so the selected row clears AA in every skin
   (plain accent: 3.52 in Spark). Rings and fills keep the plain accent. */
.rlx-dropdown-option[data-selected="true"] { color: color-mix(in srgb, var(--rlx-accent) 70%, var(--rlx-foreground)); }
.rlx-dropdown-check { opacity: 0; flex-shrink: 0; }
.rlx-dropdown-option[data-selected="true"] .rlx-dropdown-check { opacity: 1; color: inherit; }

/* ── Floating menu (Surface.openMenu) ────────────────────────
   An action menu anchored next to a button over a dimmed backdrop. */
.rlx-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: calc(var(--rlx-z-modal) + 1);
  background: rgb(0 0 0 / .4);
  animation: rlx-menu-fade .12s ease;
}
.rlx-menu {
  position: absolute;
  min-width: 200px;
  max-width: 280px;
  max-height: 70vh;
  overflow-y: auto;
  padding: var(--rlx-space-1);
  background: var(--rlx-surface);
  border: 1px solid var(--rlx-separator);
  border-radius: var(--rlx-radius-lg);
  box-shadow: var(--rlx-shadow-lg, 0 20px 50px -12px rgb(0 0 0 / .5));
  animation: rlx-menu-pop .14s cubic-bezier(.2, .8, .2, 1);
}
.rlx-menu-item {
  display: flex;
  align-items: center;
  gap: var(--rlx-space-3);
  width: 100%;
  padding: var(--rlx-space-2) var(--rlx-space-3);
  border: 0;
  border-radius: var(--rlx-radius-sm);
  background: transparent;
  color: var(--rlx-foreground);
  font: inherit;
  font-size: var(--rlx-type-control-size);
  font-weight: var(--rlx-fw-medium);
  text-align: left;
  cursor: pointer;
}
.rlx-menu-item:hover { background: var(--rlx-content2); }
.rlx-menu-item .rlx-icon { flex-shrink: 0; color: var(--rlx-text-sub); }
.rlx-menu-item--danger { color: var(--rlx-danger-soft-foreground); }
.rlx-menu-item--danger .rlx-icon { color: var(--rlx-danger-soft-foreground); }
.rlx-menu-item[data-disabled="true"] { opacity: .5; cursor: default; }
.rlx-menu-sep { height: 1px; margin: var(--rlx-space-1) 0; background: var(--rlx-divider); }
@keyframes rlx-menu-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rlx-menu-pop { from { opacity: .5; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

/* ── Feedback ────────────────────────────────────────────────
   Star-rating card (focal surface, like Poll). */
.rlx-feedback {
  display: flex;
  flex-direction: column;
  gap: var(--rlx-space-4);
  padding: var(--rlx-space-6);
  background: var(--rlx-surface);
  border: 0;
  border-radius: var(--rlx-radius-lg);
  box-shadow: var(--rlx-shadow-lg);
}
.rlx-feedback-head { display: flex; align-items: center; gap: var(--rlx-space-2); }
.rlx-feedback-badge {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--rlx-radius-md);
  background: var(--rlx-accent-soft);
  color: var(--rlx-accent-soft-foreground);
}
.rlx-feedback-label { color: var(--rlx-accent); font-weight: var(--rlx-type-strong-weight); font-size: var(--rlx-type-strong-size); }
.rlx-feedback-question {
  margin: var(--rlx-space-1) 0 0;
  font-size: var(--rlx-fs-2xl);
  font-weight: var(--rlx-fw-extrabold);
  line-height: var(--rlx-lh-tight);
  letter-spacing: var(--rlx-tracking-tight);
  color: var(--rlx-foreground);
}
.rlx-feedback-helper { margin: 0; color: var(--rlx-text-muted); font-size: var(--rlx-fs-small); }
.rlx-feedback-stars { display: flex; gap: var(--rlx-space-2); }
.rlx-feedback-star {
  color: var(--rlx-separator-tertiary);
  cursor: pointer;
  transition: color var(--rlx-duration-fast) var(--rlx-ease-default), transform var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-feedback-star:hover { transform: scale(1.1); }
.rlx-feedback-star[data-on="true"] { color: var(--rlx-warning-soft-foreground); }
.rlx-feedback-star[data-on="true"] svg { fill: currentColor; }
.rlx-feedback-submit { width: 100%; margin-top: var(--rlx-space-1); }

/* ── QR ──────────────────────────────────────────────────────
   QR-style code on a white tile. */
.rlx-qr { display: inline-block; padding: var(--rlx-space-3); background: #fff; border-radius: var(--rlx-radius-md); line-height: 0; }
.rlx-qr-svg { display: block; }

/* ── Action Card ─────────────────────────────────────────────
   Card-shaped button: icon chip · title · description · corner arrow. */
.rlx-action-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--rlx-space-3);
  padding: var(--rlx-space-4);
  background: var(--rlx-surface);
  border: 1px solid var(--rlx-separator);
  border-radius: var(--rlx-radius-lg);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--rlx-duration-fast) var(--rlx-ease-default), background-color var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-action-card:hover { border-color: rgb(var(--rlx-accent-rgb) / .5); }
.rlx-action-card:focus-visible { outline: none; box-shadow: var(--rlx-focus-ring); }
.rlx-action-card-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--rlx-radius-md); }
/* ROW — the same card on the other axis. The title sits beside the mark
   rather than under it, so a launcher with a two-word label costs a line
   instead of a block. `flex-wrap` plus a full-basis description is what keeps
   a described row on two lines without a second layout. */
.rlx-action-card--row {
  flex-direction: row; flex-wrap: wrap; align-items: center;
  gap: var(--rlx-space-3);
  padding: var(--rlx-space-3);
}
.rlx-action-card--row .rlx-action-card-icon { width: 34px; height: 34px; }
/* Body size, not the column card's subtitle: this is a launcher's label, one
   line beside a mark, not the heading of a block that has a description under
   it. And no `padding-right` — that reserved room for the arrow the column
   card positions absolutely, which in a row is either laid out or absent. */
.rlx-action-card--row .rlx-action-card-title {
  flex: 1; min-width: 0;
  font-size: var(--rlx-type-body-size);
  padding-right: 0;
}
.rlx-action-card--row .rlx-action-card-desc { flex: 1 0 100%; }
.rlx-action-card--row .rlx-action-card-arrow { position: static; margin-left: auto; }
.rlx-action-card--default .rlx-action-card-icon { background: var(--rlx-content2);              color: var(--rlx-text-sub); }
.rlx-action-card--primary .rlx-action-card-icon { background: rgb(var(--rlx-primary-rgb) / .16); color: var(--rlx-primary); }
.rlx-action-card--success .rlx-action-card-icon { background: var(--rlx-success-soft); color: var(--rlx-success-soft-foreground); }
.rlx-action-card--warning .rlx-action-card-icon { background: var(--rlx-warning-soft); color: var(--rlx-warning-soft-foreground); }
.rlx-action-card--danger  .rlx-action-card-icon { background: var(--rlx-danger-soft);  color: var(--rlx-danger-soft-foreground); }
.rlx-action-card-title { font-weight: var(--rlx-type-subtitle-weight); font-size: var(--rlx-type-subtitle-size); color: var(--rlx-foreground); padding-right: var(--rlx-space-5); }
.rlx-action-card-desc { font-size: var(--rlx-type-body-size); color: var(--rlx-text-muted); font-weight: var(--rlx-type-body-weight);}
.rlx-action-card-arrow { position: absolute; top: var(--rlx-space-4); right: var(--rlx-space-4); display: inline-flex; color: var(--rlx-text-muted); }

/* ── Date badge ──────────────────────────────────────────────
   A decorative dark cover tile, day over month, six gradient variants. */
.rlx-datebadge {
  position: relative; flex-shrink: 0;
  width: 58px; height: 72px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  /* 12px, which is --rlx-radius-md. The spec carried border-radius twice,
     28px then 12px; the later one is what CSS would have applied. */
  border-radius: var(--rlx-radius-md);
  /* Not hardcoded white. The wash below is translucent (.24–.28) glass, so
     what the text sits on is whatever is behind the badge: dark artwork in
     the dark skin, but a white card in the light one, where white-on-pale
     measured 1.0:1 and the date was effectively unreadable. The token
     follows the ground in both, and keeps the glass intact. */
  color: var(--rlx-foreground);
  background: linear-gradient(90deg,
    rgba(122, 55, 135, .28) 0%,
    rgba(64, 49, 105, .24) 35%,
    rgba(33, 59, 108, .24) 68%,
    rgba(18, 91, 150, .26) 100%);
  border: .5px solid rgba(170, 155, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10),
              inset 0 -1px 0 rgba(255, 255, 255, .03),
              0 12px 32px rgba(0, 0, 0, .18);
  /* Real glass here, unlike the sidebar: the badge sits on the canvas
     artwork, so there is something behind it worth blurring. */
  -webkit-backdrop-filter: blur(18px) saturate(125%);
          backdrop-filter: blur(18px) saturate(125%);
}
/* Corner tag over the tile (e.g. "NEW" for a freshly created event). */
.rlx-datebadge-tag {
  position: absolute; top: -7px; right: -7px;
  padding: 1px 6px; border-radius: var(--rlx-radius-full);
  background: var(--rlx-accent); color: #fff;
  font-size: 9px; font-weight: var(--rlx-fw-extrabold); letter-spacing: var(--rlx-tracking-wider);
  box-shadow: 0 0 0 2px var(--rlx-surface);
}
/* Sizes are off the type scale on purpose: this is a date read as a unit,
   not running text, and pinning it to --rlx-fs-* would let an unrelated
   scale change reflow it. Both sizes share one type treatment now — the
   --lg overrides said 30/11, which under the current 32/16 would have made
   the large badge smaller than the medium. */
.rlx-datebadge--lg { width: 78px; height: 78px; border-radius: var(--rlx-radius-lg); }
.rlx-datebadge-day { height: 30px; font-size: 32px; font-weight: var(--rlx-fw-semibold); line-height: 30px; letter-spacing: 0; }
.rlx-datebadge-mon { height: 16px; margin-top: 4px; font-size: 16px; line-height: 16px; font-weight: var(--rlx-fw-medium); letter-spacing: 0; opacity: .5; }

/* ── Event card ──────────────────────────────────────────────
   Canonical event header shared by admin + console: cover badge,
   title + state, meta, type tag, host, then a row of event links. */
.rlx-eventcard {
  display: flex; flex-direction: column; gap: var(--rlx-space-4);
  padding: var(--rlx-space-5);
  background: var(--rlx-surface);
  border: 1px solid var(--rlx-separator);
  border-radius: var(--rlx-radius-xl);
}
.rlx-eventcard-top { display: flex; align-items: flex-start; gap: var(--rlx-space-4); }
.rlx-eventcard-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--rlx-space-3); }
.rlx-eventcard-titlerow { display: flex; align-items: center; flex-wrap: wrap; gap: var(--rlx-space-3); }
/* Its own line-height: it inherited the body's fixed 20px, so a 26px title
   that wrapped to two lines drew them on top of each other. */
.rlx-eventcard-title { margin: 0; font-size: var(--rlx-type-display-size); font-weight: var(--rlx-type-display-weight); line-height: var(--rlx-lh-tight); letter-spacing: var(--rlx-tracking-tight); }
.rlx-eventcard-meta { display: flex; flex-wrap: wrap; gap: var(--rlx-space-2) var(--rlx-space-5); }
.rlx-eventcard-metaitem { display: inline-flex; align-items: center; gap: 7px; font-size: var(--rlx-fs-small); color: var(--rlx-text-sub); }
.rlx-eventcard-metaitem .rlx-icon { color: var(--rlx-text-muted); flex-shrink: 0; }
/* Emphasised date states — LIVE NOW (red) · SOON/TODAY (accent). */
.rlx-eventcard-metaitem--live { color: rgb(var(--rlx-danger-rgb)); font-weight: var(--rlx-fw-bold); letter-spacing: var(--rlx-tracking-wide); }
.rlx-eventcard-metaitem--live .rlx-icon { color: rgb(var(--rlx-danger-rgb)); }
.rlx-eventcard-metaitem--today,
.rlx-eventcard-metaitem--soon { color: var(--rlx-accent); font-weight: var(--rlx-fw-bold); letter-spacing: var(--rlx-tracking-wide); }
.rlx-eventcard-metaitem--today .rlx-icon,
.rlx-eventcard-metaitem--soon .rlx-icon { color: var(--rlx-accent); }
.rlx-eventcard-tags { display: flex; flex-wrap: wrap; gap: var(--rlx-space-2); }
.rlx-eventcard-presenter { display: flex; align-items: center; gap: var(--rlx-space-2); font-size: var(--rlx-fs-small); color: var(--rlx-text-muted); }
.rlx-eventcard-presenter .rlx-icon { color: var(--rlx-text-muted); flex-shrink: 0; }
.rlx-eventcard-faces { display: inline-flex; }
.rlx-eventcard-faces > * + * { margin-left: -8px; }
.rlx-eventcard-faces .rlx-avatar { box-shadow: 0 0 0 2px var(--rlx-surface); border-radius: var(--rlx-radius-full); }
.rlx-eventcard-presenter-name { font-weight: var(--rlx-type-strong-weight); color: var(--rlx-foreground); font-size: var(--rlx-type-strong-size);}
.rlx-eventcard-menu { flex-shrink: 0; }
.rlx-eventcard-rule { height: var(--rlx-divider-weight); background: var(--rlx-divider); }
.rlx-eventcard-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--rlx-space-3); }
.rlx-eventcard-push { margin-left: auto; }

/* Segmented link clusters — items look identical within a group; the
   'surface' group (Event Page · Audience · Wall) is neutral, the 'manage'
   group (Configuration · Dashboard) is accent-tinted and clearly distinct. */
.rlx-eventcard-linkgroup {
  display: inline-flex; align-items: stretch;
  border: 1px solid var(--rlx-separator);
  border-radius: var(--rlx-radius-md);
  background: var(--rlx-surface);
  overflow: hidden;
}
.rlx-eventcard-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  border: 0; background: transparent;
  font: inherit; font-size: var(--rlx-fs-small); font-weight: var(--rlx-fw-medium);
  color: var(--rlx-text-sub); cursor: pointer; white-space: nowrap;
  transition: background-color var(--rlx-duration-fast) var(--rlx-ease-default), color var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-eventcard-link + .rlx-eventcard-link { border-left: 1px solid var(--rlx-separator); }
.rlx-eventcard-link .rlx-icon { flex-shrink: 0; color: var(--rlx-text-muted); }
.rlx-eventcard-link:hover { background: var(--rlx-content2); color: var(--rlx-foreground); }
.rlx-eventcard-link:hover .rlx-icon { color: inherit; }
.rlx-eventcard-link:focus-visible { outline: none; box-shadow: inset 0 0 0 2px rgb(var(--rlx-accent-rgb) / .45); }
.rlx-eventcard-link[data-current="true"] { color: var(--rlx-text-muted); cursor: default; }
.rlx-eventcard-link[data-current="true"]:hover { background: transparent; color: var(--rlx-text-muted); }

.rlx-eventcard-linkgroup--manage { border-color: rgb(var(--rlx-accent-rgb) / .45); background: rgb(var(--rlx-accent-rgb) / .06); }
.rlx-eventcard-linkgroup--manage .rlx-eventcard-link { color: var(--rlx-accent); }
.rlx-eventcard-linkgroup--manage .rlx-eventcard-link .rlx-icon { color: var(--rlx-accent); }
.rlx-eventcard-linkgroup--manage .rlx-eventcard-link + .rlx-eventcard-link { border-left-color: rgb(var(--rlx-accent-rgb) / .28); }
.rlx-eventcard-linkgroup--manage .rlx-eventcard-link:hover { background: rgb(var(--rlx-accent-rgb) / .14); color: var(--rlx-accent); }
.rlx-eventcard-linkgroup--manage .rlx-eventcard-link[data-current="true"] { color: rgb(var(--rlx-accent-rgb) / .55); }
.rlx-eventcard-linkgroup--manage .rlx-eventcard-link[data-current="true"]:hover { background: transparent; color: rgb(var(--rlx-accent-rgb) / .55); }

/* ── Chat Message ────────────────────────────────────────────
   AI (left) / user (right) message bubbles. */
.rlx-chat-msg { display: flex; gap: var(--rlx-space-2); max-width: 86%; }
.rlx-chat-msg--ai { align-self: flex-start; }
.rlx-chat-msg--user { align-self: flex-end; flex-direction: row-reverse; }
.rlx-chat-avatar {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--rlx-radius-full);
  background: var(--rlx-accent-soft);
  color: var(--rlx-accent);
}
.rlx-chat-bubble {
  padding: var(--rlx-space-3) var(--rlx-space-4);
  border-radius: var(--rlx-radius-lg);
  font-size: var(--rlx-fs-small);
  line-height: var(--rlx-lh-normal);
}
.rlx-chat-msg--ai .rlx-chat-bubble { background: var(--rlx-surface-secondary); color: var(--rlx-foreground); border-bottom-left-radius: var(--rlx-radius-xs); }
.rlx-chat-msg--user .rlx-chat-bubble { background: var(--rlx-accent); color: var(--rlx-accent-foreground); border-bottom-right-radius: var(--rlx-radius-xs); }
/* `cfg.html` content: a <p> (or list) brings the browser's 1em margins, which
   doubled the bubble's padding top and bottom. The bubble owns its edges. */
.rlx-chat-bubble > :first-child { margin-top: 0; }
.rlx-chat-bubble > :last-child { margin-bottom: 0; }

/* ── Timeline ────────────────────────────────────────────────
   Vertical flow: marker (dot/icon) + connecting line · body. */
.rlx-timeline { display: flex; flex-direction: column; }
.rlx-timeline-item { position: relative; display: flex; gap: var(--rlx-space-3); padding-bottom: var(--rlx-space-5); }
.rlx-timeline-item:last-child { padding-bottom: 0; }
.rlx-timeline-item::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: -2px;
  width: 2px;
  background: var(--rlx-separator);
}
.rlx-timeline-item:last-child::before { display: none; }
.rlx-timeline-marker {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--rlx-radius-full);
  box-shadow: 0 0 0 3px var(--rlx-background);
}
.rlx-timeline-marker--default { background: var(--rlx-content2);              color: var(--rlx-text-sub); }
.rlx-timeline-marker--primary { background: rgb(var(--rlx-primary-rgb) / .16); color: var(--rlx-primary); }
.rlx-timeline-marker--success { background: var(--rlx-success-soft); color: var(--rlx-success-soft-foreground); }
.rlx-timeline-marker--warning { background: var(--rlx-warning-soft); color: var(--rlx-warning-soft-foreground); }
.rlx-timeline-marker--danger  { background: var(--rlx-danger-soft);  color: var(--rlx-danger-soft-foreground); }
.rlx-timeline-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 3px; }
.rlx-timeline-time { font-size: var(--rlx-fs-tiny); color: var(--rlx-text-muted); }
.rlx-timeline-title { font-weight: var(--rlx-type-subtitle-weight); font-size: var(--rlx-type-subtitle-size); color: var(--rlx-foreground); }
.rlx-timeline-desc { margin: 0; font-size: var(--rlx-fs-small); color: var(--rlx-text-muted); line-height: var(--rlx-lh-normal); }

/* ── Area chart (createAreaChart) ─────────────────────────────
   A smooth line over a gradient area, with faint gridlines. The svg
   stretches to fill via preserveAspectRatio=none; strokes stay crisp
   with vector-effect. Colour flows from --rlx-areachart-color. */
.rlx-areachart { --rlx-areachart-color: var(--rlx-accent); display: flex; flex-direction: column; gap: var(--rlx-space-2); }
.rlx-areachart--primary { --rlx-areachart-color: var(--rlx-primary); }
.rlx-areachart--success { --rlx-areachart-color: rgb(var(--rlx-success-rgb)); }
.rlx-areachart--warning { --rlx-areachart-color: rgb(var(--rlx-warning-rgb)); }
.rlx-areachart--danger  { --rlx-areachart-color: rgb(var(--rlx-danger-rgb)); }
.rlx-areachart--info    { --rlx-areachart-color: rgb(var(--rlx-info-rgb)); }
.rlx-areachart-plot { height: var(--rlx-areachart-h, 160px); }
.rlx-areachart-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.rlx-areachart-grid { stroke: var(--rlx-separator); stroke-width: 1; opacity: .55; vector-effect: non-scaling-stroke; }
.rlx-areachart-line { fill: none; stroke: var(--rlx-areachart-color); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.rlx-areachart-g0 { stop-color: var(--rlx-areachart-color); stop-opacity: .3; }
.rlx-areachart-g1 { stop-color: var(--rlx-areachart-color); stop-opacity: 0; }
.rlx-areachart-labels { display: flex; justify-content: space-between; font-size: var(--rlx-fs-tiny); color: var(--rlx-text-muted); }

/* ── Bottom Nav (mobile) ─────────────────────────────────────
   Mobile bottom navigation bar. Equal-width items (icon over label).
   The active item picks up --rlx-accent. One item may be flagged as
   the accentuated center action (createBottomNav cfg.accent) to get
   the elevated, glowing circular button — the "LIVE" pattern. All
   color flows from the accent token so it re-themes with the kit. */
.rlx-bottom-nav {
  position: relative;
  display: flex;
  align-items: stretch;
  background: var(--rlx-surface);
  border-top: var(--rlx-divider-weight) solid var(--rlx-divider);
  /* Breathing room top + bottom so labels clear the screen edge / rounded
     corners and the elevated action has headroom. Bottom adds the real
     home-indicator inset on device, on top of a base gap. */
  padding-top: var(--rlx-space-3);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--rlx-space-4));
  /* Side inset so items don't spread fully edge-to-edge — tightens the
     gap between items a little. */
  padding-inline: var(--rlx-space-6);
}
.rlx-bottom-nav-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;   /* labels share one bottom baseline */
  gap: 7px;
  padding: var(--rlx-space-2) var(--rlx-space-1) var(--rlx-space-3);
  min-height: 60px;
  color: var(--rlx-text-sub);
  font-size: var(--rlx-fs-tiny);
  font-weight: var(--rlx-fw-medium);
  line-height: 1;
  cursor: pointer;
  transition: color var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-bottom-nav-item .rlx-icon {
  font-size: var(--rlx-icon-xl);
  transition: transform var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-bottom-nav-item:hover { color: var(--rlx-text-strong); }
.rlx-bottom-nav-item:active:not([data-disabled]) .rlx-icon { transform: scale(.9); }
.rlx-bottom-nav-item[data-current="true"] { color: var(--rlx-accent); }
.rlx-bottom-nav-item[data-disabled="true"] {
  opacity: var(--rlx-opacity-disabled);
  cursor: not-allowed;
  pointer-events: none;
}
.rlx-bottom-nav-item:focus-visible {
  outline: none;
  border-radius: var(--rlx-radius-sm);
  box-shadow: var(--rlx-focus-ring);
}
.rlx-bottom-nav-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Badge — small dot/count anchored to a normal item's icon. */
.rlx-bottom-nav-icon { position: relative; display: inline-grid; place-items: center; }
.rlx-bottom-nav-badge {
  position: absolute;
  top: -5px;
  left: 100%;
  margin-left: -9px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  font-size: var(--rlx-fs-micro);
  font-weight: var(--rlx-fw-semibold);
  line-height: 1;
  color: var(--rlx-danger-foreground);
  background: var(--rlx-danger);
  border-radius: var(--rlx-radius-full);
}

/* Accentuated (elevated) item — the "LIVE" pattern. The circular
   button lifts above the bar's top edge and carries an accent ring
   plus a soft accent glow. */
.rlx-bottom-nav-fab {
  position: relative;           /* anchor for the notification badge */
  width: 56px;
  height: 56px;
  margin-top: -28px;            /* lift the circle above the bar */
  display: grid;
  place-items: center;
  border-radius: var(--rlx-radius-full);
  background: radial-gradient(circle at 50% 32%, rgb(var(--rlx-accent-rgb) / .30), var(--rlx-surface) 72%);
  border: 1.5px solid var(--rlx-accent);
  color: var(--rlx-foreground);
  box-shadow: 0 0 16px 0 rgb(var(--rlx-accent-rgb) / .55);
  transition: box-shadow var(--rlx-duration) var(--rlx-ease-default),
              transform var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-bottom-nav-item--accent .rlx-icon { font-size: 26px; }
/* Selected centre — the ring fills solid with the accent. */
.rlx-bottom-nav-item--accent[data-current="true"] { color: var(--rlx-accent); }
.rlx-bottom-nav-item--accent[data-current="true"] .rlx-bottom-nav-fab {
  background: var(--rlx-accent);
  color: var(--rlx-accent-foreground);
  box-shadow: 0 0 26px 2px rgb(var(--rlx-accent-rgb) / .75);
}
.rlx-bottom-nav-item--accent:active:not([data-disabled]) .rlx-bottom-nav-fab { transform: scale(.95); }
.rlx-bottom-nav-item--accent:active:not([data-disabled]) .rlx-icon { transform: none; }

/* Notification on the centre button — badge on the FAB, ringed so it
   reads against the elevated circle. */
.rlx-bottom-nav-badge--fab {
  top: 0;
  left: auto;
  right: 0;
  margin-left: 0;
  transform: translate(30%, -10%);
  box-shadow: 0 0 0 2px var(--rlx-surface);
}

/* Dot-only notification (badge: true) for both regular + centre. */
.rlx-bottom-nav-badge--dot { min-width: 10px; height: 10px; padding: 0; }

/* ── Menu Grid ───────────────────────────────────────────────
   A grid of large icon tiles — a launcher / section menu. Each tile
   is a surface card with a big color-tinted icon over a label. */
.rlx-menu-grid {
  display: grid;
  grid-template-columns: repeat(var(--rlx-menu-grid-cols, 4), 1fr);
  gap: var(--rlx-space-3);
}
.rlx-menu-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--rlx-space-3);
  aspect-ratio: 4 / 5;
  padding: var(--rlx-space-3) var(--rlx-space-2);
  background: var(--rlx-surface);
  border: 0;
  border-radius: var(--rlx-radius-lg);
  box-shadow: var(--rlx-shadow-sm);
  color: var(--rlx-foreground);
  font: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--rlx-transition, .15s) ease,
              border-color var(--rlx-transition, .15s) ease,
              transform var(--rlx-transition, .15s) ease;
}
.rlx-menu-grid-item:hover { background: var(--rlx-surface-secondary); box-shadow: var(--rlx-shadow-md); }
.rlx-menu-grid-item:active:not([data-disabled]) { transform: scale(.97); }
.rlx-menu-grid-item[data-current="true"] { background: var(--rlx-accent-soft); box-shadow: inset 0 0 0 1px var(--rlx-accent); }
.rlx-menu-grid-item[data-disabled="true"] { opacity: .45; cursor: not-allowed; }
.rlx-menu-grid-item:focus-visible {
  outline: 2px solid var(--rlx-focus, var(--rlx-accent));
  outline-offset: 2px;
}

.rlx-menu-grid-icon { position: relative; display: inline-grid; place-items: center; }
.rlx-menu-grid-icon--default { color: var(--rlx-text-sub); }
.rlx-menu-grid-icon--primary { color: var(--rlx-primary); }
.rlx-menu-grid-icon--info    { color: var(--rlx-info-soft-foreground); }
.rlx-menu-grid-icon--success { color: var(--rlx-success-soft-foreground); }
.rlx-menu-grid-icon--warning { color: var(--rlx-warning-soft-foreground); }
.rlx-menu-grid-icon--danger  { color: var(--rlx-danger-soft-foreground); }

.rlx-menu-grid-label {
  font-size: var(--rlx-type-strong-size);
  font-weight: var(--rlx-type-strong-weight);
  color: var(--rlx-foreground);
}
.rlx-menu-grid-badge {
  position: absolute;
  top: -5px;
  left: 100%;
  margin-left: -9px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  font-size: var(--rlx-fs-micro);
  font-weight: var(--rlx-fw-semibold);
  line-height: 1;
  color: var(--rlx-danger-foreground);
  background: var(--rlx-danger);
  border-radius: var(--rlx-radius-full);
}
.rlx-menu-grid-badge--dot { min-width: 10px; height: 10px; padding: 0; }

/* ── In Focus ────────────────────────────────────────────────
   The presenter's pinned-item panel: a bordered area with a tag
   stuck to its top edge, a toolbar (surface toggles + countdown +
   collapse), and the focused item. Collapses to a single row. */
.rlx-infocus {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--rlx-space-4);
  margin-top: 12px;                 /* room for the overhanging tag */
  padding: var(--rlx-space-5) var(--rlx-space-4) var(--rlx-space-4);
  /* Signature primary gradient so the focused item stands out. */
  background:
    linear-gradient(180deg, rgb(var(--rlx-primary-rgb) / .18), rgb(var(--rlx-primary-rgb) / .05)),
    var(--rlx-surface);
  border: 1px solid rgb(var(--rlx-primary-rgb) / .35);
  border-radius: var(--rlx-radius-xl);
}

/* "In Focus" marker — a solid accent pill with a live dot, straddling
   the top edge. */
.rlx-infocus-tag {
  position: absolute;
  top: 0;
  left: var(--rlx-space-4);
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  font-size: var(--rlx-type-caps-size);
  font-weight: var(--rlx-type-caps-weight);
  letter-spacing: var(--rlx-tracking-widest);
  text-transform: uppercase;
  color: var(--rlx-primary-foreground);
  background: var(--rlx-primary);
  border-radius: var(--rlx-radius-xs);
}
.rlx-infocus-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--rlx-radius-full);
  background: currentColor;
}

/* Toolbar — collapse control (right). With a leading slot it splits. */
.rlx-infocus-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--rlx-space-3);
}
.rlx-infocus-toolbar--split { justify-content: space-between; }
.rlx-infocus-tools { display: flex; align-items: center; gap: var(--rlx-space-2); }
/* Custom content body (e.g. a live card placed in the panel). The
   compound selector beats the later base `.rlx-infocus-body` flex rule. */
.rlx-infocus-body.rlx-infocus-body--content { display: block; }

/* Surface toggles — a segmented group of device icons. */
.rlx-infocus-targets {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  background: var(--rlx-content2);
  border: 1px solid var(--rlx-separator);
  border-radius: var(--rlx-radius-md);
}
.rlx-infocus-target {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 32px;
  padding: 0;
  color: var(--rlx-text-muted);
  background: transparent;
  border: 0;
  border-radius: calc(var(--rlx-radius-md) - 3px);
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.rlx-infocus-target:hover { color: var(--rlx-text-sub); }
.rlx-infocus-target[data-active="true"] {
  color: var(--rlx-success-soft-foreground);
  background: var(--rlx-success-soft);
}
.rlx-infocus-target-icon { position: relative; display: inline-grid; place-items: center; }
.rlx-infocus-target-check {
  position: absolute;
  right: -7px;
  bottom: -6px;
  display: none;
  place-items: center;
  width: 15px;
  height: 15px;
  color: var(--rlx-success-foreground);
  background: var(--rlx-success);
  border: 2px solid var(--rlx-surface);
  border-radius: var(--rlx-radius-full);
}
.rlx-infocus-target[data-active="true"] .rlx-infocus-target-check { display: grid; }

/* Countdown pill. */
.rlx-infocus-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 var(--rlx-space-3);
  color: var(--rlx-foreground);
  background: var(--rlx-content2);
  border: 1px solid var(--rlx-separator);
  border-radius: var(--rlx-radius-md);
}
.rlx-infocus-timer .rlx-icon { color: var(--rlx-text-muted); }
.rlx-infocus-timer-text {
  font-family: var(--rlx-font-mono);
  font-weight: var(--rlx-fw-semibold);
  font-variant-numeric: tabular-nums;
}

/* Collapse / expand control. */
.rlx-infocus-ctl {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--rlx-primary);
  background: rgb(var(--rlx-primary-rgb) / .12);
  border: 0;
  border-radius: var(--rlx-radius-sm);
  cursor: pointer;
  transition: background .15s ease;
}
.rlx-infocus-ctl:hover { background: rgb(var(--rlx-primary-rgb) / .22); }

/* Emblem — the colored item-type chip. */
.rlx-infocus-emblem {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--rlx-radius-lg);
}
.rlx-infocus-emblem--default { color: var(--rlx-text-sub); background: var(--rlx-content2); }
.rlx-infocus-emblem--primary { color: var(--rlx-primary); background: rgb(var(--rlx-primary-rgb) / .16); }
.rlx-infocus-emblem--info    { color: var(--rlx-info-soft-foreground);    background: var(--rlx-info-soft); }
.rlx-infocus-emblem--success { color: var(--rlx-success-soft-foreground); background: var(--rlx-success-soft); }
.rlx-infocus-emblem--warning { color: var(--rlx-warning-soft-foreground); background: var(--rlx-warning-soft); }
.rlx-infocus-emblem--danger  { color: var(--rlx-danger-soft-foreground);  background: var(--rlx-danger-soft); }

/* Body — emblem + item text. */
.rlx-infocus-body { display: flex; align-items: flex-start; gap: var(--rlx-space-4); }
.rlx-infocus-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rlx-infocus-type {
  font-size: var(--rlx-fs-small);
  font-weight: var(--rlx-fw-bold);
}
.rlx-infocus-type--default { color: var(--rlx-text-sub); }
.rlx-infocus-type--primary { color: var(--rlx-primary); }
.rlx-infocus-type--info    { color: var(--rlx-info-soft-foreground); }
.rlx-infocus-type--success { color: var(--rlx-success-soft-foreground); }
.rlx-infocus-type--warning { color: var(--rlx-warning-soft-foreground); }
.rlx-infocus-type--danger  { color: var(--rlx-danger-soft-foreground); }
.rlx-infocus-title {
  margin: 0;
  font-size: var(--rlx-type-title-size);
  font-weight: var(--rlx-type-title-weight);
  letter-spacing: var(--rlx-tracking-tight);
  line-height: var(--rlx-lh-tight);
  color: var(--rlx-foreground);
}
.rlx-infocus-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--rlx-space-3);
  margin-top: 2px;
  font-size: var(--rlx-fs-small);
  color: var(--rlx-text-muted);
}
.rlx-infocus-extra:not(:empty) { margin-top: var(--rlx-space-3); }
/* Item-specific controls under the focused item — shown only when expanded. */
.rlx-infocus-actions:not(:empty) {
  display: flex;
  flex-direction: column;
  gap: var(--rlx-space-3);
  padding-top: var(--rlx-space-4);
  border-top: 1px solid rgb(var(--rlx-primary-rgb) / .18);
}
.rlx-infocus[data-collapsed="true"] .rlx-infocus-actions { display: none; opacity: 0; transform: translateY(-4px); }
.rlx-infocus-meta-seg { display: inline-flex; align-items: center; gap: 6px; }
.rlx-infocus-meta-seg .rlx-icon { color: var(--rlx-text-muted); }
.rlx-infocus-meta-sep { width: 1px; height: 14px; background: var(--rlx-separator); }

/* Collapsed summary row — emblem + truncated title + expand. */
.rlx-infocus-summary { display: none; align-items: center; gap: var(--rlx-space-3); }
.rlx-infocus-summary .rlx-infocus-emblem { width: 40px; height: 40px; }
.rlx-infocus-summary-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: var(--rlx-type-subtitle-weight);
  color: var(--rlx-foreground); font-size: var(--rlx-type-subtitle-size);}

/* Collapsed state — hide the toolbar + body, show the summary.

   Expanding is a move, not a cut. `display` is a discrete property, so the
   swap itself still lands in one frame; `allow-discrete` only holds the
   outgoing value until the fade has run, and `@starting-style` gives the
   incoming one somewhere to fade FROM. Without those two the panel changed
   size and content in the same frame with nothing to read the change by —
   the box just became a different box.

   The panel's HEIGHT is deliberately left alone. Animating it means
   resolving `auto`, which needs `interpolate-size`, and In Focus holds
   arbitrary item content whose height is not knowable here. Content that
   fades and slides into a box that resizes immediately reads as opening;
   a half-supported height animation reads as a bug on the browsers that
   lack it. */
.rlx-infocus[data-collapsed="true"] { gap: 0; }
.rlx-infocus-toolbar,
.rlx-infocus-body,
.rlx-infocus-actions,
.rlx-infocus-summary {
  transition:
    opacity   var(--rlx-duration) var(--rlx-ease-default),
    transform var(--rlx-duration) var(--rlx-ease-default),
    display   var(--rlx-duration) allow-discrete;
}
/* `@starting-style` fires on EVERY insertion into the document, not only on
   a toggle — so a host that re-parents the panel (the dashboard console, the
   audience companion, the event page) replayed the fade each time. It is
   scoped to `[data-transitioning]`, which setCollapsed() sets for the length
   of one toggle: plain insertion paints fully opaque, collapse/expand still
   animates. */
@starting-style {
  .rlx-infocus[data-transitioning]:not([data-collapsed="true"]) .rlx-infocus-toolbar,
  .rlx-infocus[data-transitioning]:not([data-collapsed="true"]) .rlx-infocus-body,
  .rlx-infocus[data-transitioning]:not([data-collapsed="true"]) .rlx-infocus-actions,
  .rlx-infocus[data-transitioning][data-collapsed="true"] .rlx-infocus-summary {
    opacity: 0;
    transform: translateY(-4px);
  }
}
.rlx-infocus[data-collapsed="true"] .rlx-infocus-toolbar,
.rlx-infocus[data-collapsed="true"] .rlx-infocus-body {
  display: none;
  opacity: 0;
  transform: translateY(-4px);
}
.rlx-infocus[data-collapsed="true"] .rlx-infocus-summary { display: flex; }
@media (prefers-reduced-motion: reduce) {
  .rlx-infocus-toolbar,
  .rlx-infocus-body,
  .rlx-infocus-actions,
  .rlx-infocus-summary { transition: none; }
}

/* ── Header layout ───────────────────────────────────────────
   The tag rides on a header line instead of overhanging the top edge:
   type marker (left) · "In Focus" pill (centred) · collapse (right).
   The toolbar persists when collapsed, so the line is the collapsed UI. */
.rlx-infocus--header { margin-top: 0; padding-top: var(--rlx-space-4); }
.rlx-infocus-toolbar--header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--rlx-space-3);
}
.rlx-infocus-toolbar--header .rlx-infocus-type {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
/* `display: inline-flex` above would override the `hidden` attribute, so an
   empty label still held its grid slot. Scoped to match that rule's
   specificity (0,3,0 beats 0,2,0) rather than relying on source order. */
.rlx-infocus-toolbar--header .rlx-infocus-type[hidden] { display: none; }
.rlx-infocus-typeicon { flex-shrink: 0; display: inline-flex; }
.rlx-infocus-toolbar--header .rlx-infocus-tag {
  position: static;
  transform: none;
  justify-self: center;
}
.rlx-infocus-toolbar--header .rlx-infocus-tools { justify-self: end; }
/* Keep the header line visible when collapsed (it replaces the summary). */
.rlx-infocus--header[data-collapsed="true"] .rlx-infocus-toolbar { display: grid; }
.rlx-infocus--header[data-collapsed="true"] { gap: 0; }

/* ── Clear confirmation ──────────────────────────────────────
   Blurs + dims the whole panel and asks before clearing it. */
.rlx-infocus-confirm {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--rlx-space-3);
  padding: var(--rlx-space-4);
  text-align: center;
  border-radius: inherit;
  background: rgb(0 0 0 / .22);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.rlx-infocus--confirm .rlx-infocus-confirm { display: flex; }
.rlx-infocus-confirm-text {
  margin: 0;
  max-width: 28ch;
  font-size: var(--rlx-fs-medium);
  font-weight: var(--rlx-fw-semibold);
  color: var(--rlx-foreground);
}
.rlx-infocus-confirm-actions { display: flex; gap: var(--rlx-space-2); }

/* ── Filter (segmented selector) ─────────────────────────────
   Two visual variants, same API:
   - line: text + sliding-style underline under the active item,
           sitting on a baseline divider.
   - pill: rounded container with content2 fill, active option
           gets its own filled background (matches the theme
           switcher's style). */
/* ── Segmented control ───────────────────────────────────────────
   Off · Assist · Auto. The selected state is a single thumb element that
   slides between options — see createSegmentedControl. The buttons sit
   above it and only change text colour. */
/* The active segment is a flat brand fill with a bloom under it. It was a
   two-stop ramp; the gradient came off because the interface had five of them
   stacked and the thumb is the one the eye lands on most. The bloom stays —
   it lifts the thumb without adding another ramp to read. */
:root {
  --rlx-seg-on:   var(--rlx-accent);
  --rlx-seg-glow: var(--rlx-accent-rgb);
}
.rlx-seg {
  position: relative;
  display: inline-flex;
  gap: 2px;
  /* `fit-content`, not auto. The track is inline-flex and means to size to its
     content, but a flex column parent's default `align-items: stretch` pulls
     any auto-width item to full width — and it lands in several. An explicit
     cross size opts out of stretch wherever it is mounted, so the component
     holds its own shape instead of each container having to remember to.
     A consumer that genuinely wants the full width asks for it with `block`,
     the option below, rather than by leaving the stretch to happen. */
  width: fit-content;
  padding: 3px;
  background: var(--rlx-content2);
  border: 1px solid var(--rlx-separator);
  /* Rounded rectangle at 9px with a 7px thumb inside it. Concentric is
     still the rule — 9 minus the 3px track padding is 6, and the thumb
     rounds up one to 7 because the eye reads a slightly rounder inner
     corner as correct. A pill track went when every other control
     stopped being one. */
  border-radius: var(--rlx-radius-md);
}
.rlx-seg--block { display: flex; width: 100%; }
.rlx-seg--block .rlx-seg-btn { flex: 1; justify-content: center; }
.rlx-seg-thumb {
  position: absolute;
  top: 0; left: 0;
  border-radius: 7px;
  background: var(--rlx-seg-on);
  /* No shadow. It was a coloured bloom of the old azure accent; with the accent
     now ink the same rule renders a black smudge under a black pill. The
     reference's selected segment has no shadow either — the fill is the
     signal. */
  opacity: 0;
  pointer-events: none;
}
/* Two states, deliberately separate. --placed reveals the thumb as soon as it
   has been measured into position. --ready lands a frame later and is what
   turns transitions on, so the first placement is never interpolated — see
   the note in createSegmentedControl. */
.rlx-seg--placed .rlx-seg-thumb { opacity: 1; }
.rlx-seg--ready .rlx-seg-thumb {
  transition: transform var(--rlx-duration) var(--rlx-ease-spring),
              width     var(--rlx-duration) var(--rlx-ease-spring),
              height    var(--rlx-duration) var(--rlx-ease-spring);
}
.rlx-seg-btn {
  position: relative;         /* above the thumb */
  z-index: 1;
  display: inline-flex;
  align-items: center;
  /* Centre the label. The track is inline-flex and sizes to content, but a
     consumer can stretch it — either with `block`, or by mounting it in a flex
     column whose default `align-items: stretch` does it unasked — and without
     this the labels stayed hard left in segments that had grown. */
  justify-content: center;
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--rlx-foreground) 35%, var(--rlx-text-sub));   /* text-sub alone: 4.17 Spark / 3.81 Spark Light on content2 (AA 4.5) — now 6.2+ */
  font: inherit;
  /* Sentence case, 13/500. The tracked caps this used to carry were the
     kit's only uppercase control label, and against the design — where
     "Off / Assist / Auto" and "In focus / Event info" are both plain
     sentence case — they read as a different family of control. Caps
     are now an EYEBROW treatment (see .rlx-pill and the section
     headings), never an interactive label.

     The selected segment goes to 600, and that half-step is the only
     weight change any control in this kit makes on selection — it is
     affordable here because the thumb underneath already reserves the
     width, so nothing reflows. */
  font-size: var(--rlx-type-control-size);
  font-weight: var(--rlx-fw-medium);
  letter-spacing: var(--rlx-tracking-normal);
  height: 30px;
  padding: 0 var(--rlx-space-3);
  border-radius: 7px;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--rlx-duration-fast) var(--rlx-ease-default);
}
/* Hover is a step toward the foreground, not a jump to it. `--rlx-text-strong`
   aliases `--rlx-foreground`, which is near-black in the light theme — going
   straight there makes a resting grey label snap to black under the cursor. */
.rlx-seg-btn:hover { color: color-mix(in oklab, var(--rlx-text-sub) 45%, var(--rlx-foreground)); }
/* Back to the accent's own foreground now the thumb is a flat token colour.
   It was hardcoded white for the gradient, which a single token could not
   track — but white on the brand azure is 2.68:1, and this resolves to ink
   on dark and white on light, so it follows the fill on both themes. */
.rlx-seg-btn[aria-pressed="true"],
.rlx-seg-btn[aria-pressed="true"]:hover {
  color: var(--rlx-accent-foreground);
  font-weight: var(--rlx-type-control-weight);
}
/* The compact track — the one that fits inside a card rather than
   standing on the page. 26px segments at 12px, on the raised ground
   rather than the control ground, because inside a card the control
   ground is already what the card is sitting on. */
.rlx-seg--compact { padding: 3px; border-radius: var(--rlx-radius-sm); background: var(--rlx-content3); }
.rlx-seg--compact .rlx-seg-btn { height: 26px; padding: 0 14px; font-size: var(--rlx-fs-tiny); }
.rlx-seg--compact .rlx-seg-thumb { border-radius: var(--rlx-radius-xs); }
.rlx-seg-btn:focus { outline: none; }
.rlx-seg-btn:focus-visible { outline: 2px solid var(--rlx-focus); outline-offset: 2px; }

/* ── Tile bar ──────────────────────────────────────────────────────
   A segmented group of icon-over-label tiles inside one rounded shell —
   for a small set of destinations that are peers, where each needs a
   glyph to be picked out at a glance. Not tabs: tabs switch a panel in
   place and exactly one is always selected. A tile bar's items can all
   be unselected, which is why the current marker is optional.

   The shell clips, so the tiles need no radius of their own and the
   dividers can run edge to edge. `flex: 1 1 0` makes every tile the
   same width regardless of label length — the reference's four are
   even despite "Wall" and "Mobile console".

   Proportions measured off the reference: current marker 6px tall and
   80px wide against a 277px-tall group, i.e. ~2% of the height and
   ~24% of the tile's width, sitting on the group's inner edge. Scaled
   here to 2px and 28%.

   --rlx-tilebar-accent overrides the marker colour per instance; it
   falls back to the brand primary. */
.rlx-tilebar {
  display: flex;
  border: 1px solid var(--rlx-separator);
  border-radius: var(--rlx-radius-xl);
  /* No fill of its own — the shell is its border and dividers, and the ground
     shows through. In the reference the group and the page behind it sampled
     #10151E against #121823, i.e. the same colour; a lighter chip would read
     as a raised panel rather than a set of destinations sitting on the band. */
  background: transparent;
  overflow: hidden;
}
/* Fixed-width tiles so long labels wrap to a second line instead of stretching
   the group — "Mobile console" on one line made the whole bar as wide as its
   longest word pair. Two short lines are more compact than one long one, and
   every tile stays the same width whatever its label. Override per instance
   with --rlx-tilebar-tile-w. */
.rlx-tilebar-item {
  position: relative;
  flex: 0 0 var(--rlx-tilebar-tile-w, 86px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Top, not centre: once a label can wrap, centring each tile's own content
     puts the two-line tile's icon higher than its neighbours'. Anchoring at
     the top keeps every icon on one line and lets the labels hang below. */
  justify-content: flex-start;
  gap: 6px;
  padding: var(--rlx-space-2);
  border: 0;
  border-left: 1px solid var(--rlx-separator);
  background: transparent;
  color: var(--rlx-text-sub);
  font: inherit;
  font-size: var(--pc-type-meta-size, var(--rlx-fs-tiny));
  font-weight: var(--rlx-fw-medium);
  text-align: center;
  text-wrap: balance;
  line-height: 1.25;
  cursor: pointer;
  transition: background var(--rlx-duration-fast) var(--rlx-ease-default),
              color var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-tilebar-item:first-child { border-left: 0; }
.rlx-tilebar-item:hover { background: var(--rlx-content2); color: var(--rlx-foreground); }
.rlx-tilebar-item .rlx-icon { flex-shrink: 0; color: var(--rlx-text-muted); }
.rlx-tilebar-item:hover .rlx-icon { color: var(--rlx-foreground); }
.rlx-tilebar-item:focus-visible { outline: 2px solid var(--rlx-focus); outline-offset: -2px; }
/* Current destination. `aria-current` rather than a class — the marker is
   the visual form of a state the markup has to carry anyway. */
.rlx-tilebar-item[aria-current] { color: var(--rlx-foreground); }
.rlx-tilebar-item[aria-current] .rlx-icon { color: var(--rlx-foreground); }
.rlx-tilebar-item[aria-current]::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 28%;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--rlx-tilebar-accent, var(--rlx-primary));
}

.rlx-tabs {
  display: inline-flex;
  align-items: center;
  font-size: var(--rlx-fs-small);
}
.rlx-tabs-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--rlx-space-2);
  border: 0;
  background: transparent;
  color: var(--rlx-text-muted);
  font: inherit;
  font-size: var(--rlx-type-control-size);
  font-weight: var(--rlx-fw-medium);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--rlx-duration-fast) var(--rlx-ease-default),
              background-color var(--rlx-duration-fast) var(--rlx-ease-default),
              box-shadow var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-tabs-btn:hover { color: var(--rlx-text-strong); }
.rlx-tabs-btn[disabled] { opacity: .45; cursor: not-allowed; }
.rlx-tabs-btn .rlx-icon { font-size: var(--rlx-icon-sm); }
.rlx-tabs-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--rlx-focus);
}

/* Tab count badge — small pill that sits to the right of the label. */
.rlx-tabs-badge {
  display: inline-grid;
  place-items: center;
  /* A count beside a tab label is a NUMERAL, not a badge. The design
     sets it one tone down from the label and leaves it unfilled —
     "Polls 14", "Updates 14" — and reserves the filled pill for the
     one count that is a call to action (the queue's own 3). Keeping
     both as filled pills gave a four-tab strip four competing dots. */
  min-width: 0;
  height: auto;
  padding: 0;
  border-radius: 0;
  font-size: var(--rlx-type-control-size);
  font-weight: var(--rlx-fw-medium);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  background: none;
  /* The colour modifiers below still work, and have to: they set the
     numeral's INK now rather than a tinted fill behind it. Writing
     `color:` unconditionally here would have made every --color-* class
     dead, which is what happened when this rule first became a numeral —
     a Live count asked for in danger came out the same grey as a Polls
     count. Default only, so a modifier can win. */
  color: var(--rlx-text-faint, var(--rlx-text-muted));
  font-weight: var(--rlx-fw-semibold);
}
/* A coloured count is reserved for the one that is urgent — Live, a
   moderation queue. `default` is the plain numeral and exists so a call
   site can ask for it explicitly. */
.rlx-tabs-badge--color-primary  { color: var(--rlx-accent-soft-foreground); }
.rlx-tabs-badge--color-success  { color: var(--rlx-success-soft-foreground); }
.rlx-tabs-badge--color-warning  { color: var(--rlx-warning-soft-foreground); }
.rlx-tabs-badge--color-danger   { color: var(--rlx-danger-soft-foreground); }
.rlx-tabs-badge--color-default  { color: var(--rlx-text-faint, var(--rlx-text-muted)); }

/* ── Variant: line ──────────────────────────────────────── */
.rlx-tabs--line {
  gap: var(--rlx-space-1);
  border-bottom: 1px solid var(--rlx-divider);
}
.rlx-tabs--line .rlx-tabs-btn {
  position: relative;
  padding: 10px 14px;
  border-radius: 0;
}
/* Line tabs read by WEIGHT, not colour: both states are --rlx-foreground and
   the selected one goes bold. Measured off the reference — unselected labels
   sampled #09090D against the selected #09090C, i.e. the same near-black, and
   the underline #1A1A1E rather than an accent.

   The bar is 4px and fully rounded, sitting centred on the hairline rather
   than perched above it. Both come from the reference's ratio: a 14px bar
   against a 40px cap-and-descender, which is ~0.35 of the label height. */
.rlx-tabs--line .rlx-tabs-btn { color: var(--rlx-foreground); }
/* Reserve the bold width on every tab, selected or not, so switching tabs
   does not shuffle the strip. The label becomes a one-cell grid holding the
   real text and a hidden bold copy of it (from data-label); the cell sizes to
   the wider of the two, and the copy's row is collapsed to 0 so it costs no
   height. Measured 4px of drift on the widest label before this. */
.rlx-tabs--line .rlx-tabs-btn-label { display: inline-grid; }
.rlx-tabs--line .rlx-tabs-btn-label::after {
  content: attr(data-label);
  font-weight: var(--rlx-fw-bold);
  height: 0;
  visibility: hidden;
  overflow: hidden;
  pointer-events: none;
}
.rlx-tabs--line .rlx-tabs-btn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: var(--rlx-radius-full);
  /* The accent, and full-bleed to the tab's own box. The 4px inset bar
     in --rlx-foreground was a reference detail from a light interface;
     on the dark ground a near-white slab under the selected label
     outweighs everything else in the strip. */
  background: var(--rlx-accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-tabs--line .rlx-tabs-btn[aria-selected="true"] {
  color: var(--rlx-foreground);
  font-weight: var(--rlx-fw-bold);
}
.rlx-tabs--line .rlx-tabs-btn[aria-selected="true"]::after {
  transform: scaleX(1);
}
.rlx-tabs--line .rlx-tabs-btn:focus-visible {
  box-shadow: inset 0 0 0 2px var(--rlx-focus);
  border-radius: var(--rlx-radius-sm);
}

/* ── Variant: pill ──────────────────────────────────────── */
/* Still called `pill` for its call sites; it is a rounded track now,
   the same 9px/7px pair the segmented control uses. The two are
   deliberately identical in geometry and differ only in what selection
   means — a segment sets a value, a tab swaps a view — so they should
   not also look like two different components. */
.rlx-tabs--pill {
  padding: 3px;
  gap: 4px;
  background: var(--rlx-tabs-track, var(--rlx-content2));
  border: 0;
  border-radius: var(--rlx-radius-md);
}
.rlx-tabs--pill .rlx-tabs-btn {
  height: 28px;
  padding: 0 var(--rlx-space-3);
  border-radius: 7px;
}
.rlx-tabs--pill .rlx-tabs-btn[data-icon-only="true"] {
  width: 28px;
  padding: 0;
  justify-content: center;
}
/* Selection is a step UP the surface ramp, not a drop to the page
   colour with a shadow under it. On the dark ground a white chip with
   a shadow was the single loudest element in the strip. */
.rlx-tabs--pill .rlx-tabs-btn[aria-selected="true"] {
  background: var(--rlx-content3);
  color: var(--rlx-text-strong);
  font-weight: var(--rlx-type-control-weight);
  box-shadow: none;
}
.rlx-tabs--pill .rlx-tabs-btn:focus-visible {
  box-shadow: 0 0 0 2px var(--rlx-content2), 0 0 0 4px var(--rlx-focus);
}

/* ── Size: sm ────────────────────────────────────────────── */
.rlx-tabs--size-sm .rlx-tabs-btn { font-size: var(--rlx-fs-tiny); }
.rlx-tabs--size-sm.rlx-tabs--line  .rlx-tabs-btn { padding: 8px 10px; }
.rlx-tabs--size-sm.rlx-tabs--pill  .rlx-tabs-btn { height: 26px; padding: 0 10px; border-radius: var(--rlx-radius-xs); }
.rlx-tabs--size-sm.rlx-tabs--pill  .rlx-tabs-btn[data-icon-only="true"] { width: 26px; padding: 0; }

/* ── Size: lg (bigger label) ─────────────────────────────── */
.rlx-tabs--size-lg .rlx-tabs-btn { font-size: var(--rlx-fs-small); font-weight: var(--rlx-fw-semibold); }
.rlx-tabs--size-lg.rlx-tabs--line  .rlx-tabs-btn { padding: 12px 16px; }
/* 5px against the base 4px — the same step up the old 2.5-against-2 was. */
.rlx-tabs--size-lg.rlx-tabs--line  .rlx-tabs-btn::after { height: 2px; }
.rlx-tabs--size-lg.rlx-tabs--pill  .rlx-tabs-btn { height: 34px; padding: 0 16px; border-radius: var(--rlx-radius-sm); }
.rlx-tabs--size-lg.rlx-tabs--pill  .rlx-tabs-btn[data-icon-only="true"] { width: 38px; padding: 0; }

/* ── Bar (full-width strip; optional right-aligned actions) ──
   The tabs sit left in an inner tablist; `actions` (search / buttons)
   sit right. In the line variant the baseline divider spans the whole
   bar and the active underline meets it (tabs stretch to full height). */
.rlx-tabs--bar { display: flex; width: 100%; align-items: stretch; }
.rlx-tabs--bar .rlx-tabs-list { display: flex; align-items: stretch; min-width: 0; }
.rlx-tabs--bar .rlx-tabs-actions { display: flex; align-items: center; gap: var(--rlx-space-2); margin-left: auto; padding-left: var(--rlx-space-4); }
.rlx-tabs--bar.rlx-tabs--line { gap: 0; }
.rlx-tabs--bar.rlx-tabs--line .rlx-tabs-list { gap: var(--rlx-space-1); }
.rlx-tabs--bar.rlx-tabs--pill { display: inline-flex; width: auto; }   /* pill stays a compact segmented control */

/* ── FilterBar ──────────────────────────────────────────────
   Toolbar row used at the top of list/grid pages. Two halves:
   a row of toggleable filter pills (left) and a row of tools
   (right, typically a search input + action button + view
   toggle). Pills wrap if the row runs out of space; tools also
   wrap on narrow viewports. Used on every Workspace page that
   lists things (Events, Content, Knowledge, Studio, Library). */
.rlx-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--rlx-space-4);
  flex-wrap: wrap;
}
.rlx-filter-pills {
  display: inline-flex;
  align-items: center;
  gap: var(--rlx-space-2);
  flex-wrap: wrap;
}
.rlx-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--rlx-space-2);
  padding: 7px 14px;
  border-radius: var(--rlx-radius-sm);
  border: 1px solid var(--rlx-divider);
  background: transparent;
  color: var(--rlx-text-sub);
  font: inherit;
  font-size: var(--rlx-fs-small);
  font-weight: var(--rlx-fw-medium);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--rlx-duration-fast) var(--rlx-ease-default),
              border-color var(--rlx-duration-fast) var(--rlx-ease-default),
              color var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-filter-pill:hover:not([disabled]) {
  border-color: var(--rlx-default-400);
  color: var(--rlx-text-strong);
}
.rlx-filter-pill[aria-pressed="true"] {
  background: rgb(var(--rlx-primary-rgb) / .12);
  border-color: rgb(var(--rlx-primary-rgb) / .35);
  color: var(--rlx-primary);
}
.rlx-filter-pill[disabled] {
  opacity: var(--rlx-opacity-disabled);
  cursor: not-allowed;
}
.rlx-filter-pill:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--rlx-background), 0 0 0 4px var(--rlx-focus);
}
.rlx-filter-pill-icon { font-size: var(--rlx-icon-sm); flex-shrink: 0; }
.rlx-filter-pill-count {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  min-width: 18px;
  height: 18px;
  border-radius: var(--rlx-radius-xs);
  background: var(--rlx-content2);
  color: var(--rlx-text-sub);
  font-size: var(--rlx-fs-micro);
  font-weight: var(--rlx-fw-semibold);
  font-variant-numeric: tabular-nums;
}
.rlx-filter-pill[aria-pressed="true"] .rlx-filter-pill-count {
  background: rgb(var(--rlx-primary-rgb) / .18);
  color: var(--rlx-primary);
}
.rlx-filter-tools {
  display: inline-flex;
  align-items: center;
  gap: var(--rlx-space-3);
  flex-wrap: wrap;
}
.rlx-filter-tools .rlx-input-root { min-width: 220px; }

/* ── Layout primitives ───────────────────────────────────────
   Tiny base classes; the JS factories set all sizing/spacing
   via inline styles using the --rlx-space-*, --rlx-radius-*,
   --rlx-shadow-* tokens. */
.rlx-box  { display: block; }
.rlx-flex { display: flex; flex-direction: var(--rlx-flex-dir, row); }
.rlx-flex--inline { display: inline-flex; }

/* Responsive flex direction. Pattern:
     <Flex direction={{ base: 'column', md: 'row' }}>
   emits `.rlx-flex--dir-column .rlx-flex--md-dir-row` and the
   media query below overrides the CSS var at the breakpoint. */
.rlx-flex--dir-row             { --rlx-flex-dir: row;            }
.rlx-flex--dir-column          { --rlx-flex-dir: column;         }
.rlx-flex--dir-row-reverse     { --rlx-flex-dir: row-reverse;    }
.rlx-flex--dir-column-reverse  { --rlx-flex-dir: column-reverse; }

.rlx-grid {
  display: grid;
  grid-template-columns: repeat(var(--rlx-grid-cols, 1), minmax(0, 1fr));
}

/* Responsive grid cols. Same pattern as flex direction. */
.rlx-grid--cols-1  { --rlx-grid-cols: 1;  }
.rlx-grid--cols-2  { --rlx-grid-cols: 2;  }
.rlx-grid--cols-3  { --rlx-grid-cols: 3;  }
.rlx-grid--cols-4  { --rlx-grid-cols: 4;  }
.rlx-grid--cols-6  { --rlx-grid-cols: 6;  }
.rlx-grid--cols-12 { --rlx-grid-cols: 12; }

/* Mobile-first breakpoint stack. Matches the Tailwind v4 defaults
   (sm 640 / md 768 / lg 1024 / xl 1280) so devs already familiar
   with that scale don't have to relearn. */
@media (min-width: 640px) {
  .rlx-grid--sm-cols-1  { --rlx-grid-cols: 1;  }
  .rlx-grid--sm-cols-2  { --rlx-grid-cols: 2;  }
  .rlx-grid--sm-cols-3  { --rlx-grid-cols: 3;  }
  .rlx-grid--sm-cols-4  { --rlx-grid-cols: 4;  }
  .rlx-grid--sm-cols-6  { --rlx-grid-cols: 6;  }
  .rlx-grid--sm-cols-12 { --rlx-grid-cols: 12; }
  .rlx-flex--sm-dir-row            { --rlx-flex-dir: row;            }
  .rlx-flex--sm-dir-column         { --rlx-flex-dir: column;         }
  .rlx-flex--sm-dir-row-reverse    { --rlx-flex-dir: row-reverse;    }
  .rlx-flex--sm-dir-column-reverse { --rlx-flex-dir: column-reverse; }
}
@media (min-width: 768px) {
  .rlx-grid--md-cols-1  { --rlx-grid-cols: 1;  }
  .rlx-grid--md-cols-2  { --rlx-grid-cols: 2;  }
  .rlx-grid--md-cols-3  { --rlx-grid-cols: 3;  }
  .rlx-grid--md-cols-4  { --rlx-grid-cols: 4;  }
  .rlx-grid--md-cols-6  { --rlx-grid-cols: 6;  }
  .rlx-grid--md-cols-12 { --rlx-grid-cols: 12; }
  .rlx-flex--md-dir-row            { --rlx-flex-dir: row;            }
  .rlx-flex--md-dir-column         { --rlx-flex-dir: column;         }
  .rlx-flex--md-dir-row-reverse    { --rlx-flex-dir: row-reverse;    }
  .rlx-flex--md-dir-column-reverse { --rlx-flex-dir: column-reverse; }
}
@media (min-width: 1024px) {
  .rlx-grid--lg-cols-1  { --rlx-grid-cols: 1;  }
  .rlx-grid--lg-cols-2  { --rlx-grid-cols: 2;  }
  .rlx-grid--lg-cols-3  { --rlx-grid-cols: 3;  }
  .rlx-grid--lg-cols-4  { --rlx-grid-cols: 4;  }
  .rlx-grid--lg-cols-6  { --rlx-grid-cols: 6;  }
  .rlx-grid--lg-cols-12 { --rlx-grid-cols: 12; }
  .rlx-flex--lg-dir-row            { --rlx-flex-dir: row;            }
  .rlx-flex--lg-dir-column         { --rlx-flex-dir: column;         }
  .rlx-flex--lg-dir-row-reverse    { --rlx-flex-dir: row-reverse;    }
  .rlx-flex--lg-dir-column-reverse { --rlx-flex-dir: column-reverse; }
}
@media (min-width: 1280px) {
  .rlx-grid--xl-cols-1  { --rlx-grid-cols: 1;  }
  .rlx-grid--xl-cols-2  { --rlx-grid-cols: 2;  }
  .rlx-grid--xl-cols-3  { --rlx-grid-cols: 3;  }
  .rlx-grid--xl-cols-4  { --rlx-grid-cols: 4;  }
  .rlx-grid--xl-cols-6  { --rlx-grid-cols: 6;  }
  .rlx-grid--xl-cols-12 { --rlx-grid-cols: 12; }
  .rlx-flex--xl-dir-row            { --rlx-flex-dir: row;            }
  .rlx-flex--xl-dir-column         { --rlx-flex-dir: column;         }
  .rlx-flex--xl-dir-row-reverse    { --rlx-flex-dir: row-reverse;    }
  .rlx-flex--xl-dir-column-reverse { --rlx-flex-dir: column-reverse; }
}
.rlx-stack {
  display: flex;
  flex-direction: column;
}
.rlx-spacer {
  flex: 1 1 auto;
  align-self: stretch;
}


/* ══════════════════════════════════════════════════════════════
   Additional primitives — inputs, feedback, overlays.
   ══════════════════════════════════════════════════════════════ */

/* ── Field + Input ───────────────────────────────────────────── */
.rlx-field { display: flex; flex-direction: column; gap: 6px; }
.rlx-field-label { font-size: var(--rlx-type-strong-size); font-weight: var(--rlx-type-strong-weight); color: var(--rlx-foreground); }
.rlx-field-hint { margin: 0; font-size: var(--rlx-fs-tiny); color: var(--rlx-text-muted); }
.rlx-field-hint--error { color: var(--rlx-danger-soft-foreground); }
.rlx-input {
  display: flex;
  align-items: center;
  gap: var(--rlx-space-2);
  padding: 0 var(--rlx-space-3);
  height: 40px;
  background: var(--rlx-input-bg);
  border: 1px solid var(--rlx-input-border);
  border-radius: var(--rlx-radius-md);
  transition: border-color var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-input:focus-within {
  border-color: var(--rlx-input-border-focus);
  /* A visible focus ring — not just a border-color shift — so keyboard
     focus is unmistakable. Accent-tinted, theme-aware via --rlx-accent-rgb. */
  box-shadow: 0 0 0 3px rgb(var(--rlx-accent-rgb) / .35);
}
.rlx-input--error { border-color: var(--rlx-danger-soft-foreground); }
.rlx-input--disabled { opacity: var(--rlx-opacity-disabled, .5); pointer-events: none; }
.rlx-input-field {
  flex: 1; min-width: 0;
  border: 0; background: transparent; outline: none;
  color: var(--rlx-field-foreground); font: inherit; font-size: var(--rlx-fs-small);
}
.rlx-input-field::placeholder { color: var(--rlx-field-placeholder); }
.rlx-input-affix { display: inline-flex; align-items: center; color: var(--rlx-text-muted); flex-shrink: 0; }

/* ── Badge (standalone) ──────────────────────────────────────── */
.rlx-badge {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  font-size: var(--rlx-fs-micro); font-weight: var(--rlx-fw-bold); line-height: 1;
  font-variant-numeric: tabular-nums;
  border-radius: var(--rlx-radius-full);
  color: var(--rlx-danger-foreground); background: var(--rlx-danger);
}
.rlx-badge--dot { min-width: 8px; height: 8px; padding: 0; }
.rlx-badge--primary { background: var(--rlx-primary); }
.rlx-badge--success { background: var(--rlx-success); color: var(--rlx-success-foreground); }
.rlx-badge--warning { background: var(--rlx-warning); color: var(--rlx-warning-foreground); }
.rlx-badge--info    { background: var(--rlx-info);    color: var(--rlx-info-foreground); }
.rlx-badge--accent  { background: var(--rlx-accent);  color: var(--rlx-accent-foreground); }
.rlx-badge--default { background: var(--rlx-content3); color: var(--rlx-text-sub); }

/* ── Checkbox ────────────────────────────────────────────────── */
.rlx-checkbox { display: inline-flex; align-items: flex-start; gap: var(--rlx-space-2); cursor: pointer; }
.rlx-checkbox--disabled { opacity: .5; pointer-events: none; }
.rlx-checkbox-input { position: absolute; opacity: 0; width: 0; height: 0; }
.rlx-checkbox-box {
  flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px;
  display: grid; place-items: center;
  border: 1.5px solid var(--rlx-input-border); border-radius: var(--rlx-radius-sm);
  background: var(--rlx-input-bg);
  color: var(--rlx-accent-foreground);
  transition: background-color var(--rlx-duration-fast) var(--rlx-ease-default), border-color var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-checkbox-box .rlx-icon { opacity: 0; transform: scale(.6); transition: opacity var(--rlx-duration-fast), transform var(--rlx-duration-fast); }
.rlx-checkbox-input:checked + .rlx-checkbox-box { background: var(--rlx-accent); border-color: var(--rlx-accent); }
.rlx-checkbox-input:checked + .rlx-checkbox-box .rlx-icon { opacity: 1; transform: none; }
.rlx-checkbox-input:focus-visible + .rlx-checkbox-box { box-shadow: var(--rlx-focus-ring); }
.rlx-checkbox-content { display: flex; flex-direction: column; gap: 1px; }
.rlx-checkbox-label { font-size: var(--rlx-type-body-size); color: var(--rlx-foreground); font-weight: var(--rlx-type-body-weight);}
.rlx-checkbox-desc { font-size: var(--rlx-type-meta-size); color: var(--rlx-text-muted); font-weight: var(--rlx-type-meta-weight);}

/* ── Radio group ─────────────────────────────────────────────── */
.rlx-radio-group { display: flex; flex-direction: column; gap: var(--rlx-space-3); }
.rlx-radio { display: inline-flex; align-items: flex-start; gap: var(--rlx-space-2); cursor: pointer; }
.rlx-radio--disabled { opacity: .5; pointer-events: none; }
.rlx-radio-input { position: absolute; opacity: 0; width: 0; height: 0; }
.rlx-radio-dot {
  flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px;
  display: grid; place-items: center;
  border: 1.5px solid var(--rlx-input-border); border-radius: var(--rlx-radius-full);
  background: var(--rlx-input-bg);
  transition: border-color var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-radio-dot::after { content: ''; width: 10px; height: 10px; border-radius: var(--rlx-radius-full); background: var(--rlx-accent); transform: scale(0); transition: transform var(--rlx-duration-fast) var(--rlx-ease-default); }
.rlx-radio-input:checked + .rlx-radio-dot { border-color: var(--rlx-accent); }
.rlx-radio-input:checked + .rlx-radio-dot::after { transform: scale(1); }
.rlx-radio-input:focus-visible + .rlx-radio-dot { box-shadow: var(--rlx-focus-ring); }
.rlx-radio-content { display: flex; flex-direction: column; gap: 1px; }
.rlx-radio-label { font-size: var(--rlx-type-body-size); color: var(--rlx-foreground); font-weight: var(--rlx-type-body-weight);}
.rlx-radio-desc { font-size: var(--rlx-type-meta-size); color: var(--rlx-text-muted); font-weight: var(--rlx-type-meta-weight);}

/* ── Chip group (filter) ─────────────────────────────────────── */
.rlx-chip-group { display: flex; flex-wrap: wrap; gap: var(--rlx-space-2); }
/* No radius of its own. A chip IS a button (createChipGroup composes one),
   and it used to restate `radius-full` — which was a no-op while every
   button was a pill and would now be the one control that still is. */

/* ── Progress ────────────────────────────────────────────────── */
.rlx-progress { display: flex; flex-direction: column; gap: 6px; }
.rlx-progress-head { display: flex; align-items: center; justify-content: space-between; gap: var(--rlx-space-2); }
.rlx-progress-label { font-size: var(--rlx-type-body-size); color: var(--rlx-text-sub); font-weight: var(--rlx-type-body-weight);}
.rlx-progress-value { font-size: var(--rlx-fs-small); font-weight: var(--rlx-fw-semibold); color: var(--rlx-text-muted); font-variant-numeric: tabular-nums; }
.rlx-progress-track { height: 8px; border-radius: var(--rlx-radius-full); background: var(--rlx-content3); overflow: hidden; }
.rlx-progress-fill { height: 100%; width: 0; border-radius: inherit; background: var(--rlx-accent); transition: width var(--rlx-duration) var(--rlx-ease-default); }
.rlx-progress--primary .rlx-progress-fill { background: var(--rlx-primary); }
.rlx-progress--success .rlx-progress-fill { background: var(--rlx-success); }
.rlx-progress--warning .rlx-progress-fill { background: var(--rlx-warning); }
.rlx-progress--danger  .rlx-progress-fill { background: var(--rlx-danger); }
.rlx-progress[data-indeterminate="true"] .rlx-progress-fill { width: 40%; animation: rlx-progress-sweep 1.1s ease-in-out infinite; }
@keyframes rlx-progress-sweep { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }

/* ── Spinner ─────────────────────────────────────────────────── */
.rlx-spinner { display: inline-flex; }
.rlx-spinner-ring {
  display: block; border-radius: var(--rlx-radius-full);
  border: 2.5px solid rgb(var(--rlx-accent-rgb) / .25);
  border-top-color: var(--rlx-accent);
  animation: rlx-spin .7s linear infinite;
}
.rlx-spinner--sm .rlx-spinner-ring { width: 16px; height: 16px; border-width: 2px; }
.rlx-spinner--md .rlx-spinner-ring { width: 24px; height: 24px; }
.rlx-spinner--lg .rlx-spinner-ring { width: 36px; height: 36px; border-width: 3px; }
@keyframes rlx-spin { to { transform: rotate(360deg); } }

/* ── Skeleton ────────────────────────────────────────────────── */
.rlx-skeleton {
  display: block; width: 100%; height: 16px;
  border-radius: var(--rlx-radius-sm);
  background: linear-gradient(90deg, var(--rlx-content2) 25%, var(--rlx-content3) 37%, var(--rlx-content2) 63%);
  background-size: 400% 100%;
  animation: rlx-skeleton-shimmer 1.4s ease infinite;
}
.rlx-skeleton--circle { border-radius: var(--rlx-radius-full); }
.rlx-skeleton--text { height: 12px; }
.rlx-skeleton-lines { display: flex; flex-direction: column; gap: 8px; }
@keyframes rlx-skeleton-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) {
  .rlx-skeleton, .rlx-spinner-ring, .rlx-progress[data-indeterminate="true"] .rlx-progress-fill { animation: none; }
}

/* ── Tooltip ─────────────────────────────────────────────────── */
.rlx-tooltip {
  position: fixed;
  z-index: calc(var(--rlx-z-modal) + 2);
  max-width: 240px;
  padding: 6px 10px;
  border-radius: var(--rlx-radius-md);
  background: var(--rlx-foreground);
  color: var(--rlx-background);
  font-size: var(--rlx-fs-tiny);
  font-weight: var(--rlx-fw-medium);
  line-height: var(--rlx-lh-snug);
  box-shadow: var(--rlx-shadow-lg, 0 10px 24px -8px rgb(0 0 0 / .5));
  pointer-events: none;
  animation: rlx-fade-in .12s ease;
}
@keyframes rlx-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ── Empty state ─────────────────────────────────────────────── */
.rlx-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--rlx-space-2); padding: var(--rlx-space-8) var(--rlx-space-4); }
.rlx-empty-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: var(--rlx-radius-full); background: var(--rlx-content2); color: var(--rlx-text-muted); margin-bottom: var(--rlx-space-1); }
.rlx-empty-title { margin: 0; font-size: var(--rlx-type-subtitle-size); font-weight: var(--rlx-type-subtitle-weight); color: var(--rlx-foreground); }
.rlx-empty-desc { margin: 0; max-width: 34ch; font-size: var(--rlx-fs-small); color: var(--rlx-text-muted); line-height: var(--rlx-lh-normal); }
.rlx-empty-action { margin-top: var(--rlx-space-2); }

/* ── Loading ─────────────────────────────────────────────────────
   A centered loading state (spinner + label) that fills its container,
   the loading counterpart to the empty state. */
.rlx-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--rlx-space-3);
  padding: var(--rlx-space-8) var(--rlx-space-4);
}
.rlx-loading-label { margin: 0; font-size: var(--rlx-type-strong-size); font-weight: var(--rlx-type-strong-weight); color: var(--rlx-text-sub); }
.rlx-loading-desc { margin: 0; max-width: 34ch; font-size: var(--rlx-fs-small); color: var(--rlx-text-muted); line-height: var(--rlx-lh-normal); }
.rlx-loading--sm { gap: var(--rlx-space-2); padding: var(--rlx-space-5) var(--rlx-space-3); }
.rlx-loading--sm .rlx-loading-label { font-size: var(--rlx-fs-small); }
.rlx-loading--lg { gap: var(--rlx-space-4); padding: var(--rlx-space-12) var(--rlx-space-4); }
.rlx-loading--lg .rlx-loading-label { font-size: var(--rlx-fs-large); }

/* ── Accordion ───────────────────────────────────────────────── */
.rlx-accordion { display: flex; flex-direction: column; border: 1px solid var(--rlx-separator); border-radius: var(--rlx-radius-lg); overflow: hidden; background: var(--rlx-surface); }
.rlx-accordion-item + .rlx-accordion-item { border-top: 1px solid var(--rlx-divider); }
.rlx-accordion-head {
  display: flex; align-items: center; gap: var(--rlx-space-3); width: 100%;
  padding: var(--rlx-space-3) var(--rlx-space-4);
  border: 0; background: transparent; color: var(--rlx-foreground);
  font: inherit; font-size: var(--rlx-fs-medium); font-weight: var(--rlx-fw-semibold);
  text-align: left; cursor: pointer;
}
.rlx-accordion-head:hover { background: var(--rlx-content2); }
.rlx-accordion-icon { display: inline-flex; color: var(--rlx-text-sub); }
.rlx-accordion-title { flex: 1; min-width: 0; }
.rlx-accordion-chev { display: inline-flex; color: var(--rlx-text-muted); transition: transform var(--rlx-duration-fast) var(--rlx-ease-default); }
.rlx-accordion-item[data-open="true"] .rlx-accordion-chev { transform: rotate(180deg); }
.rlx-accordion-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--rlx-duration) var(--rlx-ease-default); }
.rlx-accordion-item[data-open="true"] .rlx-accordion-body { grid-template-rows: 1fr; }
.rlx-accordion-body-inner { overflow: hidden; }
.rlx-accordion-item[data-open="true"] .rlx-accordion-body-inner { padding: 0 var(--rlx-space-4) var(--rlx-space-4); }
.rlx-accordion-text { margin: 0; font-size: var(--rlx-fs-small); color: var(--rlx-text-sub); line-height: var(--rlx-lh-normal); }

/* ── Modal ───────────────────────────────────────────────────── */
.rlx-modal-backdrop {
  position: fixed; inset: 0; z-index: var(--rlx-z-modal);
  display: grid; place-items: center;
  padding: var(--rlx-space-5);
  background: rgb(0 0 0 / .5);
  animation: rlx-fade-in .15s ease;
}
.rlx-modal {
  display: flex; flex-direction: column;
  width: min(560px, 100%); max-height: min(86vh, 900px);
  background: var(--rlx-surface);
  border: 1px solid var(--rlx-separator);
  border-radius: var(--rlx-radius-xl);
  box-shadow: var(--rlx-shadow-lg, 0 30px 70px -20px rgb(0 0 0 / .6));
  overflow: hidden;
  animation: rlx-modal-pop .2s cubic-bezier(.2, .8, .2, 1);
}
.rlx-modal--sm { width: min(420px, 100%); }
.rlx-modal--lg { width: min(720px, 100%); }
.rlx-modal-head { flex-shrink: 0; display: flex; align-items: center; gap: var(--rlx-space-3); padding: var(--rlx-space-4) var(--rlx-space-5); border-bottom: 1px solid var(--rlx-divider); }
.rlx-modal-title { flex: 1; min-width: 0; margin: 0; font-size: var(--rlx-type-title-size); font-weight: var(--rlx-type-title-weight); color: var(--rlx-foreground); }
.rlx-modal-close { flex-shrink: 0; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: var(--rlx-radius-sm); background: transparent; color: var(--rlx-text-sub); cursor: pointer; }
.rlx-modal-close:hover { background: var(--rlx-content2); }
.rlx-modal-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--rlx-space-4); padding: var(--rlx-space-5); }
.rlx-modal-foot { flex-shrink: 0; padding: var(--rlx-space-4) var(--rlx-space-5); border-top: 1px solid var(--rlx-divider); }
/* A footer of bare buttons (`footer: [cancel, save]`) had no layout: inline
   buttons sat on their text baselines, so an icon-less Cancel dropped below an
   icon-led Save, with no gap between them. Only button rows are laid out — a
   single wrapper (a composer, a custom footer) keeps its own layout. */
.rlx-modal-foot:has(> .rlx-btn + .rlx-btn) { display: flex; align-items: center; justify-content: flex-end; gap: var(--rlx-space-2); }
@keyframes rlx-modal-pop { from { transform: translateY(8px) scale(.99); opacity: .6; } to { transform: none; opacity: 1; } }

/* ── Toast ───────────────────────────────────────────────────── */
.rlx-toast-host {
  position: fixed;
  z-index: calc(var(--rlx-z-modal) + 3);
  right: var(--rlx-space-4);
  bottom: calc(var(--rlx-space-4) + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: var(--rlx-space-2);
  width: min(360px, calc(100vw - 2 * var(--rlx-space-4)));
}
.rlx-toast {
  display: flex; align-items: flex-start; gap: var(--rlx-space-3);
  padding: var(--rlx-space-3) var(--rlx-space-3) var(--rlx-space-3) var(--rlx-space-4);
  background: var(--rlx-surface);
  border: 1px solid var(--rlx-separator);
  border-left: 3px solid var(--rlx-text-muted);
  border-radius: var(--rlx-radius-md);
  box-shadow: var(--rlx-shadow-lg, 0 16px 40px -16px rgb(0 0 0 / .5));
  animation: rlx-toast-in .18s cubic-bezier(.2, .8, .2, 1);
}
.rlx-toast[data-leaving="true"] { animation: rlx-toast-out .18s ease forwards; }
.rlx-toast-icon { flex-shrink: 0; display: inline-flex; margin-top: 1px; color: var(--rlx-text-sub); }
.rlx-toast--info    { border-left-color: var(--rlx-info-soft-foreground); }
.rlx-toast--info .rlx-toast-icon { color: var(--rlx-info-soft-foreground); }
.rlx-toast--success { border-left-color: var(--rlx-success-soft-foreground); }
.rlx-toast--success .rlx-toast-icon { color: var(--rlx-success-soft-foreground); }
.rlx-toast--warning { border-left-color: var(--rlx-warning-soft-foreground); }
.rlx-toast--warning .rlx-toast-icon { color: var(--rlx-warning-soft-foreground); }
.rlx-toast--danger  { border-left-color: var(--rlx-danger-soft-foreground); }
.rlx-toast--danger .rlx-toast-icon { color: var(--rlx-danger-soft-foreground); }
.rlx-toast-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rlx-toast-title { font-size: var(--rlx-type-strong-size); font-weight: var(--rlx-type-strong-weight); color: var(--rlx-foreground); }
.rlx-toast-text { font-size: var(--rlx-fs-small); color: var(--rlx-text-sub); line-height: var(--rlx-lh-snug); }
.rlx-toast-close { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; padding: 2px; border: 0; border-radius: var(--rlx-radius-sm); background: transparent; color: var(--rlx-text-muted); cursor: pointer; }
.rlx-toast-close:hover { background: var(--rlx-content2); color: var(--rlx-foreground); }
@keyframes rlx-toast-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rlx-toast-out { to { transform: translateX(20px); opacity: 0; } }

/* ─────────────────────────────────────────────────────────────
   Join gate — the attendee "enter a code / scan to join" entry,
   built by window.RL.joinGate (event.js). A full-screen overlay
   with a single centered card.
   ───────────────────────────────────────────────────────────── */
.rlx-joingate {
  position: fixed; inset: 0; z-index: var(--rlx-z-modal);
  display: grid; place-items: center;
  padding: var(--rlx-space-4);
  background:
    radial-gradient(1000px 500px at 50% -10%, rgb(var(--rlx-accent-rgb) / .14), transparent 70%),
    var(--rlx-background);
}
.rlx-joingate-card {
  width: 100%; max-width: 380px;
  display: flex; flex-direction: column; gap: var(--rlx-space-4);
  padding: var(--rlx-space-6);
  background: var(--rlx-surface);
  border: 1px solid var(--rlx-separator);
  border-radius: var(--rlx-radius-xl);
  box-shadow: var(--rlx-shadow-lg);
  text-align: center;
}
/* Holds the product mark (resources/rl-mark.png), the same artwork every
   ReactLive surface uses. No fill or radius: the glyph carries its own
   gradient, and an accent tile behind it only competes with it — and would
   re-tint with the skin while the logo does not. */
.rlx-joingate-mark { width: 48px; height: 48px; margin: 0 auto; display: grid; place-items: center; }
.rlx-joingate-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.rlx-joingate-title { margin: 0; font-size: var(--rlx-type-title-size); font-weight: var(--rlx-type-title-weight); letter-spacing: var(--rlx-tracking-tight); }
.rlx-joingate-sub { margin: 0; font-size: var(--rlx-type-body-size); color: var(--rlx-text-muted); font-weight: var(--rlx-type-body-weight);}
.rlx-joingate-card .rlx-field { text-align: left; }
.rlx-joingate-card { max-height: calc(100dvh - 2 * var(--rlx-space-4)); overflow-y: auto; }
.rlx-joingate-lede { margin: calc(-1 * var(--rlx-space-2)) 0 0; font-size: var(--rlx-type-body-size); color: var(--rlx-text-sub); font-weight: var(--rlx-type-body-weight);}
.rlx-joingate-form { display: flex; flex-direction: column; gap: var(--rlx-space-3); text-align: left; }
/* The guest field sits directly beneath a stack of provider buttons and is
   separated from them only by a hairline border, so it reads as a fourth button
   rather than somewhere to type. In the join card only, take that border to the
   value the kit already uses for hover so the outline carries the distinction.
   The fill needs a skin-specific answer and is handled in the skin (spark.css):
   which direction is "recessed" depends on where the controls sit. */
.rlx-joingate-form { --rlx-input-border: var(--rlx-input-border-hover); }
.rlx-joingate-body { display: flex; flex-direction: column; gap: var(--rlx-space-3); text-align: left; }
.rlx-joingate-providers { display: flex; flex-direction: column; gap: var(--rlx-space-3); }
/* Divider before the guest path — extra room so it doesn't crowd the
   account/provider section above it. */
.rlx-joingate-divider { display: flex; align-items: center; gap: var(--rlx-space-3); margin: var(--rlx-space-2) 0; color: var(--rlx-text-muted); font-size: var(--rlx-type-caps-size); font-weight: var(--rlx-type-caps-weight); text-transform: uppercase; letter-spacing: var(--rlx-tracking-wider); }
.rlx-joingate-divider::before, .rlx-joingate-divider::after { content: ""; flex: 1; height: 1px; background: var(--rlx-separator); }
.rlx-joingate-invite { display: flex; align-items: flex-start; gap: 8px; margin: calc(-1 * var(--rlx-space-1)) 0 0; padding: 9px 12px; border-radius: var(--rlx-radius-md); background: rgb(var(--rlx-accent-rgb) / .08); color: var(--rlx-text-sub); font-size: var(--rlx-fs-small); text-align: left; }
.rlx-joingate-invite .rlx-icon { color: var(--rlx-accent); flex-shrink: 0; margin-top: 1px; }
/* Consent — required privacy/terms tick + optional marketing opt-in. */
.rlx-joingate-consent { display: flex; flex-direction: column; gap: var(--rlx-space-2); padding-top: var(--rlx-space-3); border-top: 1px solid var(--rlx-separator); text-align: left; }
.rlx-joingate-consent .rlx-checkbox { align-items: flex-start; }
.rlx-joingate-consent .rlx-checkbox-label { font-size: var(--rlx-fs-small); font-weight: var(--rlx-fw-normal); color: var(--rlx-text-sub); line-height: var(--rlx-lh-normal); }
.rlx-joingate-consent[data-flag="true"] .rlx-checkbox:first-child .rlx-checkbox-box { border-color: var(--rlx-danger-soft-foreground); box-shadow: 0 0 0 3px var(--rlx-danger-soft); }
/* Nudge the consent tick when a sign-in button is pressed before it's ticked. */
.rlx-joingate-consent[data-flag="true"] { animation: rlx-consent-nudge .4s var(--rlx-ease-default); }
@keyframes rlx-consent-nudge { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.rlx-joingate-link { color: var(--rlx-accent); font-weight: var(--rlx-fw-semibold); text-decoration: underline; text-underline-offset: 2px; }
.rlx-joingate-guest { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: calc(-1 * var(--rlx-space-1)) auto 0; padding: 6px 10px; background: none; border: 0; border-radius: var(--rlx-radius-md); color: var(--rlx-text-sub); font: inherit; font-size: var(--rlx-fs-small); font-weight: var(--rlx-fw-semibold); cursor: pointer; }
.rlx-joingate-guest:hover { color: var(--rlx-foreground); background: var(--rlx-content2); }
.rlx-joingate-guest .rlx-icon { color: var(--rlx-text-muted); }
/* Continue-with-email modal footer — actions grouped to the right. */
.rlx-joingate-modal-actions { display: flex; justify-content: flex-end; gap: var(--rlx-space-3); }

/* ==============================================================
   REAL-TIME LAYER  (rlx-live-*)                    [new category]
   --------------------------------------------------------------
   A cross-surface presence / activity / liveness vocabulary that
   makes ReactLive *feel* live everywhere. One kit, reused across
   Wall · Audience · Page · Console · Admin. Nine primitives:

     • Live Badge          "● LIVE" heartbeat (live/connecting/paused/ended)
     • Presence Count      an animated headcount that rolls on change
     • Presence Stack      overlapping avatars + "+N others here"
     • Activity Ticker     ambient stream of live micro-events
     • Floating Reactions  emoji rising layer (generalised from the Wall)
     • Composing Indicator "5 people are asking…" typing signal
     • Connection Status   connected / reconnecting / offline (honesty)
     • New-Item Chip       "▲ 3 new — tap to load" (no scroll-yank)
     • Live Result Bars    poll bars that animate width as votes arrive

   TESTING MARKER: every primitive carries `.rlx-live-zone`. Opting in
   with `Surface.liveMarker(true)` (or `<html data-rlx-live-debug="on">`)
   wraps each in an ORANGE dashed outline so you can see, at a glance,
   everywhere the real-time layer operates. `outline` is used (not
   `border`) so the marker never shifts layout.

   The outline is OFF by default: it reads as a rendering fault on a
   finished screen, and the demo triggers below already mark where the
   layer is. `Surface.liveMarker(false)` additionally hides those
   triggers, for a fully production-clean surface.
   ============================================================== */
:root {
  /* The one status the semantic palette does not name. It was a broadcast red
     (#FF383C); it is now the palette's Danger darkened — the same value every
     other red in the kit resolves to — so "live" still reads urgent without
     being the last saturated hue in the product. Revert this line alone to go
     back to tally-light red. */
  --rlx-live:        var(--rlx-danger-soft-foreground);
  --rlx-live-rgb:    181 50 41;   /* #B53229 */
  --rlx-live-marker: #FF7A1A;   /* orange — debug outline: where the layer is */
}
:root[data-theme="dark"] { --rlx-live: var(--rlx-ref-danger); --rlx-live-rgb: 231 154 149; }

/* ── The testing marker — orange outline on every live zone (opt-in) ── */
:root[data-rlx-live-debug="on"] .rlx-live-zone {
  outline: 2px dashed var(--rlx-live-marker);
  outline-offset: 3px;
  border-radius: var(--rlx-radius-sm);
}

/* ── Demo trigger — a small orange dotted-circle button that fires a
   real-time behaviour by hand. Hidden with the marker (production clean). */
.rlx-live-trigger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex-shrink: 0; padding: 0;
  border-radius: var(--rlx-radius-md);
  border: 1.5px dashed var(--rlx-live-marker);
  background: rgb(255 122 26 / .08);
  color: var(--rlx-live-marker);
  cursor: pointer; vertical-align: middle;
  transition: background var(--rlx-duration-fast) var(--rlx-ease-out), transform var(--rlx-duration-fast) var(--rlx-ease-out);
}
.rlx-live-trigger:hover { background: rgb(255 122 26 / .2); }
.rlx-live-trigger:active,
.rlx-live-trigger[data-fired="true"] { transform: scale(.88); background: rgb(255 122 26 / .32); }
.rlx-live-trigger:focus-visible { outline: 2px solid var(--rlx-live-marker); outline-offset: 2px; }
.rlx-live-trigger .rlx-icon { width: 14px; height: 14px; }
:root[data-rlx-live-debug="off"] .rlx-live-trigger { display: none; }

/* ── Live Badge ─────────────────────────────────────────────── */
.rlx-livebadge {
  display: inline-flex; align-items: center; gap: var(--rlx-space-2);
  height: 24px; padding: 0 var(--rlx-space-3) 0 10px;
  border-radius: var(--rlx-radius-full);
  font-size: var(--rlx-type-caps-size); font-weight: var(--rlx-type-caps-weight);
  letter-spacing: var(--rlx-tracking-wider); text-transform: uppercase; line-height: 1;
  background: rgb(var(--rlx-live-rgb) / .12);
  color: var(--rlx-live);
  border: 1px solid rgb(var(--rlx-live-rgb) / .30);
  white-space: nowrap;
}
.rlx-livebadge-dot { position: relative; width: 8px; height: 8px; border-radius: var(--rlx-radius-full); background: var(--rlx-live); flex-shrink: 0; }
.rlx-livebadge-dot::after { content: ""; position: absolute; inset: 0; border-radius: var(--rlx-radius-full); background: var(--rlx-live); animation: rlx-live-ping 1.8s var(--rlx-ease-out) infinite; }
@keyframes rlx-live-ping { 0% { transform: scale(1); opacity: .7; } 70% { transform: scale(2.6); opacity: 0; } 100% { transform: scale(2.6); opacity: 0; } }
.rlx-livebadge--connecting { background: var(--rlx-warning-soft); color: var(--rlx-warning-soft-foreground); border-color: rgb(var(--rlx-warning-rgb) / .32); }
.rlx-livebadge--connecting .rlx-livebadge-dot, .rlx-livebadge--connecting .rlx-livebadge-dot::after { background: var(--rlx-warning); }
.rlx-livebadge--paused { background: var(--rlx-surface-3); color: var(--rlx-foreground-muted); border-color: var(--rlx-separator); }
.rlx-livebadge--paused .rlx-livebadge-dot, .rlx-livebadge--ended .rlx-livebadge-dot { background: var(--rlx-default-400); }
.rlx-livebadge--paused .rlx-livebadge-dot::after, .rlx-livebadge--ended .rlx-livebadge-dot::after { display: none; }
.rlx-livebadge--ended { background: var(--rlx-surface-3); color: var(--rlx-foreground-muted); border-color: var(--rlx-separator); }

/* ── Presence Count ─────────────────────────────────────────── */
.rlx-presence-count { display: inline-flex; align-items: center; gap: var(--rlx-space-2); }
.rlx-presence-count .rlx-icon { color: var(--rlx-foreground-muted); flex-shrink: 0; }
.rlx-presence-num { font-weight: var(--rlx-fw-bold); font-variant-numeric: tabular-nums; letter-spacing: var(--rlx-tracking-tight); line-height: 1; transition: transform var(--rlx-duration-fast) var(--rlx-ease-out); }
.rlx-presence-count[data-bump] .rlx-presence-num { animation: rlx-presence-bump .5s var(--rlx-ease-spring); }
.rlx-presence-count[data-bump="up"] .rlx-presence-num { color: var(--rlx-success-soft-foreground); }
.rlx-presence-count[data-bump="down"] .rlx-presence-num { color: var(--rlx-foreground-muted); }
@keyframes rlx-presence-bump { 0% { transform: translateY(0); } 35% { transform: translateY(-3px); } 100% { transform: translateY(0); } }
.rlx-presence-label { font-size: var(--rlx-fs-small); color: var(--rlx-foreground-muted); }

/* ── Presence Stack (facepile) ──────────────────────────────── */
.rlx-presence-stack { display: inline-flex; align-items: center; gap: var(--rlx-space-2); }
.rlx-facepile { display: inline-flex; align-items: center; }
.rlx-facepile > * { margin-left: -8px; box-shadow: 0 0 0 2px var(--rlx-background); border-radius: var(--rlx-radius-full); }
.rlx-facepile > *:first-child { margin-left: 0; }
.rlx-facepile-more {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 28px; padding: 0 6px;
  border-radius: var(--rlx-radius-full);
  background: var(--rlx-surface-3); color: var(--rlx-foreground-muted);
  font-size: var(--rlx-fs-tiny); font-weight: var(--rlx-fw-bold);
}
.rlx-presence-stack-label { font-size: var(--rlx-fs-small); color: var(--rlx-foreground-muted); }
.rlx-presence-stack-label b { color: var(--rlx-foreground); font-weight: var(--rlx-fw-semibold); }

/* ── Activity Ticker ────────────────────────────────────────── */
.rlx-ticker { display: flex; flex-direction: column; gap: 2px; }
.rlx-ticker-item {
  display: flex; align-items: center; gap: var(--rlx-space-2);
  padding: 6px 8px; border-radius: var(--rlx-radius-sm);
  font-size: var(--rlx-fs-small); color: var(--rlx-foreground);
  animation: rlx-ticker-in .4s var(--rlx-ease-out);
}
.rlx-ticker-item[data-leaving="true"] { animation: rlx-ticker-out .35s var(--rlx-ease-in) forwards; }
.rlx-ticker-icon { display: inline-flex; width: 22px; height: 22px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: var(--rlx-radius-full); }
.rlx-ticker-icon--default { background: var(--rlx-surface-3);           color: var(--rlx-foreground-muted); }
.rlx-ticker-icon--primary { background: rgb(var(--rlx-primary-rgb) / .14); color: var(--rlx-accent); }
.rlx-ticker-icon--success { background: var(--rlx-success-soft); color: var(--rlx-success-soft-foreground); }
.rlx-ticker-icon--warning { background: var(--rlx-warning-soft); color: var(--rlx-warning-soft-foreground); }
.rlx-ticker-icon--danger  { background: var(--rlx-danger-soft);  color: var(--rlx-danger-soft-foreground); }
.rlx-ticker-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rlx-ticker-text b { font-weight: var(--rlx-fw-semibold); }
.rlx-ticker-time { flex-shrink: 0; font-size: var(--rlx-fs-tiny); color: var(--rlx-foreground-muted); }
@keyframes rlx-ticker-in  { from { opacity: 0; transform: translateY(-8px); max-height: 0; } to { opacity: 1; transform: none; max-height: 60px; } }
@keyframes rlx-ticker-out { to { opacity: 0; transform: translateY(6px); } }

/* ── Live Ticker (single-line status rotator) ───────────────
   One line at a time. On a new event the current line fades up + out while
   the new one slides up from the bottom into place. Only moves on push. */
.rlx-liveticker { position: relative; overflow: hidden; min-width: 0; }
.rlx-liveticker-item {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  font-size: var(--rlx-fs-small); color: var(--rlx-foreground-muted); white-space: nowrap;
  transition: transform 380ms var(--rlx-ease-out), opacity 380ms var(--rlx-ease-out);
}
.rlx-liveticker-item[data-enter="true"] { transform: translateY(115%); opacity: 0; }
.rlx-liveticker-item[data-leave="true"] { transform: translateY(-60%); opacity: 0; }
.rlx-liveticker-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rlx-liveticker-text b { color: var(--rlx-foreground); font-weight: var(--rlx-fw-semibold); }
.rlx-liveticker-icon { display: inline-flex; flex: none; align-items: center; justify-content: center; }
.rlx-liveticker-icon--primary { color: var(--rlx-accent); }
.rlx-liveticker-icon--success { color: var(--rlx-success-soft-foreground); }
.rlx-liveticker-icon--warning { color: var(--rlx-warning-soft-foreground); }
.rlx-liveticker-icon--danger  { color: var(--rlx-danger-soft-foreground); }

/* ── Floating Reactions (emoji rising layer) ────────────────── */
.rlx-react-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 3; }
.rlx-spark { position: absolute; bottom: -8%; will-change: transform, opacity; animation: rlx-spark-rise linear forwards; }
/* Named reaction — every Nth spark carries the reactor's face. */
.rlx-spark--avatar {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 3px 12px 3px 3px;
  background: var(--rlx-surface); border: 1px solid var(--rlx-separator);
  border-radius: var(--rlx-radius-full); box-shadow: var(--rlx-shadow-md);
  white-space: nowrap;
}
.rlx-spark-avatar { position: relative; display: inline-flex; }
.rlx-spark-badge {
  position: absolute; right: -4px; bottom: -4px;
  font-size: var(--rlx-fs-small); line-height: 1;
  filter: drop-shadow(0 1px 1px rgb(0 0 0 / .25));
}
.rlx-spark-name { font-size: var(--rlx-type-strong-size); font-weight: var(--rlx-type-strong-weight); color: var(--rlx-foreground); }
@keyframes rlx-spark-rise {
  0%   { transform: translate(0, 0) scale(.6); opacity: 0; }
  12%  { opacity: 1; }
  50%  { transform: translate(var(--sway, 0), calc(-1 * var(--rise, 55vh) * .5)) scale(1); }
  80%  { opacity: .9; }
  100% { transform: translate(var(--drift, 0), calc(-1 * var(--rise, 55vh))) scale(1.05); opacity: 0; }
}

/* ── Composing Indicator ("N people are asking…") ───────────── */
.rlx-composing { display: inline-flex; align-items: center; gap: var(--rlx-space-2); font-size: var(--rlx-fs-small); color: var(--rlx-foreground-muted); }
.rlx-composing[hidden] { display: none; }
.rlx-composing-dots { display: inline-flex; align-items: flex-end; gap: 3px; }
.rlx-composing-dots i { width: 5px; height: 5px; border-radius: var(--rlx-radius-full); background: currentColor; animation: rlx-composing-blink 1.2s var(--rlx-ease-default) infinite; }
.rlx-composing-dots i:nth-child(2) { animation-delay: .18s; }
.rlx-composing-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes rlx-composing-blink { 0%, 100% { opacity: .28; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }

/* ── Connection Status ──────────────────────────────────────── */
.rlx-connection { display: inline-flex; align-items: center; gap: 6px; font-size: var(--rlx-fs-tiny); font-weight: var(--rlx-fw-semibold); color: var(--rlx-foreground-muted); }
.rlx-connection-dot { width: 7px; height: 7px; border-radius: var(--rlx-radius-full); background: var(--rlx-success); flex-shrink: 0; }
.rlx-connection--reconnecting .rlx-connection-dot { background: var(--rlx-warning); animation: rlx-connection-pulse 1s var(--rlx-ease-default) infinite; }
.rlx-connection--offline .rlx-connection-dot { background: var(--rlx-danger); }
.rlx-connection--reconnecting { color: var(--rlx-warning-soft-foreground); }
.rlx-connection--offline { color: var(--rlx-danger-soft-foreground); }
@keyframes rlx-connection-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ── New-Item Chip ──────────────────────────────────────────── */
/* The polite live-region wrapper adds no box, so layout is unchanged. */
.rlx-newitem-live { display: contents; }
.rlx-newitem {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border: 0; border-radius: var(--rlx-radius-full);
  background: var(--rlx-accent); color: var(--rlx-accent-foreground);
  font: inherit; font-size: var(--rlx-fs-small); font-weight: var(--rlx-fw-semibold);
  box-shadow: var(--rlx-shadow-md); cursor: pointer;
  animation: rlx-newitem-drop .3s var(--rlx-ease-spring);
}
.rlx-newitem[hidden] { display: none; }
.rlx-newitem:hover { background: var(--rlx-accent-hover); }
.rlx-newitem .rlx-icon { margin-top: -1px; }
@keyframes rlx-newitem-drop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ── Live Result Bars ───────────────────────────────────────── */
.rlx-liveresults { display: flex; flex-direction: column; gap: var(--rlx-space-3); }
.rlx-liveresult-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--rlx-space-3); margin-bottom: 6px; }
.rlx-liveresult-label { font-size: var(--rlx-type-strong-size); font-weight: var(--rlx-type-strong-weight); color: var(--rlx-foreground); }
.rlx-liveresult-pct { font-size: var(--rlx-fs-small); font-weight: var(--rlx-fw-bold); font-variant-numeric: tabular-nums; color: var(--rlx-foreground-muted); }
.rlx-liveresult-track { height: 10px; border-radius: var(--rlx-radius-full); background: var(--rlx-surface-3); overflow: hidden; }
.rlx-liveresult-fill { height: 100%; border-radius: var(--rlx-radius-full); background: var(--rlx-default-400); width: 0; transition: width var(--rlx-duration-slow) var(--rlx-ease-spring); }
.rlx-liveresult--lead .rlx-liveresult-fill { background: var(--rlx-accent); }
.rlx-liveresult--lead .rlx-liveresult-pct { color: var(--rlx-accent); }
.rlx-liveresult-foot { margin-top: var(--rlx-space-2); font-size: var(--rlx-fs-tiny); color: var(--rlx-foreground-muted); }

/* ── Date & Time Picker (Surface.createDateTimePicker) ───────
   A calendar + configurable time row behind a trigger field, or
   rendered inline. All colour / radius / motion values are tokens. */
.rlx-dtp { position: relative; display: inline-block; font-size: var(--rlx-fs-small); }

/* Trigger: value field + accent calendar button */
.rlx-dtp-trigger { display: inline-flex; align-items: stretch; gap: var(--rlx-space-2); }
.rlx-dtp-value {
  display: inline-flex; align-items: center; min-width: 0; max-width: 320px; height: 40px;
  padding: 0 var(--rlx-space-4);
  border: 1px solid var(--rlx-divider); border-radius: var(--rlx-radius-md);
  background: var(--rlx-surface); color: var(--rlx-foreground);
  font-size: var(--rlx-fs-small); font-weight: var(--rlx-fw-medium);
  cursor: pointer; transition: border-color var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-dtp-value:hover { border-color: var(--rlx-separator-secondary); }
.rlx-dtp-value[aria-expanded="true"] { border-color: var(--rlx-accent); }
.rlx-dtp-value-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rlx-dtp-cal-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex-shrink: 0;
  border: none; border-radius: var(--rlx-radius-md);
  background: var(--rlx-accent); color: var(--rlx-accent-foreground);
  cursor: pointer; transition: background var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-dtp-cal-toggle:hover { background: var(--rlx-accent-hover); }

.rlx-dtp-value:focus-visible, .rlx-dtp-cal-toggle:focus-visible,
.rlx-dtp-nav:focus-visible, .rlx-dtp-day:focus-visible,
.rlx-dtp-step-btn:focus-visible, .rlx-dtp-step-val:focus-visible,
.rlx-dtp-seg-btn:focus-visible, .rlx-dtp-tz:focus-visible {
  outline: 2px solid var(--rlx-focus); outline-offset: 2px;
}

/* Panel */
.rlx-dtp-panel {
  position: absolute; top: calc(100% + var(--rlx-space-2)); left: 0;
  z-index: var(--rlx-z-dropdown);
  width: 300px; padding: var(--rlx-space-4);
  background: var(--rlx-surface); border: 1px solid var(--rlx-divider);
  border-radius: var(--rlx-radius-lg); box-shadow: var(--rlx-shadow-lg);
  /* Never taller than the viewport — scroll rather than spill off-screen. */
  max-height: min(72vh, 560px); overflow-y: auto;
}
/* Flipped: not enough room below the trigger, so open upward (set by JS). */
.rlx-dtp--up .rlx-dtp-panel { top: auto; bottom: calc(100% + var(--rlx-space-2)); }
.rlx-dtp-panel[hidden] { display: none; }
.rlx-dtp--inline { display: block; }
.rlx-dtp--inline .rlx-dtp-panel { position: static; width: 300px; box-shadow: var(--rlx-shadow-md); }
.rlx-dtp--disabled { opacity: .55; pointer-events: none; }

/* Calendar header */
.rlx-dtp-cal-head { display: flex; align-items: center; gap: var(--rlx-space-2); margin-bottom: var(--rlx-space-3); }
.rlx-dtp-month { flex: 1; min-width: 0; text-align: center; font-weight: var(--rlx-fw-bold); letter-spacing: var(--rlx-tracking-wide); color: var(--rlx-accent); }
.rlx-dtp-nav {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex-shrink: 0;
  border: 1px solid var(--rlx-divider); border-radius: var(--rlx-radius-sm);
  background: var(--rlx-surface); color: var(--rlx-accent); cursor: pointer;
  transition: background var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-dtp-nav:hover { background: var(--rlx-content2); }
.rlx-dtp-close { color: var(--rlx-text-muted); border-color: transparent; }
.rlx-dtp-close:hover { color: var(--rlx-foreground); background: var(--rlx-content2); }

/* Weekday header + day grid */
.rlx-dtp-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: var(--rlx-space-1); }
.rlx-dtp-weekday { text-align: center; font-size: var(--rlx-fs-tiny); font-weight: var(--rlx-fw-semibold); color: var(--rlx-text-muted); padding: var(--rlx-space-1) 0; }
.rlx-dtp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.rlx-dtp-week { display: contents; }   /* rows exist for ARIA only; cells flow in the 7-col grid */
.rlx-dtp-day {
  display: inline-flex; align-items: center; justify-content: center; position: relative;
  aspect-ratio: 1 / 1; width: 100%;
  border: none; background: none; border-radius: var(--rlx-radius-full);
  color: var(--rlx-accent); font-size: var(--rlx-fs-small); font-weight: var(--rlx-fw-medium);
  cursor: pointer; transition: background var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-dtp-day:hover:not([disabled]):not([data-selected]) { background: var(--rlx-accent-soft); }
.rlx-dtp-day[data-today] { font-weight: var(--rlx-fw-bold); }
.rlx-dtp-day[data-today]::after {
  content: ''; position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: var(--rlx-radius-full); background: var(--rlx-accent);
}
.rlx-dtp-day[data-selected] { background: var(--rlx-accent); color: var(--rlx-accent-foreground); font-weight: var(--rlx-fw-bold); }
.rlx-dtp-day[disabled] { color: var(--rlx-text-muted); opacity: .4; cursor: not-allowed; }
.rlx-dtp-day--blank { visibility: hidden; }

/* Divider before the time row */
.rlx-dtp-divider { height: 0; border-top: 1px dashed var(--rlx-divider); margin: var(--rlx-space-4) 0; }

/* Time row: steppers on the left, AM/PM + 12/24 on the right */
.rlx-dtp-time { display: flex; align-items: center; justify-content: space-between; gap: var(--rlx-space-4); flex-wrap: wrap; }
.rlx-dtp-steppers { display: flex; align-items: center; gap: var(--rlx-space-1); }
.rlx-dtp-stepper { display: flex; flex-direction: column; align-items: center; gap: var(--rlx-space-1); }
.rlx-dtp-step-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 26px;
  border: 1px solid var(--rlx-divider); border-radius: var(--rlx-radius-sm);
  background: var(--rlx-surface); color: var(--rlx-accent); cursor: pointer;
  transition: background var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-dtp-step-btn:hover { background: var(--rlx-content2); }
.rlx-dtp-step-val {
  min-width: 36px; text-align: center; padding: var(--rlx-space-1) 0;
  font-variant-numeric: tabular-nums; font-weight: var(--rlx-fw-semibold);
  color: var(--rlx-foreground); border-radius: var(--rlx-radius-xs);
}
.rlx-dtp-colon { align-self: center; padding-bottom: 2px; font-weight: var(--rlx-fw-bold); color: var(--rlx-text-muted); }
.rlx-dtp-toggles { display: flex; flex-direction: column; gap: var(--rlx-space-2); }
.rlx-dtp-seg { display: inline-flex; gap: var(--rlx-space-1); }
.rlx-dtp-seg[hidden] { display: none; }
.rlx-dtp-seg-btn {
  min-width: 42px; height: 30px; padding: 0 var(--rlx-space-2);
  border: 1px solid var(--rlx-divider); border-radius: var(--rlx-radius-sm);
  background: var(--rlx-surface); color: var(--rlx-text-sub);
  font-size: var(--rlx-fs-small); font-weight: var(--rlx-fw-semibold); cursor: pointer;
  transition: background var(--rlx-duration-fast) var(--rlx-ease-default),
              color var(--rlx-duration-fast) var(--rlx-ease-default),
              border-color var(--rlx-duration-fast) var(--rlx-ease-default);
}
.rlx-dtp-seg-btn:hover:not([data-active]) { background: var(--rlx-content2); }
.rlx-dtp-seg-btn[data-active] { background: var(--rlx-accent); border-color: var(--rlx-accent); color: var(--rlx-accent-foreground); }

/* Timezone select */
.rlx-dtp-tzrow { margin-top: var(--rlx-space-4); }
.rlx-dtp-tz {
  width: 100%; height: 36px; padding: 0 var(--rlx-space-3);
  border: 1px solid var(--rlx-divider); border-radius: var(--rlx-radius-sm);
  background: var(--rlx-surface); color: var(--rlx-foreground);
  font-size: var(--rlx-fs-small); cursor: pointer;
}

/* ── Reduced motion — keep the info, drop the movement ──────── */
@media (prefers-reduced-motion: reduce) {
  .rlx-livebadge-dot::after,
  .rlx-presence-count[data-bump] .rlx-presence-num,
  .rlx-ticker-item,
  .rlx-liveticker-item,
  .rlx-composing-dots i,
  .rlx-connection--reconnecting .rlx-connection-dot,
  .rlx-newitem { animation: none; }
  .rlx-spark { transition: none; }
  .rlx-liveresult-fill { transition: none; }
}


/* ── Panel ───────────────────────────────────────────────────
   A titled surface — the box the treatments below were always
   describing. Layout, radius, padding and type live here; border,
   background and shadow come from `[data-panel]`, which is why the two
   are separate and why the same panel works on any treatment.

   The head has two shapes and `sub` is what chooses between them:

     title only      an h2, with the icon inline before it
     title + sub     a leading tile, then the pair stacked beside it

   Nothing else differs. A consumer that wants the second shape asks for
   a sub; there is no variant to remember. */
.rlx-panel {
  display: flex; flex-direction: column;
  gap: var(--rlx-space-4);
  padding: var(--rlx-space-5);
  /* Panels take the LARGER card radius and cards the smaller one, which
     is the right way round for the first time: a panel is the outer
     surface, so 16px against a card's 14px keeps the nesting legible. */
  border-radius: var(--rlx-radius-xl);
  /* No z-index — `.rlx-panel-glow` needs this to stay a positioned element
     that has not opened a stacking context. */
  position: relative;
}
.rlx-panel-head { display: flex; align-items: center; gap: var(--rlx-space-2); }
/* Two lines of text beside a tile want their tops aligned, not their
   middles — centred, the tile floats against the taller block. */
.rlx-panel-head--stacked { align-items: flex-start; gap: var(--rlx-space-3); }
.rlx-panel-headtext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
/* The column's `gap` is the only thing that should set the distance between
   the title and the line under it. */
.rlx-panel-headtext > * { margin: 0; }
.rlx-panel-title {
  margin: 0;
  font-size: var(--rlx-type-subtitle-size);
  font-weight: var(--rlx-type-subtitle-weight);
  color: var(--rlx-foreground);
}
.rlx-panel-sub {
  margin: 0;
  font-size: var(--rlx-fs-tiny); line-height: 1.3; color: var(--rlx-text-muted);
}
/* Inline with a bare title: part of the heading, at heading size. */
.rlx-panel-titleicon { flex: none; display: inline-flex; color: var(--rlx-text-sub); }
/* Leading the two-line head: a tile, because an inline glyph beside two
   lines of type reads as a bullet. */
.rlx-panel-mark {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--rlx-radius-sm);
  background: color-mix(in srgb, var(--rlx-accent) 16%, transparent);
  color: var(--rlx-accent);
}
/* The trailing slot sits on the TITLE's line, not centred against the pair —
   a badge halfway down a two-line header reads as floating. */
.rlx-panel-head--stacked > :last-child:not(.rlx-panel-headtext) { flex: none; margin-top: 3px; }
.rlx-panel-body { display: flex; flex-direction: column; gap: var(--rlx-space-3); min-width: 0; }
/* A panel that is a LIST rather than a card: no chrome of its own, and the
   body is what scrolls so the head stays put. Pair with
   `treatment: 'transparent'`. */
.rlx-panel--fill { flex: 1; min-height: 0; padding: 0; gap: var(--rlx-space-2); }
.rlx-panel--fill > .rlx-panel-body { flex: 1; min-height: 0; overflow-y: auto; }
.rlx-panel--fill .rlx-panel-title {
  font-size: var(--rlx-type-strong-size, var(--rlx-fs-small));
  font-weight: var(--rlx-fw-semibold);
  color: var(--rlx-text-muted);
}

/* ══════════════════════════════════════════════════════════════
   PANEL TREATMENTS  ·  [data-panel="focus|feature|flat|raised|transparent|inset"]

   Six surface styles, as a reusable attribute rather than six bespoke
   panels. Any container can opt in — so a new one picks a treatment
   instead of inventing another edge. The console does exactly that, and
   the Foundations page renders all five side by side.

   Only border / background / shadow. Radius, padding and layout stay
   with the component, which is why the same five work on a 132px demo
   card and on a full-width panel.

   SPECIFICITY, not source order. The selector is doubled —
   `[data-panel="x"][data-panel]`, (0,2,0) — so a treatment beats the
   single-class component defaults it overrides (`.pcd-ov-panel` sets a
   background and a shadow; `.pcd-agent` sets a shadow) no matter which
   file wins the cascade. These rules used to live at the very END of
   console/desktop.css and tie at (0,1,0), where source order was the
   only thing making them apply; moving them here would have silently
   reversed that, and a treatment that depends on being last in one
   particular file is a trap either way.

   Colours come from the accent/secondary triplets and `color-mix`
   against `--rlx-surface`, so all five resolve in either skin and in
   either Spark mode — the fills are tints OF the current surface, not
   fixed darks.
   ══════════════════════════════════════════════════════════════ */

/* 1 · FOCUS — the panel that is asking for something.
   A wash of the accent over the surface and a 1px edge of the same,
   and that is all.

   It used to be a two-layer gradient border running accent → secondary
   → accent, a diagonal fill, a tight accent ring, a soft drop AND a
   separate `.rlx-panel-glow` bloom element — five effects on one card.
   Against the design, where a panel that needs attention says so with a
   chip and a count on a ground identical to every other panel's, that
   was five channels carrying what one already said. The gradient edge
   in particular read as a lit rim on the dark ground, which put more
   luminance on the console's chrome than on its content.

   What is left is the smallest thing that still separates this panel
   from a flat one at a glance. */
[data-panel="focus"][data-panel] {
  background:
    linear-gradient(rgb(var(--rlx-accent-rgb) / .06), rgb(var(--rlx-accent-rgb) / .06)),
    var(--rlx-surface);
  border: 1px solid rgb(var(--rlx-accent-rgb) / .28);
  box-shadow: none;
}

/* 2 · FEATURE — the panel that belongs to something.
   The same idea one step quieter: a wash with no edge of its own, so it
   groups with what is around it rather than standing off the page.
   Used by the agent module, where the card's job is to say "this panel
   is Engage's", not "look here".

   (This was the asymmetric two-radial fill with a 155° gradient border
   — the "upgrade card" treatment. See the note on focus above.) */
[data-panel="feature"][data-panel] {
  background:
    linear-gradient(rgb(var(--rlx-accent-rgb) / .05), rgb(var(--rlx-accent-rgb) / .05)),
    var(--rlx-surface);
  border: 1px solid transparent;
  box-shadow: none;
}

/* 3 · FLAT — the operational panel.
   A uniform hairline, a flat fill, and deliberately NO shadow. This is
   the one that must not glow: it is what everything else is quiet
   against. */
[data-panel="flat"][data-panel] {
  background: var(--rlx-surface);
  border: 1px solid var(--rlx-separator);
  /* Explicit, not omitted. Every consumer of these treatments already
     carries a shadow from its own component rule (`.pcd-ov-panel` sets
     `--rlx-shadow-md`), so a treatment that means "no shadow" has to say
     so — leaving it out inherits one and the variant quietly lies. */
  box-shadow: none;
}

/* 4 · RAISED — the quick-action card.
   Lit from above, which is the whole character of it and what separates
   it from `flat`:

     border      NOT one colour. A bright rim along the top edge that
                 falls to the plain separator by the middle and to
                 almost nothing at the bottom — the edge a surface
                 catches when the light is overhead.
     background  a VERTICAL lift off the tertiary surface, brightest at
                 the top and resolved to the plain surface two-thirds
                 down. Not the diagonal an earlier pass used: a diagonal
                 puts the highlight in a corner, and the source card
                 clearly lights along the top edge.
     shadow      a soft drop, which is what makes the lift read as
                 elevation rather than as a gradient.

   The rim uses `--rlx-foreground` mixed into transparency rather than a
   literal white, so it stays a highlight in dark and becomes a defining
   edge in light instead of disappearing into the card. It is kept LOW —
   12% at the top, not the 26% a first pass used, which turned a caught
   edge into a drawn line.

   The fill is COOLER than the rest of the system. Judged by sampling
   the middle of the source card rather than its edges: the middle sits
   around a blue-black, where Spark's surfaces are violet-biased (green
   below red). A few percent of the notification cyan mixed into the
   surface moves the green channel above the red and lands on it, and
   because it is a mix INTO `--rlx-surface` it stays correct in the
   light skin, where it reads as a faint cool white rather than a tint.

   This is the one place in the set that departs from the palette's
   violet bias, and it does so because the source card is legibly a
   different temperature, not as an accident. */
[data-panel="raised"][data-panel] {
  border: 1px solid transparent;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, rgb(var(--rlx-notification-rgb)) 6%, var(--rlx-surface-secondary)) 0%,
      color-mix(in srgb, rgb(var(--rlx-notification-rgb)) 4%, var(--rlx-surface)) 72%) padding-box,
    linear-gradient(180deg,
      color-mix(in srgb, var(--rlx-foreground) 12%, transparent) 0%,
      var(--rlx-separator) 40%,
      color-mix(in srgb, var(--rlx-foreground) 3%, transparent) 100%) border-box;
  box-shadow: var(--rlx-shadow-md);
}

/* The focus bloom, as its own layer.

   A `box-shadow` cannot do this. A shadow is one colour spread evenly
   around the whole perimeter, so the halo is uniform — but the edge it
   is supposed to be bleeding from is a GRADIENT, pink at one end and
   periwinkle at the other, and the reference's glow visibly changes
   colour and weight as it travels round. A flat halo under a graded
   edge reads as a sticker with a shadow.

   So the glow is a copy of the shape painted with the same gradient,
   blurred, and dropped behind the card's own fill with `z-index: -1`.
   The card is opaque, so only the blurred fringe escapes past the edge
   — and because the fringe is the gradient, it inherits every hue
   change the border has.

   Two radial hotspots ride on top of that: heavier accent at the
   lower-left and secondary at the upper-right, which is where the
   reference's bloom actually pools. That is what stops the blur from
   looking mechanically even.

   `z-index: -1` works because the panel sets `position: relative`
   without a z-index of its own, so it never opens a stacking context
   and a negative child can sit behind its background. Give that card a
   z-index and this layer disappears.

   TWO REQUIREMENTS, and both are easy to miss because the panel still
   renders — just as border-and-tint, looking like a different
   treatment:

     1. the card must contain a `<span class="rlx-panel-glow">`; the
        attribute alone gives the edge and the fill, never the bloom;
     2. some ANCESTOR must be a stacking context (`isolation: isolate`
        will do), or the glow paints below the nearest opaque background
        above it — a page or shell background — and is invisible. */
.rlx-panel-glow {
  /* Inert. The bloom was the last of the five effects the focus
     treatment stacked, and the loudest — a blurred two-hue halo painted
     outside the card's rectangle. On the design's near-black ground it
     was the brightest thing on screen, on a panel whose content is a
     list of counts.

     The element is still MOUNTED by `createPanel({ glow: true })` and
     still accepted as an option, so no consumer breaks and no call site
     had to be hunted down. It simply paints nothing now. If a genuine
     bloom is ever wanted again, this is the one rule to restore. */
  display: none;
}


/* 5 · TRANSPARENT — no surface at all.
   No fill, no border, no shadow: the content sits directly on whatever
   is behind it, and the container contributes only its layout. For
   regions that are a LIST rather than a card — the agent logs, where a
   card edge around a timeline just boxes in something that is already
   visually contained by its own rule and markers.

   It is the honest end of the scale: `flat` is the quietest thing that
   is still a panel, this is the point where it stops being one. */
[data-panel="transparent"][data-panel] {
  background: none;
  border: 0;
  box-shadow: none;
}

/* 6 · INSET — a block INSIDE a panel.
   The other five answer "what kind of card is this". This one answers a
   different question: a region that is already inside a card and needs
   to be set apart from the rest of it — the one row a feed is featuring,
   the read a panel was written from, a total under the rows it totals.

   No border and no shadow, because it is not an edge — an edge inside a
   card reads as a card inside a card. It is a step DOWN in the surface
   ramp instead: `content2` against the panel's `surface`, which is the
   same relationship the kit's own quiet fills use.

   It was four hand-rolled `background: var(--rlx-content2)` blocks in
   the console before it was a treatment, and they had already drifted on
   radius and padding. Radius and padding still belong to the component
   (see the note at the top); this contributes the fill and nothing
   else. */
[data-panel="inset"][data-panel] {
  background: var(--rlx-content2);
  border: 0;
  box-shadow: none;
}

/* ── ReactLive lockup ──────────────────────────────────────────────
   The orb + "ReactLive" artwork (resources/reactlive-logo*.webp, 683x144,
   from reactlive-web). The brand file has white text, drawn for dark grounds;
   reactlive-logo-dark is the same artwork with the text recoloured #18181B
   (the orb untouched). An app mounts both — `--on-dark` and `--on-light` —
   and the skin picks one: white text by default, dark under Spark Light. */
.rl-lockup { display: block; width: auto; max-width: 100%; }
.rl-lockup--on-light { display: none; }
:root[data-skin="spark-light"] .rl-lockup--on-dark { display: none; }
:root[data-skin="spark-light"] .rl-lockup--on-light { display: block; }
