/*
 * Astrological + Devanagari font fallbacks for chart wheels, planet glyphs,
 * aspect symbols, retrograde marker, and Sanskrit terms.
 *
 * Two physically distinct Noto Symbols fonts are needed, despite the similar
 * names:
 *
 *   1. "Noto Sans Symbols"  (no number) → covers the 12 zodiac signs
 *      ♈-♓ (U+2648-U+2653), planet/luminary glyphs ☉☽☿♀♂♃♄♅♆♇, and many
 *      arrows U+2190-U+21FF. This is the font most of the chart wheels +
 *      sign cards need.
 *
 *   2. "Noto Sans Symbols 2" (with "2") → covers math operators ∴ ∵ ⊃,
 *      geometric shapes □ △ ▲ ▼ (used for aspect glyphs Square / Trine),
 *      and additional symbol sets. Does NOT include zodiac.
 *
 * Earlier deployments used only the "2" font and got empty boxes everywhere
 * zodiac glyphs needed to render on Lambda Linux. macOS browsers masked
 * the bug via the .SFNS / Apple Symbols system-font fallback chain.
 *
 * Why this file exists: Next.js's next/font/google auto-subsets fonts to
 * codepoints detected statically at build time. Astrological glyphs (zodiac
 * signs ♈-♓, planets ☉☽☿♀♂♃♄, etc.) typically arrive in DYNAMIC content
 * from LLM output and per-buyer fixtures, so the build can't see them and
 * prunes them from the bundle. Result: empty boxes on rendered PDFs.
 *
 * Fix: self-hosted full WOFF2 with explicit unicode-range declarations the
 * browser uses to auto-load the font ONLY when those codepoints appear.
 *
 * Files in this directory:
 *   - NotoSansSymbols.woff2        — zodiac + planets (~65KB)
 *   - NotoSansSymbols2.woff2       — math + geometric aspects (~240KB)
 *   - noto-sans-devanagari.woff2   — Devanagari weight 400 (~150KB)
 *
 * Note: U+211E ℞ (Rx prescription mark, used previously as a retrograde
 * indicator) is not in any of these three fonts. The Full Natal report
 * now uses the ASCII "Rx" suffix instead so the retrograde marker
 * renders reliably in Lambda's headless Chrome.
 */

/* === Noto Sans Symbols: zodiac signs + planets + Chiron + arrows === */
@font-face {
  font-family: 'Noto Sans Symbols';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('/fonts/NotoSansSymbols.woff2') format('woff2');
  /* Unicode coverage (font ships 1107 codepoints; ranges below match what the
   * cmap actually contains for the natal/forecast/compat reports). Notable
   * codepoints inside these ranges that earlier deployments LOST because the
   * unicode-range stopped at U+2653:
   *   U+2647  Pluto                ♇  (was tofu in Full Natal p3 / p25 / p33)
   *   U+26B7  Chiron               ⚷  (was tofu in Full Natal p25 / p33 / p34)
   * These ranges intentionally overlap "Noto Sans Symbols 2" below; the
   * browser resolves overlaps via the font-family cascade in the consumer
   * rule (full-tri.css --ff-glyph / --ff-display / --ff-body all list
   * 'Noto Sans Symbols' BEFORE 'Noto Sans Symbols 2', so this font wins on
   * any codepoint it actually contains).
   */
  /* EXACT CMAP, generated (speed audit 2026-10-08, F1). The block names
   * below are what the ranges used to be; the list is now only the
   * codepoints this file really contains inside them, because a browser
   * downloads a face for ANY character its unicode-range claims, glyph or
   * no glyph. A font never draws a glyph it lacks, so trimming the range
   * to the cmap cannot change what renders; it only stops wasted fetches.
   * Blocks: Letterlike (U+2122), Arrows, Misc Technical, Dotted Circle
   * (U+25CC), Misc Symbols (zodiac, planets, Pluto U+2647, Chiron U+26B7),
   * Dingbats (partial). Regenerate from the cmap if the woff2 changes.
   */
  unicode-range:
    U+2122, U+2190-2199, U+2300-230F, U+2311-2315, U+2317, U+231C-231F,
    U+2322-2323, U+2329-232A, U+232C-2335, U+237C, U+2380-2394, U+2396-239A,
    U+23AF, U+23BE-23CD, U+23D0-23DB, U+23E2-23E8, U+25CC, U+260A-260D,
    U+2613, U+2624-262F, U+2638-263B, U+263D-2653, U+2669-267E, U+2690-269D,
    U+26A2-26A9, U+26AD-26BC, U+26CE, U+26E2-26FF, U+271D-2721, U+2776-2793;
}

