/* Homepage only: pillar cards (reuse .prog-card) and the offer row's link list */
.pillars { padding-block: clamp(24px, 3vw, 40px) clamp(64px, 8vw, 110px); }
.pillars .sec-head { max-width: 1040px; margin-bottom: clamp(28px, 4vw, 44px); }

.pillar-card .pillar-tag { font-family: var(--font-display); font-style: italic; color: var(--ink-2); font-size: 17px; line-height: 1.35; }
.pillars .pillars-more { margin-top: 26px; }
.programs { padding-bottom: clamp(40px, 5vw, 64px); }
.programs .sec-head { margin-bottom: clamp(20px, 3vw, 32px); }
.prog-links-stack { flex-direction: column; gap: 6px; }
/* moving gallery of program photos (between the hero and the programs) */
.gallery-strip { padding: clamp(28px, 4vw, 48px) 0 0; overflow: hidden; }
.gal-tile { margin: 0; height: clamp(190px, 22vw, 290px); aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px;
  border: 0; box-shadow: none; background: var(--bg-paper-soft); flex: none; }
.gal-tile:nth-child(3n+2) { aspect-ratio: 3 / 4; }
.gal-tile img, .gal-tile video { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.9); }
@keyframes gal-scroll { to { transform: translateX(-50%); } }

/* low-key partner line under the student program links */

/* Gallery captions (Sept 28) */
.gal-tile { position: relative; }

/* Programs: wide student card, two stacked side cards */

/* Programs = journey + adults row */

/* Leadership, moved up */
.hp-lead { padding-block: clamp(64px, 8vw, 110px) !important; }
.hp-lead .sec-head { text-align: left; }

/* Two-row gallery, opposite directions, scroll-linked drift */

