/* Vicin platform — sign-in surfaces. B3.
 *
 * ⛔ EVERY VALUE HERE COMES FROM docs/brand/design-contract.md. Nothing is
 * invented, and no raw hex appears outside this token block — CLAUDE.md's
 * one-visual-system rule, which exists because ARMEN found font and colour
 * drift between tabs in his own dashboard.
 *
 * ✅ UPDATED 2026-08-14 — ARMEN: "I want to change those CTA buttons to bluish."
 * BUTTONS use `--cta` #3F5CE0; links, focus rings and input borders keep ink
 * teal `--accent`. The contract previously reserved the CTA blue for "primary
 * public-site CTA buttons only" and his decision widens that scope to the
 * signed-in product — the same token, not a second blue that nearly matches.
 *
 * 🔴 CODEX C53-7. FONTS ARE NOW SELF-HOSTED, and until this the stylesheet
 * NAMED Manrope and Inter while shipping neither, so the required faces never
 * rendered anywhere. Naming a font you do not serve is the same defect this
 * project keeps finding: a property asserted with nothing behind it.
 *
 * ⚠ `font-display: swap` means a missing file degrades to the system stack
 * instead of blanking the page, and `checks/font_assets.py` reports any face
 * whose file is absent so the gap is loud rather than invisible.
 */

@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/static/fonts/manrope-variable.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

/* 🔴 CODEX C-57 B1. The contract's rule is absolute: "Every number gets mono +
 * tabular figures. No exceptions." The monthly report shipped its numerals in
 * the UI face because this file was never fetched, and the stylesheet ADMITTED
 * IT IN A COMMENT rather than fixing it. A gap named in prose is a gap. */
@font-face {
  font-family: "JetBrains Mono";
  src: url("/static/fonts/jetbrains-mono-variable.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --bg-base:        #F8F9FA;
  --bg-surface:     #FFFFFF;
  --bg-input:       #FFFFFF;

  --border-subtle:  #E2E8F0;
  --border-default: #CBD5E1;
  --border-strong:  #94A3B8;

  /* 🔴 CODEX C53-7. MEASURED, NOT CHOSEN. `--border-default` #CBD5E1 is
   * 1.48:1 against white, and even `--border-strong` is 2.56:1. WCAG 2.1
   * 1.4.11 requires 3:1 for the boundary of a control, so every input on
   * these pages had an edge a low-vision customer cannot locate.
   *
   * ⚠ The contract's border values STAY for card edges and dividers, which
   * are decorative and are not the only indicator of anything. A control
   * boundary is a different job and gets its own token: 4.05:1.
   */
  --border-input:   #767F8C;

  --text-primary:   #0F172A;
  --text-secondary: #475569;
  --text-muted:     #5B6B80;   /* 5.44:1 on white — corrected 2026-08-08 */

  --accent:         #0E5A6B;   /* ink teal — 7.66:1 on surface */
  --accent-hover:   #0B4552;
  --accent-soft:    #E6F2F5;

  /* ✅ DECIDED 2026-08-14 — ARMEN: "I want to change those CTA buttons to
   * bluish", while keeping the brand otherwise unchanged.
   *
   * ⭐ THIS IS NOT A NEW COLOUR. It is the CTA blue the public site already
   * uses, `site/src/styles/tokens.css` lines 41-43, whose scope note read
   * "primary public-site CTA buttons only". His decision widens that scope to
   * the signed-in product; the values are identical, so the two halves of
   * Vicin now press the same button rather than two blues that nearly match.
   *
   * ⚠ Ink teal stays the accent for links, focus rings and input borders. He
   * asked for the BUTTONS, and repainting everything would be the "I would
   * build this differently" move the reference rule forbids. */
  --cta:            #3F5CE0;
  --cta-hover:      #3349B8;
  --cta-soft:       #EDF0FE;
  /* ⚠ The button label was `color: #FFFFFF` written into the component, which
   * is the one thing the no-raw-hex rule forbids outright. It is a token now,
   * so `checks/design_contract.py` can enforce the rule without an exception. */
  --text-on-cta:    #FFFFFF;

  --negative:       #B3261E;
  --negative-soft:  #FDECEA;
  --positive:       #0F7B4F;
  --positive-soft:  #E8F5EE;

  /* ⚠ Codex C53-7. These two were RAW HEX inside the notice components, which
   * breaks the contract's own "no raw hex in any component" rule - the rule
   * that actually prevents drift. They are the readable text colour on each
   * soft background and belong here with everything else. */
  --on-negative-soft: #7A1A15;
  --on-positive-soft: #0B5537;

  --font-display: "Manrope", system-ui, sans-serif;
  --font-ui:      "Inter", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px;
  --sp-5:20px; --sp-6:24px; --sp-8:32px; --sp-10:40px; --sp-12:48px;

  --radius-md: 6px;   /* buttons, inputs — 4-6px ceiling */
  --radius-lg: 8px;   /* product UI cards */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 16px;              /* reading copy floor, contract conflict 3 */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-8);
}