/* === Noto Sans Symbols 2: math operators + geometric aspects + star === */
@font-face {
  font-family: 'Noto Sans Symbols 2';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('/fonts/NotoSansSymbols2.woff2') format('woff2');
  /* Unicode coverage. Notable codepoints inside these ranges that earlier
   * deployments LOST because the unicode-range started at U+2654:
   *   U+2605  Black star          ★  (Exaltation legend marker, p3)
   *   U+25A0-U+25FF geometric shapes (Square / Trine aspect glyphs)
   * Ranges overlap "Noto Sans Symbols" above; the consumer-side
   * font-family cascade (font 1 before font 2) settles which font is
   * chosen on codepoints both cover.
   *
   * EXACT CMAP, generated (speed audit 2026-10-08, F1), as in the face
   * above. This one mattered on the web pages: the zodiac signs ♈-♓ (and
   * ☽, ♇) are NOT in this file, but the old U+2600-26FF range claimed them,
   * so every ZodiacGlyph and --fglyph sign on /, /learn and /reports made
   * the browser download all 240 KB of it and then draw the sign from the
   * next font anyway. Same for "→": this file has only the white arrows
   * ⇦-⇳ and ↯, none of the plain ones.
   * Blocks: Romanian (U+0218-021B), Letterlike (™), Arrows, Math operators, Misc Technical,
   * Geometric shapes (Square / Trine), Misc Symbols (star ★, Sun ☉),
   * Dingbats, Supplemental Arrows-A, Supplemental Math, Misc Symbols and
   * Arrows. Regenerate from the cmap if the woff2 changes.
   */
  unicode-range:
    U+0218-021B, U+2122, U+21AF, U+21E6-21F0, U+21F3, U+2212, U+2218-2219,
    U+2299, U+22C4-22C6, U+2316, U+2318, U+231A-231B, U+2324-2328, U+232B,
    U+237B, U+237D-237F, U+2394, U+23CE-23CF, U+23E9-23EA, U+23ED-23EF,
    U+23F1-23FF, U+25A0-2609, U+260E-2612, U+2614-2623, U+2630-2637, U+263C,
    U+2654-2668, U+267F-268F, U+269E-26A1, U+26AA-26AC, U+26BD-26CD,
    U+26CF-26E1, U+2700-2704, U+2706-2709, U+270B-271C, U+2722-2727,
    U+2729-274B, U+274D, U+274F-2753, U+2756-2775, U+2794, U+2798-27AF,
    U+27B1-27BE, U+2B00-2B0D, U+2B12-2B2F, U+2B4D-2B73, U+2B76-2B95,
    U+2B97-2BFD, U+2BFF;
}

/* === Noto Sans Devanagari — Sanskrit nakshatra names + Vedic terms === */
@font-face {
  font-family: 'Noto Sans Devanagari';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('/fonts/noto-sans-devanagari.woff2') format('woff2');
  unicode-range:
    U+0900-097F,      /* Devanagari */
    U+A8E0-A8FF,      /* Devanagari Extended */
    U+11B00-11B5F;    /* Devanagari Extended-A */
}

/*
 * Element-class fallback (legacy). Modern code uses var(--ff-glyph) in the
 * per-SKU CSS which references both 'Noto Sans Symbols' and
 * 'Noto Sans Symbols 2' in cascade order. The classes below remain in case
 * any inline element relies on them.
 */
.astro-symbol,
.planet-symbol,
[class*="astro-"] {
  font-family: 'Noto Sans Symbols', 'Noto Sans Symbols 2', 'Apple Symbols', 'Segoe UI Symbol', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
