/* Sandai: one stylesheet. Phones first (360 to 390 px), then 600 and 900 px. */

:root {
  --rice: #FBF6EC;
  --panel: #FFFFFF;
  --band: #F1EAD9;
  --line: #E3D9C3;
  --ink: #1E2A24;
  --ink-2: #4B574F;
  --leaf: #1F6B4A;
  --leaf-dark: #134733;
  --marigold: #F2A900;
  --marigold-soft: #FCEBB8;
  --error: #A3361F;
  --on-leaf: #FFFFFF;
  --radius: 16px;
  --radius-lg: 22px;
  --gutter: 16px;
  --bar-h: 72px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 12px;
}

body {
  margin: 0;
  background: var(--rice);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

:lang(th) {
  font-family: system-ui, -apple-system, "Noto Sans Thai", "Sukhumvit Set", Thonburi, "Leelawadee UI", Tahoma, "Segoe UI", Roboto, sans-serif;
  line-height: 1.8;
  font-style: normal;
  letter-spacing: normal;
  text-transform: none;
}
:lang(th) h1, :lang(th) h2, :lang(th) h3 { line-height: 1.4; }
:lang(th) em, :lang(th) i, :lang(th) blockquote { font-style: normal; }

img, svg { max-width: 100%; }
img { display: block; height: auto; }

h1, h2, h3 {
  margin: 0 0 .5em;
  line-height: 1.2;
  font-weight: 800;
  color: var(--ink);
}
h1 { font-size: 2.125rem; letter-spacing: -0.01em; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.2rem; font-weight: 750; line-height: 1.3; }
:lang(th) h1 { letter-spacing: normal; }

p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }

a { color: var(--leaf); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--leaf-dark); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--leaf);
  outline-offset: 3px;
  border-radius: 4px;
}
main:focus { outline: none; }

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

.skip-link {
  position: absolute;
  left: 12px; top: -80px;
  z-index: 50;
  padding: 12px 16px;
  background: var(--leaf);
  color: var(--on-leaf);
  font-weight: 700;
  border-radius: 10px;
}
.skip-link:focus { top: 12px; color: var(--on-leaf); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 44rem; margin: 0 auto; padding: 0 var(--gutter); }

/* JavaScript on / off */
.no-js .js-only { display: none !important; }
.js .nojs-only { display: none !important; }

/* ---------- Header ---------- */
.site-header { background: var(--rice); border-bottom: 1px solid var(--line); }
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.mark { width: 30px; height: 30px; flex: none; }
.brand-name { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; }
.brand { flex: none; }
.brand-han { font-size: .85rem; font-weight: 600; color: var(--ink-2); margin-left: 2px; white-space: nowrap; }
/* The 三代 never wraps; where a long language name leaves no room, the header
   leaves it out (it is still in the hero eyebrow and the footer). */
@media (max-width: 419px) {
  :lang(ms) .site-header .brand-han, :lang(id) .site-header .brand-han { display: none; }
}

.lang-menu { position: relative; }
.lang-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 12px;
  border: 1.5px solid var(--leaf);
  border-radius: 999px;
  background: var(--panel);
  color: var(--leaf-dark);
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu[open] summary .chev { transform: rotate(180deg); }
.lang-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  min-width: 210px;
  padding: 6px;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(30, 42, 36, .12);
}
.lang-list a {
  display: block;
  padding: 10px 12px;
  min-height: 44px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.lang-list a:hover { background: var(--band); }
.lang-list a[aria-current="page"] { background: var(--marigold-soft); }

.site-nav { display: none; }

/* Narrow phones: a long language name ("Bahasa Indonesia") may take two lines. */
@media (max-width: 599px) {
  .lang-menu { min-width: 0; }
  .lang-menu summary { white-space: normal; line-height: 1.15; padding: 4px 10px; text-align: left; }
}
@media (max-width: 374px) {
  .lang-menu summary .globe { display: none; }
  .brand-name { font-size: 1.2rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 12px 22px;
  border: 2px solid var(--leaf);
  border-radius: 14px;
  background: var(--leaf);
  color: var(--on-leaf);
  font: inherit;
  font-weight: 750;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--leaf-dark); border-color: var(--leaf-dark); color: var(--on-leaf); }
.btn-soft { background: var(--panel); color: var(--leaf-dark); }
.btn-soft:hover { background: var(--band); color: var(--leaf-dark); border-color: var(--leaf-dark); }
.btn-plain {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 4px;
  border: 0;
  background: none;
  color: var(--leaf);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}

/* ---------- Hero ---------- */
.hero { background: var(--rice); }
.hero-media {
  position: relative;
  height: 48vh;
  height: max(48vh, 100vw); /* short phones: at least a square, so the people fit */
  min-height: 260px;
  max-height: 520px;
  overflow: hidden;
  background: #F6ECD6;
}
.hero-media img, .hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-media video {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
}
.hero-media video.is-on { opacity: 1; }
.media-toggle {
  position: absolute;
  right: 12px;
  bottom: 36px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(30, 42, 36, .78);
  color: #FFFFFF;
  cursor: pointer;
}
.hero-text {
  position: relative;
  margin-top: -24px;
  padding: 26px var(--gutter) 8px;
  background: var(--rice);
  border-radius: 24px 24px 0 0;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--leaf-dark);
  font-weight: 700;
  font-size: .95rem;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 5px;
  border-radius: 3px;
  background: var(--marigold);
}
.hero h1 { margin-bottom: 14px; }
/* An opening quotation mark hangs into the margin, so the text lines up. */
.hang { margin-left: -0.42em; }
.hero-lead { color: var(--ink-2); }
.hero-lead:first-of-type { color: var(--ink); font-size: 1.1rem; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 22px 0 10px; }
.hero-note { color: var(--ink-2); font-size: .95rem; }

