/* TestYourVocab.io */

@font-face {
  font-family: Inter;
  src: url(../fonts/inter-latin.woff2) format("woff2");
  font-weight: 300 800;
  font-display: swap;
  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: "Instrument Serif";
  src: url(../fonts/instrument-serif-latin.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
  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: "Instrument Serif";
  src: url(../fonts/instrument-serif-italic-latin.woff2) format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  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;
}

/* The other subsets and scripts, from Google Fonts (OFL). unicode-range means
   a page downloads only the files for the letters it shows. */
@font-face { font-family: "Inter"; src: url(../fonts/inter-cyrillic-ext.woff2) format("woff2"); font-style: normal; font-weight: 300 800; font-display: swap; unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Inter"; src: url(../fonts/inter-cyrillic.woff2) format("woff2"); font-style: normal; font-weight: 300 800; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; src: url(../fonts/inter-greek.woff2) format("woff2"); font-style: normal; font-weight: 300 800; font-display: swap; unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Inter"; src: url(../fonts/inter-vietnamese.woff2) format("woff2"); font-style: normal; font-weight: 300 800; font-display: swap; 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"; src: url(../fonts/inter-latin-ext.woff2) format("woff2"); font-style: normal; font-weight: 300 800; font-display: swap; 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: "Instrument Serif"; src: url(../fonts/instrument-serif-latin-ext-italic.woff2) format("woff2"); font-style: italic; font-weight: 400; font-display: swap; 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: "Instrument Serif"; src: url(../fonts/instrument-serif-latin-ext.woff2) format("woff2"); font-style: normal; font-weight: 400; font-display: swap; 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: "TYV Display"; src: url(../fonts/noto-serif-display-cyrillic-ext-italic.woff2) format("woff2"); font-style: italic; font-weight: 400; font-stretch: 62.5% 100%; font-display: swap; unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "TYV Display"; src: url(../fonts/noto-serif-display-cyrillic-italic.woff2) format("woff2"); font-style: italic; font-weight: 400; font-stretch: 62.5% 100%; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "TYV Display"; src: url(../fonts/noto-serif-display-greek-italic.woff2) format("woff2"); font-style: italic; font-weight: 400; font-stretch: 62.5% 100%; font-display: swap; unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "TYV Display"; src: url(../fonts/noto-serif-display-vietnamese-italic.woff2) format("woff2"); font-style: italic; font-weight: 400; font-stretch: 62.5% 100%; font-display: swap; 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: "TYV Display"; src: url(../fonts/noto-serif-display-latin-ext-italic.woff2) format("woff2"); font-style: italic; font-weight: 400; font-stretch: 62.5% 100%; font-display: swap; 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: "TYV Display"; src: url(../fonts/noto-serif-display-latin-italic.woff2) format("woff2"); font-style: italic; font-weight: 400; font-stretch: 62.5% 100%; font-display: swap; 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: "TYV Display"; src: url(../fonts/noto-serif-display-cyrillic-ext.woff2) format("woff2"); font-style: normal; font-weight: 400; font-stretch: 62.5% 100%; font-display: swap; unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "TYV Display"; src: url(../fonts/noto-serif-display-cyrillic.woff2) format("woff2"); font-style: normal; font-weight: 400; font-stretch: 62.5% 100%; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "TYV Display"; src: url(../fonts/noto-serif-display-greek.woff2) format("woff2"); font-style: normal; font-weight: 400; font-stretch: 62.5% 100%; font-display: swap; unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "TYV Display"; src: url(../fonts/noto-serif-display-vietnamese.woff2) format("woff2"); font-style: normal; font-weight: 400; font-stretch: 62.5% 100%; font-display: swap; 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: "TYV Display"; src: url(../fonts/noto-serif-display-latin-ext.woff2) format("woff2"); font-style: normal; font-weight: 400; font-stretch: 62.5% 100%; font-display: swap; 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: "TYV Display"; src: url(../fonts/noto-serif-display-latin.woff2) format("woff2"); font-style: normal; font-weight: 400; font-stretch: 62.5% 100%; font-display: swap; 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: "TYV Serif Hebrew"; src: url(../fonts/frank-ruhl-libre-hebrew.woff2) format("woff2"); font-style: normal; font-weight: 400 700; font-display: swap; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "TYV Serif Arabic"; src: url(../fonts/markazi-text-arabic.woff2) format("woff2"); font-style: normal; font-weight: 400 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "TYV Serif Urdu"; src: url(../fonts/noto-nastaliq-urdu-arabic.woff2) format("woff2"); font-style: normal; font-weight: 400 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "TYV Serif Devanagari"; src: url(../fonts/tiro-devanagari-hindi-devanagari-italic.woff2) format("woff2"); font-style: italic; font-weight: 400; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A; }
@font-face { font-family: "TYV Serif Devanagari"; src: url(../fonts/tiro-devanagari-hindi-devanagari.woff2) format("woff2"); font-style: normal; font-weight: 400; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A; }
@font-face { font-family: "TYV Serif Bengali"; src: url(../fonts/tiro-bangla-bengali-italic.woff2) format("woff2"); font-style: italic; font-weight: 400; font-display: swap; unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1, U+11DF0-11DF1; }
@font-face { font-family: "TYV Serif Bengali"; src: url(../fonts/tiro-bangla-bengali.woff2) format("woff2"); font-style: normal; font-weight: 400; font-display: swap; unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1, U+11DF0-11DF1; }
@font-face { font-family: "TYV Serif Tamil"; src: url(../fonts/tiro-tamil-tamil-italic.woff2) format("woff2"); font-style: italic; font-weight: 400; font-display: swap; unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+20B9, U+25CC; }
@font-face { font-family: "TYV Serif Tamil"; src: url(../fonts/tiro-tamil-tamil.woff2) format("woff2"); font-style: normal; font-weight: 400; font-display: swap; unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+20B9, U+25CC; }
@font-face { font-family: "TYV Serif Thai"; src: url(../fonts/noto-serif-thai-thai.woff2) format("woff2"); font-style: normal; font-weight: 400 700; font-stretch: 62.5% 100%; font-display: swap; unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "TYV Sans Persian"; src: url(../fonts/vazirmatn-arabic.woff2) format("woff2"); font-style: normal; font-weight: 300 800; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "TYV Sans Arabic"; src: url(../fonts/noto-sans-arabic-arabic.woff2) format("woff2"); font-style: normal; font-weight: 300 800; font-stretch: 100%; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "TYV Sans Hebrew"; src: url(../fonts/noto-sans-hebrew-hebrew.woff2) format("woff2"); font-style: normal; font-weight: 300 800; font-stretch: 100%; font-display: swap; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "TYV Sans Thai"; src: url(../fonts/noto-sans-thai-thai.woff2) format("woff2"); font-style: normal; font-weight: 300 800; font-stretch: 100%; font-display: swap; unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "TYV Sans Devanagari"; src: url(../fonts/noto-sans-devanagari-devanagari.woff2) format("woff2"); font-style: normal; font-weight: 300 800; font-stretch: 100%; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A; }
@font-face { font-family: "TYV Sans Bengali"; src: url(../fonts/noto-sans-bengali-bengali.woff2) format("woff2"); font-style: normal; font-weight: 300 800; font-stretch: 100%; font-display: swap; unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1, U+11DF0-11DF1; }
@font-face { font-family: "TYV Sans Tamil"; src: url(../fonts/noto-sans-tamil-tamil.woff2) format("woff2"); font-style: normal; font-weight: 300 800; font-stretch: 100%; font-display: swap; unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+20B9, U+25CC; }

:root {
  --ink: #141318;
  --ink-2: #3a3741;
  --ink-3: #6e6a77;
  --paper: #f3f0e8;
  --paper-2: #e8e4d9;
  --card: #faf8f3;
  --line: rgba(20, 19, 24, .13);
  --blue: #2b44ff;
  --orange: #ff5a26;
  --lime: #d4f23c;
  --violet: #6c3cff;
  --sys: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: Inter, var(--sys);
  /* the name, the test's words and other English: Instrument Serif in every language */
  --serif-en: "Instrument Serif", Georgia, serif;
  /* the serif's italic, for emphasis; "normal" where a script's serif has none */
  --italic: italic;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --swing: cubic-bezier(.7, 0, .2, 1);
  --gutter: clamp(20px, 4vw, 48px);

  /* a section's colours; the themes below change them */
  --bg: var(--paper);
  --fg: var(--ink);
  --muted: var(--ink-3);
  --rule: var(--line);
  --btn: var(--ink);
  --btn-fg: var(--paper);
  --btn-hover: var(--blue);
  --btn-hover-fg: var(--paper);
}

/* The test's colour fields: one per round, and the dark of the result */
.theme-r1 { --bg: var(--blue); --fg: var(--paper); --muted: rgba(243, 240, 232, .74); --rule: rgba(243, 240, 232, .24); --chip: var(--paper); --chip-fg: var(--ink); --sel: var(--lime); --sel-fg: var(--ink); --btn: var(--paper); --btn-fg: var(--ink); --btn-hover: var(--lime); --btn-hover-fg: var(--ink); }
.theme-r2 { --bg: var(--orange); --fg: var(--ink); --muted: rgba(20, 19, 24, .72); --rule: rgba(20, 19, 24, .2); --chip: var(--paper); --chip-fg: var(--ink); --sel: var(--ink); --sel-fg: var(--paper); --btn: var(--ink); --btn-fg: var(--paper); --btn-hover: var(--paper); --btn-hover-fg: var(--ink); }
.theme-r3, .theme-ink { --bg: #141318; --fg: var(--paper); --muted: rgba(243, 240, 232, .6); --rule: rgba(243, 240, 232, .15); --chip: #26242d; --chip-fg: var(--paper); --sel: var(--lime); --sel-fg: var(--ink); --btn: var(--lime); --btn-fg: var(--ink); --btn-hover: var(--paper); --btn-hover-fg: var(--ink); }
.theme-r4 { --bg: var(--violet); --fg: var(--paper); --muted: rgba(243, 240, 232, .76); --rule: rgba(243, 240, 232, .24); --chip: var(--paper); --chip-fg: var(--ink); --sel: var(--lime); --sel-fg: var(--ink); --btn: var(--paper); --btn-fg: var(--ink); --btn-hover: var(--lime); --btn-hover-fg: var(--ink); }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--paper); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; }
img, svg { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--lime); color: var(--ink); }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header ---------- */