@keyframes gal2-l { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes gal2-r { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* Editorial photo collage with scroll parallax */

/* Bento photo grid (replaces the collage) */
.bento { padding: clamp(56px, 7vw, 96px) 0 !important; overflow: visible; }
.bt { position: relative; margin: 0; border-radius: 14px; overflow: hidden; background: #ddd; transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s; }
.bt img, .bt video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1s cubic-bezier(.2,.7,.2,1), filter .4s; }
.bt::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(11,26,74,.7)); pointer-events: none; }
.bt figcaption { position: absolute; left: 14px; bottom: 12px; z-index: 1; color: #FFFFFF; font: 500 17px/1.2 var(--font-display); }
.bt figcaption span { display: block; margin-bottom: 3px; font: 500 9.5px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.bt:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -22px rgba(11,26,74,.38); }
.bt:hover img, .bt:hover video { transform: scale(1.05); }

/* ===== Homepage pass (Sept 28): arch hero, vision story, proof ===== */

@keyframes arch-seal-spin { to { transform: rotate(360deg); } }
@keyframes chip-float { 50% { transform: translateY(-8px); } }

/* vision visuals */

.tv { position: relative; padding: 14px 16px; border-radius: 12px; background: #F5F7FA; font: 500 18px/1.3 var(--font-display); color: #0E1729; transition: opacity .5s, transform .5s; }
.tv em { display: block; font: normal 600 10px/1 var(--font-mono); letter-spacing: .1em; color: #8A8A8A; margin-bottom: 6px; }
.tv.x { opacity: .5; text-decoration: line-through; text-decoration-color: rgba(166,72,42,.6); }
.tv.ok { background: var(--ink); color: #FFFFFF; box-shadow: 0 18px 40px -22px rgba(11,26,74,.38); }
.tv.ok i { position: absolute; right: 12px; top: 12px; font: normal 600 10px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: #F2A98E; }
/* proof row */

@media (max-width: 900px) {
  .hero-riso-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .hero-riso-copy { min-width: 0; max-width: 100%; }
  .hero-riso-copy .eyebrow { max-width: 100%; white-space: normal; }
}
/* About page additions */

/* Hero arch slideshow */
.arch-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease; }
.arch-slide.is-on { opacity: 1; }
.arch-slide video, .arch-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.arch-slide img { transform: scale(1.02); }
.arch-slide.is-on img { animation: arch-kb 7s linear both; }
@keyframes arch-kb { to { transform: scale(1.14) translate(-2%, -2%); } }
.arch-cap { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 2; padding: 6px 12px; border-radius: 999px; background: rgba(11,26,74,.8); color: #FFFFFF; font: 500 10.5px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; transition: opacity .4s; }
.arch-dots { position: absolute; left: 0; right: 0; bottom: 46px; z-index: 2; display: flex; justify-content: center; gap: 6px; }
.arch-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255,.5); transition: width .3s, background .3s; }
.arch-dots i.on { width: 18px; border-radius: 4px; background: #FFFFFF; }
@media (prefers-reduced-motion: reduce) { .arch-slide.is-on img { animation: none; } }

/* ===== Homepage pass 2 (professional) ===== */
.hp-cred { padding-block: clamp(72px, 9vw, 120px) !important; background: var(--paper-hi, #FFFFFF) !important; border-block: 1px solid var(--border-paper); }
.hp-cred-head { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 5vw, 56px); }
.hp-cred-head .eyebrow { margin: 0 auto; } .hp-cred-head .h2 { margin: 16px 0 12px; } .hp-cred-head .lede { margin: 0 auto; max-width: 52ch; }
.hp-cred-grid { display: grid; gap: 0; border-top: 1px solid var(--border-paper); }
.hp-cred-row { display: grid; grid-template-columns: 140px 1fr; align-items: center; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--border-paper); }
.hp-cred-lab { font: 500 10.5px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text-ink-muted); }
.hp-cred-row ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 36px; }
.hp-cred-row li { display: flex; align-items: center; opacity: .82; filter: grayscale(1); transition: opacity .25s, filter .25s, transform .25s; }
.hp-cred-row li:hover { opacity: 1; filter: none; transform: translateY(-2px); }
.hp-cred-row img { width: auto; display: block; }
@media (max-width: 760px) { .hp-cred-row { grid-template-columns: 1fr; gap: 16px; } .hp-cred-row ul { justify-content: flex-start; gap: 18px 26px; } .hp-cred-row img { max-height: 28px; } }

/* Problem board (replaces sticky notes) */

.pb-t { font-size: 14px; color: #1A1F2E; } .pb-t small { display: block; margin-top: 2px; font: 500 10px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: #9A9186; }
@keyframes pb-grow { from { transform: scaleX(0); } }

/* Craft beat: badge inside frame, calmer shadow */

@media (max-width: 760px) {
  #programs .pp-jr { min-width: 0; }
   #programs .pp-jr-line { display: none; }
  #programs .pp-jr-card { grid-column: auto !important; grid-row: auto !important; }
  .arch-cap { bottom: 12px; font-size: 9.5px; } .arch-dots { bottom: 38px; }
}

/* ===== Homepage formality pass (body.home) ===== */
body.home .eyebrow { box-shadow: none !important; }
body.home .bt:hover { box-shadow: 0 18px 36px -18px rgba(11,26,74,.45) !important; }
body.home .pp-jr-card[data-from] { border-left: 1px solid var(--border-paper) !important; background: #fff !important; }
body.home .pp-jr-card[data-from]:hover { box-shadow: 0 16px 32px -18px rgba(11,26,74,.4) !important; border-color: var(--ink) !important; }
body.home .pp-jr-line li.on span { box-shadow: none !important; }
body.home .btn-primary { box-shadow: none !important; }
/* academic research site (Craft) */
.rs { border-radius: 14px; background: #fff; border: 1px solid #CDD3DF; box-shadow: 0 30px 60px -30px rgba(11,26,74,.45); overflow: hidden; font-family: var(--font-body); color: #0E1729; }

/* Bento crossfade */
.bt > img, .bt > video { position: absolute; inset: 0; transition: opacity 1.4s ease, transform 1s cubic-bezier(.2,.7,.2,1), filter .4s; }
.bt .bt-alt { opacity: 0; }
.bt.swap > img:not(.bt-alt), .bt.swap > video { opacity: 0; }
.bt.swap .bt-alt { opacity: 1; }
.bt figcaption { transition: opacity .5s; }
.bt.cap-fade figcaption { opacity: 0; }

/* ===== Hero v5: formal photo panel (replaces the arch) ===== */

@keyframes arch-kb { from { transform: scale(1.06); } to { transform: scale(1); } }
.hero-photo-cap { display: flex; align-items: center; gap: 10px; width: clamp(300px, 34vw, 520px); margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(11,26,74,.18); font-size: 13px; color: var(--text-ink-soft); }
.hero-photo-cap img { width: 28px; height: 28px; border-radius: 50%; }
.hero-photo-cap b { color: var(--ink); font-weight: 500; }
.hero-photo-cap .arch-cap { position: static; transform: none; margin-left: auto; padding: 0; background: none; color: var(--text-ink-muted); font: 500 10.5px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
@media (max-width: 900px) {  .hero-photo-cap { width: 100%; } .hero-photo-cap .arch-cap { display: none; } }

/* ===== Homepage v7 (Sept 29): two-row labeled carousel, program list + linked timeline ===== */

@keyframes gal2-l { to { transform: translateX(-50%); } }
@keyframes gal2-r { from { transform: translateX(-50%); } to { transform: translateX(0); } }

.prog-links a[data-prog].on { color: var(--ink); }
.prog-links a[data-prog].on .tl { text-decoration-color: currentColor; }

/* carousel v8: mixed shapes, offset heights, videos */

.prog-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
@media (max-width: 760px) { .prog-grid-4 { grid-template-columns: 1fr !important; } }
/* programs: cards + timeline in one view */
#programs { padding-block: clamp(48px, 6vw, 72px) !important; }
#programs .sec-head { margin-bottom: 22px !important; }
#programs .prog-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 12px !important; margin-top: 0 !important; }
#programs .prog-card { padding: 18px 20px !important; }
#programs .prog-card .prog-h { font-size: 20px !important; margin: 10px 0 6px !important; }
#programs .prog-card .prog-p { font-size: 13.5px !important; line-height: 1.5 !important; margin-bottom: 10px !important; }
#programs .prog-links { gap: 4px !important; font-size: 14px; }
#programs .prog-links-stack a { font-size: 14px; }
 #programs > .container > p { margin-top: 14px !important; }
@media (max-width: 1100px) { #programs .prog-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 760px) { #programs .prog-grid-4 { grid-template-columns: 1fr !important; } }
/* Hero v9: real photo with seal medallion, still background */

/* Gapless mosaic carousel */
.gm { padding: clamp(28px, 4vw, 48px) 0 0 !important; overflow: hidden; }
.gm-track { --h: clamp(340px, 32vw, 460px); display: flex; gap: 8px; height: var(--h); width: max-content; animation: gal2-l 140s linear infinite; }
.gm:hover .gm-track { animation-play-state: paused; }
.gm-col { display: flex; flex-direction: column; gap: 8px; height: 100%; flex: none; }
.gm-w { width: calc(var(--h) * 1.45); } .gm-v { width: calc(var(--h) * .66); } .gm-s { width: calc(var(--h) * .72); }
.gm-t { position: relative; flex: 1; margin: 0; border-radius: 8px; overflow: hidden; min-height: 0; }
.gm-t img, .gm-t video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1s cubic-bezier(.2,.7,.2,1); }
.gm-t:hover img, .gm-t:hover video { transform: scale(1.04); }
.gm-t figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 12px 10px; background: linear-gradient(180deg, transparent, rgba(11,26,74,.7)); color: #FFFFFF; font: 500 14px/1.2 var(--font-display); }
.gm-t figcaption span { display: block; margin-bottom: 2px; font: 500 9px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
@media (prefers-reduced-motion: reduce) { .gm-track { animation: none; } .gm { overflow-x: auto; } }
@media (max-width: 760px) { .gm-track { --h: 280px; } }
/* loop round 1 fixes */
.hero-full { min-height: 0 !important; }
.hero-full .hero-riso-grid { padding-block: clamp(96px, 11vw, 150px) clamp(64px, 7vw, 100px) !important; }
.gm { padding-top: 0 !important; }
.prog-p, .prog-card .prog-p { text-wrap: pretty; }
.footer-col h4 + a, .footer-col a + h4 { }
.footer-col a + h4 { margin-top: 22px !important; }
@media (max-width: 900px) {
  .hero-full .hero-riso-grid { padding-block: 96px 48px !important; gap: 44px !important; }
}
.hero-full .hero-riso-grid { padding-block: clamp(130px, 12vw, 170px) clamp(64px, 7vw, 96px) !important; }
@media (max-width: 900px) { .hero-full .hero-riso-grid { padding-block: 110px 48px !important; } }
.hp-next .cf-ev p .tlink { display: inline-block; margin-left: 0; }

/* ===== Polish loop 3 (Sept 30): alignment, calmer labels, hover, motion ===== */
:root { --e: cubic-bezier(.2,.7,.2,1); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* program cards: equal structure, CTAs aligned to the bottom, quiet labels */
#programs .prog-card { display: flex; flex-direction: column; border: 1px solid var(--border-paper) !important; background: #FFFFFF !important; transition: border-color .3s var(--e), box-shadow .35s var(--e), transform .35s var(--e) !important; }
#programs .prog-card:hover { transform: translateY(-3px); border-color: rgba(11,26,74,.35) !important; box-shadow: 0 22px 44px -28px rgba(11,26,74,.45) !important; }
#programs .prog-card .eyebrow { background: none !important; color: var(--coral-deep) !important; padding: 0 !important; box-shadow: none !important; font-size: 10.5px !important; letter-spacing: .16em !important; }
#programs .prog-card .eyebrow::before { display: none !important; }
#programs .prog-card .prog-links:last-child, #programs .prog-card .prog-links-stack { margin-top: auto !important; padding-top: 14px; border-top: 1px solid #E2E6EE; }
#programs .prog-links a, .hp-next .tlink, .pillars .tlink{ transition: color .2s; }
#programs .prog-links a { display: inline-flex; align-items: center; gap: 4px; }
#programs .prog-links a:hover { color: var(--ink); }
/* stagger reveal for card rows */
@media (prefers-reduced-motion: no-preference) {
  #programs .prog-card.reveal, .pillars .prog-card.reveal { transition-delay: 0s; }
  #programs .prog-card.reveal:nth-child(2) { transition-delay: .08s; } #programs .prog-card.reveal:nth-child(3) { transition-delay: .16s; } #programs .prog-card.reveal:nth-child(4) { transition-delay: .24s; }
  .pillars .prog-card.reveal:nth-child(2) { transition-delay: .08s; } .pillars .prog-card.reveal:nth-child(3) { transition-delay: .16s; }
}
/* upcoming rows: whole row reads as one item */
/* logos: balance the solid YC mark */
.hp-cred-row img[alt="Y Combinator"] { height: 30px !important; opacity: .85; }
.hp-cred-row li { transition: opacity .25s, filter .25s, transform .3s var(--e); }
/* pillars: quieter cards to match */
.pillars .prog-card { border: 1px solid var(--border-paper) !important; background: #FFFFFF !important; transition: border-color .3s, box-shadow .35s var(--e), transform .35s var(--e) !important; }
.pillars .prog-card:hover { transform: translateY(-3px); border-color: rgba(11,26,74,.3) !important; box-shadow: 0 22px 44px -28px rgba(11,26,74,.4) !important; }
/* buttons: consistent press and hover */
.btn { transition: background .2s, color .2s, border-color .2s, transform .2s var(--e), box-shadow .25s var(--e) !important; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-ghost:hover { border-color: var(--ink) !important; background: rgba(255, 255, 255,.7) !important; }
/* hero photo: gentle settle on load */
@media (prefers-reduced-motion: no-preference) { @keyframes hp2-settle { from { transform: scale(1.05); } to { transform: none; } } }
@media (min-width: 1101px) { #programs .prog-card .prog-p { min-height: 7.6em; } #programs .prog-card .prog-h { min-height: 2.5em; } }
@media (min-width: 1101px) { #programs .prog-card .prog-links:last-child, #programs .prog-card .prog-links-stack { min-height: 132px; } #programs .prog-card .prog-p { min-height: 0; } }
#programs .prog-card .prog-links { display: flex !important; flex-direction: column; justify-content: flex-start !important; align-items: flex-start; gap: 8px !important; }
.pillar-row .prog-card { padding: 22px 24px !important; }
.pillar-row .prog-h { margin: 0 0 6px !important; }
.pillar-row .pillar-tag { margin: 0 !important; }
#approach .sec-head .h2 { max-width: 30ch; }
/* program cards with photos */
#programs .prog-card { padding: 0 !important; overflow: hidden; }
#programs .prog-card > :not(.prog-ph) { margin-left: 20px !important; margin-right: 20px !important; }
#programs .prog-card > .eyebrow { margin-top: 16px !important; align-self: flex-start; }
#programs .prog-card > .prog-links:last-child { margin-bottom: 20px !important; }
.prog-ph { margin: 0; height: 150px; overflow: hidden; border-bottom: 1px solid var(--border-paper); }
.prog-ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--e); }
#programs .prog-card:hover .prog-ph img { transform: scale(1.05); }
.prog-ph img[src*="parents-audience"] { object-position: 50% 20%; }
@media (min-width: 1101px) { #programs .prog-card .prog-h { min-height: 0 !important; margin: 6px 0 8px !important; } #programs .prog-card .prog-p { min-height: 4.6em !important; } }
@media (min-width: 1101px) { #programs .prog-card .prog-h { margin: 6px 20px 8px !important; } }

/* ===== Homepage final loop (Sept 30): section-by-section polish, scoped to body.home ===== */
/* programs: tighter card rhythm, one photo height, hover row padding on the grade timeline */
body.home #programs .prog-card { gap: 0 !important; }
body.home #programs .prog-card > .eyebrow { margin-top: 20px !important; margin-bottom: 0 !important; }
body.home #programs .prog-card .prog-h { margin-top: 10px !important; margin-bottom: 8px !important; font-size: 21px !important; line-height: 1.2 !important; }
body.home #programs .prog-card .prog-p { margin-bottom: 18px !important; min-height: 0 !important; }
body.home #programs .prog-card > .prog-links:last-child { margin-bottom: 22px !important; padding-top: 16px !important; }
body.home .prog-ph { height: 168px; }
body.home .prog-ph img[src*="pitch-gesture"] { object-position: 60% 30%; }
body.home #programs .cs-note { margin: 18px 0 0 !important; font-size: 15px; color: var(--text-ink-soft); }
@media (min-width: 1101px) { body.home #programs .prog-card > .prog-links:last-child { min-height: 128px; } }
@media (max-width: 760px) {
  body.home #programs .prog-grid-4 { gap: 14px !important; }
  body.home .prog-ph { height: 190px; }
  body.home #programs .prog-card > .prog-links:last-child { min-height: 0; }
}

/* founding team: logos sit on an even grid on phones */
@media (max-width: 760px) {
  body.home .hp-cred-row { gap: 14px; padding: 22px 0; }
  body.home .hp-cred-row ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 18px; justify-items: start; align-items: center; }
  body.home .hp-cred-row li { min-height: 34px; }
  body.home .hp-cred-row img { max-height: 26px !important; max-width: 100%; height: auto !important; }
  body.home .hp-cred-row img[alt="Caltech"], body.home .hp-cred-row img[alt="加州理工学院"] { max-height: 20px !important; }
  body.home .hp-cred-row img[alt="Deloitte"], body.home .hp-cred-row img[alt="德勤"], body.home .hp-cred-row img[alt*="Kimi"] { max-height: 18px !important; }
  body.home .hp-cred-row img[alt*="McKinsey"], body.home .hp-cred-row img[alt="麦肯锡"] { max-height: 16px !important; }
  body.home .hp-cred-row img[alt="Y Combinator"] { max-height: 24px !important; }
  body.home .hp-cred-row img[alt*="Tsinghua"], body.home .hp-cred-row img[alt="清华大学"] { max-height: 30px !important; }
}

/* what we teach: plain three-up, no marker under the pillar names */
body.home .pillars { padding-block: clamp(64px, 8vw, 104px) !important; }
body.home .pillars .sec-head { margin-bottom: clamp(28px, 3.5vw, 40px) !important; }
body.home .pillar-row { gap: 14px !important; }
body.home .pillar-row .prog-card { padding: 24px 26px 26px !important; }
body.home .pillar-card .prog-h { font-size: 26px !important; margin: 0 0 8px !important; }
body.home .pillar-card .rh { color: var(--ink); font-style: normal; font-weight: 500; padding: 0; white-space: normal; }
body.home .pillar-card .rh::after { display: none; }
body.home .pillar-card .pillar-tag { font-family: var(--font-body); font-style: normal; font-size: 15.5px; line-height: 1.45; color: var(--text-ink-soft); }
body.home .pillars .pillars-more { margin-top: 22px; }
@media (max-width: 760px) {
  body.home .pillar-row { gap: 10px !important; }
  body.home .pillar-row .prog-card { padding: 18px 20px !important; }
  body.home .pillar-card .prog-h { font-size: 22px !important; margin-bottom: 4px !important; }
}

/* upcoming: heading sits closer to the list */
body.home .hp-next { padding-block: clamp(64px, 8vw, 104px) !important; }
body.home .hp-next .sec-head { margin-bottom: clamp(24px, 3vw, 36px) !important; }

/* contact: headline on the same scale as the other section heads, form without the dead space */
body.home .partners-lede .h2.partners-h { font-size: clamp(40px, 4.4vw, 60px); line-height: 1.04; }
body.home .partners-form .cf-status:empty { display: none; }
body.home .partners-form { padding-bottom: clamp(24px, 3vw, 34px) !important; }
@media (max-width: 760px) {
  body.home .hp-cred-lab { text-align: center; }
  body.home .hp-cred-row ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 26px; }
  body.home .hp-cred-row li { min-height: 32px; }
  body.home .hp-cred-row img[alt="Brown University"], body.home .hp-cred-row img[alt="布朗大学"] { max-height: 30px !important; }
  body.home .hp-cred-row img[alt="Harvard University"], body.home .hp-cred-row img[alt="哈佛大学"] { max-height: 28px !important; }
  body.home .hp-cred-row img[alt*="McKinsey"], body.home .hp-cred-row img[alt="麦肯锡"] { max-height: 18px !important; }
}
@media (min-width: 901px) { html[lang="zh-CN"] body.home .hero-riso-copy .lede { word-break: keep-all; } }
html[lang="zh-CN"] body.home .cf-date b { word-break: keep-all; }
html[lang="zh-CN"] body.home .hp-next .cf-ev p { max-width: 46em; }
@media (max-width: 700px) { body.home .hp-cred-row img[alt="International School of Beijing"], body.home .hp-cred-row img[alt="北京顺义国际学校"] { max-height: 32px !important; } }
@media (min-width: 701px) and (max-width: 900px) {
  body.home .hp-cred-row { grid-template-columns: 1fr; gap: 16px; }
  body.home .hp-cred-lab { text-align: center; }
  body.home .hp-cred-row ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 40px; }
}

/* Upcoming list: whole row is one target; soft panel, arrow chip, focus ring */
body.home .hp-next .cf-ev { position: relative; isolation: isolate; grid-template-columns: 260px 1fr 44px; align-items: start; padding: 26px 0; }
body.home .hp-next .cf-ev::before { content: ""; position: absolute; inset: 6px -20px; z-index: -1; border-radius: 14px; background: #fff; box-shadow: 0 14px 34px -24px rgba(11,26,74,.4); opacity: 0; transform: scale(.985); transition: opacity .3s var(--e, ease), transform .4s var(--e, ease); }
body.home .hp-next .cf-ev:hover::before, body.home .hp-next .cf-ev:focus-within::before { opacity: 1; transform: none; }
body.home .hp-next .cf-ev h3 { transition: color .25s; }
body.home .hp-next .cf-ev:hover h3, body.home .hp-next .cf-ev:focus-within h3 { color: var(--ink-2, #2F55A8); }
body.home .hp-next .cf-date { position: relative; padding-left: 0; transition: padding-left .35s var(--e, ease); }
body.home .hp-next .cf-date::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 2px; border-radius: 2px; background: var(--coral, #E59375); transform: scaleY(0); transform-origin: top; transition: transform .35s var(--e, ease); }
body.home .hp-next .cf-ev:hover .cf-date, body.home .hp-next .cf-ev:focus-within .cf-date { padding-left: 14px; }
body.home .hp-next .cf-ev:hover .cf-date::before, body.home .hp-next .cf-ev:focus-within .cf-date::before { transform: none; }
body.home .hp-next .cf-ev .tlink::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
body.home .hp-next .cf-ev .tlink:focus-visible { outline: none; }
body.home .hp-next .cf-ev .tlink:focus-visible::after { outline: 2px solid var(--ink-2, #2F55A8); outline-offset: -2px; }
body.home .hp-next .cf-go { align-self: center; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-paper); color: var(--ink); font-size: 16px; transition: background .3s, color .3s, border-color .3s, transform .4s var(--e, ease); }
body.home .hp-next .cf-ev:hover .cf-go, body.home .hp-next .cf-ev:focus-within .cf-go { background: var(--ink); border-color: var(--ink); color: #fff; transform: translateX(4px); }
@media (max-width: 900px) {
  body.home .hp-next .cf-ev { grid-template-columns: 1fr 40px; gap: 6px 16px; }
  body.home .hp-next .cf-ev > div:nth-child(2) { grid-column: 1; }
  body.home .hp-next .cf-go { grid-column: 2; grid-row: 1 / span 2; width: 40px; height: 40px; }
  body.home .hp-next .cf-ev::before { inset: 4px -12px; }
  body.home .hp-next .cf-ev:hover .cf-date, body.home .hp-next .cf-ev:focus-within .cf-date { padding-left: 0; }
  body.home .hp-next .cf-date::before { display: none; }
}
@media (hover: none) { body.home .hp-next .cf-ev:hover::before { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { body.home .hp-next .cf-ev::before, body.home .hp-next .cf-date, body.home .hp-next .cf-go { transition: none; } }
/* Upcoming: the details link sits on its own line, clear of the description */
body.home .hp-next .cf-ev p .tlink { display: block; width: max-content; margin-top: 12px; }

/* Contact: what happens next + direct contact, form as a white card */
body.home .partners-grid { align-items: start; }
body.home .hc-next { margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--border-paper); max-width: 520px; }
body.home .hc-k { margin: 0 0 14px; font: 500 10.5px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--coral-deep); }
body.home .hc-steps { list-style: none; margin: 0; padding: 0; }
body.home .hc-steps li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(11,26,74,.08); }
body.home .hc-steps li:last-child { border-bottom: 0; }
body.home .hc-n { font: 400 22px/1 var(--font-display); color: var(--ink-2, #2F55A8); }
body.home .hc-steps b { display: block; font-weight: 500; font-size: 16px; color: var(--ink); }
body.home .hc-steps span:not(.hc-n) { display: block; margin-top: 3px; font-size: 14.5px; color: var(--text-ink-soft); }
body.home .hc-direct { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 22px; }
body.home .hc-direct a { display: inline-flex; align-items: center; gap: 9px; font-weight: 500; color: var(--ink-2, #2F55A8); text-decoration: none; }
body.home .hc-direct a:hover { text-decoration: underline; text-underline-offset: 3px; }
body.home .partners .partners-fine { margin-top: 14px; }
body.home .partners .cohort-form { background: #fff; border: 1px solid var(--border-paper); border-radius: 20px; box-shadow: 0 30px 60px -40px rgba(11,26,74,.35); padding: clamp(26px, 3vw, 40px); }
body.home .partners .cohort-form input, body.home .partners .cohort-form select, body.home .partners .cohort-form textarea { background-color: #FFFFFF; }
body.home .partners .cohort-form input:focus, body.home .partners .cohort-form select:focus, body.home .partners .cohort-form textarea:focus { background-color: #fff; border-color: var(--ink-2, #2F55A8); box-shadow: 0 0 0 3px rgba(47,85,168,.12); outline: none; }

/* Program cards: no hover lift. The card clips its overflow, so lifting it left a 3px band at the bottom edge
   where the pointer fell off the raised card, dropped it back and re-hovered it in a loop (and this hover also
   drives the grade-map spotlight). Border and shadow still respond. */
#programs .prog-card:hover { transform: none; }

/* ===== Homepage opening (Oct 1, local preview) ===== */
/* The opening section fills the first screen; the photo gallery starts below the fold. */
.hero-full { min-height: 100vh !important; min-height: 100svh !important; display: flex; flex-direction: column; justify-content: center; position: relative; }
.hero-full .hero-riso-grid { width: 100%; padding-block: clamp(110px, 10vh, 140px) clamp(96px, 12vh, 130px) !important; }
@media (max-width: 900px) { .hero-full .hero-riso-grid { padding-block: 104px 124px !important; } }

/* Scroll cue: small label over a plain chevron, centered at the bottom of the opening; the chevron bobs slowly */
.hero-more { position: absolute; left: 50%; bottom: clamp(20px, 3.6vh, 36px); transform: translateX(-50%); z-index: 3;
  display: inline-flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 12px; text-decoration: none;
  font: 500 11px/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--text-ink-soft, #3A4466); transition: color .2s; }
html[lang="zh-CN"] .hero-more { letter-spacing: .1em; font-size: 12.5px; }
.hero-more-chev { display: block; color: var(--ink); animation: heroMore 2.2s ease-in-out infinite; }
.hero-more:hover, .hero-more:focus-visible { color: var(--ink); outline: none; }
@keyframes heroMore { 0%, 100% { transform: translateY(0); opacity: .75; } 50% { transform: translateY(6px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hero-more-chev { animation: none; } }
@media (max-height: 640px) { .hero-more span { display: none; } }
#gallery { scroll-margin-top: 64px; }

/* Crest: turns over once, on the first hover, to the navy face (beige ink on a navy disc) and stays there */

/* Opening layout (desktop): the crest sits a little further left and the copy gets more of the width,
   with a larger headline and lede so the type holds its own next to the navy crest */
@media (min-width: 901px) {
  .hero-full .hero-riso-grid { max-width: 1360px; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr) !important; column-gap: clamp(36px, 3.6vw, 64px) !important; }
  .hero-full .hero-art { justify-content: flex-start; padding-left: clamp(0px, 1.5vw, 24px); }
  .hero-full .hero-riso-h1 { font-size: clamp(46px, 4.4vw, 70px); }
  .hero-full .hero-riso-copy .lede { font-size: clamp(17px, 1.3vw, 20px); max-width: 58ch !important; }
}
