/* Words We Keep — the quote faces (Figma: Type 310:3916).
   A quote carries data-font (js/app.js → fontOf). Each face sets, per length tier, its size
   against the site's quote scale (--qf-scale: its size ÷ Instrument's on the same Figma board),
   its leading, tracking and features. app.css reads these in .quote and .ann-word; the tier
   sizes themselves (tokens.css) are never touched, so notes mode, tablet and phone follow.
   Tiers: l = Figma "Short" · m = "Medium" · s and xs = "Long".
   A face has ONE leading and ONE tracking, at every length and every breakpoint — except
   Round, whose short quotes are set at 1.15 (both are
   relative to the type size); only --qf-scale changes with the tier. Where Figma's short board
   drew another leading, the medium / long one is used (Bill, 2026-09-27).
   The scale, leading and tracking here are each face's starting values: what is saved in the
   library's Fonts tab (data/faces.json) is laid over them by js (app.js, admin.js → facesCSS).
   The files are served by the fonts Worker (workers/fonts) to this site's pages only. */

@font-face { font-family: 'Print';   src: url('https://fonts.wordswekeep.org/print.woff2') format('woff2');   font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Grotesk'; src: url('https://fonts.wordswekeep.org/grotesk.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Poet';    src: url('https://fonts.wordswekeep.org/poet.woff2') format('woff2');    font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Sketch';  src: url('https://fonts.wordswekeep.org/sketch.woff2') format('woff2');  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Author';  src: url('https://fonts.wordswekeep.org/author.woff2') format('woff2');  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fig';     src: url('https://fonts.wordswekeep.org/fig.woff2') format('woff2');     font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Stone';   src: url('https://fonts.wordswekeep.org/stone.woff2') format('woff2');   font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Rondeau'; src: url('https://fonts.wordswekeep.org/rondeau.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Curly';   src: url('https://fonts.wordswekeep.org/curly.woff2') format('woff2');   font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Kid';     src: url('https://fonts.wordswekeep.org/kid.woff2') format('woff2');     font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --native-serif: 'Noto Serif SC', 'Songti SC', serif;
  --native-sans: var(--noto-sans);
}

/* Instrument: the site's own settings (app.css, tokens.css) — nothing to set. */

[data-font="print"]   { --qf-family: 'Print', var(--native-serif);   --qf-style: normal; --qf-leading: 1.25; --qf-tracking: -0.015em; }
[data-font="print"][data-tier="m"]  { --qf-scale: 0.9167; }
[data-font="print"][data-tier="s"],
[data-font="print"][data-tier="xs"] { --qf-scale: 0.9; }

[data-font="grotesk"] { --qf-family: 'Grotesk', var(--native-sans);  --qf-style: normal; --qf-leading: 1.2; --qf-tracking: -0.01em; --qf-native: var(--qn-sans, var(--native-sans)); --qf-native-scale: var(--qn-sans-scale); --qf-native-leading: var(--qn-sans-leading); --qf-native-tracking: var(--qn-sans-tracking); --qf-native-weight: var(--qn-sans-weight); }
[data-font="grotesk"][data-tier="m"]  { --qf-scale: 0.875; }  /* 42 / 48 */
[data-font="grotesk"][data-tier="s"],
[data-font="grotesk"][data-tier="xs"] { --qf-scale: 0.85; }   /* 34 / 40 */

[data-font="round"]   { --qf-family: 'Cal Sans', var(--native-sans); --qf-style: normal; --qf-leading: 1.3; --qf-native: var(--qn-sans, var(--native-sans)); --qf-native-scale: var(--qn-sans-scale); --qf-native-leading: var(--qn-sans-leading); --qf-native-tracking: var(--qn-sans-tracking); --qf-native-weight: var(--qn-sans-weight); }
[data-font="round"][data-tier="l"]  { --qf-scale: 0.9375; --qf-leading: 1.15; }   /* 60 / 64; the one exception to "one leading per face": a short quote in Round is tighter (Bill, 2026-09-27) */
[data-font="round"][data-tier="m"]  { --qf-scale: 0.875; }
[data-font="round"][data-tier="s"],
[data-font="round"][data-tier="xs"] { --qf-scale: 0.85; }

