/* Sparkd "Ember & Ink" v0.6 design tokens (design/sparkd/design-tokens.md §11) — the custom properties every
   bespoke (non-native-MudBlazor) surface layers on top of MudTheme (SparkdTheme.cs). The light column is the
   :root block below; the dark column is the `:root[data-theme="dark"]` block further down. Native MudBlazor
   components (MudCard/MudButton/MudAlert/...) re-theme for dark mode via MudThemeProvider's own generated
   --mud-palette-* variables and need none of this file; the bespoke `.spark-*` utility classes below read these
   custom properties directly.

   DARK IS DONE HERE, and this paragraph used to claim the opposite ("there is NO dark block in this file").
   There is. It re-points the PRIMITIVES only — canvas, surfaces, ink, borders, accents, shadows, the niche pairs
   and the status hues. Everything DERIVED from them (the whole --surface-accent* set, --status-*-soft/-on, the
   .niche-* and .hue-N scopes) is declared against those same var() names on this same :root, so var() substitution
   picks the dark value up with no second declaration. A component therefore needs a local dark block ONLY where
   a rule cannot be expressed as a token read at all — a white inner-highlight hairline that must be DROPPED
   rather than dimmed, say (MarketingShell's .mk-card, ChatRoom's .chat-bubble). Reaching for a literal hex is
   what breaks dark mode; the absence of a local override is not.

   It keys off `:root[data-theme="dark"]` and NOT `@media (prefers-color-scheme: dark)` — nor a `.mud-theme-dark`
   class. The media query can only ever follow the OS, so a user could never choose a theme against it; and
   MudBlazor 9.7 emits no theme-mode class at all (MudThemeProvider only rewrites `:root{--mud-palette-*}`, and
   `.mud-theme-dark` in MudBlazor.min.css is the unrelated `Color.Dark` utility). wwwroot/js/theme.js owns the
   attribute: it stamps it render-blocking in <head>, and where the stored preference is "system" it resolves the
   SIGNED-IN app to dark and the marketing/auth front door to the visitor's own prefers-color-scheme (owner
   ruling). MudBlazor's C#-side palette follows through that file's `sparkd:themechange` event. One narrow
   exception to the "native components need none of this file" rule: the `.mud-button-root` radius override
   near the bottom (sprint-01-03-fidelity.md §2.4, DEF-FID batch) — MudBlazor has no per-component radius slot,
   only the one global `DefaultBorderRadius`, so a scoped CSS override is the only way to give buttons
   `radius-control` distinctly from cards' `radius-card`. */
