:root {
  --sc-canvas:#fff; --sc-surface:#eef3fb; --sc-ink:#162333; --sc-ink-soft:#4b5868;
  --sc-accent:#245daa; --sc-accent-ink:#fff;
  --sc-font-display:var(--font-ui); --sc-font-text:var(--font-ui);
  --journal-blue:#d6e4fa; --journal-deep:#163f7c;
}
body { background:#fff; color:var(--ink); }
html { scroll-padding-top:96px; }
nav { z-index:100; }
.hero.journal-hero { position:relative; display:block; max-width:1600px; min-height:690px; padding:0 var(--page-gutter); margin:0 auto 5rem; isolation:isolate; }
.hero-ground { position:absolute; inset:0 0 0 24%; background:var(--journal-blue); z-index:-1; }
.journal-hero .hero-content { position:relative; z-index:3; width:52%; max-width:700px; padding-top:7rem; padding-bottom:5rem; }
.journal-hero h1 { font-size:clamp(3.4rem,6.3vw,6rem); line-height:1.04; letter-spacing:-.04em; font-weight:800; margin:0 0 1.8rem; text-wrap:initial; }
.journal-hero h1 em { color:var(--blue-900); font-style:normal; font-weight:inherit; }
.journal-hero .hero-desc { max-width:38ch; font-size:1rem; line-height:1.8; padding-right:1.5rem; }
.journal-hero .hero-actions { align-items:center; gap:1.5rem; }
.journal-photo { position:absolute; right:var(--page-gutter); top:2rem; bottom:2rem; width:48%; overflow:hidden; z-index:1; margin:0; }
.journal-photo img { width:100%; height:100%; object-fit:cover; object-position:62% 50%; }
.hero-workbook { position:absolute; z-index:4; width:clamp(210px,24vw,370px); height:auto; left:42%; bottom:-3.1rem; pointer-events:none; filter:drop-shadow(0 17px 15px #1d355222); transform-origin:center; }
.hero-note { position:absolute; right:calc(var(--page-gutter) + 1rem); bottom:3.2rem; color:#fff; font-size:.8125rem; z-index:2; background:#163f7c; padding:.45rem .8rem; }
.hero-actions .btn-primary { border-radius:5px; }
.journal-hero .btn-ghost { border-color:#829fc7; }
.journal-hero::after { display:none; }
.philosophy { grid-template-columns:1.1fr 1fr; border:0; gap:8rem; padding-top:3rem; padding-bottom:5.5rem; }
.philosophy-left h2 { max-width:15ch; font-size:clamp(2rem,3vw,3rem); }
.philosophy-left p { max-width:47ch; }
.phil-card { border-bottom-color:#ccd9e9; }
.phil-card p { max-width:45ch; }

/* The worked sheet is the single held scroll sequence. */
.learning-lab { position:relative; background:var(--journal-deep); color:#fff; }
.learning-lab .sc-stage { display:grid; grid-template-columns:.85fr 1.15fr; gap:6vw; align-items:center; padding:110px var(--page-gutter) 45px; overflow:clip; }
.lab-copy { max-width:480px; }
.lab-copy h2 { font-size:clamp(2.2rem,3.7vw,4rem); font-weight:800; line-height:1.12; margin-bottom:1.4rem; letter-spacing:-.035em; }
.lab-copy > p { font-size:1rem; line-height:1.8; color:#d6e4fa; max-width:36ch; }
.lab-controls { display:flex; flex-direction:column; align-items:stretch; margin-top:2rem; gap:.2rem; }
.lab-controls button { display:flex; align-items:center; gap:1rem; border:0; background:none; color:#d6e4fa; padding:.85rem 0; text-align:left; font-size:.9375rem; cursor:pointer; border-bottom:1px solid #ffffff30; min-height:50px; }
.lab-controls button::before { content:''; display:block; width:6px; height:6px; border:1px solid #d6e4fa; border-radius:50%; flex-shrink:0; }
.lab-controls button[aria-pressed=true] { color:#fff; font-weight:700; }
.lab-controls button[aria-pressed=true]::before { background:#fff; border-color:#fff; }
.lab-controls button:hover { color:#fff; }
.lab-copy .lab-disclaimer { font-size:.8125rem; margin-top:1.2rem; color:#d6e4fa; }
.worksheet { color:#1a3454; width:100%; max-width:620px; justify-self:end; background:#fff; padding:clamp(1.75rem,3.2vw,3.5rem); transform:rotate(-2deg); box-shadow:0 24px 50px #00000030; border-radius:3px; }
.worksheet-header { display:flex; justify-content:space-between; align-items:start; border-bottom:1px solid #c9d7e9; padding-bottom:1rem; font-size:.8125rem; color:#48617f; }
.worksheet-header strong { font-size:.9375rem; color:#1a3454; }
.worksheet-header span { text-align:right; }
.equation-line { position:relative; display:grid; grid-template-columns:1.2fr auto 1fr; gap:1rem; padding:1.3rem .65rem; align-items:center; border-bottom:1px solid #dbe4ef; font-variant-numeric:tabular-nums; color:#566b86; }
.equation-line .math { position:relative; font-size:clamp(2rem,3.1vw,3.2rem); line-height:1.4; font-weight:700; letter-spacing:-.025em; }
.equation-line .math:first-child { text-align:center; justify-self:end; }
.equation-line .math:last-child { text-align:center; justify-self:start; min-width:1.5ch; }
.equation-line.active { color:#163f7c; }
.equation-line::before { content:''; position:absolute; inset:0; background:#eaf2ff; z-index:-1; transform:scaleX(0); transform-origin:left; transition:transform .45s cubic-bezier(.23,1,.32,1); }
.equation-line.active::before { transform:scaleX(1); }
.equation-reason { padding:.5rem .65rem; font-size:.8125rem; text-align:center; color:#48617f; min-height:2rem; }
.term-six { position:relative; display:inline-block; }
.term-six::after { content:''; position:absolute; left:-3%; right:-3%; top:53%; height:2px; background:#245daa; transform:rotate(-12deg) scaleX(0); transition:transform .4s cubic-bezier(.23,1,.32,1); }
.learning-lab[data-study-step="1"] .term-six::after, .learning-lab[data-study-step="2"] .term-six::after { transform:rotate(-12deg) scaleX(1); }
.answer-value { display:inline-block; position:relative; }
.answer-value::after { content:''; position:absolute; height:3px; background:#245daa; left:-10%; right:-10%; bottom:1px; transform:scaleX(0); transform-origin:left; transition:transform .5s cubic-bezier(.23,1,.32,1); }
.learning-lab[data-study-step="2"] .answer-value::after { transform:scaleX(1); }
.worksheet-footer { display:flex; align-items:center; justify-content:space-between; padding-top:1rem; color:#48617f; font-size:.8125rem; }
.worksheet-footer svg { width:22px; height:22px; color:#245daa; }
.learning-lab { --subtract:1; --cancel:1; --resolve-one:1; --divide:1; --resolve-two:1; }
#equation0 .math, #equation1 .math { padding-bottom:1.35rem; }
.operation { position:absolute; bottom:0; left:50%; transform:translateX(-50%); color:#245daa; font-size:1.25rem; line-height:1.2; font-weight:700; white-space:nowrap; }
.divide-operation { width:70%; text-align:center; border-top:1px solid #245daa; padding-top:.1rem; }
.learning-lab[data-motion-mode=scroll] .subtract-operation { opacity:var(--subtract); transform:translate(-50%,calc((1 - var(--subtract))*-16px)); }
.learning-lab[data-motion-mode=scroll] #equation1 { opacity:var(--resolve-one); transform:translateY(calc((1 - var(--resolve-one))*-32px)); }
.learning-lab[data-motion-mode=scroll] .divide-operation { opacity:var(--divide); transform:translate(-50%,calc((1 - var(--divide))*-12px)); }
.learning-lab[data-motion-mode=scroll] .divide-reason { opacity:var(--resolve-one); }
.learning-lab[data-motion-mode=scroll] #equation2 { opacity:var(--resolve-two); transform:translateY(calc((1 - var(--resolve-two))*-32px)); }
.learning-lab[data-motion-mode=scroll] .worksheet-footer { opacity:var(--resolve-two); }
.learning-lab[data-motion-mode=scroll] .term-six::after { transform:rotate(-12deg) scaleX(var(--cancel)); transition:none; }
.learning-lab[data-motion-mode=scroll] .answer-value::after { transform:scaleX(var(--resolve-two)); transition:none; }

/* A course index, not a second collection of cards. */
.subjects { background:#fff; padding-top:6rem; padding-bottom:6rem; }
.subjects-header h2 { max-width:none; }
.subjects-header { align-items:start; }
.programme-tools { border-bottom:1px solid var(--line); padding-bottom:1.3rem; margin-bottom:0; }
.programme-browser { display:grid; grid-template-columns:1fr 1.13fr; gap:4.5rem; align-items:start; }
.programme-visual { position:sticky; top:115px; margin:2rem 0 0; min-width:0; }
.programme-visual img { width:100%; height:auto; aspect-ratio:4/5; object-fit:cover; object-position:56% 50%; transition:opacity .18s ease; }
.programme-visual figcaption { display:flex; justify-content:space-between; gap:1rem; font-size:.8125rem; color:var(--ink-light); padding-top:1rem; }
.subjects-grid { display:block; }
.subject-cell.programme-row { display:grid; grid-template-columns:1fr 28px; gap:.8rem 1rem; padding:1.7rem 0; border:0; border-bottom:1px solid #cbd7e7; border-radius:0; background:transparent; }
.programme-row:hover { background:transparent; }
.programme-row h3 { font-size:1.45rem; line-height:1.3; margin:0; letter-spacing:-.025em; }
.programme-row p { grid-column:1; margin:0; font-size:.875rem; max-width:53ch; color:#4b5868; }
.programme-row .subject-levels { grid-column:1; margin:0; }
.programme-row .subject-levels span { padding:0; background:transparent; font-size:.75rem; color:#4e6480; }
.programme-row .subject-levels span + span::before { content:' / '; padding-inline:.3rem; color:#7890ae; }
.programme-row .row-arrow { grid-column:2; grid-row:1/4; align-self:center; color:#245daa; }
.programme-row .row-arrow svg { width:22px; height:22px; transition:transform .2s ease; }
.programme-row:hover .row-arrow svg { transform:translateX(4px); }
.programme-row:hover h3 { color:#245daa; }
.programme-row .view-link { margin:0; grid-column:1; font-size:.8125rem; }
.programme-row .view-link svg { display:none; }
.programme-row:focus-visible { outline-offset:7px; }
.faq-section { padding-top:4rem; padding-bottom:5rem; border-top:1px solid var(--line); }
.admissions { background:#e9f1fd; }
.admissions-left h2 { max-width:12ch; font-size:clamp(2.2rem,3.5vw,3.5rem); }
.admissions-form { border-radius:4px; }
.illustration-credit { font-size:.75rem; color:#d7e4f6; margin-top:.8rem; }
.sp-hero > .sp-art { padding:0; overflow:hidden; }
.sp-hero > .sp-art:has(.course-summary) { padding:2rem; }
.sp-hero > .sp-art > img { aspect-ratio:4/3; object-fit:cover; }
.course-hero-action { margin-top:.7rem; }

@media(min-width:1500px) { .journal-hero .hero-content { padding-top:8rem; } .hero.journal-hero { min-height:760px; } }
@media(max-width:1100px) {
  .hero.journal-hero { min-height:610px; }
  .journal-hero .hero-content { padding-top:6rem; width:56%; }
  .journal-hero h1 { font-size:clamp(3rem,6.5vw,5rem); }
  .journal-photo { width:46%; }
  .hero-workbook { width:250px; left:43%; bottom:-1rem; }
  .philosophy { gap:4rem; }
  .programme-browser { gap:3rem; }
  .learning-lab .sc-stage { gap:3rem; }
}
@media(max-width:760px) {
  html { scroll-padding-top:90px; }
  .hero.journal-hero { min-height:0; margin-bottom:2rem; padding-top:2.5rem; padding-bottom:0; }
  .hero-ground { inset:17% 0 0 30%; }
  .journal-hero .hero-content { width:100%; max-width:580px; padding:0 0 2rem; }
  .journal-hero h1, body.zh .journal-hero h1 { font-size:clamp(2.65rem,8.4vw,4.4rem); line-height:1.06; margin-bottom:1.25rem; }
  .journal-hero .hero-desc { max-width:47ch; font-size:.9375rem; padding-right:0; margin-bottom:1.5rem; }
  .journal-photo { position:relative; top:auto; right:auto; bottom:auto; width:100%; height:auto; aspect-ratio:1.12; margin:0; }
  .journal-photo img { object-position:60% 45%; }
  .hero-workbook { width:42%; max-width:250px; left:calc(var(--page-gutter) - 1rem); bottom:-1.4rem; }
  .hero-note { bottom:1rem; right:calc(var(--page-gutter) + .7rem); font-size:.75rem; padding:.35rem .5rem; }
  .hero-actions { gap:1rem; }
  .hero-actions .btn-primary { padding:.8rem 1rem; font-size:.875rem; }
  .hero-actions .btn-ghost { font-size:.8125rem; }
  .philosophy { grid-template-columns:1fr; padding-top:3rem; padding-bottom:3rem; gap:1.5rem; }
  .philosophy-left h2 { max-width:22ch; }
  .learning-lab[data-sc-act=flow] { height:auto !important; }
  .learning-lab[data-sc-act=flow] .sc-stage { position:relative !important; top:auto !important; height:auto !important; min-height:0; overflow:visible; }
  .learning-lab .sc-stage { grid-template-columns:1fr; padding:3rem var(--page-gutter); gap:2rem; }
  .lab-copy { max-width:none; }
  .lab-copy h2 { font-size:2rem; max-width:18ch; }
  .lab-copy > p { max-width:45ch; font-size:.9375rem; }
  .lab-controls { flex-direction:row; margin-top:1.3rem; gap:.6rem; }
  .lab-controls button { min-height:44px; padding:.6rem .2rem; border:0; font-size:.75rem; line-height:1.5; flex:1; align-items:start; }
  .lab-controls button::before { margin-top:.45rem; width:5px; height:5px; }
  .lab-copy .lab-disclaimer { font-size:.75rem; margin-top:.4rem; }
  .worksheet { justify-self:center; max-width:520px; padding:1.4rem; transform:rotate(-1deg); }
  .equation-line { padding:.9rem .5rem; gap:.6rem; }
  .equation-line .math { font-size:2.25rem; }
  .equation-reason { font-size:.75rem; }
  .worksheet-header { font-size:.75rem; }
  .worksheet-header strong { font-size:.8125rem; }
  .subjects { padding-block:3.5rem; }
  .programme-browser { grid-template-columns:1fr; gap:0; }
  .programme-visual { position:relative; top:auto; margin:1.5rem 0 .5rem; }
  .programme-visual img { aspect-ratio:1.7; object-position:50% 52%; }
  .programme-visual figcaption { font-size:.75rem; padding-top:.6rem; }
  .programme-tools { gap:.8rem; }
  .programme-tools input { width:100%; }
  .subject-cell.programme-row { padding:1.35rem 0; }
  .programme-row h3 { font-size:1.25rem; }
  .programme-row p { font-size:.875rem; }
  .faq-section { padding-top:3rem; padding-bottom:3rem; }
  .admissions-left h2 { max-width:none; }
  .admissions-form { padding:1.25rem; }
}
@media(prefers-reduced-motion:reduce) {
  .learning-lab { height:auto !important; }
  .learning-lab .sc-stage { position:relative !important; top:auto !important; height:auto !important; min-height:0; }
  .learning-lab .sc-stage { padding-block:4rem; }
  .hero-workbook, .journal-photo img, .worksheet { transform:none !important; }
  .equation-line { color:#163f7c; }
  .equation-line::before { transform:none; background:transparent; }
  .term-six::after { transform:rotate(-12deg) scaleX(1); }
  .answer-value::after { transform:scaleX(1); }
  [data-sc-in] { opacity:1 !important; transform:none !important; filter:none !important; }
  [data-sc-reveal] { clip-path:none !important; }
  .equation-line, .operation, .divide-reason, .worksheet-footer { opacity:1 !important; }
  .equation-line { transform:none !important; }
}
