@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&display=swap');

/* Teacher Mike — dark glass design system
   SAMPLE / REVIEW ONLY. Do not publish. Do not change DNS. */

:root,
html[data-scheme="dark-glass"],
html[data-scheme="soft-white"] {
  /* Deep navy / charcoal Apple Store–style glass */
  --ink: #f2f4f8;
  --muted: #9aa3b2;
  --canvas: #0b1020;
  --header: rgba(10, 14, 28, 0.72);
  --blue: #6ea8ff;
  --blue-deep: #9bc2ff;
  --accent: #d4b56a;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.12);
  --pill-bg: rgba(110, 168, 255, 0.14);
  --hero: #ffffff;
  --hero-muted: #9aa3b2;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.28);
  --footer: #060912;
  --glass-hover: rgba(255, 255, 255, 0.11);
  --glow: 0 0 0 1px rgba(255,255,255,0.08), 0 20px 60px rgba(0,0,0,0.5);
}

html[data-scheme="gold-blue"] { /* unused on Teacher Mike dark build */ }

html[data-scheme="warm-yellow"] { /* unused on Teacher Mike dark build */ }

html[data-scheme="bright-signage"] { /* unused on Teacher Mike dark build */ }

html[data-scheme="quiet-ink"] { /* unused on Teacher Mike dark build */ }


:root {
  --wordmark: Montserrat, Inter, "PingFang HK", "Noto Sans TC", "Microsoft JhengHei", ui-sans-serif, sans-serif;
  --display: Inter, "PingFang HK", "Noto Sans TC", "Microsoft JhengHei", ui-sans-serif, sans-serif;
  --radius: 0;
  --radius-sm: 0;
  --nav-h: 64px;
  --max: 1160px;
  --box-pad: clamp(40px, 5vw, 52px);
  --font: Inter, "PingFang HK", "Noto Sans TC", "Microsoft JhengHei", ui-sans-serif, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0;
  background: var(--canvas);
  min-height: 100vh;
}

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

a {
  color: var(--blue);
  text-underline-offset: 3px;
}

a:hover { color: var(--blue-deep); }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.65em;
  color: var(--ink);
}

h1 { font-size: clamp(2.35rem, 5vw, 3.55rem); font-weight: 700; }
h2 { font-size: clamp(1.45rem, 2.5vw, 1.95rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.012em; }

p { margin: 0 0 1em; }

/* Body copy fully justified; never hyphen-split words across lines */
p,
.lede,
.copy,
.copy p,
.copy li,
.glass.copy,
.page-hero .lede,
.canvas-note {
  text-align: left;
  hyphens: none;
  -webkit-hyphens: none;
  -ms-hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

/* Subheaders directly under page titles: left-align (all pages except Contact) */
.page-hero .lede,
.canvas-note {
  text-align: left;
}

/* Hero intro under page titles: left-aligned, full width to right edge */
.page-hero .lede {
  text-align: left;
  max-width: none;
  width: 100%;
  color: var(--hero-muted);
}

/* Footers and address / contact short-line blocks: left */
.site-footer,
.site-footer p,
.footer-address,
.footer-hours,
.contact-details,
.contact-block,
.contact-block p,
.contact-lines,
.contact-maps {
  text-align: left;
}

.page-hero h1,
.contact-heading,
h1, h2, h3, h4 {
  text-align: left;
}

.footer-copy {
  text-align: center;
}


p:last-child { margin-bottom: 0; }

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--glass-strong);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 100;
}

.skip:focus { left: 8px; }

.review-banner {
  background: #000;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 8px 12px;
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.glass,
.card,
.feature,
.feedback-card,
.copy,
.landing-card {
  padding: var(--box-pad);
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.glass ul,

.copy ul.skill-blocks {
  list-style: disc;
  padding-left: 1.25em;
  display: grid;
  gap: 1rem;
}
.copy ul.skill-blocks > li {
  margin: 0;
  padding: 0;
}
.copy ul.skill-blocks > li > strong {
  display: block;
  margin: 0 0 0.35em;
  font-weight: 700;
  color: var(--ink, #1a1a1a);
}
.copy ul.skill-blocks > li > p {
  margin: 0;
  line-height: 1.65;
}

.copy ul {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.glass ul:last-child,
.copy ul:last-child {
  margin-bottom: 0;
}

.glass-strong {
  background: var(--glass-strong);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--header) 92%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 28px;
}

.brand {
  display: block;
  height: auto;
  max-height: none;
  min-height: 0;
  padding: 0;
  font: 700 clamp(0.66rem, 0.98vw, 0.78rem) / 1.35 var(--wordmark);
  text-align: left;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--wordmark);
  font-weight: 700;
  font-size: clamp(0.66rem, 0.98vw, 0.78rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.35;
  max-width: 20rem;
  flex: 0 1 auto;
}

.brand:hover {
  color: var(--ink);
  opacity: 0.65;
}

.nav-toggle {
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius);
  background: var(--pill-bg);
  cursor: pointer;
  display: none;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  position: relative;
  margin: 0 auto;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  padding: 0 12px;
  margin: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: 600 12px / 32px var(--display);
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  vertical-align: middle;
}

.nav-item:hover,
.nav-item.active,
.drop:hover > .nav-item.drop-btn {
  background: var(--pill-bg);
  color: var(--ink);
}

/* Wordmark must never inherit the 32px nav chip box. */
a.brand.nav-item,
.header-inner > .brand {
  display: block;
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 0;
  background: transparent;
  border-radius: 0;
  font: 700 clamp(0.66rem, 0.98vw, 0.78rem) / 1.35 var(--wordmark);
  letter-spacing: 0.1em;
}

.lang-toggle .nav-item {
  height: 32px;
  max-height: 32px;
  border-radius: 0;
  padding: 0 10px;
}

.drop {
  position: relative;
  display: flex;
  align-items: center;
  align-self: center;
  height: 32px;
  min-height: 32px;
  /* no max-height: keeps hover path open to the menu below */
}

.drop > .drop-btn::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
  opacity: 0.55;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.drop.open > .drop-btn::after,
.drop:hover > .drop-btn::after {
  transform: translateY(1px) rotate(225deg);
  opacity: 0.8;
}

.drop-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 312px;
  padding: 8px 0;
  z-index: 50;
  /* Soft White panel — left gold rail, quiet lift (iters 3–5) */
  background: #ffffff;
  border: 1px solid rgba(27, 36, 48, 0.09);
  border-left: 2px solid var(--accent);
  box-shadow: 0 14px 36px rgba(27, 36, 48, 0.09), 0 2px 8px rgba(27, 36, 48, 0.03);
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.drop-menu.glass,
.drop-menu.glass-strong {
  background: #ffffff;
  padding: 8px 0;
  box-shadow: 0 14px 36px rgba(27, 36, 48, 0.09), 0 2px 8px rgba(27, 36, 48, 0.03);
  border: 1px solid rgba(27, 36, 48, 0.09);
  border-left: 2px solid var(--accent);
}


/* Invisible hit area so pointer can travel from Courses → menu without leaving :hover */
.drop-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.drop.open .drop-menu,
.drop:hover .drop-menu {
  display: grid;
  gap: 0;
}

.drop-menu a {
  display: block;
  position: relative;
  margin: 0;
  padding: 13px 20px 13px 18px;
  border-radius: 0;
  border: 0;
  border-top: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-family: var(--display);
  font-size: 0.9375rem; /* 15px — editorial, less chip-like */
  font-weight: 400;
  letter-spacing: 0.012em;
  line-height: 1.45;
  text-decoration: none;
  text-align: left;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, padding-left 0.16s ease;
}

.drop-menu a + a {
  border-top-color: rgba(27, 36, 48, 0.06);
}

.drop-menu a:hover,
.drop-menu a:focus-visible {
  background: rgba(33, 86, 214, 0.055);
  color: var(--blue-deep);
  padding-left: 20px;
  outline: none;
}

.lang-toggle {
  display: inline-flex;
  align-items: stretch;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--glass-strong);
  margin-left: 6px;
}

.lang-toggle a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  line-height: 1;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  border-radius: 0;
}

.lang-toggle a.active {
  background: var(--ink);
  color: #fff;
}

.page-hero {
  padding: 72px 0 12px;
}

.page-hero .glass {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
  box-shadow: none;
  padding: 8px 4px 4px;
  border-radius: 0;
}

.page-hero h1 {
  color: var(--hero);
  max-width: 30ch;
  font-size: clamp(2.55rem, 5.4vw, 3.9rem);
  font-weight: 700;
  letter-spacing: -0.016em;
  line-height: 1.12;
}

.page-hero .kicker {
  color: var(--accent);
}

.page-hero .pill {
  background: #e6e6e6;
  color: var(--ink);
}

.kicker {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 10px;
}

.lede {
  font-size: 1.2rem;
  line-height: 1.55;
  letter-spacing: 0;
  color: var(--muted);
  max-width: none;
  width: 100%;
}

.canvas-note {
  color: var(--hero-muted);
  font-size: 1.15rem;
  line-height: 1.55;
  max-width: none;
  width: 100%;
  margin: 0;
}

.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.pill {
  background: #e6e6e6;
  color: var(--ink);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

section { padding: 28px 0; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr; /* matching white box widths */
  gap: 20px;
  align-items: stretch;
}

.split.reverse { grid-template-columns: 1fr 1fr; }

.split .copy,
.card {
  padding: var(--box-pad);
  height: 100%;
  box-sizing: border-box;
}
.split .copy {
  display: flex;
  flex-direction: column;
}

.split .media,
.contact-grid .media {
  padding: 12px;
  display: flex;
}

.media img,
.photo-frame img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
}

.split .media img {
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  object-position: center;
}

/* Courses photo: keep subject on left when cover-cropping */
.split .media.crop-left {
  overflow: hidden;
  border-radius: var(--radius);
}
.split .media.crop-left img {
  /* More head room: less zoom, bias up in source (29 Sep 2026) */
  object-position: 18% 28%;
  transform: scale(1.04);
  transform-origin: center top;
}

/* Teacher Mike lobby uses a portrait crop of the panorama */
.split .media.crop-mike img {
  object-position: center top;
}

/* Contact photos are wide landscape (~3.7:1); keep them short, not tall crops */
.contact-grid .media {
  align-items: flex-start;
}

.contact-grid .media img {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 1500 / 409;
  object-fit: cover;
  object-position: center;
  display: block;
}

.grid-4 .photo-frame {
  /* Square the card itself so every cell matches, regardless of photo aspect */
  aspect-ratio: 1 / 1;
  padding: 10px;
  box-sizing: border-box;
  display: flex;
  overflow: hidden;
  min-width: 0;
}
.grid-4 .photo-frame img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
  display: block;
  min-height: 0;
  flex: 1 1 auto;
}

.photo-frame {
  overflow: hidden;
  padding: 12px;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch; /* equal-height white feature cards in each row */
}
.grid-2 > .feature {
  box-sizing: border-box;
}
body.lobby-flat main .grid-2,
body.site-flat main .grid-2 {
  align-items: start;
}
body.lobby-flat main .grid-2 > .feature,
body.site-flat main .grid-2 > .feature,
body.lobby-flat main .grid-2 > article.feature,
body.site-flat main .grid-2 > article.feature {
  height: auto;
  min-height: 0;
  align-self: start;
}
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.feature {
  padding: var(--box-pad);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  height: 100%;
  box-sizing: border-box;
}
.feature h3 {
  margin-bottom: 0;
  /* Match section h2 size (orange-circled title) */
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
  letter-spacing: inherit;
  font-weight: 700;
  line-height: 1.25;
}
.feature p {
  margin: 0;
}
.feature > p + a,
.feature > .feature-actions {
  margin-top: auto;
}
.feature-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.55rem;
}
.feature-actions a {
  margin-top: 0;
}
.feature-sep {
  color: var(--muted, #8a8580);
  font-weight: 400;
  user-select: none;
}


.feature h3 { color: var(--ink); }

.feature a {
  font-weight: 500;
  text-decoration: none;
}

.feature-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start; /* don't stretch into a full-width bar inside flex cards */
  box-sizing: border-box;
  width: 1.7rem;
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border-radius: 2px;
  background: var(--ink);
  color: #fff;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  margin: 0 0 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover { background: var(--blue-deep); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 22%, transparent);
}

.btn-ghost:hover { background: rgba(0, 0, 0, 0.04); color: var(--ink); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

/* Stacked CTAs (Mike rule): same width when one above the other.
   Use stretch + max-content — not width:100% inside fit-content
   (percent resolves to content size per button, so labels stay uneven). */
@media (max-width: 640px) {
  .btn-row {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    width: max-content;
    max-width: 100%;
  }
  .btn-row > .btn,
  .btn-row > a.btn {
    width: auto;
    align-self: stretch;
    box-sizing: border-box;
    justify-content: center;
  }
}

/* CTAs sometimes also carry .nav-item; never inherit the 32px nav chip box. */
a.btn.nav-item,
.btn-row .btn {
  height: auto;
  min-height: 44px;
  max-height: none;
  padding: 10px 20px;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  font: 700 15px / 1.25 var(--display);
  letter-spacing: -0.01em;
}

.quote {
  font-family: var(--font);
  font-size: 1.05rem;
  font-style: italic;
  letter-spacing: 0;
}

/* Chinese Student Feedback: upright quotes (no italic) */
html[lang="zh-Hant-HK"] .quote,
html[lang="zh-Hans"] .quote {
  font-style: normal;
}

.who {
  margin-top: 28px;
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--muted);
}

.who strong {
  display: block;
  color: var(--ink);
  font-style: normal;
  font-family: var(--font);
  line-height: 1.3;
  margin-bottom: 0.15em;
}

.feedback-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 28px;
  padding: var(--box-pad);
}