:root {
  /* ── THE NEUTRAL RAMP — THE LIGHT COLUMN, AND ONLY THE LIGHT COLUMN ─────────────────────────────────────
     Ten grey steps, and every neutral in the LIGHT theme is one of them. The warm light column it replaced —
     a parchment canvas (#E9E2D7), a cream off-white (#F6F2EB) and a warm-black ink (rgb(28,23,20)) that carried
     into every hairline, muted label and secondary line — is what the captain read as "dull" and "old"
     (2026-09-07: "lets have the bright white colour please... and also no brownish colour please as it makes the
     application look old"). The measured audit on 2026-09-05 is what says where the fault was NOT: the app was
     already 97.31% pure #FFFFFF, byte-identical to the prototype on eleven of thirteen surfaces, so the large
     backgrounds were never the problem. The WARMTH IN THE RAMP was — the ink, and the smaller furniture (search
     fields, avatar and media placeholders, empty-state medallions, disabled controls). The cast here is faintly
     cool (blue channel ~6 above red): enough that nothing reads brown, little enough that it does not fight
     Ember. EMBER AND COPPER ARE UNTOUCHED; the brand accent is not what "brownish" meant.

     DARK IS NEUTRAL TOO, AND IT IS NOT ON THIS SCALE. Dark has its OWN ramp (--dark-*, --dark-ink-rgb) declared
     in the dark block at the foot of this file. Same design, same cool cast, separate names — because the first
     cut of this pass made it one shared scale with steps serving both ends, and that is precisely how a
     light-only brief moved dark twice. If you need a new dark neutral, declare it in the dark block, not here;
     if you need to move a light one, do it here and dark will not notice. DarkColumnIsNeutralTests fails the
     build if either block reads the other's steps.

     Luminance was PRESERVED, not raised, so nothing the previous two flattening passes fixed comes undone — the
     canvas is 1.26:1 against white where the parchment was 1.29:1, a difference no eye resolves. "Bright white"
     is honoured by #FFFFFF surfaces and a true-neutral (not cream) off-white, which is what the captain was
     actually looking at when the smaller furniture read dirty.

     ponytail: one scale, not a per-surface elevation system, and no steps kept "for later" — 250/750/900/950
     existed only to serve dark and went with it. */
  --neutral-0:   #FFFFFF;  /* surface, and the only true white in the product */
  --neutral-50:  #F4F5F7;  /* surface-variant — the recessed fill inside a panel */
  --neutral-100: #E3E5E9;  /* the canvas */
  --neutral-200: #D2D6DB;  /* a solid hairline where an alpha will not do */
  --neutral-300: #9A9EA4;  /* decorative ink — ORNAMENT ONLY, 2.69:1 on white (AGENTS.md) */
  --neutral-400: #767B80;  /* outline */
  --neutral-500: #62666B;  /* muted ink — the AA floor, see below */
  --neutral-600: #55595E;  /* secondary ink */
  --neutral-700: #3A3E42;
  --neutral-800: #212427;  /* primary ink */

  /* The ink every LIGHT hairline and shadow composites from, as an rgb triple so an alpha can be written against
     it. ONE base: a divider tuned on one value and a shadow on another is how a ramp stops being a ramp. It is
     rgb(22,26,32) — neutral-cool, matching the scale — where it was rgb(28,23,20), the warm black. MEASURED, not
     assumed, because the brief flagged exactly this risk: at 0.14 on #FFFFFF the old hairline composited to
     rgb(223,223,222) and 1.334:1, the new one composites to rgb(222,223,224) and 1.334:1. Identical. The alphas
     therefore did NOT need raising, and were left alone. The dark block does not read this token — it has its
     own --dark-ink-rgb. */
  --ink-rgb: 22, 26, 32;

  /* ── Light-canvas contrast ladder ──────────────────────────────────────────────────────────────────────────
     Three deliberately separated steps: canvas → subtle panel → raised panel. It has been flattened twice, and
     both times the report was the same — "no differentiation between panels and background".

     The first pass fixed the eight alias tokens below, which were referenced by eleven stylesheets and defined
     nowhere, so panels were drawing no border at all. That was necessary but not sufficient: --color-bg was
     #FAF8F5, which against a #FFFFFF panel is a 1.05:1 contrast ratio — a difference you can measure and cannot
     see. It went to #F1EDE7 (1.14:1), which was still too close to read as two surfaces, then to the parchment
     #E9E2D7 at 1.29:1, which held.

     Now --neutral-100 (#E3E5E9), 1.26:1 against white — the SAME step of the ladder, in neutral. That is the
     range Slack's and Notion's light themes sit in, and it is what makes an unbordered panel legible as a panel.
     The old comment here argued warm-on-purpose ("a neutral canvas under Ember reads as dirty white"); the
     captain has overruled that, and with the cast kept faint rather than blue it does not read dirty. Text
     contrast is unaffected: the primary ink on this is 12.4:1, far past AA. */
  --color-bg: var(--neutral-100);
  --color-surface: var(--neutral-0);
  --color-surface-variant: var(--neutral-50);
  --color-outline: var(--neutral-400);
  --color-divider: rgba(var(--ink-rgb), 0.14);
  --color-text-primary: var(--neutral-800);
  --color-text-secondary: var(--neutral-600);
  /* THE AA FLOOR OF THE RAMP, and the one step that had to be measured rather than picked. Muted is the 13px
     metadata tier and the per-page X sweep made the CANVAS its common ground, not the white panel — so it must
     clear 4.5:1 on the darkest of the three light grounds. --neutral-500 (#62666B) measures canvas 4.58,
     surface 5.78, surface-variant 5.30. One step lighter (#64686D) measures 4.45 on canvas and fails, which is
     how narrow this is: do not lighten it for elegance. */
  --color-text-muted: var(--neutral-500);
  --color-text-decorative: var(--neutral-300);
  --color-focus-ring: #3B5BFF;

  /* ── INK THAT IS NOT BLACK ─────────────────────────────────────────────────────────────────────────────────
     Captain, 2026-09-07: "have them look beautiful and have bold, italics and also different colours instead of
     just black". A link and an inline action are the one place a WORD carries the accent, and Ember at its
     brand value (#B8441E) is 5.41:1 on white but only 4.29:1 on the canvas — a fail on the ground most muted
     body text now sits on. This is that same Ember two steps darker: 5.96:1 on white, 5.46:1 on surface-variant,
     4.72:1 on canvas. It is a token, not a component literal, precisely so no page has to re-derive it.
     Dark mode re-points it to the ember tint, which needs no darkening on an espresso ground. */
  --color-text-link: #AE3F1B;

  /* ── Aliases for names components were already using ───────────────────────────────────────────────────────
     Eleven stylesheets referenced --color-border-subtle / --color-border-default / --color-surface-subtle /
     --color-surface-raised / --color-text-default / --color-text-danger / --radius-md / --radius-pill, none of
     which was ever defined. An undefined custom property with no fallback resolves to nothing, so those rules
     silently produced no border, no panel background and default text — which is most of why panels stopped
     reading as panels. Defining them here fixes every consumer at once, including four Deal/Invoice components
     that predate this pass, instead of rewriting eleven files to say the same thing differently.
     ponytail: aliases, not a second palette — if the vocabulary ever settles on one set of names, collapse them.

     Both alphas were raised with the canvas above: a hairline tuned to sit on #FAF8F5 disappears against a panel
     edge once the canvas is three shades darker, because the border and the canvas start agreeing with each
     other. These are what actually draw the panel EDGE, so they carry the separation on any surface that has no
     shadow. */
  --color-border-subtle: rgba(var(--ink-rgb), 0.14);
  --color-border-default: rgba(var(--ink-rgb), 0.24);
  --color-surface-subtle: var(--color-surface-variant);
  --color-surface-raised: var(--color-surface);
  --color-text-default: var(--color-text-primary);
  --color-text-danger: var(--status-error, #B3261E);
  --radius-md: var(--radius-control, 16px);
  --radius-pill: var(--radius-full, 9999px);
  /* The small step the alias scale was missing. PostCard.razor.css asked for --radius-sm on its embed frame and
     its link card and silently got its 6px fallback instead, which is a token that only exists in two files'
     fallback arguments. Defined at that same 6px so nothing moves: the point is that the name now resolves. */
  --radius-sm: 6px;

  --accent-ember: #B8441E;
  --accent-ember-dark: #FF9163;
  --accent-copper: #96552E;
  --accent-copper-dark: #E3A579;
  --accent-gold: #FDB625;
  /* The label on a filled button, in both themes (the FILLED BUTTON block below). Theme-invariant: never re-pointed. */
  --on-fill: #FFFFFF;
  /* WHAT A FILLED BUTTON SITS ON, in both themes — the light column's own Ember, Copper and Error, never re-pointed
     for dark (firstmate, 2026-09-28: the captain wants white labels, so the FILL changes, not the rule). The dark
     tints (#FF9163, #E3A579, #FF8A80) carry white at only 2.21:1 and under; these carry it at 5.41, 5.78 and 6.54:1.
     The -hover steps are exactly what MudBlazor derives for the light palette (MudColor.ColorRgbDarken), so a
     button hovers the same in both themes. Only buttons read these — text, links and nav keep the theme's tints. */
  --fill-ember: #B8441E;
  --fill-ember-hover: #953718;
  --fill-copper: #96552E;
  --fill-copper-hover: #754224;
  --fill-error: #B3261E;
  --fill-error-hover: #941F19;
  --gradient-fill-ember: linear-gradient(135deg, #B8441E 0%, #9C3A1A 100%);
  --gradient-fill-copper: linear-gradient(135deg, #96552E 0%, #804827 100%);
  /* What a DISABLED filled button sits on — a neutral dark enough to carry --on-fill. Dark re-points it. */
  --button-fill-disabled: var(--color-text-muted);
  /* design-tokens.md §11 — MarkedPaid's own quiet signal, deliberately never Ember/success-green (deal-card-flow.md
     states table). First consumed by DealCard.razor's MarkedPaid branch (TASK-074, US-028). */
  --legacy-teal: #0E6E76;
  --legacy-teal-dark: #5FD9DD;

  /* CTA gradient — self-hue only, never mixed with a second accent (design-tokens.md §11). */
  --gradient-cta-ember: linear-gradient(135deg, #B8441E 0%, #9C3A1A 100%);
  --gradient-cta-copper: linear-gradient(135deg, #96552E 0%, #804827 100%);

  /* design-tokens.md §8.2/§11 — the brand-constant bloom-gradient avatar ring ("every avatar, everywhere").
     First consumed by CreatorProfile.razor's avatar (sprint-01-03-fidelity.md §4.5's "flat solid-orange circle"
     finding) via the .avatar-bloom-ring wrapper utility below. */
  --gradient-avatar-ring: conic-gradient(from 180deg, #96552E, #B8441E, #FDB625, #96552E);

  /* THE AUTH FRONT DOOR'S BRAND PANEL — a BRAND CONSTANT, and therefore the one gradient in this file that is
     deliberately NOT re-pointed in the dark block below. The captain-approved creator board 6 hardcodes these
     three stops (sparkd-creator-view.html, `.signin-split__brand`) precisely so the panel renders identically
     in both themes; composing it from --accent-ember instead made it a pale salmon on a dark visitor's screen,
     because that token flips to #FF9163 there. Literal hexes for the same reason --gradient-avatar-ring's are:
     a brand constant is not a themed value. Consumed only by AuthShell.razor.css. */
  --gradient-brand-panel: linear-gradient(160deg, #C2521F 0%, #B8441E 45%, #7A2A10 100%);

  /* THE COLOUR-FIELD STEPS — BRAND CONSTANTS, like the brand panel above and for the same reason: a painted field
     (the public site's hero panels and colour blocks, MarketingShell.razor.css) is the same object in both themes,
     so its ink cannot depend on the theme's ink. Ember 600/700/800 and gold 400 are hexes this file already uses;
     ember 900 (the dark field's floor) and gold 300 (figures on deep ember) are the two new steps. Measured by
     MarketingContrastTests.Every_colour_field_carries_its_ink_at_AA. */
  --ember-600: #B8441E;
  --ember-700: #9C3A1A;
  --ember-800: #7A2A10;
  --ember-900: #45180A;
  --gold-300: #FFD27A;
  --gold-400: #FDB625;
  --ink-900: #14100D;  /* --canvas-immersive's warm black, opaque */
  --gradient-field-ember:
      radial-gradient(70% 60% at 100% 100%, color-mix(in srgb, var(--gold-400) 30%, transparent), transparent 70%),
      radial-gradient(50% 60% at 0% 100%, color-mix(in srgb, var(--ember-900) 55%, transparent), transparent 70%),
      linear-gradient(165deg, var(--ember-600) 0%, var(--ember-700) 52%, var(--ember-800) 100%);
  --gradient-field-ember-dark:
      radial-gradient(70% 60% at 100% 100%, color-mix(in srgb, var(--ember-600) 45%, transparent), transparent 70%),
      linear-gradient(165deg, var(--ember-800) 0%, var(--ember-900) 60%, var(--ink-900) 100%);
  --gradient-field-gold:
      radial-gradient(60% 90% at 100% 0%, color-mix(in srgb, var(--ember-600) 26%, transparent), transparent 70%),
      linear-gradient(135deg, var(--gold-300) 0%, var(--gold-400) 100%);
  --gradient-text-flame: linear-gradient(100deg, var(--gold-300) 0%, var(--gold-400) 55%, var(--gold-300) 100%);

  /* The design system's own documented grain tile (design-tokens.md §2.5) — one shared fractal-noise SVG laid
     over a flat brand fill at low opacity so a full-bleed panel reads as a surface rather than as a swatch. */
  --texture-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  --radius-control: 16px;
  --radius-card: 20px;
  --radius-full: 9999px;

  /* Deepened alongside the canvas: a shadow calibrated against near-white has almost nothing to fall onto once
     the canvas darkens, so the lift it was providing quietly vanished. Shadow is the SECOND carrier of panel
     separation — the border above is the first — because a panel flush against the canvas edge shows only one
     of the two. */
  --shadow-whisper: 0 1px 3px rgba(var(--ink-rgb),0.07), 0 1px 2px rgba(var(--ink-rgb),0.05);
  --shadow-float: 0 8px 18px rgba(var(--ink-rgb),0.12), 0 2px 6px rgba(var(--ink-rgb),0.08);
  /* design-tokens.md §11 — first consumed by TASK-015's SwipeCard (deck top card, US-016). */
  --shadow-hero: 0 24px 48px rgba(var(--ink-rgb),0.16), 0 8px 20px rgba(var(--ink-rgb),0.08);

  /* design-tokens.md §6.1 "gloss, NEW, makes 'glossy, uplifted' concrete" — a top-edge highlight layered on top
     of a floating surface's own shadow, dark mode only (a lit-from-above sheen only reads against a dark
     surface; on the light canvas it would be invisible at best, muddy at worst). `none` here is the light
     default every floating card/avatar/dialog already inherits; the dark block below is the one that paints it.
     Applied as a background-image layer alongside the surface's own fill, never as a border. */
  --gloss-top-edge: none;
  --gloss-top-edge-thin: none;

  /* design-tokens.md §2.5/§11: cinematic scrim + its text tiers — theme-invariant (validated against
     worst-case photo brightness, not theme), so no `.mud-theme-dark` override is needed for these three. */
  --scrim-hero: linear-gradient(to top, rgba(20,16,13,0.95) 0%, rgba(20,16,13,0.70) 30%, rgba(20,16,13,0.15) 55%, transparent 75%);
  --text-on-scrim-primary: #FFFFFF;
  --text-on-scrim-secondary: rgba(255,255,255,0.85);
  --text-on-scrim-muted: rgba(255,255,255,0.70);
  /* The full-screen media canvas, and the fourth member of that same theme-invariant set: the ink --scrim-hero
     is built from, at the opacity a surface that has the WHOLE window needs. Theme-invariant for the same reason
     the three tiers above are — a white full-bleed canvas behind a video is exactly what an immersive surface
     exists to avoid, in either theme, and the --text-on-scrim-* tiers are only valid against this.
     Promoted out of PostViewer.razor.css, which declared it locally with a note saying to do exactly this once a
     second surface needed it; the immersive feed is that second surface. */
  --canvas-immersive: rgba(20, 16, 13, 0.97);

  /* ── The page-title ramp ────────────────────────────────────────────────────────────────────────────────────
     ONE definition, read by every page heading in the app.

     It was copy-pasted into sixteen stylesheets, and most of the copies carried a comment promising they "track
     SparkPage's own .spark-page__title deliberately: same family, same fluid clamp, same weight". Sixteen
     deliberate copies of one value is still sixteen places to change and fifteen chances to miss one — which is
     why the headings had already drifted apart, and why they are consolidated here rather than re-synced.

     Sans, not the display serif (owner ruling). Fraunces is editorial type doing duty on screens that are tools,
     and at 28-36px it ate the top of every page before any content appeared. 22-28px in the UI face sits with
     the rest of the interface instead of announcing itself over it. The auth screens keep Fraunces — that is a
     front door, not a workspace, and it is the one place the serif earns its keep. */
  --type-page-title-family: var(--font-family-ui);
  --type-page-title-size: clamp(1.375rem, 1.05rem + 1.3vw, 1.75rem);
  --type-page-title-weight: 800;
  --type-page-title-leading: 1.2;
  --type-page-title-tracking: -0.015em;

  /* Auth's own title ramp — the ONE place Fraunces still sets a heading. Sign-in and sign-up are a front door,
     not a workspace: one focal point, no competing content, and the serif is the brand's voice at the moment
     someone first meets it. Deliberately LARGER than the in-app ramp above, which it used to match exactly; that
     equality is now retired rather than accidentally broken, and both auth stylesheets read this instead of
     restating the numbers (they carried identical copies, comments included). */
  /* The designed-state title — the one ramp for every hand-rolled empty/error state message (the medallion +
     centred sentence composition nine pages carry). Extracted for the same reason as --type-page-title-*: those
     nine declarations had already drifted into three camps (1.375rem/1.3, 1.25rem/1.35, and a 0.9375rem body ramp
     that made a failed load read like a caption). Display family on purpose — a state message is a designed
     moment, not body copy. */
  --type-state-title-family: var(--font-family-ui);
  --type-state-title-size: 1.25rem;
  --type-state-title-weight: 800;
  --type-state-title-leading: 1.35;

  /* RE-POINTED TO X'S FLOW HEADING by the front-door pass. Nothing reads these five any more — AuthShell.razor.css
     now owns the auth heading and sets --x-type-title directly — but they are re-pointed rather than deleted so
     that anything resolving them later lands on X's number instead of on the retired fluid serif ramp. */
  --type-auth-title-family: var(--font-family-ui);
  --type-auth-title-size: var(--x-type-title);
  --type-auth-title-weight: var(--x-weight-bold);
  --type-auth-title-leading: 1.2;
  --type-auth-title-tracking: -0.012em;

  /* 48, not design-tokens.md §7.1's 44 (KISS redesign M1, 2026-10-22). Most people this app is for read a little,
     are new to apps and use small, older Android phones; the pattern sheet's floor is 48px with 8px gaps, and the
     main button is 52 (--size-main-button). Every floor below reads this one number, so the whole app moves with it. */
  --size-touch-target-min: 48px;
  --size-main-button: 52px;

  /* An AUDIO embed is a fixed-height widget, not a video: Spotify's player draws itself at this height at any
     width and paints nothing below it, so a box sized for a video aspect leaves an unpainted strip under the
     player that reads as broken layout. Every surface that frames an audio embed reads this one number
     (PostCard's wall card, the viewer's stage) — measured, not derived: an iframe reports no intrinsic
     size, so there is nothing to derive it from. */
  --size-audio-embed-height: 352px;

  /* ── The one content column ────────────────────────────────────────────────────────────────────────────────
     Feed posts, the deck card and the matches list all sit at this width. They used to be three different ones
     (1024 / 420 / 720), which is most of why the app read as three products stapled together — moving between
     Feed and Deck changed the column under you.

     1024px — the width Social Accounts already used, picked by the owner as the reference after seeing 720 and
     full-width side by side. Feed, Matches, Deck, Chat and Notifications all move up to meet it, so the eight
     list-and-reading surfaces are finally one column instead of the 720/1024/1280 spread they had.

     History, so this stops being re-litigated: it was 1024 (feed only), then 720 everywhere, then min(90vw,100%),
     now 1024 everywhere. The value is the owner's call — what matters structurally is that it is ONE value read
     by every page, which is the part that kept breaking. */
  --size-content-column: 1024px;

  /* THE DECK CARD'S BOX — creator board 3's `.deck-card`, measured in the running prototype at 1440x900:
     520 wide, 560 tall, `aspect-ratio: 4/5` with 560 as the height cap that takes the ratio back.

     THESE ARE THE BOARD'S OWN NUMBERS, and they replace an owner call that predates the approved prototype:
     "on desktop the deck card is the same box as a feed item — 1024 x 522". That reading made the deck card a
     LANDSCAPE object filling the whole content region (1117px wide at 1440 with the third section missing),
     where the board draws a PORTRAIT card sitting in the 600px reading column with a digest sidebar beside it.
     The card is not a feed item; it is the one object on a stage, and the board sizes it as one.

     Consumers must apply BOTH caps: the height one goes on whatever box carries the 4:5 ratio (SwipeCard's
     `.swipe-card__hero`, Deck.razor.css's peeks and skeleton), or the ratio wins and a 520px card is 650 tall.

     On a phone the width is the binding cap (the board's 348px inside a 390px frame → a 435px-tall 4:5 card)
     and 560 never bites, so one pair of numbers serves both frames.

     THE WIDTH IS NO LONGER THE BOARD'S (captain, 2026-09-19: "can the deck be same size as posts"). A NEW ruling,
     not the 1024 x 522 call above coming back: the deck card is now exactly as wide as a feed post card at every
     width — 358 at 390, 775 at 1440 — so the width cap is `none` and Deck.razor.css gives the stage the post
     card's own --space-4 side inset. It was put to him that board 3 draws a PORTRAIT 520 x 560 and why; he chose
     to match the post anyway. It supersedes board 3 for the WIDTH ONLY: the 560 height cap stays, so on desktop
     the card is a 775 x 560 LANDSCAPE box and the action discs stay above a 900px fold; on a phone the 4:5 ratio
     still binds first (358 x 448). The board is now the outlier on this number, not the code. */
  --size-deck-card-max-width: none;
  --size-deck-card-max-height: 560px;

  /* UI-fidelity workstream Phase 1 (NavShell.razor) — the fixed nav shell's own footprint, reused both by its
     component CSS (BottomNavBar.razor.css and the three *NavShell.razor.css files) and by app.css's global
     #app-state-anchor[data-nav-role] content-clearance rules, so the two stay in sync from one source. */
  /* The MOBILE header band only, since the rail-first change: at ≥960px each shell is a single full-height left
     rail with no top bar at all, and nothing reserves this height. Below 960px that same element reshapes into a
     horizontal top bar of exactly this height (each shell's own @media block), which is what app.css clears. */
  /* X's bar is 53px, measured on both captures, and it is the ONE height every top bar in the app now uses. */
  --nav-topbar-height: var(--x-bar-height);
  /* THE TOP BAR IS A PANEL (captain, 2026-09-07: "can the top heading bar be a panel and also introduce bottom
     padding and margin"). Two names, declared here rather than in any one shell, because the band's ground is
     painted by FOUR elements — the three rails' top 56px, the sidebar's, and the column header — and the whole
     point is that all of them read the same value. TopBar.razor.css still owns the joining edge over them.

     --nav-topbar-surface is the panel's own ground, and IN LIGHT IT IS PLAIN WHITE. Captain, 2026-09-07, asked
     twice: "can the top bar just be white". It was --color-surface-variant, one step off the --color-surface the
     rail, the column and the sidebar paint, so the band could separate from the page by TONE. The captain's
     reading of that step was grey, twice, and twice is a ruling: the whole chrome is now one continuous white
     ground and the band separates by EDGE AND ELEVATION instead — TopBar.razor.css's one full-width hairline
     and its --shadow-whisper, which it already drew.

     THAT MAKES THE HAIRLINE THE ONLY TONAL BOUNDARY LEFT IN LIGHT, which is what --nav-topbar-edge is for. It
     goes up one existing notch there — --color-border-default rather than --color-divider, the same ink at 0.24
     rather than 0.14, 1.68:1 on white where the divider is 1.33:1. Raising the ALPHA is deliberately the lever
     rather than reaching for a colour, and no second shadow was added: the standing direction is hairline
     dividers over heavy boxes, and TopBar's --shadow-whisper was already there.

     DARK KEEPS BOTH the tone step and the quieter edge, re-pointed in the dark block below — which is why these
     are two names with two declarations each rather than one. The captain's "just be white" is a LIGHT-theme
     ruling: on a dark canvas lighter-than-the-panel is what "raised" looks like, so the band would lose its
     whole reading if it flattened onto the panels, and an edge that still has a tone step behind it does not
     need to work as hard. Two names is also what let the dark ramp be swapped underneath this without the band
     needing a second thought — it reads tokens, not literals.

     The `body` note at the foot of this file warns about --color-surface-variant as the PAGE CANVAS; that
     objection is now moot here in light and still answered in dark (a 56px strip of chrome above the page is
     not the ground the panels sit on). */
  --nav-topbar-surface: var(--color-surface);
  --nav-topbar-edge: var(--color-border-default);
  /* The panel's bottom margin — the air between it and whatever begins directly under it (each rail's
     navigation, the column header's own content). It is NOT part of --nav-topbar-height and must never be
     folded into it: every content-clearance rule in app.css is arithmetic on that height, and the band's four
     grounds and its hairline all stop on that same pixel. */
  --nav-topbar-gap: var(--space-4);
  /* THE TOOLS' SHARE OF THE BAND — the Sparks chip, the theme toggle and the bell that each rail lifts into the
     band's trailing corner at >=960px. At >=1250px they sit over the sidebar's empty top 56px; between 960 and
     1249 there is no sidebar and they sit over the page's own column header, whose trailing slot ran under them
     (/campaigns' "New campaign" toggled the theme when clicked). ColumnHeader.razor.css clears this much there.
     Five hit targets: bell and theme are one each, and the chip measured 73px at a 3-digit balance and 9px per
     digit after that, so the whole cluster stays inside 220px up to a 7-digit balance (214px measured). */
  --nav-tools-reserve: calc(5 * var(--size-touch-target-min));
  /* The rail's ACTUAL footprint, re-declared per breakpoint at the foot of this file: 88px where X collapses the
     rail to icons, and the fluid lead column above that. Everything that has to clear the rail — app.css's
     content padding, the deck's fill, the chat room, the admin pages — reads this one name and follows for free.
     A route whose centre column is a reading column takes --shell-lead instead (app.css), which is the same
     number plus the margin that centres the three-column group. */
  --nav-rail-width: 240px;
  /* Bar height + the phone's own safe-area inset. 76px since the KISS redesign put the word back under every
     tab's picture (N2): 8 + (4 + 32 ring + 4 + 14.4 label + 4) + 8 + the hairline = 75.4px. The env() term makes
     the reservation exact on a home-indicator phone instead of a guess that is only right on one. */
  --nav-bottom-clearance: calc(76px + env(safe-area-inset-bottom, 0px));

  /* ── The X shell, MEASURED ─────────────────────────────────────────────────────────────────────────────────
     Every number below was read off `firstmate/data/analysis/x-home-desktop.png` (1440x900) and
     `x-home-mobile.png` (390x844) a pixel at a time, not approximated. The measurements, so the next person can
     re-derive rather than re-guess:

       · the centre column's two hairlines sit at x=355 and x=954 -> the reading column is exactly 600px;
       · the sidebar's panels span x=985..1334 -> 350px, 31px clear of the column;
       · the rail's "Post" button spans x=88..320 -> 233px of content, and the column it sits in runs 88..355
         -> 267px, i.e. 233px of content plus a 34px trailing gutter;
       · the group therefore runs 88..1334 with 88px of margin on the left and 91px on the right of a 1426px
         usable viewport: ONE centred group, not a left-anchored rail.

     ONLY the palette is Sparkd's. These are X's proportions, and they are tokens precisely so they are
     enforceable rather than re-typed per stylesheet.

     THE GROUP IS NO LONGER CENTRED (captain's ruling, 2026-09-05: "the app must fill the page"). X centres a
     fixed 1247px group and leaves ~96px of dead canvas down each side at 1440 and far more on a wide monitor;
     this shell keeps X's PROPORTIONS but spans the viewport: the rail is pinned to the left edge, the sidebar to
     the right, and everything between belongs to the content region. The measured numbers below are unchanged —
     what changed is that nothing multiplies them by a centring margin any more.

     There is NO token for the breakpoint itself: `@media` cannot read a custom property. The literal is 1250px
     -- the widest fixed group (rail + reading column + sidebar) plus a gutter's worth of slack -- and it is
     written that way in exactly four stylesheets (the two rails, the sidebar, and app.css). */
  --shell-rail-width: 267px;
  --shell-rail-content: 233px;
  --shell-rail-gutter: 34px;
  --shell-rail-narrow: 88px;
  --shell-column-width: 600px;
  /* THE READING MEASURE AND THE COLUMN CEILING ARE BOTH GONE (captain's ruling, 2026-09-05: "yes make it fill
     the width", "and fully responsive"), and this note is what stands where --shell-measure (680px) and
     --shell-column-max (950px) used to.

     They capped the reading column and `margin-inline: auto` centred what was left INSIDE the region, which at
     1920 was ~168px of empty surface down each side of the column and ~488px at 2560. Measured on the running
     app at 1920, that is what the captain was shown and what he ruled on: fill it.

     THE COLUMN IS NOW THE REGION. It runs from the rail's trailing edge to the sidebar's leading one at every
     width, and the only inset inside it is the page's own --x-row-inset. --shell-column-width (600px) stays
     above because it is still the board's measurement of X's column and --shell-sidebar-width is derived
     against it; nothing sizes a live column from it any more.

     THE COST IS LINE LENGTH, and it is deliberate rather than overlooked. With --shell-measure retired a
     caption's line runs the width of the column: 1287px of column and 1247px of text at 1920, 1927/1887 at
     2560. That is well past the ~80 characters the type ramp is drawn for. The captain asked for the number
     rather than to discover it; if it ever needs bounding, bound it on the TEXT (a max-inline-size on
     `.post-row__caption` and its two siblings) and never by re-capping the column — capping the column is
     what re-opens the gutters and, with them, the second hairline at each boundary.

     NOTHING MAY RE-INTRODUCE `margin-inline: auto` ON A COLUMN. With a cap gone an auto margin is inert; with
     a cap it is the centring that put the surplus back into two gutters. Both halves have to stay gone. */

  /* --shell-outer-gutter IS GONE (firstmate's ruling, 2026-09-05, superseding his own centring decision made
     earlier the same day). It centred the whole rail|column|sidebar group past 1583px, which moved THE RAIL:
     measured at 1920, the rail's trailing edge was 451.5 on /feed and /matches (timeline routes, which have the
     column ceiling) and 283 on /deck and /campaigns (which do not), and the sidebar moved with it. Navigating
     between two such routes at that width slid the entire navigation 168px sideways. The captain's standing
     instruction is "be consistent on each page", and a nav that relocates between routes is the most visible
     possible breach of it.

     THE RAIL AND THE SIDEBAR ARE FIXED CHROME AND MAY NEVER MOVE: the rail's leading edge is 0 and the
     sidebar's trailing edge is the viewport's, on every route, every width, every persona. Only the CONTENT
     between them varies — and since the fill-the-width ruling there is no surplus for it to vary BY: the
     column is the region, so no column has a ceiling and none of them centres. Nothing may re-introduce a
     group-centring margin, and nothing may re-introduce a column-centring one either. */
  /* THE SIDEBAR IS THE BOARD'S, FLAT. It was `clamp(350px, 30vw, 620px)` — the measured 350 as the floor of a
     clamp, on the theory that a full-width shell should hand its spare width to the sidebar rather than to a
     gap. MEASURED, that theory inverts the page: 30vw is 576px at 1920 against a 680px reading column and 620px
     at 2560, so the SECONDARY column ends up all but as wide as the PRIMARY one. All three approved prototypes
     draw this column at a flat 350px against a 600px column, and `30vw` is not the board. The surplus goes to
     the CONTENT, which is where the captain's "the app must fill the page" and "make it fill the width"
     rulings both want it: the reading column takes the whole region and this column stays 350. */
  --shell-sidebar-width: 350px;
  /* --shell-sidebar-gap was 30px of BARE CANVAS between the reading column and the sidebar — measured off X, but
     every prototype board draws one continuous surface with a hairline between, and the captain's spacing pass
     asked for exactly this class of fix. The sidebar carries `border-inline-start` instead
     (StageSidebar.razor.css) and the gap token is gone; nothing may re-introduce a canvas gutter there. */

  /* THE LEAD COLUMN — the rail's whole footprint, and a page's left clearance is THE SAME EXPRESSION, which is
     what keeps the reading column and the rail agreeing to the pixel.

     It used to be `max(rail, 50% - half + rail)`: the rail PLUS the margin that centred the three-column group.
     That arithmetic is what put ~96px of dead canvas down each side at 1440 and ~340px at 1920, and it is gone.
     The lead is now a CONSTANT — the rail panel pinned to the window's left edge — so it resolves identically on
     a `position: fixed` element and in a `padding-left`, which is what the old `50%`-vs-`50vw` split existed to
     guarantee. `--shell-lead-vw` therefore no longer needs to exist, and does not.

     The one addition is `--space-4` of leading gutter: with no centring margin left, the rail's 233px of content
     would otherwise sit flush against the window edge while keeping a 34px gutter on its inner side. 16px is the
     RAIL's own inset, which every board draws at `--space-4` (`.shell__rail{ padding: var(--space-6)
     var(--space-4) }`) — deliberately NOT --x-row-inset, which the same boards draw at 20px for rows and column
     headers. The two were the same number until the 2026-09-05 parity pass and the comment here used to tie
     them; they are two different measurements that happened to agree, and the drawings separate them. */
  /* ONE name and ONE constant. It was split into --shell-lead-base plus --shell-outer-gutter so the group's
     centring margin could be added without any consumer knowing; with the gutter gone (see above) the split is
     two names for one number, and the second name is exactly what let the rail move. */
  --shell-lead: calc(var(--shell-rail-width) + var(--space-4));

  /* ── X's timeline metrics, MEASURED ───────────────────────────────────────────────────────────────────────
     The row: 16px inline padding, a 40px avatar, a 12px gap to the body -> a body that starts 68px in from the
     column edge, on desktop AND on the 390px phone (measured on both captures, identical). 12px of block
     padding, and a 1px hairline between rows -- never a card, never a gap, never a radius.

     The action glyph is an 18.75px box (a 16px mark) with its count 4px away at 13px, and the three counted
     actions are spread `space-between` across a 425px group with share pinned to the trailing edge -- X spreads
     four across that same 425px and pins two. Media is capped at 510px tall and takes a 16px radius.

     The bars: a column header (a 15px tab label over a 4px underline that is the width of the LABEL, not of
     the tab) and a mobile top bar, one height between them.

     TWO OF THESE ARE THE PROTOTYPES' NUMBERS, NOT X'S (parity pass, 2026-09-05, firstmate-routed). All THREE
     approved prototypes agree against the measured capture on both, so the drawings win:
       · --x-row-inset was 16px, X's measured row inset. Every board draws a row and a column header at 20px
         (`--space-5`). Changed HERE and only here — AGENTS.md's "one inset, everywhere" is an invariant about
         CONSISTENCY, not about the number, so moving the single token keeps it perfectly intact and takes ~110
         call sites with it. Nothing in the app hardcodes the literal, and no assertion pins it (checked).
         NOT to be confused with the RAIL's own inline padding, which the boards deliberately keep at 16px
         (`.shell__rail{ padding: var(--space-6) var(--space-4) }`) — see --shell-lead above, which is why that
         one still spells --space-4 and must not be "corrected" to this token.
       · --x-bar-height was 53px, measured off the captures. Every board draws the bar at 56px
         (`--bar-height`). One token, and the mobile top bar, the sticky column header, the profile bar, the
         chat header, the tab strips and app.css's nav clearance all follow it from here.
       · --x-hit was 34.75px, measured off the same captures, and it is what SIZES A TARGET — the column header
         and profile-column back buttons, the post actions row, the cycle button, the profile bars. Measured at
         390 on 2026-09-17 that made every one of them a 35×35 target (hit-target survey), against
         design-tokens.md §7.1's 44px floor, which is also NFR-ACC's. Same ruling as --x-field-height's: an
         unmeasured X value loses to the design system, so this token now IS the floor rather than a number
         near it. Everything reading it draws the same glyph in a bigger box. */
  --x-row-inset: 20px;
  --x-row-block: 12px;
  --x-avatar: 40px;
  --x-avatar-gap: 12px;
  --x-avatar-small: 32px;
  --x-icon-action: 18.75px;
  --x-icon-nav: 26.25px;
  --x-action-track: 425px;
  --x-media-max-height: 510px;
  --x-media-radius: 16px;
  --x-bar-height: 56px;
  --x-tab-underline: 4px;
  --x-hit: var(--size-touch-target-min);
  --x-nav-item-height: 50.25px;
  --x-nav-item-gap: 8px;
  --x-primary-height: 52px;
  --x-fab-size: 56px;
  --x-panel-radius: 16px;

  /* X's messages list beside its thread. The list is a reading column of names, not of prose, so it is narrower
     than the timeline's 600px — this is the width X gives the conversation pane, and it is declared here rather
     than in the page so the list, the thread and the phone breakpoint all read one number. */
  --messages-list-width: 388px;

  /* ── X's FRONT-DOOR ramp and field, for the marketing pages and the auth flow ──────────────────────────────
     The four sizes above carry the timeline; they do not carry a front door. These five are the rest of X's own
     ramp — the splash headline, the flow/section title, the subheading under it, and the enlarged reading size
     X uses for a focal post — plus the two numbers that define X's text field.

     HONEST PROVENANCE, because the rest of this block is measured and this part is not: none of these five is
     readable off the three logged-in captures in `firstmate/data/analysis/`, which show a timeline and a
     profile. They are X's logged-out flow and splash values, and they are written here as tokens for exactly the
     reason the measured ones are — so a marketing page and an auth screen resolve the same number rather than
     each guessing at it.
       · 64px/700 splash headline, dropping to 45px on a phone (--x-type-display / -display-small);
       · 31px/700 the flow heading ("Sign in to X") and a section title;
       · 23px/400 the subheading under a title;
       · 17px/24px X's enlarged reading size — the focal post in a detail view, and body prose on a page that
         is read rather than scanned. It is also the floor the UI/UX bar sets for body copy (16px minimum), so
         marketing prose sets here and NEVER at the timeline's 15px.
     The field's height and radius are NOT X's any more: design-tokens.md §7.1 settled them for the boards
     (--control-height below, --radius-control). Only X's 2px focus border survives here.
     The flow column is X's narrow single-column form width; it is set from --shell-sidebar-width, which IS
     measured (the sidebar's panels span x=985..1334 on the desktop capture), rather than from a fourth guess. */
  --x-type-display: 64px;
  --x-type-display-small: 45px;
  --x-type-title: 31px;
  /* THE ONE RULED EXCEPTION to "no new size steps" (2026-09-19, design/sparkd/design-system.md §0.3). The ramp had
     nothing between 23 and 31, and five sites in two roles — a masthead and a money display — had each
     hand-written the same 28px, three of them before the 2026-09 cycle. One considered step, not a precedent: a
     further size needs its own recorded decision. */
  --x-type-masthead: 28px;
  --x-type-subtitle: 23px;
  --x-type-reading: 17px;
  --x-type-reading-leading: 24px;
  --x-field-border-focus: 2px;
  /* design-tokens.md §7.1 — every single-line field and a form's block submit. One step of the spacing scale, read
     through its own name so a field never borrows "the 9th spacing step" by coincidence. */
  --control-height: var(--space-9);
  /* X's narrow flow column IS the measured sidebar width, and reads it again: the wide-viewport pass put
     --shell-sidebar-width back to a flat 350px, so the literal this used to carry (written while the sidebar was
     a clamp() that grew on a wide monitor — a sign-in form that widened with the window is not what "X's narrow
     flow column" means) is now just a second copy of the same number waiting to drift. */
  --x-flow-column: var(--shell-sidebar-width);

  /* ONE SANS TYPE SYSTEM (owner ruling, the X pass). Fraunces is retired from the product — every surface,
     including the marketing front door and the auth screens that used to keep it. The token is re-POINTED here
     rather than deleted because ~50 stylesheets read it by name: re-pointing retires the serif everywhere in one
     line and leaves nothing behind to drift, where a rename would be fifty edits and forty-nine chances to miss
     one. HIERARCHY IS CARRIED BY SIZE AND WEIGHT NOW, which is exactly how X carries it — see the --x-type-*
     ramp below. A future pass may collapse the two names; today they are deliberately the same stack. */
  --font-family-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-family-ui: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Captain's ruling, 2026-09-03: "Fraunces STAYS on the sign-in headline, and only there — boards 1-5 remain
     all-sans." Isolated behind its own custom property, read by exactly one place (AuthShell.razor.css's
     .auth-heading / .auth-shell__tagline) — never --font-family-display/-ui, so the one-sans rule above stays
     true everywhere else. A full system-font fallback stack so the front door still reads correctly if the
     Google Fonts request in App.razor is ever lost. */
  --font-display-signin: "Fraunces", Georgia, "Times New Roman", serif;

  /* ── X's type ramp, MEASURED off the reference captures ────────────────────────────────────────────────────
     `firstmate/data/analysis/x-home-desktop.png` at 1440 and `x-home-mobile.png` at 390, read pixel by pixel
     rather than eyeballed. Four sizes carry the entire home timeline:
       · 15px/20px — THE size. Display name, secondary identifier, timestamp, caption, tab label, sidebar row.
         Everything a person reads in the column is this one size; only weight and colour separate the tiers.
       · 13px — the counts beside an action glyph, and a row's second line.
       · 20px — the rail's destination labels, the compose prompt, a sidebar panel's title.
       · 17px — a column header's title (the sticky bar above the timeline).
     Weights: 400 body, 500 an inactive tab, 700 a display name / an active destination, 800 a panel title. */
  --x-type-body: 15px;
  --x-type-body-leading: 20px;
  --x-type-meta: 13px;
  --x-type-lead: 20px;
  --x-type-header: 17px;
  --x-weight-body: 400;
  --x-weight-medium: 500;
  --x-weight-bold: 700;
  --x-weight-heavy: 800;

  /* ── THE ONE MOTION FAMILY ─────────────────────────────────────────────────────────────────────────────
     Five durations and two curves, and nothing in this app declares a duration or an easing of its own — a
     literal `240ms` in a component stylesheet is how the family stops being a family. Both curves are decelerating
     (fast out, slow in): --ease-out is the emphatic one and belongs to anything ENTERING, LEAVING or being
     THROWN; --ease-standard is the flatter one and belongs to a state change on something already on screen (a
     press, a hover, a colour). There is no spring and no overshoot curve on purpose — a product that bounces
     reads as cheap, and every request for one so far has been decoration.

     Motion here has exactly three jobs: show causality, keep a person oriented, and answer a tap instantly.
     Anything that does none of them does not ship.

     REDUCED MOTION IS NOT A SHORTER VERSION OF THIS. See the `prefers-reduced-motion` block further down: under
     it every duration AND every delay collapses, so state changes are instantaneous and everything is simply
     present. JS-driven motion (js/motion.js, deckThrow.js) asks matchMedia for the same answer and skips the
     animation entirely rather than running a 0.01ms one. */
  --motion-press: 100ms;   /* a control answering a finger — must be under the 100ms "instant" threshold */
  --motion-fast: 120ms;    /* design-tokens.md §8 — gallery reorder position swap (US-041 AC-3, TASK-091) */
  --motion-base: 200ms;    /* the default: an entrance, a fade, a sheet */
  --motion-slow: 280ms;    /* something large moving, and the deck card springing back to centre */
  --motion-throw: 320ms;   /* the deck card leaving the screen under a flick */
  --motion-ambient: 1400ms;/* the only long one: a loop that is telling you to wait (skeleton sweep, typing dots) */
  --ease-standard: cubic-bezier(0.4,0,0.2,1);
  --ease-out: cubic-bezier(.2,.8,.2,1);

  /* ── UI/UX rewrite additions ──────────────────────────────────────────────────────────────────────────
     8pt spacing scale. Exists so a creator screen and an admin screen share one rhythm instead of each page
     picking its own MudBlazor spacing utilities — that drift is what made the app read as a scaffold. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;

  /* Page frame — one gutter/cap for every screen, so pages stop hand-rolling MudContainer MaxWidth values.
     radius-panel is deliberately one step above radius-card: a panel must read as the PARENT of the cards
     inside it, and equal radii flatten that hierarchy. */
  /* THE CHIP INSET. A --radius-full pill carrying a 12-13px label — the niche tag, a "Brand" tag, a verified
     mark, a fact on a hero, a term in a review block. Twelve of them were drawn across ten stylesheets at
     1px/2px/3px block and 6/8/9/12px inline: the same object, five different insets, which is the drift this
     token exists to end. The 2px block inset is OPTICAL and deliberately off the 8pt scale — 4px is too much
     air under a 13px cap height and 0 clips the descenders; the inline half is a real step. -wide is the same
     pill carrying a longer phrase (a review term, a guardrail note), which takes the next step in. */
  --pill-inset: 2px var(--space-2);
  --pill-inset-wide: 2px var(--space-3);
  --gutter-page: clamp(16px, 5vw, 32px);
  --content-max: 1280px;
  --radius-panel: 24px;

  /* The resting elevation of a lifted panel — sits between float (a row/card) and hero (the deck's top card),
     a step the design direction's "depth from wide low-opacity shadows, never hard borders" needs. */
  --shadow-lift: 0 14px 30px rgba(var(--ink-rgb),0.14), 0 4px 10px rgba(var(--ink-rgb),0.09);

  /* (--motion-* / --ease-* were declared twice, in two blocks 30 lines apart. They live in ONE block near the
     type families above now — a motion family split across two declarations is one somebody edits half of.) */

  /* Surface accent — the indirection that lets a component be written ONCE and still come out Ember on
     creator/auth surfaces and Copper on marketer/admin ones: a page root sets .surface-ember/.surface-copper
     (below) and everything downstream reads var(--surface-accent*). Ember is the :root default so anything
     outside a scope keeps exactly today's appearance.
     -strong/-soft are DERIVED, never separate hexes, so they track both the accent AND the theme for free:
     mixing toward text-primary is "darker" on light and "lighter" on dark, i.e. more emphatic either way.
     -contrast borrows MudBlazor's own PrimaryContrastText/SecondaryContrastText, already correct per theme
     (#FFFFFF on light, ink on the dark tints — white fails AA there). */
  --surface-accent: var(--accent-ember);
  --surface-accent-strong: color-mix(in srgb, var(--accent-ember) 84%, var(--color-text-primary));
  --surface-accent-contrast: var(--mud-palette-primary-text, #FFFFFF);
  --surface-accent-gradient: var(--gradient-cta-ember);
  --surface-accent-soft: color-mix(in srgb, var(--accent-ember) 10%, var(--color-surface));
  --surface-button-fill: var(--fill-ember);
  --surface-button-gradient: var(--gradient-fill-ember);

  /* ══ Categorical + semantic colour ═════════════════════════════════════════════════════════════════════
     The ratified 8 niche hues and 4 status hues, finally emitted as tokens (design-tokens.md §2.5/§10,
     `tokens.json` color.niche + color.status). The governing rule: colour ENCODES something real — which
     niche a campaign is in, what state a deal is in — it is never decoration. If a surface cannot name what a
     hue MEANS on it, it uses --surface-accent or a neutral instead.
     Each container/on couple below is contrast-validated AS A PAIR: an -on ink goes on its own -container (or
     on that container's -wash/-soft derivative) and on nothing else. Never invent a third tint from one.
     Only this file and Cards/NicheHueTokens.cs may contain these literal hexes. */
  --niche-fitness-container: #FBE5E0;    --niche-fitness-on: #C13815;
  --niche-beauty-container: #FBE0E9;     --niche-beauty-on: #C1154F;
  --niche-food-container: #FBF1E0;       --niche-food-on: #936310;
  --niche-tech-container: #EAE0FB;       --niche-tech-on: #6419E6;
  --niche-fashion-container: #FBE0F5;    --niche-fashion-on: #B81497;
  --niche-parenting-container: #E0FBF4;  --niche-parenting-on: #0D775D;
  --niche-finance-container: #E0E3FB;    --niche-finance-on: #1935E6;
  --niche-gaming-container: #E0F6FB;     --niche-gaming-on: #0F758A;
  /* Unknown/null niche — a neutral hue is still a hue, never a blank (NFR-U-3). */
  /* The deliberately colourless pair, and therefore the one niche entry that IS part of the neutral ramp
     rather than a hue: it reads --neutral-50 / --neutral-500, which measures 5.30:1. It was #F5F0EA/#756C5E,
     a cream chip with warm-grey ink — the exact "brownish" furniture the captain named. */
  --niche-fallback-container: var(--neutral-50);   --niche-fallback-on: var(--neutral-500);

  /* The GENERIC trio that every niche/hue scope class below re-declares, and that every .spark-tint,
     .spark-hue-bar and .spark-medallion reads. Defaulted to the neutral fallback so an unscoped utility
     renders quietly instead of transparent. -wash is the barely-there item-surface tint (~6% of the hue over
     the surface) — it is what makes a list of items read as polychrome rather than a stack of identical
     white cards.
     The wash is written against the CONCRETE fallback token, not var(--niche-on), on purpose: a var() inside
     a custom property is substituted on the element that DECLARES it, so a descendant re-declaring --niche-on
     would NOT retroactively change a wash inherited from here. Every scope re-declares all three. */
  --niche-container: var(--niche-fallback-container);
  --niche-on: var(--niche-fallback-on);
  --niche-wash: color-mix(in srgb, var(--niche-fallback-on) 6%, var(--color-surface));

  /* Status hues (design-tokens.md §11, mirroring SparkdTheme's palette). -soft is the ~12% chip/panel fill,
     -on the ink legible on that fill (mixed one step toward text-primary: darker on light, lighter on dark —
     the same derivation --surface-accent-strong uses, so one expression is correct in both themes), -on-fill
     the ink for the SOLID hue used as a fill. -on-fill reads --color-bg deliberately: on light the fill is a
     deep hue and the ink wants the pale canvas; on dark the fill is a pastel and wants the dark one — one
     declaration, correct both ways, no override needed.
     Colour is never the sole carrier of state: every status chip keeps its text label. */
  --status-success: #1C7A4C;
  --status-success-soft: color-mix(in srgb, var(--status-success) 12%, var(--color-surface));
  --status-success-on: color-mix(in srgb, var(--status-success) 85%, var(--color-text-primary));
  --status-success-on-fill: var(--color-bg);

  /* Warning is the one theme-INVARIANT fill pair (#F5C453 fill / #3D2E00 ink), so -on-fill is a literal that
     never flips. Its -on does flip (see the dark block): the dark canvas's 12% tint is a dark brown that
     #3D2E00 cannot sit on. Deliberately not --accent-gold — Gold stays reserved for celebration + rating
     stars only. */
  --status-warning: #F5C453;
  --status-warning-soft: color-mix(in srgb, var(--status-warning) 12%, var(--color-surface));
  --status-warning-on: #3D2E00;
  --status-warning-on-fill: #3D2E00;

  --status-error: #B3261E;
  --status-error-soft: color-mix(in srgb, var(--status-error) 12%, var(--color-surface));
  --status-error-on: color-mix(in srgb, var(--status-error) 85%, var(--color-text-primary));
  --status-error-on-fill: var(--color-bg);

  --status-info: #1857A6;
  --status-info-soft: color-mix(in srgb, var(--status-info) 12%, var(--color-surface));
  --status-info-on: color-mix(in srgb, var(--status-info) 85%, var(--color-text-primary));
  --status-info-on-fill: var(--color-bg);

  /* The stable rotation for surfaces with NO data hue of their own — KPI tiles, value cards, empty-state
     medallions. Aliases (never new hexes) onto the niche set in one fixed order, so hue-3 is the same colour
     on every screen forever and dark mode comes along for free. --hue-N is the saturated hue itself (a 3px
     rule, an icon glyph), -soft its container fill, -on the ink that goes on that fill. */
  --hue-1: var(--niche-tech-on);       --hue-1-soft: var(--niche-tech-container);       --hue-1-on: var(--niche-tech-on);
  --hue-2: var(--niche-parenting-on);  --hue-2-soft: var(--niche-parenting-container);  --hue-2-on: var(--niche-parenting-on);
  --hue-3: var(--niche-finance-on);    --hue-3-soft: var(--niche-finance-container);    --hue-3-on: var(--niche-finance-on);
  --hue-4: var(--niche-fitness-on);    --hue-4-soft: var(--niche-fitness-container);    --hue-4-on: var(--niche-fitness-on);
  --hue-5: var(--niche-gaming-on);     --hue-5-soft: var(--niche-gaming-container);     --hue-5-on: var(--niche-gaming-on);
  --hue-6: var(--niche-fashion-on);    --hue-6-soft: var(--niche-fashion-container);    --hue-6-on: var(--niche-fashion-on);
  --hue-7: var(--niche-food-on);       --hue-7-soft: var(--niche-food-container);       --hue-7-on: var(--niche-food-on);
  --hue-8: var(--niche-beauty-on);     --hue-8-soft: var(--niche-beauty-container);     --hue-8-on: var(--niche-beauty-on);

  /* Chart series (share charts: the results donut). NOT the niche hues — those failed the dataviz validator as a
     categorical set (chroma floor in light, lightness band + protan ΔE 5.3 in dark). These are the validated
     reference slots 1–5, each with its own dark step below; all checks pass on both surfaces. */
  --chart-1: #2a78d6;  --chart-2: #eb6834;  --chart-3: #1baf7a;  --chart-4: #eda100;  --chart-5: #e87ba4;
  --chart-other: color-mix(in srgb, var(--color-text-muted) 45%, transparent);

  /* ── COLOUR ON TYPE, app-wide (captain, 2026-11-02: "the font on sparkd lacks colour, it's always black") ────────
     The semantic text inks. Every one is an ALIAS of an existing measured token, plus one new amber, so a page
     never picks a hex. Contrast measured on all three light grounds (white / surface-variant / canvas):
       accent + money  #AE3F1B  5.95 / 5.46 / 4.72      success #1D6D46  6.31 / 5.78 / 5.00
       warning         #8A5300  6.33 / 5.80 / 5.02      danger  #9D261F  7.69 / 7.05 / 6.10
       info            #194F93  8.14 / 7.46 / 6.45
     Every one clears AA for SMALL text, so no size rule is needed. --sp-text-display is the brighter brand Ember
     and is for large figures only (≥ 20px bold; 4.29:1 on the canvas passes AA-large, not small text).
     Body copy stays --color-text-primary. A status colour is never the only cue: the word or icon stays. */
  --sp-text-accent: var(--color-text-link);
  --sp-text-display: var(--accent-ember);
  --sp-text-money: var(--color-text-link);
  --sp-text-label: var(--color-text-link);
  --sp-text-success: var(--status-success-on);
  --sp-text-warning: #8A5300;
  --sp-text-danger: var(--status-error-on);
  --sp-text-info: var(--status-info-on);
}

/* ── The rail's footprint, per breakpoint ────────────────────────────────────────────────────────────────────
   Declared HERE rather than in each shell so every consumer of --nav-rail-width (app.css's content clearance,
   the deck's full-window fill, the chat room, three admin pages) follows the rail automatically. X collapses its
   rail to icons below ~1250px and shows labels above it; these two lines are that behaviour, once. */
@media (min-width: 960px) {
  :root {
    --nav-rail-width: var(--shell-rail-narrow);
  }
}

@media (min-width: 1250px) {
  :root {
    --nav-rail-width: var(--shell-rail-width);
  }
}


/* ── Dialogs ────────────────────────────────────────────────────────────────────────────────────────────────
   The one dialog frame. MudDialog's root is MudBlazor-rendered markup, which scoped CSS can never reach (the
   scope attribute rides authored elements only), so the shared frame lives here with the other spark-*
   primitives: the card radius and lift every panel already uses, a slim brand rule across the top so a modal
   is unmistakably Sparkd's, a titled header parted by the standard hairline, and one padding rhythm for the
   body. Callers add their own class beside it for anything page-specific. */
.spark-dialog.mud-dialog {
  position: relative;
  border-radius: var(--radius-card);
  background: var(--color-surface);
  /* design-tokens.md §6.1 "gloss" — every floating card/dialog reads lit-from-above in dark mode; `none` in
     light, so this costs nothing there. Declared after `background` on purpose: the shorthand resets
     background-image too, and this is the layer that restores it. */
  background-image: var(--gloss-top-edge);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}

.spark-dialog.mud-dialog::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-start: 0;
  block-size: 3px;
  background: var(--surface-accent-gradient);
}

.spark-dialog .mud-dialog-title {
  padding: var(--space-5) var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
}

.spark-dialog .mud-dialog-content {
  padding: var(--space-5) var(--space-6) var(--space-6);
}

/* A stepper inside a spark dialog. THIS CANNOT LIVE IN THE COMPONENT'S OWN .razor.css, and the reason is worth
   knowing: Blazor stamps the scoped-CSS attribute (b-xxxxx) onto plain HTML elements only, never onto a child
   COMPONENT's tag. So `<div class="spark-dialog__step">` is reachable with ::deep, but `<MudStepper>`'s own
   rendered root and its .mud-stepper-nav have no scoped ancestor at all — a ::deep rule aimed at them compiles
   into the bundle, looks correct in review, and silently matches nothing. It was written that way first and cost
   two capture cycles to spot. MudBlazor internals belonging to this dialog get styled HERE, keyed off
   .spark-dialog, exactly as the title and content rules above already are. */
.spark-dialog .mud-stepper-nav {
  flex-wrap: wrap;
  row-gap: var(--space-2);
}

/* On a phone the dialog runs nearly edge to edge — the desktop padding rhythm would spend a third of the
   width on air, so it tightens one step and the frame keeps a small standoff from the screen edges. */
@media (max-width: 599.98px) {
  /* The four steps cannot share one row at 390: MudBlazor gives each .mud-step 24px of padding and each
     connector `flex: 1 1 auto`, so the connectors ate the width and "Details"/"Review" fell off the right edge,
     leaving a dangling line and a stepper that read as broken rather than merely narrow. The numbered circles
     already carry the sequence, which is all the connector was drawing. */
  .spark-dialog .mud-stepper-nav .mud-stepper-nav-connector {
    display: none;
  }

  .spark-dialog .mud-stepper-nav .mud-step {
    padding: var(--space-1) var(--space-2);
  }

  .spark-dialog.mud-dialog {
    margin: var(--space-3);
  }

  .spark-dialog .mud-dialog-title {
    padding: var(--space-4) var(--space-4) var(--space-3);
  }

  .spark-dialog .mud-dialog-content {
    padding: var(--space-4) var(--space-4) var(--space-5);
  }
}

/* THE FEED'S COMPOSE DIALOG IS A SHEET AT PHONE WIDTH, not a floating box. Every entry point in the app now
   opens this one dialog (captain, 2026-09-07: "can you make the link to work always be the popup"), which makes
   it the composer at 390px as well as at 1440 — and the composer is a tall form: a link field, a preview card, a
   three-line caption, three optional number fields, a rights tick and an action row. The `.spark-dialog` phone
   rule above insets it 12px on all four sides, which is right for the two-field dialogs it was written for and
   leaves this one a cramped box floating mid-screen with its own scrollbar.

   So it comes off the BOTTOM EDGE instead: full width, rounded at the top only, capped at 92dvh so the composer
   scrolls inside the sheet rather than the sheet overflowing the screen. That is the shape a thumb expects and
   the one the platform's own share sheets use.

   IT LIVES HERE AND NOT IN Feed.razor.css, and that is the trap the `.spark-dialog` block above already records:
   CSS isolation stamps a page's scope attribute onto elements the page AUTHORS, never onto a child component's
   rendered root — so a scoped `.feed-compose-dialog.mud-dialog` rule compiles into the bundle, reviews as
   correct, and matches nothing. `.feed-compose-dialog__bar` and `__title` stay in Feed.razor.css because those
   ARE the page's own markup, inside the dialog's TitleContent.

   `!important` on the container's alignment because MudBlazor writes that axis inline from DialogOptions. */
/* THE WALL (PaywallSheet, PLAN.md §8.3) is a bottom sheet on a phone for the same reason, and shares this rule. */
@media (max-width: 599.98px) {
  .mud-dialog-container:has(.feed-compose-dialog),
  .mud-dialog-container:has(.paywall) {
    align-items: flex-end !important;
  }

  .feed-compose-dialog.mud-dialog,
  .paywall.mud-dialog {
    margin: 0;
    inline-size: 100%;
    max-inline-size: 100%;
    max-block-size: 92dvh;
    border-start-start-radius: var(--radius-panel);
    border-start-end-radius: var(--radius-panel);
    border-end-start-radius: 0;
    border-end-end-radius: 0;
    overflow-y: auto;
    /* The home indicator / gesture bar, so Share is not under the reader's own thumb rail. */
    padding-block-end: env(safe-area-inset-bottom, 0px);
  }
}

/* ── The base font ──────────────────────────────────────────────────────────────────────────────────────────
   The application's ONE inheritance root. Nothing anywhere set a font on <body> — not this file, not app.css,
   not MudBlazor's reset — so every element whose own CSS names no font-family fell through to the BROWSER
   DEFAULT SERIF. That is most of the product's body text: post captions and author names, link-card titles,
   like/comment counts, MudBlazor input text and placeholders, the auth pages' field labels. The explicitly
   ramped pieces (page titles, tabs, nav, chips) masked it, which is why it read as "some text looks off" rather
   than "there is no font", and why it survived every suite — bUnit asserts classes, not computed style. Found by
   the production-sweep screenshots, the same way the stray comment-closer was.

   Only the family and the canvas are declared. The background joined the family later, for the same class of
   bug: nothing painted <body> either, so a full reload in dark mode flashed BROWSER-DEFAULT WHITE until Blazor
   booted and the component surfaces arrived (~1s) — theme.js stamps data-theme render-blocking in <head>, so
   this token, unlike any component's background, is already dark-correct at first paint. Text colour still
   stays with the surfaces that own it.

   THE CANVAS IS --color-bg, NOT --color-surface-variant. This was the second value for three passes and it is
   what the captain kept seeing as "the UI has lost its beautiful look": --color-surface-variant is #F6F2EB,
   which sits ~1.05:1 against the #FFFFFF panels, so the rail, the reading column and the sidebar stopped
   reading as panels floating on a warm canvas and went flat near-white — the exact 1.05:1 bug the 3-step
   ladder darkened --color-bg to #E9E2D7 to fix, except the fix never reached the element that actually paints
   the page. Dark was worse than flat, it was INVERTED: --color-surface-variant is LIGHTER than the panels,
   where every approved board has the canvas as the darkest thing on screen. One token, both themes, all 27
   boards. --color-surface-variant keeps its real job, which is a recessed fill INSIDE a panel (an input, a
   hovered row); it was never the page. */
body {
  font-family: var(--font-family-ui);
  background: var(--color-bg);
}

/* Dark canvas (design-tokens.md §11's dark column). See the file header for why this is a media query and not
   a `.mud-theme-dark` class. Only the PRIMITIVES are re-pointed: every derived token above (the whole
   --surface-accent* set, and the .surface-* scopes below) is declared on this same :root element, so var()
   substitution picks up the winning dark value automatically — re-declaring them here would be dead weight.
   Shadows swap to a black base because the light column's ink is invisible on this canvas, which would cost
   every card its separation.

   ── THE DARK RAMP — THE DARK COLUMN, AND ONLY THE DARK COLUMN ─────────────────────────────────────────────
   Six grey steps, declared HERE, and every neutral in the dark theme is one of them. It is the palette crew's
   original 2026-09-07 scale recovered whole rather than re-derived: the same faintly cool cast as the light
   ramp, read from the other end, so the two themes are one design instead of two personalities. The LADDER
   was tuned on this canvas rather than eyeballed — the first neutral draft measured 1.11:1 panel-over-canvas
   and 1.08:1 panel-over-fill against the warm column's 1.14 and 1.14, so the canvas step went one notch
   deeper and a dedicated recessed fill was added. It now measures 1.14:1 and 1.16:1.

   THE HISTORY, because this value has now moved three times. The neutral pass first moved BOTH themes; the
   captain had meant light only and said so ("No the dark mode was fine please I just wanted you to work on
   the light mode"), so dark was reverted to the warm Espresso column at 0bc0a6bf. Having then SEEN the
   neutral dark, the captain's ruling on 2026-09-07 is "I like the darkmode that was done by you" — so it is
   back, and THIS is the value on record. Do not restore Espresso #14100D on the strength of an older comment,
   an older commit message, or the revert that carried them.

   THE TWO COLUMNS SHARE NO NAME, AND THAT IS THE REAL FIX. Twice a change meant for one theme dragged the
   other, both times because the ramp was ONE scale with steps serving both ends, so there was no way to move
   one without touching a name the other read. It is two scales now: --neutral-* and --ink-rgb are light-only
   and live at the top of this file; --dark-* and --dark-ink-rgb are dark-only and live here. Neither block
   reads the other's steps, DarkColumnIsNeutralTests fails the build in either direction, and a new dark
   neutral is declared HERE, never up there.

   ponytail: two flat scales, not one scale with a per-surface elevation system on top. Six steps because six
   are used — add a seventh when something actually needs it. */
  :root[data-theme="dark"] {
    --dark-950: #0D0F11;  /* the canvas — the darkest thing on screen */
    --dark-900: #1A1D21;  /* surface — the panels */
    --dark-750: #26292E;  /* surface-variant — the recessed fill inside a dark panel */
    --dark-300: #9A9EA4;  /* outline, and the muted ink tier */
    --dark-250: #B7BCC2;  /* secondary ink */
    --dark-100: #E3E5E9;  /* primary ink */
    /* The ink every DARK hairline composites from, as an rgb triple so an alpha can be written against it —
       the mirror of --ink-rgb, and the reason this block never has to read that one. rgb(232,236,241) is the
       light end of this same cool cast, where the warm column used rgb(245,239,232); composited at the alphas
       below the two land within 0.01 of a ratio point of each other, so the alphas did NOT need re-tuning. */
    --dark-ink-rgb: 232, 236, 241;

    --color-bg: var(--dark-950);
    --color-surface: var(--dark-900);
    --color-surface-variant: var(--dark-750);
    --color-outline: var(--dark-300);
    --color-divider: rgba(var(--dark-ink-rgb), 0.08);

    /* The two that must invert with the theme; the rest of the aliases above resolve through tokens that
       already do.

       Alphas raised (0.08 -> 0.11, 0.16 -> 0.18) to put the dark hairline on the SAME contrast ladder the light
       column was tuned to twice. Measured against the surface the border actually draws on: light's subtle edge
       is 1.33:1 against #FFFFFF and its default edge 1.67:1, while dark's were 1.23:1 and 1.59:1 — the same
       "border and background start agreeing with each other" flattening the light pass fixed, just one canvas
       over. At these alphas dark reads 1.35:1 and 1.69:1. Border is the FIRST carrier of panel separation and it
       matters more on dark, where the panel (--dark-900) is only 1.16:1 against the recessed fill inside it. */
    --color-border-subtle: rgba(var(--dark-ink-rgb), 0.11);
    --color-border-default: rgba(var(--dark-ink-rgb), 0.18);
    /* The ink ramp read from the light end of the DARK scale, and re-measured on the surface each tier
       actually sits on rather than assumed off the light column. NeutralRampContrastTests carries the numbers;
       muted is the binding tier here as it is in light, and it clears AA on all three dark grounds. */
    --color-text-primary: var(--dark-100);
    --color-text-secondary: var(--dark-250);
    --color-text-muted: var(--dark-300);
    /* No dark value is specified for text-decorative, so it is derived rather than invented: dimming muted
       toward the canvas keeps the same "one step quieter than muted" relationship it has on light. */
    --color-text-decorative: color-mix(in srgb, var(--color-text-muted) 72%, var(--color-bg));
    --color-focus-ring: #7C93FF;
    /* The top bar keeps its tone step AND its quieter edge here, and only here. Light went plain white on the
       captain's ruling (see --nav-topbar-surface above) and its edge went up an alpha notch to carry the
       separation alone; on a dark canvas a band that flattens onto the panels loses the "raised" reading that
       is its whole job, and an edge with a tone step behind it does not have to work as hard. These resolve
       to --dark-750 and rgba(232,236,241,0.08). The band moved with the ramp because it is written as a token
       read, not a literal — which is the property that made this restore a value change and not a hunt. */
    --nav-topbar-surface: var(--color-surface-variant);
    --nav-topbar-edge: var(--color-divider);
    /* The light column darkens Ember for links because the brand value fails on the light canvas; on this
       ground the ember TINT is already past AA on the panel, so the link ink is simply the accent. */
    --color-text-link: var(--accent-ember);

    /* The *-dark aliases stay as they are (existing component rules reference them by name); these re-point
       the UNSUFFIXED accents, which is what makes an unqualified var(--accent-ember) finally correct here. */
    --accent-ember: #FF9163;
    --accent-copper: #E3A579;
    --legacy-teal: #5FD9DD;
    --button-fill-disabled: var(--color-bg);

    /* Still self-hue only — mixing toward the canvas, never toward a second accent. */
    --gradient-cta-ember: linear-gradient(135deg, var(--accent-ember) 0%, color-mix(in srgb, var(--accent-ember) 84%, var(--color-bg)) 100%);
    --gradient-cta-copper: linear-gradient(135deg, var(--accent-copper) 0%, color-mix(in srgb, var(--accent-copper) 84%, var(--color-bg)) 100%);
    --gradient-avatar-ring: conic-gradient(from 180deg, var(--accent-copper), var(--accent-ember), var(--accent-gold), var(--accent-copper));

    --shadow-whisper: 0 1px 2px rgba(0,0,0,0.28), 0 1px 1px rgba(0,0,0,0.20);
    --shadow-float: 0 8px 16px rgba(0,0,0,0.40), 0 2px 6px rgba(0,0,0,0.28);
    --shadow-lift: 0 14px 28px rgba(0,0,0,0.46), 0 4px 10px rgba(0,0,0,0.30);
    --shadow-hero: 0 24px 48px rgba(0,0,0,0.60), 0 8px 20px rgba(0,0,0,0.40);

    /* design-tokens.md §6.1 — every elevated dark-mode surface reads lit-from-above rather than flat. The full
       gradient for a card-scale surface (deck card, profile hero, dialogs); the thin inset variant for a
       badge/chip/button-scale one, where the full gradient would be too heavy for the element's own height. */
    --gloss-top-edge: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, transparent 40%);
    --gloss-top-edge-thin: inset 0 1px 0 rgba(255,255,255,0.04);

    /* The dark column of the ratified niche pairs — the container becomes the DEEP end and the -on ink the
       bright one, i.e. the pair inverts rather than dimming. Only these primitives flip: --niche-container/
       --niche-on/--niche-wash, every .niche-*, every .hue-N alias, and all four --status-*-soft/-on
       derivations are declared against these same var() names on this same :root, so var() substitution picks
       the dark value up automatically. Re-declaring them here would be dead weight (the same argument the
       --surface-accent* set makes above). */
    --niche-fitness-container: #3F1B12;    --niche-fitness-on: #F2785A;
    --niche-beauty-container: #3F1221;     --niche-beauty-on: #F25A8C;
    --niche-food-container: #3F2F12;       --niche-food-on: #F2BA5A;
    --niche-tech-container: #23123F;       --niche-tech-on: #9B68F3;
    --niche-fashion-container: #3F1236;    --niche-fashion-on: #F25AD3;
    --niche-parenting-container: #123F34;  --niche-parenting-on: #5AF2CC;
    --niche-finance-container: #12183F;    --niche-finance-on: #687BF3;
    --niche-gaming-container: #12383F;     --niche-gaming-on: #5AD8F2;
    --chart-1: #3987e5;  --chart-2: #d95926;  --chart-3: #199e70;  --chart-4: #c98500;  --chart-5: #d55181;
    /* Still the deliberately colourless pair, and still the one niche entry that is a step off the neutral
       scale rather than a hue. The warm #2B2420/#9A8F82 becomes --dark-750/--dark-300, which measures 5.42:1
       on its own container — past the 4.5 floor this pair has twice come close to missing. */
    --niche-fallback-container: var(--dark-750);   --niche-fallback-on: var(--dark-300);

    --status-success: #7FDCA4;
    --status-error: #FF8A80;
    --status-info: #8FC1FF;
    /* Warning's FILL is theme-invariant (#F5C453, ink #3D2E00 — both stay put above), but its 12% SOFT tint
       here is a dark brown, so the ink on that tint has to become the gold itself. */
    --status-warning-on: var(--status-warning);
    /* The dark amber text ink is the warning fill itself (#F5C453 on espresso, > 10:1). The other --sp-text-*
       inks follow their aliases into dark without an override. */
    --sp-text-warning: var(--status-warning);
  }


/* Accent scopes. A page root carries exactly one — creator/auth = Ember, marketer/admin/org = Copper — and
   every descendant reading var(--surface-accent*) is then correct without knowing which surface it is on.
   No dark variant is needed: these resolve var(--accent-*) at the scoped element, which already inherits the
   theme-correct value from :root above. */
.surface-ember {
  --surface-accent: var(--accent-ember);
  --surface-accent-strong: color-mix(in srgb, var(--accent-ember) 84%, var(--color-text-primary));
  --surface-accent-contrast: var(--mud-palette-primary-text, #FFFFFF);
  --surface-accent-gradient: var(--gradient-cta-ember);
  --surface-accent-soft: color-mix(in srgb, var(--accent-ember) 10%, var(--color-surface));
  --surface-button-fill: var(--fill-ember);
  --surface-button-gradient: var(--gradient-fill-ember);
}

.surface-copper {
  --surface-accent: var(--accent-copper);
  --surface-accent-strong: color-mix(in srgb, var(--accent-copper) 84%, var(--color-text-primary));
  --surface-accent-contrast: var(--mud-palette-secondary-text, #FFFFFF);
  --surface-accent-gradient: var(--gradient-cta-copper);
  --surface-accent-soft: color-mix(in srgb, var(--accent-copper) 10%, var(--color-surface));
  --surface-button-fill: var(--fill-copper);
  --surface-button-gradient: var(--gradient-fill-copper);
}

/* Hue scopes. An ITEM (campaign row, deal card, KPI tile, team member, empty state) carries exactly one, and
   everything inside it — its leading rule, its icon plate, its chip, its surface wash — then reads the generic
   --niche-container/--niche-on/--niche-wash without knowing which hue it got. That indirection is what lets a
   list of eight campaigns come out in eight hues from ONE set of rules.
   Two names per scope on purpose: .niche-{key} when the hue MEANS the item's niche (Cards/NicheHueTokens.cs's
   ScopeClass() emits exactly these strings), .hue-{N} when the surface has no data hue of its own and just
   needs a stable slot in the rotation. They are the same colour by design.
   No dark variants: these resolve --niche-{key}-* at the scoped element, which already inherits the
   theme-correct value from :root. Accent scopes are unaffected — a hue scope ADDS to --surface-accent, it
   never replaces it. */
.niche-tech,      .hue-1 { --niche-container: var(--niche-tech-container);      --niche-on: var(--niche-tech-on);      --niche-wash: color-mix(in srgb, var(--niche-tech-on) 6%, var(--color-surface)); }
.niche-parenting, .hue-2 { --niche-container: var(--niche-parenting-container); --niche-on: var(--niche-parenting-on); --niche-wash: color-mix(in srgb, var(--niche-parenting-on) 6%, var(--color-surface)); }
.niche-finance,   .hue-3 { --niche-container: var(--niche-finance-container);   --niche-on: var(--niche-finance-on);   --niche-wash: color-mix(in srgb, var(--niche-finance-on) 6%, var(--color-surface)); }
.niche-fitness,   .hue-4 { --niche-container: var(--niche-fitness-container);   --niche-on: var(--niche-fitness-on);   --niche-wash: color-mix(in srgb, var(--niche-fitness-on) 6%, var(--color-surface)); }
.niche-gaming,    .hue-5 { --niche-container: var(--niche-gaming-container);    --niche-on: var(--niche-gaming-on);    --niche-wash: color-mix(in srgb, var(--niche-gaming-on) 6%, var(--color-surface)); }
.niche-fashion,   .hue-6 { --niche-container: var(--niche-fashion-container);   --niche-on: var(--niche-fashion-on);   --niche-wash: color-mix(in srgb, var(--niche-fashion-on) 6%, var(--color-surface)); }
.niche-food,      .hue-7 { --niche-container: var(--niche-food-container);      --niche-on: var(--niche-food-on);      --niche-wash: color-mix(in srgb, var(--niche-food-on) 6%, var(--color-surface)); }
.niche-beauty,    .hue-8 { --niche-container: var(--niche-beauty-container);    --niche-on: var(--niche-beauty-on);    --niche-wash: color-mix(in srgb, var(--niche-beauty-on) 6%, var(--color-surface)); }
.niche-fallback         { --niche-container: var(--niche-fallback-container);  --niche-on: var(--niche-fallback-on);  --niche-wash: color-mix(in srgb, var(--niche-fallback-on) 6%, var(--color-surface)); }

/* The three utilities every screen leans on. All generic — they read --niche-container/--niche-on from
   whatever scope they sit in and name no hue of their own, so the same markup is correct under .niche-food,
   .hue-5, or nothing at all (where the neutral fallback catches it). */

/* Soft tinted panel/chip fill + its matching ink. Keeps the inline padding the tinted-surface rule demands
   (text never touches a tinted container's edge); a chip-sized call site can tighten it at the call site. */
.spark-tint {
  background: var(--niche-container);
  color: var(--niche-on);
  border-radius: var(--radius-control);
  padding: var(--space-3) var(--space-4);
}

/* The accent rule an item carries: a 3px top edge by default, fading toward its own transparent end so it
   reads as a highlight rather than a border. --leading turns it vertical for a leading (inline-start) edge —
   put it in a flex row as the first child. */
.spark-hue-bar {
  flex: none;
  inline-size: 100%;
  block-size: 3px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--niche-on) 0%, color-mix(in srgb, var(--niche-on) 28%, transparent) 100%);
}

.spark-hue-bar--leading {
  inline-size: 3px;
  block-size: auto;
  align-self: stretch;
  background: linear-gradient(180deg, var(--niche-on) 0%, color-mix(in srgb, var(--niche-on) 28%, transparent) 100%);
}

/* The circular tinted icon plate — empty-state medallions, item avatars, KPI glyphs. The off-centre radial
   stop plus the hairline inner ring give it depth without a hard border. Size is a knob (--medallion-size) so
   a 40px row plate and a 96px empty-state medallion stay one rule. */
.spark-medallion {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  inline-size: var(--medallion-size, 64px);
  block-size: var(--medallion-size, 64px);
  border-radius: var(--radius-full);
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--niche-on) 22%, var(--niche-container)) 0%, var(--niche-container) 72%);
  color: var(--niche-on);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--niche-on) 16%, transparent), var(--shadow-whisper);
}

:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

/* MudBlazor clears the outline on `a:focus-visible`, `button:focus`, `.mud-button-root`, `.mud-chip` and clickable
   list items, and loads after this file, so the rule above lost on every button and link: a keyboard user saw
   nothing move (WCAG 2.4.7). `:is()` with a class in it weighs (0,2,0) here, enough to beat those resets and still
   lose to a component's own scoped focus style or a later rule such as `.x-tile:focus-visible`. */
:is(a, button, summary, [role="button"], [role="tab"], .mud-button-root, .mud-chip, .mud-list-item-clickable):focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

/* A control the keyboard moves to must not land under something pinned to the bottom (WCAG 2.4.11): the phone's
   tab bar, and New campaign's sticky Publish bar on top of it. The browser scrolls a focused element clear of
   this padding. */
@media (max-width: 599.98px) {
  html {
    scroll-padding-block-end: var(--nav-bottom-clearance);
  }
}

html:has(.campaign-create__foot) {
  scroll-padding-block-end: calc(var(--nav-bottom-clearance) + 160px);
}

/* ── REDUCED MOTION, THE WHOLE CONTRACT ─────────────────────────────────────────────────────────────────────
   Under `prefers-reduced-motion: reduce` there is no transform, no fade, no delay and no spring anywhere in this
   app: every state change is instantaneous and everything is simply present. This block is the CSS half of that
   promise and it is deliberately blunt.

   Duration alone was not enough, and each addition below is a hole the two-property version left open:
     · `*-delay` — a zero-duration animation that still waits 300ms before applying its `both` fill state is a
       page whose content appears late for no reason. A staggered grid (animation-delay per item at the call
       site, see .spark-enter) is exactly that, multiplied by the item count.
     · `animation-iteration-count` — an INFINITE loop clamped only in duration still repaints forever. The
       skeleton sweep, the verify pulse and the chat typing dots are all infinite; without this they run at
       ~100,000fps-equivalent churn rather than stopping.
     · `scroll-behavior` — `smooth` is motion the user did not ask for, and it is set by the UA on anchor jumps.
   `!important` on all of it because these must outrank every component's own declaration, scoped or not.

   The View Transitions API is animated by the UA and reads NONE of the properties above — its pseudo-elements
   are outside the document tree, so `*` never matches them. `::view-transition-group(*)` is the only way to
   still them from CSS, and js/motion.js additionally refuses to START a transition under this preference, so
   this is a second line of defence rather than the only one. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* design-system.md §4.1 "MudBlazor mapping": MudButton + .spark-button-gradient layers the self-gradient CTA
   fill on top of MudBlazor's flat Color.Primary fill; .spark-press is the lightweight (non-spring) press
   feedback for the same buttons. */
