/*
 * GENERATED by scripts/gen-tokens.mjs from Specs (/api/tokens). DO NOT EDIT.
 * Source of truth: Admin Brand API → Specs. Edit tokens in Admin, sync to
 * Specs, then re-run `npm run gen:tokens`.
 */
:root {
  /* Politogy brand palette */
  --color-race-red-50: #FDECEE;
  --color-race-blue-50: #E6F2FF;
  --color-race-red-100: #FCE0E3;
  --color-race-blue-100: #DCEBFB;
  --color-race-red-200: #F8B6BD;
  --color-race-blue-200: #9EC8F5;
  --color-race-red-300: #EF6671;
  --color-race-blue-300: #4DA3FF;
  --color-race-red-400: #EA4751;
  --color-race-blue-400: #1A89FF;
  --color-race-red-500: #D32F3B;
  --color-race-blue-500: #007BFF;
  --color-race-red-600: #B3242F;
  --color-race-blue-600: #0061CC;
  --color-race-red-700: #9F252E;
  --color-race-blue-700: #004999;
  --color-race-red-800: #660F17;
  --color-race-blue-800: #002A52;
  --color-race-red-900: #39080D;
  --color-race-blue-900: #001124;
  --color-race-red: #D32F3B;
  --color-race-blue: #007BFF;
  --color-tread-yellow: #F2C94C;
  --color-green-flag: #00783B;
  --color-graphite: #2F3136;
  --color-g3: #D7DADF;
  --color-g4: #929599;
  --color-layer-1: #F0F4F7;
  --color-layer-2: #ECEEEF;
  --color-white: #FFFFFF;
  --color-layer-3: #FFFFFF;

  /* Mode palettes */
  --mode-relationship-primary: #D32F3B;
  --mode-relationship-accent: #007BFF;
  --mode-campaign-primary: #D32F3B;
  --mode-campaign-accent: #F2C94C;
  --mode-petition-primary: #007BFF;
  --mode-petition-accent: #F2C94C;

  /* Typography */
  --font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  /* The shared mono font token (Reference/UI-Platform → Typography:
     "Monospace metadata surfaces ... use the shared mono font token, not a
     hand-picked monospace stack"). The Brand API has no mono family of its
     own, so this is the ONE name every mono-context surface in the shell
     consumes (counts, the Debug info modal, the short org ID, build-meta
     rows) — previously scattered across three different, never-defined var
     names (--font-sans, --font-mono, --font-plex-mono), none of which this
     stylesheet emitted, so every one of those surfaces silently fell back to
     a hardcoded stack instead of a token the shell actually controls. */
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  --type-h1-size: 2.25rem;
  --type-h1-weight: 700;
  --type-h1-line-height: 1.25;
  --type-h1-color: #2F3136;
  --type-h2-size: 1.875rem;
  --type-h2-weight: 700;
  --type-h2-line-height: 1.25;
  --type-h2-color: #2F3136;
  --type-h3-size: 1.5rem;
  --type-h3-weight: 600;
  --type-h3-line-height: 1.375;
  --type-h3-color: #2F3136;
  --type-h4-size: 1.25rem;
  --type-h4-weight: 600;
  --type-h4-line-height: 1.375;
  --type-h4-color: #2F3136;
  --type-h5-size: 1.125rem;
  --type-h5-weight: 600;
  --type-h5-line-height: 1.375;
  --type-h5-color: #2F3136;
  --type-h6-size: 1rem;
  --type-h6-weight: 600;
  --type-h6-line-height: 1.5;
  --type-h6-color: #2F3136;
  --type-body-size: 0.875rem;
  --type-body-weight: 400;
  --type-body-line-height: 1.5;
  --type-body-color: #2F3136;
  --type-bodySm-size: 0.75rem;
  --type-bodySm-weight: 400;
  --type-bodySm-line-height: 1.5;
  --type-bodySm-color: #2F3136;
  --type-caption-size: 0.75rem;
  --type-caption-weight: 400;
  --type-caption-line-height: 1.5;
  --type-caption-color: #929599;
  --type-eyebrow-size: 0.75rem;
  --type-eyebrow-weight: 600;
  --type-eyebrow-line-height: 1.5;
  --type-eyebrow-color: #929599;
  --type-mono-size: 0.75rem;
  --type-mono-weight: 400;
  --type-mono-line-height: 1.5;
  --type-mono-color: #929599;

  /* Radii */
  --radius-sm: 0.125rem;
  --radius-base: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.1), 0 2px 4px -2px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.1);
  --shadow-outline: 0 0 0 3px rgba(232, 106, 58, 1);

  /* Surfaces */
  --surface-1: #F0F4F7;
  --surface-2: #ECEEEF;
  --surface-3: #FFFFFF;

  /* Focus ring — Specs race-red (ignore stale orange focus.ringColor) */
  --focus-ring-color: #D32F3B;
  --focus-ring-width: 3px;
  --focus-ring-offset: 0px;

  /* Form-control sizing + colors */
  --form-control-height: 44px;
  --form-control-radius: 5px;
  --form-control-padding: 12px;
  --form-control-font-size: 14px;
  --form-control-border: #CBD5E1;
  --form-control-border-hover: #94A3B8;
  --form-control-focus: #64748B;
  --form-placeholder-color: #9CA3AF;
  --form-value-color: #000000;
  --form-label-bg: #FFFFFF;
  --form-label-top: 0px;
  --form-label-left: 10px;
  --form-label-font-size: 12px;
  --form-label-line-height: 16px;
  --form-label-padding-x: 6px;

  /* Tabs */
  --tab-header-bg: transparent;
  --tab-row-bg: #F0F4F8;
  --tab-content-bg: #F8FAFC;
  /* 36px tall / 40px wide around an 18px glyph — 9px of breathing room on each
     side. The strip is icon-only, so a 44x48 box left the row reading as a
     toolbar rather than a tab strip, and two stacked strips (mode tabs over sub
     tabs) ate ~90px of vertical space before any content (HITL 2026-08-04). */
  --tab-height: 36px;
  --tab-width: 40px;
  --tab-icon-size: 18px;
  --tab-strip-padding-y: 14px;
  --tab-gap: 6px;
  --tab-radius: 12px;
  /* Unselected/disabled NavTabStrip label+icon color. Was --color-g4
     (#929599, the Brand content-neutral gray) — only 2.58-2.76:1 against
     --tab-row-bg/--tab-content-bg/white, below WCAG 2.2 AA 4.5:1 (axe scan
     2026-10-09, 26 violations across the UI). --muted (#5C6B80) is already
     measured at 5.42:1 on the light rail and clears 4.5:1+ on every tab-strip
     surface too, so nav tabs reuse it instead of a new one-off shade. */
  --tab-text-muted: var(--muted, #5C6B80);

  /* Sidebar (nav chrome) */
  --sidebar-width: 236px;
  --sidebar-bg: #FFFFFF;
  --sidebar-border: #E2E8F0;
  --sidebar-brand-logo-height: 24px;
  --sidebar-org-logo-max-height: 34px;
  --sidebar-org-band-height: 70px;
  --sidebar-item-radius: 8px;
  --sidebar-item-padding-x: 16px;
  --sidebar-item-padding-y: 10px;
  --sidebar-item-gap: 2px;
  --sidebar-text: #2F3136;
  /* #929599 was 3.01:1 on --sidebar-bg (#FFFFFF) — below WCAG 2.2 AA 4.5:1
     on every inactive rail row. Darkened to #70737A (same neutral-gray
     hue) to clear 4.75:1. */
  --sidebar-text-muted: #70737A;
  /* Meta footer rows (commit / version / date / author): 10px mono text must
     clear WCAG 2.2 AA 4.5:1 on the light rail. --muted (#5C6B80) is 5.42:1. */
  --sidebar-meta-text: #696D72;
  --sidebar-hover-bg: #2F3136;
  --sidebar-active-text: #FFFFFF;
  --sidebar-scrollbar-thumb: #CBD5E0;

  /* Topbar */
  --topbar-height: 60px;
  --topbar-bg: #FFFFFF;
  --topbar-border: #E2E8F0;
  --topbar-padding-x: 20px;
  --topbar-title-size: 18px;
  --topbar-title-weight: 700;
  --topbar-title-color: #2F3136;
  /* #718096 was 3.63:1 on --panel-elevated (#F0F4F7) — below WCAG 2.2 AA
     4.5:1 (e.g. the account-menu "Roles & Organizations" caption). Darkened
     to clear 4.5:1 on both white and --panel-elevated while keeping the hue. */
  --topbar-breadcrumb-color: #5C6B80;
  --topbar-icon-button-size: 34px;
  --topbar-icon-button-radius: 5px;
  --topbar-icon-gap: 6px;
  --topbar-icon-size: 17px;
  /* Sunken field surface (universal search) — design `--surface-sunken`. */
  --surface-sunken: #F0F4F7;

  /* Shell chrome: brand color ramps (= Specs race-red) */
  --app-color-brand-50: #FDECEE;
  --app-color-brand-100: #FCE0E3;
  --app-color-brand-200: #F8B6BD;
  --app-color-brand-300: #EF6671;
  --app-color-brand-400: #EA4751;
  --app-color-brand-500: #D32F3B;
  --app-color-brand-600: #B3242F;
  --app-color-brand-700: #9F252E;
  --app-color-brand-800: #660F17;
  --app-color-brand-900: #39080D;

  /* Shell chrome: gray ramps */
  --app-color-gray-50: #F7FAFC;
  --app-color-gray-100: #EDF2F7;
  --app-color-gray-200: #E2E8F0;
  --app-color-gray-300: #CBD5E0;
  --app-color-gray-400: #A0AEC0;
  --app-color-gray-500: #718096;
  --app-color-gray-600: #4A5568;
  --app-color-gray-700: #2D3748;
  --app-color-gray-800: #1A202C;
  --app-color-gray-900: #171923;

  /* Shell chrome: fields */
  --app-field-bg: #FFFFFF;
  --app-field-border: #E2E8F0;
  --app-field-border-hover: #A0AEC0;
  --app-field-focus: #D32F3B;
  --app-field-radius: 10px;
  --form-placeholder-font-size: 14px;
  --form-select-icon: #64748B;
  --app-floating-label-bg: #FFFFFF;
  --app-floating-label-top: -9px;
  --app-floating-label-left: 10px;
  --app-floating-label-font-size: 12px;
  --app-floating-label-line-height: 16px;
  --app-floating-label-padding-x: 6px;

  /* Shell chrome: buttons */
  --app-btn-size: 44px;
  --app-btn-radius: 10px;
  --app-btn-font-size: 14px;
  --app-btn-primary-bg: #D32F3B;
  --app-btn-primary-bg-hover: #B3242F;
  --app-btn-primary-fg: #FFFFFF;
  --app-btn-secondary-bg: #FFFFFF;
  --app-btn-secondary-bg-hover: #F8FAFC;
  --app-btn-secondary-fg: #334155;
  --app-btn-secondary-border: #CBD5E1;
  --app-btn-tooltip-bg: #0F172A;
  --app-btn-tooltip-fg: #FFFFFF;

  /* Shell chrome: tabs */
  --app-tab-header-bg: #888888;
  --app-tab-row-bg: #F0F4F8;
  --app-tab-content-bg: #F8FAFC;
  --app-tab-height: 36px;
  --app-tab-icon-size: 18px;
  --app-tab-strip-padding-y: 14px;
  --app-tab-gap: 6px;
  --app-tab-radius: 12px;

  /* Mode-active colors (overwritten by app at mode-switch time) */
  --mode-primary-color: #D32F3B;
  --mode-input-border-color: #D32F3B;
  --mode-input-hover-border-color: #B3242F;
  --mode-input-focus-shadow-color: #D32F3B;

  /* Native chrome semantic layer — shell-owned aliases over the
     canonical tokens above, consumed by the ./native export
     (NavTopBar / NavSidebar / NavTabStrip / NavAppShell). These are the
     full-color names those components reference directly as var(--x);
     the .dark block overrides them with dark values. */
  --background: var(--surface-1);
  --foreground: var(--topbar-title-color);
  --muted: var(--topbar-breadcrumb-color);
  --panel: var(--topbar-bg);
  --panel-elevated: var(--surface-1);
  /* The left bar's own surface. Separate from --panel-elevated (which is
     also used for raised popovers) so the sidebar can be re-skinned on its
     own. NavSidebar reads it directly — when it is missing the left bar
     renders with NO background at all. */
  --nav-surface: var(--surface-1);
  --line: var(--sidebar-border);
  --shadow-soft: var(--shadow-lg);

  /* App-surface aliases — the names feature apps' own CSS uses for
     page/panel/border/text/accent. Emitted HERE so no app has to
     declare them: every app used to define its own fallback palette
     in globals.css and they drifted (surveys' accent was #C8102E
     where every other app was #D32F3B; --tab-content-bg resolved
     #1F1F1F on forms and #161616 on polls). Apps must consume these,
     never redeclare them (HITL 2026-07-23). Both spellings of the
     surface pair are emitted because apps historically used both. */
  --color-bg: var(--surface-2, var(--color-layer-1));
  --color-surface: var(--surface-1, var(--color-layer-3));
  --color-surface-2: var(--color-layer-2);
  /* --color-panel is the CARD surface apps render content on — distinct from
     --color-surface (the page background, aliased to --surface-1 /
     #F0F4F7). It used to alias --color-surface, so every card rendered in
     the muted page-surface tint instead of the Brand "Card" white (Brand
     guideline "Card"). */
  --color-panel: var(--color-layer-3);
  --color-panel-2: var(--color-surface-2);
  /* --color-border is the border apps draw around CONTENT (cards, panels,
     dividers) — it used to alias --line / --sidebar-border, a token scoped
     to the always-dark left rail. On a light card that read as a dark
     border leaking out of the rail's palette. Content borders are the
     neutral Brand G3 ramp step instead. */
  --color-border: var(--color-g3);
  /* --color-text / --color-text-muted used to alias --foreground / --muted —
     the topbar-scoped pair tuned for contrast on the topbar surface
     (--muted is #5C6B80, picked for WCAG AA on the light rail, see above).
     Page CONTENT (table cells, buttons, body copy) wants the Brand neutral
     ramp instead: graphite for text, G4 for muted text/borders — a
     style_diff against design (Surveys, 2026-10-09) measured live muted
     text/borders at #5C6B80 (rgb(88,101,122)) against a design value of
     #929599 (--color-g4, rgb(146,149,153)), the same mis-aliasing this
     comment block already fixed once for --color-border/--color-panel. */
  --color-text: var(--color-graphite);
  --color-text-muted: var(--color-g4);
  --color-muted: var(--color-g4);
  /* The chrome's SEMANTIC accent. Chrome furniture resolves this (or the
     per-Mode override layered over it — see --mode-accent below), never
     --color-race-red directly: that is the PARTY identity colour the
     party-share charts paint Republican with, and using it as a UI accent both
     mis-signals and makes the accent unoverridable. Same value as before. */
  --color-accent: var(--color-race-red);
  --color-accent-hover: var(--color-race-red-600);
  --color-accent-contrast: var(--color-white);
  /* TEXT/background-under-white-text aliases. Chrome furniture that draws
     accent-COLORED TEXT, or white text ON an accent fill, must resolve
     through these — never bare `--color-accent` — because a Mode's brand
     accent (below) is operator-supplied and not guaranteed to clear WCAG AA
     as text or as a white-text background (observed: Petition mode's brand
     green #00a651 measured 2.84:1 as text on a light wash and 3.19:1 under
     white text). Un-mode-scoped chrome keeps the plain accent, which is
     already AA-safe both ways. Light-mode only; dark mode is retired. */
  --color-accent-fg: var(--color-accent);
  --color-accent-bg-safe: var(--color-accent);
  /* ATTENTION / ERROR, as distinct from accent: count badges, low-fuel
     warnings, validation errors. These stay red in EVERY Mode — a green
     "3 unread" badge or a green low-fuel warning is worse than a red one — so
     they must not follow a Mode accent. Same value as before. */
  --chrome-danger: var(--color-race-red);
  /* Credits icon health (UI-Platform → Top bar → Credits; Pricing & Metering
     §7.5): Good is green, Low is yellow, Out is --chrome-danger. The yellow is
     a darker tread-yellow so a 17px stroke stays legible on the light bar. */
  --credits-good: var(--color-green-flag);
  --credits-low: #B7791F;

  /* Nav row hover sweep. Was hardcoded #EA4751 → #D32F3B in native/index.tsx
     (race-red 400 → 500); same two stops, now overridable. */
  --nav-hover-gradient: linear-gradient(
    90deg,
    var(--color-race-red-400) 0%,
    var(--color-race-red-500) 100%
  );

  --skeleton-base: var(--color-surface-2);
  --skeleton-shine: var(--color-layer-1);

  /* Beta banner — a semantic NOTICE, not a chrome surface, so it keeps one
     amber treatment in both themes. It previously fell through to
     --color-accent, which is the brand RED, so the notice read as an error. */
  --beta-banner-bg: #feebc8;
  --beta-banner-text: #1a202c;
  --beta-banner-accent: #dd6b20;

  /* The expanded sub-menu panel and the row hover inside it — one step off
     the left bar so nesting reads. Dark values are pinned by
     Reference/UI-Platform → Styling (#212121 / #2B2B2B). */
  --nav-submenu-bg: #F4F4F4;
  --nav-row-hover: #E8E8E8;
}