.site-head { position: relative; z-index: 20; color: var(--fg); }
.page-result .site-head { background: #141318; color: var(--paper); }
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 76px; }

/* The italic "your" makes the name's box taller than its letters, so centring
   the box leaves the letters low: lifted to line up with the menu's text. */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  position: relative;
  top: -.07em;
  font: 600 21px/1 var(--sans);
  letter-spacing: -.04em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark em { font: italic 400 1.2em/1 var(--serif-en); letter-spacing: -.01em; margin: 0 .14em 0 .1em; }
/* the header's ".io": the name's own type, faded back */
.wordmark-tld { opacity: .45; }

.site-nav { display: flex; align-items: center; gap: 28px; }
/* a long "How it works" in some language shortens rather than pushing the header wider */
.site-nav { min-width: 0; }
.nav-how { min-width: 0; overflow: hidden; text-overflow: ellipsis; padding-bottom: 5px; margin-bottom: -5px; }
.nav-how::after { bottom: 0 !important; }
.site-nav > a {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  opacity: .78;
  transition: opacity .2s;
}
.site-nav > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s var(--ease);
}
.site-nav > a:hover { opacity: 1; }
.site-nav > a:hover::after { transform: scaleX(1); transform-origin: left; }

/* the language menu: the button, and a panel the width of the page under the
   header (it positions against .site-head) */
.lang-menu summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-block: 7px;
  padding-inline: 11px 9px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--rule);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary .icon { width: 15px; height: 15px; }
