/* Shared stylesheet: thanhhaikhong.pages.dev.
 *
 * Strictly two colours, black and white, in every appearance. The look borrows from
 * poster typography: huge condensed uppercase display type (Anton), plain Inter for
 * reading, hairline rules between numbered rows, and whole bands that invert.
 * Fonts are self-hosted so the site loads nothing from third parties. Anton and Inter carry
 * Latin, Latin Extended and Vietnamese; Japanese, Korean and Chinese pages use Apple's
 * system faces at their heaviest weight for display type (see the :lang() block below).
 *
 * Layout: full-bleed bands; content inside a band is padded by --pad and capped at
 * --wide. Long-form pages read in a --text measure.
 */
@font-face {
  font-family: "Anton"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/anton-vietnamese.woff2) format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Anton"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/anton-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Anton"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/anton-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/assets/fonts/inter-vietnamese.woff2) format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/assets/fonts/inter-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/assets/fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #000;
  --paper: #fff;
  --bg: var(--ink);
  --fg: var(--paper);
  /* Two rule weights only: solid --fg for structure (rows, grids, section dividers) and
   * --line for secondary dividers inside a component (table rows, menu items). --line is
   * tuned to ~3:1 against its ground so it still reads as a boundary. */
  --line-on-ink: rgba(255, 255, 255, .45);
  --line-on-paper: rgba(0, 0, 0, .45);
  --line: var(--line-on-ink);
  --wide: 96rem;
  --text: 46rem;
  --pad: clamp(1rem, 3.5vw, 3rem);
  --display: "Anton", "Impact", "Arial Narrow Bold", sans-serif;
  /* The whole type system: Anton for display, Inter in exactly four text roles.
   *   label  13px / 600 / +.08em, uppercase  (nav, buttons, tags, illustration labels)
   *   small  14px                            (footnotes, tables, menus)
   *   body   17px                            (set on body)
   *   lead   fluid 18–24px / 1.4             (the opening paragraph of a section) */
  --label-size: 13px; --label-weight: 600; --label-track: .08em;
  --small: 14px;
  --lead: clamp(1.15rem, 1.9vw, 1.5rem);
  color-scheme: dark;
}
:root[data-theme="light"] { --bg: var(--paper); --fg: var(--ink); --line: var(--line-on-paper); color-scheme: light; }
/* A band painted the other way round from the current theme (the footer is one too). */
.invert, footer.site { --bg: var(--paper); --fg: var(--ink); --line: var(--line-on-paper); background: var(--bg); color: var(--fg); }
:root[data-theme="light"] .invert, :root[data-theme="light"] footer.site { --bg: var(--ink); --fg: var(--paper); --line: var(--line-on-ink); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 17px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh; display: flex; flex-direction: column;
}
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
/* Scripts reveal parts with the hidden attribute; a component display rule must not undo it. */
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.display { font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: .98; letter-spacing: -.005em; margin: 0; }
/* A single long word (DATENSCHUTZERKLÄRUNG) must hyphenate, or break, rather than run off
 * the screen. hyphens:auto uses each page's lang attribute. */
.display, .doc-head h1, .prose h2, .acts h3, .app-hero .split .tag { overflow-wrap: break-word; }
.doc-head h1, .prose h2, .acts h3 { hyphens: auto; -webkit-hyphens: auto; }
/* One label style everywhere; components below only add layout. */
.label, header.site nav a, .rows .status, .btn, footer.site h2, .theme button, .lang summary, .lang a span,
footer.site .promises, .skip, .stage :is(.bar, .meta, .reveal, .grades span, .count, .tabs span, .sign em, .links span) {
  font-size: var(--label-size); font-weight: var(--label-weight); letter-spacing: var(--label-track); text-transform: uppercase; }
.muted { opacity: .62; }
.small { font-size: var(--small); }
/* App names keep their casing: ITEMs, CARDs, SEARCHes, WORDs, PADs. */
.keep { text-transform: none !important; }

