/* TAN fonts — self-hosted, so nothing is fetched from Google and a font only
   downloads when someone actually chooses it (the browser fetches a face only
   when text uses it). Latin subset, WOFF. Licences: fonts/LICENSES.txt */

@font-face { font-family: 'TAN Inter';      src: url(fonts/inter.woff) format('woff');          font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'TAN Gabarito';   src: url(fonts/gabarito.woff) format('woff');       font-weight: 500 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'TAN Mono';       src: url(fonts/jetbrains-mono.woff) format('woff'); font-weight: 400 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'TAN Lexend';     src: url(fonts/lexend.woff) format('woff');         font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'TAN Nunito';     src: url(fonts/nunito.woff) format('woff');         font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'TAN Sora';       src: url(fonts/sora.woff) format('woff');           font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'TAN Exo';        src: url(fonts/exo2.woff) format('woff');           font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'TAN Fredoka';    src: url(fonts/fredoka.woff) format('woff');        font-weight: 400 700; font-style: normal; font-display: swap; }

@font-face { font-family: 'TAN Atkinson';   src: url(fonts/atkinson-400.woff) format('woff');   font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'TAN Atkinson';   src: url(fonts/atkinson-700.woff) format('woff');   font-weight: 500 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'TAN Andika';     src: url(fonts/andika-400.woff) format('woff');     font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'TAN Andika';     src: url(fonts/andika-700.woff) format('woff');     font-weight: 500 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'TAN Poppins';    src: url(fonts/poppins-400.woff) format('woff');    font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'TAN Poppins';    src: url(fonts/poppins-500.woff) format('woff');    font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'TAN Poppins';    src: url(fonts/poppins-600.woff) format('woff');    font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'TAN Poppins';    src: url(fonts/poppins-700.woff) format('woff');    font-weight: 700; font-style: normal; font-display: swap; }

/* The choices. "inter" is the original look and needs no attribute. */
:root {
  --font-ui: 'TAN Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'TAN Gabarito', 'Trebuchet MS', system-ui, sans-serif;
  --body: var(--font-ui);
  --display: var(--font-display);
  --mono: 'TAN Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}
html[data-font="lexend"]    { --body: 'TAN Lexend', system-ui, sans-serif;    --display: 'TAN Lexend', system-ui, sans-serif; }
html[data-font="atkinson"]  { --body: 'TAN Atkinson', system-ui, sans-serif;  --display: 'TAN Atkinson', system-ui, sans-serif; }
html[data-font="andika"]    { --body: 'TAN Andika', system-ui, sans-serif;    --display: 'TAN Andika', system-ui, sans-serif; }
html[data-font="nunito"]    { --body: 'TAN Nunito', system-ui, sans-serif;    --display: 'TAN Nunito', system-ui, sans-serif; }
html[data-font="poppins"]   { --body: 'TAN Poppins', system-ui, sans-serif;   --display: 'TAN Poppins', system-ui, sans-serif; }
html[data-font="fredoka"]   { --body: 'TAN Nunito', system-ui, sans-serif;    --display: 'TAN Fredoka', system-ui, sans-serif; }
html[data-font="sora"]      { --body: 'TAN Inter', system-ui, sans-serif;     --display: 'TAN Sora', system-ui, sans-serif; }
html[data-font="exo"]       { --body: 'TAN Inter', system-ui, sans-serif;     --display: 'TAN Exo', system-ui, sans-serif; }

/* Text size. Everything in the app is sized in px, so size is a zoom on the
   root content rather than a rewrite of every rule. */
html[data-tsize="s"]  { --ts: 0.94; }
html[data-tsize="m"]  { --ts: 1; }
html[data-tsize="l"]  { --ts: 1.12; }
html[data-tsize="xl"] { --ts: 1.25; }