.lang-menu summary .i-down { transition: transform .25s var(--ease); }
.lang-menu[open] summary .i-down { transform: rotate(180deg); }
.lang-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 30;
  max-height: calc(100vh - 76px);
  max-height: calc(100svh - 76px);
  overflow-y: auto;
  padding: 26px 0 34px;
  border-top: 1px solid rgba(243, 240, 232, .12);
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 30px 60px -24px rgba(20, 19, 24, .5);
  animation: drop .3s var(--ease);
}
.lang-panel .lang-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 2px 18px; }
.lang-panel a { display: block; margin-inline: -12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; font-size: 17px; color: rgba(243, 240, 232, .86); }
@media (hover: hover) { .lang-panel a:hover { background: rgba(243, 240, 232, .1); color: var(--paper); } }
.lang-panel a[aria-current] { color: var(--lime); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

/* the round's progress, in place of the menu during the test */
.progress { display: flex; align-items: center; gap: 16px; }
.progress-label { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.progress-bar { list-style: none; margin: 0; padding: 0; display: flex; gap: 5px; }
.progress-bar li { position: relative; width: 30px; height: 3px; border-radius: 2px; overflow: hidden; }
.progress-bar li::before { content: ""; position: absolute; inset: 0; background: currentColor; opacity: .25; }
.progress-bar li.done::before { opacity: 1; }
.progress-bar li.now::after { content: ""; position: absolute; inset: 0; background: currentColor; transform: scaleX(.5); transform-origin: left; animation: fill-x 1.2s 1.4s var(--ease) both; }
@keyframes fill-x { from { transform: scaleX(0); } }

/* ---------- buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-block: 15px;
  padding-inline: 24px 20px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  font: 600 16px/1 var(--sans);
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: background-color .25s, color .25s, box-shadow .25s, transform .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn .icon { width: 18px; height: 18px; flex: none; transition: transform .35s var(--ease); }
.btn:active { transform: scale(.97); }
.btn-solid { background: var(--btn); color: var(--btn-fg); }
.btn-line { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--fg); }
/* hover only where there is a pointer: on a touch screen it would stick after the tap */
@media (hover: hover) {
  .btn:hover .icon { transform: translateX(4px); }
  [dir=rtl] .btn:hover .icon { transform: translateX(-4px); }
  .btn-solid:hover { background: var(--btn-hover); color: var(--btn-hover-fg); }
  .btn-line:hover { background: var(--fg); color: var(--bg); }
}
.btn-lg { padding-block: 19px; padding-inline: 30px 24px; font-size: 17px; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.shake { animation: shake .4s; }
@keyframes shake { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }

.text-link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
  transition: color .2s, text-underline-offset .25s var(--ease);
}
@media (hover: hover) {
  .text-link:hover { color: var(--blue); text-underline-offset: 7px; }
  .theme-r1 .text-link:hover, .theme-ink .text-link:hover { color: var(--lime); }
}

/* keyboard focus: a ring in the section's own text colour, so it shows on every colour field */
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.btn:focus-visible { outline-offset: 4px; }

/* ---------- home: hero ---------- */

.hero { padding-top: clamp(28px, 7vh, 84px); padding-bottom: clamp(32px, 5vh, 56px); }
/* on arrival the hero settles in, top to bottom */
.hero > * { animation: settle 1s var(--ease) both; }
.hero > :nth-child(2) { animation-delay: .07s; }
.hero > :nth-child(3) { animation-delay: .2s; }
.hero > :nth-child(4) { animation-delay: .3s; }
@keyframes settle { from { opacity: 0; transform: translateY(22px); } }
.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--blue); }
.theme-ink .kicker::before { background: var(--lime); }

.hero-title {
  margin-top: 22px;
  max-width: 12ch;
  font: 600 clamp(52px, 9.2vw, 140px)/.93 var(--sans);
  letter-spacing: -.058em;
}
.hero-title em {
  font: var(--italic) 400 1.08em/1 var(--serif);
  letter-spacing: -.02em;
  padding: 0 .06em;
  /* a phrase may wrap (some languages need three words); each line gets its own highlight */
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  background: linear-gradient(var(--lime), var(--lime)) 0 86% / 0% 34% no-repeat;
  animation: mark 1.1s .75s var(--ease) forwards;
}
@keyframes mark { to { background-size: 100% 34%; } }

.hero-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px 48px; margin-top: 44px; flex-wrap: wrap; }
.hero-sub { max-width: 34em; font-size: 19px; line-height: 1.55; color: var(--ink-2); }
.hero-actions { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  margin: 48px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
}
.meta li + li::before { content: "/"; margin: 0 14px; opacity: .45; }

/* the moving wall of words */
.wall {
  padding: 6px 0 clamp(56px, 9vh, 96px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.wall-row { padding: 5px 0; }
.wall-track { display: flex; width: max-content; animation: marquee var(--speed) linear infinite; }
.wall-row:nth-child(2) .wall-track { animation-direction: reverse; }
.wall span {
  flex: none;
  margin-right: 12px;
  padding: .26em .62em .34em;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  font: 400 clamp(26px, 3.2vw, 44px)/1 var(--serif-en);
  letter-spacing: -.01em;
  color: var(--ink-2);
  white-space: nowrap;
}
.wall .on { box-shadow: none; }
.wall-row:nth-child(1) .on { background: var(--blue); color: var(--paper); }
.wall-row:nth-child(2) .on { background: var(--lime); color: var(--ink); }
.wall-row:nth-child(3) .on { background: var(--ink); color: var(--paper); }
.wall .off { color: var(--orange); box-shadow: inset 0 0 0 1px rgba(255, 90, 38, .45); text-decoration: line-through; text-decoration-thickness: 2px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- the test ---------- */

.test { background: var(--bg); color: var(--fg); padding: clamp(52px, 9vh, 100px) 0 0; scroll-margin-top: 0; }
.page-play .test { padding-top: clamp(16px, 4vh, 40px); min-height: calc(100vh - 76px); min-height: calc(100svh - 76px); }

.round-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px 40px;
  margin-bottom: 32px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--rule);
}
.round-kicker { grid-column: 1 / -1; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.round-name { font: 400 clamp(52px, 7.4vw, 104px)/.92 var(--serif); letter-spacing: -.025em; }
.round-tag { max-width: 24em; font-size: 17px; line-height: 1.5; color: var(--muted); text-align: end; }

.board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  grid-auto-flow: dense;
  gap: 10px;
  padding-bottom: 28px;
}

.chip {
  --x: 50%;
  --y: 50%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 66px;
  padding: 14px 30px;
  border-radius: 16px;
  background: var(--chip);
  color: var(--chip-fg);
  font: 500 18px/1.2 var(--sans);
  letter-spacing: -.012em;
  text-align: center;
  -webkit-hyphens: auto;
  hyphens: auto;
  overflow-wrap: anywhere;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .25s var(--ease), color .3s .05s;
  animation: chip-in .6s var(--ease) both;
  animation-delay: calc(var(--i) * 14ms + 100ms);
}
.chip::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--sel);
  clip-path: circle(0% at var(--x) var(--y));
  transition: clip-path .55s var(--ease);
}
@media (hover: hover) { .chip:hover { transform: translateY(-2px); } }
.chip:active { transform: scale(.97); }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
/* the ring for keyboard use only: a click focuses the box as well */
.chip:focus-within { outline: 2px solid var(--fg); outline-offset: 3px; }
@supports selector(:has(*)) {
  .chip:focus-within { outline: none; }
  .chip:has(input:focus-visible) { outline: 2px solid var(--fg); outline-offset: 3px; }
}
.chip:has(input:checked), .chip.on { color: var(--sel-fg); }
.chip:has(input:checked)::before, .chip.on::before { clip-path: circle(150% at var(--x) var(--y)); }
.chip-check { position: absolute; inset-inline-end: 13px; top: 50%; width: 17px; height: 17px; margin-top: -8.5px; opacity: 0; transform: scale(.3); transition: opacity .25s, transform .4s var(--ease); }
.chip:has(input:checked) .chip-check, .chip.on .chip-check { opacity: 1; transform: none; }
.chip.wide { grid-column: span 2; }
@keyframes chip-in { from { opacity: 0; transform: translateY(16px); } }
.staging .chip { animation-play-state: paused; }

