/* Canonical RegentForge tokens. Sole source for color and type (RF-070 / RF-072).
   Hex values live only in this :root / [data-theme="dark"] block.
   Institutional quiet-luxury direction: warm paper, charcoal, controlled deep teal. */

:root {
  --rf-page: #F5F3EF;
  --rf-surface: #FFFEFB;
  --rf-border: #E4E0D8;
  --rf-text: #1C1F1D;
  --rf-text-muted: #5C635E;
  --rf-accent: #0D4F4A;
  --rf-high: #A82725;
  --rf-medium: #A66A00;
  --rf-low: #52606D;
  --rf-font-sans: "Public Sans", system-ui, sans-serif;
  --rf-font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --rf-hover: color-mix(in srgb, var(--rf-text) 6%, transparent);
  --rf-accent-soft: color-mix(in srgb, var(--rf-accent) 10%, transparent);
  --rf-shadow: color-mix(in srgb, var(--rf-text) 14%, transparent);
  --rf-sw: 256px;

  /* Marketing type + rhythm */
  --rf-display: 48px;
  --rf-title: 32px;
  --rf-lead: 20px;
  --rf-body: 16px;
  --rf-section-y: 112px;
  --rf-cite-col: 132px;

  /* Compatibility aliases */
  --f: var(--rf-font-sans);
  --fd: var(--rf-font-sans);
  --t: var(--rf-accent);
  --tb: var(--rf-accent);
  --td: var(--rf-accent-soft);
  --tg: color-mix(in srgb, var(--rf-accent) 22%, transparent);
  --g: var(--rf-accent);
  --gd: var(--rf-accent-soft);
  --gr: var(--rf-accent);
  --r: var(--rf-text);
  --am: var(--rf-text-muted);
  --bl: var(--rf-accent);
  --pp: var(--rf-accent);
  --bg: var(--rf-page);
  --bg2: var(--rf-surface);
  --bg3: var(--rf-surface);
  --fg: var(--rf-text);
  --fg2: var(--rf-text);
  --fg3: var(--rf-text-muted);
  --fg4: var(--rf-text-muted);
  --fg5: color-mix(in srgb, var(--rf-text) 10%, transparent);
  --fg6: color-mix(in srgb, var(--rf-text) 5%, transparent);
  --card: var(--rf-surface);
  --border: var(--rf-border);
  --hover: var(--rf-hover);
  --shadow: var(--rf-shadow);
  --sw: var(--rf-sw);
}

[data-theme="dark"] {
  --rf-page: #14171A;
  --rf-surface: #1C2024;
  --rf-border: #2C3238;
  --rf-text: #E8EAE7;
  --rf-text-muted: #9AA3A0;
  --rf-accent: #3A9A8C;
  --rf-high: #E0736F;
  --rf-medium: #D9A23C;
  --rf-low: #94A3AE;
}

html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

body {
  font-family: var(--rf-font-sans);
  background: var(--rf-page);
  color: var(--rf-text);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6,
.brand, .logo-text, .sb-nm, .rf-logo, .wc h2, .mod-intro h2, .dash-sec h3,
.meta h1, .list-hd h1, .hero h2, .empty h2, .rf-empty h1 {
  font-family: var(--rf-font-sans);
}

.rf-cite, .citation, .cite, .cfr,
.an-meta, .api-key, .code-block,
td.num, th.num, .rf-mono {
  font-family: var(--rf-font-mono);
  font-size: 13px;
  line-height: 1.5;
}

.rf-sev,
.sev-badge,
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  font-family: var(--rf-font-sans);
}
.rf-sev-high, .sev-badge.sev-high, .badge-high {
  color: var(--rf-high);
  background: color-mix(in srgb, var(--rf-high) 12%, transparent);
  border: 1px solid var(--rf-high);
  font-weight: 700;
}
.rf-sev-medium, .sev-badge.sev-medium, .badge-medium {
  color: var(--rf-medium);
  background: color-mix(in srgb, var(--rf-medium) 12%, transparent);
  border: 1px dashed var(--rf-medium);
  font-weight: 600;
}
.rf-sev-low, .sev-badge.sev-low, .badge-low {
  color: var(--rf-low);
  background: color-mix(in srgb, var(--rf-low) 12%, transparent);
  border: 1px dotted var(--rf-low);
  font-weight: 500;
}

.rf-ico, [data-lucide] {
  width: 16px;
  height: 16px;
  stroke-width: 1.75;
  vertical-align: -2px;
  flex-shrink: 0;
}

.usage-card .v, .er-card .v, .kpi .n, .count-tile .n, .count-tile .l {
  color: var(--rf-text);
}

/* Visual break panels (Imagine paper geometry) */
.visual-break {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  background: var(--rf-page);
}
.visual-break img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--rf-border);
}

/* Labeled product structure panel — structure only, no live data */
.structure-panel {
  background: var(--rf-surface);
  border: 1px solid var(--rf-border);
  border-radius: 12px;
  display: grid;
  grid-template-columns: var(--rf-cite-col) 1fr;
  margin-top: 40px;
}
.structure-panel-cite {
  padding: 20px 16px;
  border-right: 1px solid var(--rf-border);
  font-family: var(--rf-font-mono);
  font-size: 12px;
  color: var(--rf-text-muted);
}
.structure-panel-body {
  padding: 20px 28px;
  border-left: 3px solid var(--rf-border);
}
.structure-panel .finding-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rf-text-muted);
  margin-bottom: 6px;
}
.structure-panel .finding-slot {
  font-size: 14px;
  color: var(--rf-text-muted);
  margin-bottom: 14px;
}
.structure-caption {
  font-size: 12px;
  color: var(--rf-text-muted);
  margin-top: 12px;
  font-style: italic;
}

@media print {
  .rf-sev-high, .sev-badge.sev-high, .badge-high { font-weight: 800; text-decoration: underline; }
  .rf-sev-medium, .sev-badge.sev-medium, .badge-medium { font-weight: 600; font-style: italic; }
  .rf-sev-low, .sev-badge.sev-low, .badge-low { font-weight: 400; }
}

.visual-break--portrait { max-width: 600px; }
.visual-break--portrait img { border: 1px solid var(--rf-border); }
