
:is(.bo-root, .bo-app) {
  color-scheme: light;
  /* WHITE cards on a clearly gray page — the card must read as a raised
     object, not a slightly different sheet of the same paper. */
  --page: #f1f2f5;
  --surface-1: #ffffff;
  --surface-2: #f3f4f7;
  --ink: #191c22;
  --ink-2: #4a4f58;
  --muted: #82878f;
  --grid: #e7e8ec;
  --axis: #c6c9cf;
  --border: rgba(15, 20, 30, 0.10);
  --card-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 3px 12px rgba(16, 24, 40, 0.05);
  --cat-1: #2f6bff;
  --cat-2: #00a860;
  --cat-3: #009fce;
  --cat-4: #e5309b;
  --cat-5: #7c4dff;
  --cat-6: #e8415c;
  --cat-7: #00a58f;
  --cat-8: #b88300;
  /*
   * "Magma" — a RESERVED ramp for money, never a categorical series.
   * Everything else on the page is cool (Aurora), so revenue is the only
   * warm thing in view and pops without needing to shout.
   */
  --money-1: #f06722;
  --money-2: #e4136e;
  --money-3: #e8952b;
  --rev-net: #0a9f55;
  --rev-gross: #a68400;
  --rev-vat: #d2560f;
  --rev-commission: #7c3ff0;
  --status-good: #0ca30c;
  --status-warning: #e8a412;
  --status-serious: #e56f3e;
  --status-critical: #d03b3b;
  /* Legacy aliases — several modules grew up writing --status-ok/--status-issues;
     defined here so the token wins over their hardcoded hex fallbacks. */
  --status-ok: var(--status-good);
  --status-issues: var(--status-warning);
  --delta-up: #0c9948;
  --delta-down: #d03b3b;
  /* Semantic control colors (see the dark block for the schema). */
  --accent: #0f9d58;
  --accent-ink: #ffffff;
  --danger: #d9731f;
  --selected: #2563eb;
  --selected-ink: #ffffff;
  --btn-border: rgba(11, 11, 11, 0.22);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.bo-root, .bo-app) {
  color-scheme: dark;
  --page: #1b1d21;
  --surface-1: #25282d;
  --surface-2: #2d3138;
  --ink: #e9ebee;
  --ink-2: #b6bac1;
  --muted: #878c95;
  --grid: #33373d;
  --axis: #474c54;
  --border: rgba(255, 255, 255, 0.09);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.22);
  --cat-1: #5ea2ff;
  --cat-2: #3ce38b;
  --cat-3: #27d3f5;
  --cat-4: #ff6ac2;
  --cat-5: #a488ff;
  --cat-6: #ff6478;
  --cat-7: #2ce0c0;
  --cat-8: #f5b82e; /* amber — was indigo, a near-twin of blue */
  --money-1: #ff8a3d;
  --money-2: #ff4d8f;
  --money-3: #ffb45c;
  /* Revenue measures, good → cost: what the business keeps is green, the
     gross before deductions yellow, the deductions dark orange and purple. */
  --rev-net: #3ce38b;
  --rev-gross: #f5d547;
  --rev-vat: #f0782c;
  --rev-commission: #b17cff;
  --status-good: #2fd575;
  --status-warning: #ffc243;
  --status-serious: #ff8f5e;
  --status-critical: #ff5d5d;
  --delta-up: #35d07a;
  --delta-down: #ff5d6c;
  /* Semantic control colors, SEPARATE from the chart palette (--cat-*).
     The schema (owner, 2026-09-01):
       normal   = gray surface + a clearly visible --btn-border
       selected = blue (--selected) — a chosen option/tab/nav item
       activate = green (--accent) — enable / activate / positive commit
       destroy  = orange (--danger) — delete / discard / clear / remove
     Red stays for required-missing status + hard errors only. */
  --accent: #2fa25c;
  --accent-ink: #ffffff;
  --danger: #e8823c;
  --selected: #4d8dff;
  --selected-ink: #ffffff;
  --btn-border: rgba(255, 255, 255, 0.18);
}
}
:root[data-theme="dark"] :is(.bo-root, .bo-app) {
  color-scheme: dark;
  --page: #1b1d21;
  --surface-1: #25282d;
  --surface-2: #2d3138;
  --ink: #e9ebee;
  --ink-2: #b6bac1;
  --muted: #878c95;
  --grid: #33373d;
  --axis: #474c54;
  --border: rgba(255, 255, 255, 0.09);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.22);
  --cat-1: #5ea2ff;
  --cat-2: #3ce38b;
  --cat-3: #27d3f5;
  --cat-4: #ff6ac2;
  --cat-5: #a488ff;
  --cat-6: #ff6478;
  --cat-7: #2ce0c0;
  --cat-8: #f5b82e; /* amber — was indigo, a near-twin of blue */
  --money-1: #ff8a3d;
  --money-2: #ff4d8f;
  --money-3: #ffb45c;
  /* Revenue measures, good → cost: what the business keeps is green, the
     gross before deductions yellow, the deductions dark orange and purple. */
  --rev-net: #3ce38b;
  --rev-gross: #f5d547;
  --rev-vat: #f0782c;
  --rev-commission: #b17cff;
  --status-good: #2fd575;
  --status-warning: #ffc243;
  --status-serious: #ff8f5e;
  --status-critical: #ff5d5d;
  --delta-up: #35d07a;
  --delta-down: #ff5d6c;
  /* Semantic control colors, SEPARATE from the chart palette (--cat-*).
     The schema (owner, 2026-09-01):
       normal   = gray surface + a clearly visible --btn-border
       selected = blue (--selected) — a chosen option/tab/nav item
       activate = green (--accent) — enable / activate / positive commit
       destroy  = orange (--danger) — delete / discard / clear / remove
     Red stays for required-missing status + hard errors only. */
  --accent: #2fa25c;
  --accent-ink: #ffffff;
  --danger: #e8823c;
  --selected: #4d8dff;
  --selected-ink: #ffffff;
  --btn-border: rgba(255, 255, 255, 0.18);
}

.bo-root { padding: 1rem; border-radius: 10px; }
.bo-app { display: flex; min-height: 100vh; margin: 0; }

:is(.bo-root, .bo-app) * { box-sizing: border-box; }
/* Controls sized for fingers and tired eyes (owner's call 2026-09-01): the
   old 0.3rem paddings made every form read as a wall of tiny boxes. */
/* NORMAL button: gray surface with a clearly visible border. Neutral hover —
   a normal button lifts slightly, it does not turn a colour it does not mean.
   PILL corners everywhere (owner, 2026-09-01, off the segmented control:
   "much more polished") and the same micro-effects the capsule has: a
   short transition, and a colored glow only on filled (committed) states. */
:is(.bo-root, .bo-app) button {
  font: inherit; color: var(--ink); background: var(--surface-1);
  border: 1px solid var(--btn-border); border-radius: 999px;
  padding: 0.5rem 1.05rem; cursor: pointer; line-height: 1.25;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
:is(.bo-root, .bo-app) button:hover { background: color-mix(in srgb, var(--ink) 8%, var(--surface-1)); border-color: color-mix(in srgb, var(--ink) 32%, transparent); }
/* ACTIVATE / enable / positive commit — GREEN. The one "make it happen"
   action per view (Save, Create, Activate, Done). */
:is(.bo-root, .bo-app) button.bo-primary {
  background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 700;
  box-shadow: 0 1px 6px color-mix(in srgb, var(--accent) 40%, transparent);
}
:is(.bo-root, .bo-app) button.bo-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); border-color: transparent; }
/* DISABLED — dimmed, no glow, no hover. A disabled SAVE that still looked
   bright green read as a button that silently did nothing (2026-09-10). */
:is(.bo-root, .bo-app) button:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
:is(.bo-root, .bo-app) button.bo-primary:disabled:hover { background: var(--accent); }
/* SELECTED — blue. A chosen option among peers (not an action). */
:is(.bo-root, .bo-app) button.bo-selected {
  background: var(--selected); color: var(--selected-ink); border-color: transparent; font-weight: 600;
  box-shadow: 0 1px 6px color-mix(in srgb, var(--selected) 40%, transparent);
}
:is(.bo-root, .bo-app) button.bo-selected:hover { background: color-mix(in srgb, var(--selected) 88%, #000); border-color: transparent; }
/* DESTRUCTIVE — orange (delete / discard / clear / remove). Distinct from the
   red reserved for required-missing status and hard errors. Outline until
   hovered — the glow appears only once it fills. */
:is(.bo-root, .bo-app) button.bo-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 55%, var(--btn-border)); }
:is(.bo-root, .bo-app) button.bo-danger:hover {
  background: var(--danger); color: #fff; border-color: transparent;
  box-shadow: 0 1px 6px color-mix(in srgb, var(--danger) 40%, transparent);
}
/* Text fields stay softly-rounded rectangles — a pill input swallows its own
   text; ACTIONS and CHOICES are pills. */
:is(.bo-root, .bo-app) input, :is(.bo-root, .bo-app) select, :is(.bo-root, .bo-app) textarea {
  font: inherit; color: var(--ink); background: var(--surface-1);
  border: 1px solid var(--border); border-radius: 10px; padding: 0.5rem 0.75rem;
  line-height: 1.25;
}
/* SELECT = a choice, so it wears the same capsule as buttons — with a custom
   chevron that gets real breathing room instead of hugging the right edge
   (the native arrow cannot be positioned). The chevron gray sits between the
   two themes' --muted values, so one asset serves both. */
:is(.bo-root, .bo-app) select:not([multiple]) {
  appearance: none; -webkit-appearance: none;
  border-radius: 999px; border-color: var(--btn-border);
  padding: 0.5rem 2.4rem 0.5rem 1rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='%23858a92' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  transition: border-color 0.15s, background-color 0.15s;
}
:is(.bo-root, .bo-app) select:not([multiple]):hover { border-color: color-mix(in srgb, var(--ink) 32%, transparent); }
:is(.bo-root, .bo-app) input:focus-visible, :is(.bo-root, .bo-app) select:focus-visible, :is(.bo-root, .bo-app) textarea:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--selected) 60%, transparent);
  outline-offset: 1px;
}

/* ---- app frame (shell) ---- */
.bo-sidebar {
  width: 216px; flex: none; display: flex; flex-direction: column; gap: 0.25rem;
  padding: 1rem 0.7rem; background: var(--surface-1);
  border-right: 1px solid var(--border);
}
.bo-logo { font-weight: 800; font-size: 1.15rem; padding: 0 0.55rem 0.75rem; letter-spacing: 0.01em; }
.bo-menu-section {
  color: var(--muted); font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em;
  margin: 0.9rem 0.55rem 0.3rem;
}
.bo-menu-item {
  display: flex; align-items: center; gap: 0.55rem; width: 100%;
  padding: 0.45rem 0.55rem; border: none !important; border-radius: 8px;
  background: transparent !important; color: var(--ink-2); text-align: left;
  font: inherit; cursor: pointer;
}
.bo-menu-item:hover { background: color-mix(in srgb, var(--ink) 7%, transparent) !important; color: var(--ink); }
.bo-menu-item.active {
  background: color-mix(in srgb, var(--selected) 16%, transparent) !important;
  color: var(--ink); font-weight: 600;
  box-shadow: inset 3px 0 0 var(--selected);
}
.bo-menu-item .glyph { width: 1.1em; text-align: center; opacity: 0.8; }
.bo-sidebar-footer { margin-top: auto; padding: 0.5rem 0.55rem 0; display: flex; flex-direction: column; gap: 0.5rem; }
.bo-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bo-topbar {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  padding: 0.6rem 1.25rem; background: var(--surface-1);
  border-bottom: 1px solid var(--border);
}
.bo-topbar-title { font-weight: 600; }
.bo-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 0.1rem 0.5rem; min-width: 0; }
.bo-crumbs a { color: var(--muted); text-decoration: none; font-weight: 500; }
.bo-crumbs a:hover { color: var(--ink); text-decoration: underline; }
.bo-crumb { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 0; }
.bo-crumb-sep { color: var(--muted); }
.bo-crumbs .bo-topbar-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40ch; }
/* The drawer toggle and its scrim exist only on narrow viewports; the media
   query below reveals them. Hidden by default so desktop never sees them. */
.bo-hamburger {
  display: none; align-items: center; justify-content: center;
  width: 2.1rem; height: 2.1rem; padding: 0; font-size: 1.1rem; line-height: 1;
}
.bo-scrim { display: none; }
.bo-content { flex: 1; padding: 1.1rem 1.25rem; min-width: 0; }
.bo-content > .bo-root { padding: 0; border-radius: 0; background: transparent; }