/* 🔴 The site's own logo file, not a wordmark drawn in type. ARMEN, 2026-08-14:
 * "the logo doesn't match our logo from the site." Two logos for one company is
 * the drift the one-visual-system rule exists to prevent. */
.wordmark {
  display: block;
  height: 36px;
  width: auto;
  margin: 0 0 var(--sp-6);
}

.topbar-brand { display: inline-flex; align-items: center; }
.topbar-brand .wordmark { margin: 0; height: 32px; }

h1 {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 var(--sp-2);
}

.lede { color: var(--text-secondary); margin: 0 0 var(--sp-6); font-size: 16px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--sp-1);
}

.field { margin-bottom: var(--sp-5); }

.hint { font-size: 13px; color: var(--text-muted); margin-top: var(--sp-1); }

input[type="email"], input[type="password"], input[type="text"] {
  width: 100%;
  height: 44px;                 /* 44px touch target, not the 36px UI default */
  background: var(--bg-input);
  border: 1px solid var(--border-input);   /* 4.05:1 — WCAG 1.4.11 */
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 0 var(--sp-3);
  font-family: var(--font-ui);
  font-size: 16px;              /* 16px stops iOS zooming the page on focus */
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input::placeholder { color: var(--text-muted); }

input:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn {
  width: 100%;
  height: 44px;
  border: 1px solid var(--cta);
  border-radius: var(--radius-md);
  background: var(--cta);
  color: var(--text-on-cta);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  transition: background 120ms ease;
}

.btn:hover { background: var(--cta-hover); border-color: var(--cta-hover); }

a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ⛔ Never colour alone. Every notice carries a word that states its meaning,
 * because a red border tells a colour-blind customer nothing. */
.notice {
  border-radius: var(--radius-md);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-5);
  font-size: 15px;
  border: 1px solid;
}
.notice-error   { background: var(--negative-soft); border-color: var(--negative); color: var(--on-negative-soft); }
.notice-success { background: var(--positive-soft); border-color: var(--positive); color: var(--on-positive-soft); }
.notice strong { display: block; margin-bottom: 2px; }

.alt { margin-top: var(--sp-6); font-size: 15px; color: var(--text-secondary); }
.alt + .alt { margin-top: var(--sp-2); }

.legal { margin-top: var(--sp-6); font-size: 13px; color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ══ The dashboard shell ═════════════════════════════════════════════════════
 *
 * ⛔ ONE STYLESHEET FOR THE WHOLE PRODUCT, and this is the rule that matters
 * most here. Requirement `D3` traced the source dashboard's font drift to
 * per-section stylesheets: `trends.css` alone carries 102 raw font sizes and no
 * tokens, and ARMEN found the result himself. There is no `performance.css` in
 * Vicin and there is not going to be one. A section that needs a value outside
 * the scale has a layout problem, not a stylesheet problem.
 *
 * ⚠ `checks/design_contract.py` enforces the two rules that are not opinions:
 * no font size below 11px, and no raw hex outside the token block above.
 */

body.app { background: var(--bg-base); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--sp-2);
  background: var(--bg-surface);
  color: var(--accent);
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  z-index: 40;
}
.skip-link:focus { left: var(--sp-4); }

/* ── Top bar ─────────────────────────────────────────────────────────────── */