/* Now reads the SCOPE's gradient rather than Ember's directly, so the same markup ships a Copper CTA on a
   .surface-copper page with no per-page override; --surface-accent-gradient defaults to Ember, so every
   existing (unscoped) call site is unchanged. Hover lifts, press settles — transform/opacity only. */
.spark-button-gradient {
  background-image: var(--surface-button-gradient);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), var(--shadow-whisper);
  transition: transform var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out);
}

.spark-button-gradient:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), var(--shadow-float);
}

.spark-button-gradient:active {
  transform: scale(0.98);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), var(--shadow-whisper);
}

/* DISABLED has to clear the gradient explicitly. MudBlazor's disabled state greys the label and overrides
   `background-color` — but this utility paints a `background-image`, which nothing in that state touches, so a
   disabled CTA kept its full-strength Ember fill under grey text. It read as an enabled button that had gone
   wrong rather than as one that is not ready yet.

   Worth fixing globally rather than at the one reported call site: the feed composer's Post button is disabled
   until a link is pasted, which is the entire time anyone is looking at the composer, and every other gradient
   CTA in the app has the same state. */
.spark-button-gradient:disabled,
.spark-button-gradient.mud-button-disabled,
.spark-button-gradient[disabled] {
  background-image: none;
  box-shadow: none;
  transform: none;
}

/* …and every main button that is not ready yet looks the same: a ghost in the page's own hue (the Feed composer's
   treatment, moved here so Sign, Send my work, Pay and Share no longer disagree: a grey slab on some, a wash on
   others). `!important` because MudBlazor's own `.mud-button-filled:disabled` carries it; see PostComposer's old
   note. A disabled control is exempt from the 4.5:1 bar (WCAG 1.4.3). */
.spark-button-gradient:disabled {
  background-color: var(--surface-accent-soft) !important;
  color: color-mix(in srgb, var(--surface-accent, var(--accent-ember)) 60%, transparent) !important;
}

/* A FILLED BUTTON'S LABEL SITS ON THE FILL, AND THE FILL IS WHAT CHOOSES IT (captain, 2026-09-28: black and orange
   labels "where the label should be white"). One rule for every filled button, so no call site picks its own.

   The fault was a fill with no matching label. MudBlazor gives a filled button its label from its Color
   (`.mud-button-filled-primary` → --mud-palette-primary-text); a filled button with NO Color falls back to
   `.mud-button-filled { color: var(--mud-palette-text-primary) }`, the body ink. This utility then paints the
   Ember/Copper gradient under that body ink — black on Ember in light ("New campaign" on the campaigns
   narrative, "Add goal", and every other colourless gradient CTA). So the gradient now brings its label with it:
   --on-fill, white in both themes. Same specificity as MudBlazor's rule and later in the cascade, so it wins
   without !important; a Color.Primary button's own two-class rule still wins, and resolves the same value. */
.spark-button-gradient {
  color: var(--on-fill);
}

/* EVERY FILLED MUDBLAZOR BUTTON, in every state, re-points the palette it paints from — on the button only, so
   outlined/text buttons, links and nav keep the theme's own tints. Fill: the theme-invariant --fill-* above (on
   light they are the values MudBlazor already had, so light does not move; on dark they replace the pale tints).
   Label: --on-fill. Hover/focus/active read the -darken steps, so they are covered by the same four lines.

   DISABLED keeps the same rule: a white label, on a recessed neutral fill that can actually carry it. MudBlazor
   paints every disabled filled button from the two action-disabled variables — label rgba(0,0,0,.26) on
   rgba(0,0,0,.12), 1.44:1, a library default nobody chose — and sets both with !important, so they are re-pointed
   here rather than fought. The fill is the muted ink step on light (white on it is 5.8:1) and the dark canvas on
   dark (a recessed well under a white label). Outlined and text buttons are untouched: they have no fill. */