.board.leaving .chip { animation: chip-out .4s var(--swing) both; animation-delay: calc(var(--i) * 5ms); }
@keyframes chip-out { to { opacity: 0; transform: translateY(-18px); } }

.actionbar {
  position: sticky;
  bottom: 0;
  z-index: 10;
  background: var(--bg);
  border-top: 1px solid var(--rule);
}
@supports (background: color-mix(in srgb, red, blue)) {
  .actionbar { background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
}
.actionbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.count { font-size: 15px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.count b { display: inline-block; min-width: .6em; margin-inline-end: 4px; font: 400 42px/1 var(--serif); color: var(--fg); vertical-align: -5px; }
.count b.bump { animation: bump .35s var(--ease); }
@keyframes bump { 40% { transform: translateY(-5px); } }

/* the full-screen type before a round, and the wipe that leads to it */
.stage {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--gutter) var(--gutter) 11vh;
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
}
.stage[hidden] { display: none; }
.stage-num { font: 400 clamp(200px, 40vw, 520px)/.78 var(--serif); letter-spacing: -.05em; }
.stage-name { margin-top: 20px; font: 500 clamp(28px, 4.2vw, 56px)/1.05 var(--sans); letter-spacing: -.035em; }
.stage-num { animation: rise .9s var(--ease) both; }
.stage-name { animation: rise .9s .1s var(--ease) both; }
.stage.hide { transform: translateY(-100%); transition: transform .75s var(--swing); }
/* With script on, the stage is up from the first paint, so the board never
   flashes before it; app.js takes it away (or, if it never runs, it goes by
   itself). The result's number likewise waits for its count-up. */
@media (prefers-reduced-motion: no-preference) {
  .js-on .stage[hidden]:not(.hide) { display: flex; animation: gone 0s 3s forwards; }
  .js-on [data-count]:not(.counting) { visibility: hidden; animation: back 0s 2.5s forwards; }
}
@keyframes gone { to { visibility: hidden; } }
@keyframes back { to { visibility: visible; } }
@keyframes rise { from { opacity: 0; transform: translateY(30%); } }

.wipe {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  padding: var(--gutter) var(--gutter) 11vh;
  background: var(--bg);
  color: var(--fg);
  clip-path: inset(100% 0 0 0);
  transition: clip-path .6s var(--swing);
}
.wipe.go { clip-path: inset(0 0 0 0); }
.wipe p { font: 400 clamp(44px, 7vw, 104px)/1 var(--serif); letter-spacing: -.025em; opacity: 0; transform: translateY(20px); transition: opacity .5s .4s, transform .7s .4s var(--ease); }
.wipe.go p { opacity: 1; transform: none; }
.wipe p::after { content: ""; display: inline-block; width: .5em; animation: dots 1.2s steps(4) infinite; text-align: start; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(104px + env(safe-area-inset-bottom));
  z-index: 70;
  max-width: min(90vw, 440px);
  padding: 14px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .4);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity .25s, transform .35s var(--ease);
}
.theme-r3 .toast, .page-play.theme-r3 .toast { background: var(--paper); color: var(--ink); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- home: sections ---------- */

.section-title { font: 400 clamp(44px, 6vw, 84px)/.95 var(--serif); letter-spacing: -.025em; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 40px; }
.section-sub { max-width: 30em; color: var(--ink-3); }

.howto { padding-top: clamp(80px, 13vh, 150px); }
.howto-list { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.howto-list li { padding-block: 26px 10px; padding-inline: 0 28px; }
.howto-list li + li { padding-inline-start: 28px; border-inline-start: 1px solid var(--line); }
.howto-list .num { font: 400 20px/1 var(--serif); color: var(--ink-3); }
.howto-list h3 { font-size: 21px; font-weight: 600; letter-spacing: -.025em; line-height: 1.25; margin-bottom: 8px; }
.howto-list p { color: var(--ink-2); font-size: 16px; }

.demo { height: 132px; display: flex; align-items: center; gap: 10px; }
.demo span { padding: 15px 22px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; font-size: 17px; }
.demo-select .on { animation: demo-on 3.6s var(--ease) infinite; }
@keyframes demo-on {
  0%, 30% { background: var(--card); color: var(--ink); }
  40%, 88% { background: var(--blue); color: var(--paper); box-shadow: none; }
  100% { background: var(--card); color: var(--ink); }
}
.demo-decoy span { position: relative; animation: demo-decoy 3.6s infinite; }
.demo-decoy span::after { content: ""; position: absolute; left: 18px; right: 18px; top: 50%; height: 2px; background: var(--orange); transform: scaleX(0); transform-origin: left; animation: demo-strike 3.6s var(--ease) infinite; }
@keyframes demo-decoy { 0%, 40% { color: var(--ink); } 50%, 90% { color: var(--orange); } }
@keyframes demo-strike { 0%, 40% { transform: scaleX(0); } 55%, 90% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
.demo-result { flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; }
.demo-result b { font: 400 64px/.9 var(--serif); letter-spacing: -.03em; }
.demo-result span { padding: 6px 12px; border-radius: 999px; background: var(--lime); box-shadow: none; font-size: 13px; font-weight: 600; }

.scale-section { padding-top: clamp(80px, 13vh, 150px); }
.scale { position: relative; }
.scale-bar { display: flex; gap: 3px; height: 18px; }
.scale-bar i { flex: var(--g) 1 0%; min-width: 0; border-radius: 4px; background: var(--c); transform-origin: left; transition: transform .9s var(--ease); transition-delay: calc(var(--i) * 80ms); }
.js [data-reveal]:not(.in) .scale-bar i { transform: scaleX(0); }
.scale-legend { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 24px; }
.scale-legend li { padding-inline-start: 16px; border-inline-start: 3px solid var(--c); }
.scale-legend b { display: block; overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
.scale-legend span { font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.reading { padding-top: clamp(80px, 13vh, 150px); padding-bottom: clamp(80px, 13vh, 150px); }
.article-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.article-list a {
  display: grid;
  grid-template-columns: 112px 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.cover {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 14px;
  background: var(--bg);
  color: var(--fg);
  font: 400 38px/1 var(--serif-en);
  letter-spacing: -.03em;
  transition: transform .5s var(--ease);
}
.al-text b { display: block; margin-bottom: 6px; font: 400 clamp(26px, 2.8vw, 38px)/1.08 var(--serif); letter-spacing: -.015em; transition: color .2s; }
.al-text span { color: var(--ink-3); font-size: 16px; }
.al-meta { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.al-meta .icon { width: 20px; height: 20px; transition: transform .35s var(--ease); }
@media (hover: hover) {
  .article-list a:hover .cover { transform: rotate(-5deg) scale(1.05); }
  .article-list a:hover .al-text b { color: var(--blue); }
  .article-list a:hover .al-meta .icon { transform: translateX(5px); }
  [dir=rtl] .article-list a:hover .al-meta .icon { transform: translateX(-5px); }
}

/* ---------- result ---------- */

.res-hero { background: var(--bg); color: var(--fg); padding: clamp(28px, 6vh, 72px) 0 clamp(48px, 8vh, 88px); }
/* the number, and beside it (below it on narrow screens) "words" and the tags */
.res-top { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 0 clamp(28px, 4vw, 64px); margin-top: 18px; }
.res-num { padding-bottom: .1em; font: 400 clamp(124px, 25vw, 340px)/.8 var(--serif); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.res-side { padding-bottom: clamp(8px, 1.4vw, 22px); }
.res-words { font: var(--italic) 400 clamp(40px, 4.6vw, 68px)/1 var(--serif); letter-spacing: -.01em; }
.res-tags { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.res-tags li { padding: 10px 16px; border-radius: 20px; box-shadow: inset 0 0 0 1px var(--rule); font-size: 15px; font-weight: 500; }
.res-tags .tag-level { background: var(--lime); color: var(--ink); box-shadow: none; font-weight: 600; }
.res-tags li { animation: rise .7s var(--ease) both; }
.res-tags li:nth-child(1) { animation-delay: 1.2s; }
.res-tags li:nth-child(2) { animation-delay: 1.3s; }
.res-tags li:nth-child(3) { animation-delay: 1.4s; }

.dist { margin: 64px 0 0; }
.dist-plot { position: relative; height: clamp(140px, 22vh, 220px); }
.dist-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 3px; }
.dist-bars i { flex: 1; height: var(--h); border-radius: 3px 3px 0 0; background: rgba(243, 240, 232, .14); transform-origin: bottom; animation: grow-y .9s var(--ease) both; animation-delay: calc(.5s + var(--i) * 28ms); }
.dist-bars i.below { background: var(--lime); }
@keyframes grow-y { from { transform: scaleY(0); } }
.dist-marker { position: absolute; top: -10px; bottom: 0; left: var(--at); border-left: 1.5px dashed var(--fg); animation: rise .6s 1.3s var(--ease) both; }
.dist-marker span {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transform: translateX(calc(var(--at) * -1));
}
.dist-axis { position: relative; height: 22px; margin-top: 10px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dist-axis span { position: absolute; top: 6px; left: var(--x); transform: translateX(calc(var(--x) * -1)); }
.dist figcaption { margin-top: 18px; font-size: 13px; color: var(--muted); }
.honesty { max-width: 46em; margin-top: 32px; padding: 14px 18px; border-inline-start: 3px solid var(--orange); background: rgba(255, 90, 38, .12); font-size: 15px; }

.res-share { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(28px, 5vw, 72px); align-items: center; padding-top: clamp(56px, 10vh, 110px); padding-bottom: clamp(40px, 7vh, 80px); }
.is-friend .res-share { grid-template-columns: minmax(0, 860px); justify-content: center; }
.card-frame { margin: 0; }
.card-frame img { display: block; width: 100%; height: auto; border-radius: 18px; background: var(--blue); box-shadow: 0 34px 64px -28px rgba(20, 19, 24, .45); }
.share-text h2 { font: 400 clamp(38px, 4.2vw, 60px)/1 var(--serif); letter-spacing: -.02em; margin-bottom: 12px; }
.share-text p { color: var(--ink-3); }
.share-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.res-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
/* three panels (no rarest words to show): the last one takes the whole row */
.res-grid > .panel:last-child:nth-child(odd) { grid-column: 1 / -1; }
.panel { padding: 28px 30px 30px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.panel h2 { margin-bottom: 18px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.panel p { color: var(--ink-2); }
.panel .small { margin-top: 16px; font-size: 14px; color: var(--ink-3); }
.rare-words { list-style: none; margin: 0; padding: 0; }
.rare-words li { font: 400 clamp(34px, 3.4vw, 48px)/1.12 var(--serif-en); letter-spacing: -.015em; word-break: break-word; }
/* decoys selected, out of those shown: 0/36 */
.figure { margin-bottom: 14px; font: 400 clamp(56px, 5.4vw, 76px)/.9 var(--serif); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.figure span { margin-inline-start: .04em; font-size: .46em; letter-spacing: 0; color: var(--ink-3); }
.figure.fell b { color: #d93f0d; }
.decoys { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.decoys li { padding: 6px 13px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255, 90, 38, .55); color: #d93f0d; font-size: 15px; font-weight: 500; text-decoration: line-through; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.bars li { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 8px 12px; font-size: 15px; font-weight: 500; }
.bars b { font: 400 30px/1 var(--serif); }
.bars em { margin-inline-start: 8px; padding: 2px 8px; border-radius: 999px; background: var(--paper-2); font-style: normal; font-size: 12px; color: var(--ink-3); }
.bars i, .next i { position: relative; grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--paper-2); overflow: hidden; }
.bars i::after, .next i::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--w); border-radius: 4px; background: var(--blue); transform-origin: left; transition: transform 1.1s var(--ease) calc(.2s + var(--i, 0) * 120ms); }
.js [data-reveal]:not(.in) .bars i::after, .js [data-reveal]:not(.in) .next i::after { transform: scaleX(0); }
/* this level and the next above, the way between them below */
.next { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px 16px; margin: 4px 0 18px; font-size: 14px; font-weight: 500; color: var(--ink-3); }
.next span + i + span { text-align: end; }
.next i { grid-row: 2; }
.panel p b { color: var(--ink); }

.res-mean { padding-top: clamp(64px, 11vh, 120px); }
.res-mean h2 { font: 400 clamp(38px, 4.6vw, 64px)/1 var(--serif); letter-spacing: -.02em; margin-bottom: 16px; }
.res-mean > p { max-width: 40em; font-size: 19px; color: var(--ink-2); margin-bottom: 40px; }
.scale-marker { position: absolute; top: -9px; left: var(--at); width: 2px; height: 36px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.scale-marker::before { content: ""; position: absolute; top: -6px; left: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px var(--ink); }
.scale-bar i.here { box-shadow: 0 0 0 2px var(--ink); }
.scale-ends { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.res-again { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding-top: clamp(64px, 10vh, 110px); padding-bottom: clamp(80px, 13vh, 150px); }
.is-friend .res-mean { padding-bottom: clamp(80px, 13vh, 150px); }

/* ---------- call to action band ---------- */

.cta-band { background: var(--bg); color: var(--fg); padding: clamp(56px, 10vh, 104px) 0; }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; }
.cta-band p { font: 400 clamp(38px, 5.2vw, 72px)/1 var(--serif); letter-spacing: -.025em; }
.cta-band span { display: block; margin-top: 10px; color: var(--muted); }

/* ---------- page heads, how it works, FAQ ---------- */

.page-head { padding-top: clamp(48px, 10vh, 120px); padding-bottom: clamp(36px, 7vh, 72px); }
.page-head h1 { font: 400 clamp(64px, 10vw, 150px)/.88 var(--serif); letter-spacing: -.035em; }
.lede { max-width: 34em; margin-top: 24px; font-size: clamp(19px, 1.6vw, 23px); line-height: 1.5; color: var(--ink-2); }

.steps { list-style: none; margin-top: 0; margin-bottom: 0; }
.step { display: grid; grid-template-columns: minmax(80px, 200px) minmax(0, 760px); gap: 32px; padding: 44px 0; border-top: 1px solid var(--line); }
.step .num { font: 400 72px/.8 var(--serif); color: var(--blue); letter-spacing: -.03em; }
.step h2 { font-size: 28px; font-weight: 600; letter-spacing: -.035em; line-height: 1.15; margin-bottom: 14px; }
.step p { color: var(--ink-2); margin-bottom: 14px; }
.round-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 22px 0 20px; }
.round-strip span { overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; padding: 26px 14px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.round-strip span:nth-child(1) { background: var(--blue); color: var(--paper); }
.round-strip span:nth-child(2) { background: var(--orange); color: var(--ink); }
.round-strip span:nth-child(3) { background: var(--ink); color: var(--paper); }
.round-strip span:nth-child(4) { background: var(--violet); color: var(--paper); }
.formula { display: block; margin: 20px 0 6px; padding: 18px 22px; border-radius: 14px; background: var(--ink); color: var(--paper); font: var(--italic) 400 23px/1.3 var(--serif); }
.step table, .prose table { width: 100%; margin: 6px 0 18px; border-collapse: collapse; font-size: 16px; }
.step th, .prose th { padding-block: 10px; padding-inline: 0 14px; border-bottom: 1px solid var(--ink); text-align: start; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.step td, .prose td { padding-block: 12px; padding-inline: 0 14px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.swatch { display: inline-block; width: 12px; height: 12px; margin-inline-end: 10px; border-radius: 3px; background: var(--c); vertical-align: -1px; }
.table-scroll { overflow-x: auto; }

.faq { padding-top: clamp(72px, 12vh, 130px); padding-bottom: clamp(72px, 12vh, 130px); }
.faq .section-title { margin-bottom: 36px; }
.faq details { max-width: 960px; border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { width: 22px; height: 22px; flex: none; transition: transform .35s var(--ease); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details > div { max-width: 46em; padding-bottom: 24px; color: var(--ink-2); }
.faq details > div p + p { margin-top: 12px; }
.faq details[open] > div { animation: drop .35s var(--ease); }

/* ---------- articles ---------- */

.page-articles .article-list { margin-bottom: clamp(80px, 13vh, 150px); }
.article-head { max-width: 1040px; margin: 0 auto; padding-top: clamp(40px, 8vh, 96px); padding-bottom: 32px; }
.article-head .back { font-size: 14px; }
.article-head h1 { margin-top: 22px; font: 400 clamp(46px, 6.6vw, 96px)/.96 var(--serif); letter-spacing: -.03em; }
.article-head .lede { max-width: 32em; }
.article-head .meta { margin-top: 24px; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.article-cover {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  width: calc(100% - 2 * var(--gutter));
  max-width: 1144px;
  height: clamp(200px, 34vw, 440px);
  margin: 24px auto 64px;
  padding: 0 4vw;
  overflow: hidden;
  border-radius: 24px;
  background: var(--bg);
  color: var(--fg);
}
.article-cover span { font: 400 clamp(150px, 30vw, 440px)/.74 var(--serif-en); letter-spacing: -.05em; transform: translateY(6%); animation: rise 1.1s .15s var(--ease) both; }

.prose { max-width: calc(720px + 2 * var(--gutter)); padding-bottom: clamp(72px, 12vh, 130px); font-size: 19px; line-height: 1.72; }
.prose > * + * { margin-top: 22px; }
.prose h2 { margin-top: 60px; font-size: 30px; font-weight: 600; letter-spacing: -.035em; line-height: 1.2; }
.prose h2 + * { margin-top: 16px; }
.prose ul { list-style: none; padding: 0; }
.prose ul li { position: relative; padding-inline-start: 26px; }
.prose ul li + li { margin-top: 10px; }
.prose ul li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .68em; width: 8px; height: 8px; border-radius: 2px; background: var(--blue); }
.prose em { font-style: italic; }
.callout { padding-block: 6px; padding-inline: 24px 0; border-inline-start: 3px solid var(--blue); font-size: 20px; }
.prose .sources { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.6; color: var(--ink-3); }

.quiz { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.quiz-item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.quiz-word { font: 400 36px/1.1 var(--serif-en); letter-spacing: -.015em; word-break: break-word; }
.quiz-buttons { display: flex; gap: 8px; }
.quiz-buttons button {
  padding: 10px 17px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--ink);
  color: var(--ink);
  font: 600 14px/1 var(--sans);
  cursor: pointer;
  transition: background .2s, color .2s, opacity .2s;
}
@media (hover: hover) { .quiz-buttons button:hover:not(:disabled) { background: var(--ink); color: var(--paper); } }
.quiz-buttons button:disabled { opacity: .3; cursor: default; }
.quiz-buttons button.chosen { opacity: 1; background: var(--ink); color: var(--paper); }
.quiz-answer { grid-column: 1 / -1; font-size: 16px; line-height: 1.55; color: var(--ink-2); animation: drop .35s var(--ease); }
.quiz-answer b { margin-inline-end: 4px; }
.quiz-item.right .quiz-answer b { color: var(--blue); }
.quiz-item.wrong .quiz-answer b { color: #d93f0d; }
.quiz-tag { display: inline-block; margin-inline-end: 6px; padding: 1px 9px; border-radius: 999px; background: var(--paper-2); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; vertical-align: 1px; }
.quiz-result { font: 400 36px/1.1 var(--serif); color: var(--blue); animation: rise .6s var(--ease); }

/* ---------- messages (expired, nothing selected, 404) ---------- */

.message { padding-top: clamp(80px, 16vh, 180px); padding-bottom: clamp(100px, 18vh, 200px); }
.message h1 { font: 400 clamp(52px, 7.4vw, 108px)/.95 var(--serif); letter-spacing: -.03em; max-width: 12ch; }
.message p { max-width: 30em; margin: 24px 0 36px; font-size: 19px; color: var(--ink-2); }

/* ---------- footer ---------- */

.site-foot { padding: clamp(56px, 10vh, 100px) 0 28px; background: #141318; color: var(--paper); }
/* The name spans the footer's full width: its letters end 6.415em after its
   start (measured), so a size of the width / 6.42 runs it edge to edge. */
.site-foot > .wrap { container-type: inline-size; }
.foot-mark { margin-bottom: 44px; font: 600 calc(100cqi / 6.42)/.88 var(--sans); letter-spacing: -.06em; white-space: nowrap; }
.foot-mark em { font: italic 400 1.18em/1 var(--serif-en); letter-spacing: -.02em; margin: 0 .12em 0 .08em; }
.foot-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; padding-top: 28px; border-top: 1px solid rgba(243, 240, 232, .16); }
.foot-tag { max-width: 18em; font: 400 26px/1.15 var(--serif); }
.foot-cols nav { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.foot-cols a { text-decoration: none; color: rgba(243, 240, 232, .72); transition: color .2s; }
.foot-cols a:hover { color: var(--paper); }
.foot-langs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 20px; margin-top: 40px; padding-top: 28px; border-top: 1px solid rgba(243, 240, 232, .16); font-size: 15px; }
.foot-langs a { text-decoration: none; color: rgba(243, 240, 232, .6); transition: color .2s; }
.foot-langs a:hover { color: var(--paper); }
.foot-langs a[aria-current] { color: var(--lime); }
/* every language's name in the system font: the page then loads no fonts
   for scripts it doesn't otherwise use */
.lang-list a { font-family: var(--sys); letter-spacing: normal; }
.foot-small { margin-top: 56px; font-size: 13px; color: rgba(243, 240, 232, .45); }

/* ---------- scroll reveal ---------- */

[data-reveal] { transition: opacity .8s var(--ease), transform .9s var(--ease); }
.js [data-reveal]:not(.in) { opacity: 0; transform: translateY(26px); }

/* ---------- from page to page ---------- */

/* Where the browser can, the next page fades in over the last instead of
   cutting to it. Between rounds both are the same colour field, so the
   wipe, the new page and its number run on as one movement. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-old(root) { animation: .22s ease-out both fade-out; }
::view-transition-new(root) { animation: .5s var(--ease) both fade-up; }
@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } }

/* how far through an article you are: a line along the top of the window */
@supports (animation-timeline: scroll()) {
  .page-article .site-head::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--blue);
    transform-origin: left;
    animation: read linear both;
    animation-timeline: scroll(root);
  }
}
@keyframes read { from { transform: scaleX(0); } }

/* ---------- other scripts ---------- */

/* Each language's typefaces (its type in TYV_LANG_INFO, a class on <body>).
   The serif comes first; digits and Latin letters it lacks fall back to
   Instrument Serif. The sans is Inter, with the script's own after it. */
.type-display { --serif: "TYV Display", "Instrument Serif", Georgia, serif; font-variation-settings: "wdth" 70; }
.type-hebrew { --serif: "TYV Serif Hebrew", "Instrument Serif", serif; --sans: Inter, "TYV Sans Hebrew", var(--sys); --italic: normal; }
.type-arabic { --serif: "TYV Serif Arabic", "Instrument Serif", serif; --sans: Inter, "TYV Sans Arabic", var(--sys); --italic: normal; }
.type-persian { --serif: "TYV Serif Arabic", "Instrument Serif", serif; --sans: Inter, "TYV Sans Persian", var(--sys); --italic: normal; }
.type-urdu { --serif: "TYV Serif Urdu", "Instrument Serif", serif; --sans: Inter, "TYV Sans Arabic", var(--sys); --italic: normal; }
.type-devanagari { --serif: "TYV Serif Devanagari", "Instrument Serif", serif; --sans: Inter, "TYV Sans Devanagari", var(--sys); }
.type-bengali { --serif: "TYV Serif Bengali", "Instrument Serif", serif; --sans: Inter, "TYV Sans Bengali", var(--sys); }
.type-tamil { --serif: "TYV Serif Tamil", "Instrument Serif", serif; --sans: Inter, "TYV Sans Tamil", var(--sys); }
.type-thai { --serif: "TYV Serif Thai", "Instrument Serif", serif; --sans: Inter, "TYV Sans Thai", var(--sys); --italic: normal; font-variation-settings: "wdth" 80; }
/* Chinese, Japanese and Korean use the system's fonts (too large to send),
   named per language so each gets its own forms of the shared characters */
.type-cjk { --italic: normal; }
.lang-zh { --sans: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", var(--sys); --serif: "Instrument Serif", "Songti SC", "Noto Serif SC", "Source Han Serif SC", serif; }
.lang-zh-hant { --sans: Inter, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", var(--sys); --serif: "Instrument Serif", "Songti TC", "Noto Serif TC", "Source Han Serif TC", serif; }
.lang-ja { --sans: Inter, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, "Noto Sans JP", var(--sys); --serif: "Instrument Serif", "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", serif; }
.lang-ko { --sans: Inter, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", var(--sys); --serif: "Instrument Serif", AppleMyungjo, "Nanum Myeongjo", "Noto Serif KR", serif; }

/* A long word breaks rather than runs off the screen (headlines aren't
   hyphenated: split words read badly at this size) */
:is(.hero-title, .round-name, .stage-name, .wipe p, .section-title, .res-words, .al-text b, .share-text h2, .res-mean h2, .cta-band p, .page-head h1, .article-head h1, .quiz-result, .message h1, .foot-tag, .step h2) { overflow-wrap: break-word; }

/* Scripts that join their letters or hang marks above and below get no
   tracking and more room between lines. English stays as it is. */
:is(.type-hebrew, .type-arabic, .type-persian, .type-urdu, .type-devanagari, .type-bengali, .type-tamil, .type-thai) :not(:lang(en), .res-num, .res-num *, .stage-num, .count b, .figure, .figure *) { letter-spacing: normal; }
.lang-vi :is(.hero-title, .round-name, .stage-name, .wipe p, .section-title, .res-words, .al-text b, .share-text h2, .res-mean h2, .cta-band p, .page-head h1, .article-head h1, .quiz-result, .message h1, .foot-tag, .step h2) { line-height: 1.14; }
.type-hebrew :is(.hero-title, .round-name, .stage-name, .wipe p, .section-title, .res-words, .al-text b, .share-text h2, .res-mean h2, .cta-band p, .page-head h1, .article-head h1, .quiz-result, .message h1, .foot-tag, .step h2) { line-height: 1.1; }
:is(.type-arabic, .type-persian) :is(.hero-title, .round-name, .stage-name, .wipe p, .section-title, .res-words, .al-text b, .share-text h2, .res-mean h2, .cta-band p, .page-head h1, .article-head h1, .quiz-result, .message h1, .foot-tag, .step h2) { line-height: 1.38; }
.type-urdu :is(.hero-title, .round-name, .stage-name, .wipe p, .section-title, .res-words, .al-text b, .share-text h2, .res-mean h2, .cta-band p, .page-head h1, .article-head h1, .quiz-result, .message h1, .foot-tag, .step h2) { line-height: 1.85; }
.type-urdu .hero-title { line-height: 1.45; }
:is(.type-devanagari, .type-bengali) :is(.hero-title, .round-name, .stage-name, .wipe p, .section-title, .res-words, .al-text b, .share-text h2, .res-mean h2, .cta-band p, .page-head h1, .article-head h1, .quiz-result, .message h1, .foot-tag, .step h2) { line-height: 1.3; }
:is(.type-tamil, .type-thai) :is(.hero-title, .round-name, .stage-name, .wipe p, .section-title, .res-words, .al-text b, .share-text h2, .res-mean h2, .cta-band p, .page-head h1, .article-head h1, .quiz-result, .message h1, .foot-tag, .step h2) { line-height: 1.4; }
:is(.type-hebrew, .type-arabic, .type-persian, .type-urdu, .type-devanagari, .type-bengali, .type-tamil, .type-thai) .hero-title em { line-height: inherit; }
.type-cjk .hero-title { max-width: 9em; line-height: 1.12; letter-spacing: -.03em; font-size: clamp(34px, 10.6vw, 112px); }
:is(.type-cjk, .type-urdu) .hero-title em { font: inherit; padding: 0; }
.type-tamil .hero-title { font-size: clamp(36px, 6.6vw, 104px); }
.type-tamil :is(.round-name, .section-title, .page-head h1) { font-size: clamp(40px, 5.6vw, 84px); }
/* where the serif has no italic, the sans says it better than a slanted serif */
/* line breaks: Korean breaks only between words; Japanese headlines between phrases */
.lang-ko { word-break: keep-all; }
.lang-ja .hero-title { word-break: keep-all; }
.lang-ja :is(.hero-title, .round-name, .section-title, .page-head h1, .article-head h1, .message h1) { word-break: auto-phrase; }
.type-cjk .res-words { font: 500 clamp(26px, 3vw, 40px)/1 var(--sans); }
:is(.type-cjk, .type-hebrew, .type-arabic, .type-persian, .type-urdu, .type-thai) .formula { font: 500 18px/1.6 var(--sans); }

/* Right to left: the layout mirrors through logical properties; these are
   what remains. Charts and the level scale keep 0 on the left, as numbers
   run, so they stay left to right. */
.dist-plot, .dist-axis, .scale-bar, .scale-ends { direction: ltr; }
[dir=rtl] .i-arrow { scale: -1 1; }
[dir=rtl] .hero-title em { background-position: 100% 86%; }
[dir=rtl] .progress-bar li.now::after,
[dir=rtl] .bars i::after,
[dir=rtl] .next i::after { transform-origin: right; }
[dir=rtl] .page-article .site-head::after { transform-origin: right; }

/* ---------- smaller screens ---------- */

@media (max-width: 900px) {
  .howto-list { grid-template-columns: 1fr; }
  .howto-list li, .howto-list li + li { padding: 26px 0 8px; border-inline-start: 0; border-bottom: 1px solid var(--line); }
  .demo { height: 104px; }
  .scale-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .res-top { grid-template-columns: 1fr; }
  .res-side { padding-bottom: 0; }
  .res-words { margin-top: .3em; }
  .res-share, .res-grid { grid-template-columns: 1fr; }
  .step { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 36px 0; }
  .step .num { font-size: 52px; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-tag { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .head-inner { height: 64px; }
  .wordmark { font-size: 19px; }
  .site-nav { gap: 16px; }
  .site-nav > a { font-size: 14px; }
  .is-round .wordmark { font-size: 17px; }
  .progress { gap: 10px; }
  .progress-bar li { width: 20px; }
  .hero-foot { margin-top: 32px; }
  .hero-sub { font-size: 17px; }
  .meta { margin-top: 36px; gap: 6px 26px; }
  .meta li + li::before { content: none; }
  .round-head { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 24px; padding-bottom: 20px; }
  .round-tag { text-align: start; font-size: 16px; }
  .board { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .chip { min-height: 58px; padding: 12px 26px; font-size: 17px; border-radius: 14px; }
  .chip-check { inset-inline-end: 10px; }
  .count b { font-size: 36px; }
  .btn-lg { padding-block: 17px; padding-inline: 24px 20px; font-size: 16px; }
  .page-play .test { min-height: calc(100vh - 64px); min-height: calc(100svh - 64px); }
  .round-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-list a { grid-template-columns: 72px minmax(0, 1fr); gap: 18px; }
  /* on phones a long word in a heading may hyphenate (where the browser knows
     the language) or, failing that, break, rather than run off the screen */
  .round-name { font-size: clamp(40px, 13vw, 104px); }
  body:not(.lang-en) :is(.round-name, .section-title, .page-head h1, .article-head h1, .al-text b, .cta-band p, .share-text h2, .res-mean h2) { -webkit-hyphens: auto; hyphens: auto; overflow-wrap: anywhere; }
  .type-display .res-num { font-size: clamp(96px, 25vw, 340px); }
  .type-tamil .al-text b { font-size: 22px; }
  .cover { font-size: 26px; border-radius: 12px; }
  .al-meta { display: none; }
  .res-tags li { font-size: 14px; padding: 9px 14px; }
  .dist { margin-top: 56px; }
  .panel { padding: 24px 22px 26px; }
  .quiz-item { grid-template-columns: 1fr; }
  .quiz-word { font-size: 32px; }
  .prose { font-size: 18px; }
  .foot-cols { grid-template-columns: 1fr; }
  .faq summary { font-size: 18px; }
}

/* phones: the header keeps the name, "How it works" and the language; the
   articles are linked from the home page and the footer */
@media (max-width: 440px) {
  .nav-articles, .lang-menu summary .i-down { display: none; }
}

/* the test's bar on small phones: the count may break onto two lines
   ("12" over "seleccionadas"), and below 360px the button drops its arrow */
@media (max-width: 400px) {
  .actionbar-inner { gap: 12px; }
  .count { min-width: 0; white-space: normal; font-size: 14px; line-height: 1.25; }
  .count b { font-size: 34px; }
  .actionbar .btn { flex: none; gap: 8px; padding-block: 15px; padding-inline: 19px 16px; font-size: 15px; }
}

@media (max-width: 380px) {
  .board { grid-template-columns: 1fr 1fr; }
  .chip { padding: 12px 26px; font-size: 16px; }
}

@media (max-width: 360px) {
  .actionbar .btn .icon { display: none; }
  .actionbar .btn { padding: 15px 18px; }
}

@media (max-width: 350px) {
  .nav-how { display: none; }
}

/* ---------- less motion, when asked for ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  html { scroll-behavior: auto; }
  .wall-track { animation: none !important; }
}
