/* ══════════════════════════════════════════════════════════════
   Principal Paid theme — base
   Reset, body, typography, links, text highlighting.
   Spacing / visibility utilities live at the end of components.css so
   they win over component rules of equal specificity.
   ══════════════════════════════════════════════════════════════ */

@font-face { font-family: 'Archivo'; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--fs-base);
  font-variant-numeric: tabular-nums;   /* figures line up in tables and results */
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Headings ── */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  color: var(--text);
  letter-spacing: var(--ls-title);
}

/* Page title (every page's <h1>) and section titles share one size */
h1,
.page-title,
.section-title,
.logo,
.table-title {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-title);
  font-weight: var(--fw-display);
  line-height: var(--lh-title);
  letter-spacing: var(--ls-title);
  color: var(--text);
}

h2 { font-size: var(--fs-h2); }

/* ── Links ──
   .link is the standard inline text link; prose containers apply it
   to every <a> automatically (see .article in layout.css). */
.link,
.guide-link a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dim);
  transition: border-color var(--ease), color var(--ease);
}
.link:hover,
.guide-link a:hover { border-bottom-color: var(--accent); }

/* Quiet link: footer, secondary references */
.link-muted {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color var(--ease), border-color var(--ease);
}
.link-muted:hover { color: var(--accent); border-bottom-color: var(--accent-dim); }

/* Dotted link: inline reference inside a hint (e.g. prime rate source) */
.link-dotted {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dotted var(--muted);
}

/* ── Text highlighting ── */
.text-accent { color: var(--accent); }
.text-green,
.text-custom { color: var(--green); }
.text-red { color: var(--red); }
.text-muted { color: var(--muted); }
.text-dim { opacity: 0.75; }

/* ── Small-caps label styles ── */
.eyebrow,
.panel-title,
.results-title,
.chart-section-label,
.region-heading {
  font-size: var(--fs-xs);
  font-weight: var(--fw-label);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--muted);
}

.label,
.stat-label,
.toggle-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--muted);
}

.micro-label,
.tier-label {
  font-size: var(--fs-2xs);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--muted);
}

/* Sub-section heading inside a panel (Bank Fees, Depreciation):
   micro size, but tracked like a label so it reads as a heading */
.section-label-sm {
  font-size: var(--fs-2xs);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--accent-dim);
  margin-bottom: var(--sp-3);
}

/* Small explanatory text under a title, chart or control */
.note {
  font-size: var(--fs-sm);
  color: var(--muted);
  letter-spacing: var(--ls-body);
  line-height: var(--lh-ui);
}
/* Description under a toggle or chart heading: wraps at the default line height */
.note--compact { line-height: normal; }

/* ── Dividers ── */
.divider,
.section-hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--sp-5) 0;
}
/* Rule that opens a sub-section: its label sits closer underneath */
.section-hr { margin-bottom: var(--sp-4); }

/* Visually hidden, readable by crawlers and screen readers */
.sr-only,
.seo-intro {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
