/*
 * Typography + foreground palette, formerly injected into every <head> by the aj1559-ads
 * Cloudflare Worker (see js/aj1559-global.js for why that Worker is gone).
 *
 * The Worker appended this as an inline <style id="aj-typo"> at the END of <head>, after
 * /css/tokens.css and /css/app.css, which is where its overrides of --fg, --site-fg,
 * --fg-muted and --fg-dim got their weight. shell() links it in the same position, so the
 * cascade is unchanged. Kept as a file rather than inlined per page: it is ~1.2 KB and
 * there are 8,197 pages, so inlining costs ~10 MB in dist and one uncacheable copy per
 * navigation, against one immutable request that a returning visitor never repeats.
 *
 * --site-fg is set alongside --fg on purpose and is NOT a duplicate of it: a ported app's
 * :root becomes #tool-root and brings its own --fg with it, so anything inside a widget
 * that must resolve to THIS site's colour has to ask by a name no widget can redefine.
 *
 * The font stacks list a CJK, Thai and Arabic face after the Latin ones because this site
 * ships fifteen locales and Inter covers none of those scripts.
 */
:root {
  --font-ui: 'Inter', 'Segoe UI', system-ui, "Noto Sans", "Noto Sans KR", "Malgun Gothic",
    "Noto Sans JP", "Yu Gothic", "Hiragino Sans", "Noto Sans SC", "Microsoft YaHei",
    "PingFang SC", "Noto Sans Thai", "Leelawadee UI", "Noto Sans Arabic",
    "Segoe UI Arabic", "Geeza Pro", sans-serif;
  --font-display: 'Space Grotesk', 'Inter', 'Segoe UI', system-ui, "Noto Sans KR",
    "Noto Sans JP", "Noto Sans SC", "Noto Sans Thai", "Noto Sans Arabic", sans-serif;
}

:root,
:root[data-theme="dark"] {
  --fg: #eaf0f2;
  --site-fg: #eaf0f2;
  --fg-muted: #a4b0b9;
  --fg-dim: #8a95a0;
}

:root[data-theme="light"] {
  --fg: #0b1215;
  --site-fg: #0b1215;
  --fg-muted: #3e4750;
  --fg-dim: #59636c;
}

body {
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.home-hero h1,
.home-section-head h2,
.home-guide-copy h3,
.hero h1,
.prose h1,
.prose h3,
.card h3 {
  font-family: var(--font-display);
}

.home-hero h1 {
  font-weight: 700;
  letter-spacing: -0.04em;
}

.prose h1 {
  font-weight: 700;
}