/* 🔴 CODEX C-57. THE ACCOUNT HEADER OVERFLOWED THE DOCUMENT AT 375px, and it was
 * `nowrap` on both rows that did it: the organisation name, the email and Sign
 * out were laid out on one line whatever the width, so the button sat 117px off
 * the right edge of the screen and the whole page scrolled sideways.
 *
 * ⚠ The tab row and the section rail scroll INSIDE themselves on purpose. This
 * one had no such container, so its overflow became the document's.
 *
 * ⭐ Wrapping rather than truncating: the email is how a customer knows which
 * account they are signed into, and an ellipsis on a shared machine is exactly
 * where that matters most. `overflow-wrap: anywhere` breaks a long address
 * instead of pushing the layout. */
.app .topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  padding: var(--sp-3) var(--sp-6);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.app .wordmark { margin: 0; }

.topbar-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  min-width: 0;
}
.topbar-meta form { margin: 0; }
.topbar-org,
.topbar-user {
  font-size: 13px;
  /* ⛔ `min-width: 0` is the load-bearing half. A flex item defaults to
   * `min-width: auto`, which refuses to shrink below its content, so a long
   * email pushed the row wider than the screen no matter what wrapped. */
  min-width: 0;
  overflow-wrap: anywhere;
}
.topbar-org { font-weight: 600; color: var(--text-primary); }
.topbar-user { color: var(--text-secondary); }

/* ── Buttons in the app chrome ───────────────────────────────────────────────
 *
 * ⚠ `.btn` is full width because the sign-in forms have one action each. In the
 * shell a button sits beside its neighbours, so `.btn-inline` restores auto
 * width and keeps the 44px height. The contract's component rule says 36px and
 * its own accessibility checklist says 44px; the taller value wins for anything
 * a customer taps on a phone, which is the same call B3 made for the forms.
 */

.btn-inline {
  width: auto;
  display: inline-flex;
  align-items: center;
  padding: 0 var(--sp-4);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary { background: var(--cta); border-color: var(--cta); color: var(--text-on-cta); }
.btn-primary:hover { background: var(--cta-hover); border-color: var(--cta-hover); }

.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border-input);
  color: var(--text-primary);
}
.btn-secondary:hover { background: var(--bg-base); }

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
  width: auto;
  padding: 0 var(--sp-3);
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-base); }

a.btn { line-height: 1; }

/* ── Business bar ────────────────────────────────────────────────────────── */

.bizbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  padding: var(--sp-4) var(--sp-6);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.bizbar-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.bizbar-select { display: flex; align-items: baseline; gap: var(--sp-3); flex-wrap: wrap; }

.biz-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.biz-picker { position: relative; }
.biz-picker summary { cursor: pointer; list-style: none; }
.biz-picker summary::-webkit-details-marker { display: none; }
.biz-picker summary::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: var(--sp-2);
  vertical-align: middle;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg) translateY(-2px);
}

.biz-list {
  position: absolute;
  z-index: 100;
  margin: var(--sp-2) 0 0;
  padding: var(--sp-1);
  min-width: 240px;
  list-style: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.biz-list a {
  display: block;
  padding: var(--sp-3);
  min-height: 44px;
  font-size: 14px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius-md);
}
.biz-list a:hover { background: var(--bg-base); }

.biz-website { font-size: 13px; }

.bizbar-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* 🔴 THIS `display: block` WAS THE BUG BEHIND "they should be on the right
 * side". With no business the bar dropped out of flex layout, so the action
 * buttons stacked underneath the empty state instead of sitting at the right
 * edge — and no-business is the only state ARMEN can see today, so it was the
 * only state he could judge. The bar stays flex in both states now. */
.bizbar-empty .empty-state { margin: 0; max-width: 60ch; }

/* ── Tabs ────────────────────────────────────────────────────────────────────
 * Underline style, 2px accent indicator on active. Design contract, Part 3.
 */