/* ---- shared components ---- */
.bo-toolbar { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
/* SEGMENTED CONTROL — filters and view switches. ONE seamless pill: the
   container is the only outline, segments are borderless text, and the
   chosen one is a filled pill INSIDE it (the iOS-toggle look the owner
   pointed at, with text instead of icons). Rules are written as
   .bo-tabs .bo-tab so they out-specify the base button rule without
   !important — a segment must never pick up the gray button surface. */
.bo-tabs {
  display: inline-flex; gap: 0; padding: 3px; align-items: stretch;
  background: color-mix(in srgb, var(--ink) 6%, var(--surface-1));
  border: 1px solid var(--btn-border); border-radius: 999px;
}
.bo-tabs .bo-tab {
  border: none; background: transparent; color: var(--ink-2);
  padding: 0.42rem 1rem; border-radius: 999px; font-weight: 600; line-height: 1.2;
  transition: background 0.15s, color 0.15s;
}
.bo-tabs .bo-tab:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }
.bo-tabs .bo-tab.active {
  background: var(--selected); color: var(--selected-ink); font-weight: 700;
  box-shadow: 0 1px 5px color-mix(in srgb, var(--selected) 45%, transparent);
}
.bo-tabs .bo-tab.active:hover { background: color-mix(in srgb, var(--selected) 88%, #000); }

/* Adjacent buttons must never touch. Row actions live in table cells and
   toolbars where authors habitually place two <button>s side by side. */
:is(.bo-root, .bo-app) td button + button { margin-left: 0.45rem; }
.bo-spacer { flex: 1; }
.bo-muted { color: var(--muted); font-size: 0.85rem; }

.bo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
/* A grid column can never be blown open by its content: grid items default
   to min-width auto, so one wide table defeats 1fr, overflows the page
   sideways and the far card gets clipped at the viewport edge. The table
   scrolls inside its .bo-table-scroll wrapper instead — on every screen
   size, not just the phone rule further down. */
.bo-grid > * { min-width: 0; }
.bo-table-scroll { overflow-x: auto; }
.bo-card { background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.1rem; min-width: 0; position: relative; overflow: hidden; box-shadow: var(--card-shadow); }
.bo-card.full { grid-column: 1 / -1; }
.bo-card-accent { position: absolute; inset: 0 auto 0 0; width: 4px; border-radius: 4px 0 0 4px; }
/* wrap: a head crowded with controls (search + filter tabs beside a detail
   card) drops to a second line instead of clipping at the card edge —
   min-width:0 on grid children means the card can genuinely be narrow now. */
.bo-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; margin-bottom: 0.5rem; }
.bo-card-title { font-size: 0.95rem; font-weight: 600; margin: 0; }
.bo-card-actions { margin-left: auto; display: flex; gap: 0.25rem; opacity: 0.25; transition: opacity 0.15s; }
.bo-card:hover .bo-card-actions { opacity: 1; }
.bo-card-actions button { padding: 0.1rem 0.45rem; font-size: 0.8rem; }

/* The number IS the widget. Big, heavy, tabular — the reference admin
   templates set their KPIs at ~2.5rem/800 and everything else small. */
.bo-hero { font-size: 2.6rem; font-weight: 800; line-height: 1.08; margin: 0.35rem 0 0.25rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.bo-hero-sub { color: var(--ink-2); font-size: 0.85rem; margin: 0; display: flex; gap: 0.6rem; align-items: center; }
/* Delta = filled pill chip, not colored text — direction must pop at a glance. */
.bo-delta {
  font-weight: 700; font-variant-numeric: tabular-nums; font-size: 0.76rem;
  padding: 0.16rem 0.5rem; border-radius: 999px; line-height: 1.2; white-space: nowrap;
}
.bo-delta.up { color: var(--delta-up); background: color-mix(in srgb, var(--delta-up) 15%, transparent); }
.bo-delta.down { color: var(--delta-down); background: color-mix(in srgb, var(--delta-down) 15%, transparent); }
/* flex-start, not flex-end: heroes in one row must sit on the same line
   whatever their sub-lines do — a two-line sub used to push its hero up. */
.bo-stat-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.bo-hero-sub { white-space: nowrap; }

.bo-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.bo-table th { text-align: left; color: var(--muted); font-weight: 500; padding: 0.3rem 0.6rem 0.3rem 0; border-bottom: 1px solid var(--grid); }
.bo-table td { padding: 0.35rem 0.6rem 0.35rem 0; border-bottom: 1px solid var(--grid); vertical-align: top; }
.bo-table td.num, .bo-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.bo-table tr:hover td { background: color-mix(in srgb, var(--cat-1) 8%, transparent); }
/* A row's actions must never scroll out of reach. A table wider than its
   card scrolls inside .bo-table-scroll, and without this the edit/delete
   buttons sit off the right edge behind a scrollbar thin enough to read as
   a divider — the feature is built, shipped, and invisible. Pinning the
   actions cell to the right edge makes that impossible at any width.
   The hover rule re-layers the row tint OVER the opaque background, so the
   pinned cell highlights with its row instead of staying flat. */
.bo-table td.bo-actions, .bo-table th.bo-actions {
  position: sticky; right: 0; background: var(--surface-1);
  box-shadow: -10px 0 10px -10px rgba(0, 0, 0, 0.55);
}
.bo-table tr:hover td.bo-actions {
  background:
    linear-gradient(color-mix(in srgb, var(--cat-1) 8%, transparent),
                    color-mix(in srgb, var(--cat-1) 8%, transparent)),
    var(--surface-1);
}
.bo-props { color: var(--ink-2); max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }

/* Rounded pill bars in a visible rail — magnitude reads instantly and the
   empty remainder of the track is part of the picture. */
.bo-barlist { display: grid; grid-template-columns: minmax(90px, max-content) 1fr max-content; gap: 0.45rem 0.75rem; align-items: center; font-size: 0.85rem; }
.bo-barlist .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo-barlist .track { height: 14px; position: relative; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); overflow: hidden; }
.bo-barlist .bar { position: absolute; inset: 0 auto 0 0; border-radius: 999px; }
.bo-barlist .value { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }

.bo-chip { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; padding: 0.1rem 0.55rem; border-radius: 999px; border: 1px solid var(--border); color: var(--ink-2); white-space: nowrap; }
.bo-chip .dot { width: 8px; height: 8px; border-radius: 50%; }

.bo-legend { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.82rem; min-width: 140px; }
.bo-legend .row { display: flex; align-items: center; gap: 0.5rem; }
.bo-legend .swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.bo-legend .val { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* One grid for the whole funnel (steps and rows are display: contents), so
   every bar starts at the same x and ends at the same x — per-row grids
   sized the label column to each row's own label. */
.bo-funnel { display: grid; grid-template-columns: fit-content(45%) minmax(0, 1fr) max-content; column-gap: 1.25rem; row-gap: 0.15rem; align-items: center; font-size: 0.85rem; }
.bo-funnel .fstep, .bo-funnel .frow { display: contents; }
.bo-funnel .fdrop { grid-column: 1 / -1; }
.bo-funnel .frow > span:first-child { min-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo-funnel .ftrack { height: 28px; position: relative; border-radius: 8px; background: color-mix(in srgb, var(--ink) 5%, transparent); overflow: hidden; }
.bo-funnel .fbar { position: absolute; inset: 0 auto 0 0; border-radius: 0 8px 8px 0; min-width: 2px; display: flex; align-items: center; }
.bo-funnel .fdrop { color: var(--muted); font-size: 0.72rem; padding: 0.05rem 0 0.15rem 0; margin-left: 2px; }
.bo-funnel .fval { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }

/* Roomier: the 0.5rem/0.2rem gaps read as cramped in the bigger-control era.
   Column labels get real breathing room between caption and field, and
   between sibling fields. */
.bo-form { display: flex; gap: 1.1rem 1.4rem; flex-wrap: wrap; align-items: end; padding: 1.25rem 1.4rem; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 1.25rem; }
.bo-form label { display: flex; flex-direction: column; gap: 0.45rem; font-size: 0.8rem; color: var(--ink-2); }

/* ---- stacked field groups ----
   The layout for a long editor (a modal section with several distinct
   questions). The rhythm is the usual 8pt one: 6-8px caption→field, ~10px
   between rows of one group, 28px between GROUPS — so the eye reads three
   questions, not one wall of controls. Field groups stack vertically and
   never wrap into each other. */
.bo-stack { display: flex; flex-direction: column; gap: 1.75rem; }
.bo-field { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; min-width: 0; }
.bo-field-label { font-size: 0.86rem; font-weight: 600; color: var(--ink); line-height: 1.3; }
.bo-field-label .opt { font-weight: 400; color: var(--muted); margin-left: 0.4rem; font-size: 0.78rem; }
.bo-field-hint { font-size: 0.8rem; color: var(--muted); line-height: 1.45; margin: -0.25rem 0 0; max-width: 64ch; }
.bo-rules { display: flex; flex-direction: column; gap: 0.65rem; align-self: stretch; }
.bo-rule-row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.bo-rule-row .op { color: var(--muted); font-weight: 600; padding: 0 0.1rem; }
.bo-rule-add { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.bo-rule-box { border: 1px dashed var(--border); border-radius: 12px; padding: 1rem 1.1rem; align-self: stretch; display: flex; flex-direction: column; gap: 0.85rem; }

/* ---- combobox ("type or pick") ----
   An input wearing a chevron; the chevron opens the FULL list (a native
   datalist only shows what matches the value already in the box). */
.bo-combo { position: relative; display: inline-flex; min-width: 0; }
.bo-combo > input { width: 100%; min-width: 0; padding-right: 2.3rem; }
.bo-combo.disabled { opacity: 0.6; }
:is(.bo-root, .bo-app) .bo-combo-toggle {
  position: absolute; right: 3px; top: 3px; bottom: 3px; width: 2rem;
  border: 0; border-radius: 8px; padding: 0; background: transparent; box-shadow: none;
  color: var(--muted); display: flex; align-items: center; justify-content: center;
}
:is(.bo-root, .bo-app) .bo-combo-toggle:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); border-color: transparent; }
.bo-combo-list {
  position: absolute; left: 0; top: calc(100% + 4px); z-index: 950;
  min-width: 100%; max-width: min(460px, 80vw); max-height: 280px; overflow: auto;
  margin: 0; padding: 0.3rem; list-style: none;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--card-shadow);
}
.bo-combo-opt {
  display: flex; align-items: baseline; gap: 0.6rem; cursor: pointer;
  padding: 0.45rem 0.7rem; border-radius: 7px; font-size: 0.9rem; color: var(--ink);
}
.bo-combo-opt .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo-combo-opt .hint { color: var(--muted); font-size: 0.74rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bo-combo-opt .tick { color: var(--selected); font-size: 0.8rem; }
.bo-combo-opt.active { background: color-mix(in srgb, var(--selected) 16%, transparent); }
.bo-combo-opt.current { font-weight: 600; }
.bo-combo-empty { padding: 0.5rem 0.7rem; color: var(--muted); font-size: 0.8rem; }
.bo-pager { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.75rem; }

.bo-chart-wrap { position: relative; }
.bo-tooltip {
  position: absolute; pointer-events: none; transform: translate(-50%, calc(-100% - 10px));
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 6px;
  padding: 0.3rem 0.55rem; font-size: 0.75rem; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); z-index: 5;
}
.bo-tooltip .val { font-weight: 600; font-variant-numeric: tabular-nums; }
.bo-error { color: var(--status-critical); font-size: 0.85rem; }

/* The "how to read this" line under a widget title. Two lines is enough for a
   verdict sentence and keeps every card the same height; the rest is on hover. */
.bo-widget-note {
  margin: -0.15rem 0 0.6rem; color: var(--muted);
  font-size: 0.78rem; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; cursor: help;
}

/* Loading placeholders. Sized by the component so the card is already the
   height of its chart before the data lands — the sweep is cosmetic, the
   reserved space is the actual fix for a dashboard that jumps as each widget
   resolves at its own pace. */
.bo-skel { position: relative; overflow: hidden; border-radius: 8px; }
.bo-skel::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--ink) 8%, transparent),
    transparent
  );
  animation: bo-skel-sweep 1.5s ease-in-out infinite;
}
@keyframes bo-skel-sweep { to { transform: translateX(100%); } }

/* Fixed-footprint loading state: the box takes the size the loaded widget
   will occupy — no layout jump, no text. The loader itself is three layers:
   expanding ripple rings, an orbiting arc, and a breathing center dot. */