.feedback-card img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Student Feedback EN+ZH: mobile keeps name/title under photo */
body.page-studentfeedback.site-flat .feedback-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  min-width: 0;
  margin: 0;
  padding: 0;
}
body.page-studentfeedback.site-flat .feedback-meta .who {
  margin-top: 0;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}
body.page-studentfeedback.site-flat .feedback-meta img {
  width: 100%;
  max-width: 140px;
  height: 140px;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  display: block;
  /* clip-path / border-radius: see post Soft White override below */
}

/* Desktop: photo left (out of flow); quote then name/title stacked under quote.
   Avoids tall photo row pushing .who down under short quotes (Regis, Karif). */
@media (min-width: 1101px) {
  body.page-studentfeedback.site-flat main .feedback-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0; /* base .feedback-card gap:28px would sit between quote and .who */
    /* room for absolute photo + column gap; left 1.1rem matches gold-rail inset */
    padding-left: calc(1.1rem + 140px + 28px);
    min-height: calc(140px + 2 * clamp(8px, 1.5vw, 16px));
  }
  body.page-studentfeedback.site-flat main .feedback-card + .feedback-card {
    min-height: calc(140px + clamp(20px, 2.4vw, 30px) + clamp(8px, 1.5vw, 16px));
  }
  body.page-studentfeedback.site-flat main .feedback-meta {
    display: contents;
  }
  body.page-studentfeedback.site-flat main .feedback-meta img {
    position: absolute;
    left: 1.1rem;
    /* Nudge down so photo top edge optically matches quote first-line cap height */
    top: calc(clamp(8px, 1.5vw, 16px) + 0.4em);
    width: 140px;
    max-width: 140px;
    height: 140px;
    margin: 0;
  }
  body.page-studentfeedback.site-flat main .feedback-card + .feedback-card .feedback-meta img {
    top: calc(clamp(20px, 2.4vw, 30px) + 0.4em);
  }
  /* DOM via display:contents is img, who, quote — reorder to quote then who */
  body.page-studentfeedback.site-flat main .feedback-card > div:not(.feedback-meta) {
    order: 1;
    min-width: 0;
  }
  body.page-studentfeedback.site-flat main .feedback-meta .who {
    order: 2;
    margin-top: 16px;
  }
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

/* Private tuition: all course photos on one desktop/tablet row */
.photo-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.photo-row > img {
  display: block;
  min-width: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center 22%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  background: var(--glass-strong);
}

/* Private courses: session summary in its own white panel under the photo gallery */
.session-blurb-section {
  padding-top: 8px;
  padding-bottom: 8px;
}

.session-blurb {
  max-width: none;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  padding: clamp(28px, 4vw, 40px) clamp(28px, 4.5vw, 48px);
}

.session-blurb p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--ink);
  text-align: left;
}

.gallery-grid > img {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: var(--glass-strong);
}

.gallery-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* Exam prep certificate gallery — cream canvas, no white cards */
/* gallery-certs crop: landscape center */
.gallery-grid.gallery-certs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  background: transparent;
  box-shadow: none;
  border: none;
}

.gallery-grid.gallery-certs > img {
  width: 100%;
  height: auto;
  aspect-ratio: 330 / 264;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius);
  box-shadow: none;
  background: transparent;
}
/* Speech gallery: one portrait shot — keep frame size, show faces (top of source) */
.gallery-grid.gallery-certs > img.gallery-face-top {
  object-position: center top;
}



.logo-tile {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 12px 8px;
  gap: 0;
}

.logo-tile img,
.gallery-grid.gallery-logos img,
.gallery-logos img {
  width: 100%;
  max-height: 96px;
  height: auto;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
}

.gallery-grid.gallery-logos {
  background: transparent;
  box-shadow: none;
  border: none;
}

.logo-caption {
  margin: 0;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

/* Exam-prep board logos: under final copy, above footer; one compact row on mobile */
.exam-logos-section {
  padding-top: 8px;
  padding-bottom: 4px;
}
/* Fix 2 — no hairline above logo row on exam prep EN+中文 */
body.examprep-page.site-flat main > section.exam-logos-section {
  border-top: 0;
}
.exam-logos {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start; /* left-align with Call/WhatsApp CTA / copy */
  gap: clamp(12px, 4vw, 28px);
  width: 100%;
}
.exam-logos .logo-tile {
  flex: 0 1 auto;
  max-width: 140px;
  min-width: 0;
  padding: 4px 0;
}
.exam-logos .logo-tile img {
  width: 100%;
  max-height: 44px;
  height: auto;
  object-fit: contain;
}
@media (min-width: 720px) {
  .exam-logos .logo-tile {
    max-width: 180px;
  }
  .exam-logos .logo-tile img {
    max-height: 56px;
  }
}


.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.contact-details {
  text-align: left;
}

.contact-block {
  margin: 0 0 2rem;
}

.contact-block:last-child {
  margin-bottom: 0;
}

.contact-heading {
  margin: 0 0 0.65rem;
  font-family: "Barlow Condensed", "Inter Tight", Inter, "PingFang HK", "Noto Sans TC", "Microsoft JhengHei", ui-sans-serif, sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--ink);
}

/* Chinese: no Latin condensed glyphs — keep bold/large with local sans */
html[lang^="zh"] .contact-heading,
:lang(zh) .contact-heading {
  font-family: "Inter Tight", Inter, "PingFang HK", "Noto Sans TC", "Microsoft JhengHei", ui-sans-serif, sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
}

.contact-lines {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
}

.contact-lines .nb {
  white-space: nowrap;
}

.contact-lines:last-child {
  margin-bottom: 0;
}

.contact-lines a {
  font-weight: 600;
  text-decoration: none;
  color: var(--blue);
}

.contact-lines a:hover {
  color: var(--blue-deep);
}

.contact-maps {
  margin: 1.1rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.contact-maps a {
  font-weight: 600;
  text-decoration: none;
  color: var(--blue);
}

.contact-maps a:hover {
  color: var(--blue-deep);
}

/* Legacy list style kept for any residual snippets */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li { margin: 0 0 12px; }

.contact-list a {
  font-weight: 600;
  text-decoration: none;
}

.site-footer {
  margin-top: 48px;
  padding: 12px 0 64px;
}

.site-footer .glass { padding: var(--box-pad); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
}

.site-footer small,
.site-footer p { color: var(--muted); font-size: 14px; }

.site-footer h3 { font-size: 0.95rem; }

.site-footer .footer-address,
.site-footer .footer-hours {
  line-height: 1.55;
}

.site-footer .footer-maps {
  margin: 10px 0 0;
  padding: 0;
}
.site-footer .footer-maps a {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
}
.site-footer .footer-maps a:hover {
  text-decoration: underline;
}


.site-footer .footer-address {
  white-space: normal;
}

.site-footer .footer-hours {
  margin-top: 10px;
}

.site-footer .footer-copy {
  margin: 48px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.site-footer--copy-only .footer-copy {
  margin-top: 0;
}


.landing {
  min-height: 100vh;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(27, 36, 48, 0.18) 0%, rgba(33, 86, 214, 0.28) 48%, rgba(21, 35, 63, 0.55) 100%),
    url("../images/hero-landing.jpg") center 42% / cover no-repeat #2156d6;
  display: flex;
  flex-direction: column;
}

html[data-scheme="gold-blue"] .landing {
  background:
    linear-gradient(180deg, rgba(26, 34, 51, 0.2) 0%, rgba(18, 64, 184, 0.3) 48%, rgba(14, 42, 110, 0.58) 100%),
    url("../images/hero-landing.jpg") center 42% / cover no-repeat #1240b8;
}

html[data-scheme="warm-yellow"] .landing {
  background:
    linear-gradient(180deg, rgba(28, 33, 24, 0.16) 0%, rgba(224, 138, 56, 0.22) 42%, rgba(28, 82, 212, 0.52) 100%),
    url("../images/hero-landing.jpg") center 42% / cover no-repeat #e08a38;
}

html[data-scheme="bright-signage"] .landing {
  background:
    linear-gradient(180deg, rgba(20, 32, 51, 0.12) 0%, rgba(240, 208, 86, 0.2) 36%, rgba(20, 80, 230, 0.55) 100%),
    url("../images/hero-landing.jpg") center 42% / cover no-repeat #1450e6;
}

html[data-scheme="quiet-ink"] .landing {
  background:
    linear-gradient(180deg, rgba(14, 26, 46, 0.22) 0%, rgba(23, 50, 90, 0.34) 48%, rgba(14, 26, 46, 0.62) 100%),
    url("../images/hero-landing.jpg") center 42% / cover no-repeat #17325a;
}

.landing .review-banner {
  background: rgba(0, 0, 0, 0.55);
}

.landing-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 6vh 24px 18vh;
}

.landing-copy {
  width: min(920px, 100%);
  text-align: left;
  padding: 8px 12px;
}

.landing-copy h1 {
  font-family: var(--display);
  color: #fff;
  text-align: left;
  font-weight: 800;
  font-size: clamp(3rem, 7vw, 5.1rem);
  letter-spacing: -0.018em;
  line-height: 1.08;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.35);
  margin-bottom: 0.4em;
}

.landing-copy p {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.06rem, 1.7vw, 1.22rem);
  line-height: 1.45;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.4);
  max-width: 34em;
  margin-left: 0;
  margin-right: 0;
  text-align: left;
}

.landing-copy .zh {
  margin-top: 14px;
  font-weight: 700;
  letter-spacing: 0;
  max-width: 42em;
}

.lang-buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: stretch;
  gap: 12px;
  margin-top: 32px;
}

.lang-buttons a {
  min-width: 176px;
  min-height: 52px;
  font-size: 17px;
}

.landing .btn-primary,
.landing .btn-ghost {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: none;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: 17px;
}

.landing .btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.landing .btn-primary:hover,
.landing .btn-ghost:hover {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}

@media (max-width: 1100px) {
  .split,
  .split.reverse,
  .contact-grid,
  .footer-grid,
  .feedback-card {
    grid-template-columns: 1fr;
  }

  .contact-block {
    margin-bottom: 1.75rem;
  }

  .contact-lines {
    font-size: 0.98rem;
    line-height: 1.7;
  }

  .grid-3,
  .grid-4 { grid-template-columns: 1fr 1fr; }

  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  .nav {
    display: none;
    position: absolute;
    left: 14px;
    right: 14px;
    top: calc(var(--nav-h) + 8px);
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    border-radius: var(--radius);
    background: var(--glass-strong);
    box-shadow: var(--shadow);
  }

  .nav.open { display: flex; }

  .nav { flex-wrap: wrap; height: auto; }

  .nav > .nav-item,
  .nav > .drop > .drop-btn {
    width: 100%;
    justify-content: flex-start;
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    font: 600 12px / 36px var(--display);
  }

  .nav > .drop {
    width: 100%;
    height: auto;
    min-height: 36px;
    max-height: none;
    flex-direction: column;
    align-items: stretch;
  }

  .nav > .drop > .drop-btn {
    width: 100%;
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    justify-content: flex-start;
  }

  .lang-toggle {
    margin: 4px 0 0;
    align-self: flex-start;
  }

  .drop-menu,
  .drop-menu.glass,
  .drop-menu.glass-strong {
    position: static;
    display: none;
    min-width: 0;
    width: 100%;
    margin-top: 6px;
    padding: 4px 0;
    box-shadow: none;
    background: #ffffff;
    border: 0;
    border-left: 2px solid var(--accent);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .drop.open .drop-menu { display: grid; gap: 0; }

  .drop-menu a {
    white-space: normal;
    padding: 12px 14px 12px 16px;
    font-size: 0.9375rem;
    font-weight: 400;
    background: #ffffff;
  }

  .drop-menu a:hover,
  .drop-menu a:focus-visible {
    padding-left: 18px;
  }

  .header-inner { position: relative; }
}

@media (max-width: 720px) {
  .photo-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3 { grid-template-columns: 1fr; }

  /* Lobby photo grids: 2-col mobile like reference (not stacked) */
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
  }
  .grid-4 .photo-frame {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: 0;
    aspect-ratio: 1 / 1;
  }
  .grid-4 .photo-frame img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
    display: block;
    object-fit: cover;
    object-position: center;
  }

  .brand {
    font-size: 0.64rem;
    letter-spacing: 0.1em;
    max-width: 11.5rem;
  }

  body { font-size: 16px; }

  .gallery-grid img { height: 190px; }
  .gallery-grid.gallery-certs {
    grid-template-columns: 1fr 1fr;
  }
  .gallery-grid.gallery-certs > img {
    height: auto;
  }

  .photo-row { grid-template-columns: 1fr 1fr; }

  /* Keep English / 中文 side by side on one line (including phones). */
  .lang-buttons {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
  }
  .lang-buttons a {
    min-width: 0;
    flex: 1 1 0;
    padding-left: 14px;
    padding-right: 14px;
  }
}


/* Cambridge cert pair — left-align with flat copy; tight side-by-side */
.wrap.cert-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: min(var(--max), calc(100% - 40px));
  max-width: none;
  margin: 0 auto;
  /* Match site-flat copy (horizontal padding 0 on .glass.copy) */
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
  align-items: flex-end;
  justify-content: flex-start;
  background: transparent;
}

.cert-thumb {
  display: block;
  width: auto;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  cursor: zoom-in;
  appearance: none;
  -webkit-appearance: none;
}

.cert-thumb img {
  display: block;
  width: auto;
  height: 380px;
  max-width: min(100%, 920px);
  object-fit: contain;
  object-position: left bottom;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 720px) {
  .wrap.cert-pair {
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
    gap: 10px;
    flex-direction: column;
  }

  .wrap.cert-pair .cert-thumb img {
    height: auto;
    width: 100%;
    max-width: 100%;
  }

  .wrap.cert-pair .cert-thumb {
    width: 100%;
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 28, 40, 0.72);
  cursor: zoom-out;
}

.lightbox[hidden] { display: none !important; }