/* ---------- Header ---------- */
header.site { background: var(--bg); color: var(--fg); border-bottom: 1px solid var(--fg); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem clamp(1rem, 2.5vw, 2rem); min-height: 3.5rem; padding-top: .6rem; padding-bottom: .6rem; }
header.site .brand .short { display: none; }
@media (max-width: 40rem) {
  /* Phone: the name without "Apps" (never an abbreviation), a little smaller, tighter gaps. */
  header.site .brand .long { display: none; } header.site .brand .short { display: inline; }
  header.site .brand { font-size: clamp(1rem, 4.6vw, 1.2rem); }
  header.site .wrap { column-gap: .6rem; }
  /* The switch shows only the mode you can switch to, so brand, language and switch share
   * one row; "Apps" is dropped from the phone menu (the brand and footer already lead there). */
  .theme button[aria-pressed="true"] { display: none; }
  .theme button + button { border-left: 0; }
  header.site nav a:first-child { display: none; }
  /* Phone: brand and switch on the first row, the menu on its own row below. */
  header.site .theme { margin-left: auto; }
  header.site nav { order: 3; flex-basis: 100%; margin-left: 0; justify-content: space-between; }
}
header.site .brand { white-space: nowrap; font-family: var(--display); font-size: 1.5rem; text-transform: uppercase; text-decoration: none; letter-spacing: .01em; }
.logo { display: inline-block; width: 1.14em; height: 1.3em; margin-right: .28em; vertical-align: -.26em; background: currentColor;
  -webkit-mask: url(/assets/emptyset.svg) center / contain no-repeat; mask: url(/assets/emptyset.svg) center / contain no-repeat; }
header.site nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: .35rem clamp(.6rem, 2.5vw, 2rem); }
header.site nav a { text-decoration: none; }
header.site nav a:hover { text-decoration: underline; }

main { flex: 1; width: 100%; }

/* ---------- Hero: type as big as the screen allows ---------- */
.hero { padding: clamp(2.5rem, 7vw, 6rem) 0 clamp(2.5rem, 6vw, 5rem); }
.hero h1 { font-size: clamp(4rem, 17.5vw, 19rem); }
.hero .intro { display: grid; gap: 1.5rem; margin-top: clamp(2rem, 5vw, 4rem); border-top: 1px solid var(--fg); padding-top: 1.5rem; }
.hero .intro p { margin: 0; font-size: var(--lead); line-height: 1.4; max-width: 40rem; }
@media (min-width: 52rem) { .hero .intro { grid-template-columns: 1fr 2fr; } }

/* ---------- Ticker band ---------- */
.ticker { overflow: hidden; border-block: 1px solid var(--fg); white-space: nowrap; }
.ticker .track { display: inline-flex; animation: ticker 28s linear infinite; }
.ticker span { font-family: var(--display); font-size: clamp(2rem, 5vw, 4rem); line-height: 1; padding: .9rem 0; }
.ticker span::after { content: ""; display: inline-block; width: .55em; height: .55em; margin: 0 .5em; vertical-align: .12em; background: currentColor; -webkit-mask: url(/assets/asterisk.svg) center / contain no-repeat; mask: url(/assets/asterisk.svg) center / contain no-repeat; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker .track { animation: none; } }

/* ---------- Section heads ---------- */
.section { padding: clamp(3.5rem, 9vw, 8rem) 0; }
.section-head { display: grid; gap: 1.25rem; margin-bottom: clamp(2rem, 5vw, 4rem); }
.section-head h2 { font-size: clamp(3rem, 10vw, 9rem); }
.section-head p { margin: 0; max-width: 38rem; font-size: var(--lead); line-height: 1.4; }
@media (min-width: 52rem) { .section-head { grid-template-columns: 2fr 1fr; align-items: end; } }