/* ---------- Sections ---------- */
.section { padding: 52px 0; }
.band { background: var(--band); }
.section h2 { position: relative; padding-bottom: 12px; margin-bottom: 18px; }
.section h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 44px; height: 5px;
  border-radius: 3px;
  background: var(--marigold);
}
.lead { font-size: 1.1rem; color: var(--ink-2); max-width: 44rem; }
.close { max-width: 44rem; margin-top: 22px; }
.close.strong {
  padding: 16px 18px;
  border-left: 5px solid var(--leaf);
  background: var(--panel);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 700;
}

/* The saying */
.saying-pair { display: grid; gap: 14px; margin: 8px 0 26px; }
.saying-card {
  padding: 22px 20px 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.han {
  margin-bottom: 8px;
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .06em;
  color: var(--leaf-dark);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", var(--font);
}
.meaning { font-weight: 750; font-size: 1.15rem; }
.saying-note { color: var(--ink-2); }
.pull { margin: 0 0 8px; padding: 22px 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.pull blockquote { margin: 0 0 10px; }
.pull blockquote p {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 750;
  line-height: 1.35;
  color: var(--leaf-dark);
}
.pull blockquote p::before { content: "“"; color: var(--marigold); margin-right: 2px; }
.pull blockquote p::after { content: "”"; color: var(--marigold); margin-left: 2px; }
.pull figcaption { color: var(--ink-2); }

.gens {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 28px;
  list-style: none;
}
.gen {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}
.gen + .gen::before {
  content: "";
  position: absolute;
  top: 30px;
  right: calc(50% + 34px);
  width: calc(100% - 60px);
  height: 3px;
  border-radius: 2px;
  background: var(--line);
}
.gen-icon {
  width: 60px;
  height: 60px;
  padding: 6px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--line);
}
.gen-you .gen-icon { border: 3px solid var(--leaf); background: var(--marigold-soft); }
.gen-label { font-weight: 700; line-height: 1.3; }
.gen-you .gen-label { color: var(--leaf-dark); font-weight: 800; text-decoration: underline; text-decoration-color: var(--marigold); text-decoration-thickness: 4px; text-underline-offset: 4px; }
.gen-line { font-size: .9rem; line-height: 1.45; color: var(--ink-2); }

/* In the middle */
.with-photo { display: grid; gap: 22px; }
.tall-photo { margin: 0; }
.tall-photo img {
  width: 100%;
  max-height: 60vh;
  object-fit: cover;
  border-radius: var(--radius-lg);
}
.moments { display: grid; gap: 10px; list-style: none; }
.moments li {
  position: relative;
  padding: 14px 16px 14px 46px;
  background: var(--band);
  border-radius: var(--radius);
}
.moments li::before {
  content: "";
  position: absolute;
  left: 18px; top: 1.15em;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--marigold);
}