/* ---- One accent per Mode ------------------------------------------------
 * Reference/UI-Platform → "Per-mode branding". The chrome stamps
 * `data-politogy-mode` on its root from the app REGISTRY (never an app prop),
 * and the Brand API serves the Mode's values as
 * `[data-politogy-mode="<id>"] { --mode-accent: … }`.
 *
 * The aliases are RE-DECLARED here, on the element that carries the stamp.
 * That placement is load-bearing and easy to get wrong: a custom property is
 * substituted at computed-value time on the element it is declared on, so
 * declaring `--color-accent: var(--mode-accent, …)` at `:root` would freeze it
 * to the `:root` value of `--mode-accent` (unset) and inherit that down — the
 * Mode block would never win. Declared here it resolves against the Mode's own
 * value, and every one of the chrome's existing `var(--color-accent)` reads
 * follows automatically, with no per-component change.
 *
 * A Mode that declares no chrome group leaves `--mode-accent` unset, so every
 * line below falls back to exactly the value it had before 0.47. That is what
 * makes this byte-identical for Relationship and Campaign.
 *
 * `--chrome-danger` is deliberately NOT here: attention and error stay red in
 * every Mode.
 */
[data-politogy-mode] {
  --color-accent: var(--mode-accent, var(--color-race-red));
  --color-accent-hover: var(--mode-accent-strong, var(--color-race-red-600));
  --color-accent-fg: var(--mode-accent, var(--color-race-red));
  --color-accent-bg-safe: var(--mode-accent, var(--color-race-red));
  --nav-hover-gradient: linear-gradient(
    90deg,
    var(--mode-accent-strong, var(--color-race-red-400)) 0%,
    var(--mode-accent, var(--color-race-red-500)) 100%
  );
  /* NOTE — surfaces are deliberately NOT aliased here.
   *
   * An earlier cut of this defined `--nav-row-active-surface:
   * var(--mode-accent-surface, var(--panel-elevated))` in this block and had
   * the nav row read the alias bare. That silently broke every app that is not
   * mode-scoped: this block never matches them, so the alias was unset, and a
   * bare `var()` with no fallback is invalid at computed-value time — the
   * active sub-row's background fell all the way to `transparent`.
   *
   * Hoisting the alias to `:root` does not fix it either: `.dark` below is a
   * separate top-level selector, so a `:root` alias would substitute the LIGHT
   * `--panel-elevated` and inherit that into dark mode.
   *
   * So the Mode SURFACES are read at the point of use, with the pre-0.47 value
   * as an inline fallback — `var(--mode-accent-surface, var(--panel-elevated))`
   * on the row itself. Correct in both themes, scoped and unscoped. Only the
   * FOREGROUND aliases above belong here, because they have a real fallback of
   * their own and every existing `var(--color-accent)` read needs to follow. */
}