.tabbar {
  display: flex;
  gap: var(--sp-1);
  padding: 0 var(--sp-6);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.tab {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 var(--sp-3);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}
.tab:hover { color: var(--text-primary); }
/* ⛔ Never colour alone: the active tab carries the underline as well, so the
 * current position survives a colour-blind reader and a greyscale print. */
.tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Body layout ─────────────────────────────────────────────────────────── */

/* ✅ ARMEN, 2026-08-14: *"it's not full size. check my local version"* and then
 * *"drop that and make it like my local version."* He is right and the numbers
 * are his:
 *
 *   `.app-shell`          no max-width at all, padding var(--sp-8)
 *   `.intelligence-layout`  minmax(0, 1fr) 420px
 *   `.dashboard-body`       180px minmax(0, 1fr)
 *
 * 🔴 I HAD CAPPED IT AT 1440px AND CENTRED IT, which wasted about 270px down
 * each side of his screen. The cap came from the design contract's "one
 * container width across all sections" line, which is a READING rule from the
 * marketing side: prose needs a measure, tables and charts need the screen. His
 * product is full-bleed and the reference rule says port what he built.
 *
 * ⚠ The monthly report keeps its 760px measure. That one IS prose, read by a
 * client, and a line of text spanning a 2560px monitor is unreadable. */
.app-body {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 420px;
  gap: var(--sp-6);
  align-items: start;
  padding: var(--sp-8);
}

/* ⭐ Ported behaviour: a tab with one section hides its rail rather than
 * showing a one-item list, so a single-view tab feels like a tab. */
.app-body.no-rail { grid-template-columns: minmax(0, 1fr) 420px; }

/* ✅ ARMEN, 2026-08-14: the setup panel can be put away once it is connected.
 * ⭐ His own version does the same and says why: "Collapsed: hide the right
 * setup panel and let the dashboard use full width." */
.app-body.no-setup { grid-template-columns: 180px minmax(0, 1fr); }
.app-body.no-rail.no-setup { grid-template-columns: minmax(0, 1fr); }

.workspace-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: var(--sp-4) var(--sp-8) 0;
}

.rail { display: flex; flex-direction: column; gap: 2px; }

.rail-item {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: var(--sp-2) var(--sp-3);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  border-left: 2px solid transparent;
}
.rail-item:hover { background: var(--bg-surface); color: var(--text-primary); }
.rail-item.is-active {
  background: var(--accent-soft);
  border-left-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.pills { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-4); flex-wrap: wrap; }