/* Start early */
.early-main { display: grid; gap: 22px; }
.proverb {
  margin: 0;
  padding: 22px 20px;
  border-radius: var(--radius);
  background: var(--marigold);
  color: var(--ink);
}
.proverb blockquote { margin: 0 0 6px; }
.proverb blockquote p { margin: 0; font-size: 1.35rem; font-weight: 800; line-height: 1.35; }
.proverb figcaption { color: var(--ink); }
.calc {
  padding: 22px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.calc-label { display: block; font-weight: 700; margin-bottom: 2px; }
.hint { margin: 0 0 8px; color: var(--ink-2); font-size: .95rem; }
.calc-input, .field input[type="text"], .field input[type="email"], .field select, .field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1.5px solid #8C988F;
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}
.calc-input { font-size: 1.35rem; font-weight: 700; }
.calc-input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--leaf); }
.calc-out { margin-top: 16px; }
.calc-empty { color: var(--ink-2); }
.calc-result { font-weight: 700; margin-bottom: 8px; }
.calc-rows { margin: 0; }
.calc-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.calc-row dt { color: var(--ink-2); }
.calc-row dd { margin: 0 0 0 auto; font-weight: 800; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.calc-note, .calc-nojs {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--band);
  color: var(--ink);
  font-size: .95rem;
}
.points { display: grid; gap: 12px; margin-top: 26px; list-style: none; }
.points li {
  padding: 18px 18px 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.points h3 { margin-bottom: .3em; }
.points p { color: var(--ink-2); }

/* Lessons */
.lesson-list { display: grid; gap: 14px; list-style: none; }
.lesson-card {
  padding: 20px 18px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  scroll-margin-top: 12px;
}
.lesson-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.lesson-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--marigold);
  color: var(--ink);
  font-size: 1.6rem;
  font-weight: 800;
}
.lesson-icon { width: 48px; height: 48px; }
.lesson-short { color: var(--ink-2); }
.lesson-more { border-top: 1px solid var(--line); }
.lesson-more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 8px 0;
  color: var(--leaf);
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}
.lesson-more summary::-webkit-details-marker { display: none; }
.lesson-more summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--leaf);
  font-size: 1.3rem;
  line-height: 1;
}
.lesson-more[open] summary::after { content: "−"; }
.lesson-body { padding: 6px 0 4px; }
.lesson-photo { width: 100%; max-height: 60vh; object-fit: cover; border-radius: 14px; margin-bottom: 16px; }
.step {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--marigold);
  color: var(--ink);
}

