/* ============================================================
   Up and Up Education · 高升教育
   Design system — editorial × futuristic × extremely clean
   ============================================================ */

:root {
  --ink:        #0b1220;
  --ink-soft:   #1a2336;
  --paper:      #fafaf6;
  --cream:      #f4efe6;
  --sand:       #ebe4d4;
  --line:       rgba(11, 18, 32, 0.08);
  --line-strong:rgba(11, 18, 32, 0.14);
  --mute:       #6a7486;
  --ink-2:      #2a3142;

  --blue:       #3cabd8;
  --blue-deep:  #1b6d96;
  --green:      #00c157;
  --flame-1:    #ff8c0b;
  --flame-2:    #ff1d01;
  --grad-flame: linear-gradient(135deg, #ff8c0b 0%, #ff3303 55%, #ff1d01 100%);
  --grad-sky:   linear-gradient(135deg, #3cabd8 0%, #1b6d96 100%);

  --f-display: 'Fraunces', 'Instrument Serif', Georgia, 'Songti SC', serif;
  --f-body:    'Inter', -apple-system, 'Segoe UI', 'Noto Sans SC', system-ui, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --max:       1240px;
  --gutter:    clamp(20px, 4vw, 40px);
  --radius:    14px;
  --radius-lg: 22px;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0; font-family: var(--f-body);
  color: var(--ink); background: var(--paper);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  -webkit-tap-highlight-color: rgba(11, 18, 32, 0.08);
}
/* Form elements — normalize across browsers */
input, select, textarea, button {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  font-family: inherit;
}
/* Prevent iOS Safari auto-zoom on focus by ensuring 16px min font-size on inputs */
input, select, textarea { font-size: 16px; }

/* ============================================================
   Scrollbar — branded, thin, matches the editorial aesthetic
   ============================================================ */
/* Firefox */
html { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
html:hover { scrollbar-color: var(--ink-2) transparent; }
/* Chromium / Safari */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 99px;
  border: 2px solid var(--paper);
  transition: background 0.25s ease;
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-2); }
::-webkit-scrollbar-corner { background: transparent; }
/* Dark-background surfaces (hero, final-cta, inner-hero) — invert the thumb */
.hero ::-webkit-scrollbar-thumb,
.hero-inner ::-webkit-scrollbar-thumb,
.final-cta ::-webkit-scrollbar-thumb {
  background: rgba(250, 250, 246, 0.22);
  border-color: var(--ink);
}
.hero ::-webkit-scrollbar-thumb:hover,
.hero-inner ::-webkit-scrollbar-thumb:hover,
.final-cta ::-webkit-scrollbar-thumb:hover {
  background: rgba(250, 250, 246, 0.45);
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--mute); display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .6; }

h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 400; letter-spacing: -0.02em; margin: 0; overflow-wrap: break-word; word-break: break-word; }
h1 { font-size: clamp(42px, 6.2vw, 88px); line-height: 0.98; letter-spacing: -0.035em; }
h2 { font-size: clamp(32px, 4.2vw, 56px); line-height: 1.02; letter-spacing: -0.025em; }
h3 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.12; }

/* Chinese typography — characters are visually wider than Latin at same px,
   so dial back headings and let long phrases wrap mid-word safely. */
html[data-lang="zh"] h1 { font-size: clamp(32px, 5vw, 68px); letter-spacing: -0.02em; line-height: 1.1; }
html[data-lang="zh"] h2 { font-size: clamp(26px, 3.6vw, 48px); letter-spacing: -0.015em; line-height: 1.15; }
html[data-lang="zh"] h3 { font-size: clamp(20px, 2.2vw, 28px); line-height: 1.3; }
html[data-lang="zh"] .hero-sub,
html[data-lang="zh"] p { line-break: strict; }
html[data-lang="zh"] .eyebrow { letter-spacing: 0.1em; }
p  { margin: 0; }
.italic { font-style: italic; }
.grad-text { background: var(--grad-flame); -webkit-background-clip: text; background-clip: text; color: transparent; }
.serif { font-family: var(--f-display); }

/* nav */
.nav {
  position: -webkit-sticky;
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 250, 246, 0.78);
  backdrop-filter: saturate(1.3) blur(12px);
  -webkit-backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.nav-inner { display: flex; align-items: center; gap: 24px; padding: 10px 0; transition: padding 0.25s ease; }
.logo { display: flex; align-items: center; gap: 18px; font-family: var(--f-display); font-size: 28px; letter-spacing: -0.015em; line-height: 1.05; font-weight: 500; transition: gap 0.25s ease, font-size 0.25s ease; }
.logo img { width: 88px; height: 88px; transition: width 0.25s ease, height 0.25s ease; }