.pill {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 var(--sp-4);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.pill:hover { color: var(--text-primary); }
.pill.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Panels and shared states ────────────────────────────────────────────── */

.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.panel-title {
  margin: 0;
  padding: var(--sp-3) var(--sp-5);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.panel-body { padding: var(--sp-5); }

.blocked-question {
  margin: 0 0 var(--sp-4);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  max-width: 34ch;
}

.blocked-reason {
  margin: 0 0 var(--sp-5);
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 65ch;
}

.blocked-lead {
  margin: 0 0 var(--sp-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.source-list { margin: 0 0 var(--sp-5); padding-left: var(--sp-5); }
.source-list li { font-size: 14px; color: var(--text-secondary); margin-bottom: var(--sp-2); max-width: 70ch; }
.source-list strong { color: var(--text-primary); }

.empty-state { margin: 0; }
.empty-heading { margin: 0 0 var(--sp-1); font-size: 16px; font-weight: 600; color: var(--text-primary); }
.empty-detail { margin: 0; font-size: 14px; color: var(--text-secondary); max-width: 65ch; }
.empty-action { margin: var(--sp-4) 0 0; }

/* ── Setup sidebar ───────────────────────────────────────────────────────── */

.setup {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.setup-tabs { display: flex; border-bottom: 1px solid var(--border-subtle); }

.setup-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 var(--sp-2);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.setup-tab:hover { color: var(--text-primary); }
.setup-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }

.setup-body { padding: var(--sp-5); }

.setup-question {
  margin: 0 0 var(--sp-4);
  font-size: 14px;
  font-style: italic;
  color: var(--text-muted);
}

/* ── Responsive ──────────────────────────────────────────────────────────────
 * Tested at 375 / 768 / 1024 / 1440. The tab row scrolls sideways on its own
 * rather than making the page scroll, and the rail becomes a horizontal strip.
 */

@media (max-width: 1023px) {
  .app-body,
  .app-body.no-rail,
  .app-body.no-setup,
  .app-body.no-rail.no-setup {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-5);
    padding: var(--sp-5) var(--sp-4);
  }
  .workspace-toolbar { padding: var(--sp-4) var(--sp-4) 0; }
  .rail { flex-direction: row; overflow-x: auto; gap: var(--sp-1); }
  .rail-item { border-left: none; border-bottom: 2px solid transparent; white-space: nowrap; }
  .rail-item.is-active { border-left: none; border-bottom-color: var(--accent); }
}

/* ══ The monthly client report ═══════════════════════════════════════════════
 *
 * ⚠ THE ONLY SURFACE WHOSE READER IS NOT THE CUSTOMER. An agency sends this to
 * their client, so it is a document rather than a screen: one column, generous
 * measure, and it prints. The same rules still bind — tokens only, 11px floor,
 * and a value that was never measured shows an em-dash rather than a zero.
 */

body.report { background: var(--bg-base); }

.rp-controls {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  max-width: 760px;
  margin: 0 auto;
  padding: var(--sp-5) var(--sp-5) 0;
}

.rp-month { display: flex; align-items: center; gap: var(--sp-2); margin: 0; }
.rp-month label { margin: 0; }
.rp-month select {
  height: 44px;
  padding: 0 var(--sp-2);
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
}

.rp {
  max-width: 760px;
  margin: var(--sp-5) auto var(--sp-12);
  padding: var(--sp-10);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.rp-cover { border-bottom: 1px solid var(--border-subtle); padding-bottom: var(--sp-8); }
.rp-agency { margin: 0 0 var(--sp-6); font-size: 13px; font-weight: 600; color: var(--accent); }
.rp-eyebrow, .rp-section-eyebrow {
  margin: 0 0 var(--sp-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.rp-title {
  margin: 0 0 var(--sp-2);
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--text-primary);
}
.rp-period { margin: 0; font-size: 20px; color: var(--text-secondary); }

/* 🔴 CODEX C-57 B1 — the contract's numeric rule, enforced rather than noted.
 *
 * `.num` wraps the numerals inside prose, so "July 2026" keeps the month name
 * in the reading face and sets only the year in mono. The month control is a
 * `<select>`, whose option text cannot be marked up per character, so the whole
 * control takes the mono face: it is a list of dates, and Codex named it in the
 * acceptance outcome.
 *
 * ⚠ `tabular-nums` is the half that matters in a document. Proportional figures
 * make a column of numbers ragged, which is exactly what a client reads down. */
.num,
.rp-fact-value,
.rp-month select {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.rp-website, .rp-tagline { margin: var(--sp-2) 0 0; font-size: 13px; color: var(--text-muted); }

.rp-section { padding-top: var(--sp-8); }
.rp-h2 {
  margin: 0 0 var(--sp-3);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}
.rp-lead { margin: 0 0 var(--sp-5); font-size: 16px; color: var(--text-secondary); }

.rp-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); }
.rp-fact { border-left: 2px solid var(--accent-soft); padding-left: var(--sp-4); }
.rp-fact-label { margin: 0 0 var(--sp-1); font-size: 12px; font-weight: 600; color: var(--text-muted); }
.rp-fact-value { margin: 0; font-size: 24px; font-weight: 700; color: var(--text-primary); }

.rp-basis-label {
  margin: var(--sp-4) 0 var(--sp-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.rp-list { margin: 0; padding-left: var(--sp-5); }
.rp-list li { font-size: 14px; color: var(--text-primary); margin-bottom: var(--sp-1); }
.rp-list-muted li { color: var(--text-secondary); }
.rp-note, .rp-empty { margin: var(--sp-4) 0 0; font-size: 14px; color: var(--text-secondary); }

/* ── Print, which is also what the PDF renderer reads ─────────────────────── */

@page {
  size: letter;
  margin: 18mm 16mm;
}

@media print {
  .rp-controls { display: none; }
  body.report { background: var(--bg-surface); }
  .rp {
    max-width: none;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
  }
  /* A section split across a page break costs the reader the heading. */
  .rp-section { break-inside: avoid; }
  .rp-cover { break-after: avoid; }
}

@media (max-width: 767px) {
  .rp { padding: var(--sp-5); margin: var(--sp-4) var(--sp-3) var(--sp-8); }
  .rp-title { font-size: 24px; }
  .rp-facts { grid-template-columns: minmax(0, 1fr); }
  .app .topbar, .bizbar { padding-left: var(--sp-4); padding-right: var(--sp-4); }
  .tabbar { padding-left: var(--sp-4); padding-right: var(--sp-4); }
  .biz-name { font-size: 16px; }
  .blocked-question { font-size: 16px; }
}