.lightbox img {
  max-width: min(920px, 100%);
  max-height: min(88vh, 100%);
  width: auto;
  height: auto;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #1b2430;
  font: 700 22px/40px var(--display, system-ui);
  cursor: pointer;
}

/* === lobby-flat / site-flat: Soft White flat layout (no glass blocks) === */
/* Shared by body.lobby-flat and body.site-flat. Text and photos sit on
   the off-white canvas. Section separation via soft hairlines. Landing
   pages stay unchanged. */

body.lobby-flat main .glass,
body.site-flat main .glass,
body.lobby-flat main .glass.copy,
body.site-flat main .glass.copy,
body.lobby-flat main .glass.media,
body.site-flat main .glass.media,
body.lobby-flat main .glass.photo-frame,
body.site-flat main .glass.photo-frame,
body.lobby-flat main .glass.feature,
body.site-flat main .glass.feature,
body.lobby-flat main article.feature,
body.site-flat main article.feature {
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(1.35);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  border-radius: 18px;
}

/* Keep readable inset for copy, but no card feel */
body.lobby-flat main .glass.copy,
body.site-flat main .glass.copy,
body.lobby-flat main .copy,
body.site-flat main .copy {
  padding: clamp(8px, 1.5vw, 16px) 0;
}

body.lobby-flat main .page-hero .glass,
body.site-flat main .page-hero .glass {
  padding: 8px 0 4px;
}

/* Photos: flush, soft radius only, no glass frame */
body.lobby-flat main .photo-frame,
body.site-flat main .photo-frame,
body.lobby-flat main .grid-4 .photo-frame,
body.site-flat main .grid-4 .photo-frame {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: hidden;
  border-radius: 6px;
}

body.lobby-flat main .photo-frame img,
body.site-flat main .photo-frame img,
body.lobby-flat main .grid-4 .photo-frame img,
body.site-flat main .grid-4 .photo-frame img {
  border-radius: 6px;
  box-shadow: none;
}

body.lobby-flat main .split .media,
body.site-flat main .split .media,
body.lobby-flat main .split .glass.media,
body.site-flat main .split .glass.media {
  padding: 0;
  overflow: hidden;
  border-radius: 6px;
}

body.lobby-flat main .split .media img,
body.site-flat main .split .media img {
  border-radius: 6px;
  box-shadow: none;
}

/* Preserve Teacher Mike + white-shirt student crops (do not override object-position / scale) */
body.lobby-flat main .split .media.crop-left,
body.site-flat main .split .media.crop-left {
  overflow: hidden;
  border-radius: 6px;
}

body.lobby-flat main .split .media.crop-mike,
body.site-flat main .split .media.crop-mike {
  overflow: hidden;
  border-radius: 6px;
}

/* Features: quiet gold rail from number square to last line; air between rows */
body.lobby-flat main .feature,
body.site-flat main .feature,
body.lobby-flat main article.feature,
body.site-flat main article.feature,
body.lobby-flat main .glass.feature,
body.site-flat main .glass.feature {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0 0 0 1.15rem;
  border: 0;
  border-left: 0;
  background: transparent;
  box-shadow: none;
}
body.lobby-flat main .feature::before,
body.site-flat main .feature::before,
body.lobby-flat main article.feature::before,
body.site-flat main article.feature::before,
body.lobby-flat main .glass.feature::before,
body.site-flat main .glass.feature::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  /* Stop at visual last-line baseline (trim half-leading under body line-height ~1.65) */
  bottom: 0.4em;
  width: 2px;
  background: color-mix(in srgb, var(--accent) 70%, transparent);
  border-radius: 1px;
  pointer-events: none;
}
body.lobby-flat main .feature .feature-num,
body.site-flat main .feature .feature-num {
  margin: 0;
}
body.lobby-flat main .feature h3,
body.site-flat main .feature h3 {
  margin: 0;
}
body.lobby-flat main .feature p,
body.site-flat main .feature p {
  margin: 0;
}

body.lobby-flat main .grid-2,
body.site-flat main .grid-2 {
  gap: clamp(14px, 2vw, 22px) clamp(24px, 3vw, 36px);
}

/* Footer: soft tint band (no card) for address / contact */
body.lobby-flat .site-footer,
body.site-flat .site-footer {
  margin-top: clamp(12px, 2vw, 24px);
  padding: clamp(36px, 5vw, 56px) 0 0;
  background: var(--header);
}

/* Footer panel flat on lobby too (text on canvas) */
body.lobby-flat .site-footer .glass,
body.site-flat .site-footer .glass {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
  box-shadow: none;
  padding: clamp(8px, 1.5vw, 16px) 0 0;
}

/* Copyright: off-white band, separated from address with breathing room */
body.lobby-flat .footer-legal,
body.site-flat .footer-legal {
  margin-top: clamp(28px, 4vw, 44px);
  padding: clamp(22px, 3.2vw, 30px) 0;
  background: var(--canvas);
  border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}

body.lobby-flat .site-footer .footer-copy,
body.site-flat .site-footer .footer-copy {
  margin: 0;
}

/* Do not flatten header dropdown panels */
body.lobby-flat .drop-menu.glass,
body.site-flat .drop-menu.glass,
body.lobby-flat .drop-menu.glass-strong,
body.site-flat .drop-menu.glass-strong {
  background: #ffffff;
  border: 1px solid rgba(27, 36, 48, 0.09);
  border-left: 2px solid var(--accent);
  box-shadow: 0 14px 36px rgba(27, 36, 48, 0.09), 0 2px 8px rgba(27, 36, 48, 0.03);
  padding: 8px 0;
}

/* Section separation: softer rhythm + soft hairlines (tightened 29 Sep) */
body.lobby-flat main > section,
body.site-flat main > section {
  padding: clamp(22px, 3.2vw, 36px) 0;
  background: transparent;
}

body.lobby-flat main > section.page-hero,
body.site-flat main > section.page-hero {
  padding: 72px 0 28px;
}

body.lobby-flat main > section + section,
body.site-flat main > section + section {
  border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}

/* Slightly stronger section titles for hierarchy without boxes */
body.lobby-flat main .copy h2,
body.site-flat main .copy h2,
body.lobby-flat main section .copy h2,
body.site-flat main section .copy h2 {
  margin-bottom: 0.85em;
  letter-spacing: -0.018em;
}

body.lobby-flat main .feature h3,
body.site-flat main .feature h3 {
  margin-bottom: 0.35em;
}

/* Split gap a bit airier without matching white-box widths */
body.lobby-flat main .split,
body.site-flat main .split {
  gap: clamp(24px, 3.5vw, 40px);
  align-items: start;
}

body.lobby-flat main .split .copy,
body.site-flat main .split .copy {
  height: auto;
  /* Flush headline with photo top (no leftover card inset) */
  padding-top: 0;
  padding-bottom: clamp(8px, 1.5vw, 16px);
}

body.lobby-flat main .split .copy > :first-child,
body.site-flat main .split .copy > :first-child {
  margin-top: 0;
}

/* Pills stay subtle chips, not white cards */
body.lobby-flat main .pill,
body.site-flat main .pill {
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}

@media (max-width: 640px) {
  body.lobby-flat main > section,
  body.site-flat main > section {
    padding: clamp(18px, 4.5vw, 28px) 0;
  }

  body.lobby-flat main .feature,
  body.site-flat main .feature,
  body.lobby-flat main article.feature,
  body.site-flat main article.feature {
    padding: 0 0 0 1rem;
  }
  body.lobby-flat main .grid-2,
  body.site-flat main .grid-2 {
    row-gap: clamp(28px, 6vw, 40px);
  }

  body.lobby-flat main .grid-4 .photo-frame,
  body.site-flat main .grid-4 .photo-frame {
    border-radius: 4px;
  }

  body.lobby-flat main .grid-4 .photo-frame img,
  body.site-flat main .grid-4 .photo-frame img {
    border-radius: 4px;
  }
}

/* Lobby portrait mobile only: split CTAs match stacked photo width.
   Shared .btn-row uses width:max-content (equal labels, not photo-wide).
   Desktop / landscape unchanged. */
@media (max-width: 640px) and (orientation: portrait) {
  body.lobby-flat main .split .copy .btn-row {
    width: 100%;
    max-width: 100%;
    align-items: stretch;
    box-sizing: border-box;
  }
  body.lobby-flat main .split .copy .btn-row > .btn,
  body.lobby-flat main .split .copy .btn-row > a.btn {
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: break-word;
  }
}

/* Course pages portrait mobile only: bottom contact CTA full content width.
   Shared .btn-row uses width:max-content; desktop / landscape unchanged. */
@media (max-width: 640px) and (orientation: portrait) {
  body.site-flat main .btn-row:has(a[href*="contactus"]) {
    width: 100%;
    max-width: 100%;
    align-items: stretch;
    box-sizing: border-box;
  }
  body.site-flat main .btn-row:has(a[href*="contactus"]) > .btn,
  body.site-flat main .btn-row:has(a[href*="contactus"]) > a.btn {
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    box-sizing: border-box;
    display: block;
    text-align: center;
    white-space: normal;
    overflow-wrap: break-word;
  }
}

@media (max-width: 1100px) {
  /* Stacked split photos: same square size on mobile/tablet */
  body.lobby-flat main .split .media,
  body.site-flat main .split .media,
  body.lobby-flat main .split .glass.media,
  body.site-flat main .split .glass.media {
    aspect-ratio: 1 / 1;
    width: 100%;
    align-self: stretch;
  }
  body.lobby-flat main .split .media img,
  body.site-flat main .split .media img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
  }
}

/* Feedback quote cards: flat + gold left rail (same language as features) */
body.lobby-flat main .feedback-card,
body.site-flat main .feedback-card {
  position: relative;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: clamp(8px, 1.5vw, 16px) 0 clamp(8px, 1.5vw, 16px) 1.1rem;
  border-left: 0;
}
/* Rail starts at photo top (match card padding-top), not above it */
body.lobby-flat main .feedback-card::before,
body.site-flat main .feedback-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: clamp(8px, 1.5vw, 16px);
  bottom: clamp(8px, 1.5vw, 16px);
  width: 2px;
  background: color-mix(in srgb, var(--accent) 70%, transparent);
  border-radius: 1px;
  pointer-events: none;
}

/* Gaps between testimonials; no hairlines */
body.lobby-flat main .feedback-card + .feedback-card,
body.site-flat main .feedback-card + .feedback-card {
  border-top: 0;
  margin-top: clamp(12px, 2vw, 20px);
  padding-top: clamp(24px, 3vw, 36px);
}
body.lobby-flat main .feedback-card + .feedback-card::before,
body.site-flat main .feedback-card + .feedback-card::before {
  top: clamp(24px, 3vw, 36px);
}

body.lobby-flat main .feedback-card img,
body.site-flat main .feedback-card img {
  border-radius: 10px;
  border: 0;
  box-shadow: none;
  box-sizing: border-box;
  object-fit: cover;
  /* Bias down so rounded top corners do not clip hair */
  object-position: center 28%;
  /* Light even side crop only; keep top headroom */
  clip-path: inset(1.2% 3% 3.5% 3% round 8px);
}

/* Student Feedback EN+ZH: Soft White photo left-flush + 4-corner rounding */
body.page-studentfeedback.site-flat main .feedback-meta img {
  clip-path: inset(1.2% 3% 3.5% 0 round 8px);
  border-radius: 10px;
  display: block;
  margin: 0;
  padding: 0;
}

/* Gallery grids: soft radius, no card chrome on images */
body.lobby-flat main .gallery-grid > img,
body.site-flat main .gallery-grid > img,
body.lobby-flat main .gallery-grid img,
body.site-flat main .gallery-grid img {
  border-radius: 6px;
  box-shadow: none;
}

/* Photo strips on course pages: Soft White 6px like lobby photos */
body.lobby-flat main .photo-row > img,
body.site-flat main .photo-row > img {
  box-shadow: none;
  background: transparent;
  border-radius: 6px;
}

/* Contact: multi-column blocks on wide screens (location / touch / hours) */
/* Match Soft White photo-frame / split media corner radius (6px) */
body.lobby-flat main .contact-grid .media,
body.site-flat main .contact-grid .media,
body.lobby-flat main .contact-grid .glass.media,
body.site-flat main .contact-grid .glass.media {
  padding: 0;
  overflow: hidden;
  border-radius: 6px;
}

body.lobby-flat main .contact-grid .media img,
body.site-flat main .contact-grid .media img,
body.lobby-flat main .contact-grid .glass.media img,
body.site-flat main .contact-grid .glass.media img {
  border-radius: 6px;
}

/* Contact wayfinding map (ZH Soft White contactus-ch): below contact-grid; desktop capped */
.contact-wayfinding .contact-heading {
  margin: 0 0 1rem;
}

.contact-wayfinding-frame {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 6px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.contact-wayfinding-frame img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: none;
}

body.site-flat main .contact-wayfinding-frame,
body.lobby-flat main .contact-wayfinding-frame {
  padding: 0;
  overflow: hidden;
  border-radius: 6px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.site-flat main .contact-wayfinding-frame img,
body.lobby-flat main .contact-wayfinding-frame img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: none;
}

@media (min-width: 1101px) {
  .contact-wayfinding-frame,
  body.site-flat main .contact-wayfinding-frame,
  body.lobby-flat main .contact-wayfinding-frame {
    max-width: 540px;
    margin-inline: 0;
    margin-left: 0;
  }
}


body.lobby-flat main .contact-details,
body.site-flat main .contact-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 40px) clamp(28px, 3.5vw, 44px);
  align-items: start;
}

body.lobby-flat main .contact-block,
body.site-flat main .contact-block {
  margin: 0;
  padding: 0;
}

@media (min-width: 900px) {
  body.lobby-flat main .contact-details,
  body.site-flat main .contact-details {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr);
  }

  body.lobby-flat main .contact-block:not(:first-child),
  body.site-flat main .contact-block:not(:first-child) {
    border-left: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
    padding-left: clamp(20px, 2.5vw, 32px);
  }
}

