/*
 * tokens.css — TrackBounty design system tokens (redesign A1)
 *
 * Spec: .claude/reports/arch/redesign_a1_spec_2026-04-30T2144Z.md §1
 *
 * Additive policy: these tokens sit ALONGSIDE base.html's existing :root
 * block. Old tokens (--bg, --bg-card, --accent, --text, ...) stay until each
 * surface migrates to new tokens in its own A2/A3 ship. Final base.html
 * :root cleanup lands after the last surface migrates (mirroring the
 * match_score NULL→DROP cadence in FOLLOWUP-047).
 *
 * Brand: Inter Variable everywhere (taste-skill Inter ban explicitly
 * overridden, see .claude/skills/taste/TRACKBOUNTY_OVERRIDES.md). The PUBLIC
 * site's colours are the white/black/yellow layer at the end of this file
 * (--tb-*, public-website-redesign M3'); the --accent indigo ramp below stays
 * the colour of the authenticated portals until their own redesign.
 */

/* === Self-hosted fonts (replaces Google Fonts CDN — base.html cleanup in Phase 4) === */

@font-face {
  font-family: 'Inter Variable';
  src: url('/static/fonts/Inter-Variable.woff2') format('woff2-variations'),
       url('/static/fonts/Inter-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono Variable';
  src: url('/static/fonts/JetBrainsMono-Variable.woff2') format('woff2-variations'),
       url('/static/fonts/JetBrainsMono-Variable.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* === Surface ramp (4 stops, dark theme) === */
  --surface-0: #07070b;             /* page bg, deepest */
  --surface-1: #0f0f17;             /* card bg default */
  --surface-2: #15151f;             /* elevated card / hover */
  --surface-3: #1d1d2a;             /* popover / sheet */
  --surface-4: #272735;             /* tooltip / topmost */

  /* === Border ramp === */
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-default: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-focus: var(--accent-bright);

  /* === Text === */
  --text-primary: #ecedf2;
  --text-secondary: #9b9eaf;
  /* F-07 (public-website-redesign M1). --text-muted was #62657a, which fails
     WCAG AA on every surface in the ramp: measured 3.51:1 on --surface-0 down to
     2.56:1 on --surface-4, against a 4.5:1 requirement. It is used for body
     copy — step descriptions, FAQ answers, footnotes — not only for decoration,
     and axe-core 4.10.2 reported 31 failing nodes on /for-labels and 27 on
     /trends from this one token.
     #8b90a6 measures 4.65:1 at worst (on the lightest surface, --surface-4) and
     stays visually subordinate to --text-secondary at 5.54:1, so the hierarchy
     the design depends on is unchanged. base.html's legacy :root defines the
     same token and is updated to match — it loads after this file and would
     otherwise win. */
  --text-muted: #8b90a6;
  --text-disabled: #3a3c4a;
  --text-inverse: #07070b;

  /* === Accent: the portals' indigo (public brand colours: --tb-* below) === */
  --accent: #6366f1;
  --accent-bright: #818cf8;
  --accent-dim: rgba(99, 102, 241, 0.15);
  --accent-glow: rgba(99, 102, 241, 0.25);

  /* === Tier palette (v1.1 — differentiated hue families) ===
   * S+  prestige iridescent  (gold → orange → rose, heaviest glow)
   * S   premium amber        (pure warm amber — clearly less prestige than S+)
   * A   violet                (cool premium)
   * B   blue                  (cool standard)
   * C   slate                 (cool neutral)
   * D   ghost outline         (intentional bottom rung — surface tint + dashed
   *                            border + dim text. NOT a missing-data placeholder.)
   *
   * Contrast (WCAG AA bold/UI minimum 3:1):
   * S+ text #190600 on avg-gradient #ff7a30 ≈ 11.8:1   ✓ AAA
   * S  text #1a0f00 on avg-gradient #f6b022 ≈ 10.7:1   ✓ AAA
   * A  text #ffffff on avg-gradient #b56cf9 ≈  4.3:1   ✓ AA-bold
   * B  text #ffffff on avg-gradient #4d97f8 ≈  4.5:1   ✓ AA
   * C  text #ffffff on avg-gradient #7c8aa1 ≈  4.6:1   ✓ AA
   * D  text #aab0c0 on --surface-1 #0f0f17  ≈  6.8:1   ✓ AA
   */
  --tier-splus-bg: linear-gradient(135deg, #ffd700 0%, #ff6b00 50%, #e11d48 100%);
  --tier-splus-text: #190600;
  --tier-splus-glow: 0 0 14px rgba(251, 191, 36, 0.55), 0 0 24px rgba(255, 107, 0, 0.20);

  --tier-s-bg: linear-gradient(135deg, #f59e0b, #fbbf24);
  --tier-s-text: #1a0f00;
  --tier-s-glow: 0 0 8px rgba(251, 191, 36, 0.30);

  --tier-a-bg: linear-gradient(135deg, #a855f7, #c084fc);
  --tier-a-text: #ffffff;
  --tier-a-glow: 0 0 8px rgba(168, 85, 247, 0.30);

  --tier-b-bg: linear-gradient(135deg, #3b82f6, #60a5fa);
  --tier-b-text: #ffffff;
  --tier-b-glow: 0 0 6px rgba(59, 130, 246, 0.25);

  --tier-c-bg: linear-gradient(135deg, #64748b, #94a3b8);
  --tier-c-text: #ffffff;
  --tier-c-glow: 0 0 4px rgba(100, 116, 139, 0.20);

  /* D = intentional ghost. Surface tint + dashed border, NOT transparent → invisible. */
  --tier-d-bg: rgba(148, 163, 184, 0.04);
  --tier-d-border: rgba(148, 163, 184, 0.30);
  --tier-d-text: #aab0c0;
  --tier-d-glow: none;

  /* === State === */
  --state-success: #10b981;
  --state-success-bg: rgba(16, 185, 129, 0.12);
  --state-warning: #f59e0b;
  --state-warning-bg: rgba(245, 158, 11, 0.12);
  --state-error:   #ef4444;
  --state-error-bg:   rgba(239, 68, 68, 0.12);
  --state-info:    var(--accent);
  --state-info-bg: var(--accent-dim);

  /* === Spacing (4px base scale) === */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* === Radii === */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* === Shadows (4 stops, subtle → elevated) === */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.20);
  --shadow-2: 0 2px 8px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.15);
  --shadow-3: 0 8px 24px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.20);
  --shadow-4: 0 24px 64px rgba(0, 0, 0, 0.45), 0 8px 16px rgba(0, 0, 0, 0.30);

  /* === Type scale + family tokens === */
  --font-sans: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono Variable', 'SF Mono', Menlo, monospace;

  --text-xs:   12px;
  --text-sm:   13px;
  --text-base: 14px;
  --text-md:   15px;
  --text-lg:   17px;
  --text-xl:   20px;
  --text-2xl:  24px;
  --text-3xl:  30px;
  --text-4xl:  38px;
  --text-5xl:  48px;

  --leading-tight:   1.15;
  --leading-snug:    1.30;
  --leading-normal:  1.50;
  --leading-relaxed: 1.65;

  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;
  --weight-black:    800;

  /* === Motion === */
  --motion-fast:  150ms;
  --motion-base:  250ms;
  --motion-slow:  400ms;
  --ease-out-expo: cubic-bezier(0.32, 0.72, 0, 1);
  --scroll-debounce: 500ms;

  /* === Density (default desktop = 3 cards-per-row) === */
  --density: 3;
  --density-card-padding: var(--space-5);
  --density-card-gap:     var(--space-4);
  --density-card-min-w:   280px;

  /* === Z-index === */
  --z-base:     0;
  --z-raised:   10;
  --z-sticky:   50;
  --z-popover:  100;
  --z-overlay:  500;
  --z-sheet:    900;
  --z-modal:    1000;
  --z-toast:    9999;

  /* === Glass === */
  --glass-bg: rgba(15, 15, 23, 0.62);
  --glass-blur: blur(16px) saturate(140%);
}

/* === Density override blocks === */

[data-density="2"] {
  --density: 2;
  --density-card-padding: var(--space-6);
  --density-card-gap:     var(--space-5);
  --density-card-min-w:   360px;
}

[data-density="4"] {
  --density: 4;
  --density-card-padding: var(--space-3);
  --density-card-gap:     var(--space-3);
  --density-card-min-w:   220px;
}

/* === Mobile motion budget (30% reduced per DNA #6) ===
 * Combined-query: only applies when user has NO reduced-motion preference.
 * Fixed by A2.5 — previously this block followed the reduced-motion block
 * and overrode it for mobile + reduced-motion users (accessibility regression). */

@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
  :root {
    --motion-fast: 105ms;
    --motion-base: 175ms;
    --motion-slow: 280ms;
  }
}

/* === Reduced-motion override ===
 * Last in source order AND uses simple media query (no `and`) so it always wins
 * for users with reduced-motion preference, regardless of viewport size. */

@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-fast: 0ms;
    --motion-base: 0ms;
    --motion-slow: 0ms;
  }
}

/* === Mobile density auto-collapse (mobile-first per DNA #8) ===
 * Below 768px, density toggle is hidden and grid auto-collapses to fit
 * viewport width regardless of stored density preference.
 */

@media (max-width: 480px) {
  :root {
    --density: 1;
    --density-card-min-w: 100%;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  :root {
    --density: 2;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  :root {
    --density: 3;
  }
}


/* ===========================================================================
 * M1 accessibility and rendering layer — public-website-redesign, spec v2
 * §2.3 / §2.4 / §2.5, findings F-07, F-09 and F-11.
 *
 * Global on purpose. Every rule below is a property of the SITE, not of one
 * page, and the pre-M1 code had each page re-solving (or not solving) the same
 * four problems in its own <style> block.
 * =========================================================================== */

/* --- F-09: scroll reveal becomes an ENHANCEMENT ---------------------------
 *
 * `.reveal { opacity: 0 }` was unconditional, so with scripting off — or before
 * the observer ran, or if it threw — the content was in the DOM and invisible.
 * Scoping the hidden state to `.js` means the page is readable by default and
 * only the browsers that can animate it ever hide it.
 *
 * Page templates still declare their own `.reveal` rules; these come from
 * tokens.css, which base.html loads BEFORE any page <style>, so a page that
 * still says `.reveal { opacity: 0 }` unscoped would win. The `:root:not(.js)`
 * rule below is therefore written to be more specific than a bare `.reveal`
 * and is the backstop that makes the fix hold even on a template M1 does not
 * touch.
 */
:root:not(.js) .reveal,
:root:not(.js) .reveal.visible {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Counters: the server renders the final number as the element's text and JS
 * animates up to it. A browser with no JS keeps the real figure. Nothing here
 * is needed for that — it is noted so nobody "fixes" it back to rendering 0. */

/* --- F-07: reduced motion, honoured site-wide -----------------------------
 *
 * A visitor who has asked their operating system for less motion was getting
 * floating background orbs, a pulsing dot, word-by-word heading reveals, a
 * 50-bar animated waveform, a 2.2-second count-up and 3D card tilt. The guard
 * is `!important` because every one of those animations is declared in a page
 * <style> block that loads after this file.
 *
 * A NEAR-ZERO DURATION, NOT `animation: none`. This distinction matters and is
 * easy to get backwards. Several elements here are INVISIBLE in their declared
 * state and become visible only because an animation with
 * `animation-fill-mode: forwards` moves them — `.bounty-card` is
 * `opacity: 0` plus `animation: cardFadeIn ... forwards`, and the hero words
 * start at `translateY(120%)`, off-screen. `animation: none` reverts each of
 * them to that declared state, so the reduced-motion visitor would get a page
 * with the bounty cards and the headline missing. A 0.01ms animation with the
 * same fill mode lands immediately on the LAST keyframe, which is the visible
 * one. Infinite decorative loops (the background orbs, the pulsing dot, the
 * waveform) have no fill mode and simply settle at their base state, which is
 * the still one — exactly what was asked for.
 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  /* `.reveal` is the exception to the rule above: it is not animation-driven at
     all. Its visibility comes from a class an IntersectionObserver adds, so
     shortening animations does nothing for it and it must be placed at its end
     state directly. The page scripts also skip the observer entirely under
     reduced motion; this is the CSS half of the same guarantee. */
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* --- F-07: one visible focus style for keyboard users --------------------
 *
 * Several surfaces set `outline: none` on focus and replace it with a
 * box-shadow that is invisible against a dark card, and buttons built from
 * <div> had no focus style at all. `:focus-visible` paints for keyboard and
 * assistive navigation only, so a mouse click still leaves no ring.
 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--accent-bright, #818cf8);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- F-11: wide content scrolls in its own box, not the page -------------
 *
 * /trends and the football archive pushed the whole document sideways on a
 * phone, which drags the navigation and the footer with it.
 *
 * DELIBERATELY NOT DONE HERE: `html, body { overflow-x: hidden }`. It is the
 * usual one-line answer and it would have been a regression. Setting overflow
 * on the root makes it a scroll container, and `position: sticky` only sticks
 * to its nearest SCROLLING ancestor — so a global clamp silently un-sticks the
 * sticky headers in base_admin, base_creator, base_label, portal_base,
 * base_wizard, legal_base and the marketplace stylesheets, every one of which
 * inherits this file through base.html. The overflow is fixed at the element
 * that actually overflows instead, on the pages M1 touches.
 *
 * These two utilities are the vocabulary for doing that.
 */
.tb-scroll-x {
  max-width: 100%;
  overflow-x: auto;
  /* Momentum scrolling inside the box on iOS, which otherwise feels broken. */
  -webkit-overflow-scrolling: touch;
}
/* Long unbroken strings — a TikTok handle, a sound URL — are the other overflow
   source: they cannot wrap at a space because they contain none. */
.tb-wrap-anywhere { overflow-wrap: anywhere; word-break: break-word; }

/* --- F-09 / F-07: the server-rendered statistics block ------------------
 *
 * The public stat tiles are plain text rendered by the server, each with its
 * definition available to everyone rather than only on hover. <dl> is the right
 * element: each tile is a term and its value.
 *
 * M1.5 (interim polish §4.1): a card is value · label · one scope line, nothing
 * else. The definitions, splits and dates live in the block's
 * `.tb-stats-about` <details> underneath, still server-rendered text.
 */
.tb-stats {
  display: grid;
  /* auto-fit rather than a fixed column count: the number of tiles depends on
     how many are AVAILABLE, and a hidden tile must not leave a hole. */
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  margin: 0;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  background: var(--border-default, rgba(255, 255, 255, 0.08));
  border: 1px solid var(--border-default, rgba(255, 255, 255, 0.08));
  border-radius: 16px;
  overflow: hidden;
}
.tb-stat {
  /* Column flex so the value can be DRAWN first while the <dt> label stays
     first in the DOM, as a <dl> group requires and a screen reader expects. */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
  background: var(--surface-1, rgba(10, 10, 16, 0.85));
}
.tb-stat-number {
  order: -1;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text, #ecedf2);
  margin: 0 0 6px;
  overflow-wrap: anywhere;
}
.tb-stat-label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text, #ecedf2);
  margin: 0;
}
.tb-stat-scope {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  /* --text-muted is below 4.5:1 on these surfaces; --text-secondary passes. */
  color: var(--text-secondary, #9b9eaf);
}

/* "About these numbers": ONE native disclosure per block. The definitions are
 * real text, never a title attribute — a tooltip is unreachable by keyboard and
 * on touch — and the summary takes the shared :focus-visible ring above. */
.tb-stats-about {
  max-width: 1000px;
  margin: 12px auto 0;
  text-align: left;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary, #9b9eaf);
}
.tb-stats-about > summary {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary, #9b9eaf);
  list-style: none;
}
.tb-stats-about > summary::-webkit-details-marker { display: none; }
.tb-stats-about > summary::before {
  content: "\25B8";
  display: inline-block;
  margin-right: 6px;
  transition: transform 0.2s;
}
.tb-stats-about[open] > summary::before { transform: rotate(90deg); }
.tb-stats-about > summary:hover { color: var(--text, #ecedf2); }
.tb-about-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 28px;
  margin: 12px 0 0;
  padding: 18px 20px;
  border: 1px solid var(--border-default, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  background: var(--surface-1, rgba(10, 10, 16, 0.85));
}
.tb-about-item dt {
  font-weight: 600;
  color: var(--text, #ecedf2);
}
.tb-about-scope { font-weight: 400; color: var(--text-secondary, #9b9eaf); }
.tb-about-item dd { margin: 2px 0 0; }
.tb-stats-fresh {
  margin: 12px 0 0;
  padding: 0 4px;
  font-size: 12px;
}

@media (max-width: 480px) {
  /* Two cards per row on a phone: one column made four cards ~830px tall. */
  .tb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb-stat { padding: 18px 10px; }
  .tb-stat-number { font-size: 30px; }
  .tb-stat-label { font-size: 13px; }
  .tb-about-list { grid-template-columns: 1fr; padding: 14px 16px; }
}

/* --- F-17: the scanner "paused" notice ---------------------------------- */
.tb-paused {
  max-width: 620px;
  margin: 0 auto 20px;
  padding: 14px 18px;
  border: 1px solid #f59e0b;
  border-left-width: 4px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.08);
  color: var(--text, #ecedf2);
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
}

/* --- F-07: the standard visually-hidden utility ---------------------------
 *
 * A heading that is announced but not drawn. `display: none` would hide it from
 * assistive technology too, and a 0x0 box is skipped by some screen readers —
 * the 1px clip-path form below is the one that is reliably announced.
 *
 * Used where a section needs a heading for document structure (a screen-reader
 * user navigates by heading) but the design already makes the grouping obvious.
 */
.tb-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}


/* ===========================================================================
 * M3' public brand layer — public-website-redesign, design v4
 * (.claude/reports/arch/2026-10-01-trackbounty-website-redesign-design-v4.md,
 * foundation restated in its §2; identity on white in v2 §3).
 *
 * White canvas, black Inter type, the logo's own yellow (#FBD700, master
 * class .st2) used ONLY as a fill, a rule, a stroke or the mark — never as
 * text on white, where it measures 1.4:1.
 *
 * WHY A NEW NAMESPACE INSTEAD OF REPAINTING --accent. This file and base.html
 * load on every authenticated portal too, and the portals keep their indigo
 * ramp until their own redesign. Repainting --accent would also turn the
 * current (dark) page bodies into the rejected dark-with-yellow direction and
 * put white text on yellow buttons. So the brand arrives as its own tokens:
 * the shared header and footer consume them now, and the page rebuilds (M4')
 * consume them next. Nothing that exists today reads a --tb-* name.
 *
 * Computed pairs (WCAG 2 relative luminance): ink on paper 19.68:1, ink-2 on
 * paper 11.37:1, ink-3 on paper 5.41:1, ink-3 on tint 4.91:1, ink on tint
 * 17.87:1, ink on bolt 13.89:1, white on ink 19.68:1; bolt on paper is 1.42:1,
 * which is why yellow never carries text. ink-3 is the floor for readable text.
 * =========================================================================== */
:root {
  --tb-paper: #FFFFFF;
  --tb-tint: #F4F4F2;
  --tb-ink: #0B0B0B;
  --tb-ink-2: #3A3A3A;
  --tb-ink-3: #6A6A6A;
  --tb-line: #E4E4E0;
  --tb-line-2: #CFCFC9;
  --tb-bolt: #FBD700;
  --tb-bolt-hi: #FFE23A;
  --tb-on-bolt: #0B0B0B;
  --tb-ease: cubic-bezier(0.32, 0.72, 0, 1);
  /* Header geometry is a token because the mobile menu docks under it. */
  --tb-header-h: 80px;
  --tb-gutter: 24px;
  --tb-container: 1180px;
}

@media (max-width: 767px) {
  :root {
    --tb-header-h: 68px;
    --tb-gutter: 20px;
  }
}

/* ===========================================================================
 * PORTAL WHITE LAYER — shared foundations (trackbounty-portals-program, M-A,
 * 2026-10-13; design mission trackbounty-portals-design-v2: DESIGN_BRIEF_v2.4
 * and MOTION_RULES.md §1 and §9).
 *
 * New custom properties ONLY. Nothing above this line changes, and nothing
 * reads a name below until a portal shell sets the scope class .tb-white
 * (M-B editor, M-D client, M-F wizard; components.css holds the variants).
 * The brand pairs the accepted prototype copies verbatim — --tb-paper,
 * --tb-tint, --tb-ink, --tb-ink-2, --tb-ink-3, --tb-line, --tb-line-2,
 * --tb-bolt, --tb-bolt-hi, --tb-on-bolt and --tb-ease — already exist in the
 * M3' block above with the same values, so they are reused, never redeclared;
 * the design's "surface" and "yellow" names are aliases of them.
 *
 * Computed pairs (WCAG 2 relative luminance): ok on ok-bg 4.66:1, hold on
 * hold-bg 5.87:1, bad on bad-bg 5.91:1, ink-2 on neutral-bg 9.96:1, ink-3 on
 * neutral-bg 4.74:1, ink on bolt 13.89:1 (the badge), white on ink 19.68:1
 * (the toast); on paper: ok 5.07:1, hold 6.25:1, bad 6.57:1.
 * =========================================================================== */
:root {
  /* surfaces and the yellow pair: aliases of the brand layer */
  --tb-surface: var(--tb-paper);
  --tb-yellow: var(--tb-bolt);
  --tb-yellow-ink: var(--tb-on-bolt);
  /* status pairs: the text colour and its own background */
  --tb-ok: #1B7F3B;
  --tb-ok-bg: #EEF8F0;
  --tb-hold: #7A5C00;
  --tb-hold-bg: #FFF8DC;
  --tb-bad: #B42318;
  --tb-bad-bg: #FDF0EE;
  --tb-neutral-bg: #F0F0ED;   /* the default pill and the settled / neutral box */
  --tb-prev: #9A9A94;         /* the previous-period line of the trend charts */
  /* radii (8 / 12 / 16 / pill) and the touch target */
  --tb-radius-sm: 8px;
  --tb-radius-md: 12px;
  --tb-radius-lg: 16px;
  --tb-radius-pill: 999px;
  --tb-target: 44px;
  /* motion: the one easing is --tb-ease above; these are the five durations */
  --tb-m-press: 120ms;
  --tb-m-nav: 160ms;
  --tb-m-expand: 200ms;
  --tb-m-sheet: 250ms;
  --tb-m-pill: 150ms;
  /* the notification bell's badge reads these two; the values are today's dark
     ones, so every dark bell is unchanged, and the .tb-white scope re-points them */
  --tb-badge: #ef4444;
  --tb-badge-ink: #ffffff;
}
/* === end of the PORTAL WHITE LAYER (M-A) === */