/* Compact nav once scrolled — shrinks logo + text, tightens padding */
.nav.scrolled { background: rgba(250, 250, 246, 0.92); }
.nav.scrolled .nav-inner { padding: 8px 0; }
.nav.scrolled .logo { gap: 12px; font-size: 20px; }
.nav.scrolled .logo img { width: 40px; height: 40px; }
.logo-sub { font-size: 11px; color: var(--mute); font-family: var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; margin-left: 2px; }
/* Language-based brand name — show EN name only in EN mode, 中文 name only in 中文 mode */
.logo .brand-en { display: inline; }
.logo .brand-zh { display: none; font-family: var(--f-display); font-weight: 600; }
html[data-lang="zh"] .logo .brand-en { display: none; }
html[data-lang="zh"] .logo .brand-zh { display: inline; }
.nav-links { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav-links a { font-size: 14px; color: var(--ink-2); position: relative; transition: color .2s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); font-weight: 500; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em;
  padding: 8px 12px; border: 1px solid var(--line-strong);
  border-radius: 99px; color: var(--ink-2); transition: all .2s ease;
}
.lang-toggle:hover { border-color: var(--ink); color: var(--ink); }
.lang-toggle span { opacity: .35; }
.lang-toggle span.on { opacity: 1; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 99px;
  font-size: 14px; font-weight: 500;
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -10px rgba(11,18,32,.55); }
.btn-flame { background: var(--grad-flame); color: #fff; box-shadow: 0 8px 22px -8px rgba(255, 51, 3, 0.55); }
.btn-flame:hover { transform: translateY(-1px); box-shadow: 0 14px 32px -10px rgba(255, 51, 3, 0.7); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.btn-arrow { transition: transform .25s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

.nav-burger { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--line-strong); }
/* Drawer CTA only exists inside the mobile drawer — hide on desktop */
.nav-links .drawer-cta { display: none; }
.nav-burger span { width: 18px; height: 1.5px; background: var(--ink); position: relative; display: block; }
.nav-burger span::before, .nav-burger span::after { content: ""; position: absolute; left: 0; width: 18px; height: 1.5px; background: var(--ink); }
.nav-burger span::before { top: -6px; }
.nav-burger span::after  { top: 6px; }

@media (max-width: 900px) {
  .nav-links, .nav-actions .btn { display: none; }
  .nav-burger { display: inline-flex; }
}

/* hero */
.hero {
  position: relative; background: var(--ink); color: var(--paper); overflow: hidden;
  padding: clamp(80px, 12vw, 140px) 0 clamp(80px, 10vw, 120px);
  isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 15% 18%, rgba(60, 171, 216, 0.22), transparent 60%),
    radial-gradient(50% 40% at 85% 10%, rgba(255, 140, 11, 0.20), transparent 65%),
    radial-gradient(40% 35% at 50% 110%, rgba(0, 193, 87, 0.15), transparent 70%);
  z-index: -2;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.06) 1px, transparent 0);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, black 0%, black 60%, transparent 95%);
  -webkit-mask-image: linear-gradient(180deg, black 0%, black 60%, transparent 95%);
  z-index: -1; opacity: .9;
}
.hero .eyebrow { color: rgba(250,250,246,.65); }
.hero .eyebrow::before { background: rgba(250,250,246,.5); }

.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: end; }
.hero-head h1 .block { display: block; }
.hero-head h1 em { font-style: italic; font-weight: 400; letter-spacing: -0.04em; }
.hero-sub { font-size: clamp(16px, 1.3vw, 19px); line-height: 1.55; color: rgba(250,250,246,.72); max-width: 46ch; margin-top: 28px; }
.hero-cta { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.hero-cta .btn-primary { background: var(--paper); color: var(--ink); }
.hero-cta .btn-primary:hover { background: #fff; }

.hero-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-lg);
  padding: 26px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 30px 80px -40px rgba(0,0,0,.6);
}
.hero-card-top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 20px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #00c157; box-shadow: 0 0 0 4px rgba(0, 193, 87, 0.22); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(0,193,87,0); } }
.hero-card-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 14px 0; border-bottom: 1px dashed rgba(255,255,255,.08); }
.hero-card-row:last-child { border-bottom: 0; padding-bottom: 4px; }
.hcr-label { color: rgba(250,250,246,.6); font-size: 13px; }
.hcr-val { font-family: var(--f-display); font-size: 28px; letter-spacing: -.02em; }
.hcr-val small { font-size: 13px; color: rgba(250,250,246,.5); font-family: var(--f-body); margin-left: 4px; }
.hcr-meta { font-size: 11px; color: var(--blue); font-family: var(--f-mono); letter-spacing: .12em; }

.hero-skyline { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: auto; opacity: .6; pointer-events: none; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* inner hero (for detail pages) */
.hero-inner {
  position: relative; background: var(--ink); color: var(--paper); overflow: hidden;
  padding: clamp(80px, 10vw, 120px) 0 clamp(60px, 8vw, 90px);
  isolation: isolate;
}
.hero-inner::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(50% 40% at 20% 30%, rgba(60, 171, 216, 0.18), transparent 65%),
    radial-gradient(45% 35% at 90% 15%, rgba(255, 140, 11, 0.15), transparent 65%);
  z-index: -2;
}
.hero-inner::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, black 0%, black 50%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, black 0%, black 50%, transparent 100%);
  z-index: -1;
}
.hero-inner .eyebrow { color: rgba(250,250,246,.6); }
.hero-inner .eyebrow::before { background: rgba(250,250,246,.5); }
.hero-inner h1 em { font-style: italic; font-weight: 400; }
.hero-inner p { color: rgba(250,250,246,.7); max-width: 55ch; margin-top: 22px; font-size: clamp(15px, 1.2vw, 18px); }

/* places — horizontally auto-scrolling marquee */
.places {
  background: var(--ink); color: var(--paper);
  padding: 22px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 8%, black 92%, transparent 100%);
}
.places-inner {
  display: flex; align-items: center;
  gap: clamp(24px, 4vw, 56px);
  width: max-content;
  animation: marquee 48s linear infinite;
}
.places-inner:hover { animation-play-state: paused; }
.places span {
  font-family: var(--f-display);
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: -0.02em;
  opacity: .85;
  font-style: italic;
  white-space: nowrap;
}
.places .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--flame-1); opacity: .8; font-style: normal; display: inline-block; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* section base */
section { scroll-margin-top: 80px; }
.section { padding: clamp(80px, 10vw, 140px) 0; }
.section-sm { padding: clamp(60px, 8vw, 90px) 0; }
.section-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head .lead { max-width: 42ch; color: var(--mute); margin-top: 14px; }
@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; }
}