/* ---- Petition mode's brand green fails AA as text / under white text -----
 * Petition mode's `--mode-accent` is operator/Brand-API supplied and was
 * observed live at #00a651 — 2.84:1 as text on a light wash
 * (`--mode-accent-surface`) and 3.19:1 under white text on an accent fill,
 * both below WCAG 2.2 AA (4.5:1 for normal text). `--color-accent-fg` /
 * `--color-accent-bg-safe` are pinned here to a fixed, measured-safe dark
 * green (#15803d: 5.02:1 as text on white, 5.02:1 under white text) instead
 * of following the raw brand value, so no org's brand configuration can
 * reintroduce the failure. This selector has the same specificity as
 * `[data-politogy-mode]` above and wins by appearing later in the sheet.
 * Light-mode only; dark mode is retired (no `.dark` counterpart exists). */
[data-politogy-mode="petition"] {
  --color-accent-fg: #15803d;
  --color-accent-bg-safe: #15803d;
}

/* ---- Rail background is a fixed brand color, not a theme ----------------
 * Reference/UI-Platform → Styling: the left rail is ink `#1B1C20` for
 * Relationship and Petition, and `#8F1F2A` for Campaign — always, regardless
 * of light/dark (dark mode is retired) and never a Tailwind/Chakra gray. It
 * is NOT derived from `--mode-accent` (that stays reserved for the active-row
 * highlight and hover gradient above); it is the rail's own surface, so it is
 * keyed directly off the mode id the registry stamps.
 *
 * The Claude Design export for Campaign mode showed a lighter red
 * (`--color-race-red` family) for the rail; the spec's fixed `#8F1F2A` wins
 * per "stop and report the conflict" — noted here, not silently overridden. */