@media (min-width: 641px) and (max-width: 899px) {
  body.lobby-flat main .contact-details,
  body.site-flat main .contact-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.lobby-flat main .contact-block:nth-child(3),
  body.site-flat main .contact-block:nth-child(3) {
    grid-column: 1 / -1;
  }

  body.lobby-flat main .contact-block:nth-child(2),
  body.site-flat main .contact-block:nth-child(2) {
    border-left: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
    padding-left: clamp(18px, 2.5vw, 28px);
  }

  body.lobby-flat main .contact-block:nth-child(3),
  body.site-flat main .contact-block:nth-child(3) {
    border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
    padding-top: clamp(22px, 3vw, 32px);
  }
}

@media (max-width: 640px) {
  /* Contact EN + 中文: remove the mobile-only hairline above the exterior photo. */
  body.page-contact.site-flat main > section.page-hero + section {
    border-top: 0;
  }

  body.lobby-flat main .contact-block + .contact-block,
  body.site-flat main .contact-block + .contact-block {
    border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
    padding-top: clamp(22px, 4vw, 28px);
  }
}

/* Feature grids: clearer cell separation without glass cards */
body.lobby-flat main .grid-2,
body.site-flat main .grid-2 {
  gap: clamp(14px, 2vw, 22px) clamp(28px, 3.5vw, 40px);
}

@media (min-width: 641px) {
  /* Equal columns: same padding on every feature so 1/3/5… and 2/4/6… line up */
  body.lobby-flat main .grid-2,
  body.site-flat main .grid-2 {
    column-gap: clamp(32px, 4vw, 48px);
    row-gap: clamp(36px, 4.5vw, 56px);
  }

  body.lobby-flat main .grid-2 > .feature,
  body.site-flat main .grid-2 > .feature,
  body.lobby-flat main .grid-2 > article.feature,
  body.site-flat main .grid-2 > article.feature {
    padding: 0 0 0 1.15rem;
    border: 0;
  }

  body.lobby-flat main .grid-2 > .feature::before,
  body.site-flat main .grid-2 > .feature::before,
  body.lobby-flat main .grid-2 > article.feature::before,
  body.site-flat main .grid-2 > article.feature::before {
    top: 0;
    bottom: 0.4em;
  }

  /* Hairline above row 2+; gap then black number (rail starts at number) */
  body.lobby-flat main .grid-2 > .feature:nth-child(n + 3),
  body.site-flat main .grid-2 > .feature:nth-child(n + 3),
  body.lobby-flat main .grid-2 > article.feature:nth-child(n + 3),
  body.site-flat main .grid-2 > article.feature:nth-child(n + 3) {
    padding-top: clamp(28px, 3.2vw, 40px);
    box-shadow: none;
  }

  body.lobby-flat main .grid-2 > .feature:nth-child(n + 3)::before,
  body.site-flat main .grid-2 > .feature:nth-child(n + 3)::before,
  body.lobby-flat main .grid-2 > article.feature:nth-child(n + 3)::before,
  body.site-flat main .grid-2 > article.feature:nth-child(n + 3)::before {
    top: clamp(28px, 3.2vw, 40px);
  }
}

@media (max-width: 640px) {
  body.lobby-flat main .grid-2 > .feature + .feature,
  body.site-flat main .grid-2 > .feature + .feature,
  body.lobby-flat main .grid-2 > article.feature + article.feature,
  body.site-flat main .grid-2 > article.feature + article.feature {
    padding-top: clamp(20px, 4vw, 28px);
  }
}

/* Cambridge exams: student success photos — always one row of 3 (desktop + mobile). */
.cambridge-success-section {
  display: block;
}
.cambridge-success-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  justify-content: stretch;
  align-items: stretch;
  width: 100%;
  max-width: 804px;
}
.cambridge-success-shot {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 1 / 1;
  min-width: 0;
  max-width: none;
}
.cambridge-success-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 6px;
}
body.site-flat main .cambridge-success-shot,
body.lobby-flat main .cambridge-success-shot {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
@media (max-width: 700px) {
  .cambridge-success-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 100%;
    gap: 6px;
  }
}

/* Copy-only footer (contact): skip empty header tint band; legal band only */
body.lobby-flat .site-footer--copy-only,
body.site-flat .site-footer--copy-only {
  margin-top: clamp(4px, 1vw, 12px);
  padding: 0;
  background: transparent;
  border-top: 0;
}

body.lobby-flat .site-footer--copy-only .footer-legal,
body.site-flat .site-footer--copy-only .footer-legal {
  margin-top: 0;
}

/* Contact only: match top bar tint (header is 92% white over canvas, not pure #fff) */
body.page-contact.site-flat .site-footer--copy-only .footer-legal,
body.page-contact.lobby-flat .site-footer--copy-only .footer-legal {
  background: color-mix(in srgb, var(--header) 92%, var(--canvas));
}

/* === /lobby-flat / site-flat === */

/* Desktop: pin split CTAs to bottom (reverted photo-stretch) */
@media (min-width: 1101px) {
  .split .copy {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
  }
  .split .copy .btn-row {
    margin-top: auto;
    padding-top: 1.25rem;
  }
}

/* Soft White: keep CTAs snug under copy (do not stretch to photo height).
   The pin-CTA rule above leaves min-height:100% + margin-top:auto, which
   opens a ~2-line gap under Teacher Mike / courses split paragraphs. */
@media (min-width: 1101px) {
  body.lobby-flat main .split .copy,
  body.site-flat main .split .copy {
    height: auto;
    min-height: 0;
  }
  body.lobby-flat main .split .copy > p:last-of-type,
  body.site-flat main .split .copy > p:last-of-type {
    margin-bottom: 0;
  }
  body.lobby-flat main .split .copy .btn-row,
  body.site-flat main .split .copy .btn-row {
    margin-top: 0.75rem;
    padding-top: 0;
  }
}

/* Soft White desktop: crop Teacher Mike photo to match Helping students copy+buttons
   (copy drives row height; image fills with object-fit: cover). Scoped to .crop-mike.
   EN student/whiteboard split uses the lobby-en block below. */
@media (min-width: 1101px) {
  body.lobby-flat main .split:has(.crop-mike),
  body.site-flat main .split:has(.crop-mike) {
    align-items: stretch;
  }
  body.lobby-flat main .split .media.crop-mike,
  body.site-flat main .split .media.crop-mike {
    position: relative;
    min-height: 0;
    align-self: stretch;
  }
  body.lobby-flat main .split .media.crop-mike img,
  body.site-flat main .split .media.crop-mike img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    object-position: center top; /* keep crop-mike bias */
  }
}

/* Soft White desktop EN lobby: align student/whiteboard photo to left column
   (heading top → blue one-to-one CTA bottom). Absolute cover so image does not
   drive row height. body.lobby-en only — Chinese lobby untouched. Font metrics unchanged. */
@media (min-width: 1101px) {
  body.lobby-flat.lobby-en main .split:has(.crop-left) {
    align-items: stretch;
  }
  body.lobby-flat.lobby-en main .split:has(.crop-left) .copy {
    padding-bottom: 0; /* column ends at blue button bottom */
  }
  body.lobby-flat.lobby-en main .split .media.crop-left {
    position: relative;
    min-height: 0;
    align-self: stretch;
  }
  body.lobby-flat.lobby-en main .split .media.crop-left img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    object-position: 18% 28%; /* keep crop-left face bias */
    transform: scale(1.04);
    transform-origin: center top;
  }
}

/* Soft White desktop EN lobby: Teacher Mike photo bottom aligns with the two
   CTAs (blue Learn more / grey Read student feedback). Stretch+cover already
   exists for .crop-mike; copy padding-bottom was extending past the buttons.
   body.lobby-en only — Chinese lobby untouched. Font metrics unchanged. */
@media (min-width: 1101px) {
  body.lobby-flat.lobby-en main .split:has(.crop-mike) .copy {
    padding-bottom: 0; /* column ends at button row bottom */
  }
}

/* Cambridge: drop hairline + close gap above Course structure */
body.site-flat main > section.session-blurb-section {
  padding-bottom: 0;
}
body.site-flat main > section.no-section-rule,
body.lobby-flat main > section.no-section-rule {
  border-top: 0 !important;
  padding-top: 0.35rem;
}

.copy hr.inline-hairline {
  border: 0;
  border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  margin: 1.35rem 0 1.25rem;
}

/* Extra air before an in-copy h2 (e.g. What is covered) */
.heading-gap-before {
  margin-top: 2.25rem;
}

/* Speech / Interview / Cambridge: one gold rail per bulleted group */
body.bullets-deep main .copy ul {
  position: relative;
  padding-left: calc(1.25em + 0.85rem);
  margin-left: 0;
  list-style-position: outside;
}
body.bullets-deep main .copy ul::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0.35em; /* stop near last line baseline */
  width: 2px;
  background: color-mix(in srgb, var(--accent) 70%, transparent);
  border-radius: 1px;
  pointer-events: none;
}
/* skill-blocks: same rail indent as plain bullet lists */
body.bullets-deep main .copy ul.skill-blocks {
  padding-left: calc(1.25em + 0.85rem);
}
body.bullets-deep main .copy ul.skill-blocks > li {
  padding-left: 0;
}

/* Feature gold rails: hug content; square → last line */
body.lobby-flat main .grid-2 > .feature,
body.site-flat main .grid-2 > .feature,
body.lobby-flat main .grid-2 > article.feature,
body.site-flat main .grid-2 > article.feature,
body.private-features main .grid-2 > .feature,
body.private-features main .grid-2 > article.feature,
body.private-features main .grid-2 > .glass.feature {
  height: auto !important;
  min-height: 0 !important;
  align-self: start;
  border-left: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 1.15rem !important;
}
/* Desktop: first row flush. Mobile: space above first black number (below). */
@media (min-width: 641px) {
  body.lobby-flat main .grid-2 > .feature:first-child,
  body.site-flat main .grid-2 > .feature:first-child,
  body.lobby-flat main .grid-2 > article.feature:first-child,
  body.site-flat main .grid-2 > article.feature:first-child {
    padding-top: 0 !important;
  }
}
@media (max-width: 640px) {
  body.lobby-flat main .grid-2 > .feature:first-child,
  body.site-flat main .grid-2 > .feature:first-child,
  body.lobby-flat main .grid-2 > article.feature:first-child,
  body.site-flat main .grid-2 > article.feature:first-child {
    padding-top: 36px !important;
  }
  body.lobby-flat main .grid-2 > .feature:first-child::before,
  body.site-flat main .grid-2 > .feature:first-child::before,
  body.lobby-flat main .grid-2 > article.feature:first-child::before,
  body.site-flat main .grid-2 > article.feature:first-child::before {
    top: 36px !important;
  }
}

/* Mobile stacked features: hairline with clear gap above black number */
@media (max-width: 640px) {
  body.lobby-flat main .grid-2 > .feature + .feature,
  body.site-flat main .grid-2 > .feature + .feature,
  body.lobby-flat main .grid-2 > article.feature + article.feature,
  body.site-flat main .grid-2 > article.feature + article.feature {
    padding-top: 32px !important;
    margin-top: 12px !important;
  }
  body.lobby-flat main .grid-2 > .feature + .feature::before,
  body.site-flat main .grid-2 > .feature + .feature::before,
  body.lobby-flat main .grid-2 > article.feature + article.feature::before,
  body.site-flat main .grid-2 > article.feature + article.feature::before {
    top: 32px !important;
  }
}

/* Exam prep: slightly tighter space above first numbered feature */
body.examprep-page main .grid-2 > .feature:first-child,
body.examprep-page main .grid-2 > article.feature:first-child {
  padding-top: 12px !important;
}
body.examprep-page main .grid-2 > .feature:first-child::before,
body.examprep-page main .grid-2 > article.feature:first-child::before {
  top: 12px !important;
}
@media (max-width: 640px) {
  body.examprep-page main .grid-2 > .feature:first-child,
  body.examprep-page main .grid-2 > article.feature:first-child {
    padding-top: 18px !important;
  }
  body.examprep-page main .grid-2 > .feature:first-child::before,
  body.examprep-page main .grid-2 > article.feature:first-child::before {
    top: 18px !important;
  }
}
body.examprep-page main > section.page-hero {
  padding-bottom: 16px;
}
body.examprep-page main > section.no-section-rule {
  padding-top: 8px;
}

/* Cambridge YLE certs: no hairline; top gap matches canvas gap above footer band */
body.site-flat main > section:has(+ .cambridge-yle-certs-section) {
  padding-bottom: 0;
}
body.site-flat main > section.cambridge-yle-certs-section {
  border-top: none;
  /* Same as section pad-bottom + footer margin-top (gap above the tint band) */
  padding-top: calc(clamp(22px, 3.2vw, 36px) + clamp(12px, 2vw, 24px));
  padding-bottom: clamp(22px, 3.2vw, 36px);
}
body.site-flat:has(.cambridge-yle-certs-section) .site-footer {
  margin-top: clamp(12px, 2vw, 24px);
}


/* === Desktop-only layout tweaks (min-width only; mobile max-width rules untouched) === */

/* 2) Private courses / Exam prep: slightly tighter vertical gaps between feature rows
   (uneven copy/rails stay as-is; do not force equal-height rails) */
@media (min-width: 1101px) {
  /* Private courses: restore clear air between the session blurb and feature row. */
  body.private-features.site-flat main > section.no-section-rule {
    padding-top: clamp(22px, 2vw, 28px);
  }

  body.lobby-flat main .grid-2,
  body.site-flat main .grid-2 {
    row-gap: clamp(28px, 3.5vw, 44px);
  }

  body.lobby-flat main .grid-2 > .feature:nth-child(n + 3),
  body.site-flat main .grid-2 > .feature:nth-child(n + 3),
  body.lobby-flat main .grid-2 > article.feature:nth-child(n + 3),
  body.site-flat main .grid-2 > article.feature:nth-child(n + 3) {
    padding-top: clamp(22px, 2.6vw, 32px);
  }

  body.lobby-flat main .grid-2 > .feature:nth-child(n + 3)::before,
  body.site-flat main .grid-2 > .feature:nth-child(n + 3)::before,
  body.lobby-flat main .grid-2 > article.feature:nth-child(n + 3)::before,
  body.site-flat main .grid-2 > article.feature:nth-child(n + 3)::before {
    top: clamp(22px, 2.6vw, 32px);
  }
}


