:root{
  --paper:#f3f6fa;
  --ink:#102340;
  --muted:#465a73;
  --line:#cdd8e6;
  --blue:#e1ebf9;
  --gold:#275b98;
  --night:#0a1a32;
}
body{overflow-x:clip;font-family:"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif}
header{background:#f3f6faf5;backdrop-filter:blur(16px)}
.brand{text-decoration:none;letter-spacing:.03em}
.hero{background:var(--night);color:#f6faff;min-height:clamp(500px,78svh,850px)}
.hero>img{inset:0 0 0 auto;width:77%;object-position:72% center}
.hero::after{background:linear-gradient(90deg,#0a1a32 3%,#0a1a32 24%,#0a1a32df 39%,#0a1a3250 64%,#0a1a3218 100%)}
.hero .eyebrow,.hero small{color:#bdd8ff}
.hero p{color:#e0ecfc}
.hero h1{font-size:clamp(3.5rem,8.5vw,7.6rem);letter-spacing:-.065em}
.chapter{padding-top:clamp(3.8rem,8vw,7rem)}
.chapter>.eyebrow{display:flex;align-items:center;gap:.7rem}
.chapter>.eyebrow::before{content:"";width:1.75rem;height:2px;background:#4274b2}
h2{max-width:17em}
.feature{gap:clamp(1.5rem,5.5vw,5.4rem)}
blockquote{background:transparent;border-inline-start:2px solid #4475b4;padding:.15rem 0 .15rem 1rem;color:#254f80}
figure img{border-radius:4px}
figure a img{transition:box-shadow .2s}
figure a:hover img{box-shadow:0 0 0 3px #4278b05a}
.grid img{background:#e4ebf2}
.grid .wide img{aspect-ratio:auto}
#study .grid{gap:1.45rem}
#study figure{background:#fff;border:1px solid var(--line);padding:.65rem}
#study figcaption{padding:.25rem .2rem}
#tools{position:relative;isolation:isolate;color:#f6faff;border:none}
#tools::before{content:"";position:absolute;z-index:-1;inset:0 calc((100% - 100vw)/2);background:radial-gradient(ellipse at 75% 34%,#173b65,var(--night) 68%);clip-path:inset(0)}
#tools .eyebrow,#tools blockquote{color:#c7ddfb}
#tools .workflow{background:#ffffff0d;border:1px solid #a2c6f74d;border-radius:16px}
#tools .workflow h3{color:#e4efff}
#tools .arrow{color:#a8d1ff}
#tools .logos span{border-radius:16%;box-shadow:0 5px 14px #0002}
#learning figure{background:white;border:1px solid var(--line);padding:.9rem}
@media(max-width:700px){
  .hero{min-height:0}
  .hero>img{width:100%}
  .hero h1{font-size:clamp(2.9rem,10vw,4.5rem);letter-spacing:-.055em}
  .hero h1 br{display:initial}
  #study .grid{gap:.65rem}
  #study figure{padding:.35rem}
}
@media(prefers-reduced-motion:reduce){figure a img{transition:none}}

.story{padding-top:5rem}
.story-cover{display:grid;grid-template-columns:minmax(0,1.22fr) minmax(0,1fr);align-items:center;background:var(--night);color:white;border-radius:12px;overflow:hidden}
.story-cover>img{display:block;width:100%;height:100%;object-fit:cover;object-position:72%}
.story-cover>div{padding:clamp(1.25rem,4vw,3.25rem)}
.story-cover .eyebrow,.story-cover nav{color:#bedaff}
.story-cover h2{margin:.33em 0 .45em}
.story-cover nav{margin-top:1.2rem;gap:1rem}
.beats{margin:0;padding-left:1.9rem}
.beats li{padding:.55rem 0 .75rem .25rem}
.beats li+li{border-top:1px solid var(--line)}
.beats li::marker{color:#3266a8;font-weight:700}
.beats p{color:var(--muted);margin-top:.25rem}
.story-end{padding:3rem 0}
.story-end p,.story-end small{margin-top:.7rem;display:block;color:var(--muted)}
@media(max-width:700px){.story-cover{grid-template-columns:1fr}.story-cover>img{height:auto;object-fit:contain}}
.story figure{position:relative}.story figure::before{content:"";position:absolute;top:12px;left:12px;width:42px;height:45px;background:url("assets/bird.png") center/contain no-repeat;pointer-events:none}
details{margin:1rem 0;padding:1rem;border:1px solid var(--line);border-radius:8px}summary{cursor:pointer;font-weight:700}details[open] summary{margin-bottom:1rem}
.cadence,.competition{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.85rem;padding:0;list-style:none}
.cadence li,.competition div{padding:1rem;background:var(--blue);border-radius:8px}.cadence strong,.competition dt{display:block;font-weight:750}.competition dd{margin:.3rem 0 0}
@media(max-width:700px){.cadence,.competition{grid-template-columns:repeat(2,minmax(0,1fr))}}

.evidence-graphic { margin: 1.5rem 0 2rem; }
.evidence-graphic img { display: block; width: 100%; height: auto; max-height: none; }
.table-wrap { overflow-x: auto; margin: 1rem 0; }
.table-wrap table { width: 100%; border-collapse: collapse; text-align: left; }
.table-wrap :is(th, td, caption) { padding: .7rem 1rem; border-bottom: 1px solid #688ca255; }

.photo-section { margin: 2rem 0; }
.grid.source-scores,.grid.photo-only,.grid.teacher-grid,.grid.method-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.photo-only img,.teacher-grid img { aspect-ratio: 4 / 3; width:100%; object-fit: cover; }
.photo-only figcaption { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.team-hero { margin: 1rem 0 1.5rem; }
.team-hero img { width:100%; max-height:none; height:auto; display:block; }
.method-grid { align-items:end; }
.method-grid img,.source-scores img { width:100%; object-fit:contain; }
@media (max-width:700px) {
  .grid.source-scores,.grid.photo-only,.grid.teacher-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .grid.method-grid { grid-template-columns: 1fr; }
}

/* Presentation typography and spacing */
main :is(h1,h2,h3,p,blockquote,figcaption,summary) {
  line-break: strict;
  word-break: normal;
}
main :is(h1,h2,h3) { text-wrap: balance; }
main h1 { line-height: 1.16; }
main h2 { line-height: 1.25; }
main h3 { line-height: 1.38; letter-spacing: 0; }
main :is(p,blockquote,dd) { line-height: 1.8; }
main figcaption { line-height: 1.6; padding-top: .65rem; }
.chapter > h3 { margin: clamp(2.25rem,5vw,4rem) 0 1.25rem; }
.chapter > .grid + p,.photo-section .grid + p { margin-top: 1.25rem; }
.photo-section > h3,.staff-intro > h3 { margin: 0 0 .9rem; }
.photo-section p + .grid { margin-top: 1.5rem; }
.method-grid { align-items: start; gap: 1.25rem; }
.method-grid figure > a { display: block; padding: clamp(.65rem,2vw,1.25rem); background: #fff; border-radius: 8px; }
.staff-intro { margin: clamp(2.5rem,5vw,4rem) 0 1.5rem; max-width: 62rem; }
.section-labels { display: flex; flex-wrap: wrap; gap: .55rem .75rem; padding: 0; margin: 0 0 1.25rem; list-style: none; }
.section-labels li { padding: .4rem .8rem; border-radius: 6px; background: var(--blue); color: var(--gold); white-space: nowrap; line-height: 1.45; font-weight: 650; }

.hero h1 { max-width:none; font-size:clamp(2rem,7.5vw,6.25rem); letter-spacing:-.04em; }
.story-cover h2 { font-size:clamp(1.65rem,3.5vw,3.3rem); }
main .feature h3 { font-size:clamp(1.2rem,2.05vw,1.9rem); }
main :is(p,blockquote,figcaption) { text-wrap:pretty; }
.teacher-grid img { aspect-ratio:3 / 2; object-fit:contain; }
.contest-guide { margin:3rem 0; }
.contest-list { margin:1.4rem 0 0; padding:0 1.3rem; background:#fff; border:1px solid var(--line); border-radius:12px; }
.contest-list > div { display:grid; grid-template-columns:minmax(7.2rem,22%) 1fr; gap:1rem; padding:1rem .2rem; }
.contest-list > div + div { border-top:1px solid var(--line); }
.contest-list dt { color:var(--gold); font-weight:750; }
.contest-list dd { margin:0; }
.contest-list dd p { margin:.2rem 0 0; color:var(--muted); }
@media(max-width:540px) {
  .contest-list > div { grid-template-columns:1fr; gap:.25rem; }
}
