/* ============================================================
   Polylex design language "night archive" — SERIALIZED TOKENS.
   Single source of truth for every web surface (welcome pages,
   video harness, app when it migrates). Non-CSS consumers read
   frontend/design/tokens.json (kept in sync with this file).
   Adopted 2026-07-18. Change tokens HERE, never inline a hex.
   ============================================================ */

:root {
  /* color */
  --ground: #151413;      /* the only background */
  --ivory:  #ece7db;      /* primary text */
  --bright: #f3f1ea;      /* headwords, emphasis */
  --quiet:  #97917f;      /* secondary: labels, IPA, translations */
  --faint:  #2e2c28;      /* every hairline rule and border */
  --seal:   #a63d2f;      /* the single accent (chops, status) on web */
  --seal-video: #b8492f;  /* accent lifted for video compression legibility */
  --mute-1: #5a564c;      /* inactive/karaoke-dimmed primary text */
  --mute-2: #4a463e;      /* inactive/karaoke-dimmed secondary text */
  --wash:   rgba(236, 231, 219, .05);  /* active-row ivory wash */

  /* ornament (deco scale ground + jali frieze band) */
  --pattern-scale: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cg fill='none' stroke='%23ece7db' stroke-opacity='.045'%3E%3Cpath d='M0 28 A28 28 0 0 1 56 28'/%3E%3Cpath d='M-28 56 A28 28 0 0 1 28 56'/%3E%3Cpath d='M28 56 A28 28 0 0 1 84 56'/%3E%3C/g%3E%3C/svg%3E");
  --pattern-frieze: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='14'%3E%3Cpath d='M13 1 L25 7 L13 13 L1 7 Z' fill='none' stroke='%23ece7db' stroke-opacity='.2'/%3E%3Ccircle cx='13' cy='7' r='1.1' fill='%23a63d2f' fill-opacity='.6'/%3E%3C/svg%3E");
}

/* ---- faces (self-hosted at /fonts on every surface) ----
   display latin  = Playfair Display  ·  prose/ui = Literata
   headword faces: ell = GFS Didot · arb = Amiri · cjk = system serif CJK
   Subsets: latin + greek + cyrillic as needed per family. */

@font-face{font-family:'Playfair Display';font-style:normal;font-weight:500 700;font-display:swap;
  src:url(/fonts/playfair-var.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122}
@font-face{font-family:'Playfair Display';font-style:normal;font-weight:500 700;font-display:swap;
  src:url(/fonts/playfair-var-cyr.woff2) format('woff2');
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Playfair Display';font-style:italic;font-weight:500;font-display:swap;
  src:url(/fonts/playfair-italic.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122}
@font-face{font-family:'Playfair Display';font-style:italic;font-weight:500;font-display:swap;
  src:url(/fonts/playfair-italic-cyr.woff2) format('woff2');
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Literata';font-style:normal;font-weight:400 600;font-display:swap;
  src:url(/fonts/literata-var.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122}
@font-face{font-family:'Literata';font-style:normal;font-weight:400 600;font-display:swap;
  src:url(/fonts/literata-var-greek.woff2) format('woff2');
  unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}
@font-face{font-family:'Literata';font-style:normal;font-weight:400 600;font-display:swap;
  src:url(/fonts/literata-var-cyr.woff2) format('woff2');
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Literata';font-style:italic;font-weight:400;font-display:swap;
  src:url(/fonts/literata-italic.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122}
@font-face{font-family:'Literata';font-style:italic;font-weight:400;font-display:swap;
  src:url(/fonts/literata-italic-cyr.woff2) format('woff2');
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'GFS Didot';font-style:normal;font-weight:400;font-display:swap;
  src:url(/fonts/gfsdidot-greek.woff2) format('woff2');
  unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}
@font-face{font-family:'GFS Didot';font-style:normal;font-weight:400;font-display:swap;
  src:url(/fonts/gfsdidot-latin.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122}
@font-face{font-family:'Amiri';font-style:normal;font-weight:400;font-display:swap;
  src:url(/fonts/amiri-arabic.woff2) format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+08A0-08FF,U+200C-200E,U+2010-2011,U+FB50-FDFF,U+FE70-FEFC}
@font-face{font-family:'Amiri';font-style:normal;font-weight:400;font-display:swap;
  src:url(/fonts/amiri-latin.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122}
