/* fonts.css - one place for the fonts of every language. Loads LAST among the stylesheets.
   English, Indonesian, Malay: Bricolage Grotesque (headings) + Plus Jakarta Sans (text).
   Thai: Noto Sans Thai, a loopless face, for headings and text alike (the owner chose loopless Thai for the
   whole app on 2026-10-21; the looped IBM Plex font is no longer loaded). Chinese / Japanese rules stay for
   later, but those languages are switched off and their fonts are not loaded.
   Also replaces "Barlow Condensed", which older rules still ask for but which is never loaded (the browser
   fell back to a serif font in the admin pages).
   Rollback: remove the <link> to this file (and the IBM Plex font link) from index.html. */

:root {
  --font-d: "Bricolage Grotesque", "Noto Sans Thai", "Segoe UI", sans-serif;
  /* Thai text without loops ("ไม่มีหัว"), the same face as the headings (owner, 2026-10-21) */
  --font-b: "Plus Jakarta Sans", "Noto Sans Thai", "Segoe UI", Arial, sans-serif;
}
html:lang(zh) {
  --font-d: "Bricolage Grotesque", "Noto Sans SC", sans-serif;
  --font-b: "Plus Jakarta Sans", "Noto Sans SC", "Segoe UI", sans-serif;
}
html:lang(ja) {
  --font-d: "Bricolage Grotesque", "Noto Sans JP", sans-serif;
  --font-b: "Plus Jakarta Sans", "Noto Sans JP", "Segoe UI", sans-serif;
}
html:lang(zh) body, html:lang(zh) button, html:lang(zh) input, html:lang(zh) select, html:lang(zh) textarea,
html:lang(ja) body, html:lang(ja) button, html:lang(ja) input, html:lang(ja) select, html:lang(ja) textarea {
  font-family: var(--font-b);
}
button, input, select, textarea { font-family: var(--font-b); }

/* Rules that still name the unloaded Barlow fonts */
.adm-brand, .crumbs b, .panel h4, .modal-b h4, .st, .av, .pr, .mc2 .i2 b, .ts-pr, .pm-price, .pm-seg button {
  font-family: var(--font-d) !important;
}
.tb th, .bdg, .tabs button, .tagn, .day, .ct, .adm-brand span {
  font-family: var(--font-b) !important;
}
.adm-brand { letter-spacing: -.01em !important; }
.crumbs b { text-transform: none !important; letter-spacing: -.01em !important; font-size: 22px !important; }

/* Thai, Chinese, Japanese: never stretch letters apart or force capitals (it breaks the words) */
html:lang(th) body *, html:lang(zh) body *, html:lang(ja) body * {
  letter-spacing: normal !important;
  text-transform: none !important;
}
html:lang(th) .brand, html:lang(th) .brand *, html:lang(zh) .brand, html:lang(zh) .brand *, html:lang(ja) .brand, html:lang(ja) .brand * { text-transform: uppercase !important; letter-spacing: -.02em !important; }

/* Thai needs taller lines: vowels and tone marks sit above and below the letters */
html:lang(th) body { line-height: 1.65; }
html:lang(th) h1, html:lang(th) h2, html:lang(th) h3, html:lang(th) h4 { line-height: 1.3; }
html:lang(th) label, html:lang(th) .muted, html:lang(th) .sm { line-height: 1.55; }
html:lang(zh) body, html:lang(ja) body { line-height: 1.7; }
/* Small and grey text: a little darker and a little heavier so it stays easy to read */
:root { --t3: #4D4A60; }
:root[data-theme="dark"] { --t3: #C6C1D6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):not([data-theme="dark"]) { --t3: #C6C1D6; } }
.muted, .sm, small, .meta, .meta3, .hint, .fl, .day, .dist, .pf-cnt, .pf-count, .kmf-scale,
.dv-keys, .dc-l2, .dc-ago, .adc-tile span, .adc-x, .adc-y, .adp-nums, .lk-tip, .mc2 .i2 div,
.th-h .sm, .nt-r span, .adp-prof a, #side-ads { font-weight: 500; }
html:lang(th) .muted, html:lang(th) .sm, html:lang(th) small, html:lang(th) .meta, html:lang(th) .meta3,
html:lang(th) .dc-l2, html:lang(th) .mc2 .i2 div, html:lang(th) .adc-tile span, html:lang(th) .adp-nums { font-weight: 500; }
/* end of fonts.css */
