/* PURITY BUZZ typography: regal and authoritative across every page.
   Cinzel (Roman inscriptional capitals) for the wordmark, headings and
   navigation; EB Garamond (Garamond's book face) for all text. Both are
   self-hosted from web/fonts/ under the SIL Open Font License (the CSP
   allows fonts from this origin only). Loaded last on every page. */

@font-face {
  font-family: "Cinzel";
  src: url("fonts/Cinzel.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("fonts/EBGaramond.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("fonts/EBGaramond-Italic.woff2") format("woff2");
  font-weight: 400 800;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Cinzel has Latin only: Cyrillic, Greek, Vietnamese and the Hawaiian
     ʻokina fall back to EB Garamond glyph by glyph. */
  --display: "Cinzel", "EB Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --serif: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --sans: var(--serif);
}

/* Garamond's small x-height reads a size smaller than the old system sans;
   font-size-adjust brings text to a comparable x-height without rewriting
   every px size. Figures are lining (steadier for a data-heavy site) and
   tabular where they line up in columns. */
html, body {
  font-family: var(--serif);
  font-size-adjust: 0.47;
  font-variant-numeric: lining-nums;
}
code, pre, kbd, samp, .mono, .mx-code, .mx-evidence, .mx-addr, .mx-addr-input, .node-sub {
  font-size-adjust: none;
}
table, .mx-table, .mx-tile, .kpi-value, .mx-hero-value, .node-peers-num, .stat-value, .fee-rate,
.node-fact dd, .mx-dl dd {
  font-variant-numeric: lining-nums tabular-nums;
}

/* Display: the wordmark, headings and navigation. */
.wordmark, h1, h2, h3, .nav a, .eyebrow, .fee-tier, .node-client,
.hero h1, .section h2, .mx-title h1, .mx-section-head h2, .mx-h3, .dash-main h2, .dash-side h2 {
  font-family: var(--display);
  font-size-adjust: none;
  font-feature-settings: "kern", "liga";
}
.wordmark { font-weight: 700; letter-spacing: 0.1em; }
.nav a { letter-spacing: 0.06em; font-weight: 500; }
h1, .hero h1, .mx-title h1 { font-weight: 600; letter-spacing: 0.02em; line-height: 1.12; }
h2, .section h2, .mx-section-head h2, .dash-main h2, .dash-side h2 { font-weight: 600; letter-spacing: 0.03em; }
h3, .mx-h3 { font-weight: 600; letter-spacing: 0.04em; }
.eyebrow { letter-spacing: 0.16em; }

/* The illuminated initial reads as an inscription. */
.lede::first-letter, .mx-sub::first-letter { font-family: var(--display); font-size-adjust: none; }

/* Cinzel runs wide: keep long headings inside narrow screens. */
@media (max-width: 720px) {
  .hero h1 { font-size: 28px; letter-spacing: 0.01em; }
  .mx-title h1 { font-size: 28px; }
  .section h2, .mx-section-head h2 { font-size: 22px; }
  .nav a { letter-spacing: 0.03em; }
}
@media (max-width: 480px) {
  .nav { gap: 6px 14px; flex-wrap: wrap; justify-content: center; }
  .nav a { font-size: 13px; letter-spacing: 0.02em; }
}

/* Right-to-left languages (Arabic, Persian, Urdu, Hebrew): mirror the few
   one-sided rules; everything else is direction-neutral. */
/* .verse carries lang="en" dir="ltr": the KJV stays English, left-to-right, in RTL pages too */
[dir="rtl"] .wordmark::before { margin-right: 0; margin-left: 0.5em; }
[dir="rtl"] .lede::first-letter, [dir="rtl"] .mx-sub::first-letter { float: right; margin: 0.06em 0 0 0.12em; }
[dir="rtl"] .st-list, [dir="rtl"] .mx-insights { padding-right: 1.2em; padding-left: 0; }

/* Scripts EB Garamond lacks fall back to the platform's serif faces first
   (Songti/Mincho/Naskh…), so every language keeps the same register. */
:root {
  --serif: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, "Songti SC", "Songti TC",
    "Hiragino Mincho ProN", "Noto Serif CJK SC", "Noto Serif CJK JP", "Noto Serif KR", "AppleMyungjo",
    "Noto Serif Devanagari", "Noto Serif Bengali", "Noto Serif Tamil", "Noto Serif Thai", "Noto Serif Georgian",
    "Noto Serif Ethiopic", "Noto Naskh Arabic", "Geeza Pro", "Noto Serif Hebrew", "Times New Roman", serif;
}

/* Numbers with units keep their order inside right-to-left text. */
[dir="rtl"] .stat-value, [dir="rtl"] .mx-hero-value, [dir="rtl"] .kpi-value, [dir="rtl"] .fee-rate,
[dir="rtl"] .node-peers-num, [dir="rtl"] .mx-tile-value, [dir="rtl"] .node-fact dd, [dir="rtl"] td.num {
  direction: ltr; unicode-bidi: isolate;
}