[data-font="poet"]    { --qf-family: 'Poet', var(--native-serif);    --qf-style: normal; --qf-leading: 1.1; --qf-tracking: 0.05em; } /* Bill, 2026-09-27 (the boards drew 1.2 and 0) */
[data-font="poet"][data-tier="l"]  { --qf-scale: 1.875; }     /* 120 / 64 */
[data-font="poet"][data-tier="m"]  { --qf-scale: 1.5; }       /* 72 / 48 */
[data-font="poet"][data-tier="s"],
[data-font="poet"][data-tier="xs"] { --qf-scale: 1.2; }       /* 48 / 40 */

[data-font="goudy"]   { --qf-family: 'Sorts Mill Goudy', var(--native-serif); --qf-style: normal; --qf-leading: 1.25; --qf-tracking: -0.03em; }
[data-font="goudy"][data-tier="m"]  { --qf-scale: 0.9167; }
[data-font="goudy"][data-tier="s"],
[data-font="goudy"][data-tier="xs"] { --qf-scale: 0.9; }

[data-font="sketch"]  { --qf-family: 'Sketch', var(--native-sans);   --qf-style: normal; --qf-leading: 1.25; --qf-tracking: -0.01em; --qf-native: var(--qn-sans, var(--native-sans)); --qf-native-scale: var(--qn-sans-scale); --qf-native-leading: var(--qn-sans-leading); --qf-native-tracking: var(--qn-sans-tracking); --qf-native-weight: var(--qn-sans-weight); }
[data-font="sketch"][data-tier="m"]  { --qf-scale: 0.875; }
[data-font="sketch"][data-tier="s"],
[data-font="sketch"][data-tier="xs"] { --qf-scale: 0.8; }     /* 32 / 40 */

[data-font="author"]  { --qf-family: 'Author', var(--native-serif);  --qf-style: normal; --qf-leading: 1.3; --qf-tracking: -0.05em; --qf-features: "liga" 1, "clig" 1, "ss01" 1; }
[data-font="author"][data-tier="m"]  { --qf-scale: 1.125; }

/* Fig, Stone, Rondeau: Figma Type 404:720 (Instrument on those boards: 64 / 48 / 40). */
[data-font="fig"]     { --qf-family: 'Fig', var(--native-sans);      --qf-style: normal; --qf-leading: 1.22; --qf-tracking: -0.02em; --qf-features: "liga" 1, "clig" 1, "ss01" 1; --qf-native: var(--qn-sans, var(--native-sans)); --qf-native-scale: var(--qn-sans-scale); --qf-native-leading: var(--qn-sans-leading); --qf-native-tracking: var(--qn-sans-tracking); --qf-native-weight: var(--qn-sans-weight); } /* ss01 = the alternate a and y */
[data-font="fig"][data-tier="l"]  { --qf-scale: 0.88; }       /* scales, leading and tracking tuned by Bill, 2026-10-03 (the boards drew 0.9688 / 0.8333 / 0.8, 1.3, -1.5%) */
[data-font="fig"][data-tier="m"]  { --qf-scale: 0.85; }
[data-font="fig"][data-tier="s"],
[data-font="fig"][data-tier="xs"] { --qf-scale: 0.9; }

[data-font="stone"]   { --qf-family: 'Stone', var(--native-serif);   --qf-style: normal; --qf-leading: 1.3; --qf-tracking: -0.015em; --qf-features: "liga" 1, "clig" 1, "ss07" 1; } /* ss07 = the font's alternate a without its alternate g (workers/fonts/tools/convert.py) */
[data-font="stone"][data-tier="l"]  { --qf-features: "liga" 1, "clig" 1, "ss07" 1, "ss02" 1, "ss03" 1; } /* a short quote also takes the swirly r (ss02) and the pen terminals (ss03), as on the short board */
[data-font="stone"][data-tier="m"]  { --qf-scale: 0.86; }    /* scales, leading and tracking tuned by Bill, 2026-10-03 (the boards drew 0.8333 / 0.8, 1.35, -1%) */
[data-font="stone"][data-tier="s"],
[data-font="stone"][data-tier="xs"] { --qf-scale: 0.85; }