.mud-button-filled,
.spark-button-gradient {
  --mud-palette-primary: var(--fill-ember);
  --mud-palette-primary-darken: var(--fill-ember-hover);
  --mud-palette-secondary: var(--fill-copper);
  --mud-palette-secondary-darken: var(--fill-copper-hover);
  --mud-palette-tertiary: var(--fill-copper);
  --mud-palette-tertiary-darken: var(--fill-copper-hover);
  --mud-palette-error: var(--fill-error);
  --mud-palette-error-darken: var(--fill-error-hover);
  --mud-palette-primary-text: var(--on-fill);
  --mud-palette-secondary-text: var(--on-fill);
  --mud-palette-tertiary-text: var(--on-fill);
  --mud-palette-error-text: var(--on-fill);
  --mud-palette-action-disabled: var(--on-fill);
  --mud-palette-action-disabled-background: var(--button-fill-disabled);
}

.spark-press:active {
  transform: scale(0.98);
  transition: transform var(--motion-press) var(--ease-standard);
}

/* ── EVERY CONTROL ANSWERS A PRESS ─────────────────────────────────────────────────────────────────────────
   `.spark-press` above is the explicit opt-in, and a sweep found ~180 controls that had never been given it:
   180 call sites is a diff nobody can review and a class somebody will forget on the 181st. So the same
   settle is the DEFAULT for anything that is natively a button, and `.spark-press` stays as the way to put it
   on something that is not (a row, a tile, a link that acts like a control).

   Element selectors, deliberately: `button`/`summary`/`[role=button]` is the whole population, it needs no
   markup change anywhere, and its (0,1,1)-ish specificity loses to every component's own `:active` rule — so a
   control that already had a considered press (SwipeCard's 0.96 discs, the gradient CTA) keeps its own and this
   never fights it. `<a>` is excluded on purpose: the nav rail and the tab strips are links, and a navigation
   target that shrinks under the finger reads as a button that failed rather than a link that worked.

   It changes NO resting appearance — `:active` only paints while a finger or a mouse button is down — so no
   screenshot moves and the global reduced-motion block above already collapses the transition to nothing. */
button:active:not(:disabled),
summary:active,
[role="button"]:active:not([aria-disabled="true"]) {
  transform: scale(0.98);
  transition: transform var(--motion-press) var(--ease-standard);
}

/* ── THE LIKE ───────────────────────────────────────────────────────────────────────────────────────────────
   A heart that has just been filled, on the one interaction in the product people repeat hundreds of times. The
   like itself is applied optimistically in C# (PostActions), so the count and the fill are already correct
   before the server has answered; this is what makes that instant change legible as something the tap CAUSED
   rather than a number that quietly differs.

   A PULSE, NOT A BOUNCE: one rise to 1.18 and back on the standard curve, no overshoot below 1 and no second
   beat. It is applied by a class the component adds only on the ON transition and removes on the OFF one, which
   is also what re-arms it — an animation restarts when its class is re-added, so nothing has to time a removal.
   Global rather than scoped because the class lands on a MudButton's own root in the row shape, where a scoped
   selector loses to MudBlazor's multi-class rules (AGENTS.md's first scoped-CSS trap). */
.spark-like-pulse {
  animation: spark-like-pulse var(--motion-base) var(--ease-standard);
}

@keyframes spark-like-pulse {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* design-tokens.md §8.1 "type-amount-lg" (32/40, Fraunces 700 Bold) — MudBlazor's Typography type has no native
   slot for this tier (design-system.md §4.6e's own "MudBlazor mapping" note: "applied via a
   .spark-type-amount-hero/.spark-type-amount-lg CSS utility class ... same mechanism used since v1 for any tier
   MudBlazor's Typography type doesn't natively expose"). First consumed by DealCard.razor's inline "{name} offers
   R3 500" headline (TASK-068, US-025 AC-1). */
/* ══ THE INK TIERS AND EMPHASIS, AS SHARED TYPE ══════════════════════════════════════════════════════════════
   Captain, 2026-09-07: "on the texts can you please have them look beautiful and have bold, italics and also
   different colours instead of just black... and also different font sizes where applicable."

   The product was typographically flat: near-black at one weight at one size, page after page. These rules are
   the four axes — SIZE, WEIGHT, COLOUR, SPACE — expressed once, so a page gets hierarchy by naming a tier rather
   than by inventing a font-size. NO NEW SIZE STEPS WERE ADDED: the --x-type-* ramp already carries 13 / 15 / 17 /
   20 / 23 / 31 / 45 / 64 (plus --x-type-masthead's ruled 28, added later and on purpose) and every rule below reads
   one of them. What was missing was not a step, it was a place
   for prose to live.

   THE FOUR RULES THESE ENCODE, and they are what "restraint plus contrast" means rather than "more colours":
     · ITALIC MEANS SOMETHING. A quotation, an aside, a self-reported figure the product cannot vouch for, an
       empty state speaking in its own voice. It is never decoration and never a whole paragraph.
     · COLOUR IS NEVER THE ONLY CARRIER. A status keeps its word and its icon; a link keeps its underline. A
       colour-blind reader loses nothing here.
     · THREE INKS AND ONE ACCENT, not six competing colours. Primary leads, secondary supports, muted recedes,
       and Ember marks exactly the things you can act on.
     · EVERY TIER IS MEASURED. --color-text-muted is the AA floor of the ramp (4.58:1 on the light canvas,
       5.8:1 on the dark panel) and nothing here goes quieter than it for body-sized text.
   Nothing sets a size below --x-type-meta (13px), and nothing here is upper-case or wide-tracked — see
   AGENTS.md "Type: one sans system" for the sweep that retired both and the three disclosed exceptions. */
.spark-ink-secondary { color: var(--color-text-secondary); }
.spark-ink-muted     { color: var(--color-text-muted); }
.spark-ink-accent    { color: var(--color-text-link); }

/* An ASIDE: the one italic tier, for text the product is reporting rather than asserting — a self-reported
   metric, a caveat, a "you have not connected an account yet" spoken in the product's own voice. Italic plus one
   ink tier quieter, never italic alone, because italic at small sizes reads as a rendering fault unless the
   colour agrees with it. */
.spark-aside {
  font-style: italic;
  color: var(--color-text-secondary);
}

/* The LEDE: the single paragraph under a page title. Bigger than body, lighter in weight, one ink quieter — the
   size difference is what tells the eye it is a subtitle rather than the first paragraph of the page. */
.spark-lede {
  margin: 0;
  font-size: var(--x-type-reading);
  font-weight: var(--x-weight-body);
  line-height: 1.55;
  color: var(--color-text-secondary);
}

/* A LINK IN RUNNING TEXT. Ember, and underlined — the underline is why the colour is not carrying this alone.
   The ink is --color-text-link rather than --accent-ember because the brand value measures 4.29:1 on the light
   canvas and fails; see the token's own note. */
.spark-link {
  color: var(--color-text-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.spark-link:hover {
  text-decoration-thickness: 2px;
}

/* ── LONG-FORM PROSE ─────────────────────────────────────────────────────────────────────────────────────────
   The brief, the contract, a terms page, an About section — anything a person READS rather than scans. 17px on
   1.6 (--x-type-reading, the ramp's reading size), which is the 16px/1.5 floor the UI/UX bar sets with a little
   room over it. The timeline's 15px is for scanning a column and is deliberately NOT this.

   Spacing moves with size on purpose (`> * + *`): a 23px heading with body leading and body margins looks
   wrong, and it is the SPACE above a heading more than its size that makes a document read as sections. */
.spark-prose {
  font-size: var(--x-type-reading);
  line-height: 1.6;
  color: var(--color-text-primary);
}

.spark-prose > * + * {
  margin-block-start: var(--space-4);
}

.spark-prose h2,
.spark-prose h3 {
  margin-block-end: 0;
  color: var(--color-text-primary);
}

.spark-prose > h2,
.spark-prose > h3 {
  margin-block-start: var(--space-7);
}

.spark-prose h2 {
  font-size: var(--x-type-subtitle);
  font-weight: var(--x-weight-heavy);
  line-height: 1.25;
  letter-spacing: -0.012em;
}

.spark-prose h3 {
  font-size: var(--x-type-lead);
  font-weight: var(--x-weight-bold);
  line-height: 1.3;
  letter-spacing: -0.008em;
}

/* Bold is STRUCTURAL — the term a clause is about, the figure a paragraph turns on — so it stays at primary ink
   and simply gets heavier. Bolding in a quieter colour would cancel itself out. */
.spark-prose strong,
.spark-prose b {
  font-weight: var(--x-weight-bold);
  color: var(--color-text-primary);
}

.spark-prose em,
.spark-prose i {
  font-style: italic;
  color: var(--color-text-secondary);
}

.spark-prose a {
  color: var(--color-text-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* A quotation is the one place the ramp turns the page sideways: an accent rule down the left edge, italic, one
   ink quieter, and a wider inset. Reads --niche-on so a scoped surface tints it, which is the same mechanism
   .spark-hue-bar already uses rather than a second colour system. */
.spark-prose blockquote {
  margin-inline: 0;
  padding-inline-start: var(--space-4);
  border-inline-start: 2px solid var(--niche-on, var(--color-text-link));
  font-style: italic;
  color: var(--color-text-secondary);
}

.spark-prose ul,
.spark-prose ol {
  margin-block: 0;
  padding-inline-start: var(--space-5);
}

.spark-prose li + li {
  margin-block-start: var(--space-2);
}

/* The supporting tier inside prose: a source line, a "last updated", a figure caption. 13px is the floor and the
   metadata tier alike — the ramp has nothing below it. */
.spark-prose small,
.spark-prose .spark-prose__meta {
  display: block;
  font-size: var(--x-type-meta);
  line-height: 1.45;
  color: var(--color-text-muted);
}

.spark-type-amount-lg {
  font-family: var(--font-family-display);
  font-size: 2rem;      /* 32px */
  line-height: 2.5rem;  /* 40px */
  font-weight: 700;
  color: var(--color-text-primary);
}

/* design-tokens.md §8.2 "every avatar, everywhere renders a 3px bloom-gradient ring... paired with a soft
   ambient glow" — a plain padding-box gradient-border wrapper (no mask/clip-path needed): the ring shows in the
   3px gap between this wrapper's own conic-gradient background and the child avatar's own opaque fill, which
   already reaches every edge. Works around any avatar shape (MudAvatar defaults to a circle). */
.avatar-bloom-ring {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-full);
  background: var(--gradient-avatar-ring);
  /* Derived from the accent instead of a frozen ember rgba, so the ambient glow follows the ring's own hues
     into dark mode rather than staying on the light-canvas ember. */
  box-shadow: 0 0 16px 2px color-mix(in srgb, var(--accent-ember) 20%, transparent);
}

/* Cross-cutting fidelity fix (sprint-01-03-fidelity.md §2.4): SparkdTheme.cs's LayoutProperties.DefaultBorderRadius
   intentionally stays radius-card (20px, design-tokens.md §7) — MudBlazor applies that one global value to cards,
   dialogs and buttons alike, which reads as a full stadium/pill on a ~40-44px-tall button rather than the more
   rectangular radius-control (16px) every Penpot board shows on primary/outlined CTAs. MudIconButton is excluded —
   it's a circular control (radius-full), never radius-control. */
.mud-button-root:not(.mud-icon-button) {
  border-radius: var(--radius-control);
}

/* THE TOUCH FLOOR (48px since the KISS redesign; it was 44), enforced once here rather than page by page.
   design-tokens.md's --size-touch-target-min was 44px and the nav shells honour it, but MudBlazor's own default
   button height (32px, and 18px for a chip-scale icon button) was winning everywhere a page did not restate it.
   Measured on the CREATOR surface — the primary mobile surface — that meant "Photos", "Social accounts",
   "Data & Privacy", "Save changes", the social-account Edit/Remove pair and even "Delete account" were all 32px
   targets on a phone.
   A per-page fix is not available for most of them: they sit in SparkPage's Actions slot or inside another child
   component, so a page's own scoped CSS cannot reach them without ::deep — which is exactly why
   .creator-profile__niche-add already carried a min-height that silently never applied (the rule compiled to
   `[b-scope]` against a MudIconButton root that never had the attribute).
   Chip-internal buttons are excluded: a chip's own close affordance is sized by the chip, and forcing 44px there
   would inflate every niche tag rather than improve anything. */
.mud-button-root {
  min-block-size: var(--size-touch-target-min);
}

.mud-button-root.mud-icon-button {
  min-inline-size: var(--size-touch-target-min);
}

.mud-chip .mud-button-root,
.mud-input .mud-button-root {
  min-block-size: 0;
  min-inline-size: 0;
}

/* A MENU ITEM IS A BUTTON TOO, and `Dense` drew it 33px tall (the campaign row menu, measured at 390 once the sweep
   learned to open menus — MudMenuItem is a <div tabindex=0> with no role, so no sweep had counted one). Items are
   stacked edge to edge, so a hit expander would only steal from the item beside it: the floor goes on the drawn
   row, as it does for .mud-button-root above. A non-dense item is already 48 and is unchanged. */
.mud-menu-item {
  min-block-size: var(--size-touch-target-min);
}

/* THE SAME FLOOR FOR THE APP'S OWN SMALL TARGETS, enforced here for the same reason the MudBlazor one above is:
   every one of these is drawn by a SHARED component, and the pages that hold them cannot reach inside.
   design-tokens.md §7.1 settles the sizes as 48 field / 44 button / 36 compact and says of the compact tier that
   "the hit area still reaches 44px (padding or a pseudo-element); the drawn pill may be 36" — so this grows the
   HIT AREA ONLY. Nothing here changes a drawn box: the pill, the avatar and the text link keep the size the
   boards give them, and a centred pseudo-element takes the difference. Padding was not an option for most of
   them — a text link's padding moves the line it sits in.

   What each one measured at 390 before this rule, and on how many routes, is in
   docs/sparkd/hit-target-survey.md. Add a selector here rather than a min-height in a page.

   NOT every small target can join this list, and .post-card__author is the one that proved it: expanding a text
   link that sits inside a card whose own surface is the click target only takes the tap away from the card, and
   the expander lost to .post-card__meta and the article anyway (measured — the rule was written, measured, and
   removed again). A target with a click target of its own above and below it needs a design answer, not a
   bigger box; that one is reported in the survey instead. */
.admin-rail__item,                               /* the admin section strip's 36px compact pill */
.spark-tabs--segmented .spark-tabs__tab,         /* segmented options: calc(44px - 6px), the 3px track padding is the strip's */
.messages-inbox__avatar,                         /* --x-avatar sizes the picture AND the target at 40 */
.chat-header__identity,
.chat-deal-marker__link,
.cycle-counts__item,
.org-profile__action,
.profile-view__stat,
.swipe-card__org-chip,
.auth-link,
[data-testid="campaigns-row-interest"] .mud-link,
[data-testid="org-analytics-open"],
.billing__link,                                  /* a receipt's title, a text line in a row with no target of its own */
.post-row__avatar,                               /* the search/timeline row's 40px face, author and time links */
.post-row__author,
.post-row__meta,
.action__link,                                   /* one piece of work's "Deal" link, a title line in its side panel */
[data-testid="deal-contract-standard-terms-link"] { /* the deal on paper's one link, alone on its line */
  position: relative;
}

.admin-rail__item::after,
.spark-tabs--segmented .spark-tabs__tab::after,
.messages-inbox__avatar::after,
.chat-header__identity::after,
.chat-deal-marker__link::after,
.cycle-counts__item::after,
.org-profile__action::after,
.profile-view__stat::after,
.swipe-card__org-chip::after,
.auth-link::after,
[data-testid="campaigns-row-interest"] .mud-link::after,
[data-testid="org-analytics-open"]::after,
.billing__link::after,
.post-row__avatar::after,
.post-row__author::after,
.post-row__meta::after,
.action__link::after,
[data-testid="deal-contract-standard-terms-link"]::after {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: 100%;
  block-size: 100%;
  min-inline-size: var(--size-touch-target-min);
  min-block-size: var(--size-touch-target-min);
  transform: translate(-50%, -50%);
  /* Over its own neighbours, and no higher. An absolutely positioned pseudo paints above normal flow but LOSES
     to a positioned sibling that comes after it, which is how .post-card__meta and .post-card__header were
     still taking the clicks 14px above and below the author link with the expander already in place (measured,
     not reasoned). This is a local z-index inside the component's own stacking context — it does not join
     AGENTS.md's nav/bar ladder, and the expander paints nothing, so the only thing it wins is the tap. */
  z-index: 1;
}

/* A chip's own close button is exempt from the 44px floor above, and must stay exempt — forcing it there
   inflates every niche tag on the profile. It was still an 18x18 target, under WCAG 2.2 AA's own 24x24 (SC
   2.5.8), which nothing exempts it from. 24 is the floor that applies to it, and a 24px disc sits inside the
   chip without changing the chip's height. */
.mud-chip .mud-button-root {
  min-block-size: 24px;
  min-inline-size: 24px;
}

/* design-system.md §4.6j/§7/§8 "Engineering handoff summary": MudRating's FullIconColor only accepts the built-in
   MudBlazor Color enum (no native Gold member) — confirmed via source, not assumed — so the rating badge/star-
   input/reveal-states' Gold fill is this CSS override on the filled star item instead of a Color.Warning
   substitution (wrong hue, collides with the status-reserved Warning role). Shared here (not per-component) since
   this one class "feeds 5 surfaces: deck, matrix, both new profile pages, rating-submit/reveal" (design-system.md
   §7 build-order note) — first consumed by RatingReveal.razor (TASK-110, US-047). */
.spark-rating-gold .mud-rating-item.mud-full {
  color: var(--accent-gold);
}

/* ══ Shared layout helpers (CSS-only, no component) ═══════════════════════════════════════════════════════
   These are global rather than scoped .razor.css on purpose: a table/row/chip strip renders identically on a
   creator screen and an admin screen (only --surface-accent differs), and duplicating that per page is how the
   current drift started. */

/* Wraps a wide table so IT scrolls, never the page — a horizontally scrolling <body> breaks the fixed nav
   shell's clearance rules in app.css. The max-height is what makes the sticky header below actually stick:
   overflow-x:auto already computes overflow-y to auto, so this element (not the page) is the scroll container
   the header sticks to, and without a height cap it just grows and the header scrolls away with the page.
   It is a cap, not a height — short tables still size to their content. */
.spark-table-wrap {
  max-height: min(70vh, 720px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* X'S RAMP, not the old 14px one: the console's tables are read with the same eyes as its rows, so the cell is
   the timeline's 15px/20px body and the column head is its 13px metadata tier. */
.spark-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-family-ui);
  font-size: var(--x-type-body);
  line-height: var(--x-type-body-leading);
  color: var(--color-text-primary);
}

/* Sticky header so the column meaning survives a long scroll. Two things here are load-bearing, not style: the
   opaque background (a transparent sticky header lets rows scroll visibly underneath it), and the inset
   box-shadow standing in for a border-bottom — under `border-collapse: collapse` the cell borders belong to the
   table, not the cell, so a border on a sticky th is left behind when it detaches and the rule disappears. */
/* The uppercase micro-label the head used to carry is GONE — X sets a column head in the same face at its
   metadata size and a medium weight, and letterspaced caps are the one typographic tic that reads as a
   different product on sight. 13px/500 muted, on the row inset the rest of the console uses. */
/* --spark-table-surface is what the table paints ON, and it is a custom property because the same table now sits
   on two different grounds: the admin console's own --color-surface panel, and a Workbench page's --color-bg
   canvas, where an opaque white table read as a floating slab beside lists that had all become hairline rows.
   Custom properties inherit through component boundaries (AGENTS.md), so `.spark-page` re-points it once at the
   root of a Workbench page and `.x-console` puts it back for the console. The sticky head still needs an OPAQUE
   fill or the rows scroll through it — which is exactly why this is a variable rather than `transparent`. */
.spark-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--spark-table-surface, var(--color-surface));
  color: var(--color-text-muted);
  font-size: var(--x-type-meta);
  font-weight: var(--x-weight-medium);
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  white-space: nowrap;
  padding: var(--space-3) var(--x-row-inset);
  box-shadow: inset 0 -1px 0 var(--color-divider);
}

/* No zebra — separation comes from the divider hairline and row height, which stays legible on both canvases
   where a tinted stripe does not. */
.spark-table tbody td {
  height: 52px;
  padding: var(--x-row-block) var(--x-row-inset);
  vertical-align: middle;
  border-bottom: 1px solid var(--color-divider);
}

/* The last row KEEPS its hairline in the console: X's list ends on a rule, not on a fade into the canvas. */
.spark-table tbody tr:last-child td {
  border-bottom: 1px solid var(--color-divider);
}

/* A TOTAL ROW. tfoot cells matched none of the rules above, so a table with a total rendered its most important
   figure with no padding at all — flush against (and clipped by) the window edge on a full-width console. It
   takes the body cell's own geometry plus the bold weight a total earns. */
.spark-table tfoot th,
.spark-table tfoot td {
  padding: var(--x-row-block) var(--x-row-inset);
  vertical-align: middle;
  font-weight: var(--x-weight-bold);
  text-align: left;
}

.spark-table tfoot .num {
  text-align: right;
}

/* The row surface is PLAIN, and that is a deliberate reversal of the earlier hued pass (owner request: "no
   colouring on the columns like highlights and etc"). A data table's job is to be read down a column, and a
   per-row wash plus a leading hue rule turned every scan into a colour-decoding exercise — worse, it spent the
   hue budget on rows, so the one thing that IS a signal (the status pill) had to compete with its own background.
   The background is declared rather than left transparent so the intent is explicit at the shared layer: rows are
   --color-surface, separation is the hairline below, and meaning lives in the status pill and the niche chip,
   which are chips and keep their colour. Nothing in this row is allowed to read a hue token. */
.spark-table tbody tr {
  background: var(--spark-table-surface, var(--color-surface));
  transition: background-color var(--motion-fast) var(--ease-out);
}

/* Neutral, never --surface-accent-soft: hover means "the pointer is here", which is not a semantic state and so
   must not borrow the brand hue. --color-surface-variant is the same neutral step on both canvases. */
.spark-table tbody tr:hover {
  background: var(--color-surface-variant);
}

/* tabular-nums so digits align down the column, which is the actual point of right-aligning them. */
.spark-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Below 720px a table cannot hold its columns, so each row becomes its own card and every cell carries its
   header inline from data-label. The <th> text is dropped rather than hidden because data-label now carries
   it — cells without one are assumed self-describing (the primary name cell). */
@media (max-width: 720px) {
  /* Cards flow with the page here — a nested vertical scroller inside an already-scrolling phone screen just
     hides rows, and there is no column header left to keep sticky. */
  .spark-table-wrap {
    max-height: none;
    overflow: visible;
  }

  .spark-table thead {
    display: none;
  }

  .spark-table,
  .spark-table tbody,
  .spark-table tr,
  .spark-table tbody td {
    display: block;
    width: 100%;
  }

  /* CARDS ARE GONE HERE TOO. A reflowed row is still a ROW: the surface, the console's own inset, and the
     hairline that closes it — no radius, no shadow, no gap between one row and the next. */
  .spark-table tbody tr {
    margin-bottom: 0;
    padding: var(--space-2) var(--x-row-inset);
    background: var(--color-surface);
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid var(--color-divider);
  }

  /* Inside a reflowed row the cells are lines, not rows — so they carry no hairline of their own; the row's
     own rule below is the only one, which is what stops a phone table reading as a stack of striped boxes. */
  .spark-table tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    height: auto;
    /* 32px, not the 48px touch floor: a line of text ("Role  Creator") is nothing to tap, and three of them at 48
       made each person on /admin/users a 220px block at 390. A button in a cell keeps its own 48px floor
       (`.mud-button-root` above), which still sets that line's height. */
    min-height: 2rem;
    padding: var(--space-1) 0;
    text-align: left;
    border-bottom: 0;
    /* A REFLOWED CELL HOLDS A VALUE, AND SOME VALUES ARE ONE UNBREAKABLE TOKEN — an address like
       us047-creator-ef68090b8e814df4855e30b4bddb4cbb@sparkd.local, a reference, a URL. Left alone that token
       ignores normal wrapping, sets the cell's own minimum width, and pushes the console past a 375/390px
       viewport (measured: 473px of document against a 390px window on /admin/users). `anywhere` and not
       `break-word` is the load-bearing half: only `anywhere` also shrinks the MIN-CONTENT size, which is what
       the value span's `min-width: auto` as a flex item is resolved from — `break-word` would wrap the glyphs
       and still leave the row as wide as the token. Wrapping rather than an ellipsis because these cells are
       read to be acted on: a moderator needs the whole address, not its first thirty characters.
       Ordinary prose is untouched — `anywhere` only breaks a word that has nowhere else to break. */
    overflow-wrap: anywhere;
  }

  .spark-table tbody td[data-label]::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--color-text-muted);
    font-size: var(--x-type-meta);
    font-weight: var(--x-weight-medium);
  }
}