/* Fix 3 reverted — keep natural feature heights and absolute content-hugging rails.
   Desktop rows align to start; each ::before rail follows its own card content. */

/* 3) Sticky header: keep scrolled anchors/sections clear of fixed nav */
@media (min-width: 1101px) {
  html {
    scroll-padding-top: calc(var(--nav-h) + 20px);
  }

  body.site-flat main > section,
  body.lobby-flat main > section {
    scroll-margin-top: calc(var(--nav-h) + 16px);
  }
}

/* 4) Cambridge YLE certs gallery: slightly wider, still left-aligned with CTA; keep contain/flush crop */
@media (min-width: 1101px) {
  .cert-thumb img {
    height: 440px;
    max-width: min(100%, 1040px);
  }
}

/* 5) Student Feedback: trim card-to-card gaps ~15-20%; keep Soft White open feel */
@media (min-width: 1101px) {
  body.lobby-flat main .feedback-card + .feedback-card,
  body.site-flat main .feedback-card + .feedback-card {
    margin-top: clamp(10px, 1.6vw, 16px);
    padding-top: clamp(20px, 2.4vw, 30px);
  }

  body.lobby-flat main .feedback-card + .feedback-card::before,
  body.site-flat main .feedback-card + .feedback-card::before {
    top: clamp(20px, 2.4vw, 30px);
  }

  /* Soft White Student Feedback: pack cards tighter; sync absolute photo + rail */
  body.page-studentfeedback.site-flat main .wrap:has(> .feedback-card) {
    gap: 12px !important; /* beat inline gap:20px on feedback stack */
  }
  body.page-studentfeedback.site-flat main .feedback-card + .feedback-card {
    margin-top: clamp(6px, 1.2vw, 10px);
    padding-top: clamp(14px, 1.8vw, 22px);
    min-height: calc(140px + clamp(14px, 1.8vw, 22px) + clamp(8px, 1.5vw, 16px));
  }
  body.page-studentfeedback.site-flat main .feedback-card + .feedback-card::before {
    top: clamp(14px, 1.8vw, 22px);
  }
  body.page-studentfeedback.site-flat main .feedback-card + .feedback-card .feedback-meta img {
    /* Match first-card optical nudge (quote first-line cap height) */
    top: calc(clamp(14px, 1.8vw, 22px) + 0.4em);
  }
}

/* Mobile: modestly tighten Student Feedback card-to-card spacing only. */
@media (max-width: 640px) {
  body.lobby-flat main .feedback-card + .feedback-card,
  body.site-flat main .feedback-card + .feedback-card {
    margin-top: clamp(10px, 1.6vw, 16px);
    padding-top: clamp(20px, 2.4vw, 30px);
  }

  body.lobby-flat main .feedback-card + .feedback-card::before,
  body.site-flat main .feedback-card + .feedback-card::before {
    top: clamp(20px, 2.4vw, 30px);
  }
}

/* 6) Speech / Interview “What is covered” long lists: slightly more space between li; keep line-height 1.65 */
@media (min-width: 1101px) {
  body.bullets-deep main .copy ul:not(.skill-blocks) > li {
    margin-bottom: 0.45em;
  }

  body.bullets-deep main .copy ul:not(.skill-blocks) > li:last-child {
    margin-bottom: 0;
  }
}

/* Lobby gold-rail feature stack: mobile-only gap reduction (Teacher Mike) */
@media (max-width: 640px) {
  body.lobby-flat main .grid-2 {
    row-gap: clamp(22px, 4.5vw, 30px);
  }

  /* Tighten only the space before the first card; keep card-to-card gaps. */
  body.lobby-flat main .grid-2 > .feature:first-child,
  body.lobby-flat main .grid-2 > article.feature:first-child {
    padding-top: 28px !important;
  }

  body.lobby-flat main .grid-2 > .feature:first-child::before,
  body.lobby-flat main .grid-2 > article.feature:first-child::before {
    top: 28px !important;
  }

  body.lobby-flat main .grid-2 > .feature + .feature,
  body.lobby-flat main .grid-2 > article.feature + article.feature {
    padding-top: 24px !important;
    margin-top: 8px !important;
  }

  body.lobby-flat main .grid-2 > .feature + .feature::before,
  body.lobby-flat main .grid-2 > article.feature + article.feature::before {
    top: 24px !important;
  }
}

/* Soft White horizontal hairlines: keep the flat layout free of rules. */
body.lobby-flat .site-header,
body.site-flat .site-header {
  border-bottom: 0;
}

/* Interview EN + 中文: keep the hero-to-blurb gap, but remove the separator. */
body.site-flat main > section.page-hero + section.session-blurb-section {
  border-top: 0;
}

/* Interview EN + 中文: modestly close the former hairline gap between the
   hero chips and the opening “Every programme…” blurb. */
body.site-flat.bullets-deep main > section.page-hero:has(+ section.session-blurb-section) {
  padding-bottom: 22px;
}
body.site-flat.bullets-deep main > section.page-hero + section.session-blurb-section {
  padding-top: clamp(18px, 2.5vw, 28px);
}

/* Speech EN + 中文: remove section separators without touching photo or chip borders. */
body.site-flat:has(.gallery-certs) main > section + section {
  border-top: 0;
}

/* Speech EN + 中文: add a modest 12–20px of air above “Course structure”. */
body.site-flat:has(.gallery-certs) main > section.no-section-rule {
  padding-top: clamp(18px, 2.4vw, 24px);
}

/* Speech EN + 中文: desktop only — tighten chips→photos band (Mike orange),
   keep locked tighter gap under photos, leave Course structure alone. */
@media (min-width: 641px) {
  /* Speech desktop: modest air above photos (chips→photos), keep under-photo lock. */
  body.site-flat:has(.gallery-certs) main > section.page-hero {
    padding-bottom: 20px; /* was 14px; Mike asked a little more above photos */
  }
  body.site-flat:has(.gallery-certs) main > section:has(.gallery-certs) {
    padding-top: 20px;
    padding-bottom: 14px; /* locked: tighter gap UNDER photos */
  }
  body.site-flat:has(.gallery-certs) main > section:has(.gallery-certs) + section.session-blurb-section {
    padding-top: 14px;
  }

  /* Space above “Every lesson includes constructive feedback…” / 中文 equivalent.
     Use padding-top (not margin-top): ul margin-bottom collapses with p margin-top,
     so margin-top ≤ 1em had no visible effect. */
  body.site-flat:has(.gallery-certs) main .copy p.speech-after-covered {
    padding-top: 1.5rem; /* clear visible air above this paragraph */
  }
}

/* Private-course upper photo blocks: no rules directly above or below. */
body.site-flat main > section:has(.photo-row),
body.site-flat main > section:has(.photo-row) + section {
  border-top: 0;
}

/* Lobby EN + 中文: student photo grid + Personalised courses, and
   facility 2x2 grid + “bright comfortable” / 明亮舒適 environment
   section, share class no-section-rule in HTML so flanking hairlines
   are removed (section + section border-top). Fragile :has/:nth-of-type
   override removed — see .no-section-rule above. */

/* Interview EN + 中文: one more measured step toward the hero chips and
   opening “Every programme…” blurb, without changing the other course pages. */
body.site-flat.bullets-deep:has(.session-blurb-section .copy:not(.session-blurb)) main > section.page-hero {
  padding-bottom: 18px;
}
body.site-flat.bullets-deep:has(.session-blurb-section .copy:not(.session-blurb)) main > section.page-hero + section.session-blurb-section {
  padding-top: clamp(15px, 2.1vw, 22px);
}

/* Teacher Mike photo pair: remove only the section rule between the whiteboard student shot and the portrait; keep the existing gap. */
body.lobby-flat main > section:has(.crop-left) + section:has(.crop-mike) {
  border-top: 0;
}

/* Lobby desktop only: tighten gap between Personalised courses split and Teacher Mike portrait. Mobile unchanged. */
@media (min-width: 641px) {
  body.lobby-flat main > section:has(.crop-left) {
    padding-bottom: clamp(12px, 1.6vw, 18px);
  }
  body.lobby-flat main > section:has(.crop-left) + section:has(.crop-mike) {
    padding-top: clamp(12px, 1.6vw, 18px);
  }
}

/* Private courses (EN + 中文) desktop only: modestly tighten gaps above and
   below the 6-photo row (chips → photos → session blurb). Mobile uses its
   own photo-row spacing and stays unchanged. Uses body.private-features
   (EN privatecourses + 中文 our-courses only). */
@media (min-width: 641px) {
  /* Private courses + exam prep: remove only the separator below the final numbered row. */
  body.private-features.site-flat main > section.no-section-rule + section,
  body.examprep-page.site-flat main > section.no-section-rule + section {
    border-top: 0;
  }

  body.private-features.site-flat main > section.page-hero {
    padding-bottom: 14px; /* was 28px via site-flat page-hero */
  }
  body.private-features.site-flat main > section:has(.photo-row) {
    padding-top: 14px; /* was clamp(22px, 3.2vw, 36px) ≈ 36px desktop */
    padding-bottom: 14px;
  }
  body.private-features.site-flat main > section:has(.photo-row) + section {
    padding-top: 14px; /* was clamp(22px, 3.2vw, 36px) ≈ 36px desktop */
  }
  /* Trim blurb card inset so chips→photos→copy air matches nearby Soft White rhythm */
  body.private-features.site-flat main > section.session-blurb-section .session-blurb {
    padding-top: 8px; /* was clamp(8px, 1.5vw, 16px) ≈ 16px via .glass.copy */
  }

  /* After removing the former rule below the last feature pair, close the
     now-empty section-to-CTA gap. Keep the CTA's own 44px button lead-in. */
  body.private-features.site-flat main > section.no-section-rule,
  body.examprep-page.site-flat main > section.no-section-rule:not(.exam-logos-section) {
    padding-bottom: 14px; /* was clamp(22px, 3.2vw, 36px) */
  }
  body.private-features.site-flat main > section.no-section-rule + section,
  body.examprep-page.site-flat main > section.no-section-rule + section {
    padding-top: 14px; /* was clamp(22px, 3.2vw, 36px) */
  }
}

/* Private courses + Exam prep (EN + 中文) desktop only: reduce vertical gaps
   between numbered feature row-pairs (1-2→3-4, 3-4→5-6, …). Mobile unchanged.
   Does not touch photo-row tighten or blurb→first-row air. */
@media (min-width: 641px) {
  body.private-features.site-flat main .grid-2,
  body.examprep-page.site-flat main .grid-2 {
    row-gap: clamp(20px, 2.4vw, 30px); /* was clamp(36px, 4.5vw, 56px) @641+; clamp(28px, 3.5vw, 44px) @1101+ */
  }

  body.private-features.site-flat main .grid-2 > .feature:nth-child(n + 3),
  body.private-features.site-flat main .grid-2 > article.feature:nth-child(n + 3),
  body.examprep-page.site-flat main .grid-2 > .feature:nth-child(n + 3),
  body.examprep-page.site-flat main .grid-2 > article.feature:nth-child(n + 3) {
    padding-top: clamp(12px, 1.6vw, 18px); /* was clamp(28px, 3.2vw, 40px) @641+; clamp(22px, 2.6vw, 32px) @1101+ */
  }

  body.private-features.site-flat main .grid-2 > .feature:nth-child(n + 3)::before,
  body.private-features.site-flat main .grid-2 > article.feature:nth-child(n + 3)::before,
  body.examprep-page.site-flat main .grid-2 > .feature:nth-child(n + 3)::before,
  body.examprep-page.site-flat main .grid-2 > article.feature:nth-child(n + 3)::before {
    top: clamp(12px, 1.6vw, 18px);
  }
}

/* Fix 1 — Teacher Mike EN+中文: Soft White is rule-free around photo/bio.
   Drop leftover section hairlines; keep existing section padding/gaps. */
body.teacher-mike-page.site-flat main > section + section {
  border-top: 0;
}

/* Teacher Mike photo: reduce the whitespace immediately above and below the
   portrait on desktop only; mobile spacing remains unchanged. */
@media (min-width: 641px) {
  body.teacher-mike-page.site-flat main > section:has(.photo-frame) {
    padding-top: 14px;
    padding-bottom: 14px;
  }
  body.teacher-mike-page.site-flat main > section:has(.photo-frame) + section {
    padding-top: 14px;
  }
}
/* Soft White: more air above bottom Call / WhatsApp CTAs only
   (href to contactus / contactus-ch). Mid-page lobby CTAs unchanged. */
body.site-flat main .btn-row:has(a[href*="contactus"]),
body.lobby-flat main .btn-row:has(a[href*="contactus"]) {
  margin-top: 44px; /* was 22px; Mike asked for more space above */
  margin-bottom: 16px;
}



/* More air under black number boxes (was flush/tight under .feature-num margin:0) */
body.lobby-flat main .feature .feature-num,
body.site-flat main .feature .feature-num,
body.private-features main .feature .feature-num {
  margin: 0 0 0.75rem !important;
}