[data-politogy-mode] {
  --sidebar-bg: #1B1C20;
  --sidebar-text: #F5F5F5;
  /* #B5B7BB/#9A9CA0 were tuned against the ink rail only (8.48:1 / 6.19:1)
     and fall to 4.36:1 / 3.19:1 on the Campaign red rail (#8F1F2A) — below
     WCAG 2.2 AA 4.5:1. Lightened so both solid tokens clear 4.5:1 on ink,
     on Campaign's rail red, and on its raised card (#A12430). */
  --sidebar-text-muted: #CDCFD2;
  --sidebar-meta-text: #CDCFD2;
  --sidebar-hover-bg: #2A2B30;
  /* Selected mode button: the Mode accent, graphite for Relationship. */
  --sidebar-mode-selected-bg: var(--mode-accent, #2F3136);
}
/* Specs/Contacts design rail (ink-900 rail): hairlines and type washes are
   white at fixed alphas; cards sit on ink-800. These are NOT mode-scoped —
   the rail is dark in every app and every theme (the first cut put them under
   `[data-politogy-mode]`, which an unscoped app such as Contacts never
   stamps, so its light theme drew the org card in the light panel colour with
   white text and the active row in solid brand red). None of these names is
   defined by the runtime Brand sheet, so `:root` here is authoritative; the
   `.dark` block below does not touch them either. */
:root {
  --sidebar-line: rgba(255, 255, 255, 0.16);
  --border-inverse: rgba(255, 255, 255, 0.16);
  /* rgba(255,255,255,.38) / .5 were 3.55:1 / 5.17:1 on the ink rail but drop
     to 2.45:1 / 3.25:1 on the Campaign rail red (#8F1F2A) and 2.92:1 on its
     raised card (#A12430) — below WCAG 2.2 AA 4.5:1 (nav section eyebrows,
     the user-email/mode caption, the org-id hash). Raised to .72 alpha,
     which clears 4.5:1 against ink, the Campaign rail and its card. */
  --sidebar-eyebrow: rgba(255, 255, 255, 0.72);
  --sidebar-caption: rgba(255, 255, 255, 0.72);
  --sidebar-row-text: rgba(255, 255, 255, 0.66);
  --sidebar-row-hover-bg: rgba(255, 255, 255, 0.05);
  --sidebar-active-bg: rgba(255, 255, 255, 0.09);
  --sidebar-active-text: #FFFFFF;
  /* Left-Navigation §8.1: the active row's 2px inset left marker is WHITE
     (Brand `modes.<mode>.accent`, #FFFFFF for every mode as of v153). It is
     not the Mode's chrome accent: that is the rail's own colour family
     (graphite #2F3136 on the #1B1C20 Relationship rail), so a marker drawn
     in it was invisible (measured 2026-10-12). */
  --sidebar-active-marker: #FFFFFF;
  /* Org card logo band. Brand `sidebar.orgLogoMaxHeight` (70px, generated
     above) is the CAP on the logo, not the band's height: the Left-Navigation
     design draws a 52px band (measured 2026-10-12 against the live 70px band,
     which put every rail row 18px low). Logos still scale to fit inside it. */
  --sidebar-org-band-height: 52px;
  --sidebar-card-bg: #232428;
  --sidebar-avatar-bg: #3B3E44;
  --mode-track-bg: #232428;
  --sidebar-mode-selected-bg: #2F3136;
}

/* Left-Navigation §5/§12: Campaign rail is Deep Race Red, raised wells
   #A12430, inactive row text #F0CFD2, eyebrow #F6DADD. */
[data-politogy-mode="campaign"] {
  --sidebar-bg: #8F1F2A;
  --sidebar-hover-bg: #7A1A23;
  --sidebar-card-bg: #A12430;
  --mode-track-bg: #A12430;
  --sidebar-mode-selected-bg: #B32B38;
  --sidebar-row-text: #F0CFD2;
  --sidebar-eyebrow: #F6DADD;
}



/* ---------------------------------------------------------------------------
   Third-party top-bar widget slots (<TopBarWidgetSlot>, e.g. DevNotes).

   Such a widget ships its OWN launcher button, so it does not carry
   topBarIconButtonClass. These values are topBarIconButtonClass expressed as
   CSS; `!important` is required because the widget's own utility classes and
   inline styles are authored by the third-party package and would otherwise
   win.
--------------------------------------------------------------------------- */
.topbar-widget-slot button {
  position: relative !important;
  height: var(--topbar-icon-button-size, 34px) !important;
  min-height: var(--topbar-icon-button-size, 34px) !important;
  width: var(--topbar-icon-button-size, 34px) !important;
  min-width: var(--topbar-icon-button-size, 34px) !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid transparent !important;
  border-radius: var(--topbar-icon-button-radius, 5px) !important;
  background: transparent !important;
  color: var(--topbar-icon-color, var(--muted)) !important;
}
.topbar-widget-slot button:hover {
  color: var(--topbar-icon-hover-color, var(--foreground)) !important;
  background: var(--topbar-icon-hover-bg, transparent) !important;
}

/* The launcher's own count bubble nests in an inner span around just the glyph.
   Neutralize that so the badge anchors to the 32px trigger like every other
   slot's (UI-Platform "Badge Counters": one universal placement).

   The selector must NOT depend on a class: DevNotes 0.6.x writes that wrapper
   with an INLINE `position: relative` and no class at all, so an earlier
   `span.relative` selector matched nothing and the badge silently kept
   anchoring to the glyph. */
.topbar-widget-slot button > span {
  position: static !important;
}

/* The launcher's badge itself. DevNotes inline-styles it (top:-4, right:-8,
   background:#dc2626, font-weight:700, no height), which is a different bubble
   from TopBarCountBadge. UI-Platform "Badge Counters" allows exactly ONE badge
   definition, so restate every value here — !important because inline styles
   otherwise win. Keep these in lockstep with TopBarCountBadge. */
.topbar-widget-slot button > span > span {
  position: absolute !important;
  top: -5px !important;
  right: -5px !important;
  left: auto !important;
  bottom: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 1rem !important;
  min-height: 1rem !important;
  min-width: 1rem !important;
  width: auto !important;
  padding: 0 0.25rem !important;
  border-radius: 9999px !important;
  background: var(--chrome-danger, #d32f3b) !important;
  color: #fff !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1rem !important;
  box-shadow: none !important;
}