/* subjects */
.subjects { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.subject {
  padding: clamp(24px, 3vw, 36px);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  position: relative; background: transparent;
  transition: background .3s ease, transform .3s ease;
  min-height: 280px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: inherit;
}
.subject:hover { background: var(--cream); }
.subject .icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line); margin-bottom: 18px; }
.subject .icon svg { width: 22px; height: 22px; color: var(--ink); }
.subject h3 { font-size: 26px; margin-bottom: 10px; }
.subject p { color: var(--mute); font-size: 15px; line-height: 1.55; }
.subject .tag { position: absolute; top: 20px; right: 20px; font-family: var(--f-mono); font-size: 10px; letter-spacing: .16em; color: var(--mute); text-transform: uppercase; }
.subject-bottom { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; color: var(--ink); }
.subject-bottom .arrow { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: center; transition: transform .25s ease; }
.subject:hover .subject-bottom .arrow { transform: translateX(4px); }
.subject:nth-child(1) .icon { background: linear-gradient(135deg, #e8f6fc, #fff); }
.subject:nth-child(2) .icon { background: linear-gradient(135deg, #fdefe0, #fff); }
.subject:nth-child(3) .icon { background: linear-gradient(135deg, #e8f6ec, #fff); }
.subject:nth-child(4) .icon { background: linear-gradient(135deg, #fde5e1, #fff); }
@media (max-width: 1000px) { .subjects { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .subjects { grid-template-columns: 1fr; } }

/* stats */
.stats { background: var(--ink); color: var(--paper); padding: clamp(60px, 8vw, 100px) 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stat { padding: 20px clamp(16px, 2vw, 30px); border-right: 1px solid rgba(255,255,255,.09); }
.stat:last-child { border-right: 0; }
.stat-num { font-family: var(--f-display); font-size: clamp(50px, 6vw, 84px); line-height: 1; letter-spacing: -0.04em; }
.stat-num .accent { background: var(--grad-flame); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: italic; }
.stat-label { font-size: 13px; color: rgba(250,250,246,.55); margin-top: 12px; max-width: 24ch; }
@media (max-width: 820px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid rgba(255,255,255,.09); padding: 24px; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(3), .stat:nth-child(4) { border-bottom: 0; }
}

/* approach */
.approach { background: var(--paper); }
.approach-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(40px, 6vw, 100px); align-items: center; }
.approach-visual { position: relative; aspect-ratio: 1 / 1.05; border-radius: var(--radius-lg); overflow: hidden; background: linear-gradient(135deg, #0b1220 0%, #18253a 100%); box-shadow: 0 40px 90px -40px rgba(0,0,0,.5); }
.approach-visual svg.cityscape { position: absolute; inset: 0; width: 100%; height: 100%; }
.approach-visual .glow { position: absolute; inset: 0; background: radial-gradient(60% 50% at 70% 30%, rgba(255, 140, 11, 0.35), transparent 70%); }
.approach-points { margin-top: 36px; }
.a-point { display: grid; grid-template-columns: 44px 1fr; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.a-point:last-child { border-bottom: 0; }
.a-num { font-family: var(--f-mono); font-size: 13px; letter-spacing: .14em; color: var(--flame-2); padding-top: 4px; }
.a-point h3 { font-size: 22px; margin-bottom: 6px; }
.a-point p { color: var(--mute); font-size: 15px; }
@media (max-width: 900px) {
  .approach-grid { grid-template-columns: 1fr; }
  .approach-visual { max-width: 480px; margin: 0 auto; }
}

/* team - full cards (team page) */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.teacher {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex; flex-direction: column; gap: 20px;
}
.teacher:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(11,18,32,.2); }
.teacher-avatar {
  width: 84px; height: 84px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-size: 34px; color: #fff; letter-spacing: -0.02em;
}
.teacher h3 { font-size: 24px; margin-bottom: 2px; }
.teacher .credential { font-size: 13px; color: var(--mute); font-family: var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.teacher .bio { color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.teacher-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.teacher-tags span { font-size: 11px; font-family: var(--f-mono); letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 99px; background: var(--cream); color: var(--ink-2); }
@media (max-width: 900px) { .team-grid { grid-template-columns: 1fr; } }

/* team teaser (homepage) */
.team-teaser { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.teacher-mini {
  display: flex; align-items: center; gap: 16px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  color: inherit;
}
.teacher-mini:hover { transform: translateY(-2px); border-color: var(--ink); box-shadow: 0 20px 40px -20px rgba(11,18,32,.15); }
.teacher-mini .teacher-avatar { width: 54px; height: 54px; font-size: 22px; flex-shrink: 0; }
.teacher-mini h3 { font-size: 17px; font-family: var(--f-body); font-weight: 600; letter-spacing: -0.01em; margin-bottom: 2px; }
.teacher-mini .credential { font-size: 11px; }
.teacher-mini:nth-child(1) .teacher-avatar,
.teacher-grid-full .teacher:nth-child(6n+1) .teacher-avatar { background: var(--grad-sky); }
.teacher-mini:nth-child(2) .teacher-avatar,
.teacher-grid-full .teacher:nth-child(6n+2) .teacher-avatar { background: var(--grad-flame); }
.teacher-mini:nth-child(3) .teacher-avatar,
.teacher-grid-full .teacher:nth-child(6n+3) .teacher-avatar { background: linear-gradient(135deg, #00c157, #0b1220); }
.teacher-grid-full .teacher:nth-child(6n+4) .teacher-avatar { background: linear-gradient(135deg, #ff1d01, #1b6d96); }
.teacher-grid-full .teacher:nth-child(6n+5) .teacher-avatar { background: linear-gradient(135deg, #1b6d96, #0b1220); }
.teacher-grid-full .teacher:nth-child(6n+0) .teacher-avatar { background: linear-gradient(135deg, #ff8c0b, #00c157); }
@media (max-width: 900px) { .team-teaser { grid-template-columns: 1fr; } }

/* success wall */
.success { background: var(--cream); }
.success-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.admit { background: #fff; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); transition: transform .25s ease, box-shadow .25s ease; }
.admit:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -20px rgba(11,18,32,.15); }
.admit .name { font-family: var(--f-display); font-size: 22px; letter-spacing: -.02em; }
.admit .year { font-size: 11px; font-family: var(--f-mono); letter-spacing: .12em; color: var(--mute); text-transform: uppercase; margin-top: 2px; }
.admit .school { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.admit .school b { font-weight: 600; color: var(--ink); }
.admit .score { margin-top: 8px; font-size: 12px; font-family: var(--f-mono); color: var(--flame-2); letter-spacing: .08em; }

/* results filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  padding: 8px 14px; border-radius: 99px;
  background: #fff; border: 1px solid var(--line-strong);
  font-size: 13px; color: var(--ink-2);
  transition: all .2s ease; cursor: pointer;
}
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* testimonials */
.testimonials { background: var(--ink); color: var(--paper); }
.testimonial-lead { font-family: var(--f-display); font-size: clamp(28px, 3.8vw, 52px); line-height: 1.15; letter-spacing: -0.02em; max-width: 22ch; }
.testimonial-lead em { font-style: italic; color: var(--flame-1); }
.testimonial-author { margin-top: 28px; display: flex; align-items: center; gap: 14px; color: rgba(250,250,246,.7); font-size: 14px; }
.testimonial-author .dash { width: 28px; height: 1px; background: rgba(250,250,246,.3); }
.testimonial-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 60px; }
.tcard { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius); padding: 28px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tcard p { color: rgba(250,250,246,.85); font-size: 16px; line-height: 1.6; }
.tcard footer { margin-top: 20px; font-size: 13px; color: rgba(250,250,246,.55); font-family: var(--f-mono); letter-spacing: .06em; }
@media (max-width: 820px) { .testimonial-cards { grid-template-columns: 1fr; } }

/* blog */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.blog-grid-2 { grid-template-columns: repeat(2, 1fr); }
.post { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; display: flex; flex-direction: column; color: inherit; }
.post:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(11,18,32,.2); }
.post-img { aspect-ratio: 16 / 10; background: linear-gradient(135deg, #3cabd8 0%, #1b6d96 100%); position: relative; overflow: hidden; }
.post.tone-1 .post-img { background: linear-gradient(135deg, #ff8c0b 0%, #ff1d01 100%); }
.post.tone-2 .post-img { background: linear-gradient(135deg, #0b1220 0%, #00c157 100%); }
.post.tone-3 .post-img { background: linear-gradient(135deg, #1b6d96 0%, #0b1220 100%); }
.post.tone-4 .post-img { background: linear-gradient(135deg, #00c157 0%, #1b6d96 100%); }
.post.tone-5 .post-img { background: linear-gradient(135deg, #ff1d01 0%, #1b6d96 100%); }
.post-img::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.25) 1px, transparent 0); background-size: 28px 28px; opacity: .35; }
.post-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-meta { font-size: 11px; font-family: var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); display: flex; gap: 14px; }
.post-meta .sep { color: var(--line-strong); }
.post h3 { font-size: 22px; letter-spacing: -0.02em; line-height: 1.15; }
.post p { color: var(--mute); font-size: 14px; }
.post .read { margin-top: auto; padding-top: 14px; font-size: 13px; font-family: var(--f-mono); letter-spacing: .08em; color: var(--ink); }
@media (max-width: 900px) { .blog-grid, .blog-grid-2 { grid-template-columns: 1fr; } }

/* visit */
.visit { background: var(--paper); }
.visit-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: stretch; }
.visit-map { position: relative; background: var(--ink); border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 5; min-height: 480px; box-shadow: 0 40px 90px -40px rgba(0,0,0,.5); }
.visit-map svg.map-grid { position: absolute; inset: 0; width: 100%; height: 100%; }
.visit-pin { position: absolute; top: 46%; left: 52%; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.visit-pin .pin-drop { width: 40px; height: 40px; border-radius: 50% 50% 50% 0; background: var(--grad-flame); transform: rotate(-45deg); box-shadow: 0 10px 30px -5px rgba(255, 51, 3, 0.6); position: relative; }
.visit-pin .pin-drop::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: #fff; }
.visit-pin .pin-label { margin-top: 6px; padding: 6px 12px; background: var(--paper); color: var(--ink); border-radius: 99px; font-size: 12px; font-family: var(--f-mono); letter-spacing: .08em; white-space: nowrap; box-shadow: 0 6px 20px -4px rgba(0,0,0,.3); }
.visit-pulse { position: absolute; width: 100px; height: 100px; top: calc(46% - 20px); left: 52%; transform: translateX(-50%); border-radius: 50%; background: rgba(255, 140, 11, 0.2); animation: ripple 2.5s ease-out infinite; pointer-events: none; }
@keyframes ripple { 0% { transform: translateX(-50%) scale(0.3); opacity: 0.8; } 100% { transform: translateX(-50%) scale(2.2); opacity: 0; } }

.visit-info { display: flex; flex-direction: column; justify-content: center; }
.address-block { font-family: var(--f-display); font-size: clamp(26px, 3vw, 38px); line-height: 1.15; letter-spacing: -0.02em; margin: 18px 0 28px; }
.visit-details { display: grid; gap: 18px; margin-bottom: 32px; }
.detail-row { display: grid; grid-template-columns: 120px 1fr; gap: 16px; font-size: 15px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.detail-row:last-child { border-bottom: 0; }
.detail-row .key { color: var(--mute); font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
@media (max-width: 900px) {
  .visit-grid { grid-template-columns: 1fr; }
  .visit-map { min-height: 400px; }
}

/* final CTA */
.final-cta { background: var(--ink); color: var(--paper); text-align: center; padding: clamp(90px, 12vw, 160px) 0; position: relative; overflow: hidden; isolation: isolate; }
.final-cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(40% 35% at 20% 80%, rgba(60, 171, 216, 0.2), transparent 70%), radial-gradient(40% 35% at 80% 20%, rgba(255, 51, 3, 0.2), transparent 70%); z-index: -1; }
.final-cta h2 { font-size: clamp(40px, 6vw, 80px); line-height: 1; max-width: 14ch; margin: 0 auto; letter-spacing: -0.04em; }
.final-cta h2 em { font-style: italic; color: var(--flame-1); }
.final-cta p { color: rgba(250,250,246,.7); margin: 24px auto 0; max-width: 46ch; }
.final-cta .cta-row { margin-top: 40px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.final-cta .btn-primary { background: var(--paper); color: var(--ink); }
.final-cta .btn-ghost { border-color: rgba(250,250,246,.25); color: var(--paper); }
.final-cta .btn-ghost:hover { background: var(--paper); color: var(--ink); }

/* footer + social */
footer.site { background: var(--ink); color: rgba(250,250,246,.7); border-top: 1px solid rgba(255,255,255,.08); padding: 72px 0 32px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.1fr; gap: 56px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.08); align-items: start; }
.footer-col h4 { font-family: var(--f-mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: rgba(250,250,246,.5); margin: 0 0 18px 0; }
.footer-col a { display: block; color: rgba(250,250,246,.8); padding: 6px 0; transition: color .2s; }
.footer-col a:hover { color: var(--paper); }
.footer-brand p { margin: 18px 0 26px; max-width: 36ch; color: rgba(250,250,246,.6); line-height: 1.55; }

/* Footer logo — compact version, overrides the giant nav-scale */
.footer-brand .logo { gap: 12px; font-size: 18px; font-weight: 600; line-height: 1.2; margin-bottom: 4px; }
.footer-brand .logo img { width: 44px; height: 44px; transition: none; }
.footer-brand .logo .brand-zh { font-size: 18px; }
.footer-brand .logo span span[style*="letter-spacing"] { display: block; margin-top: 4px; }

/* Social icons — branded, rounded, visible at rest */
.social-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.social-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: all .2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.social-icon svg { width: 22px; height: 22px; }
.social-icon:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.35); }

/* Resting brand colors */
.social-icon.wechat { background: #07C160; }
.social-icon.xhs    { background: #FF2442; }
.social-icon.ig     { background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-icon.wa     { background: #25D366; }
.social-icon.fb     { background: #1877F2; }

.social-icon.wechat:hover { background: #05a552; }
.social-icon.xhs:hover    { background: #e61e3c; }
.social-icon.wa:hover     { background: #1ebe5c; }
.social-icon.fb:hover     { background: #1464d1; }

.footer-bottom { margin-top: 28px; display: flex; justify-content: space-between; gap: 20px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; color: rgba(250,250,246,.4); flex-wrap: wrap; }
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}

/* WeChat QR modal */
.wechat-modal {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}
.wechat-modal.open { display: flex; }
.wechat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 340px; width: 100%;
  text-align: center;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.6);
  position: relative;
}
.wechat-card .close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--cream); color: var(--ink);
  font-size: 20px;
}
.wechat-card h3 { font-size: 22px; font-family: var(--f-body); font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
.wechat-card p { font-size: 14px; color: var(--mute); margin-bottom: 24px; }
.wechat-card .qr-box {
  width: 220px; height: 220px; margin: 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  position: relative;
}
.wechat-card .qr-box svg { width: 100%; height: 100%; }
.wechat-card .wechat-id { margin-top: 18px; font-family: var(--f-mono); font-size: 13px; letter-spacing: .1em; color: var(--ink-2); }
.wechat-card .wechat-id b { color: var(--ink); }


/* ============================================================
   SUBJECT DETAIL PAGE
   ============================================================ */
.subject-detail {
  padding: clamp(70px, 8vw, 110px) 0;
  border-bottom: 1px solid var(--line);
}
.subject-detail:nth-child(even) { background: var(--cream); }
.subject-detail-grid {
  display: grid; grid-template-columns: 1fr 1.3fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}
.subject-detail-side .eyebrow { margin-bottom: 16px; }
.subject-detail-side h2 { margin-bottom: 18px; }
.subject-detail-side h2 em { font-style: italic; }
.subject-detail-side p.lead { color: var(--mute); font-size: 16px; line-height: 1.6; margin-bottom: 28px; }
.subject-meta {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; padding: 20px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 22px;
}
.subject-meta .cell { padding: 8px 0; }
.subject-meta .cell .k { font-size: 11px; font-family: var(--f-mono); letter-spacing: .12em; color: var(--mute); text-transform: uppercase; margin-bottom: 4px; }
.subject-meta .cell .v { font-size: 16px; color: var(--ink); font-weight: 500; }
.subject-meta .cell .v em { color: var(--flame-2); font-style: normal; }

.subject-detail-main ul.syllabus {
  list-style: none; padding: 0; margin: 0 0 28px;
}
.subject-detail-main ul.syllabus li {
  padding: 18px 0;
  border-bottom: 1px dashed var(--line-strong);
  display: grid; grid-template-columns: 42px 1fr; gap: 18px;
}
.subject-detail-main ul.syllabus li:last-child { border-bottom: 0; }
.subject-detail-main ul.syllabus .wk { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; color: var(--mute); padding-top: 4px; }
.subject-detail-main ul.syllabus b { font-size: 17px; display: block; margin-bottom: 4px; font-weight: 600; }
.subject-detail-main ul.syllabus span.desc { color: var(--mute); font-size: 14px; }

.faq-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.faq-item h4 { font-family: var(--f-body); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; margin-bottom: 6px; }
.faq-item p { font-size: 15px; color: var(--mute); }

@media (max-width: 900px) {
  .subject-detail-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.story-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.story-grid p { font-size: 17px; line-height: 1.7; color: var(--ink-2); margin-bottom: 18px; }
.story-grid p.lead { font-size: 22px; line-height: 1.4; font-family: var(--f-display); color: var(--ink); font-style: italic; letter-spacing: -0.01em; }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.value {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px;
}
.value .num { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; color: var(--flame-2); margin-bottom: 14px; }
.value h3 { font-size: 22px; margin-bottom: 10px; }
.value p { color: var(--mute); font-size: 15px; line-height: 1.6; }
@media (max-width: 820px) {
  .story-grid, .values-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   CONTACT PAGE (direct / honorsprep-style)
   ============================================================ */
.contact-shell { background: var(--paper); min-height: calc(100vh - 140px); padding: clamp(50px, 7vw, 90px) 0; }
.contact-head { text-align: center; max-width: 640px; margin: 0 auto clamp(36px, 5vw, 56px); }
.contact-head .eyebrow { justify-content: center; display: inline-flex; }
.contact-head h1 { font-size: clamp(36px, 4.5vw, 60px); line-height: 1.02; margin-top: 14px; }
.contact-head h1 em { font-style: italic; color: var(--flame-2); }
.contact-head p { color: var(--mute); margin-top: 16px; font-size: 16px; }

.contact-card { max-width: 720px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 44px); box-shadow: 0 30px 80px -40px rgba(11,18,32,.18); }
.contact-card h2 { font-family: var(--f-body); font-size: 22px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 20px; color: var(--ink); }

.fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: block; }
.field label { display: block; font-size: 14px; color: var(--ink); margin-bottom: 8px; font-weight: 600; }
.field label .req { color: var(--flame-2); }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px;
  background: #fff; border: 1.5px solid var(--line-strong); border-radius: 10px;
  font-size: 15px; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
/* Custom chevron for selects since we reset native appearance */
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%230b1220' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.field input::placeholder, .field textarea::placeholder { color: #a0a8b8; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue-deep); box-shadow: 0 0 0 3px rgba(27, 109, 150, 0.12); }
.field textarea { resize: vertical; min-height: 90px; }
.field-full { grid-column: 1 / -1; }

.divider { height: 1px; background: var(--line); margin: 32px 0; }
.pick-time-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.pick-time-head h3 { font-family: var(--f-body); font-size: 20px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.month-label { font-size: 15px; color: var(--ink-2); font-weight: 500; }
.month-nav { display: flex; gap: 6px; margin-left: auto; }
.month-nav button { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; transition: all .2s ease; }
.month-nav button:hover { border-color: var(--ink); color: var(--ink); }

.date-slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.date-slot { padding: 12px 8px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: #fff; text-align: center; cursor: pointer; transition: all .2s ease; }
.date-slot:hover { border-color: var(--blue-deep); }
.date-slot.selected { border-color: var(--blue-deep); background: rgba(27, 109, 150, 0.05); }
.date-slot .dow { font-size: 11px; color: var(--mute); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.date-slot .day { font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1; margin: 4px 0 2px; }
.date-slot .month { font-size: 12px; color: var(--mute); }
.date-slot .count { font-size: 11px; color: var(--blue-deep); font-weight: 600; margin-top: 6px; }
.date-slot.selected .count { color: var(--flame-2); }
@media (max-width: 560px) {
  .fields-grid { grid-template-columns: 1fr; }
  .date-slots { grid-template-columns: repeat(3, 1fr); }
  .date-slot:nth-child(4), .date-slot:nth-child(5) { display: none; }
}

.book-btn { display: block; width: 100%; padding: 18px; margin-top: 28px; background: var(--blue-deep); color: #fff; border-radius: 10px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; transition: background .2s ease, transform .2s ease, box-shadow .25s ease; }
.book-btn:hover { background: #155873; transform: translateY(-1px); box-shadow: 0 10px 30px -10px rgba(27, 109, 150, 0.5); }
.book-btn.flame { background: var(--grad-flame); box-shadow: 0 8px 22px -8px rgba(255, 51, 3, 0.4); }
.book-btn.flame:hover { box-shadow: 0 14px 32px -10px rgba(255, 51, 3, 0.6); }

.helper { text-align: center; font-size: 13px; color: var(--mute); margin-top: 14px; }
.subject-line { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.subject-line a { color: var(--blue-deep); font-weight: 600; text-decoration: none; }
.subject-line a:hover { text-decoration: underline; }

.quick-row { max-width: 720px; margin: 24px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.quick-mini { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-align: center; transition: border-color .2s, transform .2s; }
.quick-mini:hover { border-color: var(--ink); transform: translateY(-2px); }
.quick-mini .label { font-size: 11px; color: var(--mute); font-family: var(--f-mono); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
.quick-mini .val { font-size: 15px; color: var(--ink); font-weight: 600; }
@media (max-width: 560px) { .quick-row { grid-template-columns: 1fr; } }

/* reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .live-dot, .visit-pulse, .places-inner { animation: none !important; }
}

/* ============================================================
   MOBILE OVERHAUL — most visitors are on phones
   ============================================================ */

/* Tablet + mobile: shrink nav logo so it doesn't dominate */
@media (max-width: 900px) {
  .logo { font-size: 20px; gap: 12px; }
  .logo img { width: 54px; height: 54px; }
  .nav.scrolled .logo { font-size: 17px; gap: 10px; }
  .nav.scrolled .logo img { width: 36px; height: 36px; }
  .nav-inner { padding: 8px 0; }
}

/* Phone-specific tightening */
@media (max-width: 600px) {
  :root { --gutter: 20px; }
  .logo { font-size: 17px; gap: 10px; }
  .logo img { width: 44px; height: 44px; }
  .nav.scrolled .logo img { width: 32px; height: 32px; }
  .nav-actions .btn-ghost { display: none; }

  /* Hero */
  .hero { padding: clamp(48px, 12vw, 80px) 0 clamp(40px, 10vw, 60px); }
  h1 { font-size: clamp(36px, 10vw, 52px); }
  h2 { font-size: clamp(28px, 7vw, 40px); }
  .hero-sub { font-size: 15px; margin-top: 20px; }
  .hero-cta { gap: 10px; margin-top: 28px; }
  .hero-cta .btn { padding: 14px 20px; font-size: 14px; }
  .hero-card { padding: 20px; }
  .hero-card-row { padding: 12px 0; }

  /* Generic section padding */
  .section { padding: clamp(50px, 10vw, 80px) 0; }
  .section-head { margin-bottom: 36px; }

  /* Buttons — ensure touch targets */
  .btn { min-height: 48px; padding: 14px 22px; font-size: 14px; }

  /* Subjects + teasers */
  .subject { padding: 22px 20px; }
  .subject .h3 { font-size: 20px; }
  .team-mini .teacher-avatar { width: 64px; height: 64px; font-size: 22px; }

  /* Stats */
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat { padding: 22px 16px; }
  .stat-num { font-size: clamp(36px, 9vw, 48px); }

  /* Approach */
  .approach-grid { gap: 28px; }
  .a-point { gap: 16px; }
  .a-num { font-size: 16px; min-width: 36px; }

  /* Places marquee — tighter on mobile, faster scroll so it feels alive */
  .places { padding: 16px 0; }
  .places-inner { gap: 28px; animation-duration: 36s; }
  .places span { font-size: 15px; }
  .places .dot { width: 5px; height: 5px; }

  /* Blog */
  .post { padding: 22px 20px; }
  .post h3 { font-size: 19px; }

  /* Results wall */
  .success-wall { grid-template-columns: 1fr 1fr; gap: 10px; }
  .admit { padding: 16px 14px; }
  .admit .name { font-size: 15px; }
  .admit .school { font-size: 13px; }
  .filters { gap: 6px; flex-wrap: wrap; }
  .chip { font-size: 12px; padding: 8px 14px; }

  /* Team detail */
  .teacher { padding: 24px 20px; }
  .teacher-avatar { width: 72px; height: 72px; font-size: 26px; }

  /* Subject detail */
  .subject-meta { grid-template-columns: 1fr 1fr; gap: 12px; }
  ul.syllabus li { padding: 14px 0; }
  ul.syllabus li .wk { min-width: 50px; font-size: 11px; }

  /* About values */
  .values-grid { gap: 12px; }

  /* Visit */
  .visit-map { min-height: 320px !important; }
  .visit-details { padding: 24px 20px; }

  /* Testimonials */
  .testimonial-lead em { font-size: clamp(22px, 6vw, 28px); line-height: 1.3; }
  .tcard { padding: 22px 18px; }

  /* Final CTA */
  .final-cta { padding: clamp(50px, 10vw, 80px) 0; }
  .final-cta h2 { font-size: clamp(30px, 8vw, 44px); }
  .cta-row { flex-direction: column; gap: 12px; align-items: stretch; }
  .cta-row .btn { width: 100%; justify-content: center; }

  /* Contact form */
  .contact-shell { padding: clamp(40px, 10vw, 80px) 0; }
  .contact-head h1 { font-size: clamp(36px, 10vw, 52px); }
  .contact-card { padding: 24px 20px; }
  .fields-grid { gap: 16px; }
  .field input, .field select, .field textarea { font-size: 16px; padding: 14px 14px; /* 16px prevents iOS zoom */ }
  .date-slots { grid-template-columns: repeat(5, minmax(84px, 1fr)); overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
  .date-slots::-webkit-scrollbar { height: 4px; }
  .date-slots::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 2px; }
  .book-btn { width: 100%; padding: 16px; font-size: 15px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr !important; gap: 36px; padding-bottom: 36px; }
  .footer-brand { grid-column: span 1 !important; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: left; align-items: flex-start; }
  .footer-col a { padding: 8px 0; }

  /* WeChat modal */
  .wechat-card { padding: 28px 22px; margin: 20px; }
  .qr-box { width: 180px; height: 180px; }
}

/* Mobile menu drawer — slide in from the right */
@media (max-width: 900px) {
  .nav-links {
    position: fixed; inset: 0 0 0 auto;
    /* fallback for older browsers that ignore `inset` shorthand */
    top: 0; right: 0; bottom: 0;
    width: min(84vw, 340px);
    height: 100vh; height: 100dvh; /* dvh handles iOS URL-bar resize */
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    padding: 96px 28px 32px;
    gap: 0;
    box-shadow: -20px 0 60px -20px rgba(0,0,0,0.2);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
    z-index: 95;
    margin: 0;
    display: flex !important;
    overflow-y: auto;
  }
  .nav-links.open {
    transform: translateX(0);
  }
  .nav-links a {
    width: 100%;
    padding: 18px 0;
    font-size: 20px;
    font-family: var(--f-display);
    border-bottom: 1px solid var(--line);
    color: var(--ink);
  }
  .nav-links a:last-child { border-bottom: 0; }
  /* CTA button injected into drawer */
  .nav-links .drawer-cta {
    display: inline-flex;
    margin-top: 32px;
    border-bottom: 0;
    padding: 16px 20px;
    justify-content: center;
    font-family: var(--f-body);
    font-size: 15px;
  }

  /* Drawer backdrop — darkens the page while the drawer is open */
  body.nav-open::before {
    content: ""; position: fixed; inset: 0;
    background: rgba(11,18,32,0.45);
    z-index: 94;
    animation: fadeIn .25s ease;
  }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

  /* Burger → X transform when menu is open */
  .nav-burger { z-index: 100; position: relative; }
  .nav-burger.open span { background: transparent; }
  .nav-burger.open span::before { top: 0; transform: rotate(45deg); }
  .nav-burger.open span::after  { top: 0; transform: rotate(-45deg); }
  .nav-burger span, .nav-burger span::before, .nav-burger span::after { transition: transform .25s ease, background .25s ease, top .25s ease; }

  /* Prevent body scroll when drawer is open */
  body.nav-open { overflow: hidden; }
}


/* ============================================================
   Legal pages — Privacy / Terms / COPPA
   ============================================================ */
.legal-body { font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.legal-body h2 { font-size: clamp(22px, 2.4vw, 28px); margin-top: 40px; margin-bottom: 12px; color: var(--ink); line-height: 1.25; }
.legal-body h2:first-of-type { margin-top: 24px; }
.legal-body p { margin: 0 0 14px; }
.legal-body ul { margin: 0 0 18px; padding-left: 22px; }
.legal-body li { margin-bottom: 6px; }
.legal-body a { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 2px; }
.legal-body a:hover { color: var(--ink); }
.legal-body strong { color: var(--ink); font-weight: 600; }
.legal-body .legal-meta { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--mute); text-transform: uppercase; margin-bottom: 8px; }
html[data-lang="zh"] .legal-body h2 { font-size: clamp(20px, 2.2vw, 26px); }

/* Legal pages — tighten hero + section padding so the doc doesn't feel bloated */
body.legal-page .hero-inner {
  padding: clamp(56px, 6vw, 88px) 0 clamp(36px, 4vw, 56px);
}
body.legal-page .hero-inner h1 {
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.05;
  margin-top: 16px;
}
body.legal-page .hero-inner p {
  font-size: clamp(14px, 1.1vw, 16px);
  margin-top: 14px;
  max-width: 48ch;
}
body.legal-page .section {
  padding: clamp(48px, 5vw, 72px) 0;
}
body.legal-page .legal-body {
  font-size: 15px;
  line-height: 1.65;
}
body.legal-page .legal-body h2 {
  font-size: clamp(18px, 2vw, 22px);
  margin-top: 32px;
  margin-bottom: 10px;
}
@media (max-width: 720px) {
  body.legal-page .hero-inner h1 { font-size: clamp(30px, 7vw, 40px); }
  body.legal-page .legal-body { font-size: 14.5px; }
}

/* ============================================================
   Footer Hours span — non-clickable, styled like adjacent links
   ============================================================ */
.footer-col .hours {
  display: block;
  color: rgba(250,250,246,0.55);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 6px;
  cursor: default;
  white-space: pre-line;
}

/* ============================================================
   MOBILE FLOATING ACTION BUTTON — Quick Contact
   Injected into <body> by script.js on mobile. Stacks Phone /
   Chat / WeChat / Book above a flame-gradient main button.
   The Chat action calls Tawk_API.maximize() to open the chat.
   ============================================================ */
.fab { display: none; }

@media (max-width: 900px) {
  .fab {
    display: block;
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    right: calc(16px + env(safe-area-inset-right, 0px));
    z-index: 90;
  }
  .fab-main {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--grad-flame); color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 28px -8px rgba(255, 51, 3, 0.55), 0 4px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(.4,0,.2,1), box-shadow 0.25s ease;
    position: relative; z-index: 2;
  }
  .fab-main:active { transform: scale(0.94); }
  .fab-main svg { width: 24px; height: 24px; transition: transform 0.3s cubic-bezier(.4,0,.2,1); }
  .fab[data-state="open"] .fab-main { background: var(--ink); box-shadow: 0 12px 28px -8px rgba(11, 18, 32, 0.45); }
  .fab[data-state="open"] .fab-main svg { transform: rotate(135deg); }

  .fab-items {
    position: absolute; bottom: 68px; right: 0;
    display: flex; flex-direction: column; align-items: flex-end;
    gap: 12px;
    pointer-events: none;
  }
  .fab-item {
    display: flex; align-items: center; gap: 10px;
    opacity: 0; transform: translateY(14px) scale(0.85);
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(.4,0,.2,1);
    pointer-events: auto;
  }
  .fab[data-state="open"] .fab-item { opacity: 1; transform: translateY(0) scale(1); }
  .fab[data-state="open"] .fab-item:nth-child(1) { transition-delay: 0.02s; }
  .fab[data-state="open"] .fab-item:nth-child(2) { transition-delay: 0.06s; }
  .fab[data-state="open"] .fab-item:nth-child(3) { transition-delay: 0.10s; }

  .fab-label {
    background: #fff; color: var(--ink);
    padding: 8px 14px; border-radius: 99px;
    font-size: 13px; font-weight: 500;
    box-shadow: 0 6px 16px -6px rgba(0,0,0,0.18);
    white-space: nowrap;
  }
  .fab-btn {
    width: 46px; height: 46px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; box-shadow: 0 8px 18px -6px rgba(0,0,0,0.25);
  }
  .fab-btn svg { width: 20px; height: 20px; }
  .fab-btn.call   { background: #00c157; }
  .fab-btn.chat   { background: var(--blue); }
  .fab-btn.book   { background: var(--ink); }

  /* Subtle backdrop when FAB is expanded */
  .fab[data-state="open"]::before {
    content: ""; position: fixed; inset: 0;
    background: rgba(11,18,32, 0.25);
    z-index: -1;
    animation: fadeIn .2s ease;
  }

  /* Hide FAB when mobile drawer is open to avoid visual clash */
  body.nav-open .fab { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fab-main, .fab-main svg, .fab-item { transition: none !important; }
}

/* ============================================================
   Blog — single-post reader (shown when /blog#<slug> is open)
   ============================================================ */
.blog-reader {
  padding: clamp(40px, 5vw, 72px) 0 clamp(60px, 8vw, 100px);
}
.blog-article {
  max-width: 720px;
  margin: 0 auto;
}
.blog-article-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  padding: 8px 14px;
  margin: 0 0 28px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.blog-article-back:hover {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--cream);
}
.blog-article-cover {
  width: 100%;
  aspect-ratio: 16 / 7;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
  box-shadow: 0 20px 60px -30px rgba(11, 18, 32, 0.35);
}
.blog-article-meta {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 18px;
}
.blog-article-meta .cat {
  color: var(--flame-2);
  font-weight: 600;
}
.blog-article-meta span + span::before {
  content: "·";
  margin-right: 12px;
  margin-left: -6px;
  color: var(--line-strong);
}
.blog-article-title {
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 32px;
}
.blog-article-body {
  font-size: 17px;
  line-height: 1.72;
  color: var(--ink-2);
}
.blog-article-body p { margin: 0 0 18px; }
.blog-article-body h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.2;
  margin: 44px 0 14px;
  color: var(--ink);
}
.blog-article-body h3 {
  font-size: clamp(19px, 2vw, 23px);
  margin: 32px 0 10px;
  color: var(--ink);
}
.blog-article-body ul,
.blog-article-body ol {
  margin: 0 0 20px;
  padding-left: 24px;
}
.blog-article-body li { margin-bottom: 8px; }
.blog-article-body a {
  color: var(--blue-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.blog-article-body a:hover { color: var(--ink); }
.blog-article-body strong { color: var(--ink); font-weight: 600; }
.blog-article-body em { font-style: italic; }
.blog-article-body code {
  font-family: var(--f-mono);
  font-size: 0.9em;
  background: var(--cream);
  padding: 2px 6px;
  border-radius: 4px;
}
.blog-article-body pre {
  background: var(--ink);
  color: var(--paper);
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--f-mono);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 24px;
}
.blog-article-body pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}
.blog-article-body blockquote {
  border-left: 3px solid var(--flame-2);
  padding: 4px 0 4px 20px;
  margin: 0 0 22px;
  color: var(--ink);
  font-style: italic;
  font-size: 1.05em;
}
.blog-article-body img {
  border-radius: var(--radius);
  margin: 20px 0;
  max-width: 100%;
}
.blog-article-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

/* Chinese typography in blog posts — slightly tighter line-height, stricter wrap */
html[data-lang="zh"] .blog-article-body {
  line-break: strict;
  line-height: 1.78;
}
html[data-lang="zh"] .blog-article-title {
  font-size: clamp(26px, 3.6vw, 44px);
  line-height: 1.2;
}

@media (max-width: 720px) {
  .blog-article-title { font-size: clamp(26px, 7vw, 34px); }
  .blog-article-body { font-size: 16px; }
  .blog-article-cover { aspect-ratio: 4 / 3; }
}