/* === Soft White mobile spacing polish (1 Oct 2026 audit) === */
@media (max-width: 640px) {
  /* 1) Numbered features: one gap token; less cathedral stack */
  body.lobby-flat main .grid-2,
  body.site-flat main .grid-2 {
    row-gap: 0;
  }
  body.lobby-flat main .grid-2 > .feature + .feature,
  body.site-flat main .grid-2 > .feature + .feature,
  body.lobby-flat main .grid-2 > article.feature + article.feature,
  body.site-flat main .grid-2 > article.feature + article.feature {
    padding-top: 28px !important;
    margin-top: 0 !important;
  }
  body.lobby-flat main .grid-2 > .feature + .feature::before,
  body.site-flat main .grid-2 > .feature + .feature::before,
  body.lobby-flat main .grid-2 > article.feature + article.feature::before,
  body.site-flat main .grid-2 > article.feature + article.feature::before {
    top: 28px !important;
  }
  body.lobby-flat main .grid-2 > .feature:first-child,
  body.site-flat main .grid-2 > .feature:first-child,
  body.lobby-flat main .grid-2 > article.feature:first-child,
  body.site-flat main .grid-2 > article.feature:first-child {
    padding-top: 22px !important;
  }
  body.lobby-flat main .grid-2 > .feature:first-child::before,
  body.site-flat main .grid-2 > .feature:first-child::before,
  body.lobby-flat main .grid-2 > article.feature:first-child::before,
  body.site-flat main .grid-2 > article.feature:first-child::before {
    top: 22px !important;
  }
  body.examprep-page main .grid-2 > .feature:first-child,
  body.examprep-page main .grid-2 > article.feature:first-child {
    padding-top: 18px !important;
  }
  body.examprep-page main .grid-2 > .feature:first-child::before,
  body.examprep-page main .grid-2 > article.feature:first-child::before {
    top: 18px !important;
  }

  /* 2) Ghost gaps at no-rule joins: single shared gap */
  body.site-flat main > section.no-section-rule,
  body.lobby-flat main > section.no-section-rule {
    padding-top: 22px;
  }
  body.site-flat main > section:has(.photo-row) {
    padding-bottom: 14px;
  }
  body.site-flat main > section:has(.photo-row) + section {
    padding-top: 14px;
  }
  body.site-flat.bullets-deep main > section.page-hero:has(+ section.session-blurb-section) {
    padding-bottom: 14px;
  }
  body.site-flat.bullets-deep main > section.page-hero + section.session-blurb-section {
    padding-top: 14px;
  }
  body.site-flat:has(.gallery-certs) main > section.no-section-rule {
    padding-top: 18px;
  }
  body.teacher-mike-page.site-flat main > section + section {
    padding-top: 18px;
  }
  body.lobby-flat main > section:has(.crop-left) + section:has(.crop-mike) {
    padding-top: 16px;
  }

  /* 3) Long bullet lists ~15–20% tighter */
  body.bullets-deep main .copy ul.skill-blocks {
    gap: 0.8rem;
  }
  body.bullets-deep main .copy ul:not(.skill-blocks) > li {
    margin-bottom: 0.32em;
  }
  body.bullets-deep main .copy ul:not(.skill-blocks) > li:last-child {
    margin-bottom: 0;
  }
  body.site-flat main .copy ul li + li,
  body.lobby-flat main .copy ul li + li {
    margin-top: 0.35em;
  }

  /* 4) Student Feedback: trim card-to-card another ~12% on mobile */
  body.lobby-flat main .feedback-card + .feedback-card,
  body.site-flat main .feedback-card + .feedback-card {
    margin-top: clamp(8px, 1.4vw, 12px) !important;
    padding-top: clamp(16px, 2.1vw, 24px) !important;
  }
  body.lobby-flat main .feedback-card + .feedback-card::before,
  body.site-flat main .feedback-card + .feedback-card::before {
    top: clamp(16px, 2.1vw, 24px) !important;
  }

  /* 5) Contact clusters tighter */
  body.page-contact main .contact-block,
  body.site-flat.page-contact main .contact-block {
    /* The grid gap supplies the base rhythm; keep the content-to-hairline gap compact. */
    margin-bottom: 0.5rem;
  }
  body.site-flat .site-footer--copy-only .footer-legal,
  body.lobby-flat .site-footer--copy-only .footer-legal {
    padding-top: clamp(16px, 3vw, 22px);
    padding-bottom: clamp(16px, 3vw, 22px);
  }
  body.site-flat main .contact-block:last-child {
    margin-bottom: 0.35rem;
  }

  /* 6) Mobile page heroes site-wide: 45px under sticky header (Mike locked) */
  body.lobby-flat main > section.page-hero,
  body.site-flat main > section.page-hero {
    padding: 45px 0 22px !important;
  }
  body.lobby-flat main > section.page-hero .glass,
  body.site-flat main > section.page-hero .glass {
    padding-top: 0 !important;
  }

  /* 9) Mobile display H1 leading slightly opener */
  body.lobby-flat main h1,
  body.site-flat main h1,
  body.lobby-flat main .page-hero h1,
  body.site-flat main .page-hero h1 {
    line-height: 1.22;
  }

  /* Course-page closing CTA: keep 44px above (suggestion 7 — leave alone) */
}

@media (max-width: 640px) {
  /* 5b) Contact page hairline sections: less air above/below rules */
  body.page-contact.site-flat main .contact-block + .contact-block,
  body.page-contact main .contact-block + .contact-block {
    padding-top: clamp(16px, 3.2vw, 22px);
  }
  /* Course-page address footer: less empty beige above copyright */
  body.site-flat .site-footer,
  body.lobby-flat .site-footer {
    padding-top: clamp(28px, 4vw, 40px);
  }
  body.site-flat .footer-legal,
  body.lobby-flat .footer-legal {
    margin-top: clamp(20px, 3vw, 28px);
    padding-top: clamp(16px, 2.8vw, 22px);
    padding-bottom: clamp(16px, 2.8vw, 22px);
  }
}

/* Lobby Soft White: reduce the mobile gap from the section hairline to the first feature heading. */
@media (max-width: 640px) {
  body.lobby-flat main > section:has(.grid-2 > article.feature:first-child h3) {
    padding-top: 8px;
  }
}

/* Contact mobile only: photo top gap between original and too-tight. Desktop unchanged. */
@media (max-width: 640px) {
  body.page-contact.site-flat main > section.page-hero {
    padding-bottom: 4px !important;
  }

  body.page-contact.site-flat main > section.page-hero .glass {
    padding-bottom: 0 !important;
  }

  body.page-contact.site-flat main > section.page-hero + section {
    padding-top: 22px;
  }
}

/* Cambridge success block: no flat-layout hairlines at its joins. */
body.site-flat main > section.page-hero + section.cambridge-success-section,
body.site-flat main > section.cambridge-success-section,
body.site-flat main > section.cambridge-success-section + section.session-blurb-section {
  border-top: 0;
}
body.site-flat.bullets-deep main > section.page-hero:has(+ section.cambridge-success-section + section.session-blurb-section) {
  padding-bottom: 14px;
}
body.site-flat.bullets-deep main > section.page-hero + section.cambridge-success-section + section.session-blurb-section {
  padding-top: 14px;
}

/* Cambridge EN+ZH Soft White: desktop only — tighten gap under success photos before blurb. */
@media (min-width: 641px) {
  body.site-flat main > section.cambridge-success-section {
    padding-bottom: 14px; /* was clamp(22px, 3.2vw, 36px) via site-flat section */
  }
}

/* Teacher Mike Chinese bio underlines */
.teacher-mike-page .glass.copy u {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

/* Private courses: modestly trim the mobile air before feature #1 only. */
@media (max-width: 640px) {
  body.private-features.site-flat main > section.no-section-rule {
    padding-top: clamp(14px, 3.5vw, 22px);
  }
}

/* Interview EN + 中文: modest extra air above the closing paragraph
   that follows the “What is covered” / 課程內容 list. Desktop only.
   padding-top (not margin-top) so it does not collapse with the list margin. */
@media (min-width: 641px) {
  body.site-flat main .copy p.interview-after-covered {
    padding-top: 1rem;
  }
}

/* Soft White desktop: Speech page h1 on one line (long EN title).
   Hide the intentional mobile <br>; slightly tighter type so nowrap fits ~1160 wrap. */
@media (min-width: 1101px) {
  body.page-speech.site-flat main .page-hero h1 br {
    display: none;
  }
  body.page-speech.site-flat main .page-hero h1 {
    white-space: nowrap;
    max-width: none;
    font-size: clamp(2.35rem, 2.15vw + 0.85rem, 2.75rem);
    letter-spacing: -0.028em;
  }
}

/* Soft White Pre-Primary (EN + 繁 + 简): close excess air above/below the
   bottom Call / WhatsApp CTA. Scoped to body.preprimary-page so other Soft
   White course pages keep the shared 44px CTA lead-in. Keeps a clear gap
   from the feature grid (14px section pad + 22px btn lead-in). */
body.preprimary-page.site-flat main > section.no-section-rule {
  padding-bottom: 14px; /* was clamp(22px, 3.2vw, 36px) */
}
body.preprimary-page.site-flat main > section.no-section-rule + section {
  border-top: 0;
  padding-top: 14px; /* was clamp(22px, 3.2vw, 36px) */
  padding-bottom: 14px; /* was clamp(22px, 3.2vw, 36px) */
}
body.preprimary-page.site-flat main > section.no-section-rule + section .glass.copy,
body.preprimary-page.site-flat main > section.no-section-rule + section .copy {
  padding-top: 0; /* was clamp(8px, 1.5vw, 16px) */
  padding-bottom: 0;
}
body.preprimary-page.site-flat main .btn-row:has(a[href*="contactus"]) {
  margin-top: 22px; /* was 44px Soft White contact CTA lead-in */
  margin-bottom: 0; /* was 16px */
}

/* === Teacher Mike dark glass single-page overrides === */
html { scroll-behavior: smooth; }

body.tm-dark {
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(80, 120, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 88% 8%, rgba(212, 181, 106, 0.1), transparent 50%),
    radial-gradient(800px 700px at 50% 100%, rgba(40, 80, 180, 0.12), transparent 55%),
    var(--canvas);
  color: var(--ink);
}

body.tm-dark .site-header {
  background: var(--header);
  border-bottom: 1px solid var(--line);
}

body.tm-dark .brand {
  color: var(--ink);
  letter-spacing: 0.04em;
  font-size: clamp(0.78rem, 1.4vw, 0.92rem);
}

body.tm-dark .nav-item {
  color: var(--muted);
}

body.tm-dark .nav-item:hover,
body.tm-dark .nav-item.active {
  color: var(--ink);
}

body.tm-dark .nav-toggle span,
body.tm-dark .nav-toggle span::before,
body.tm-dark .nav-toggle span::after {
  background: var(--ink);
}

body.tm-dark .page-hero {
  padding: clamp(56px, 10vw, 104px) 0 28px;
}

body.tm-dark .page-hero .glass {
  background: var(--glass);
  backdrop-filter: blur(32px) saturate(1.4);
  -webkit-backdrop-filter: blur(32px) saturate(1.4);
  border: 1px solid var(--line);
  box-shadow: var(--glow);
  border-radius: 22px;
  padding: clamp(28px, 4vw, 48px);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, background 0.35s ease;
}

body.tm-dark .page-hero h1 {
  max-width: 18ch;
  color: #fff;
}

body.tm-dark .page-hero .lede {
  color: var(--muted);
  max-width: 52ch;
  font-size: clamp(1.05rem, 2.1vw, 1.22rem);
}

body.tm-dark .kicker {
  color: var(--accent);
  letter-spacing: 0.14em;
}

body.tm-dark main .glass,
body.tm-dark main .feedback-card {
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

body.tm-dark main .glass:hover,
body.tm-dark main .feedback-card:hover {
  background: var(--glass-hover);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--glow);
  transform: translateY(-4px);
}

body.tm-dark .photo-frame {
  overflow: hidden;
  padding: 0;
  border-radius: 22px;
}

body.tm-dark .photo-frame img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  object-position: center top;
  border-radius: 22px;
}

body.tm-dark .mike-story .copy {
  padding: clamp(28px, 4vw, 44px);
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(242, 244, 248, 0.9);
}

body.tm-dark .btn {
  border-radius: 999px;
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

body.tm-dark .btn:hover {
  transform: translateY(-2px);
}

body.tm-dark .btn-primary {
  background: linear-gradient(135deg, #6ea8ff, #3d6fe0);
  color: #fff;
  border: 0;
  box-shadow: 0 10px 28px rgba(61, 111, 224, 0.35);
}

body.tm-dark .btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

body.tm-dark .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

body.tm-dark .section-label {
  margin: clamp(48px, 8vw, 88px) 0 20px;
}

body.tm-dark .feedback-stack {
  display: grid;
  gap: 20px;
  padding-bottom: clamp(56px, 8vw, 96px);
}

body.tm-dark .feedback-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 28px;
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(1.35);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  position: relative;
}

body.tm-dark .feedback-card img {
  border-radius: 14px;
  width: 140px;
  height: 140px;
  object-fit: cover;
}

body.tm-dark .feedback-card .quote {
  color: rgba(242, 244, 248, 0.88);
  font-size: 1.02rem;
  line-height: 1.7;
  margin: 0;
}

body.tm-dark .feedback-card .who {
  color: var(--muted);
}

body.tm-dark .feedback-card .who strong {
  color: #fff;
}

body.tm-dark .site-footer {
  background: transparent;
  border-top: 1px solid var(--line);
  margin-top: 0;
}

body.tm-dark .site-footer .glass {
  background: var(--glass);
  border-radius: 20px;
}

body.tm-dark .site-footer h3 {
  color: #fff;
}

body.tm-dark .site-footer p,
body.tm-dark .site-footer a {
  color: var(--muted);
}

body.tm-dark .site-footer a:hover {
  color: var(--blue);
}

body.tm-dark .footer-legal {
  border: 0;
  background: transparent;
}

body.tm-dark .footer-copy {
  color: rgba(154, 163, 178, 0.7);
}

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-reveal="late"] { transition-delay: 0.08s; }
[data-reveal="later"] { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  body.tm-dark main .glass:hover,
  body.tm-dark main .feedback-card:hover,
  body.tm-dark .btn:hover {
    transform: none;
  }
}