/* ---------- Numbered rows (the app index) ---------- */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--fg); }
.rows li { border-bottom: 1px solid var(--fg); }
.rows a {
  display: grid; grid-template-columns: 2.5rem 1fr auto; gap: .5rem 1.25rem; align-items: center;
  padding: clamp(1rem, 2.5vw, 1.75rem) .25rem; text-decoration: none;
  transition: background-color .15s, color .15s, padding .15s;
}
.rows .n { font-family: var(--display); font-size: 1.25rem; align-self: start; padding-top: .35em; }
.rows .name { font-family: var(--display); font-size: clamp(3rem, 11vw, 9.5rem); line-height: .88; }
.rows .name small { font-size: .38em; vertical-align: top; }
.rows .desc { grid-column: 2 / -1; max-width: 34rem; }
/* Narrow screens: the status sits on its own line under the description. */
.rows .status { grid-column: 2 / -1; justify-self: start; white-space: nowrap; }
.rows a:focus-visible { background: var(--fg); color: var(--bg); padding-left: 1rem; padding-right: 1rem; }
@media (hover: hover) { .rows a:hover { background: var(--fg); color: var(--bg); padding-left: 1rem; padding-right: 1rem; } }
@media (min-width: 60rem) {
  .rows a { grid-template-columns: 4rem minmax(0, 1.4fr) minmax(0, 1fr); }
  /* The status column exists only once some app is on the App Store (build.py STORE). */
  .rows.has-status a { grid-template-columns: 4rem minmax(0, 1.4fr) minmax(0, 1fr) 12rem; }
  .rows .desc { grid-column: auto; }
  .rows .status { grid-column: auto; justify-self: end; align-self: center; }
}

/* An app's latest release (build.py NEW) tags its row: a ruled chip before the store status. */
.rows .status { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.rows .status .new { border: 1px solid currentColor; padding: .25rem .55rem; white-space: normal; }
@media (min-width: 60rem) { .rows .status { flex-direction: column; align-items: flex-end; text-align: right; } }

/* ---------- "New in" band on app pages (build.py NEW) ---------- */
.news.has-clip { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.news .clip { display: block; justify-self: center; width: min(100%, 16rem); border: 1px solid var(--fg); background: #000; }
.news .clip img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; }
@media (min-width: 60rem) {
  .news.has-clip { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); }
  .news .clip { width: 100%; position: sticky; top: 1.5rem; }
}

/* ---------- Numbered grid of statements ---------- */
.acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); border-top: 1px solid var(--fg); border-left: 1px solid var(--fg); }
@media (min-width: 40rem) { .acts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 60rem) { .acts { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); } }
.acts.cols-2 { --cols: 2; }
.acts.cols-3 { --cols: 3; }
.acts > div { padding: clamp(1.25rem, 2.5vw, 2rem); border-right: 1px solid var(--fg); border-bottom: 1px solid var(--fg); display: grid; gap: .75rem; align-content: start; }
.acts .n { font-family: var(--display); font-size: clamp(3.5rem, 7vw, 6rem); line-height: .9; }
.acts h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(1.6rem, 2.6vw, 2.25rem); line-height: 1; margin: 0; }
.acts p { margin: 0; }

/* ---------- Big call to action ---------- */
.cta-band { padding: clamp(3.5rem, 9vw, 8rem) 0; }
.cta-band .display { font-size: clamp(3.5rem, 13vw, 13rem); }
.cta-band a.mail { display: inline-block; margin-top: 1.5rem; font-size: clamp(1.25rem, 3.2vw, 2.5rem); font-weight: 600; text-decoration-thickness: 2px; word-break: break-all; }