/* Family check */
.check-card {
  margin-top: 8px;
  padding: 22px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.check-progress { margin-bottom: 6px; color: var(--ink-2); font-weight: 700; font-size: .95rem; }
.check-q { font-size: 1.3rem; font-weight: 750; line-height: 1.4; margin-bottom: 18px; }
.check-q:focus { outline: none; }
.check-answers { display: grid; gap: 10px; margin-bottom: 8px; }
.check-result h3:focus { outline: none; }
.steps { display: grid; gap: 10px; margin: 0 0 18px; list-style: none; }
.steps li, .check-list li {
  padding: 14px 16px;
  background: var(--band);
  border-radius: 12px;
}
.steps a, .check-list a { display: inline-block; font-weight: 700; padding: 4px 0; }
.check-note { color: var(--ink-2); font-size: .95rem; }
.check-list { display: grid; gap: 10px; margin: 0 0 18px; list-style: none; }
.cl-q { font-weight: 700; margin-bottom: .3em; }
.cl-step { margin: 0; color: var(--ink-2); }
.band .steps li, .band .check-list li { background: var(--rice); }

/* About */
.about-cols { display: grid; gap: 14px; margin-bottom: 26px; }
.about-card {
  padding: 20px 18px 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.ticks, .crosses { display: grid; gap: 12px; list-style: none; margin-bottom: 14px; }
.ticks li, .crosses li { display: flex; gap: 10px; align-items: flex-start; }
.tick, .cross { flex: none; width: 24px; height: 24px; margin-top: 2px; }
.about-who { margin-top: 8px; }
.about-more a { font-weight: 700; }

/* Ask */
.ask-grid { display: grid; gap: 18px; }
.ask-box {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.ask-form {
  padding: 22px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 4px; }
.field textarea { min-height: 150px; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.field-check { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.field-check input { width: 26px; height: 26px; margin: 2px 0 0; accent-color: var(--leaf); }
.field-check label { font-weight: 400; margin: 0; }
.field-check .field-error { grid-column: 1 / -1; }
.field-error { margin: 6px 0 0; color: var(--error); font-weight: 700; font-size: .95rem; }
.field-error::before { content: "! "; }
[aria-invalid="true"] { border-color: var(--error) !important; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 14px 0 0; font-weight: 700; }
.form-status:empty { display: none; }
.form-status.is-ok { padding: 12px 14px; border-radius: 12px; background: #E3F0E8; color: var(--leaf-dark); }
.form-status.is-error { padding: 12px 14px; border-radius: 12px; background: #F8E3DC; color: var(--error); }

/* Legal page */
.legal { padding-top: 36px; padding-bottom: 48px; }
.translation-note { padding: 14px 16px; border-radius: 12px; background: var(--marigold-soft); }
.legal-section { padding-top: 18px; scroll-margin-top: 12px; }
.legal-section h2 { font-size: 1.4rem; }
.legal-back { margin-top: 30px; }

/* ---------- Footer ---------- */
/* On phones the footer's own bottom padding makes room for the fixed bottom
   bar, so the page ends in the footer colour (reset from 900 px). */
.site-footer {
  padding: 40px 0 calc(28px + var(--bar-h) + 16px + env(safe-area-inset-bottom, 0px));
  background: var(--leaf-dark);
  color: #FFFFFF;
}
.site-footer a { color: #FFFFFF; }
.site-footer a:hover { color: var(--marigold-soft); }
.site-footer :focus-visible { outline-color: var(--marigold); }
.footer-grid { display: grid; gap: 22px; }
.footer-mark { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.footer-mark .mark { background: var(--rice); border-radius: 8px; padding: 2px; width: 34px; height: 34px; }
.footer-mark .brand-han { color: #E6EFE9; }
.footer-tagline { font-weight: 700; }
.footer-notice { color: #E6EFE9; }
.footer-links, .footer-langs { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; }
.footer-links a, .footer-langs a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-langs a[aria-current="page"] { font-weight: 800; }
.footer-rights { margin: 0; color: #E6EFE9; font-size: .95rem; }

/* ---------- Bottom bar (phones) ---------- */
.bottom-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(251, 246, 236, .97);
  border-top: 1px solid var(--line);
  transition: transform .25s ease, visibility .25s;
}
.bottom-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 6px 10px;
  border-radius: 14px;
  font-weight: 750;
  text-align: center;
  line-height: 1.25;
  text-decoration: none;
}
.bar-main { background: var(--leaf); color: var(--on-leaf); border: 2px solid var(--leaf); }
.bar-main:hover { color: var(--on-leaf); background: var(--leaf-dark); }
.bar-second { background: var(--panel); color: var(--leaf-dark); border: 2px solid var(--leaf); }
.bottom-bar.is-hidden { transform: translateY(110%); visibility: hidden; }

/* ---------- 600 px and up ---------- */
@media (min-width: 600px) {
  :root { --gutter: 24px; }
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  .btn { width: auto; }
  .hero-actions { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
  .saying-pair { grid-template-columns: 1fr 1fr; }
  .points { grid-template-columns: repeat(3, 1fr); }
  .check-answers { grid-template-columns: 1fr 1fr; }
  .check-answers .btn { width: 100%; }
  .gen-line { font-size: 1rem; }
  .about-cols { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr; }
  .footer-langs, .footer-rights { grid-column: 1 / -1; }
}

/* ---------- 900 px and up ---------- */
@media (min-width: 900px) {
  .bottom-bar { display: none; }
  .site-footer { padding-bottom: 28px; }
  .header-row { min-height: 68px; }
  .site-nav { display: block; border-top: 1px solid var(--line); }
  .nav-list { display: flex; flex-wrap: wrap; gap: 0 4px; list-style: none; }
  .nav-list a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 4px 10px;
    color: var(--ink);
    font-weight: 650;
    text-decoration: none;
    border-radius: 8px;
  }
  .nav-list li:first-child a { padding-left: 0; }
  .nav-list a:hover { color: var(--leaf); text-decoration: underline; }

  .hero { padding: 40px 0 56px; }
  .hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 56px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 var(--gutter);
  }
  .hero-media {
    order: 2;
    height: min(78vh, 760px);
    min-height: 0;
    max-height: none;
    aspect-ratio: 9 / 16;
    border: 10px solid var(--panel);
    border-radius: 36px;
    box-shadow: 0 0 0 1px var(--line), 0 18px 40px rgba(30, 42, 36, .12);
  }
  .media-toggle { bottom: 14px; }
  .hero-text { order: 1; margin: 0; padding: 0; border-radius: 0; background: none; }
  h1 { font-size: 3.25rem; }
  .hero-lead:first-of-type { font-size: 1.2rem; }
  .section { padding: 76px 0; }
  h2 { font-size: 2.3rem; }

  .with-photo.has-photo { grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); align-items: start; gap: 40px; }
  .early-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .with-photo.has-photo .early-main { grid-template-columns: 1fr; }
  .lesson-list { grid-template-columns: 1fr 1fr; align-items: start; }
  .check { max-width: 46rem; }
  .ask-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: start; }
  .footer-grid { grid-template-columns: 2fr 1fr 2fr; }
  .footer-langs { grid-column: auto; }
  .gens { max-width: 46rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .bottom-bar, .lang-menu, .site-nav, .ask-form { display: none; }
  body { padding: 0; }
}