/* The list row: circular avatar + two-line text + trailing pill/chevron. __main carries the min-width:0 that
   lets long names actually truncate instead of forcing the trailing element off the row. */
/* --x-row-inset, not --space-4: this is a ROW, and its sibling primitive `.x-row` below already takes the app's
   one row inset. The two were the same 16px until the 2026-09-05 parity pass moved --x-row-inset to the 20px all
   three boards draw, and this one was left behind — so a social-account row and a moderation row, both rows on a
   panel, sat on two different left edges. AGENTS.md's "one inset, everywhere" is the invariant; this is the last
   row primitive that was not keeping it. */
.spark-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 64px;
  padding: var(--space-3) var(--x-row-inset);
  border-bottom: 1px solid var(--color-divider);
  transition: background-color var(--motion-fast) var(--ease-out);
}

.spark-row:last-child {
  border-bottom: 0;
}

.spark-row:hover {
  background: var(--surface-accent-soft);
}

.spark-row__main {
  flex: 1 1 auto;
  min-width: 0;
}

/* ══ THE ADMIN CONSOLE — X's full-width panel treatment ═══════════════════════════════════════════════════
   X gives its analytics and creator tooling the SAME surface it gives the timeline, only wider: a 53px sticky
   column header, a sticky filter bar stuck to its foot, then bare divider-separated rows on the surface. No
   card, no shadow, no radius, no gutter — the hairline IS the separation.

   NO NEW GEOMETRY. Every number below is one of the --x-* measurements read off
   `firstmate/data/analysis/x-home-desktop.png` at the top of this file (53px bar, 16px row inset, 12px row
   block, 15/13/17/20px type, 400/500/700/800 weights). This section only ARRANGES the console out of numbers
   that were already measured, which is what makes it enforceable rather than aspirational.

   Global rather than nine scoped copies, deliberately: nine admin routes render this exact shape, and nine
   scoped copies of one shape is precisely the drift the shared .spark-table/.spark-row helpers above exist to
   stop. AdminConsole.razor is the markup half of the same decision. */

.x-console {
  /* The console IS a --color-surface panel, so its tables paint on that — SparkPage re-points this to the
     Workbench canvas one level up and the console is the exception that puts it back. */
  --spark-table-surface: var(--color-surface);
  display: flex;
  flex-direction: column;
  inline-size: 100%;
  /* Fills the window the way X's column does, MINUS whatever the shell has already taken off — on a phone that
     is the top bar and the bottom pill, which the page reserves as padding, so a flat 100dvh here would add
     exactly that much scroll to every short console. Above 960px the rail is at the left and nothing is
     reserved, so the console is the whole window's height. */
  min-block-size: calc(100dvh - var(--nav-topbar-height) - var(--nav-bottom-clearance));
  box-sizing: border-box;
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-family: var(--font-family-ui);
  font-size: var(--x-type-body);
  line-height: var(--x-type-body-leading);
}

/* THE STICKY COLUMN HEADER. Translucent so the rows visibly pass under it — X's, and the reason the blur is
   here rather than an opaque fill. It sticks at 0 wherever the admin shell is a LEFT rail (≥960px); below that
   the same shell is a fixed top band plus a destination strip, so the header sticks under BOTH of them or it
   would slide beneath the chrome. The two bands are the shell's own tokens, so this follows it for free. */
.x-console__header {
  /* Stickiness, the z-index and the hide-on-scroll behaviour are `.x-sticky-header`'s (this file's own block at
     the foot); this header wears that class and declares only WHERE it sticks — below the phone's nav bars. */
  --x-sticky-offset: var(--nav-topbar-height);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-block-size: var(--x-bar-height);
  padding-inline: var(--x-row-inset);
  background: color-mix(in srgb, var(--color-surface) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-block-end: 1px solid var(--color-divider);
}

/* White-panel fix, shared across every persona: light-mode panels read as solid, not a translucent window onto
   the canvas (the captain's most-repeated review note, applied at the token layer so it reaches every console
   header without a per-persona edit). Dark's glass chrome is unchanged — confirmed liked as-is. */
:root[data-theme="light"] .x-console__header {
  background: var(--color-surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.x-console__titles {
  flex: 1 1 auto;
  min-inline-size: 0;
}

/* 17px/600 — the column-header tier. Not the old --type-page-title clamp: the console header is a BAR, and a
   28px title in a 53px bar is a different product's header.

   THE WEIGHT IS 600, NOT 800 (firstmate ruling, 2026-09-05, on the admin parity audit's cross-persona item 3).
   All three approved prototypes draw their column header at `.t-h3` — 600 — and the shared ColumnHeader the
   creator/marketer surfaces use has been brought to 600 in the same round. 800 was X's own measurement, and
   keeping it here alone would leave the admin console's header the heaviest header in the product. Literal
   rather than a token because this ramp has no 600 step (`--x-weight-medium` 500, `-bold` 700, `-heavy` 800)
   and inventing one for a single declaration is a token nobody else would ever reach for. */
.x-console__title {
  margin: 0;
  font-family: var(--font-family-ui);
  font-size: var(--x-type-header);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--sp-text-accent);
  overflow-wrap: anywhere;
}

/* X's second line under a column header ("N posts"): 13px, muted, never louder than the title. */
.x-console__meta {
  margin: 1px 0 0;
  font-size: var(--x-type-meta);
  font-weight: var(--x-weight-body);
  line-height: 1.25;
  color: var(--color-text-muted);
}

.x-console__actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* THE STICKY FILTER BAR. Tabs, a search field, a status strip — whatever narrows the list below. It sticks to
   the HEADER'S foot rather than to the window, so both survive a long scroll: that is X's behaviour on every
   list surface it has, and it is why the offset is the header's own height added to the shell's. */
.x-console__filters {
  position: sticky;
  inset-block-start: calc(var(--nav-topbar-height) + var(--x-bar-height));
  z-index: 19;
  background: color-mix(in srgb, var(--color-surface) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-block-end: 1px solid var(--color-divider);
}

:root[data-theme="light"] .x-console__filters {
  background: var(--color-surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* The console's rows sit flush under the sticky filter bar and that is the board — X's list surface opens on a
   row, not on a band of canvas — so this element has no block-start inset and must not grow one. Its FOOT is a
   different question: --space-9 (48px) was inherited from admin's own mobile clearance in app.css and is 16px
   more air under the last row than the eleven Workbench routes and every timeline route leave under theirs
   (--space-7, measured). One number for one job. */
.x-console__body {
  flex: 1 1 auto;
  min-inline-size: 0;
  padding-block-end: var(--space-7);
}

@media (min-width: 960px) {
  .x-console {
    min-block-size: 100dvh;
  }

  /* THE PANEL'S MIDDLE SECTION ON AN ADMIN ROUTE. At this width the console header IS the band between the
     rail's lockup and the window's trailing edge (TopBar.razor), and the band became a panel on 2026-09-07 —
     captain: "can the top heading bar be a panel and also introduce bottom padding and margin". Same ground as
     the rails' and the sidebar's own top 56px, and the same bottom margin, so an admin route's bar and a
     creator route's bar are one bar.

     THE SELECTOR IS STATED TWICE on purpose: `:root[data-theme="light"] .x-console__header` above is (0,3,0)
     and a media query adds no specificity, so a bare `.x-console__header` here would lose the background
     outright in light mode however late it appears. The light branch is restated to outrank it; the bare one
     carries dark. */
  :root[data-theme="light"] .x-console__header,
  .x-console__header {
    --x-sticky-offset: 0px;
    background: var(--nav-topbar-surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    margin-block-end: var(--nav-topbar-gap);
  }

  /* The filter bar sticks directly under the header, so it takes the header's height PLUS the panel's gap or it
     would slide up into the margin the line above just opened. */
  .x-console__filters {
    inset-block-start: calc(var(--x-bar-height) + var(--nav-topbar-gap));
  }
}

/* A search field inside the filter bar takes X's pill, full width of the bar's inset. MudBlazor renders its own
   root, which no scoped stylesheet can reach — which is why this lives here with the rest of the shared layer. */
.x-console__search {
  padding: var(--space-2) var(--x-row-inset);
}

.x-console__search .mud-input-control,
.x-console__search .mud-input.mud-input-outlined {
  font-family: var(--font-family-ui);
  font-size: var(--x-type-body);
}

.x-console__search .mud-input-outlined .mud-input-outlined-border {
  border-radius: var(--radius-full);
}

/* CONTROLS IN THE CONSOLE take X's pill: fully rounded, the body size at the bold weight, no letterspaced caps
   and no shadow — X's buttons are flat shapes, and a raised Material button is the single loudest tell that a
   screen is not X's. MudBlazor renders its own root, which no scoped stylesheet can ever reach (the scope
   attribute rides authored elements only), so this lives here with the rest of the shared layer.
   The 44px minimum block-size the global `.mud-button-root` rule already sets is deliberately NOT undone. */
.x-console .mud-button-root {
  border-radius: var(--radius-full);
  font-family: var(--font-family-ui);
  font-size: var(--x-type-body);
  font-weight: var(--x-weight-bold);
  line-height: var(--x-type-body-leading);
  text-transform: none;
  letter-spacing: 0;
  box-shadow: none;
}

.x-console .mud-button-root:hover {
  box-shadow: none;
}

/* AN EXPLICIT RING, because MudBlazor's own focus indicator on an icon button is a faint tinted overlay drawn by
   a pseudo-element — legible with a mouse in hand, not legible as the ONLY signal to someone tabbing a
   twenty-row queue. Every console control that can take focus paints the same 2px ring in the same token, so a
   keyboard walk through the rail, the tabs, the table and the row overflows never loses its place. */
.x-console .mud-button-root:focus-visible,
.x-console .mud-input-slot:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
  box-shadow: none;
}

/* A field in the console — a reason note, a search box — takes X's rounded rect and the console's own type.
   Same reachability reason as the buttons above. */
.x-console .mud-input-control,
.x-console .mud-input-label {
  font-family: var(--font-family-ui);
  font-size: var(--x-type-body);
}

.x-console .mud-input-outlined .mud-input-outlined-border {
  border-radius: var(--x-panel-radius);
}

/* A CONSOLE SECTION. A 17px/600 section head over the rows it heads, with a hairline separating one section from
   the last. `+` rather than a border on every block so the console never opens on a stray rule.

   17px/600, NOT X's 20px/800 (admin fidelity pass, 2026-09-16). All three approved prototypes — creator, marketer
   and admin — draw a body section head at `.t-h3` (600 17px/1.3), the same tier ruling 3 already put on
   `.x-console__title`; 800 left every admin section head heavier than the column header above it. Only admin
   markup uses this class, so no creator or marketer surface moves. */
.x-block + .x-block {
  border-block-start: 1px solid var(--color-divider);
}

.x-section {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--x-row-inset) var(--space-2);
}

.x-section__title {
  margin: 0;
  font-family: var(--font-family-ui);
  font-size: var(--x-type-header);
  font-weight: 600;
  line-height: 1.3;
  color: var(--sp-text-accent);
}

.x-section__meta {
  margin: 0;
  font-size: var(--x-type-meta);
  line-height: 1.3;
  color: var(--color-text-muted);
}

/* ── THE FIELD, GLOBALLY ─────────────────────────────────────────────────────────────────────────────────
   design-tokens.md §7.1: 48px tall (--control-height), --radius-control, a 1.5px --color-divider hairline going
   to a 2px accent border on focus — every approved board's `.field input`. It was X's field (56px at a 4px
   radius, --x-field-height/--x-field-radius): the visual polish pass measured 56px on every form in the product
   and settled the contradiction for the boards. AuthShell carries the same shape in its own scoped copy.

   THE HEIGHT IS A HEIGHT, NOT A FLOOR, for a single-line field. MudBlazor's outlined <input> carries
   `padding: 18.5px 14px` around its line, so a min-height below that content does nothing; the field takes
   the height and the input gives up its block padding (the .mud-input box centres its line). A textarea keeps
   its own growth — `:has(> input)` is what tells the two apart. The resting label moves up with it: MudBlazor
   parks it at translate(14px, 20px), the centre of ITS 56px field.

   SPECIFICITY IS LOAD-BEARING (the same trap AuthShell's own comment records). MudBlazor's rule is
   `.mud-input.mud-input-outlined .mud-input-outlined-border` — THREE classes. Anything shorter loses. These
   selectors match it exactly and win on cascade order, because App.razor links this file after MudBlazor.min.css.

   Scoped to `.spark-page`, `.spark-dialog` and every `.mud-dialog` (seven dialogs — the social account form, the
   campaign editor, the paywall, both uploaders — never carried .spark-dialog and kept 56px pills) on purpose: the nav shells' own search box and the composer draw
   their own field shapes and are not forms. */
.spark-page .mud-input.mud-input-outlined,
.spark-dialog .mud-input.mud-input-outlined,
.mud-dialog .mud-input.mud-input-outlined {
  border-radius: var(--radius-control);
}

.spark-page .mud-input.mud-input-outlined:has(> input),
.spark-dialog .mud-input.mud-input-outlined:has(> input),
.mud-dialog .mud-input.mud-input-outlined:has(> input) {
  height: var(--control-height);
}

.spark-page .mud-input.mud-input-outlined > input.mud-input-root-outlined,
.spark-dialog .mud-input.mud-input-outlined > input.mud-input-root-outlined,
.mud-dialog .mud-input.mud-input-outlined > input.mud-input-root-outlined {
  padding-block: 0;
}

.spark-page .mud-input-label-outlined:not(.mud-input-label-margin-dense),
.spark-dialog .mud-input-label-outlined:not(.mud-input-label-margin-dense),
.mud-dialog .mud-input-label-outlined:not(.mud-input-label-margin-dense) {
  transform: translate(14px, 15px) scale(1);
}

.spark-page .mud-input.mud-input-outlined .mud-input-outlined-border,
.spark-dialog .mud-input.mud-input-outlined .mud-input-outlined-border,
.mud-dialog .mud-input.mud-input-outlined .mud-input-outlined-border {
  border-radius: var(--radius-control);
  border-width: 1.5px;
  border-color: var(--color-divider);
  transition: border-color var(--motion-fast) var(--ease-out);
}

.spark-page .mud-input.mud-input-outlined:hover .mud-input-outlined-border,
.spark-dialog .mud-input.mud-input-outlined:hover .mud-input-outlined-border,
.mud-dialog .mud-input.mud-input-outlined:hover .mud-input-outlined-border {
  border-color: var(--color-text-secondary);
}

.spark-page .mud-input.mud-input-outlined:focus-within .mud-input-outlined-border,
.spark-dialog .mud-input.mud-input-outlined:focus-within .mud-input-outlined-border,
.mud-dialog .mud-input.mud-input-outlined:focus-within .mud-input-outlined-border {
  border-width: var(--x-field-border-focus);
  border-color: var(--surface-accent);
}

.spark-page .mud-input.mud-input-outlined .mud-input-slot,
.spark-dialog .mud-input.mud-input-outlined .mud-input-slot,
.mud-dialog .mud-input.mud-input-outlined .mud-input-slot {
  font-family: var(--font-family-ui);
  /* 15px, the boards' `.field input` — X's 17px reading size overset a field beside its 13px label. */
  font-size: var(--x-type-body);
}

/* Inline, beside the field it belongs to — never collected at the top of the form. MudBlazor already tints this
   with --mud-palette-error when the field is invalid, so the hue is never the only carrier. 13px is the floor. */
.spark-page .mud-input-helper-text,
.spark-dialog .mud-input-helper-text,
.mud-dialog .mud-input-helper-text {
  margin-top: var(--space-2);
  font-family: var(--font-family-ui);
  font-size: var(--x-type-meta);
  line-height: 1.4;
}

/* ── THE METRIC ROW ──────────────────────────────────────────────────────────────────────────────────────
   X states a number as a LABEL AND A VALUE, stacked, on the surface — never as a bordered tile with a coloured
   top rule. The hue that makes the funnel scannable survives as a 6px leading dot on the label: categorical
   colour reduced to a marker, which is X's idiom for it, while the semantic pass/miss signal stays where it
   was — in the trend line's own ink, the only thing here allowed to read a --status-* token.

   auto-fit/minmax is what fits the whole 28-day funnel on one fold: six metrics land on one row at 1440 and
   reflow to two and then one as the window narrows, with no per-breakpoint column count to maintain. */
.x-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--space-5) var(--space-6);
  margin: 0;
  padding: var(--space-4) var(--x-row-inset) var(--space-5);
}

.x-metric {
  margin: 0;
  min-inline-size: 0;
}

.x-metric__label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--x-type-meta);
  font-weight: var(--x-weight-medium);
  line-height: 1.3;
  color: var(--color-text-muted);
}

/* Reads --niche-on, which the shared .hue-N scope classes re-point — so the rotation is the ratified one and
   dark mode comes free. It is never the only carrier of anything: the label beside it says what the metric is,
   and the dot is decorative to a screen reader. */
.x-metric__marker {
  flex: none;
  inline-size: 6px;
  block-size: 6px;
  border-radius: var(--radius-full);
  background: var(--niche-on);
}

.x-metric__value {
  margin: var(--space-1) 0 0;
  font-size: var(--x-type-lead);
  font-weight: var(--x-weight-heavy);
  line-height: 1.2;
  color: var(--sp-text-accent);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.x-metric__value--quiet {
  color: var(--color-text-muted);
}

.x-metric__note {
  margin: 2px 0 0;
  font-size: var(--x-type-meta);
  line-height: 1.35;
  color: var(--color-text-muted);
}

/* Icon AND text, never colour or an arrow alone. The icon inherits the line's ink so the whole reading is one
   semantic token rather than two competing ones. */
.x-metric__trend {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: var(--space-1) 0 0;
  font-size: var(--x-type-meta);
  font-weight: var(--x-weight-bold);
  line-height: 1.3;
}

.x-metric__trend--pass {
  color: var(--status-success-on);
}

.x-metric__trend--miss {
  color: var(--status-error-on);
}

.x-metric__trend .mud-icon-root {
  inline-size: 1rem;
  block-size: 1rem;
  font-size: 1rem;
}

/* ── THE ROW ─────────────────────────────────────────────────────────────────────────────────────────────
   X's list row, at the timeline's own geometry: 16px inline inset, 12px block, a hairline underneath, and a
   neutral hover fill. Never a card, never a gap, never a radius. */
.x-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.x-row {
  display: flex;
  align-items: flex-start;
  gap: var(--x-avatar-gap);
  padding: var(--x-row-block) var(--x-row-inset);
  border-block-end: 1px solid var(--color-divider);
  transition: background-color var(--motion-press) var(--ease-standard);
}

.x-row:hover {
  background: var(--color-surface-variant);
}

.x-row__lead {
  flex: none;
  display: grid;
  place-items: center;
  inline-size: var(--x-avatar);
  block-size: var(--x-avatar);
  border-radius: var(--radius-full);
  background: var(--color-surface-variant);
  color: var(--color-text-secondary);
  font-size: var(--x-type-meta);
  font-weight: var(--x-weight-bold);
}

.x-row__main {
  flex: 1 1 auto;
  min-inline-size: 0;
}

.x-row__title {
  margin: 0;
  font-size: var(--x-type-body);
  font-weight: var(--x-weight-bold);
  line-height: var(--x-type-body-leading);
  color: var(--color-text-primary);
  overflow-wrap: anywhere;
}

.x-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 2px 0 0;
  font-size: var(--x-type-meta);
  line-height: 1.35;
  color: var(--color-text-muted);
}