/* ---------- App pages ---------- */
.app-hero { padding: clamp(2.5rem, 6vw, 5rem) 0; }
.app-hero > .wrap { display: grid; gap: clamp(1.5rem, 4vw, 3rem); }
.app-hero .top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--fg); padding-bottom: 1rem; }
.app-hero h1 { font-size: clamp(4.5rem, 21vw, 22rem); margin-bottom: -.1em; }
.app-hero .split .tag { font-family: var(--display); text-transform: uppercase; font-size: clamp(2rem, 5vw, 4.25rem); line-height: .98; margin: 0; }
.app-hero .split { display: grid; gap: 1.5rem; align-items: end; }
.app-hero .split p { margin: 0; font-size: var(--lead); line-height: 1.4; max-width: 36rem; }
@media (min-width: 52rem) { .app-hero .split { grid-template-columns: 1fr 1fr; } }
.app-hero .split .stack { display: grid; gap: 1.5rem; }
.plans-note { max-width: 46rem; }
.icon { width: 4.5rem; height: 4.5rem; border-radius: 1rem; flex: none; }
.mono { display: grid; place-items: center; background: var(--fg); color: var(--bg); font-family: var(--display); font-size: 2.6rem; line-height: 1; }
.btn { display: inline-block; background: var(--fg); color: var(--bg); padding: .9rem 1.5rem; text-decoration: none; border: 1px solid var(--fg); }
.btn[aria-disabled="true"] { cursor: default; background: transparent; color: var(--fg); }
.btn.ghost { background: transparent; color: var(--fg); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* A framed illustration on app pages; each page draws its own inside. */
.stage { border: 1px solid var(--fg); padding: clamp(1rem, 3vw, 2.5rem); }

.facts { padding: clamp(3rem, 7vw, 6rem) 0; }
.facts .display { font-size: clamp(2.5rem, 7vw, 6rem); margin-bottom: 1.5rem; }
.facts p { max-width: 42rem; font-size: var(--lead); line-height: 1.4; }

/* ---------- Long-form pages (privacy, terms, support) ---------- */
.doc { max-width: var(--text); }
.doc-head { padding: clamp(2.5rem, 7vw, 5rem) 0 1.5rem; border-bottom: 1px solid var(--fg); margin-bottom: 1rem; }
.doc-head h1 { font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: .98; font-size: clamp(3.5rem, 12vw, 8rem); margin: 0; }
/* Leading for display type, from Anton's glyph boxes (em): caps 0.86 tall, comma 0.115 below,
 * one mark above (É Ñ Ä) up to 1.10, a dot or cedilla below 0.20-0.31, stacked or hook marks
 * (Ấ Ỗ Ả) 1.21. Base .98 clears a comma; build.py adds .lead-1 / .lead-2 by the letters present. */
:is(.display, .doc-head h1, .app-hero .split .tag).lead-1 { line-height: 1.13; }
:is(.display, .doc-head h1, .app-hero .split .tag).lead-2 { line-height: 1.24; }
.doc-head p { margin: 1rem 0 0; }
.doc-head .lead { font-size: var(--lead); line-height: 1.4; }
/* "Add to ITEMs" landing (<slug>/import/): the list carried by the link, then the buttons. */
.landing { padding-bottom: 6rem; }
.landing > * + * { margin-top: 1.5rem; }
.landing-list h2 { margin: 0 0 .75rem; }
.landing-list ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--fg); }
.landing-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.landing-list li.done span { text-decoration: line-through; opacity: .62; }
.landing-list time { flex: none; opacity: .62; }
.toc { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: var(--small); margin-top: 1.5rem; }
.prose { padding-bottom: 6rem; }
.prose h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1; margin: 3.5rem 0 1rem; scroll-margin-top: 1rem; }
.prose h3 { font-size: 1.1rem; margin: 1.75rem 0 .375rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin: .35rem 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--small); margin: 1rem 0; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: .6rem .75rem; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 600; white-space: nowrap; border-bottom-color: var(--fg); }
.prose td:last-child, .prose th:last-child { white-space: nowrap; }