[data-font="rondeau"] { --qf-family: 'Rondeau', var(--native-serif); --qf-style: normal; --qf-leading: 1.05; --qf-tracking: 0.0015em; --qf-features: "liga" 1, "clig" 1; } /* ligatures: see app.css .quote — asked for by name in every face since 2026-10-03, because a browser drops them (fi, ff, ffi) as soon as letter-spacing is not 0 */
[data-font="rondeau"][data-tier="l"]  { --qf-scale: 1.12; }   /* scales, leading and tracking tuned by Bill, 2026-10-03 (the boards drew 1.125 / 1.0833 / 1.05, 1.15, 0) */
[data-font="rondeau"][data-tier="m"],
[data-font="rondeau"][data-tier="s"],
[data-font="rondeau"][data-tier="xs"] { --qf-scale: 1.05; }

/* Curly, Kid: Figma Type 545:2614 (Instrument on those boards: 64 / 48 / 40). One leading and
   tracking each, from the medium and long boards (the short ones drew 1.25 and, for Kid, -7%).
   Curly's original language falls back to the serif, Kid's to the sans (Bill, 2026-10-10). */
[data-font="curly"]   { --qf-family: 'Curly', var(--native-serif);   --qf-style: normal; --qf-leading: 1.2; --qf-tracking: -0.07em; }
[data-font="curly"][data-tier="l"]  { --qf-scale: 0.9688; }   /* 62 / 64 */
[data-font="curly"][data-tier="m"]  { --qf-scale: 0.8333; }   /* 40 / 48 */

[data-font="kid"]     { --qf-family: 'Kid', var(--native-sans);      --qf-style: normal; --qf-leading: 1.3; --qf-tracking: -0.01em; --qf-native: var(--qn-sans, var(--native-sans)); --qf-native-scale: var(--qn-sans-scale); --qf-native-leading: var(--qn-sans-leading); --qf-native-tracking: var(--qn-sans-tracking); --qf-native-weight: var(--qn-sans-weight); }
[data-font="kid"][data-tier="l"]  { --qf-scale: 0.9688; }     /* 62 / 64 */
[data-font="kid"][data-tier="m"]  { --qf-scale: 0.8333; }     /* 40 / 48 */

/* The original-language version is set in Noto (serif or sans, by the face's character) at the
   site's own native size: the face's scale does not apply to it. */
.quote[data-native][data-font] { --qf-scale: 1; }

/* ---------- The original language, in its script's font ----------
   A quote's original words that the face cannot set (another script, or a letter it lacks) are
   set in a Google font chosen per script: its serif for a serif face, its sans for the sans faces
   (above: --qf-native and --qf-native-*, which pick the sans ones). Each script has, for each, its
   size against the tier's (--qn-scale / --qn-sans-scale), leading, tracking and weight —
   tuned by Bill on a temporary page (2026-10-06). js/app.js → quoteScript sets data-script;
   Arabic and Hebrew also read right to left (dir="rtl"). Without a script: the CJK values in
   tokens.css (--quote-native-*). */
[data-native][data-script="hant"] { --qn-serif: 'Ming TC', serif;              --qn-sans: 'Noto Sans TC', sans-serif; }
[data-native][data-script="hans"] { --qn-serif: 'Ming SC', serif;              --qn-sans: 'Noto Sans SC', sans-serif; }
[data-native][data-script="jpan"] { --qn-serif: 'BIZ UDPMincho', serif;        --qn-sans: 'Murecho', sans-serif; }
[data-native][data-script="kore"] { --qn-serif: 'Gowun Batang', serif;         --qn-sans: 'IBM Plex Sans KR', sans-serif; }
[data-native][data-script="cyrl"] { --qn-serif: 'Cormorant Garamond', serif;   --qn-sans: 'Golos Text', sans-serif; }
[data-native][data-script="grek"] { --qn-serif: 'GFS Didot', serif;            --qn-sans: 'Commissioner', sans-serif; }
[data-native][data-script="arab"] { --qn-serif: 'Scheherazade New', serif;     --qn-sans: 'Alexandria', sans-serif; }
[data-native][data-script="hebr"] { --qn-serif: 'Noto Serif Hebrew', serif;    --qn-sans: 'IBM Plex Sans Hebrew', sans-serif; }
[data-native][data-script="thai"] { --qn-serif: 'Noto Serif Thai', serif;      --qn-sans: 'Bai Jamjuree', sans-serif; }
[data-native][data-script="deva"] { --qn-serif: 'Noto Serif Devanagari', serif; --qn-sans: 'Poppins', sans-serif; }
[data-native][data-script="latn"] { --qn-serif: 'Noto Serif', serif;              --qn-sans: 'Noto Sans', sans-serif; }
/* The serif's sizes, then the sans' (Bill, 2026-10-06; Chinese in 澹雅明体C — Ming SC / TC, one
   weight — 2026-10-10: its characters are each 1.4% wider than Noto's, so no tracking) */