@media (max-width: 900px) {
  body.tm-dark .feedback-card {
    grid-template-columns: 1fr;
  }
  body.tm-dark .feedback-card img {
    width: 112px;
    height: 112px;
  }
  body.tm-dark .mike-split {
    display: grid !important;
    gap: 18px !important;
  }
}

body.tm-dark .mike-split {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(280px, 1.2fr);
  gap: 22px;
  align-items: stretch;
}

body.tm-dark .contact-pill {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 8px;
}

body.tm-dark .contact-pill a {
  color: var(--blue);
  text-decoration: none;
}

body.tm-dark .contact-pill a:hover {
  color: var(--blue-deep);
  text-decoration: underline;
}

/* Undo Soft White studentfeedback absolute photo layout on this single page */
body.tm-dark.page-studentfeedback.site-flat main .feedback-card,
body.tm-dark main .feedback-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  padding: var(--box-pad);
  min-height: 0;
  padding-left: var(--box-pad);
}

body.tm-dark main .feedback-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.tm-dark main .feedback-meta img {
  position: static;
  left: auto;
  top: auto;
}

@media (max-width: 900px) {
  body.tm-dark main .feedback-card {
    grid-template-columns: 1fr;
  }
}

/* === Layout fix: margins, balance, no photo crop (15 Oct 2026) === */
body.tm-dark .wrap {
  width: min(1080px, calc(100% - clamp(32px, 6vw, 80px)));
  margin-left: auto;
  margin-right: auto;
}

body.tm-dark .header-inner {
  width: min(1080px, calc(100% - clamp(32px, 6vw, 80px)));
}

body.tm-dark main > section {
  margin: 0;
  padding: clamp(20px, 3.5vw, 40px) 0;
}

body.tm-dark .page-hero {
  padding-top: clamp(40px, 7vw, 72px);
  padding-bottom: clamp(12px, 2vw, 24px);
}

/* Mike banner: full frame, never cropped */
body.tm-dark .photo-frame,
body.tm-dark .mike-photo,
body.tm-dark.site-flat main .glass.photo-frame,
body.tm-dark.site-flat main .photo-frame {
  overflow: visible;
  padding: clamp(12px, 2vw, 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass);
  border-radius: 22px;
}

body.tm-dark .photo-frame img,
body.tm-dark .mike-photo img,
body.tm-dark.site-flat main .photo-frame img,
body.tm-dark.site-flat main .glass.photo-frame img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center center;
  border-radius: 12px;
  display: block;
}

body.tm-dark .mike-copy-wrap {
  margin-top: clamp(16px, 2.5vw, 28px);
}

body.tm-dark .mike-story .copy {
  padding: clamp(28px, 4vw, 44px);
  max-width: none;
}

/* Feedback portraits: square assets, contain so nothing clips */
body.tm-dark .feedback-card,
body.tm-dark.page-studentfeedback.site-flat main .feedback-card,
body.tm-dark main .feedback-card {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 32px);
  align-items: start;
  padding: clamp(24px, 3.5vw, 40px);
}

body.tm-dark .feedback-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  min-width: 0;
}

body.tm-dark .feedback-card img,
body.tm-dark .feedback-meta img,
body.tm-dark.site-flat main .feedback-card img,
body.tm-dark.page-studentfeedback.site-flat main .feedback-meta img {
  width: 100%;
  max-width: 160px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  position: static !important;
  left: auto !important;
  top: auto !important;
}

body.tm-dark .feedback-stack {
  gap: clamp(18px, 2.5vw, 28px);
  padding-bottom: clamp(64px, 9vw, 112px);
}

body.tm-dark .section-label {
  margin: clamp(24px, 4vw, 48px) 0 clamp(16px, 2vw, 24px);
  padding: clamp(28px, 4vw, 44px);
}

body.tm-dark #contact .wrap {
  padding-bottom: clamp(56px, 8vw, 96px);
}

@media (max-width: 900px) {
  body.tm-dark .feedback-card,
  body.tm-dark main .feedback-card {
    grid-template-columns: 1fr;
  }
  body.tm-dark .feedback-card img,
  body.tm-dark .feedback-meta img {
    max-width: 140px;
  }
}

/* === URGENT mobile-first layout (15 Oct 2026) === */
body.tm-dark.tm-mobile-fix {
  overflow-x: hidden;
}

body.tm-dark.tm-mobile-fix .wrap,
body.tm-dark.tm-mobile-fix .header-inner {
  width: min(960px, calc(100% - 56px)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box;
}

body.tm-dark.tm-mobile-fix .header-inner {
  min-height: 56px;
  gap: 16px;
}

body.tm-dark.tm-mobile-fix main > section {
  padding: 20px 0 !important;
}

body.tm-dark.tm-mobile-fix .page-hero {
  padding: 28px 0 12px !important;
}

body.tm-dark.tm-mobile-fix .page-hero .glass {
  padding: 24px 22px !important;
  border-radius: 18px !important;
}

body.tm-dark.tm-mobile-fix .page-hero h1 {
  max-width: none !important;
  font-size: clamp(2rem, 9vw, 2.6rem) !important;
}

body.tm-dark.tm-mobile-fix .page-hero .lede,
body.tm-dark.tm-mobile-fix .section-label .lede {
  max-width: none !important;
  font-size: 1.05rem !important;
  line-height: 1.6 !important;
}

/* Portrait card: hug the image, no empty void */
body.tm-dark.tm-mobile-fix .mike-photo,
body.tm-dark.tm-mobile-fix .photo-frame.mike-photo {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  align-self: start !important;
  padding: 14px !important;
  overflow: visible !important;
  border-radius: 18px !important;
}

body.tm-dark.tm-mobile-fix .mike-photo img,
body.tm-dark.tm-mobile-fix .photo-frame.mike-photo img,
body.tm-dark.tm-mobile-fix.site-flat main .mike-photo img {
  display: block !important;
  width: 100% !important;
  max-width: 520px !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  object-position: center center !important;
  border-radius: 12px !important;
  position: static !important;
  inset: auto !important;
  transform: none !important;
}

body.tm-dark.tm-mobile-fix .mike-copy-wrap {
  margin-top: 16px !important;
}

body.tm-dark.tm-mobile-fix .mike-story .copy {
  padding: 22px !important;
  border-radius: 18px !important;
}

body.tm-dark.tm-mobile-fix .mike-story .copy p {
  margin: 0 0 1.55em;
  font-size: 1.02rem;
  line-height: 1.7;
}

body.tm-dark.tm-mobile-fix .mike-story .copy p:last-of-type {
  margin-bottom: 0;
}

/* Kill any leftover two-column story layout */
body.tm-dark.tm-mobile-fix .mike-split {
  display: block !important;
  grid-template-columns: none !important;
}

/* Feedback: ALWAYS stack on small/medium phones and tablets in portrait */
body.tm-dark.tm-mobile-fix .feedback-stack {
  display: grid !important;
  gap: 16px !important;
  padding-bottom: 56px !important;
}

body.tm-dark.tm-mobile-fix .feedback-card,
body.tm-dark.tm-mobile-fix.page-studentfeedback.site-flat main .feedback-card,
body.tm-dark.tm-mobile-fix main .feedback-card {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: none !important;
  gap: 14px !important;
  padding: 20px !important;
  min-height: 0 !important;
  padding-left: 20px !important;
  border-radius: 18px !important;
  align-items: stretch !important;
}

body.tm-dark.tm-mobile-fix main .feedback-meta {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  width: 100% !important;
}

body.tm-dark.tm-mobile-fix .feedback-card img,
body.tm-dark.tm-mobile-fix .feedback-meta img,
body.tm-dark.tm-mobile-fix.site-flat main .feedback-card img,
body.tm-dark.tm-mobile-fix.page-studentfeedback.site-flat main .feedback-meta img {
  width: min(160px, 42vw) !important;
  max-width: 160px !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  object-position: center center !important;
  border-radius: 12px !important;
  position: static !important;
  left: auto !important;
  top: auto !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
}

body.tm-dark.tm-mobile-fix .feedback-card .quote {
  font-size: 0.98rem !important;
  line-height: 1.65 !important;
}

body.tm-dark.tm-mobile-fix .feedback-card .who {
  font-size: 0.9rem !important;
}

body.tm-dark.tm-mobile-fix .section-label {
  margin: 12px 0 14px !important;
  padding: 22px !important;
  border-radius: 18px !important;
}

body.tm-dark.tm-mobile-fix #contact .glass {
  padding: 22px !important;
  border-radius: 18px !important;
}

body.tm-dark.tm-mobile-fix .btn-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

body.tm-dark.tm-mobile-fix .btn-row .btn {
  width: 100%;
  text-align: center;
  justify-content: center;
}

body.tm-dark.tm-mobile-fix .contact-pill {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

/* Desktop: keep single-column story (portrait + bio), wider feedback with photo beside quote */
@media (min-width: 901px) {
  body.tm-dark.tm-mobile-fix .wrap,
  body.tm-dark.tm-mobile-fix .header-inner {
    width: min(1000px, calc(100% - 80px)) !important;
  }

  body.tm-dark.tm-mobile-fix .page-hero .glass,
  body.tm-dark.tm-mobile-fix .section-label,
  body.tm-dark.tm-mobile-fix .mike-story .copy,
  body.tm-dark.tm-mobile-fix #contact .glass {
    padding: 36px 40px !important;
  }

  body.tm-dark.tm-mobile-fix .mike-photo img {
    max-width: 420px !important;
  }

  body.tm-dark.tm-mobile-fix .btn-row {
    flex-direction: row;
    flex-wrap: wrap;
  }

  body.tm-dark.tm-mobile-fix .btn-row .btn {
    width: auto;
  }

  body.tm-dark.tm-mobile-fix .contact-pill {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px 20px;
  }

  body.tm-dark.tm-mobile-fix .feedback-card,
  body.tm-dark.tm-mobile-fix.page-studentfeedback.site-flat main .feedback-card,
  body.tm-dark.tm-mobile-fix main .feedback-card {
    display: grid !important;
    grid-template-columns: 160px minmax(0, 1fr) !important;
    gap: 28px !important;
    padding: 32px 36px !important;
  }

  body.tm-dark.tm-mobile-fix .feedback-card img,
  body.tm-dark.tm-mobile-fix .feedback-meta img {
    width: 160px !important;
    max-width: 160px !important;
  }
}

/* Lobby text blocks on Teacher Mike */
body.tm-dark.tm-mobile-fix .lobby-block {
  padding: 22px !important;
  border-radius: 18px !important;
}

body.tm-dark.tm-mobile-fix .lobby-block h2 {
  color: #fff;
  font-size: clamp(1.45rem, 5.5vw, 1.9rem);
  margin: 0 0 0.75rem;
  max-width: 22ch;
}

body.tm-dark.tm-mobile-fix .lobby-block p {
  color: rgba(242, 244, 248, 0.9);
  font-size: 1.02rem;
  line-height: 1.7;
  margin: 0 0 1.55em;
}

body.tm-dark.tm-mobile-fix .lobby-block p:last-of-type {
  margin-bottom: 0;
}

body.tm-dark.tm-mobile-fix .lobby-block .btn-row {
  margin-top: 1.1rem;
}

body.tm-dark.tm-mobile-fix .lobby-mike,
body.tm-dark.tm-mobile-fix .lobby-approach {
  padding: 12px 0 !important;
}

@media (min-width: 901px) {
  body.tm-dark.tm-mobile-fix .lobby-block {
    padding: 36px 40px !important;
  }
  body.tm-dark.tm-mobile-fix .lobby-block h2 {
    max-width: 28ch;
  }
}


/* Clear paragraph gaps in stacked About / body glass copy */
body.tm-dark.tm-mobile-fix main .glass.copy p + p,
body.tm-dark.tm-mobile-fix main .lobby-block p + p,
body.tm-dark.tm-mobile-fix main .section-label p + p,
body.tm-dark.tm-mobile-fix #contact .glass p + p {
  margin-top: 0;
}

body.tm-dark.tm-mobile-fix main .glass.copy p,
body.tm-dark.tm-mobile-fix main .lobby-block p,
body.tm-dark.tm-mobile-fix main .section-label .lede,
body.tm-dark.tm-mobile-fix #contact .glass p {
  margin-bottom: 1.55em !important;
}

body.tm-dark.tm-mobile-fix main .glass.copy p:last-of-type,
body.tm-dark.tm-mobile-fix main .lobby-block p:last-of-type,
body.tm-dark.tm-mobile-fix #contact .glass p:last-of-type {
  margin-bottom: 0 !important;
}

body.tm-dark.tm-mobile-fix main .glass.copy .btn-row,
body.tm-dark.tm-mobile-fix main .lobby-block .btn-row {
  margin-top: 1.5rem !important;
}

body.tm-dark.tm-mobile-fix main .lobby-block h2 {
  margin-bottom: 1rem !important;
}


/* === Designer polish: type rhythm, glass, mobile (15 Oct 2026) === */
body.tm-dark.tm-mobile-fix .page-hero .kicker {
  margin: 0 0 0.55rem;
  letter-spacing: 0.16em;
}

body.tm-dark.tm-mobile-fix .page-hero h1 {
  margin: 0 0 0.85rem;
}

body.tm-dark.tm-mobile-fix .page-hero .lede {
  margin: 0 0 0 !important;
}

body.tm-dark.tm-mobile-fix .page-hero .btn-row {
  margin-top: 1.35rem !important;
}

body.tm-dark.tm-mobile-fix .mike-copy-wrap {
  margin-top: 18px !important;
}