/* ---------- Footer ---------- */
footer.site .cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); padding-top: clamp(2.5rem, 5vw, 4rem); }
footer.site h2 { margin: 0 0 .75rem; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
footer.site a { text-decoration: none; }
/* An email address is never hyphenated; on phones the contact column takes the full row. */
footer.site a[href^="mailto:"] { hyphens: manual; -webkit-hyphens: manual; white-space: nowrap; }
@media (max-width: 40rem) { footer.site .cols > div:last-child { grid-column: 1 / -1; } }
footer.site a:hover { text-decoration: underline; }
/* The wordmark stands on one heavy rule (.legal's top border), a small gap below the
 * letters. Line-height 1 so the round letters (O, G) are not clipped. overflow: clip
 * trims any sideways excess without making a scroll container (overflow-x: hidden would
 * silently turn overflow-y into auto and let the wordmark scroll). */
footer.site { --rule: clamp(6px, .8vw, 12px); --rule-gap: clamp(.3rem, .9vw, .8rem); }
/* The size keeps ∅ and the name inside the narrowest phone; justify then spreads the three words so
 * the first letter sits on the left edge and the last on the right, at every width. */
footer.site .mark { font-family: var(--display); text-transform: uppercase; line-height: 1; font-size: clamp(2rem, 15.6vw, 16rem);
                    text-align: justify; text-align-last: justify;
                    margin: clamp(2.5rem, 6vw, 5rem) 0 var(--rule-gap); overflow-x: clip; overflow-y: visible; }
footer.site .legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; border-top: var(--rule) solid var(--fg); padding-top: 1rem; padding-bottom: 1.5rem; font-size: var(--small); }

/* ---------- Appearance toggle (Light | Dark) ----------
 * One switch at the end of the header, so it never covers content.
 * Hidden until the head script has set data-theme, so it never shows without JS. */
.theme { display: none; flex: none; border: 1px solid var(--fg); }
[data-theme] .theme { display: inline-flex; }
.theme button { font-family: inherit; background: transparent; color: var(--fg); border: 0; height: calc(2rem - 2px); padding: 0 .7rem; cursor: pointer; }
.theme button + button { border-left: 1px solid var(--fg); }
.theme button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }

/* ---------- Language menu (no JS: a <details> disclosure) ---------- */
.lang { position: relative; flex: none; }
.lang summary { list-style: none; cursor: pointer; height: 2rem; display: flex; align-items: center; gap: .35rem; padding: 0 .7rem;
                border: 1px solid var(--fg); }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: "▾"; font-size: 10px; }
.lang[open] summary { background: var(--fg); color: var(--bg); }
.lang ul { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 30; margin: 0; padding: 0; list-style: none;
           min-width: 14rem; max-height: min(70vh, 34rem); overflow-y: auto; background: var(--bg); border: 1px solid var(--fg); }
.lang li + li { border-top: 1px solid var(--line); }
.lang a { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .85rem; text-decoration: none; font-size: var(--small); }
.lang a:hover, .lang a[aria-current="true"] { background: var(--fg); color: var(--bg); }
.lang a span { opacity: .62; }
@media (max-width: 40rem) { header.site .lang { margin-left: auto; } header.site .lang + .theme { margin-left: 0; } }

/* A translated legal page points back to the binding English text. */
.legal-note { border: 1px solid var(--fg); padding: .75rem 1rem; font-size: var(--small); }

/* ---------- Japanese, Korean, Chinese, Thai ----------
 * Anton has no CJK or Thai glyphs, so display type falls back to the heaviest system face, with
 * looser leading because ideographs need more room than a condensed Latin face. */
/* Letter-spacing and uppercase are Latin devices: CJK and Thai labels keep their natural
 * spacing (tracking Thai can also detach its marks). */