.bo-loadbox { display: flex; align-items: center; justify-content: center; }
.bo-loader { position: relative; width: 64px; height: 64px; }
.bo-loader::before, .bo-loader::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--cat-1); opacity: 0;
  animation: bo-ripple 1.8s cubic-bezier(0.2, 0.6, 0.4, 1) infinite;
}
.bo-loader::after { animation-delay: 0.9s; }
.bo-loader-ring {
  position: absolute; inset: 14px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--cat-1) 22%, transparent);
  border-top-color: var(--cat-1);
  animation: bo-orbit 1.1s linear infinite;
}
.bo-loader-dot {
  position: absolute; left: 50%; top: 50%;
  width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: var(--cat-1);
  animation: bo-breathe 1.8s ease-in-out infinite;
}
@keyframes bo-ripple { 0% { transform: scale(0.3); opacity: 0.75; } 100% { transform: scale(1); opacity: 0; } }
@keyframes bo-orbit { to { transform: rotate(360deg); } }
@keyframes bo-breathe {
  0%, 100% { transform: scale(0.7); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 1; }
}
.bo-skel-bars {
  display: flex; align-items: flex-end; gap: 4%; height: 100%; padding: 8px 0;
  box-sizing: border-box;
}
.bo-skel-bar {
  flex: 1; border-radius: 3px 3px 0 0;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.bo-skel-num {
  height: 2rem; width: 5.5rem; margin: 0.15rem 0;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
/* A sweeping gradient is exactly the kind of motion that triggers people, and
   it conveys nothing the reserved space does not. Hold the shape, drop the
   animation. */
@media (prefers-reduced-motion: reduce) {
  .bo-skel::after { animation: none; }
}

.bo-donut-wrap { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }

/* ---- section cards: the preview + EDIT pattern ----
   A form too big for one screen becomes a grid of section cards. Each card
   shows a live summary of what is configured, a BIG traffic-light marker
   (green = complete, orange = optional/needs a look, red = required and
   missing — the campaign cannot activate), and one obvious EDIT action.
   Editing happens in a near-fullscreen modal (.bo-modal). */
.bo-section-card {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.15rem 1.25rem; min-width: 0;
  display: flex; flex-direction: column; gap: 0.65rem; position: relative;
}
.bo-section-card.status-bad { border-color: color-mix(in srgb, var(--status-critical) 45%, var(--border)); }
.bo-section-head { display: flex; align-items: center; gap: 0.65rem; }
.bo-section-title { font-size: 1.02rem; font-weight: 700; margin: 0; letter-spacing: 0.01em; }
.bo-section-edit { margin-left: auto; font-weight: 700; padding: 0.5rem 1.1rem; }
.bo-section-body { color: var(--ink-2); font-size: 0.92rem; line-height: 1.55; min-height: 1.5rem; }
.bo-section-body b { color: var(--ink); }
.bo-status-dot {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent);
}
.bo-status-dot.ok   { color: var(--status-good);     background: var(--status-good); }
.bo-status-dot.warn { color: var(--status-warning);  background: var(--status-warning); }
.bo-status-dot.bad  { color: var(--status-critical); background: var(--status-critical); }
.bo-status-dot.off  { color: var(--muted); background: transparent; border: 2px solid var(--muted); box-shadow: none; }

/* A toggle pill with an UNMISTAKABLE selected state — filled accent, not just
   bold text. For day pickers, multi-selects, any "on/off choice" set. */
.bo-choice {
  padding: 0.55rem 1.05rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface-1); color: var(--ink-2); font: inherit;
  font-weight: 600; cursor: pointer; line-height: 1.2; user-select: none;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.bo-choice:hover { background: color-mix(in srgb, var(--ink) 8%, var(--surface-1)); color: var(--ink); border-color: color-mix(in srgb, var(--ink) 28%, transparent); }
/* A chosen option is SELECTED (blue), not an action. */
.bo-choice.on {
  background: var(--selected); border-color: transparent; color: var(--selected-ink);
  box-shadow: 0 1px 6px color-mix(in srgb, var(--selected) 40%, transparent);
}
.bo-choice-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
/* A labelled sub-block inside an editor modal. */
.bo-subsection { margin-bottom: 1.6rem; }
.bo-subsection > .h { font-size: 0.95rem; font-weight: 700; margin: 0 0 0.2rem; }
.bo-subsection > .sub { color: var(--muted); font-size: 0.82rem; margin: 0 0 0.7rem; }

/* Near-fullscreen editor modal: 90vw x 90vh, one section at a time. */
.bo-modal-scrim {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
}
.bo-modal {
  width: 95vw; height: 95vh; display: flex; flex-direction: column;
  background: var(--page); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
.bo-modal-head {
  display: flex; align-items: center; gap: 0.75rem; flex: none;
  padding: 0.9rem 1.4rem; background: var(--surface-1);
  border-bottom: 1px solid var(--border);
}
.bo-modal-title { font-size: 1.1rem; font-weight: 700; margin: 0; }
.bo-modal-body { flex: 1; min-height: 0; overflow: auto; padding: 1.4rem; }
/* flush = the body IS the content (e.g. the Banner Studio iframe): no padding,
   no scroll of its own, and a direct child iframe fills it. */
.bo-modal-body.flush { padding: 0; overflow: hidden; }
.bo-modal-body.flush > iframe { display: block; width: 100%; height: 100%; border: 0; }


@media (max-width: 720px) {
  .bo-grid { grid-template-columns: 1fr; }
  .bo-card.full { grid-column: auto; }

  /* The sidebar becomes an off-canvas drawer. A 64px icon rail was the old
     answer, but it spends a sixth of a phone's width on a column of cryptic
     glyphs and still cannot show a submenu. The drawer keeps the full labelled
     menu and gives the content the whole screen when it is closed. */
  .bo-sidebar {
    position: fixed; z-index: 40; inset: 0 auto 0 0;
    width: 264px; max-width: 82vw;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
    /* The menu is taller than a phone: without its own scroll the bottom
       items (Account, SDK Docs…) are simply unreachable. Safe-area padding
       keeps the last item above the iOS home indicator. */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: max(1.2rem, env(safe-area-inset-bottom));
  }
  .bo-sidebar.open { transform: none; }
  /* Tap-anywhere-else to close. Rendered only while the drawer is open. */
  .bo-scrim {
    display: block; position: fixed; inset: 0; z-index: 30;
    background: rgba(0, 0, 0, 0.45); border: none; border-radius: 0;
  }
  .bo-hamburger { display: inline-flex; }

  /* Reclaim the horizontal room the phone does not have. */
  .bo-topbar { padding: 0.55rem 0.85rem; }
  .bo-content { padding: 0.9rem 0.85rem; }
  .bo-hero { font-size: 2rem; }

  /* Wide tables scroll inside their own box instead of pushing the page
     sideways. Paired with the .bo-table-scroll wrapper the remotes use. */
  .bo-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* EVERY table self-scrolls on a phone, wrapper or not — an unwrapped wide
     table otherwise stretches the whole page sideways and "disorganizes"
     everything that shares the screen with it. */
  .bo-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Grid/flex children may not force the page wider than the phone. */
  .bo-card { min-width: 0; max-width: 100%; }

  /* Controls shrink instead of overflowing their toolbar row. */
  .bo-toolbar input, .bo-toolbar select { max-width: 100%; min-width: 0; }
  /* ...including through a <label> wrapper, which otherwise grows to the
     select's longest option (a long campaign name widened the whole page). */
  .bo-toolbar > * { max-width: 100%; min-width: 0; }

  /* A stat stacks number → subtitle → sparkline, always in that order.
     Wrapping alone put the sparkline beside short stats and under long
     ones, so neighbouring cards disagreed (Churn, Notifications). */
  .bo-stat-row { flex-wrap: wrap; }
  .bo-stat-row > * { min-width: 0; max-width: 100%; }
  .bo-stat-row.bo-stat { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .bo-hero-sub { white-space: normal; flex-wrap: wrap; }

  /* A card header's controls (filters, search) may shrink to the card. */
  .bo-card-head > * { min-width: 0; max-width: 100%; }

  /* Card actions only brighten on hover — a phone never hovers, so they
     sat at 25% opacity, and they were too small to hit. */
  .bo-card-actions { opacity: 0.85; }
  .bo-card-actions button { min-width: 36px; }

  /* Finger-sized controls: compact 18-20px buttons (row actions, COPY) are
     fine for a mouse, not for a thumb. */
  :is(.bo-root, .bo-app) :is(button, select, input:not([type=checkbox]):not([type=radio])) { min-height: 34px; }

  /* A table's first column is its name; squeezed by nowrap siblings it
     wrapped to one word per line. It keeps a readable width and the rest
     of the table scrolls. Cells with an explicit width (dots, #) opt out. */
  .bo-table :is(td, th):first-child:not([style*="width"]) { min-width: 8rem; }

  /* The right-pinned actions cell is wider than a phone when a row carries
     several actions (Audiences: six, 593px), and pinned it covered the whole
     row — names and all. On a phone it sits at the row's end like any other
     column; the table already scrolls to it. */
  .bo-table td.bo-actions, .bo-table th.bo-actions { position: static; box-shadow: none; }

  /* A segmented control wider than the phone scrolls sideways inside its
     own pill rather than spilling past the card edge. */
  .bo-tabs { max-width: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .bo-tabs::-webkit-scrollbar { display: none; }
  .bo-tabs .bo-tab { flex: none; white-space: nowrap; }

  /* iOS zooms the page on focusing any input under 16px and never quite
     zooms back — the single biggest "everything looks shifted" cause. */
  input, select, textarea { font-size: 16px; }
}

:is(.bo-root, .bo-app) {
  --brand: #7a3fd1;          /* Fantasma violet */
  --brand-2: #b04fd6;
  --em: #23b04e;             /* EveryMatrix brand green (everymatrix.com) */
  --mkt-reg: #2f6bff;        /* regulated market */
  --mkt-sweep: #f26b0f;      /* sweepstakes (orange) */
  --mkt-intl: #6b7a90;       /* international / .com — the grey market */
  /* Launch grades. Their own tokens rather than the status palette, because
     the badge is small bold text on the page ground: --status-warning on
     white is about 2:1, which is a legible chip and an illegible letter. */
  --grade-good: #0a7a38;
  --grade-ok: #2158cc;
  --grade-mid: #4a4f58;
  --grade-low: #94612b;
  --grade-bad: #c2262c;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.bo-root, .bo-app) { --brand: #a47bff; --brand-2: #d58bff; --em: #2ec55c; --mkt-reg: #5ea2ff; --mkt-sweep: #ff8533; --mkt-intl: #9aa8bc; --grade-good: #35d07a; --grade-ok: #7fb4ff; --grade-mid: #b6bac1; --grade-low: #ffc243; --grade-bad: #ff7b86; }
}
:root[data-theme="dark"] :is(.bo-root, .bo-app) { --brand: #a47bff; --brand-2: #d58bff; --em: #2ec55c; --mkt-reg: #5ea2ff; --mkt-sweep: #ff8533; --mkt-intl: #9aa8bc; --grade-good: #35d07a; --grade-ok: #7fb4ff; --grade-mid: #b6bac1; --grade-low: #ffc243; --grade-bad: #ff7b86; }

.bo-app { min-height: 100vh; }
.bo-app a { color: inherit; }
.rr-brand { display: flex; flex-direction: column; gap: 0.45rem; color: var(--ink); padding: 0.1rem 0 0.2rem; }
.rr-brand-mark { display: block; width: 138px; height: 58px; background: currentColor;
  -webkit-mask: url(/brand/fantasma.svg) no-repeat left center / contain; mask: url(/brand/fantasma.svg) no-repeat left center / contain; }
.rr-brand-em { display: block; width: 92px; height: 34px; background: var(--em);
  -webkit-mask: url(/brand/everymatrix.svg) no-repeat left center / contain; mask: url(/brand/everymatrix.svg) no-repeat left center / contain; }
.rr-app-name { margin: 0.5rem 0.55rem 0.4rem; font-size: 0.72rem; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; }

a.bo-menu-item { text-decoration: none; }

.rr-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.rr-kpis .bo-card { padding-bottom: 0.9rem; }
.rr-kpi-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin: 0 0 0.35rem; }
.rr-kpis .bo-hero { font-size: 2rem; margin: 0; }

.rr-section { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; margin: 1.6rem 0 0.8rem; }
.rr-section h3 { margin: 0; font-size: 1.02rem; font-weight: 700; }

/* --- two-line table cells ----------------------------------------------- */
/* What replaces a sideways scroll. The pair reads as one column: the figure in
   the body colour, the second measure smaller and muted beneath it. */
.rr-stack { display: inline-flex; flex-direction: column; gap: 1px; min-width: 0; }
.rr-stack.right { align-items: flex-end; text-align: right; }
.rr-stack.left { align-items: flex-start; text-align: left; }
.rr-stack-a { font-variant-numeric: tabular-nums; line-height: 1.25; }
.rr-stack-b { font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.25; }
/* A delta or a chip on the second line keeps its own colour; only plain text
   is dimmed, or the arrow that says a game halved would arrive in grey. */
.rr-stack-b .bo-delta, .rr-stack-b .rr-stage, .rr-stack-b .bo-chip { color: inherit; }

/* A table in a narrow card can overflow on four columns if its content will
   not wrap: an operator cell carries a name, a market chip, a credit badge and
   a jurisdiction, and the chip's nowrap was holding the whole cell rigid.
   Inside a table those may wrap — the row gets taller, which is the trade the
   rest of this file keeps making. */
.bo-table td .rr-op,
.bo-table td .rr-op-main,
.bo-table td .rr-op-sub { white-space: normal; }
.bo-table td .rr-op-name,
.bo-table td .rr-table-link { white-space: normal; overflow-wrap: anywhere; }
.bo-table td .bo-chip { white-space: normal; }

/* Columns leave before the table starts scrolling. The widths are measured,
   not guessed: nine columns need ~1230px, so each step sheds enough to land
   inside the next window size down. */
@media (max-width: 1440px) { .bo-table .rr-p3 { display: none; } }
@media (max-width: 1180px) { .bo-table .rr-p2 { display: none; } }

/* Two sortable labels in one header. Each sorts on its own; the column is
   marked when either is the active sort. */
.rr-th { display: inline-flex; align-items: baseline; gap: 0.2rem; white-space: normal; }
.rr-th.rr-sortable { cursor: pointer; }
.rr-th.rr-sortable:hover { color: var(--ink); }
.rr-th.rr-sorted { color: var(--ink); font-weight: 650; }
.rr-th:focus-visible { outline: 2px solid var(--selected); outline-offset: 2px; border-radius: 3px; }
.rr-th-sub { display: block; font-size: 0.72rem; opacity: 0.8; }
.bo-table th.rr-sorted-col { color: var(--ink); }
/* Long labels wrap rather than forcing the table wider than the screen. */
.bo-table td { overflow-wrap: anywhere; }

/* --- page sections ------------------------------------------------------ */
/* A section has to out-rank a card, and the old one did not: an h3 at 1.02rem
   against a card title at 0.95rem is not a hierarchy, it is a rounding error.
   Three things separate them now — a rule across the full width, a coloured
   mark, and a size gap wide enough to survive a page of forty cards. */
.rr-sec { margin: 2.4rem 0 1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--grid); }
.rr-sec:first-of-type { margin-top: 1.6rem; }
.rr-sec-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.rr-sec-mark { width: 4px; height: 1.25rem; border-radius: 999px; flex: none; background: var(--sec); }
.rr-sec h3 { margin: 0; font-size: 1.4rem; font-weight: 760; letter-spacing: -0.015em; line-height: 1.15; color: var(--ink); }
/* Tinted rather than filled: a solid badge beside every heading turns the page
   into a row of notifications. */
.rr-sec-count { font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 0.1rem 0.45rem; border-radius: 999px; color: var(--sec);
  background: color-mix(in srgb, var(--sec) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--sec) 30%, transparent); }
.rr-sec-right { margin-left: auto; font-size: 0.75rem; color: var(--muted); }
/* On its own line, not trailing the title: at the end of a heading it reads as
   part of it, and the eye scanning for the next section skips both. */
.rr-sec-sub { margin: 0.35rem 0 0 calc(4px + 0.6rem); font-size: 0.82rem; line-height: 1.45;
  color: var(--ink-2); max-width: 78ch; }

.rr-sec.brand { --sec: var(--brand); }
.rr-sec.blue { --sec: var(--selected); }
.rr-sec.cyan { --sec: var(--cat-3); }
.rr-sec.money { --sec: var(--money-1); }
.rr-sec.neutral { --sec: var(--ink-2); }

/* Card titles gain a little weight so the two levels read as deliberate steps
   rather than as the same label at two accidental sizes. */
.rr-sec + * .bo-card-title, .bo-card-title { font-weight: 650; }

@media (max-width: 720px) {
  .rr-sec { margin: 1.8rem 0 0.8rem; }
  .rr-sec h3 { font-size: 1.18rem; }
}

.rr-release-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.rr-release { display: flex; flex-direction: column; gap: 0.7rem; text-decoration: none; color: inherit;
  transition: transform 0.15s, box-shadow 0.15s; }
.rr-release:hover { transform: translateY(-2px); box-shadow: 0 6px 22px color-mix(in srgb, var(--brand) 18%, transparent); }
.rr-release-head { display: flex; align-items: flex-start; gap: 0.6rem; }
.rr-release-name { font-size: 1.12rem; font-weight: 750; margin: 0; line-height: 1.2; }
.rr-release-date { font-size: 0.8rem; color: var(--muted); margin-top: 3px; }
.rr-new { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.1em; color: #fff; border-radius: 999px; padding: 0.22rem 0.55rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); white-space: nowrap; }
/* --- go-live verdicts --------------------------------------------------- */
/* A pill, because these are read down a column and a word in the body colour
   does not separate from the numbers either side of it. */
.rr-golive { display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.03em;
  padding: 0.12rem 0.45rem; border-radius: 999px; white-space: nowrap;
  border: 1px solid transparent; }
.rr-golive.live { color: var(--status-good); border-color: color-mix(in srgb, var(--status-good) 45%, transparent); }
.rr-golive.fading { color: var(--status-warning); border-color: color-mix(in srgb, var(--status-warning) 45%, transparent); }
.rr-golive.stalled { color: var(--status-critical); border-color: color-mix(in srgb, var(--status-critical) 45%, transparent); }
.rr-golive.early { color: var(--muted); border-color: var(--border); }
.rr-standing { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.rr-standing small { font-weight: 400; color: var(--muted); }
.rr-standing.top { color: var(--grade-good); }
.rr-standing.upper { color: var(--grade-ok); }
.rr-standing.lower { color: var(--ink-2); }
.rr-standing.bottom { color: var(--grade-bad); }

/* --- rollout ------------------------------------------------------------ */
/* Its own colour, not the violet NEW: these two events sit side by side on the
   radar and the eye should be able to tell a launch from a second wind. */
.rr-roll { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.1em; color: #fff; border-radius: 999px;
  padding: 0.22rem 0.55rem; background: linear-gradient(135deg, var(--selected), var(--cat-3));
  white-space: nowrap; }
.rr-release.rollout:hover { box-shadow: 0 6px 22px color-mix(in srgb, var(--selected) 18%, transparent); }
/* Before and after, at a glance. A game going 1 -> 69 and one going 208 -> 213
   both read "+N" in text; they do not read the same as a bar. */
.rr-roll-bar { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--muted);
  font-variant-numeric: tabular-nums; }
.rr-roll-track { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; display: flex; }
.rr-roll-track i { height: 100%; display: block; }
.rr-roll-was { background: color-mix(in srgb, var(--ink) 22%, transparent); }
.rr-roll-new { background: linear-gradient(90deg, var(--selected), var(--cat-3)); }
.rr-roll-ops { display: flex; flex-direction: column; gap: 0.2rem; border-top: 1px solid var(--grid); padding-top: 0.6rem; }
.rr-roll-ops > span { display: flex; justify-content: space-between; gap: 0.8rem; font-size: 0.74rem; }
.rr-roll-ops b { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.rr-roll-ops em { font-style: normal; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-roll-head { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.rr-day { display: flex; align-items: center; gap: 0.6rem; font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.rr-day-track { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.rr-day-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.rr-release-money { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.5rem; }
.rr-release-money .bo-hero { font-size: 2.1rem; margin: 0; }
.rr-mini-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; border-top: 1px solid var(--grid); padding-top: 0.65rem; }
.rr-mini-stats div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rr-mini-stats b { font-size: 0.95rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rr-mini-stats span { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.rr-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.rr-bench { font-size: 0.78rem; color: var(--ink-2); display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }

.rr-game-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.rr-game-head h2 { margin: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.01em; }
.rr-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.rr-grid-3 > *, .rr-kpis > * { min-width: 0; }
.rr-payback-track { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 0.6rem 0 0.4rem; }
.rr-payback-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--money-1), var(--money-3)); }
.rr-kv { display: grid; grid-template-columns: minmax(8rem, max-content) minmax(0, 1fr); gap: 0.35rem 1rem; font-size: 0.85rem; margin-top: 0.6rem; }
.rr-kv span:nth-child(odd) { color: var(--muted); }
.rr-kv span:nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.rr-table-link { color: var(--ink); text-decoration: none; font-weight: 600; white-space: nowrap; }
.rr-table-link:hover { text-decoration: underline; }
.rr-sync { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--muted); }

.rr-mkt { display: inline-flex; align-items: center; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.06em;
  border-radius: 999px; padding: 0.14rem 0.45rem; white-space: nowrap; vertical-align: middle; }
.rr-mkt.reg { color: var(--mkt-reg); background: color-mix(in srgb, var(--mkt-reg) 14%, transparent); }
.rr-mkt.sweep { color: var(--mkt-sweep); background: color-mix(in srgb, var(--mkt-sweep) 14%, transparent); }
.rr-mix { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rr-mix-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--surface-2); gap: 2px; }
.rr-mix-bar span { display: block; height: 100%; }
.rr-mix-labels { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; font-size: 0.72rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rr-mix-labels i { font-style: normal; font-weight: 700; }
.rr-mix-labels .reg i { color: var(--mkt-reg); }
.rr-mix-labels .sweep i { color: var(--mkt-sweep); }
.rr-mix-labels .intl i { color: var(--mkt-intl); }
.rr-mkt.intl { color: var(--mkt-intl); background: color-mix(in srgb, var(--mkt-intl) 16%, transparent); }
.rr-mkts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; vertical-align: middle; }
/* The share rides inside the pill, dimmer than the market name it qualifies. */
.rr-mkts .rr-mkt i { font-style: normal; font-weight: 700; margin-left: 0.28rem; opacity: 0.75; letter-spacing: 0; }
.rr-mkt.more { color: var(--muted); background: color-mix(in srgb, var(--ink) 9%, transparent); }
.rr-release-mkts { margin-top: 0.35rem; }
/* Inside a table's mix cell the badges sit under the bar, tighter than elsewhere. */
.rr-mix .rr-mkts { margin-top: 0.3rem; gap: 0.25rem; }
.rr-mix .rr-mkts .rr-mkt { font-size: 0.6rem; padding: 0.05rem 0.3rem; }
/* The compact row layouts put the badges between the name and the value. */
.rr-list .rr-mkts { justify-self: end; }

/* --- Loading ---------------------------------------------------------- */
/* Placeholders shaped like the thing they stand in for, with a slow shimmer.
   Reduced-motion readers get a still block instead. */
.rr-skel { display: block; border-radius: 6px; margin: 0.35rem 0;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--ink) 7%, transparent) 0%,
    color-mix(in srgb, var(--ink) 13%, transparent) 50%,
    color-mix(in srgb, var(--ink) 7%, transparent) 100%);
  background-size: 200% 100%; animation: rr-shimmer 1.4s ease-in-out infinite; }
@keyframes rr-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@media (prefers-reduced-motion: reduce) { .rr-skel { animation: none; } }
.rr-skel-card { display: flex; flex-direction: column; gap: 0.15rem; min-height: 6rem; }
.rr-skel-chart { height: 11rem; margin: 0.6rem 0; border-radius: 8px; }
.rr-skel-text { display: block; margin: 0.6rem 0; }
.rr-loading-note { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 1rem; font-size: 0.86rem; color: var(--ink-2); }
.rr-spinner { width: 14px; height: 14px; flex: none; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--ink) 18%, transparent); border-top-color: var(--selected);
  animation: rr-spin 0.8s linear infinite; }