body.tm-dark.tm-mobile-fix .lobby-block h2,
body.tm-dark.tm-mobile-fix .mike-story .copy h2 {
  margin: 0 0 1.15rem !important;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

/* Paragraph stack: visible breath between blocks */
body.tm-dark.tm-mobile-fix main .mike-story .copy p,
body.tm-dark.tm-mobile-fix main .glass.copy p,
body.tm-dark.tm-mobile-fix main .lobby-block p {
  margin-top: 0 !important;
  margin-bottom: 1.55em !important;
}

body.tm-dark.tm-mobile-fix main .mike-story .copy p:last-of-type,
body.tm-dark.tm-mobile-fix main .glass.copy p:last-of-type,
body.tm-dark.tm-mobile-fix main .lobby-block p:last-of-type {
  margin-bottom: 0 !important;
}

body.tm-dark.tm-mobile-fix .section-label .kicker {
  margin: 0 0 0.5rem;
}

body.tm-dark.tm-mobile-fix .section-label h2 {
  margin: 0 0 0.85rem;
  color: #fff;
}

body.tm-dark.tm-mobile-fix .section-label .lede {
  margin: 0 !important;
}

body.tm-dark.tm-mobile-fix .feedback-card .quote {
  margin: 0 !important;
}

body.tm-dark.tm-mobile-fix .feedback-card .who {
  margin: 0;
}

body.tm-dark.tm-mobile-fix .feedback-card .who strong {
  margin-bottom: 0.25em;
}

body.tm-dark.tm-mobile-fix #contact .kicker {
  margin: 0 0 0.5rem;
}

body.tm-dark.tm-mobile-fix #contact h2 {
  margin: 0 0 0.75rem;
  color: #fff;
}

body.tm-dark.tm-mobile-fix #contact .lede {
  margin: 0 0 0.25rem !important;
}

body.tm-dark.tm-mobile-fix .footer-legal {
  padding: 28px 0 36px;
}

body.tm-dark.tm-mobile-fix .footer-copy {
  text-align: center;
  line-height: 1.5;
  margin: 0;
}

/* === About flow: lobby photos interleaved between paragraphs === */
body.tm-dark.tm-mobile-fix .about-flow {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 18px;
  padding-bottom: 8px;
}

body.tm-dark.tm-mobile-fix .about-copy {
  margin: 0;
}

body.tm-dark.tm-mobile-fix .about-copy--cta {
  padding-top: 20px !important;
  padding-bottom: 20px !important;
}

body.tm-dark.tm-mobile-fix .about-copy--cta .btn-row {
  margin-top: 0 !important;
}

body.tm-dark.tm-mobile-fix .about-shot {
  margin: 0;
  padding: 12px !important;
  border-radius: 18px !important;
  overflow: visible !important;
  display: block;
  height: auto !important;
  min-height: 0 !important;
}

body.tm-dark.tm-mobile-fix .about-shot img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center center !important;
  border-radius: 12px;
  margin: 0 auto;
  position: static !important;
  inset: auto !important;
  transform: none !important;
}

/* Square-ish portraits: keep them from dominating on large screens */
body.tm-dark.tm-mobile-fix .about-shot:not(.about-shot--wide) img {
  max-width: min(100%, 520px);
}

body.tm-dark.tm-mobile-fix .about-shot--wide img {
  max-width: min(100%, 720px);
}

body.tm-dark.tm-mobile-fix .about-shot-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  body.tm-dark.tm-mobile-fix .about-shot-pair {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  body.tm-dark.tm-mobile-fix .about-shot-pair .about-shot {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  body.tm-dark.tm-mobile-fix .about-shot-pair .about-shot img {
    max-width: 100%;
  }
}

@media (min-width: 901px) {
  body.tm-dark.tm-mobile-fix .about-flow {
    gap: 22px;
    margin-top: 22px;
  }

  body.tm-dark.tm-mobile-fix .about-shot {
    padding: 16px !important;
  }
}

/* === One About box, rounder corners, two-up mobile, no photo frames === */
body.tm-dark.tm-mobile-fix .glass,
body.tm-dark.tm-mobile-fix .feedback-card,
body.tm-dark.tm-mobile-fix .page-hero .glass,
body.tm-dark.tm-mobile-fix .section-label,
body.tm-dark.tm-mobile-fix .about-box,
body.tm-dark.tm-mobile-fix .lobby-block {
  border-radius: 28px !important;
}

body.tm-dark.tm-mobile-fix .about-flow {
  margin-top: 18px;
  gap: 0;
}

body.tm-dark.tm-mobile-fix .about-box {
  padding: 22px !important;
}

body.tm-dark.tm-mobile-fix .about-lead-photo {
  margin: 0 0 1.25rem;
}

body.tm-dark.tm-mobile-fix .about-lead-photo img,
body.tm-dark.tm-mobile-fix .about-inline-pair img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center center;
  border-radius: 22px;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

body.tm-dark.tm-mobile-fix .about-lead-photo img {
  max-width: min(100%, 360px);
  margin-left: auto;
  margin-right: auto;
}

/* Two-up on mobile (and up): no glass frames around photos */
body.tm-dark.tm-mobile-fix .about-inline-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 1.35em 0 1.55em;
  align-items: center;
}

body.tm-dark.tm-mobile-fix .about-inline-pair img {
  width: 100%;
  border-radius: 20px;
}

/* Kill leftover framed about-shot / photo-frame look inside About */
body.tm-dark.tm-mobile-fix .about-box .photo-frame,
body.tm-dark.tm-mobile-fix .about-box .about-shot {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.tm-dark.tm-mobile-fix .feedback-card img,
body.tm-dark.tm-mobile-fix .feedback-meta img {
  border-radius: 20px !important;
}

@media (min-width: 901px) {
  body.tm-dark.tm-mobile-fix .about-box {
    padding: 40px 44px !important;
  }

  body.tm-dark.tm-mobile-fix .about-inline-pair {
    gap: 18px;
    margin: 1.55em 0 1.75em;
  }

  body.tm-dark.tm-mobile-fix .about-lead-photo img {
    max-width: 320px;
  }

  body.tm-dark.tm-mobile-fix .glass,
  body.tm-dark.tm-mobile-fix .feedback-card,
  body.tm-dark.tm-mobile-fix .about-box {
    border-radius: 32px !important;
  }

  body.tm-dark.tm-mobile-fix .about-lead-photo img,
  body.tm-dark.tm-mobile-fix .about-inline-pair img {
    border-radius: 24px;
  }
}

/* Full-width single photo rows in About (one picture per row) */
body.tm-dark.tm-mobile-fix .about-inline-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 1.35em 0 1.55em;
}

body.tm-dark.tm-mobile-fix .about-inline-stack img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center center;
  border-radius: 22px;
  margin: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

@media (min-width: 901px) {
  body.tm-dark.tm-mobile-fix .about-inline-stack {
    gap: 18px;
    margin: 1.55em 0 1.75em;
  }

  body.tm-dark.tm-mobile-fix .about-inline-stack img {
    border-radius: 24px;
    max-width: min(100%, 720px);
    margin-left: auto;
    margin-right: auto;
  }
}

/* Force reading + Padooki-shirt pair two-up on all mobile widths */
body.tm-dark.tm-mobile-fix .about-box > .about-inline-pair {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
  margin: 1.35em 0 1.55em !important;
  align-items: center;
}

body.tm-dark.tm-mobile-fix .about-box > .about-inline-pair img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  border-radius: 20px !important;
}

/* === Courses section (Soft White course pages) === */
body.tm-dark.tm-mobile-fix .course-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.1rem;
}

body.tm-dark.tm-mobile-fix .course-jump a {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

body.tm-dark.tm-mobile-fix .course-jump a:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

body.tm-dark.tm-mobile-fix .course-block {
  margin-top: 16px;
}

body.tm-dark.tm-mobile-fix .course-card {
  padding: 22px !important;
  border-radius: 28px !important;
}

body.tm-dark.tm-mobile-fix .course-title {
  color: #fff;
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

body.tm-dark.tm-mobile-fix .course-card > .lede {
  margin: 0 0 1rem !important;
}

body.tm-dark.tm-mobile-fix .course-card > .meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1.2rem;
}

body.tm-dark.tm-mobile-fix .course-card .pill {
  display: inline-flex;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
}

body.tm-dark.tm-mobile-fix .course-photos {
  display: grid;
  gap: 12px;
  margin: 0 0 1.35em;
}

body.tm-dark.tm-mobile-fix .course-photos--pair {
  grid-template-columns: 1fr 1fr;
}

body.tm-dark.tm-mobile-fix .course-photos--exams {
  grid-template-columns: 1fr;
}

body.tm-dark.tm-mobile-fix .course-photos img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
}

body.tm-dark.tm-mobile-fix .course-card > p {
  margin: 0 0 1.55em !important;
  color: rgba(242, 244, 248, 0.9);
  line-height: 1.7;
}

body.tm-dark.tm-mobile-fix .course-card > p:last-of-type {
  margin-bottom: 1.1em !important;
}

body.tm-dark.tm-mobile-fix .course-subhead {
  color: #fff;
  font-size: 1.1rem;
  margin: 0.4rem 0 0.75rem;
}

body.tm-dark.tm-mobile-fix .course-list {
  margin: 0 0 1.35em;
  padding-left: 1.15em;
  color: rgba(242, 244, 248, 0.9);
  line-height: 1.65;
}

body.tm-dark.tm-mobile-fix .course-list li + li {
  margin-top: 0.55em;
}

body.tm-dark.tm-mobile-fix .course-skills,
body.tm-dark.tm-mobile-fix .course-features {
  display: grid;
  gap: 12px;
  margin: 0 0 1.35em;
}

body.tm-dark.tm-mobile-fix .course-skill,
body.tm-dark.tm-mobile-fix .course-feature {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
}

body.tm-dark.tm-mobile-fix .course-skill h5,
body.tm-dark.tm-mobile-fix .course-feature h5 {
  margin: 0 0 0.4rem;
  color: #fff;
  font-size: 1.02rem;
}

body.tm-dark.tm-mobile-fix .course-skill p,
body.tm-dark.tm-mobile-fix .course-feature p {
  margin: 0 !important;
  color: rgba(242, 244, 248, 0.88);
  line-height: 1.65;
  font-size: 0.98rem;
}

body.tm-dark.tm-mobile-fix .course-feature .feature-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  margin-bottom: 0.45rem;
  border-radius: 999px;
  background: rgba(110, 168, 255, 0.2);
  color: var(--blue);
  font-weight: 700;
  font-size: 0.85rem;
}

body.tm-dark.tm-mobile-fix .course-close {
  margin-top: 0.4rem;
}

@media (min-width: 700px) {
  body.tm-dark.tm-mobile-fix .course-photos--exams {
    grid-template-columns: repeat(3, 1fr);
  }

  body.tm-dark.tm-mobile-fix .course-features {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 901px) {
  body.tm-dark.tm-mobile-fix .course-card {
    padding: 36px 40px !important;
    border-radius: 32px !important;
  }

  body.tm-dark.tm-mobile-fix .course-photos--pair {
    grid-template-columns: repeat(3, 1fr);
  }

  body.tm-dark.tm-mobile-fix .course-photos img {
    border-radius: 22px;
  }
}

/* Private tuition: uniform 6-up photo tiles */
body.tm-dark.tm-mobile-fix .course-photos--uniform {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 1.35em;
}

body.tm-dark.tm-mobile-fix .course-photos--uniform img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
}

/* Prefer faces / upper subjects where known */
body.tm-dark.tm-mobile-fix .course-photos--uniform img[src*="course-1"] { object-position: center 18%; }
body.tm-dark.tm-mobile-fix .course-photos--uniform img[src*="course-2"] { object-position: center 25%; }
body.tm-dark.tm-mobile-fix .course-photos--uniform img[src*="course-3"] { object-position: center 20%; }
body.tm-dark.tm-mobile-fix .course-photos--uniform img[src*="course-4"] { object-position: center 28%; }
body.tm-dark.tm-mobile-fix .course-photos--uniform img[src*="course-5"] { object-position: center 30%; }
body.tm-dark.tm-mobile-fix .course-photos--uniform img[src*="course-6"] { object-position: center 22%; }

@media (min-width: 901px) {
  body.tm-dark.tm-mobile-fix .course-photos--uniform {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  body.tm-dark.tm-mobile-fix .course-photos--uniform img {
    aspect-ratio: 4 / 3;
    border-radius: 22px;
  }
}

/* Courses hub + multi-page chrome */
body.tm-dark.tm-mobile-fix .course-hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 8px 0 48px;
}

body.tm-dark.tm-mobile-fix a.course-hub-card {
  display: block;
  padding: 22px !important;
  border-radius: 28px !important;
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s ease, background 0.35s ease, border-color 0.35s ease;
}

body.tm-dark.tm-mobile-fix a.course-hub-card:hover {
  background: var(--glass-hover);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-3px);
  color: inherit;
}

body.tm-dark.tm-mobile-fix a.course-hub-card h3 {
  margin: 0 0 0.5rem;
  color: #fff;
  font-size: 1.25rem;
}

body.tm-dark.tm-mobile-fix a.course-hub-card p {
  margin: 0 0 0.85rem !important;
  color: var(--muted);
  line-height: 1.55;
}

body.tm-dark.tm-mobile-fix .course-hub-link {
  color: var(--blue);
  font-weight: 600;
  font-size: 0.92rem;
}

body.tm-dark.tm-mobile-fix .course-crumb {
  margin: 18px 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

body.tm-dark.tm-mobile-fix .course-crumb a {
  color: var(--blue);
  text-decoration: none;
}

body.tm-dark.tm-mobile-fix .course-crumb a:hover {
  text-decoration: underline;
}

body.tm-dark.tm-mobile-fix .course-page .course-card {
  margin-bottom: 48px;
}

@media (min-width: 700px) {
  body.tm-dark.tm-mobile-fix .course-hub-grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
}

@media (min-width: 901px) {
  body.tm-dark.tm-mobile-fix .course-hub-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  body.tm-dark.tm-mobile-fix a.course-hub-card {
    padding: 28px 30px !important;
    border-radius: 32px !important;
  }
}