/* A quoted report body — the moderator's actual evidence. X renders quoted content as a hairline-bordered embed
   with a modest radius and no shadow (its quote-post card), which is the one place a border survives. */
.x-row__quote {
  margin: var(--space-2) 0 0;
  /* A MEASURE, not the full console width: quoted evidence is prose and is read as prose, and a 1000px line of
     it is unreadable no matter how wide the surface is. X's quote embed is capped the same way. */
  max-inline-size: 68ch;
  padding: var(--space-3);
  border: 1px solid var(--color-divider);
  border-radius: var(--x-panel-radius);
  font-size: var(--x-type-body);
  line-height: var(--x-type-body-leading);
  color: var(--color-text-primary);
  overflow-wrap: anywhere;
}

.x-row__actions {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}

/* On a phone a row's actions drop under its words (the moderation queue's own rule, now every console row's):
   beside a wrapping summary they squeezed the words into a column a few letters wide. */
@media (max-width: 599.98px) {
  .x-row {
    flex-wrap: wrap;
  }

  .x-row__actions {
    flex: 1 1 100%;
    justify-content: flex-start;
  }
}

/* ── STATES, IN THE COLUMN ───────────────────────────────────────────────────────────────────────────────
   An empty, loading or failed console is still the console — inset by the row's own padding, closed by the
   row's own hairline — rather than a different-looking page. */
.x-state {
  padding: var(--space-6) var(--x-row-inset) var(--space-8);
  border-block-end: 1px solid var(--color-divider);
}

/* X'S EMPTY STATE IS WORDS. SparkEmpty is built for the middle of a card — a 280px floor, a centred medallion
   and centred type — and inside a full-width console that renders as a 360px-tall badge in an ocean of canvas.
   X states the emptiness at the top of the column, left-aligned, in the same type as everything else, and
   offers the action that fills it. Three classes deep deliberately: SparkEmpty's own scoped rules are
   (0,2,0) and load AFTER this file, so a two-class override here would lose the tie by stylesheet order. */
.x-console .x-state .spark-empty {
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  gap: var(--space-2);
  min-block-size: 0;
  padding: 0;
}

.x-console .x-state .spark-empty__medallion {
  display: none;
}

.x-console .x-state .spark-empty__title {
  font-family: var(--font-family-ui);
  font-size: var(--x-type-lead);
  font-weight: var(--x-weight-heavy);
  line-height: 1.3;
}

.x-console .x-state .spark-empty__body {
  font-size: var(--x-type-body);
  line-height: var(--x-type-body-leading);
  max-inline-size: 60ch;
}

.x-alert {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-3) var(--x-row-inset);
  font-size: var(--x-type-body);
  line-height: var(--x-type-body-leading);
  color: var(--status-error-on);
}

.x-alert--inline {
  padding-inline: 0;
}

/* The confirm block a destructive action opens in place — reason capture, then the two ways out. It is tinted
   with the error token's soft fill so it reads as consequential without becoming a card. */
.x-confirm {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: var(--space-3) 0 0;
  padding: var(--space-4);
  border: 1px solid var(--color-divider);
  border-radius: var(--x-panel-radius);
  background: var(--status-error-soft);
}

.x-confirm__title {
  margin: 0;
  font-size: var(--x-type-body);
  font-weight: var(--x-weight-bold);
  line-height: var(--x-type-body-leading);
  color: var(--color-text-primary);
}

.x-confirm__body {
  margin: 0;
  font-size: var(--x-type-meta);
  line-height: 1.45;
  color: var(--color-text-secondary);
}

.x-confirm__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ── THE MEDIA GRID ──────────────────────────────────────────────────────────────────────────────────────
   The one grid in the console, and X's own: its profile media tab is tiles separated by a hairline gap, not by
   a gutter. The 1px `gap` over a divider-coloured background IS that hairline — which is why there is no border
   on the tile itself. */
.x-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
  border-block-end: 1px solid var(--color-divider);
}

/* THE HAIRLINE IS THE TILE'S OWN, not a coloured gap behind the grid. The gap trick paints every EMPTY track in
   the last row as a solid block of divider colour — a 240px slab of dead canvas beside the last three reports,
   screenshot-confirmed. Drawing the rule on the tile means a track with no tile in it draws nothing at all.
   Only the trailing edges, so two neighbours share one hairline rather than stacking two. */
.x-tile {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-surface);
  border-inline-end: 1px solid var(--color-divider);
  border-block-end: 1px solid var(--color-divider);
  transition: background-color var(--motion-press) var(--ease-standard);
}

.x-tile:hover {
  background: var(--color-surface-variant);
}

/* The keyboard cursor. `inset` so a tile taking focus never adds a pixel and never reflows the grid under the
   moderator's hands. */
.x-tile:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--color-focus-ring);
}

.x-tile__media {
  inline-size: 100%;
  aspect-ratio: 4 / 3;
  /* Capped as well as ratio'd: a lone tile in a wide console would otherwise be a half-window-tall photograph. */
  max-block-size: var(--x-media-max-height);
  object-fit: cover;
  border-radius: var(--x-media-radius);
  background: var(--color-surface-variant);
  color: var(--color-text-muted);
  font-size: var(--x-type-meta);
}

/* Pill filter/segmented strip. Wraps on desktop; on mobile it becomes one swipeable line instead, since a
   wrapped filter row pushes the content below it off the first screen. */
.spark-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

@media (max-width: 720px) {
  .spark-chip-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding-bottom: var(--space-1);
  }

  .spark-chip-row::-webkit-scrollbar {
    display: none;
  }
}

/* Loading placeholder. The highlight stop is mixed from the accent rather than a fixed grey so the sweep is
   lighter and warmer than its base on BOTH canvases (a fixed white highlight inverts to a dark smear on the
   Espresso surface). The global prefers-reduced-motion rule already stills it. */
.spark-skeleton {
  border-radius: var(--radius-control);
  background-image: linear-gradient(
    90deg,
    var(--color-surface-variant) 25%,
    color-mix(in srgb, var(--surface-accent) 14%, var(--color-surface-variant)) 50%,
    var(--color-surface-variant) 75%
  );
  background-size: 300% 100%;
  animation: spark-skeleton-sweep var(--motion-ambient) var(--ease-standard) infinite;
}

@keyframes spark-skeleton-sweep {
  from { background-position: 150% 0; }
  to   { background-position: -150% 0; }
}

/* Page/card entrance. transform+opacity only (both compositor-only, so a long list of these does not drop
   frames); `both` holds the end state so nothing flickers back after the run. Stagger a grid by setting
   animation-delay per item at the call site. */
.spark-enter {
  animation: spark-enter var(--motion-base) var(--ease-out) both;
}

@keyframes spark-enter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* Autofilled fields. Chrome paints its own pale-blue fill over ANY background declaration on an autofilled
   input, so every returning user saw off-palette lavender boxes on sign-in (screenshot-confirmed). The fill is
   only reachable via an inset box-shadow spread, and the text via -webkit-text-fill-color — the usual
   `background` property is ignored here by design. `transition-delay` on a property Chrome does not repaint is
   the standard way to stop the fill flashing back in on focus.
   Deliberately global (not per-form): it applies to every input the app will ever render, and the values are
   token reads, so it follows light/dark automatically. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: inset 0 0 0 1000px var(--color-surface-variant);
  box-shadow: inset 0 0 0 1000px var(--color-surface-variant);
  -webkit-text-fill-color: var(--color-text-primary);
  caret-color: var(--color-text-primary);
  transition: background-color 600000s 0s, color 600000s 0s;
}

/* Theme toggle. Sits in the account cluster in every shell, so it inherits the surrounding ink rather than
   carrying an accent of its own — a control that switches the theme should not also be the loudest thing in the
   bar. It is a LABELLED button now, not a bare glyph (ThemeToggle.razor's own remarks say why), so the selector
   is `.mud-button-root`; the three shells' own account-cluster rules already reach that class, which is exactly
   what lets this control take each cluster's shape without a new rule in any of them. */
.spark-theme-toggle.mud-button-root {
  color: var(--color-text-secondary);
  border-radius: var(--radius-full);
  text-transform: none;
  letter-spacing: 0;
  transition: background-color var(--motion-base) var(--ease-out), color var(--motion-base) var(--ease-out);
}

.spark-theme-toggle.mud-button-root:hover {
  background: var(--color-surface-variant);
  color: var(--color-text-primary);
}

/* MudBlazor's own focus indicator here is a faint overlay; a person tabbing the rail needs the same 2px ring
   every other control in the shell paints. */
.spark-theme-toggle.mud-button-root:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

/* ── VIEW TRANSITIONS ───────────────────────────────────────────────────────────────────────────────────────
   Tapping a grid tile should feel like the TILE OPENING into the viewer, not an unrelated overlay appearing.
   `js/motion.js` stamps `view-transition-name: spark-post-media` on the tile that was tapped and then on the
   viewer's media once it has rendered, and the browser morphs one box into the other by itself — there is no
   library and no keyframe here doing it, only these two names and the UA's own default cross-fade.

   FEATURE-DETECTED IN JS, NOT HERE. A browser without `document.startViewTransition` never gets a name stamped
   on anything and falls back to PostViewer's own straight fade, so nothing below can break it: an unknown
   `::view-transition-*` selector is simply dropped, and `view-transition-name` on an element is inert.

   The durations are the family's own. `root` is what carries a full-page change; the named group is the tile
   morph, and it gets --motion-slow because it travels the furthest of anything in the app. The reduced-motion
   block above stills all of them, and motion.js refuses to start a transition at all under that preference. */
::view-transition-group(root) {
  animation-duration: var(--motion-base);
  animation-timing-function: var(--ease-out);
}

::view-transition-group(spark-post-media) {
  animation-duration: var(--motion-slow);
  animation-timing-function: var(--ease-out);
}

/* The media is an opaque photo morphing into a bigger opaque photo — cross-fading the two snapshots ON TOP of
   that morph just makes the middle of the move look dirty. The new frame is faded in over the old one instead,
   which is what reads as ONE object growing rather than two pictures dissolving. */
::view-transition-old(spark-post-media) {
  animation: none;
  opacity: 0;
}

::view-transition-new(spark-post-media) {
  animation-duration: var(--motion-slow);
  animation-timing-function: var(--ease-out);
}

/* ── THE STICKY COLUMN HEADER'S SCROLL BEHAVIOUR ─────────────────────────────────────────────────────────────
   X hides a column header as you scroll DOWN and brings it back the moment you scroll UP — on a phone, where
   the header is a real fraction of the screen. On a mouse it stays put, because there is no screen height to
   reclaim and a bar that flickered under a scroll wheel would be worse than one that never moved.

   GLOBAL, and keyed off an attribute rather than owned by a component, for one reason: the surfaces that need
   it are not one component. The feed's header is a TAB STRIP, a profile's and a post's is `ColumnHeader`, the
   admin console draws its own, and a conversation draws another. They share a class, not markup.

   `js/nav.js` stamps `data-scroll-dir` on <html>; it is absent until the reader has actually scrolled, so the
   header is simply present on arrival rather than animating in from nowhere.

   TRANSFORM ONLY, never `top` or `height`: the UI/UX bar's rule, and the only way this is free to composite.
   The header keeps its space in the flow either way — it is `position: sticky`, so nothing below it reflows
   when it slides, and no content is ever obscured. */
.x-sticky-header {
  position: sticky;

  /* The offset is a custom property so a surface that sticks BELOW something else (the admin console below the
     nav bars, a tab strip below its own column header) declares its own number instead of fighting this rule on
     specificity — this block is appended at the end of the file, so a plain `inset-block-start` here would
     silently outrank every one of them. */
  inset-block-start: var(--x-sticky-offset, 0px);
  z-index: 20;
  transition: transform var(--motion-base) var(--ease-standard);
}

@media (max-width: 959.98px) {
  html[data-scroll-dir="down"] .x-sticky-header {
    transform: translate3d(0, -100%, 0);
  }
}

/* A header that is hidden must not still be a tab stop — a keyboard reader would land on a control that is off
   screen. Focus inside it brings it straight back, which is also how a reader tabbing UP the page gets it. */
.x-sticky-header:focus-within {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  /* The header still hides and returns — that is a layout behaviour a phone genuinely needs, not decoration —
     but it does so instantly. The global reduce block already collapses the duration; this states the intent
     next to the rule so a future pass does not "restore" an animation here. */
  .x-sticky-header {
    transition: none;
  }
}

/* ── THE TOAST ───────────────────────────────────────────────────────────────────────────────────────────────
   X's toast: a single rounded pill, bottom-centre, four seconds, with the UNDO action in the accent beside the
   sentence. Position and duration are C# (SparkdMotion.Configure — a toast's timings are the only moving thing
   in this product that cannot read a token and has to be told); the SHAPE is here.

   Global rather than scoped, because MudSnackbarProvider renders outside every component's own scope — the same
   reason `.spark-shortcuts` lives in app.css. Selectors are two classes deep deliberately: MudBlazor's own
   `.mud-snackbar` rules are one, and a tie would be settled by stylesheet order rather than by intent. */

.mud-snackbar.mud-alert-filled-normal,
.mud-snackbar.mud-alert-filled-success,
.mud-snackbar.mud-alert-filled-info,
.mud-snackbar.mud-alert-filled-warning,
.mud-snackbar.mud-alert-filled-error {
  border-radius: var(--radius-full);
  box-shadow: 0 8px 28px -12px rgb(0 0 0 / 40%);
  font-family: var(--font-family-ui);
  font-size: var(--x-type-body);
  font-weight: var(--x-weight-medium);
  line-height: var(--x-type-body-leading);
}

/* Sparkd's ink, both themes, through the two tokens that already flip together — never MudBlazor's palette and
   never a hex. The ERROR toast keeps its own semantic fill: a revert that failed has to read as a failure. */
.mud-snackbar.mud-alert-filled-normal,
.mud-snackbar.mud-alert-filled-success,
.mud-snackbar.mud-alert-filled-info {
  background: var(--color-text-primary);
  color: var(--color-surface);
}

/* X's action: the same weight as the sentence, in the accent, with real space from it. It is a real <button>,
   so the focus ring is the browser's own and is deliberately not removed. */
.mud-snackbar .mud-snackbar-action-button {
  margin-inline-start: var(--space-3);
  font-family: var(--font-family-ui);
  font-size: var(--x-type-body);
  font-weight: var(--x-weight-bold);
  color: var(--surface-accent);
  text-transform: none;
}

/* The UI/UX bar's 44px minimum: an Undo has four seconds to be hit, so it is the one control in the product
   where a small target would actually cost somebody the action. */
@media (pointer: coarse) {
  .mud-snackbar .mud-snackbar-action-button {
    min-block-size: 44px;
  }
}

/* ── VISUALLY HIDDEN ─────────────────────────────────────────────────────────────────────────────────────────
   Present to a screen reader, absent to a pointer. There were half a dozen private copies of this recipe in
   component stylesheets before the X pass; the reason it is global now is that PAGE HEADINGS need it: X's
   column header is a 17px bar, not a page title, so several surfaces have no visible <h1> at all — and a page
   with no <h1> gives `FocusOnNavigate` (Routes.razor) nothing to move focus to on navigation, and a screen
   reader nothing to announce as the page.

   `clip-path` rather than the old `clip` rectangle, and never `display: none` or `visibility: hidden` — both of
   those take the element out of the accessibility tree too, which is the one thing this must not do. */
.spark-sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}


/* THE MESSAGES SURFACE IS ONE PANE AT EVERY WIDTH — the route decides which one. `/matches` is the
   conversation list filling the content column; `/matches/{id}/chat` is the thread filling it, with the header's
   own back arrow as the pop.

   IT WAS TWO PANES SIDE BY SIDE, and that is the decided fix. The list (--messages-list-width, 387px), the
   thread and the deal card all shared the 600px content column, so at 1440 the thread computed to ~178px: the
   deal card wrapped one or two words per line and its own state heading overprinted the reference line. The
   captain-approved deal board shows the thread ALONE in the column with no adjacent list, which is also what
   the phone already did — this block simply stops treating that as a small-screen concession. The list is not
   lost: it is one back arrow away, and the sidebar beside the thread keeps carrying deal context.

   THE SAME BLOCK SERVES BOTH ROUTES. `/matches` renders the list plus the empty pane; `/matches/{id}/chat`
   renders the list plus the thread — two different .razor files, which is exactly why this block is GLOBAL and
   not scoped to either. Blazor CSS isolation stamps a scope attribute only on elements authored in the same
   file, so a copy in MatchesList.razor.css matched nothing on the chat route and the two panes stacked. That is
   AGENTS.md's "scoped CSS across component boundaries" trap; it cost a browser pass to see.

   The height is `100dvh` minus nothing: SparkPage FullBleed gives a bleed page the bare nav footprint, and the
   nav clearance is a padding on the shell-level sibling — so this element's own box already starts below it. */

.messages {
  display: grid;
  grid-template-columns: minmax(0, 1fr);

  /* The same arithmetic the chat room's own shell has always used, moved up one level so BOTH panes get it: the
     window less exactly what app.css's bleed clearance reserves for this role — the phone top bar plus the
     bottom pill below 960px, and the page's own bottom breathing room above it, where there is no top bar.
     100dvh, not vh, so a phone's collapsing browser chrome cannot leave the composer under the fold. */
  block-size: calc(100dvh - var(--nav-topbar-height) - var(--nav-bottom-clearance));
  min-block-size: 420px;
  overflow: hidden;
  background: var(--color-surface);
}

/* ABOVE THE PHONE BREAKPOINT THIS SURFACE IS THE WINDOW. Every bleed page gets 48px of bottom breathing room
   from app.css, and on a page that scrolls nobody ever sees it — but a two-pane inbox is a FIXED height, so that
   clearance sat under it for the life of the screen as a band of page canvas with a hairline over it, which
   reads as the surface having been cut off. The negative margin gives it back and the surface runs to the
   window's edge, which is where X's messages surface ends.

   Deliberately NOT below 960px: down there the same clearance is the bottom nav pill's own space, and pulling
   into it would put the composer under the pill. */
/* THE SIDEBAR'S OWN CLEARANCE used to live here — `.messages` reserved it itself, because a `position: fixed`
   sidebar reserves no space in flow and would otherwise paint over the thread. It is app.css's job now: with the
   full-width shell every timeline route carries `padding-right: var(--shell-sidebar-width)`, so the reservation
   is made once for the whole family rather than by each surface that noticed the problem. Reserving it twice
   would squeeze the chat pane by exactly one sidebar. */

@media (min-width: 960px) {
  .messages {
    block-size: 100dvh;
    /* THE SAME REGION ITS SIBLINGS TAKE (fill-the-width ruling). This surface briefly carried the column
       ceiling `.feed`/`.cycles` did; with that retired it is back to what it always was — the whole region
       between the rail and the sidebar — and it gets there the same way they do, by taking 100% of it and
       centring nothing. */
    inline-size: 100%;
    /* NO `border-inline` HERE (captain, 2026-09-05: "2 borders on the middle section"). Flush against a
       rail that already paints a trailing hairline and a sidebar that already paints a leading one, this
       column's own pair would be the SECOND line at each boundary. The edges are still drawn — by the
       neighbours, once each, which is the boards' own scheme. See app.css's outer-margin block. */
    /* Exactly what app.css's own ≥960px clearance reserves below the page — --space-7 since the spacing pass
       equalised the panel's top and bottom padding (it was --space-9). The two must stay the same number: pull
       less and a band of panel sits under this surface, pull more and the composer goes past the window. */
    margin-block-end: calc(var(--space-7) * -1);
  }
}

.messages__list {
  display: flex;
  min-inline-size: 0;
  min-block-size: 0;
}

.messages__pane {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
  min-block-size: 0;
}



/* ── THE PANE THIS ROUTE IS NOT ABOUT ────────────────────────────────────────────────────────────────────────
   On `/matches/{id}/chat` the list steps out of the way entirely (`--behind`); MatchesList.razor.css does the
   mirror of this for its own empty pane. No media query: this is the surface's shape at every width now — see
   the grid's own note above. Global for the same reason the grid is: the two halves are two different .razor
   files, so a scoped copy would match neither. */
.messages__list--behind {
  display: none;
}

/* ── The deal dialog ────────────────────────────────────────────────────────────────────────────────────────
   It is the longest dialog in the product — terms, the fee breakdown, the negotiation behind them, and on the
   compose view a whole form — so it is the one that needs a ceiling and its own scroll. Without them the
   composer ran straight off the bottom of the window with no way to reach the send button.
   Lives here rather than in DealDialog.razor.css because MudBlazor renders the dialog root, and scoped CSS
   never reaches a child component's own markup (see the Dialogs section's note above). */
.deal-dialog.mud-dialog {
  max-height: 88dvh;
}