[data-native][data-script="hant"] { --qn-scale: 0.85; --qn-leading: 1.4; --qn-tracking: 0em; --qn-weight: 400; }
[data-native][data-script="hans"] { --qn-scale: 0.85; --qn-leading: 1.4; --qn-tracking: 0em; --qn-weight: 400; }
[data-native][data-script="jpan"] { --qn-scale: 0.88; --qn-leading: 1.4; --qn-tracking: 0.02em; --qn-weight: 400; }
[data-native][data-script="kore"] { --qn-scale: 0.95; --qn-leading: 1.4; --qn-tracking: 0em; --qn-weight: 400; }
[data-native][data-script="cyrl"] { --qn-scale: 1.25; --qn-leading: 0.85; --qn-tracking: -0.02em; --qn-weight: 400; }
[data-native][data-script="grek"] { --qn-scale: 1.08; --qn-leading: 1.15; --qn-tracking: -0.02em; --qn-weight: 400; }
[data-native][data-script="arab"] { --qn-scale: 1.07; --qn-leading: 1.55; --qn-tracking: -0.03em; --qn-weight: 400; }
[data-native][data-script="hebr"] { --qn-scale: 1.03; --qn-leading: 1.3; --qn-tracking: -0.005em; --qn-weight: 400; }
[data-native][data-script="thai"] { --qn-scale: 1.2; --qn-leading: 1.45; --qn-tracking: -0.035em; --qn-weight: 400; }
[data-native][data-script="deva"] { --qn-scale: 1.06; --qn-leading: 1.4; --qn-tracking: -0.015em; --qn-weight: 400; }
[data-native][data-script="latn"] { --qn-scale: 0.95; --qn-leading: 1.25; --qn-tracking: 0em; --qn-weight: 400; }
[data-native][data-script="hant"] { --qn-sans-scale: 0.9; --qn-sans-leading: 1.45; --qn-sans-tracking: 0.01em; --qn-sans-weight: 700; }
[data-native][data-script="hans"] { --qn-sans-scale: 0.9; --qn-sans-leading: 1.45; --qn-sans-tracking: 0.01em; --qn-sans-weight: 700; }
[data-native][data-script="jpan"] { --qn-sans-scale: 0.9; --qn-sans-leading: 1.4; --qn-sans-tracking: 0.02em; --qn-sans-weight: 700; }
[data-native][data-script="kore"] { --qn-sans-scale: 1.02; --qn-sans-leading: 1.4; --qn-sans-tracking: 0em; --qn-sans-weight: 700; }
[data-native][data-script="cyrl"] { --qn-sans-scale: 1.15; --qn-sans-leading: 1; --qn-sans-tracking: -0.02em; --qn-sans-weight: 600; }
[data-native][data-script="grek"] { --qn-sans-scale: 1.11; --qn-sans-leading: 1.1; --qn-sans-tracking: -0.025em; --qn-sans-weight: 700; }
[data-native][data-script="arab"] { --qn-sans-scale: 0.96; --qn-sans-leading: 1.55; --qn-sans-tracking: -0.02em; --qn-sans-weight: 700; }
[data-native][data-script="hebr"] { --qn-sans-scale: 1.12; --qn-sans-leading: 1.2; --qn-sans-tracking: -0.01em; --qn-sans-weight: 600; }
[data-native][data-script="thai"] { --qn-sans-scale: 1.32; --qn-sans-leading: 1.35; --qn-sans-tracking: -0.025em; --qn-sans-weight: 600; }
[data-native][data-script="deva"] { --qn-sans-scale: 0.97; --qn-sans-leading: 1.45; --qn-sans-tracking: -0.01em; --qn-sans-weight: 700; }
[data-native][data-script="latn"] { --qn-sans-scale: 0.95; --qn-sans-leading: 1.25; --qn-sans-tracking: 0em; --qn-sans-weight: 400; }