:is(:lang(ja), :lang(ko), :lang(zh), :lang(th)) { --label-track: 0; }
:lang(ja) { --display: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif; }
:lang(ko) { --display: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; }
:lang(zh) { --display: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
:lang(zh-Hant) { --display: "PingFang TC", "Heiti TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif; }
:lang(th) { --display: "Thonburi", "Sukhumvit Set", "Leelawadee UI", "Noto Sans Thai", sans-serif; }
:lang(ja) body { font-family: "Inter", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; }
:lang(ko) body { font-family: "Inter", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; word-break: keep-all; }
:lang(zh) body { font-family: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
:lang(zh-Hant) body { font-family: "Inter", "PingFang TC", "Heiti TC", "Microsoft JhengHei", sans-serif; }
:lang(th) body { font-family: "Inter", "Thonburi", "Sukhumvit Set", "Leelawadee UI", sans-serif; line-height: 1.65; }
:is(:lang(ja), :lang(ko), :lang(zh), :lang(th)) :is(.display, .doc-head h1, .prose h2, .acts h3, .acts .n, .rows .n, .ticker span, .app-hero .split .tag, header.site .brand, footer.site .mark) { font-weight: 900; line-height: 1.08; letter-spacing: 0; }
/* Latin product names keep Anton even on CJK pages. */
:is(:lang(ja), :lang(ko), :lang(zh), :lang(th)) :is(.rows .name, .app-hero h1, .ticker span, header.site .brand, footer.site .mark, .mono) {
  /* !important: the CJK display rule above is more specific, and its weight 900 made browsers
   * synthesise a fake bold Anton that was 25px wider (it clipped the footer wordmark). */
  font-family: "Anton", var(--display) !important; font-weight: 400 !important; line-height: .9 !important; }
/* Each authored line of a CJK/Thai headline (split by <br>) fits the width, so no word breaks. */
:is(:lang(ja), :lang(ko), :lang(zh), :lang(th)) .hero h1 { font-size: clamp(2.6rem, 10.5vw, 13rem); }
:lang(ja) :is(.display, .app-hero .split .tag) { word-break: keep-all; line-break: strict; }
/* Thai vowels and tone marks stack above and below the line; give display type room. */
:lang(th) :is(.display, .doc-head h1, .prose h2, .acts h3, .app-hero .split .tag) { line-height: 1.3; }

/* ---------- Accented capitals ----------
 * Display type is uppercase at line-height ~.9, which only works for bare Latin capitals.
 * Vietnamese stacks up to two marks above a capital (Ứ, Ậ, Ể) and one below (Ạ, Ự), so
 * its headings need the most room; French, Spanish, Portuguese, German and Italian put a
 * single mark above (É, Ñ, Ã, Ä, À) and need a little. English and Indonesian keep the
 * tight poster leading. */
:lang(vi) :is(.display:not(.keep), .doc-head h1, .prose h2, .acts h3, .app-hero .split .tag) { line-height: 1.2; }
:lang(vi) .hero h1 { line-height: 1.12; }
:is(:lang(fr), :lang(es), :lang(pt), :lang(de), :lang(it)) :is(.display:not(.keep), .doc-head h1, .prose h2, .acts h3, .app-hero .split .tag) { line-height: 1.05; }

/* Footer promises: label type, separated by the same ✱ the home-page ticker uses. */
footer.site .promises { display: inline-flex; flex-wrap: wrap; align-items: center; }
footer.site .promises span { white-space: nowrap; }
footer.site .promises span + span::before { content: ""; display: inline-block; width: .85em; height: .85em; margin: 0 .7em; vertical-align: -.1em; background: currentColor; -webkit-mask: url(/assets/asterisk.svg) center / contain no-repeat; mask: url(/assets/asterisk.svg) center / contain no-repeat; }

/* Skip link for keyboard and screen-reader users: off-screen until it receives focus. */
.skip { position: absolute; left: var(--pad); top: -4rem; z-index: 40; background: var(--fg); color: var(--bg);
        padding: .6rem 1rem; text-decoration: none; }
.skip:focus { top: .5rem; }
@media (max-width: 40rem) {
  footer.site .promises { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; }
  footer.site .promises span::before, footer.site .promises span + span::before { content: ""; display: inline-block; width: .85em; height: .85em; margin: 0 .6em 0 0; vertical-align: -.1em;
    background: currentColor; -webkit-mask: url(/assets/asterisk.svg) center / contain no-repeat; mask: url(/assets/asterisk.svg) center / contain no-repeat; }
}