.deal-dialog .mud-dialog-content {
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ── ...and at phone width ──────────────────────────────────────────────────────────────────────────────────
   DealDialog wears the .spark-dialog frame above; this is the one thing it needs beyond it. On a phone the
   deal dialog is a BOTTOM SHEET rather than a card floating in the middle of the thread with the conversation
   showing round its edges — it is opened by a thumb, it is scrolled by a thumb, and it can be long (terms,
   the fee breakdown, the rounds behind this one). Same reason this lives here rather than in
   DealDialog.razor.css: MudBlazor renders the dialog root, and scoped CSS never reaches a child component's
   own markup (see the Dialogs section's own note). */
@media (max-width: 599.98px) {
  .deal-dialog.mud-dialog {
    margin: 0;
    max-width: 100%;
    width: 100%;
    align-self: flex-end;
    max-height: 92dvh;
    border-start-start-radius: var(--radius-card);
    border-start-end-radius: var(--radius-card);
    border-end-start-radius: 0;
    border-end-end-radius: 0;
  }

  .deal-dialog .mud-dialog-content {
    max-height: 72dvh;
  }
}


/* ══ ONE UI SYSTEM: the KISS pieces (redesign M1, 2026-10-22) ═══════════════════════════════════════════════════
   The pop-up, the main button, choice chips, plus/minus and the screen-reader-only utility. They live HERE, not in
   each component's scoped sheet, for two reasons: the sheet's frame is MudBlazor-rendered (scoped CSS never reaches
   it — see "Dialogs" above), and the chips are drawn by two components (SparkChoiceChips, SparkCountChips) that must
   look like one thing. Who it is for decides every number: people who read a little, on small older phones, so the
   floor is 48px (--size-touch-target-min), the main button 52px, body text 16px, and nothing says anything by colour
   alone. */

/* Words a screen reader needs and the eye does not ("Step 1 of 2"). */
.visually-hidden {
  position: absolute !important;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── The sheet ─────────────────────────────────────────────────────────────────────────────────────────────
   Captain, 2026-10-24: "increase the size of the modals to be bigger on big screens and on mobile screens can it be
   full screen". Below 600px every pop-up is the whole screen: the title row stays at the top, the buttons stay at
   the bottom, and only the middle scrolls, clear of the notch and the home bar. From 600px it is a box in the middle,
   680px wide — a 616px reading measure once its 32px insets are off, about 75 characters — and `.spark-sheet--wide`
   (the Find detail's pictures, a results import, the links list) is 880px. Both stop 24px short of the window and
   at 88dvh, then scroll inside themselves. It was a 400px box from 960px and a bottom sheet below that. */
.spark-sheet.mud-dialog {
  position: relative;
  inline-size: calc(100% - 2 * var(--space-6));
  max-inline-size: 680px;
  border-radius: var(--radius-panel);
  background: var(--color-surface);
  background-image: var(--gloss-top-edge);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-block-size: 88dvh;
}

.spark-sheet--wide.mud-dialog {
  max-inline-size: 880px;
}

.spark-sheet .mud-dialog-title {
  padding: var(--space-4) var(--space-5) 0 var(--space-7);
}

/* Grows to fill a full-screen sheet, so the buttons sit at the very bottom however short the inside is. */
.spark-sheet .mud-dialog-content {
  flex: 1 1 auto;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-block-size: 0;
  overflow: hidden;
}

/* Two rows (captain, 2026-10-24): Back and Close on a quiet row of their own, then the title across the whole
   width. Beside Close, a four-word title wrapped to four lines in a 230px column. The bar ends --space-3 from the
   edge rather than --space-5 because the Close button's own padding supplies the rest — its WORD lines up with
   the body's inset. */
.spark-sheet__bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "tools close"
    "head  head";
  align-items: center;
  position: relative;
}

.spark-sheet__head {
  grid-area: head;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-inline-size: 0;
  padding-inline-end: var(--space-2);
}

.spark-sheet__leading {
  display: inline-flex;
  flex: none;
}

.spark-sheet__heading {
  flex: 1;
  min-inline-size: 0;
}

.spark-sheet__title {
  margin: 0;
  font-family: var(--font-family-ui);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
  overflow-wrap: anywhere;
  color: var(--color-text-primary);
}

.spark-sheet__subtitle {
  margin: var(--space-1) 0 0;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--color-text-secondary);
}

.spark-sheet__close.mud-button-root,
.spark-sheet__back.mud-button-root {
  flex: none;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  font-weight: 600;
  text-transform: none;
  padding-inline: var(--space-3);
  border-radius: var(--radius-full);
}

.spark-sheet__close.mud-button-root {
  grid-area: close;
  justify-self: end;
}

.spark-sheet__back.mud-button-root {
  grid-area: tools;
  justify-self: start;
  margin-inline-start: calc(-1 * var(--space-3));
}

.spark-sheet__steps {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
}

.spark-sheet__dot {
  inline-size: 8px;
  block-size: 8px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-text-secondary);
  box-sizing: border-box;
}

/* Now is filled AND wider, so the step is not told by colour alone. */
.spark-sheet__dot--now {
  inline-size: 20px;
  background: var(--accent-ember);
  border-color: var(--accent-ember);
}

.spark-sheet__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-4) var(--space-7) var(--space-6);
  overflow-y: auto;
  min-block-size: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text-primary);
}

.spark-sheet__foot {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-7) var(--space-6);
  border-block-start: 1px solid var(--color-divider);
  background: var(--color-surface);
}

/* A labelled block inside a sheet: "You pay", "What do you want?", "Ready by". */
.spark-sheet__section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.spark-sheet__label {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.spark-sheet__note {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.spark-sheet__error {
  margin: 0;
  padding: var(--space-3);
  border-radius: var(--radius-control);
  background: var(--status-error-soft);
  color: var(--status-error-on);
  font-weight: 600;
}

.spark-confirm__body {
  margin: 0;
}

/* ── What a sheet (or a page) is about, at a glance ─────────────────────────────────────────────────────────
   The HERO is the one number the reader decides on — an offer's price — set large, with a quiet line under it.
   FACTS are two or three short dated things side by side (Answer by · Due), each a small label over its value.
   TERMS are the longer label/value list, one hairline between rows. All three are plain type on the surface:
   no tile, no tint (AGENTS.md, "Nothing paints a tinted surface to say something"). */
.spark-hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.spark-hero__figure {
  font-family: var(--font-family-ui);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-primary);
}

.spark-hero__note {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.spark-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: var(--space-3) var(--space-4);
  margin: 0;
  padding-block: var(--space-3);
  border-block: 1px solid var(--color-divider);
}

.spark-facts dt,
.spark-terms dt {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-text-secondary);
}

.spark-facts dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.spark-terms {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.spark-terms > div {
  display: grid;
  grid-template-columns: minmax(6.5rem, 38%) minmax(0, 1fr);
  gap: var(--space-3);
  padding-block: var(--space-3);
  border-block-start: 1px solid var(--color-divider);
}

.spark-terms > div:first-child {
  border-block-start: 0;
  padding-block-start: 0;
}

.spark-terms dt {
  font-size: 0.9375rem;
  line-height: 1.5;
}

.spark-terms dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* A link that is there if wanted and never competes with the buttons: "Read all the rules". */
.spark-quiet-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-block-size: var(--size-touch-target-min);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-decoration: underline;
  text-decoration-color: var(--color-border-default);
  text-underline-offset: 3px;
}

.spark-quiet-link:hover,
.spark-quiet-link:focus-visible {
  color: var(--color-text-link);
  text-decoration-color: currentColor;
}

@media (max-width: 599.98px) {
  /* The whole screen. `!important` on the container because MudBlazor writes its alignment inline from
     DialogOptions (as the Feed sheet found). */
  .mud-dialog-container:has(.spark-sheet) {
    align-items: stretch !important;
  }

  .spark-sheet.mud-dialog,
  .spark-sheet--wide.mud-dialog {
    margin: 0;
    inline-size: 100%;
    max-inline-size: 100%;
    block-size: 100dvh;
    max-block-size: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }

  /* The title row is the sheet's top bar: under the notch, with a hairline once the middle scrolls beneath it. */
  .spark-sheet .mud-dialog-title {
    padding: calc(var(--space-2) + env(safe-area-inset-top, 0px)) var(--space-3) var(--space-3) var(--space-5);
    border-block-end: 1px solid var(--color-divider);
  }

  .spark-sheet__title {
    font-size: 1.25rem;
  }

  .spark-sheet__body {
    padding: var(--space-5) var(--space-5) var(--space-6);
  }

  .spark-sheet__foot {
    padding: var(--space-3) var(--space-5) calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
  }
}

/* ── The main button ───────────────────────────────────────────────────────────────────────────────────────
   One per screen or pop-up, filled Ember with a white word and an icon, 52px, full width. Pair it with
   .spark-button-gradient (which brings the fill AND its label colour). */
.spark-main-button.mud-button-root {
  min-block-size: var(--size-main-button);
  inline-size: 100%;
  font-size: 1rem;
  font-weight: 700;
  text-transform: none;
}

/* Second (outline) and quiet (word) buttons in a sheet: 48px, full width, never filled. */
.spark-second-button.mud-button-root {
  min-block-size: var(--size-touch-target-min);
  inline-size: 100%;
  font-weight: 600;
  text-transform: none;
}

/* ── Choice chips ──────────────────────────────────────────────────────────────────────────────────────────── */
.spark-choice-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.spark-choice-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-block-size: var(--size-touch-target-min);
  padding: var(--space-2) var(--space-4);
  border: 1.5px solid var(--color-border-default);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-text-primary);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-align: start;
}

.spark-choice-chip:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.spark-choice-chip--on {
  border-color: var(--accent-ember);
  background: color-mix(in srgb, var(--accent-ember) 12%, var(--color-surface));
  color: var(--color-text-link);
}

.spark-choice-chip:disabled {
  cursor: default;
  opacity: 0.6;
}

.spark-choice-chip__words {
  display: flex;
  flex-direction: column;
}

.spark-choice-chip__hint {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.spark-count-chips {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.spark-count-chips__item {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.spark-count-chips__row {
  display: inline-flex;
  align-items: center;
}

/* ── Plus / minus ──────────────────────────────────────────────────────────────────────────────────────────── */
.spark-stepper {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.spark-stepper__button {
  display: inline-grid;
  flex: none; /* the − and + keep 48px; the number gives way on a 320px phone */
  place-items: center;
  inline-size: var(--size-touch-target-min);
  block-size: var(--size-touch-target-min);
  border: 1.5px solid var(--color-border-default);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-text-primary);
  cursor: pointer;
}

.spark-stepper__button:disabled {
  opacity: 0.4;
  cursor: default;
}

.spark-stepper__button:focus-visible,
.spark-stepper__input:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.spark-stepper__value {
  min-inline-size: 2ch;
  text-align: center;
  font-size: 1.125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.spark-stepper__field {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-1);
  min-inline-size: 0;
}

.spark-stepper__prefix {
  font-weight: 700;
}

.spark-stepper__input {
  inline-size: 7ch;
  min-inline-size: 0;
  min-block-size: var(--size-touch-target-min);
  border: none;
  border-block-end: 2px solid var(--color-border-default);
  background: transparent;
  color: var(--color-text-primary);
  font: inherit;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* The price: the biggest thing in the offer pop-up, "the price big and first". */
.spark-stepper--large {
  justify-content: space-between;
  inline-size: 100%;
}

.spark-stepper--large .spark-stepper__field,
.spark-stepper--large .spark-stepper__value,
.spark-stepper--large .spark-stepper__input {
  font-size: 2rem;
}

.spark-stepper--large .spark-stepper__input {
  inline-size: 6ch;
}

/* ── The tracker ─────────────────────────────────────────────────────────────────────────────────────────────
   Five plates on one line, joined by a rule that is filled up to "now". Each step takes an equal share of the width
   so the five fit a 360px phone with their words under them. */
.spark-tracker {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
}

.spark-tracker__step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  text-align: center;
}

/* The joining rule, drawn from this plate's centre back to the previous one's. */
.spark-tracker__step + .spark-tracker__step::before {
  content: "";
  position: absolute;
  inset-block-start: 19px;
  inset-inline-end: 50%;
  inline-size: 100%;
  block-size: 3px;
  background: var(--color-border-default);
  z-index: 0;
}

.spark-tracker__step--done + .spark-tracker__step::before {
  background: var(--accent-ember);
}

.spark-tracker__plate {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border-default);
  background: var(--color-surface);
  color: var(--color-text-secondary);
}

.spark-tracker__step--done .spark-tracker__plate {
  border-color: var(--accent-ember);
  background: var(--accent-ember);
  color: var(--on-fill);
}

.spark-tracker__step--now .spark-tracker__plate {
  border-color: var(--accent-ember);
  background: color-mix(in srgb, var(--accent-ember) 14%, var(--color-surface));
  color: var(--color-text-link);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-ember) 18%, transparent);
}

.spark-tracker__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.spark-tracker__step--now .spark-tracker__label {
  font-weight: 700;
  color: var(--color-text-primary);
}

.spark-tracker__step--done .spark-tracker__label {
  color: var(--color-text-primary);
}

/* Under 360 a fifth of the column is ~57px and "Work" ran into "Checked" at 13px. */
@media (max-width: 359.98px) {
  .spark-tracker__label {
    font-size: 0.75rem;
  }
}


/* ══ ONE UI SYSTEM: the list row (redesign N2–N4, 2026-10-22) ═══════════════════════════════════════════════════
   One row for every KISS list — Me, Today, Deals, the people who want a campaign. A picture, a bold line and a
   short line, then (optionally) a status chip and one button. Global rather than scoped because four pages draw it
   and they must look like one thing (the same reason the chips above live here). Rows sit inside one card; the
   card is the content's surface (nothing bare on the canvas), the hairline is the separation.

   Small phones: the words take what is left after the picture, and the chip + button wrap onto their own line
   under the words rather than squeezing them — a 320px screen keeps every word and every 48px target. */
.spark-rows {
  list-style: none;
  margin: 0;
  padding: 0 var(--space-4);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-whisper);
}

.spark-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  min-block-size: 64px;
  padding-block: var(--space-3);
  border-block-end: 1px solid var(--color-border-subtle);
}

/* The older list row above (social accounts, a profile's metrics) shares this class name and carries its own
   --x-row-inset and a hover tint. Inside the card the card's padding IS the inset, so those leaked in as a second
   20px on each side — the words sat 20px right of their own hairline and a 390px phone wrapped "Sign the deal with
   Demo Marketer's Organization" to three lines — and the tint lit up rows that are not one link. */
.spark-rows > .spark-row {
  padding-inline: 0;
}

.spark-rows > .spark-row:hover {
  background: none;
}

.spark-row:last-child {
  border-block-end: 0;
}

/* A whole row that goes somewhere (Me): the link IS the row, at least 48px tall. */
.spark-row__link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1 1 100%;
  min-inline-size: 0;
  min-block-size: var(--size-touch-target-min);
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius-control);
}

.spark-row__link:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.spark-row__link > .spark-row__chevron {
  margin-inline-start: auto;
  color: var(--color-text-secondary);
}

/* The picture: an icon on a soft plate, or a face (MediaImage brings its own frame). */
.spark-row__plate {
  flex: none;
  display: inline-grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  border-radius: var(--radius-full);
  background: var(--surface-accent-soft, var(--color-surface-variant));
  color: var(--color-text-link);
}

.spark-row__words {
  flex: 1 1 10rem;
  min-inline-size: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spark-row__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text-primary);
  overflow-wrap: anywhere;
}

.spark-row__line {
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--color-text-secondary);
  overflow-wrap: anywhere;
}

/* The chip and the one button. Pushed to the end of the line; when there is no room, they wrap under the words,
   indented past the picture so the row still reads as one thing. */
.spark-row__end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-inline-start: auto;
}

.spark-row__end .mud-button-root {
  min-block-size: var(--size-touch-target-min);
  text-transform: none;
  font-weight: 700;
}

/* A page's own section heading ("Your turn", "Your campaigns"): plain, bold, never a shouted overline. */
.spark-section-title {
  margin: var(--space-6) 0 var(--space-2);
  font-family: var(--font-family-ui);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--sp-text-accent);
}

/* The colour-on-type utilities: one class per semantic ink, for the places a component has no stylesheet of its
   own to say it in (a MudText, a figure inside a page's markup). Prefer the token in a component's own CSS. */
.sp-text-accent { color: var(--sp-text-accent); }
.sp-text-money { color: var(--sp-text-money); font-variant-numeric: tabular-nums; }
.sp-text-success { color: var(--sp-text-success); }
.sp-text-warning { color: var(--sp-text-warning); }
.sp-text-danger { color: var(--sp-text-danger); }
.sp-text-info { color: var(--sp-text-info); }
/* A big headline figure (count-up numbers): bright brand Ember, large and heavy enough for AA-large. */
.sp-figure {
  font-family: var(--font-family-ui);
  font-size: var(--x-type-masthead);
  font-weight: 800;
  line-height: 1.1;
  color: var(--sp-text-display);
  font-variant-numeric: tabular-nums;
}

.spark-section-title:first-child {
  margin-block-start: 0;
}

/* A page's one main button, not inside a pop-up: full width on a phone, a comfortable fixed width from 600px. */
.spark-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-block: var(--space-4);
}

.spark-page-actions > .mud-button-root {
  flex: 1 1 14rem;
  min-block-size: var(--size-touch-target-min);
  text-transform: none;
  font-weight: 700;
}

.spark-page-actions > .spark-main-button.mud-button-root {
  min-block-size: var(--size-main-button);
}


/* ══ ONE UI SYSTEM: the pick card (KISS Phase 5, S1) ═════════════════════════════════════════════════════════════
   One choice out of a few, each needing more than a chip can hold: a plan (price + what it gives), a Spark pack
   (how many + what that buys + price), a way past a wall, a way to pay. A real <button role="radio"> in a
   role="radiogroup"; the pop-up's ONE main button is labelled by the choice ("Buy 550 Sparks: R49"), so the price is
   on the button before the tap — never added after it. Global, not scoped: the plan sheet, the packs sheet, the
   wall and checkout all draw it, and they must look like one thing (the same reason .spark-row lives here).
   Selected is a border AND a tick with the word "Picked" for a screen reader — never colour alone. */
.spark-picks {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Top-aligned: a plan card's picture floated to the middle of its feature list and its price sat on a different
   line from its name. Now the plate, the name and the price share the first line. */
.spark-pick {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  inline-size: 100%;
  min-inline-size: 0;
  min-block-size: var(--size-touch-target-min);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-text-primary);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.spark-pick:hover {
  border-color: var(--color-border-default);
}

.spark-pick:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.spark-pick[aria-checked="true"],
.spark-pick[aria-checked="true"]:hover {
  border-color: var(--surface-accent);
  box-shadow: 0 0 0 3px var(--surface-accent-soft);
}

.spark-pick__mark {
  flex: none;
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  border-radius: var(--radius-full);
  background: var(--surface-accent-soft, var(--color-surface-variant));
  color: var(--surface-accent);
  font-size: 20px;
}

.spark-pick__words {
  flex: 1 1 8rem;
  min-inline-size: 0;
  display: grid;
  gap: 2px;
}

.spark-pick__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.spark-pick__line {
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--color-text-secondary);
  overflow-wrap: anywhere;
}

.spark-pick__ticks {
  margin: var(--space-1) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--color-text-secondary);
}

.spark-pick__ticks li::before {
  content: "✓ ";
  color: var(--status-success);
  font-weight: 700;
}

.spark-pick__end {
  flex: none;
  align-self: flex-start;
  display: grid;
  justify-items: end;
  gap: var(--space-1);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.spark-pick__tick {
  color: var(--surface-accent);
  visibility: hidden;
}

.spark-pick[aria-checked="true"] .spark-pick__tick {
  visibility: visible;
}

/* A short fact under a pop-up's choices ("Prices include VAT."): quiet, never small print you have to squint at. */
.spark-fine {
  margin: var(--space-3) 0 0;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--color-text-secondary);
}

/* KISS S3: an admin row's answers — worded buttons side by side, wrapping under the row on a phone, each 48px. */
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}

.admin-actions > .mud-button-root {
  min-block-size: var(--size-touch-target-min);
  text-transform: none;
  font-weight: 700;
}

/* ── A file picker's own button ───────────────────────────────────────────────────────────────────────────────
   Where a page shows the browser's file input (the results import), its "Choose File" button was the browser's
   grey default beside the app's own buttons. It takes the outline (second) button's look and the 48px floor. */
input[type="file"] {
  font-family: var(--font-family-ui);
  color: var(--color-text-secondary);
}

input[type="file"]::file-selector-button {
  min-block-size: var(--size-touch-target-min);
  margin-inline-end: var(--space-3);
  padding-inline: var(--space-4);
  border: 1px solid var(--surface-accent, var(--accent-ember));
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--surface-accent, var(--accent-ember));
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* ── Number fields: no tiny spin arrows ───────────────────────────────────────────────────────────────────────
   A number is typed, or picked with the plus/minus stepper (SparkStepper). The 20px up/down arrows MudBlazor and
   the browser draw on some fields (Revenue in "Add a sign-up or sale", several more) were under the 48px floor
   and showed on some number fields but not others. */
.mud-input-numeric-spin {
  display: none;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ── Help: the tour's ring and the side sheet ──────────────────────────────────────────────────────────────
   Global, not scoped: the ring lands on an element of ANY page (tour.js adds the class), and the side sheet is a
   MudDialog rendered outside the component that declares it (gotchas.md, "::deep cannot reach a child COMPONENT").

   The ring is the keyboard focus ring's own colour, thicker and offset, so "this is the thing" reads the same way
   focus does — never colour alone, it is an outline the shape of the element. Under reduced motion it simply
   appears; otherwise it settles in over --motion-base. */
.help-tour-target {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 4px;
  border-radius: var(--radius-control);
  scroll-margin: var(--space-9);
  transition: outline-offset var(--motion-base);
}

@media (prefers-reduced-motion: reduce) {
  .help-tour-target {
    transition: none;
  }
}

/* The "?" sheet docks to the right from 960px, full height, so the page it explains stays in view beside it.
   Below that it is the house sheet unchanged (the whole screen on a phone). */
@media (min-width: 960px) {
  .spark-sheet--side.mud-dialog {
    align-self: stretch;
    margin-inline-start: auto;
    max-inline-size: 460px;
    block-size: 100dvh;
    max-block-size: 100dvh;
    border-start-end-radius: 0;
    border-end-end-radius: 0;
  }
}

/* A page tour or its "New here?" offer stands aside while ANY pop-up is open (a sign sheet the deal opened by
   itself, a confirm box): it explains the page, and a card floating over a dialog would cover the very job the
   person is doing. The pay pop-up's own tour lives inside that dialog and is not affected. */
body:has(.mud-dialog-container) .help-tour--page,
body:has(.mud-dialog-container) .help-tour--offer {
  display: none;
}