@keyframes rr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rr-spinner { animation-duration: 2.4s; } }

/* --- Monthly summary -------------------------------------------------- */
.rr-month { margin-bottom: 1rem; }
.rr-month-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem; margin-bottom: 0.4rem; }
.rr-month-head h3 { margin: 0; font-size: 1.05rem; font-weight: 800; display: flex; align-items: baseline; gap: 0.5rem; }
.rr-month-head h3 a { text-decoration: none; }
.rr-month-partial { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cat-8); }
.rr-month-ggr { font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rr-month-ggr small { font-size: 0.62rem; color: var(--muted); letter-spacing: 0.06em; }
.rr-month-chips { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; font-size: 0.8rem; }
.rr-month-link { margin-left: auto; font-size: 0.76rem; color: var(--muted); }
/* The month written out: prose at a reading measure, not a dashboard row. */
/* one statement per line: a kind label, then the sentence; good lines get green
   accents, bad lines red, so the month reads from its colours first */
.rr-month-says { list-style: none; margin: 0.3rem 0 0; padding: 0; max-width: 88ch; }
.rr-say { display: flex; gap: 0.8rem; align-items: baseline; padding: 0.38rem 0;
  border-top: 1px solid color-mix(in srgb, var(--ink) 9%, transparent); font-size: 0.92rem; line-height: 1.55; color: var(--ink-2); }
.rr-say:first-child { border-top: 0; }
.rr-say-kind { flex: 0 0 6.4rem; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.rr-say-kind.luck { color: var(--cat-8); } .rr-say-kind.play { color: var(--cat-2); } .rr-say-kind.calendar { color: var(--cat-7); }
.rr-say-kind.releases { color: var(--cat-1); } .rr-say-kind.operator { color: var(--cat-5); } .rr-say-kind.game { color: var(--cat-3); }
.rr-say-kind.markets { color: var(--cat-4); } .rr-say-kind.year { color: var(--cat-6); } .rr-say-kind.summary { color: var(--ink); }
.rr-say-text b { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.rr-say.good .rr-say-text b { color: var(--status-good); }
.rr-say.bad .rr-say-text b { color: var(--status-critical); }
.rr-say .pos, .rr-admin-intro .pos { color: var(--status-good); font-weight: 800; }
.rr-say .neg, .rr-admin-intro .neg { color: var(--status-critical); font-weight: 800; }
.rr-say.summary .rr-say-text, .rr-say:first-child .rr-say-text { color: var(--ink); }
@media (max-width: 640px) { .rr-say { flex-direction: column; gap: 0.1rem; } .rr-say-kind { flex-basis: auto; } }
.rr-month-text { max-width: 78ch; }
.rr-month-text p { margin: 0.55rem 0 0; font-size: 0.92rem; line-height: 1.65; color: var(--ink-2); }
.rr-month-text p:first-child { color: var(--ink); }
.rr-month-text b { color: var(--ink); font-variant-numeric: tabular-nums; }
.rr-summary-year { margin: 0.6rem 0; }
.rr-summary-year > summary { cursor: pointer; font-weight: 800; font-size: 0.86rem; padding: 0.5rem 0; color: var(--ink-2); }

/* --- Monthly summary: the board ---------------------------------------- */
/* Green is money gained, red money lost, nothing else is ever either; the
   kind colours (play, luck, calendar) are the narrative's. Tints are mixed
   from the status colours so they hold in both themes. */
.rr-ms .pos { color: var(--status-good); } .rr-ms .neg { color: var(--status-critical); }
.rr-ms-sub { font-size: 0.86rem; font-weight: 700; color: var(--ink-2); }
.rr-ms-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.7rem; margin: 0.5rem 0 0.9rem; }
.rr-ms-tile { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; padding: 0.7rem 0.85rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2); }
.rr-ms-tile-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-ms-tile-value { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.rr-ms-tile-sub { font-size: 0.74rem; color: var(--muted); line-height: 1.35; }
.rr-ms-tile.pos, .rr-ms-driver.pos, .rr-ms-col.pos { background: color-mix(in srgb, var(--status-good) 9%, var(--surface-1)); border-color: color-mix(in srgb, var(--status-good) 30%, var(--border)); }
.rr-ms-tile.neg, .rr-ms-driver.neg, .rr-ms-col.neg { background: color-mix(in srgb, var(--status-critical) 9%, var(--surface-1)); border-color: color-mix(in srgb, var(--status-critical) 30%, var(--border)); }
.rr-ms-tile.pos .rr-ms-tile-value, .rr-ms-driver.pos .rr-ms-driver-value, .rr-ms-col.pos h5 { color: var(--status-good); }
.rr-ms-tile.neg .rr-ms-tile-value, .rr-ms-driver.neg .rr-ms-driver-value, .rr-ms-col.neg h5 { color: var(--status-critical); }
/* Two independent columns, so a short panel is followed at once by the next
   one rather than waiting for its taller neighbour. */
.rr-ms-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0.9rem; align-items: start; margin-bottom: 0.9rem; }
.rr-ms-stack { display: flex; flex-direction: column; gap: 0.9rem; min-width: 0; }
.rr-ms-panel { border: 1px solid var(--border); border-radius: 10px; padding: 0.8rem 0.9rem; min-width: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.rr-ms-panel h4 { margin: 0; font-size: 0.95rem; font-weight: 800; }
.rr-ms-panel-note { font-size: 0.8rem; color: var(--muted); margin: -0.35rem 0 0; line-height: 1.4; }
.rr-ms-panel-note b { color: var(--ink); }
.rr-ms-panel-foot { font-size: 0.74rem; color: var(--muted); margin: auto 0 0; line-height: 1.4; }
.rr-ms-drivers { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0.6rem; }
.rr-ms-driver { padding: 0.7rem 0.8rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.rr-ms-kind { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.rr-ms-kind.luck { color: var(--cat-8); } .rr-ms-kind.play { color: var(--cat-2); } .rr-ms-kind.calendar { color: var(--cat-7); }
.rr-ms-driver-title { font-weight: 700; font-size: 0.88rem; color: var(--ink); }
.rr-ms-driver-value { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rr-ms-driver-note { font-size: 0.76rem; color: var(--ink-2); line-height: 1.4; margin-top: 0.2rem; }
.rr-ms-movers { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.rr-ms-col { border-radius: 10px; padding: 0.6rem 0.75rem; border: 1px solid var(--border); background: var(--surface-2); min-width: 0; }
.rr-ms-col h5 { margin: 0 0 0.2rem; font-size: 0.82rem; font-weight: 800; }
.rr-ms-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 0.6rem; align-items: baseline; padding: 0.42rem 0;
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.rr-ms-item:first-of-type { border-top: 0; }
.rr-ms-item-name { font-weight: 700; font-size: 0.84rem; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-ms-item-val { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 0.88rem; white-space: nowrap; }
.rr-ms-item-note { grid-column: 1 / -1; font-size: 0.72rem; color: var(--muted); line-height: 1.35; }
.rr-ms-item-note small { font-weight: 800; font-size: 0.58rem; letter-spacing: 0.06em; text-transform: uppercase; }
.rr-ms-item-none { margin: 0.3rem 0; font-size: 0.78rem; color: var(--muted); }
.rr-ms-launches { list-style: none; margin: 0; padding: 0; }
.rr-ms-markets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.rr-ms-dot { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; margin-right: 0.35rem; vertical-align: 0; background: var(--mkt-intl); }
.rr-ms-dot.reg { background: var(--mkt-reg); } .rr-ms-dot.sweep { background: var(--mkt-sweep); }
.rr-ms-year { margin-bottom: 0.9rem; }
.rr-ms-year-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.6rem; }
.rr-ms-take { margin: 0; padding: 0.7rem 0.9rem; border-radius: 10px; font-size: 0.9rem; line-height: 1.5; color: var(--ink);
  background: color-mix(in srgb, var(--brand) 7%, var(--surface-1)); border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--border)); }
.rr-ms-take b { color: var(--brand); margin-right: 0.45rem; }
.rr-ms-words { margin-top: 0.7rem; }
.rr-ms-words > summary { cursor: pointer; font-size: 0.78rem; color: var(--muted); font-weight: 700; }
.rr-ms-words > summary:hover { color: var(--ink); }
.rr-ms-words .rr-month-says { margin-top: 0.4rem; }
/* A folded month: one line to scan, the board behind it. */
.rr-ms-fold { margin-bottom: 0.5rem; }
.rr-ms-fold > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1rem;
  padding: 0.65rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-1); font-size: 0.86rem; box-shadow: var(--card-shadow); }
.rr-ms-fold > summary::-webkit-details-marker { display: none; }
.rr-ms-fold > summary::before { content: '▸'; color: var(--muted); font-size: 0.8rem; }
.rr-ms-fold[open] > summary::before { content: '▾'; }
.rr-ms-fold[open] > summary { margin-bottom: 0.5rem; }
.rr-ms-fold > summary:hover { border-color: var(--muted); }
.rr-ms-strip-month { font-weight: 800; color: var(--ink); }
.rr-ms-strip-ggr { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.rr-ms-strip-ggr small { font-size: 0.62rem; color: var(--muted); letter-spacing: 0.06em; }
.rr-ms-strip-chip { color: var(--ink-2); } .rr-ms-strip-chip b { font-weight: 800; font-variant-numeric: tabular-nums; }
.rr-ms-strip-chip .pos { color: var(--status-good); } .rr-ms-strip-chip .neg { color: var(--status-critical); }
.rr-ms-strip-muted { color: var(--muted); font-size: 0.78rem; margin-left: auto; }
.rr-summary-year .rr-ms-fold { margin-left: 0; }
@media (max-width: 960px) {
  .rr-ms-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rr-ms-cols { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .rr-ms-kpis { grid-template-columns: 1fr 1fr; }
  .rr-ms-movers, .rr-ms-markets { grid-template-columns: 1fr; }
  .rr-ms-strip-muted { margin-left: 0; }
}

/* --- Release phase ---------------------------------------------------- */
/* Pre-release is brand pink (the colour of "new" everywhere on Insights),
   full release the accent green, exclusive quiet. */
.rr-phase { display: inline-flex; align-items: center; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.07em;
  text-transform: uppercase; padding: 0.12rem 0.45rem; border-radius: 999px; white-space: nowrap; cursor: help; }
.rr-phase.pre { color: var(--brand); background: color-mix(in srgb, var(--brand) 18%, transparent); }
.rr-phase.full { color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.rr-phase.exclusive { color: var(--muted); background: color-mix(in srgb, var(--ink) 10%, transparent); }
.rr-release-dates { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; }
/* "no pre-release": outlined in the pre-release pink, so it reads as the
   absence of that phase rather than as another phase. */
.rr-prenote { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; cursor: help;
  padding: 0.08rem 0.42rem; border-radius: 999px; color: var(--brand); border: 1px dashed color-mix(in srgb, var(--brand) 60%, transparent); }
.rr-override { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; flex-basis: 100%; font-size: 0.8rem; }
.rr-override select { font-size: 0.8rem; }
/* The small "pre" inside a grade badge: this letter is the pre-release rating. */
.rr-grade-pre { font-size: 0.55em; font-weight: 800; letter-spacing: 0.04em; margin-left: 0.2em; text-transform: lowercase;
  color: var(--brand); vertical-align: 0.15em; }
/* Two ratings side by side in the grade card. */
.rr-grade-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 0.5rem 0; }
.rr-grade-col { padding: 0.5rem 0.6rem; border-radius: 8px; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.rr-grade-col.on { box-shadow: inset 0 0 0 1px var(--btn-border); }
.rr-grade-col h4 { margin: 0 0 0.25rem; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.rr-grade-col .rr-grade-letter { font-size: 1.6rem; }
.rr-grade-col small { display: block; color: var(--muted); font-size: 0.68rem; }
.rr-grade-col .rr-grade-steps { margin-top: 0.3rem; }
.rr-grade-dates { margin: 0.1rem 0 0.4rem; font-size: 0.72rem; color: var(--ink-2); }
.rr-grade-sub { margin: 0.2rem 0 0.1rem; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }

/* --- Account management ---------------------------------------------- */
.rr-coverage { display: flex; flex-direction: column; gap: 0.6rem; padding: 0.3rem 0 0.2rem; }
.rr-coverage-bar { height: 12px; border-radius: 6px; overflow: hidden; background: color-mix(in srgb, var(--ink) 9%, transparent); }
.rr-coverage-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: width 0.3s; }
.rr-coverage-text { font-size: 0.86rem; color: var(--ink-2); }
/* A name in the team panel is a filter, not a page: a button that reads as text. */
:is(.bo-root, .bo-app) button.rr-linkish {
  all: unset; cursor: pointer; font-weight: 600; min-height: 0; text-align: left;
}
:is(.bo-root, .bo-app) button.rr-linkish:hover { text-decoration: underline; }
:is(.bo-root, .bo-app) button.rr-linkish:focus-visible { outline: 2px solid var(--selected); outline-offset: 2px; border-radius: 3px; }
.rr-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 0.8rem;
  padding: 0.55rem 0.8rem; border-radius: 10px; background: color-mix(in srgb, var(--selected) 12%, transparent); }
.rr-assign td { vertical-align: middle; }
.rr-assign .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rr-assign select { min-width: 13rem; max-width: 100%; }
.rr-assign-name { font-weight: 600; }
.rr-assign-group { font-size: 0.78rem; }
/* Unassigned rows carry a thin amber edge: the list the lead is working through. */
.rr-assign tr.rr-unassigned td:first-child { box-shadow: inset 3px 0 0 var(--status-warning); }
.rr-mkt-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.rr-board td { vertical-align: middle; }
.rr-board-why { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.5rem; font-size: 0.8rem; color: var(--ink-2); min-width: 18rem; }
.rr-board-why .rr-verdict { margin-left: 0; }
/* Compare AMs: results first, size last and quieter. */
.rr-compare-ams td, .rr-compare-ams th { white-space: nowrap; }
.rr-compare-ams .rr-col-size { color: var(--muted); }
.rr-compare-ams tr.rr-unassigned-row td { border-top: 2px solid var(--grid); font-style: italic; }
.rr-meter { display: inline-flex; align-items: center; gap: 0.45rem; justify-content: flex-end; }
.rr-meter-bar { width: 4.5rem; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 10%, transparent); overflow: hidden; }
.rr-meter-bar > span { display: block; height: 100%; border-radius: 3px; }

/* --- People / roles --------------------------------------------------- */
.rr-role-chip { display: inline-flex; align-items: center; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.06em;
  padding: 0.08rem 0.36rem; border-radius: 5px; margin-left: 0.4rem; white-space: nowrap;
  color: var(--brand); background: color-mix(in srgb, var(--brand) 16%, transparent); }
.rr-role-chip.env { color: var(--muted); background: color-mix(in srgb, var(--ink) 10%, transparent); }
.rr-role-chip.blocked { color: var(--status-critical); background: color-mix(in srgb, var(--status-critical) 16%, transparent); }
/* A blocked person stays on the list — greyed, not hidden, so the block is
   something you can see and lift rather than a silent absence. */
.rr-people tr.rr-blocked td:first-child { color: var(--muted); }
.rr-user .rr-role-chip { margin-left: 0; }
.rr-you { font-size: 0.62rem; color: var(--muted); margin-left: 0.4rem; }
.rr-ok { color: var(--delta-up); font-size: 0.85rem; }
.rr-admin-intro { max-width: 62ch; margin: -0.3rem 0 1rem; }
.rr-add-person select, .rr-add-person input { width: 100%; }
.rr-add-person button { width: 100%; margin-top: 0.3rem; }
/* A form per row, so it must not introduce block layout inside the cell. */
.rr-inline-form { display: inline; }
.rr-people td { vertical-align: middle; }
.rr-people select { font-size: 0.8rem; padding: 0.2rem 0.4rem; }
.rr-people button { font-size: 0.68rem; padding: 0.25rem 0.6rem; }
.rr-role-key { margin: 1rem 0 0; display: grid; gap: 0.6rem; }
.rr-role-key dt { font-size: 0.78rem; font-weight: 700; }
.rr-role-key dd { margin: 0.1rem 0 0; font-size: 0.76rem; }

/* --- (!) caveat marker ------------------------------------------------- */
.rr-caveat { position: relative; display: inline-flex; align-items: center; vertical-align: middle; margin-left: 0.3rem; }
.rr-caveat > button {
  all: unset; cursor: pointer; box-sizing: border-box;
  /* 'all: unset' drops the intrinsic box, and a flex parent would stretch the
     dot on the cross axis — hence the explicit square and align-self.
     min-height opts out of the mobile finger-target rule in css.ts, which would
     otherwise force this to 34px tall and oval: the tap target is grown past
     the dot by the ::after below instead, so a thumb still gets 35px. */
  width: 15px; height: 15px; min-width: 15px; aspect-ratio: 1; flex: none; align-self: center;
  border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 0.64rem; font-weight: 800; line-height: 1;
  color: var(--status-warning, #d98324); background: color-mix(in srgb, var(--status-warning, #d98324) 18%, transparent);
}
/* The skin gives every control a 34px finger target on small screens
   (the :is(button, select, input...) rule in css.ts, specificity 0-3-1). That
   would make this dot 34px tall and oval. It opts out at matching specificity,
   later in the sheet — the thumb target is the 35px ::after below instead. */
:is(.bo-root, .bo-app) .rr-caveat > button.rr-caveat-dot { min-height: 15px; height: 15px; }
.rr-caveat > button::after { content: ''; position: absolute; inset: -10px; }
.rr-caveat > button:hover, .rr-caveat.open > button { background: color-mix(in srgb, var(--status-warning, #d98324) 34%, transparent); }
.rr-caveat > button:focus-visible { outline: 2px solid var(--selected); outline-offset: 2px; }

.rr-caveat-bubble {
  position: fixed; left: 0; top: 0;
  width: max-content; max-width: min(17rem, calc(100vw - 2rem));
  padding: 0.5rem 0.6rem; border-radius: 8px; z-index: 40;
  background: var(--surface-1); color: var(--ink); border: 1px solid var(--border);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  font-size: 0.74rem; font-weight: 400; line-height: 1.4; letter-spacing: 0; text-align: left;
  white-space: normal; opacity: 0; visibility: hidden; transition: opacity 0.12s;
}
.rr-caveat-bubble b { font-weight: 700; }

/* --- build stamp -------------------------------------------------------- */
.rr-build { display: inline-flex; align-items: center; flex: none; font-size: 0.7rem; color: var(--muted);
  font-variant-numeric: tabular-nums; letter-spacing: 0.02em; white-space: nowrap; }
.rr-buildcard { margin-bottom: 1rem; }
.rr-buildinfo { display: flex; flex-wrap: wrap; gap: 0 2.2rem; margin: 0; }
.rr-buildinfo dt { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.rr-buildinfo dd { margin: 0.1rem 0 0; font-size: 0.95rem; font-weight: 700;
  font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.rr-buildnote { font-size: 0.72rem; margin: 0.7rem 0 0; max-width: 62ch; }

/* --- diverging bars: losses grow left and red, gains right and green ------- */
.rr-divlist .track { overflow: visible; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.rr-divlist .axis { position: absolute; top: -3px; bottom: -3px; left: 50%; width: 1px; background: color-mix(in srgb, var(--ink) 28%, transparent); }
.rr-divlist .bar { inset: 0 auto 0 auto; border-radius: 999px; }
.rr-divlist .bar.up { left: 50%; border-radius: 0 999px 999px 0; }
.rr-divlist .bar.down { right: 50%; border-radius: 999px 0 0 999px; }
.rr-divlist .value.pos { color: var(--status-good); }
.rr-divlist .value.neg { color: var(--status-critical); }

/* --- countries ----------------------------------------------------------- */
.rr-mktbar { display: inline-flex; width: 72px; height: 8px; border-radius: 4px; overflow: hidden; background: color-mix(in srgb, var(--ink) 10%, transparent); vertical-align: middle; }
.rr-mktbar > span { display: block; height: 100%; }
.rr-ops-inline { display: inline-block; max-width: 20ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* --- missing-data warning, under the top bar on every page --------------- */
.rr-feed-alert { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.7rem; margin: 0;
  padding: 0.55rem 1.25rem; font-size: 0.8rem; line-height: 1.45;
  color: var(--status-critical, #ff6b6b); background: color-mix(in srgb, var(--status-critical, #ff6b6b) 14%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--status-critical, #ff6b6b) 40%, transparent); }
.rr-feed-alert b { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.rr-feed-alert a { color: inherit; text-decoration: underline; white-space: nowrap; }
@media (max-width: 760px) { .rr-feed-alert { padding: 0.5rem 0.85rem; } }

/* --- revenue & profit --------------------------------------------------- */
.rr-note { font-size: 0.74rem; margin: 0.8rem 0 0; max-width: 72ch; line-height: 1.5; }
.rr-revsplit th.num, .rr-revsplit td.num { text-align: right; font-variant-numeric: tabular-nums; }
.rr-revsplit td { vertical-align: middle; }
.rr-swatch { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 0.45rem; vertical-align: middle; }
/* Payback reads as a bar because the question is "how far", not "how much". */
.rr-payback { display: inline-flex; align-items: center; gap: 0.4rem; justify-content: flex-end; }
.rr-payback-track { display: inline-block; width: 52px; height: 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 12%, transparent); overflow: hidden; flex: none; }
.rr-payback-fill { display: block; height: 100%; border-radius: 999px; }
.rr-payback i { font-style: normal; font-size: 0.72rem; font-variant-numeric: tabular-nums; min-width: 2.6rem; text-align: right; }

/* --- timeline ----------------------------------------------------------- */
.rr-timeline { width: 100%; min-width: 0; line-height: 0; }
.rr-timeline svg { overflow: visible; }
.rr-timeline-label { font-size: 0.66rem; font-weight: 600; cursor: pointer; }
.rr-timeline-label:hover { text-decoration: underline; }
.rr-timeline-axis { font-size: 0.62rem; fill: var(--muted); }
.rr-tl-key { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.68rem; color: var(--muted); margin-left: 0.7rem; }
.rr-tl-key i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

.rr-events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rr-event { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr); gap: 0.7rem; padding: 0.5rem 0;
  border-top: 1px solid var(--grid); font-size: 0.82rem; line-height: 1.45; }
.rr-event:first-child { border-top: none; }
/* The rail carries the kind, so the text does not have to repeat it. */
.rr-event { border-left: 2px solid transparent; padding-left: 0.6rem; }
.rr-event.jump { border-left-color: var(--delta-up); }
.rr-event.drop { border-left-color: var(--delta-down); }
.rr-event.negative { border-left-color: var(--status-critical); }
.rr-event-when { color: var(--muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rr-event-why { color: var(--ink-2); }
.rr-event-why i { font-style: normal; font-variant-numeric: tabular-nums; font-weight: 600; }
/* Direction is the first thing to read in this list, so the numbers carry it
   rather than sitting in the same grey whichever way they went. */
.rr-event-why i.rr-up { color: var(--delta-up); }
.rr-event-why i.rr-down { color: var(--delta-down); }

/* --- a driver's operators ---------------------------------------------- */
.rr-drv { position: relative; display: inline-block; }
/* Two classes, not one: the skin styles every button as a pill
   (an :is(.bo-root,.bo-app) button rule, specificity 0-1-1) and would out-rank a
   single class, turning each delta into a bordered lozenge mid-sentence. */
.rr-drv .rr-drv-btn {
  all: unset; cursor: pointer; font-variant-numeric: tabular-nums; font-weight: 600;
  border-bottom: 1px dotted currentColor; line-height: inherit;
}
/* And the mobile finger-target rule (0-3-1) would give it a 34px box inside a
   line of prose. The doubled class clears it; the text stays a text target. */
:is(.bo-root, .bo-app) .rr-drv .rr-drv-btn.rr-drv-btn { min-height: 0; padding: 0; }
.rr-drv .rr-drv-btn:focus-visible { outline: 2px solid var(--selected); outline-offset: 2px; border-radius: 2px; }
.rr-drv-card { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none;
  width: max-content; max-width: min(19rem, calc(100vw - 2rem));
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 9px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); padding: 0.55rem 0.65rem;
  opacity: 0; visibility: hidden; transition: opacity 0.1s; }
/* Shown from state, never from :hover alone — the card is portalled into
   .bo-app now, so no ancestor selector could reach it, and a CSS-only reveal
   would flash it at the corner it has not been placed away from yet. */
.rr-drv-card.open { opacity: 1; visibility: visible; }
.rr-drv-title { margin: 0 0 0.35rem; font-size: 0.72rem; font-weight: 700; color: var(--ink); }
.rr-drv-rows { margin: 0; display: grid; gap: 0.1rem; }
.rr-drv-rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 0.8rem; }
/* An operator that moved against the day is context, not cause. */
.rr-drv-rows > div.against { opacity: 0.55; }
.rr-drv-rows dt { font-size: 0.7rem; color: var(--ink-2); min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.rr-drv-rows dd { margin: 0; font-size: 0.72rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
.rr-drv-verdict { margin: 0.5rem 0 0; padding-top: 0.45rem; border-top: 1px solid var(--grid);
  font-size: 0.71rem; line-height: 1.4; color: var(--selected); font-weight: 600; }
.rr-drv-note { margin: 0.3rem 0 0; font-size: 0.66rem; color: var(--muted); }
.rr-up { color: var(--delta-up); }
.rr-down { color: var(--delta-down); }

/* --- launch grade ------------------------------------------------------- */
/* The badge is a letter first and a control second: no fill, no pill, just the
   grade in its own colour with a hairline box, so a column of them reads as a
   column of grades rather than a column of buttons. */
.rr-grade { position: relative; display: inline-flex; align-items: center; gap: 0.4rem; min-width: 0; }
/* On a bare game name the wrapper must not become a box: inline-flex would stop
   the name wrapping with the sentence around it and knock it off the baseline.
   Nothing is positioned against it either, since the card is portalled out. */
.rr-grade.bare { display: inline; }
.rr-grade-badge {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  min-width: 1.75rem; padding: 0.05rem 0.3rem; border-radius: 5px;
  border: 1px solid var(--border); color: var(--muted);
  font-size: 0.74rem; font-weight: 800; letter-spacing: 0.01em; line-height: 1.5;
  cursor: pointer; user-select: none;
}
.rr-grade-badge.lg { min-width: 2.3rem; font-size: 1rem; padding: 0.1rem 0.45rem; border-width: 1.5px; }
.rr-grade-badge:focus-visible { outline: 2px solid var(--selected); outline-offset: 2px; }
/* The finger-target rule in the skin (0-3-1) would inflate this to 34px inside
   a table row; the doubled class clears it, as it does for the driver deltas. */
:is(.bo-root, .bo-app) .rr-grade .rr-grade-badge.rr-grade-badge { min-height: 0; }

.rr-grade-card { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none;
  width: max-content; max-width: min(21rem, calc(100vw - 2rem));
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 9px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); padding: 0.6rem 0.7rem; line-height: 1.35;
  opacity: 0; visibility: hidden; transition: opacity 0.1s; }
/* Shown from state, never from :hover alone — the card lives at the end of
   <body> now, so no ancestor selector could reach it, and a CSS-only reveal
   would flash it at the corner it has not been placed away from yet. */
.rr-grade-card.open { opacity: 1; visibility: visible; }
.rr-grade-title { margin: 0 0 0.45rem; font-size: 0.72rem; font-weight: 700; color: var(--ink); }
.rr-grade-hero { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.55rem; }
.rr-grade-letter { font-size: 2.1rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.rr-grade-hero b { display: block; font-size: 0.8rem; color: var(--ink); }
.rr-grade-hero small { display: block; font-size: 0.68rem; color: var(--muted); }

/* Day 7 / 14 / 30 side by side, because the story of a release is usually the
   movement between them — a slow start that turns, or a fast one that fades. */
.rr-grade-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.3rem;
  margin: 0 0 0.55rem; padding: 0.35rem 0; border-top: 1px solid var(--grid); border-bottom: 1px solid var(--grid); }
.rr-grade-steps > span { text-align: center; }
.rr-grade-steps b { display: block; font-size: 0.86rem; font-weight: 800; color: var(--muted); }
.rr-grade-steps small { display: block; font-size: 0.62rem; color: var(--muted); }
.rr-grade-steps > span.off { opacity: 0.4; }
.rr-grade-steps > span.on b { text-decoration: underline; text-underline-offset: 3px; }

.rr-grade-rows { margin: 0; display: grid; gap: 0.1rem; }
.rr-grade-rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 0.9rem; }
.rr-grade-rows dt { font-size: 0.7rem; color: var(--muted); min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.rr-grade-rows dd { margin: 0; font-size: 0.72rem; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
.rr-grade-verdict { margin: 0.5rem 0 0; padding-top: 0.45rem; border-top: 1px solid var(--grid);
  font-size: 0.72rem; line-height: 1.4; color: var(--selected); font-weight: 600; }
/* The caveat that stops an early F being read as a bad game. */
.rr-grade-note { margin: 0.35rem 0 0; font-size: 0.68rem; line-height: 1.4; color: var(--status-warning); }
.rr-grade-none { margin: 0; font-size: 0.74rem; color: var(--ink-2); }
.rr-grade-scale { margin: 0.5rem 0 0; padding-top: 0.4rem; border-top: 1px solid var(--grid);
  font-size: 0.65rem; line-height: 1.35; color: var(--muted); }

.rr-grade-legend { display: flex; flex-wrap: wrap; gap: 0.15rem 0.85rem; margin-top: 0.6rem;
  font-size: 0.68rem; color: var(--muted); }
.rr-grade-legend b { font-weight: 800; }

/* The timeline's own popup: an HTML card over the SVG, because an SVG <title>
   cannot be styled and never appears on a phone. */
.rr-timeline { position: relative; }
.rr-tlpop { position: absolute; z-index: 30; pointer-events: none;
  /* Sizes to its content up to a ceiling, and never wider than the chart it
     sits in — the component measures the result and positions from that. */
  width: max-content; max-width: min(250px, calc(100% - 8px));
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 9px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35); padding: 0.55rem 0.65rem; line-height: 1.35; }
.rr-tlpop::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  border-radius: 9px 0 0 9px; }
.rr-tlpop.release::before { background: var(--brand); }
.rr-tlpop.jump::before { background: var(--delta-up); }
.rr-tlpop.drop::before { background: var(--delta-down); }
.rr-tlpop-title { margin: 0 0 0.35rem; font-size: 0.78rem; font-weight: 700; color: var(--ink); }
.rr-tlpop-rows { margin: 0; display: grid; gap: 0.12rem; }
.rr-tlpop-rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 0.7rem; }
/* The label wraps rather than ellipsising. A driver row reads
   "Midas Hype House · +2 operators" — truncating it loses the cause, and
   holding it on one line pushed the value out past the card's own edge. */
.rr-tlpop-rows dt { font-size: 0.7rem; color: var(--muted); min-width: 0;
  white-space: normal; overflow-wrap: anywhere; }
.rr-tlpop-rows dd { margin: 0; font-size: 0.74rem; font-weight: 700;
  font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
.rr-tlpop-note { margin: 0.4rem 0 0; font-size: 0.68rem; color: var(--muted); }
/* The "why" is the point of the card, so it is ruled off and coloured rather
   than trailing after the numbers in the same grey as a footnote. */
.rr-tlpop-why { margin: 0.5rem 0 0; padding-top: 0.45rem; border-top: 1px solid var(--grid);
  font-size: 0.72rem; line-height: 1.4; color: var(--selected); font-weight: 600; }
.rr-tlpop.rail::before { background: var(--selected); }

/* Operator rollout: three nested widths, so how FAST it spread reads at a glance. */
.rr-rollout { display: inline-flex; align-items: center; gap: 0.4rem; justify-self: end; }
.rr-rollout-bar { position: relative; display: inline-block; width: 46px; height: 6px;
  border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--ink) 10%, transparent); flex: none; }
.rr-rollout-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; }
.rr-rollout { font-size: 0.7rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Releases get their own two-line row: name + money, then rollout + context.
   Squeezed into the shared .rr-list grid the names collapsed to one letter. */
.rr-releases { display: flex; flex-direction: column; }
.rr-release-row { display: block; padding: 0.55rem 0; border-top: 1px solid var(--grid); text-decoration: none; color: inherit; }
.rr-release-row:first-child { border-top: none; }
.rr-release-row:hover .rr-release-title { text-decoration: underline; }
.rr-release-top { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; }
.rr-release-title { font-weight: 600; font-size: 0.85rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-release-money { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.rr-release-bot { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 0.22rem; flex-wrap: wrap; }
.rr-release-meta { font-size: 0.7rem; color: var(--muted); white-space: nowrap; }

/* "+34 ops" beside a driver: the usual reason a game jumps in one day. */
.rr-cause { display: inline-block; margin-left: 0.3rem; font-size: 0.64rem; font-weight: 700;
  letter-spacing: 0.02em; padding: 0.02rem 0.3rem; border-radius: 4px; white-space: nowrap;
  color: var(--selected); background: color-mix(in srgb, var(--selected) 16%, transparent); }
/* Hover is the desktop affordance; .open is the tap one, and a phone has no hover. */
@media (hover: hover) {
  .rr-pop:hover .rr-caveat-bubble { opacity: 1; visibility: visible; }
}
.rr-pop.open .rr-caveat-bubble { opacity: 1; visibility: visible; }

/* A growth figure that opens the popup with the amounts behind it. A dotted
   underline says "there is more here" without shouting. Written at the same
   specificity as the caveat dot so the skin's button surface, padding and
   34px finger target do not turn a "+3%" into a pill. */
.rr-pop:not(.rr-caveat) { position: relative; display: inline; }
:is(.bo-root, .bo-app) .rr-pop > button.rr-growth {
  all: unset; cursor: help; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
  min-height: 0; height: auto;
  text-decoration: underline dotted; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
:is(.bo-root, .bo-app) .rr-pop > button.rr-growth.up { color: var(--delta-up); }
:is(.bo-root, .bo-app) .rr-pop > button.rr-growth.down { color: var(--delta-down); }
:is(.bo-root, .bo-app) .rr-pop > button.rr-growth.flat { color: var(--ink-2); }
:is(.bo-root, .bo-app) .rr-pop > button.rr-growth:focus-visible { outline: 2px solid var(--selected); outline-offset: 2px; border-radius: 3px; }
.rr-caveat-bubble .rr-pop-sub { display: block; color: var(--muted); margin-top: 0.15rem; }
.rr-risk { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.06em; border-radius: 999px; padding: 0.12rem 0.45rem; white-space: nowrap; cursor: help; }
.rr-risk.written_off { color: var(--status-critical); background: color-mix(in srgb, var(--status-critical) 15%, transparent); }
.rr-risk.provision { color: var(--status-warning); background: color-mix(in srgb, var(--status-warning) 16%, transparent); }
.rr-risk.resolved { color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent); }
.rr-op { display: inline-flex; flex-direction: column; gap: 2px; min-width: 0; }
.rr-op-main { display: inline-flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.rr-op-name { font-weight: 600; color: var(--ink); text-decoration: none; }
.rr-op-name:hover { text-decoration: underline; }
.rr-op-sub { font-size: 0.72rem; color: var(--muted); }
.rr-op-new { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.08em; color: #fff; border-radius: 999px; padding: 0.12rem 0.42rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.rr-legend-inline { display: flex; gap: 1rem; font-size: 0.75rem; color: var(--muted); margin-top: 0.6rem; }
.rr-legend-inline span { display: inline-flex; align-items: center; gap: 0.35rem; }
.rr-legend-inline b { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.rr-explorer-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-bottom: 0.85rem; }
.rr-search { flex: 0 1 300px; min-width: 200px; }
.rr-explorer-count { font-variant-numeric: tabular-nums; }
.rr-count { opacity: 0.6; font-size: 0.72rem; margin-left: 0.15rem; font-variant-numeric: tabular-nums; }
th.rr-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.rr-sortable:hover { color: var(--ink); }
.rr-sort-arrow { margin-left: 0.3rem; opacity: 0.35; font-size: 0.68rem; }
th.rr-sorted { color: var(--ink); }
th.rr-sorted .rr-sort-arrow { opacity: 1; color: var(--selected); }
.rr-more { display: flex; gap: 0.5rem; justify-content: center; padding-top: 0.85rem; }
select.rr-select-on { border-color: var(--selected); color: var(--ink); font-weight: 600; }
/* while the server renders a new period, every card and tile on the page is
   visibly loading: content dims and a shimmer sweeps across; the bar itself,
   the page title and the sidebar stay live */
.rr-period-label.is-loading { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--ink); font-weight: 600; }
html[data-rr-pending] .bo-content .bo-card { position: relative; pointer-events: none; }
html[data-rr-pending] .bo-content .bo-card > * { opacity: 0.3; transition: opacity 0.15s; }
html[data-rr-pending] .bo-content .bo-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(100deg, transparent 20%, color-mix(in srgb, var(--ink) 9%, transparent) 50%, transparent 80%);
  background-size: 200% 100%; animation: rr-shimmer 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { html[data-rr-pending] .bo-content .bo-card::after { animation: none; } }

/* CUSTOM: the last tab of the time frame; holds the chosen window and opens the calendar */
.rr-periodbar > .bo-tabs.rr-tabs-custom { overflow: visible; }
.rr-custom-wrap { position: relative; display: inline-flex; }
.rr-cal-nav button { min-width: 2rem; padding: 0.2rem 0.6rem; font-size: 1rem; line-height: 1; border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; }
.rr-cal-nav button:disabled { opacity: 0.35; cursor: default; }
.rr-tab-custom { white-space: nowrap; }
.rr-cal { position: absolute; top: calc(100% + 0.5rem); right: 0; z-index: 40; min-width: 36rem; padding: 0.8rem 0.9rem;
  background: var(--card, #23262b); border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45); text-align: left; text-transform: none; letter-spacing: 0; font-weight: 400; }
.rr-cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.5rem; }
.rr-cal-nav .bo-btn { min-width: 2rem; padding: 0.2rem 0.6rem; font-size: 1rem; line-height: 1; }
.rr-cal-sel { font-size: 0.82rem; font-weight: 700; color: var(--ink); }
.rr-cal-months { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.rr-cal-title { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 0.4rem 0.2rem; }
.rr-cal-grid { display: grid; grid-template-columns: repeat(7, 2.1rem); gap: 2px 0; }
.rr-cal-wd { font-size: 0.62rem; color: var(--muted); text-align: center; padding-bottom: 0.2rem; }
/* day cells out-specify the app's pill buttons: square, borderless, a band when in the range */
.rr-cal .rr-cal-grid .rr-cal-day { height: 2rem; min-width: 0; margin: 0; padding: 0; border: 0; box-shadow: none; background: transparent; color: var(--ink-2); font: inherit; font-size: 0.8rem; font-weight: 500; cursor: pointer; border-radius: 0; }
.rr-cal .rr-cal-grid .rr-cal-day:hover:not(.off) { background: color-mix(in srgb, var(--selected) 28%, transparent); color: var(--ink); }
.rr-cal .rr-cal-grid .rr-cal-day.off { color: color-mix(in srgb, var(--muted) 45%, transparent); cursor: default; background: transparent; }
.rr-cal .rr-cal-grid .rr-cal-day.in { background: color-mix(in srgb, var(--selected) 22%, transparent); color: var(--ink); }
.rr-cal .rr-cal-grid .rr-cal-day.edge { background: var(--selected); color: #fff; font-weight: 700; }
.rr-cal .rr-cal-grid .rr-cal-day.start { border-radius: 8px 0 0 8px; }
.rr-cal .rr-cal-grid .rr-cal-day.end { border-radius: 0 8px 8px 0; }
.rr-cal .rr-cal-grid .rr-cal-day.start.end { border-radius: 8px; }
.rr-cal-foot { font-size: 0.7rem; margin-top: 0.6rem; }
/* On a phone the calendar is a sheet in the middle of the screen rather than a
   popover hanging off the tab row, so it can never push the page wide. */
@media (max-width: 760px) {
  .rr-cal { position: fixed; min-width: 0; width: auto; left: 1rem; right: 1rem; top: 50%; transform: translateY(-50%); max-height: calc(100vh - 2rem); overflow-y: auto; }
  .rr-cal-months { grid-template-columns: 1fr; }
}
.rr-clear { font-size: 0.78rem; }

.rr-periodbar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-bottom: 1rem; transition: opacity 0.15s; }
.rr-periodbar.rr-pending { opacity: 0.7; }
.rr-periodbar > .bo-tabs, .rr-explorer-bar > .bo-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.rr-periodbar > .bo-tabs::-webkit-scrollbar, .rr-explorer-bar > .bo-tabs::-webkit-scrollbar { display: none; }
.rr-periodbar .bo-tab, .rr-explorer-bar .bo-tab { flex: none; }
.rr-period-label { font-size: 0.8rem; }
.rr-page-head { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.rr-page-head h2 { margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; }
.rr-kpis.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.rr-kpis.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rr-kpis.eight { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* The hero number and its sparkline sit side by side while there is room and
   stack once the tile gets narrow — never overlapping (the spark draws outside
   its own box, so it must never be squeezed). */
/* Numbers first, trend across the whole card beneath them. */
.bo-stat-col { display: flex; flex-direction: column; gap: 0.55rem; min-width: 0; }
.bo-stat-col > .bo-stat-head { min-width: 0; }
/* Pushes the trend to the bottom so tiles in a row line their charts up even
   when one has an extra sub-line. */
.bo-stat-col > .rr-spark-fluid { margin-top: auto; }
.rr-spark-fluid { width: 100%; min-width: 0; line-height: 0; }
.rr-kpi { display: flex; flex-direction: column; }
.rr-kpi .bo-stat-col { flex: 1; }
.rr-kpi .bo-hero-sub { white-space: normal; line-height: 1.35; row-gap: 0.3rem; flex-wrap: wrap; }
.rr-kpi .bo-hero { line-height: 1.05; }
.rr-kpi .bo-hero { font-size: 1.75rem; }
.rr-grid-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; }
.rr-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.rr-podium .bo-card { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 0.5rem; }
.rr-rank { font-size: 2.4rem; font-weight: 900; line-height: 1; letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rr-rank-move { font-size: 0.72rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.rr-rank-move.up { color: var(--delta-up); } .rr-rank-move.down { color: var(--delta-down); } .rr-rank-move.new { color: var(--brand); }
.rr-list { display: flex; flex-direction: column; }
.rr-list a, .rr-list > div { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto auto; gap: 0.6rem; align-items: center;
  padding: 0.45rem 0; border-top: 1px solid var(--grid); text-decoration: none; color: inherit; font-size: 0.86rem; }
.rr-list a:first-child, .rr-list > div:first-child { border-top: none; }
.rr-list a:hover .rr-list-name { text-decoration: underline; }
.rr-list-n { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.78rem; text-align: right; }
.rr-list-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-list-val { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.rr-list-val small { display: block; font-size: 0.7rem; }
.rr-insight { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.86rem; padding: 0.5rem 0; border-top: 1px solid var(--grid); }
.rr-insight:first-child { border-top: none; }
.rr-insight b { font-variant-numeric: tabular-nums; }
.rr-insight-icon { width: 1.4rem; text-align: center; flex: none; }

/* --- Insights --------------------------------------------------------- */
/* The headline card: the number, how it moved, and the sentences that say
   why — side by side on a desk, stacked on a phone. */
.rr-headline { display: grid; grid-template-columns: minmax(280px, 0.9fr) 1.5fr; gap: 1.4rem; margin-bottom: 1rem; }
.rr-headline-main { display: flex; flex-direction: column; gap: 0.2rem; }
.rr-headline-value { font-size: 2.3rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.rr-headline-unit { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; }

/* Both comparisons, stacked: the same period is down on last month and up on
   last year, and showing one without the other misleads. */
.rr-compare { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.9rem; }
.rr-compare-row { display: grid; grid-template-columns: auto auto; gap: 0.1rem 0.6rem; align-items: baseline; }
.rr-compare-delta { font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rr-compare-delta.up { color: var(--delta-up); }
.rr-compare-delta.down { color: var(--delta-down); }
.rr-compare-abs { font-size: 0.86rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.rr-compare-what { grid-column: 1 / -1; font-size: 0.76rem; color: var(--ink-2); line-height: 1.35; }

/* The period's other measures against both comparisons at once — the KPI strip
   folded into the headline, so one glance covers month and year. */
.rr-vitals { width: 100%; border-collapse: collapse; margin-top: 1.1rem; font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.rr-vitals th, .rr-vitals td { padding: 0.3rem 0.4rem 0.3rem 0; text-align: right; white-space: nowrap; }
.rr-vitals thead th { font-size: 0.64rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.rr-vitals tbody th { text-align: left; font-weight: 600; color: var(--ink-2); }
.rr-vitals tbody tr { border-top: 1px solid var(--grid); }
.rr-vitals td:last-child, .rr-vitals th:last-child { padding-right: 0; }
.rr-vital-up { color: var(--delta-up); }
.rr-vital-down { color: var(--delta-down); }

.rr-spark { margin-top: 1.1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.rr-spark-bars { display: flex; align-items: flex-end; gap: 3px; height: 46px; }
.rr-spark-bar { flex: 1; border-radius: 2px 2px 0 0; background: color-mix(in srgb, var(--ink) 18%, transparent); }
.rr-spark-bar.on { background: var(--money-1); }
.rr-spark-caption { font-size: 0.7rem; }

/* Two groups of sentences, one per comparison, with a rule between them. The
   two titles carry different accents so the eye knows which story it is in. */
.rr-why { border-left: 1px solid var(--grid); padding-left: 1.4rem; display: flex; flex-direction: column; gap: 1.4rem; }
/* The group header is a tinted band in the group's accent — blue for the
   period before, violet for a year ago — so it cannot be mistaken for one of
   the small uppercase row labels underneath it. */
.rr-why-group { --accent: var(--cat-1); }
.rr-why-group.year { --accent: var(--cat-5); }
.rr-why-title {
  margin: 0 0 0.35rem; display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem 0.7rem;
  padding: 0.5rem 0.75rem; border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  border-left: 3px solid var(--accent);
  font-size: 0.98rem; font-weight: 800; letter-spacing: -0.005em; text-transform: none; line-height: 1.2;
}
.rr-why-name { color: var(--ink); }
.rr-why-delta { display: inline-flex; align-items: baseline; gap: 0.45rem; font-size: 0.82rem; font-weight: 800;
  padding: 0.12rem 0.55rem; border-radius: 999px; }
.rr-why-delta.up { color: var(--delta-up); background: color-mix(in srgb, var(--delta-up) 16%, transparent); }
.rr-why-delta.down { color: var(--delta-down); background: color-mix(in srgb, var(--delta-down) 16%, transparent); }
.rr-why-delta-abs { font-weight: 700; opacity: 0.85; }
.rr-why-sub { margin-left: auto; font-size: 0.74rem; font-weight: 600; color: var(--accent); }
.rr-why .rr-insight:first-of-type { border-top: none; }

/* The figure palette. Six meanings, six colours, nothing decorative:
   gained / lost, play, luck, the calendar, games arriving, operators. */
.rr-fig { font-variant-numeric: tabular-nums; }
.rr-fig.up { color: var(--delta-up); }
.rr-fig.down { color: var(--delta-down); }
.rr-fig.play { color: var(--cat-1); }      /* turnover, rounds — how much was staked */
.rr-fig.hold { color: var(--cat-5); }      /* hold and RTP — the part we do not control */
.rr-fig.time { color: var(--cat-8); }      /* days, and what a day was worth */
.rr-fig.new { color: var(--brand); }       /* games arriving and leaving */
.rr-fig.ops { color: var(--cat-3); }       /* operators */
.rr-fig.mix { color: var(--ink-2); }       /* the markets colour themselves */
.rr-insight-icon.rr-fig { font-weight: 400; }
/* An amount is one token: "−" at the end of a line and "€157.6K" on the next
   reads as two numbers. */
.rr-amt, .rr-why-delta { white-space: nowrap; }

/* The why-ledger: a coloured label column, then only figures. Replaces a page
   of sentences whose words mostly restated what the label now says. */
.rr-why-delta { font-variant-numeric: tabular-nums; }
.rr-ledger { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr); column-gap: 0.8rem; }
.rr-ledger-row { display: contents; }
.rr-ledger-label { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.5rem 0; border-top: 1px solid var(--grid); line-height: 1.6; }
.rr-ledger-body { font-size: 0.84rem; line-height: 1.55; padding: 0.4rem 0; border-top: 1px solid var(--grid); }
.rr-ledger-row:first-child > * { border-top: none; }
.rr-ledger-label.up { color: var(--delta-up); }
.rr-ledger-label.down { color: var(--delta-down); }
.rr-ledger-label.play { color: var(--cat-1); }
.rr-ledger-label.hold { color: var(--cat-5); }
.rr-ledger-label.time { color: var(--cat-8); }
.rr-ledger-label.new { color: var(--brand); }
.rr-ledger-label.ops { color: var(--cat-3); }
.rr-ledger-label.mix { color: var(--ink-2); }
.rr-ledger-dim { color: var(--muted); }
.rr-ledger-item { white-space: nowrap; }
.rr-ledger-item:has(.rr-ledger-game) { white-space: normal; }
.rr-ledger-dot { color: var(--muted); margin: 0 0.2rem; }
.rr-ledger-meta { display: block; font-size: 0.72rem; color: var(--muted); margin-top: 0.1rem; }
/* Game names in the ledger are links, but a row of underlines is noise. */
.rr-ledger-game a { text-decoration: none; }
.rr-ledger-game a:hover { text-decoration: underline; }
/* A driver tag beside an amount: small, coloured, no brackets needed. */
.rr-tag { font-size: 0.72rem; font-weight: 700; }
.rr-tag.new { color: var(--brand); }
.rr-tag.hold { color: var(--cat-5); }
.rr-tag.ops { color: var(--cat-3); }
.rr-tag.time { color: var(--cat-8); }
.rr-tag.play { color: var(--cat-1); }

/* Movers with their reason. Three lines per game: what moved, by how much and
   how old it is, then a driver chip, the evidence, and whether it is normal. */
.rr-movers { display: flex; flex-direction: column; }
.rr-mover { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: 0.6rem; padding: 0.65rem 0; border-top: 1px solid var(--grid); }
.rr-mover:first-child { border-top: none; }
.rr-mover .rr-list-n { padding-top: 0.15rem; }
.rr-mover-body { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.rr-mover-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; font-size: 0.88rem; }
.rr-mover-name { font-weight: 700; text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-mover-name:hover { text-decoration: underline; }
.rr-mover-sub { font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.rr-mover-why { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.5rem; font-size: 0.78rem; line-height: 1.4; margin-top: 0.15rem; }
.rr-mover-evidence { flex: 1 1 14rem; color: var(--ink-2); }

/* The driver chip: a tinted pill in the driver's palette colour. */
.rr-driver { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.07em; padding: 0.12rem 0.45rem; border-radius: 999px; white-space: nowrap; flex: none; }
.rr-driver.new { color: var(--brand); background: color-mix(in srgb, var(--brand) 18%, transparent); }
.rr-driver.hold { color: var(--cat-5); background: color-mix(in srgb, var(--cat-5) 18%, transparent); }
.rr-driver.ops { color: var(--cat-3); background: color-mix(in srgb, var(--cat-3) 16%, transparent); }
.rr-driver.time { color: var(--cat-8); background: color-mix(in srgb, var(--cat-8) 16%, transparent); }
.rr-driver.play { color: var(--cat-1); background: color-mix(in srgb, var(--cat-1) 16%, transparent); }

/* Normal or not. "Normal" stays quiet on purpose — the flag is for the odd ones. */
.rr-verdict { font-size: 0.68rem; font-weight: 700; white-space: nowrap; margin-left: auto; }
.rr-verdict.muted { color: var(--muted); font-weight: 600; }
.rr-verdict.up { color: var(--delta-up); }
.rr-verdict.down { color: var(--delta-down); }

/* The waterfall. Rows are a fixed three-column grid so every label, bar and
   number lines up, and the bars share one scale across the card. */
.rr-bridge { display: flex; flex-direction: column; gap: 0.15rem; }
.rr-bridge-post, .rr-bridge-step {
  display: grid; grid-template-columns: minmax(96px, 1.2fr) minmax(70px, 1.6fr) minmax(76px, auto);
  gap: 0.6rem; align-items: center; padding: 0.4rem 0; font-size: 0.82rem;
}
.rr-bridge-post { font-weight: 700; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
/* Labels wrap rather than truncate: "Operators that stopped" cut to
   "Operators that …" tells the reader nothing, and a second line is free. */
.rr-bridge-label { color: var(--ink-2); line-height: 1.25; }
.rr-bridge-post .rr-bridge-label { color: var(--ink); }
.rr-bridge-track { position: relative; height: 14px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.rr-bridge-fill { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: color-mix(in srgb, var(--ink) 28%, transparent); }
/* The centre line is the only fixed reference in the step rows: left of it is
   money lost, right of it money gained. */
.rr-bridge-zero { position: absolute; top: -2px; bottom: -2px; left: 50%; width: 1px; background: var(--axis); }
.rr-bridge-bar { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.rr-bridge-bar.up { background: var(--delta-up); }
.rr-bridge-bar.down { background: var(--delta-down); }
.rr-bridge-val { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rr-bridge-val.up { color: var(--delta-up); }
.rr-bridge-val.down { color: var(--delta-down); }

.rr-splits { display: flex; flex-direction: column; }
/* The label keeps a floor: an auto-sized value column otherwise eats the whole
   row on a narrow card and leaves the name as an ellipsis. */
.rr-split-row { display: grid; grid-template-columns: minmax(84px, 1fr) auto; gap: 0.6rem; align-items: center;
  padding: 0.45rem 0; border-top: 1px solid var(--grid); font-size: 0.86rem; }
.rr-split-row:first-child { border-top: none; }
.rr-split-row .rr-list-name { font-weight: 600; }

@media (max-width: 900px) {
  .rr-headline { grid-template-columns: 1fr; }
  .rr-ledger { grid-template-columns: 4.4rem minmax(0, 1fr); column-gap: 0.6rem; }
  .rr-why { border-left: none; border-top: 1px solid var(--grid); padding-left: 0; padding-top: 0.6rem; }
  .rr-spark { margin-top: 0.6rem; }
}

.rr-stage { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; border-radius: 999px; padding: 0.12rem 0.45rem; white-space: nowrap;
  color: var(--ink-2); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.rr-stage.new { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.rr-stage.ramping { color: var(--brand); background: color-mix(in srgb, var(--brand) 15%, transparent); }
.rr-stage.growing { color: var(--delta-up); background: color-mix(in srgb, var(--delta-up) 15%, transparent); }
.rr-stage.fading { color: var(--delta-down); background: color-mix(in srgb, var(--delta-down) 14%, transparent); }
.rr-stage.inactive { color: var(--muted); background: transparent; border: 1px dashed var(--border); }
.rr-cur { display: inline-block; font-family: ui-monospace, monospace; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 0.08rem 0.4rem; border-radius: 6px; border: 1.5px solid var(--border); color: var(--ink); white-space: nowrap; }
code { font-family: ui-monospace, monospace; font-size: 0.85em; }

.rr-login { flex: 1 1 100%; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.rr-login-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 1rem; padding: 1.6rem 1.5rem; }
.rr-login-brand { display: flex; justify-content: center; }
.rr-login-title { margin: 0; font-size: 1.1rem; font-weight: 700; text-align: center; letter-spacing: 0.02em; }
.rr-login-form { gap: 0.9rem; }
.rr-login-form input { width: 100%; }
.rr-login-form button { width: 100%; margin-top: 0.3rem; }
.rr-login-foot { text-align: center; font-size: 0.72rem; margin: 0; }
/* The SSO control is a link, not a button, so it cannot inherit .bo-primary. */
.rr-login-sso { display: block; text-align: center; text-decoration: none; font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.02em; padding: 0.55rem 1.05rem; border-radius: 999px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 6px color-mix(in srgb, var(--accent) 40%, transparent); }
.rr-login-sso:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.rr-login-or { display: flex; align-items: center; gap: 0.6rem; color: var(--muted); font-size: 0.72rem; }
/* The dev form must never be mistaken for a way in that a colleague could use. */
.rr-login-dev { margin: 0; text-align: center; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em;
  color: var(--status-warning); }
.rr-login-or::before, .rr-login-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
/* The account block sits at the right end of the top bar. It used to live at
   the foot of the sidebar, a long reach from the page you are reading. */
.rr-user { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.rr-user-email { font-size: 0.78rem; color: var(--ink-2); max-width: 24ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-user button { font-size: 0.72rem; padding: 0.35rem 0.7rem; }

/* ---- Five-year forecast ------------------------------------------------------------- */
.rr-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.rr-grid-2 > * { min-width: 0; }
.rr-fc-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.8rem 1.4rem; margin-bottom: 0.8rem; }
.rr-fc-ctl { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.rr-fc-ctl select, .rr-fc-ctl input { font: inherit; font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 0.88rem; color: var(--ink); min-width: 14rem; }
.rr-fc-ctl.grow { flex: 1 1 14rem; } .rr-fc-ctl.grow2 { flex: 2 1 20rem; }
.rr-fc-ctl.grow input, .rr-fc-ctl.grow2 input { min-width: 0; width: 100%; }
.rr-fc-status { margin-left: auto; font-size: 0.8rem; align-self: center; }
.rr-fc-dirty { background: color-mix(in srgb, var(--status-warning) 18%, transparent); color: var(--status-warning); }
.rr-fc-charts { margin-bottom: 1rem; }
.rr-fc-note { font-size: 0.76rem; line-height: 1.5; margin: 0.6rem 0 0; }
.rr-fc-table th.num, .rr-fc-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rr-fc-table .pos { color: var(--status-good); font-weight: 700; } .rr-fc-table .neg { color: var(--status-critical); font-weight: 700; }
.rr-fc-total td { font-weight: 800; border-top: 1px solid var(--grid); }
.rr-fc-swatch { display: inline-block; width: 0.65rem; height: 0.65rem; border-radius: 2px; margin-right: 0.5rem; vertical-align: -1px; }
.rr-fc-save { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.8rem 1.2rem; margin-bottom: 1rem; }
.rr-fc-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.rr-fc-notice { flex-basis: 100%; margin: 0; }
.rr-fc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.rr-fc-grid > * { min-width: 0; }
.rr-fc-fields { display: flex; flex-wrap: wrap; gap: 0.8rem 1.6rem; }
.rr-fc-field { display: flex; flex-direction: column; gap: 0.25rem; max-width: 22rem; }
.rr-fc-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin: 0.8rem 0 0.3rem; display: block; }
.rr-fc-field .rr-fc-label { margin: 0; }
.rr-fc-hint { font-size: 0.74rem; color: var(--muted); line-height: 1.45; }
.rr-fc-num { display: inline-flex; align-items: center; gap: 0.3rem; }
.rr-fc-num input { font: inherit; font-size: 0.9rem; font-variant-numeric: tabular-nums; text-align: right; }
.rr-fc-suffix { font-size: 0.78rem; color: var(--muted); }
.rr-fc-toggle { margin-left: auto; font-size: 0.78rem; color: var(--muted); display: inline-flex; align-items: center; gap: 0.3rem; }
.rr-fc-years { margin-top: 0.6rem; } .rr-fc-years th { font-size: 0.72rem; text-align: center; }
.rr-fc-years td:first-child { font-size: 0.82rem; }
.rr-fc-years td { padding: 0.2rem 0.3rem; }
.rr-fc-list td { padding: 0.2rem 0.3rem; } .rr-fc-list td.num { text-align: right; }
.rr-fc-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem 1rem; padding: 0.6rem 0; border-top: 1px solid var(--grid); }
.rr-fc-row input.grow { flex: 1 1 12rem; font: inherit; font-size: 0.9rem; min-width: 0; }
.rr-fc-channel + .rr-fc-channel { margin-top: 0.4rem; }
.rr-fc-x { min-width: 2rem; padding: 0.2rem 0.5rem; font-size: 1rem; line-height: 1; }
input[type="month"] { font: inherit; font-size: 0.88rem; color: var(--ink); }
.rr-fc-strip { margin-bottom: 1rem; }
.rr-fc-strip-sub { font-size: 0.78rem; }
.rr-fc-stale { color: var(--status-warning); }
.rr-fc-years-row { display: flex; align-items: center; gap: 0.5rem; overflow-x: auto; padding: 0.2rem 0; }
.rr-fc-yearbox { flex: 1 0 7.5rem; min-width: 7.5rem; display: flex; flex-direction: column; gap: 0.1rem; padding: 0.6rem 0.8rem; border-radius: 8px; background: color-mix(in srgb, var(--ink) 5%, transparent); border: 1px solid var(--grid); }
.rr-fc-yearbox.past { opacity: 0.8; }
.rr-fc-yearbox.now { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.rr-fc-yearlabel { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.07em; color: var(--muted); }
.rr-fc-yearvalue { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.rr-fc-yearkind { font-size: 0.7rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-fc-arrow { flex: none; font-size: 0.72rem; font-weight: 700; text-align: center; line-height: 1.2; min-width: 3.2rem; }
.rr-fc-arrow.pos { color: var(--status-good); } .rr-fc-arrow.neg { color: var(--status-critical); }
.rr-fc-grid textarea { font: inherit; font-size: 0.86rem; width: 100%; } .bo-card textarea { font: inherit; font-size: 0.86rem; width: 100%; }
input[type="date"] { font: inherit; font-size: 0.88rem; color: var(--ink); }
.rr-bridge { margin-bottom: 1rem; }
.rr-bridge-head, .rr-bridge-row { display: grid; grid-template-columns: minmax(16rem, 34%) 1fr; align-items: stretch; }
.rr-bridge-head { margin-top: 0.4rem; }
.rr-bridge-sec { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 0.9rem 0 0.25rem; border-bottom: 1px solid var(--grid); }
.rr-bridge-row { border-bottom: 1px solid color-mix(in srgb, var(--grid) 60%, transparent); }
.rr-bridge-row.total { border-top: 2px solid var(--grid); border-bottom: 0; margin-top: 0.2rem; }
.rr-bridge-row.muted { color: var(--muted); border-bottom: 0; }
.rr-bridge-label { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.55rem 0.8rem 0.55rem 0; min-width: 0; }
.rr-bridge-name { font-size: 0.86rem; font-weight: 700; }
.rr-bridge-row.total .rr-bridge-name { font-size: 0.95rem; font-weight: 800; }
.rr-bridge-text { font-size: 0.74rem; line-height: 1.4; color: var(--muted); }
.rr-bridge-cols { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); min-width: 0; }
.rr-bridge-line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rr-bridge-cell { position: relative; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; padding: 0.45rem 0.6rem; font-variant-numeric: tabular-nums; font-size: 0.9rem; white-space: nowrap; }
.rr-bridge-cell.head { font-size: 0.72rem; font-weight: 700; color: var(--muted); letter-spacing: 0.05em; justify-content: flex-end; }
.rr-bridge-cell.bold { font-weight: 800; font-size: 1rem; }
.rr-bridge-cell .neg, .rr-bridge-cell.neg { color: var(--status-critical); } .rr-bridge-cell.pos { color: var(--status-good); }
.rr-bridge-move { font-size: 0.66rem; font-weight: 700; line-height: 1.1; }
.rr-bridge-move.up { color: var(--status-good); } .rr-bridge-move.down { color: var(--status-critical); }
.rr-bridge-hover { position: absolute; inset: 0; }
.rr-bridge-tip { position: absolute; top: -0.2rem; transform: translate(-50%, -100%); max-width: 100%; background: var(--surface-2, var(--surface-1)); color: var(--ink); border: 1px solid var(--grid); border-radius: 6px; padding: 0.2rem 0.5rem; font-size: 0.72rem; white-space: nowrap; pointer-events: none; z-index: 2; box-shadow: 0 4px 14px rgba(0,0,0,0.25); }
.rr-bridge-cell { z-index: 1; pointer-events: none; }
.rr-bridge-tip.at-start, .rr-bridge-tip.at-end { transform: translate(0, -100%); }
.rr-clients-cols { grid-template-columns: 6.5rem 1fr; grid-auto-flow: row; }
.rr-clients-cols > .rr-bridge-cell.last { border-right: 1px solid var(--grid); color: var(--muted); }
.rr-clients-cols > .rr-bridge-cell.last.bold { color: var(--ink); }
.rr-clients-years { position: relative; }
.rr-linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; }
.rr-fc-grain { margin-left: auto; }
.rr-fc-grain .bo-tab { font-size: 0.78rem; padding: 0.2rem 0.6rem; }
/* ---- Insights as a board ------------------------------------------------------------ */
.rr-ins-board { margin-bottom: 1rem; }
.rr-ins-link { color: inherit; text-decoration: none; } .rr-ins-link:hover { text-decoration: underline; }
.rr-ins-figures { margin-bottom: 1rem; }
.rr-ins-figures > summary { cursor: pointer; font-size: 0.82rem; font-weight: 700; color: var(--muted); list-style: none; display: flex; align-items: center; gap: 0.4rem; }
.rr-ins-figures > summary::-webkit-details-marker { display: none; }
.rr-ins-figures > summary::before { content: '▸'; font-size: 0.8rem; }
.rr-ins-figures[open] > summary::before { content: '▾'; }
.rr-ins-figures > summary:hover { color: var(--ink); }
.rr-ins-figures-body { display: grid; grid-template-columns: minmax(280px, 0.9fr) 1.5fr; gap: 1.4rem; margin-top: 1rem; }

@media (max-width: 1100px) {
  .rr-kpis.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rr-kpis.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rr-grid-2-1 { grid-template-columns: 1fr; }
  .rr-grid-3 { grid-template-columns: 1fr 1fr; }
  .rr-grid-2, .rr-fc-grid { grid-template-columns: 1fr; }
  .rr-bridge-head, .rr-bridge-row { grid-template-columns: 1fr; }
  .rr-ins-figures-body { grid-template-columns: 1fr; }
  .rr-bridge-head > span:first-child { display: none; }
}
@media (max-width: 720px) {
  /* The bar has no room for an address beside the crumbs and the sync line;
     the SIGN OUT button stays, and the block's tooltip still names the user. */
  .rr-user-email { display: none; }
  /* The time-frame pill cannot scroll (its calendar must be able to pop out of it),
     so on a phone it wraps onto two rows instead of pushing the page wide. */
  .rr-periodbar > .bo-tabs { flex-wrap: wrap; justify-content: center; border-radius: 14px; }
  .rr-periodbar > .bo-tabs .bo-tab { flex: 1 0 auto; }
  .rr-search { flex: 1 1 100%; }
  .rr-kpis { grid-template-columns: 1fr 1fr; }
  .rr-grid-3 { grid-template-columns: 1fr; }
  .rr-kpis .bo-hero { font-size: 1.5rem; }
  .rr-kpis.six { grid-template-columns: 1fr 1fr; }
  .rr-kpis.five { grid-template-columns: 1fr 1fr; }
  .rr-podium { grid-template-columns: 1fr; }
}

/* Trends: the controls bar's number and date inputs sit in line with the selects, the table scrolls sideways on a phone */
/* a list row whose cells are on their way */
.rr-row-wait td { opacity: 0.75; }
/* sidebar: the clicked link spins until its page arrives (after a beat, so fast pages never flash it) */
.rr-nav-pending { margin-left: auto; width: 0.8rem; height: 0.8rem; flex: none; border-radius: 50%; border: 2px solid transparent; opacity: 0; }
.rr-nav-pending.on { border-color: currentColor; border-top-color: transparent; opacity: 0.85; animation: rr-nav-spin 0.7s linear infinite; transition: opacity 0.1s 0.12s; }
@keyframes rr-nav-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rr-nav-pending.on { animation: none; border-top-color: currentColor; } }
/* AM boards: who to look at, as buttons — the chosen one filled */
.rr-am-picker { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.8rem; }
:is(.bo-root, .bo-app) .rr-am-picker > button.rr-am-pill {
  display: inline-flex; align-items: center; gap: 0.55rem; text-align: left; height: auto; min-height: 0;
  padding: 0.4rem 0.85rem 0.4rem 0.4rem; border-radius: 999px; cursor: pointer;
  background: var(--surface-1); color: var(--ink); border: 1px solid var(--btn-border);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
:is(.bo-root, .bo-app) .rr-am-picker > button.rr-am-pill:hover { border-color: var(--selected); background: color-mix(in srgb, var(--selected) 8%, var(--surface-1)); }
:is(.bo-root, .bo-app) .rr-am-picker > button.rr-am-pill.active {
  background: var(--selected); color: var(--selected-ink); border-color: var(--selected);
  box-shadow: 0 1px 6px color-mix(in srgb, var(--selected) 45%, transparent);
}
.rr-am-avatar {
  flex: none; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.02em;
  background: color-mix(in srgb, var(--selected) 16%, var(--surface-2)); color: var(--ink);
}
.rr-am-pill.active .rr-am-avatar { background: color-mix(in srgb, var(--selected-ink) 22%, transparent); color: var(--selected-ink); }
.rr-am-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.rr-am-name { font-weight: 700; font-size: 0.88rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 0.35rem; }
.rr-am-sub { font-size: 0.7rem; color: var(--muted); }
.rr-am-pill.active .rr-am-sub { color: color-mix(in srgb, var(--selected-ink) 78%, transparent); }
.rr-badge-lead, .rr-badge-you {
  display: inline-block; font-size: 0.58rem; font-weight: 800; letter-spacing: 0.07em; line-height: 1;
  padding: 0.2rem 0.38rem; border-radius: 4px; vertical-align: middle;
}
.rr-badge-lead { background: var(--status-warning, #d98324); color: #1b1300; }
.rr-badge-you { background: color-mix(in srgb, var(--ink) 14%, transparent); color: var(--ink-2); }
.rr-am-pill.active .rr-badge-you { background: color-mix(in srgb, var(--selected-ink) 24%, transparent); color: var(--selected-ink); }
h2 > .rr-badge-lead, a > .rr-badge-lead { margin-left: 0.45rem; }
.rr-am-empty { text-align: center; padding: 2.4rem 1rem; }
.rr-am-empty p { margin: 0.2rem auto; max-width: 34rem; }
.rr-am-empty-glyph { display: block; font-size: 2rem; color: var(--muted); margin-bottom: 0.4rem; }
.rr-trend-n { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; }
.rr-trendbar input[type="number"] { font: inherit; font-size: 0.88rem; color: var(--ink); width: 4.6rem; text-align: right; font-variant-numeric: tabular-nums; }
.rr-trendbar input[type="date"].rr-select-on, .rr-trendbar input[type="number"]:focus { border-color: var(--selected); }
.rr-table-wrap { overflow-x: auto; }
.rr-trend-table th.num, .rr-trend-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rr-trend-table tfoot td { font-weight: 700; border-top: 2px solid var(--border); }
.rr-trend-table tr.rr-trend-partial td { color: var(--muted); font-style: italic; }
.rr-trend-delta { font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.rr-trend-delta.pos { color: var(--status-good); }
.rr-trend-delta.neg { color: var(--status-critical); }
