/* ==========================================================================
   GPTchatly — Learn languages hub (2026-09-28)
   The same world as index.html: warm paper ground, lifted sheets, teal ink.
   Desktop: one hero sheet fills the width, the current tutor at billboard
   scale, a vertical scroller of tutor panels over its right side, and the
   prev/next controls underneath. Phones: a chip rail over a swipe strip.
   Display: Bricolage Grotesque (self-hosted Latin subset; Cyrillic greetings
   fall through to Source Sans 3, Thai to self-hosted Noto Sans Thai). Text: Source Sans 3.
   ========================================================================== */

/* 0. Fonts (self-hosted subsets, SIL Open Font License) --------------------- */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url('fonts/bricolage-grotesque-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: 'Source Sans 3';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('fonts/source-sans-3-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('fonts/source-sans-3-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;
}

/* Thai greetings: Bricolage and Source Sans 3 carry no Thai, so the stack
   falls through to this heavy loopless face instead of the system one */
@font-face {
  font-family: 'Noto Sans Thai';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/noto-sans-thai.woff2') format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

/* 1. Tokens ------------------------------------------------------------------ */
:root {
  --paper: #ebe5d9;
  --paper-deep: #e1dacb;
  --sheet: #faf8f2;
  --surface: #f3efe6;
  --surface-strong: #ffffff;

  --ink: #1b2027;
  --ink-2: #4d5764;
  --ink-3: #66717f;

  --line: #ddd5c6;
  --line-strong: #c9c0af;

  --accent: #0f7665;
  --accent-hover: #0c6152;
  --accent-ink: #ffffff;
  --accent-tint: #e2efea;
  --accent-tint-2: #cbe3da;
  --accent-ring: rgba(15, 118, 101, 0.22);

  --correction: #b9432f;
  --correction-tint: #f6e3df;
  --warm-glow: rgba(214, 160, 60, 0.18);
  --flag-edge: rgba(27, 32, 39, 0.16);
  --sheet-highlight: rgba(255, 255, 255, 0.6);

  --shadow-sheet: 0 24px 48px -28px rgba(24, 28, 32, 0.32), 0 2px 6px -2px rgba(24, 28, 32, 0.08);
  --shadow-pop: 0 18px 40px -16px rgba(24, 28, 32, 0.35), 0 2px 8px -4px rgba(24, 28, 32, 0.12);
  --shadow-lift: 0 8px 18px -12px rgba(24, 28, 32, 0.4);

  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  --font-display: 'Bricolage Grotesque', 'Source Sans 3', 'Noto Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-text: 'Source Sans 3', 'Noto Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 160ms;
  --dur-med: 280ms;
  --dur-slow: 520ms;

  --page-max: 1680px;
  --gutter: clamp(16px, 4vw, 64px);
  --scroller-w: 330px;
  --card-w: min(640px, 86vw);

  color-scheme: light;
}

:root.night-mode {
  --paper: #0f141a;
  --paper-deep: #0a0e13;
  --sheet: #161d25;
  --surface: #1b242e;
  --surface-strong: #212c38;

  --ink: #e9eef5;
  --ink-2: #aab5c2;
  --ink-3: #8c98a6;

  --line: #2a3644;
  --line-strong: #394859;

  --accent: #3cb7a2;
  --accent-hover: #52c7b3;
  --accent-ink: #08201b;
  --accent-tint: #183a35;
  --accent-tint-2: #1f4d45;
  --accent-ring: rgba(60, 183, 162, 0.28);

  --correction: #e57f6c;
  --correction-tint: #3a2320;
  --warm-glow: rgba(120, 96, 200, 0.16);
  --flag-edge: rgba(255, 255, 255, 0.14);
  --sheet-highlight: rgba(255, 255, 255, 0.06);

  --shadow-sheet: 0 28px 56px -30px rgba(0, 0, 0, 0.7), 0 2px 6px -2px rgba(0, 0, 0, 0.5);
  --shadow-pop: 0 22px 48px -18px rgba(0, 0, 0, 0.75), 0 2px 10px -4px rgba(0, 0, 0, 0.5);
  --shadow-lift: 0 10px 22px -12px rgba(0, 0, 0, 0.7);

  color-scheme: dark;
}

/* 2. Base ------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--accent);
  accent-color: var(--accent);
  overflow-x: hidden;
}

/* the ground is lit, not flat */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(70% 55% at 6% 0%, color-mix(in oklab, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(55% 50% at 100% 100%, var(--warm-glow), transparent 70%);
}

::selection {
  background: var(--accent-tint-2);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

h1,
h2,
p,
ul,
ol,
figure,
figcaption {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent-hover);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  text-decoration-color: color-mix(in oklab, var(--accent) 45%, transparent);
  transition: text-decoration-color var(--dur-fast) ease;
}

a:hover {
  text-decoration-color: currentColor;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

img,
svg {
  display: block;
}

i,
em {
  font-style: italic;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

.strip__list,
.index__list {
  scrollbar-width: none;
}

.strip__list::-webkit-scrollbar,
.index__list::-webkit-scrollbar {
  display: none;
}

/* 3. Motion ----------------------------------------------------------------- */
@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

/* 4. Controls --------------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease, color var(--dur-fast) ease, transform var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.button--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 6px 14px -8px rgba(15, 118, 101, 0.7);
}

.button--primary:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 10px 20px -10px rgba(15, 118, 101, 0.8);
}

.button--primary:active {
  transform: translateY(0);
}

.button--primary .icon {
  transition: transform var(--dur-fast) var(--ease-out);
}

.button--primary:hover .icon {
  transform: translateX(3px);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-strong);
  color: var(--ink-2);
  transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.icon-button:not(:disabled):hover {
  border-color: var(--accent);
  color: var(--ink);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.icon-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* flags drawn in CSS, the same idiom as the homepage language menu */
.flag {
  position: relative;
  display: inline-block;
  flex: none;
  width: 21px;
  height: 14px;
  overflow: hidden;
  border-radius: 3px;
  background-size: 100% 100%;
  box-shadow: inset 0 0 0 1px var(--flag-edge);
}

.flag--lg {
  width: 30px;
  height: 20px;
  border-radius: 4px;
}

.flag[data-flag='es'] { background: linear-gradient(#c60b1e 25%, #ffc400 25% 75%, #c60b1e 75%); }
.flag[data-flag='fr'] { background: linear-gradient(90deg, #0055a4 33.3%, #fff 33.3% 66.6%, #ef4135 66.6%); }
.flag[data-flag='de'] { background: linear-gradient(#111 33.3%, #dd0000 33.3% 66.6%, #ffce00 66.6%); }
.flag[data-flag='pt'] { background: linear-gradient(90deg, #046a38 40%, #da291c 40%); }
.flag[data-flag='it'] { background: linear-gradient(90deg, #009246 33.3%, #fff 33.3% 66.6%, #ce2b37 66.6%); }
.flag[data-flag='ha'] { background: linear-gradient(90deg, #008751 33.3%, #fff 33.3% 66.6%, #008751 66.6%); }
.flag[data-flag='fil'] { background: linear-gradient(#0038a8 50%, #ce1126 50%); }
.flag[data-flag='fil']::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  clip-path: polygon(0 0, 46% 50%, 0 100%);
}
.flag[data-flag='fi'] {
  background:
    linear-gradient(#003580, #003580) 0 50% / 100% 26% no-repeat,
    linear-gradient(#003580, #003580) 30% 0 / 22% 100% no-repeat,
    #fff;
}
.flag[data-flag='ru'] { background: linear-gradient(#fff 33.3%, #0039a6 33.3% 66.6%, #d52b1e 66.6%); }
.flag[data-flag='sw'] { background: linear-gradient(#000 0 30%, #fff 30% 35%, #bb0000 35% 65%, #fff 65% 70%, #006600 70%); }
.flag[data-flag='th'] { background: linear-gradient(#a51931 0 16.7%, #f4f5f8 16.7% 33.3%, #2d2a4a 33.3% 66.7%, #f4f5f8 66.7% 83.3%, #a51931 83.3%); }

/* 5. Top bar ---------------------------------------------------------------- */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 12px var(--gutter);
}

.brand {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand__logo {
  width: 36px;
  height: 36px;
  flex: none;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand__subtitle {
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.topbar__tools {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* the language menu: a native disclosure, same grammar as the practice pages */
.menu {
  position: relative;
}

.menu__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-strong);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  cursor: pointer;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.menu__button::-webkit-details-marker {
  display: none;
}

.menu__button:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.menu__button .icon {
  color: var(--ink-2);
}

.menu__chevron {
  width: 16px;
  height: 16px;
  transition: transform var(--dur-fast) ease;
}

.menu[open] .menu__chevron {
  transform: rotate(180deg);
}

.menu__panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  width: 240px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-strong);
  box-shadow: var(--shadow-pop);
  animation: arrive var(--dur-fast) var(--ease-out);
}

.menu__panel a {
  display: grid;
  grid-template-columns: 24px 1fr;
  column-gap: 12px;
  align-items: center;
  padding: 9px 10px;
  border-radius: var(--r-xs);
  color: var(--ink);
  text-decoration: none;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease;
}

.menu__panel a .flag {
  grid-row: span 2;
  width: 24px;
  height: 16px;
}

.menu__panel a:hover {
  background: var(--accent-tint);
  color: var(--accent-hover);
}

.menu__name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.menu__hub {
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--ink-2);
}

/* 6. Page ------------------------------------------------------------------- */
.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  text-align: center;
}

.intro {
  padding: 24px 0 20px;
}

.intro h1 {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lead {
  max-width: 58ch;
  margin: 14px auto 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* 7. Index: a chip rail on phones, a vertical scroller over the hero on desktop */
.index {
  padding-bottom: 4px;
  text-align: left;
}

.index__list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px;
  margin: -2px;
  scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
}

.index__list::after {
  content: '';
  flex: none;
  width: 24px;
}

.index__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  min-height: 34px;
  padding: 0 12px 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-strong);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  scroll-snap-align: start;
  transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease, color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.index__chip:hover {
  border-color: var(--accent);
  color: var(--ink);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.index__chip[aria-current='true'] {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent-hover);
}

.index__hello {
  display: none;
}

/* 8. Hero and strip --------------------------------------------------------- */
.hero {
  position: relative;
}

.stage {
  position: relative;
}

.strip__list {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 18px max(0px, calc(50% - var(--card-w) / 2)) 30px;
  scroll-padding-inline: max(0px, calc(50% - var(--card-w) / 2));
}

.strip__list:focus-visible {
  outline-offset: -4px;
  border-radius: var(--r-lg);
}

.card {
  position: relative;
  display: flex;
  flex: 0 0 var(--card-w);
  flex-direction: column;
  text-align: left;
  padding: 30px 32px 30px;
  border-radius: var(--r-lg);
  background: var(--sheet);
  box-shadow: var(--shadow-sheet), inset 0 1px 0 var(--sheet-highlight);
  scroll-snap-align: center;
  scroll-snap-stop: always;
  scroll-margin-top: 24px;
  transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
}

.strip[data-js] .card:not([data-current]) {
  opacity: 0.55;
  transform: scale(0.965);
  cursor: pointer;
}

.card__hello {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(56px, 8.4vw, 96px);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.card__hello[lang='ru'] {
  letter-spacing: -0.025em;
}

.card__hello[lang='th'] {
  line-height: 1.2;
  letter-spacing: 0;
}

.card__hello.is-arriving {
  animation: arrive var(--dur-slow) var(--ease-out);
}

.card__name {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.card__native {
  font-weight: 500;
  color: var(--ink-3);
}

.card__lead {
  position: relative;
  max-width: 54ch;
  margin-top: 8px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}

.marks {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 16px;
  margin-bottom: 24px;
}

.marks li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.marks .icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.card__start {
  position: relative;
  align-self: flex-start;
  margin-top: auto;
}

.strip__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: -6px;
}

.strip__status {
  min-width: 150px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.strip__status b {
  font-weight: 600;
  color: var(--ink);
}

/* 9. How a lesson goes ------------------------------------------------------ */
.section {
  padding-top: 56px;
}

.section h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section__lead {
  max-width: 62ch;
  margin: 12px auto 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

.lesson {
  text-align: left;
}

.exchange {
  max-width: 780px;
  margin: 24px auto 0;
  padding: 22px 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--sheet);
}

.exchange figcaption {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}

.block {
  display: grid;
  grid-template-columns: 84px 1fr;
  column-gap: 12px;
  align-items: baseline;
  padding-top: 18px;
}

.block__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.block__line {
  font-size: 20px;
  line-height: 1.4;
  color: var(--ink);
}

.block--tutor .block__line {
  font-size: 26px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.block__red {
  color: var(--correction);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.12em;
  text-decoration-color: color-mix(in oklab, var(--correction) 55%, transparent);
}

.block__en {
  grid-column: 2;
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}

.facts {
  display: grid;
  gap: 10px;
  max-width: 62ch;
  margin: 22px auto 0;
}

.facts li {
  position: relative;
  padding-left: 18px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
}

.facts li::before {
  content: '';
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* 10. All eleven tutors ----------------------------------------------------- */
.board__list {
  max-width: 1080px;
  margin: 18px auto 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.row {
  display: grid;
  grid-template-columns: 30px minmax(150px, 1.1fr) minmax(120px, 1fr) 1.6fr 22px;
  align-items: center;
  gap: 18px;
  margin: 0 -10px;
  padding: 13px 10px;
  border-top: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink);
  text-decoration: none;
  transition: background-color var(--dur-fast) ease;
}

.row:hover {
  background: color-mix(in oklab, var(--accent) 9%, transparent);
}

.row__name {
  display: flex;
  flex-direction: column;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.row__native {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}

.row__hello {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.row__hello[lang='th'] {
  letter-spacing: 0;
}

.row__marks {
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink-2);
}

.row__arrow {
  color: var(--accent);
  transition: transform var(--dur-fast) var(--ease-out);
}

.row:hover .row__arrow {
  transform: translateX(4px);
}

/* 11. Site footer ----------------------------------------------------------- */
.site-footer {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 48px var(--gutter) 44px;
  font-size: 13px;
  color: var(--ink-2);
  text-align: center;
}

.site-footer p + p {
  margin-top: 6px;
}

/* 12. Desktop: the hero fills the width ------------------------------------- */
@media (min-width: 1000px) {
  .intro {
    padding: 30px 0 22px;
  }

  .intro h1 {
    font-size: 52px;
  }

  /* one lifted sheet holds the whole carousel */
  .stage {
    overflow: hidden;
    border-radius: var(--r-lg);
    background: var(--sheet);
    box-shadow: var(--shadow-sheet), inset 0 1px 0 var(--sheet-highlight);
  }

  .strip__list {
    align-items: stretch;
    gap: 0;
    padding: 0;
    scroll-padding-inline: 0;
  }

  .strip__list:focus-visible {
    outline-offset: -3px;
  }

  .card {
    flex-basis: 100%;
    justify-content: center;
    min-height: 560px;
    padding: 64px calc(var(--scroller-w) + 96px) 64px 64px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
    scroll-snap-align: start;
  }

  .strip[data-js] .card:not([data-current]) {
    opacity: 0.35;
    transform: none;
    cursor: default;
  }

  /* the ghost greeting is the billboard's artwork */
  .card::before {
    content: attr(data-hello) / '';
    position: absolute;
    right: calc(var(--scroller-w) + 24px);
    bottom: -0.3em;
    font-family: var(--font-display);
    font-size: 360px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    white-space: nowrap;
    color: color-mix(in oklab, var(--accent) 8%, transparent);
    pointer-events: none;
  }

  .card[data-hello='สวัสดี!']::before {
    font-size: 300px;
    bottom: -0.55em;
  }

  .card__hello {
    font-size: 96px;
  }

  .card__lead {
    font-size: 18px;
  }

  .marks {
    margin-bottom: 0;
  }

  .card__start {
    margin-top: 30px;
  }

  /* the vertical scroller sits over the hero's right side */
  .index {
    position: absolute;
    top: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 2;
    width: var(--scroller-w);
    padding: 0;
  }

  .index__list {
    flex-direction: column;
    gap: 6px;
    height: 100%;
    margin: 0;
    padding: 12px 6px 12px 2px;
    overflow: hidden auto;
    scroll-snap-type: y proximity;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
    -webkit-mask-image: linear-gradient(transparent, #000 16px, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(transparent, #000 16px, #000 calc(100% - 28px), transparent);
  }

  .index__list::-webkit-scrollbar {
    display: block;
    width: 8px;
  }

  .index__list::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: padding-box;
  }

  .index__list::after {
    width: auto;
    height: 10px;
  }

  .index__chip {
    display: grid;
    grid-template-columns: 24px 1fr auto;
    gap: 12px;
    min-height: 56px;
    padding: 8px 14px;
    border-radius: var(--r-md);
    font-size: 15px;
  }

  .index__chip .flag {
    width: 24px;
    height: 16px;
  }

  .index__hello {
    display: block;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink-3);
    transition: color var(--dur-fast) ease;
  }

  .index__hello[lang='th'] {
    letter-spacing: 0;
  }

  .index__chip:hover .index__hello,
  .index__chip[aria-current='true'] .index__hello {
    color: inherit;
  }

  .strip__controls {
    margin-top: 18px;
    padding-bottom: 22px;
  }

  .lesson {
    display: grid;
    grid-template-columns: minmax(0, 780px) 320px;
    justify-content: center;
    gap: 0 56px;
    align-items: start;
  }

  .exchange {
    margin-inline: 0;
  }

  .facts {
    margin: 24px 0 0;
  }
}

@media (min-width: 1240px) {
  .board__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 56px;
    border-bottom: 0;
  }

  .row {
    border-bottom: 1px solid var(--line);
    margin-bottom: -1px;
  }
}

/* 13. Phones ---------------------------------------------------------------- */
@media (max-width: 720px) {
  :root {
    --card-w: 78vw;
  }

  .menu__label {
    display: none;
  }

  .menu__button {
    padding-left: 8px;
  }

  .card {
    scroll-margin-top: 80px;
  }

  .intro {
    padding: 12px 0 16px;
  }

  .intro h1 {
    font-size: 34px;
  }

  .lead {
    margin-top: 10px;
    font-size: 17px;
  }

  .strip__list {
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 24px;
  }

  .card {
    padding: 24px 22px 24px;
  }

  .card__hello {
    font-size: clamp(50px, 15vw, 64px);
  }

  .card__name {
    margin-top: 16px;
    font-size: 16px;
  }

  .card__lead {
    font-size: 16px;
  }

  .marks {
    margin-bottom: 20px;
  }

  .card__start {
    align-self: stretch;
  }

  .section {
    padding-top: 42px;
  }

  .section h2 {
    font-size: 26px;
  }

  .exchange {
    padding: 18px 18px 20px;
  }

  .block {
    display: block;
  }

  .block__label {
    display: block;
    margin-bottom: 4px;
  }

  .block__line {
    font-size: 18px;
  }

  .block--tutor .block__line {
    font-size: 22px;
  }

  .row {
    grid-template-columns: 24px 1fr 22px;
    grid-template-areas:
      'flag name arrow'
      'flag hello arrow'
      'flag marks arrow';
    row-gap: 2px;
    column-gap: 14px;
  }

  .row .flag {
    grid-area: flag;
    align-self: start;
    margin-top: 3px;
  }

  .row__name {
    grid-area: name;
    flex-direction: row;
    gap: 8px;
    align-items: baseline;
  }

  .row__hello {
    grid-area: hello;
    font-size: 21px;
  }

  .row__marks {
    grid-area: marks;
  }

  .row__arrow {
    grid-area: arrow;
  }
}

@media (max-width: 380px) {
  .brand__subtitle {
    display: none;
  }

  .card__hello {
    font-size: 46px;
  }

  .card__name {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  body::before,
  .topbar,
  .index,
  .strip__controls,
  .site-footer {
    display: none !important;
  }

  .stage {
    box-shadow: none;
  }

  .strip__list {
    display: block;
    padding: 0;
  }

  .card {
    min-height: 0;
    margin-bottom: 16px;
    padding: 24px;
    box-shadow: none;
    border: 1px solid var(--line);
    opacity: 1 !important;
    transform: none !important;
  }

  .card::before {
    display: none;
  }
}
