/* Homepage art direction. Shared navigation and player styles remain independent. */
.index-page { --home-muted: #a5b3cb; --home-line: rgba(157,179,219,.17); --home-surface: #131e33; }
.light .index-page { --home-muted: #53627a; --home-line: rgba(51,65,85,.17); --home-surface: #fff; }
.index-page *, .index-page *::before, .index-page *::after { box-sizing: border-box; }
.index-page { margin: 0; }
.index-page .hidden { display: none!important; }
.index-page main { overflow: clip; }
.index-page button, .index-page a { -webkit-tap-highlight-color: transparent; }
.index-page a { text-decoration: none; }
.index-page button { font-family: inherit; }
.index-page .home-shell { width: min(1280px, calc(100% - 112px)); margin-inline: auto; }
.index-page .home-kicker { font-size: 10px; line-height: 1.7; font-weight: 600; letter-spacing: .16em; color: var(--blue); margin: 0 0 24px; }
.index-page h1, .index-page h2, .index-page h3, .index-page p { margin-top: 0; }
.index-page .home-hero { position: relative; isolation: isolate; border-bottom: 1px solid var(--home-line); background: radial-gradient(ellipse at 76% 42%,rgba(72,70,160,.15),transparent 54%),radial-gradient(ellipse at 3% 4%,rgba(32,91,132,.11),transparent 52%); }
.hero-orbit { position: absolute; z-index: -1; top: -450px; right: -170px; width: 1150px; height: 1150px; border: 1px solid var(--home-line); border-radius: 50%; opacity: .35; pointer-events: none; }
.hero-orbit::before, .hero-orbit::after { content: ''; position: absolute; inset: 90px; border: 1px solid var(--home-line); border-radius: 50%; }
.hero-orbit::after { inset: 180px; }
.hero-stage { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); grid-template-areas: "copy showcase" "author showcase"; grid-template-rows: 1fr auto; gap: 36px clamp(32px,4.5vw,72px); align-items: start; padding-block: 64px 48px; }
.home-hero-copy { grid-area: copy; align-self: center; min-width: 0; container-type: inline-size; position: relative; z-index: 1; }
.home-hero-copy .home-kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.home-hero-copy .home-kicker>span { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 16px rgba(52,211,153,.5); }
.index-page .home-hero h1 { font-size: clamp(32px,14cqi,84px); line-height: 1.06; font-weight: 600; letter-spacing: -.065em; margin-bottom: 26px; }
.hero-title-line { display: block; white-space: nowrap; }
.home-hero h1 .hero-title-accent { color: var(--blue); background: linear-gradient(100deg,var(--blue) 8%,#a8a8ff 95%); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.light .home-hero h1 .hero-title-accent { background-image: linear-gradient(100deg,#2563eb,#7c3aed); }
.hero-hook { font-size: clamp(24px,2vw,28px); line-height: 1.35; letter-spacing: -.035em; margin-bottom: 18px; }
.hero-summary { font-size: 15px; line-height: 1.8; max-width: 450px; color: var(--home-muted); margin-bottom: 26px; }
.home-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.index-page .home-button { display: inline-flex; align-items: center; justify-content: center; gap: 24px; background: linear-gradient(115deg,#2563eb,#6741cf); color: #fff; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 16px 23px; font-size: 13px; line-height: 1.5; font-weight: 600; box-shadow: 0 8px 32px rgba(48,62,193,.2); transition: box-shadow .2s, transform .2s; }
.index-page .home-button:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(57,78,216,.35); }
.home-button>span { font-size: 20px; line-height: 1; }
.home-text-link { font-size: 12px; font-weight: 500; color: var(--text); padding-block: 13px; }
.home-text-link>span { margin-left: 10px; color: var(--blue); }
.index-page .hero-welcome { color: var(--home-muted); font-size: 11px; margin: 17px 0 0; }
.hero-author { grid-area: author; display: flex; align-items: center; gap: 20px; padding-top: 24px; border-top: 1px solid var(--home-line); }
.hero-author>div { min-width: 0; }
.hero-author img { width: 72px; height: 72px; flex-shrink: 0; border-radius: 50%; object-fit: cover; }
.index-page .hero-author p { font-size: 14px; line-height: 1.7; color: var(--home-muted); margin: 0 0 8px; }
.index-page .hero-author p:first-child { font-size: 15px; }
.index-page .hero-author p:last-child { margin-bottom: 0; }
.hero-author a { color: var(--text); font-weight: 600; }
.hero-author a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* A permanently navy canvas keeps the artwork and graph legible in both themes. */
.method-showcase { grid-area: showcase; color-scheme: dark; color: #edf3ff; --blue: #74ceff; --purple: #c4acff; min-width: 0; width: 100%; position: relative; overflow: hidden; border: 1px solid #35445e; border-radius: 18px; background: #0c1629; box-shadow: 0 22px 65px rgba(4,10,25,.24); }
.showcase-heading { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid #29364d; font: 500 10px/1.5 'JetBrains Mono',monospace; letter-spacing: .14em; color: #bdcce3; }
.showcase-count { color: #74ceff; }
.scene-deck { display: grid; }
.method-scene { grid-area: 1 / 1; display: flex; flex-direction: column; position: relative; isolation: isolate; margin: 0; min-width: 0; min-height: 0; }
.showcase-enhanced .method-scene { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .45s ease, visibility 0s .45s; }
.showcase-enhanced .method-scene.is-active { opacity: 1; visibility: visible; pointer-events: auto; z-index: 1; transition: opacity .45s ease, visibility 0s; }
.method-scene:focus-visible { outline-offset: -4px; }
.scene-art { position: absolute; z-index: -2; top: 0; left: 0; width: 100%; height: 340px; object-fit: cover; object-position: center top; pointer-events: none; }
.method-scene::before { content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none; background: linear-gradient(180deg,rgba(12,22,41,.1) 8%,rgba(12,22,41,.35) 22%,#0c1629 55%),linear-gradient(90deg,rgba(12,22,41,.94),rgba(12,22,41,.5) 43%,transparent 80%); }
.scene-intro { min-height: 150px; padding: 22px 24px 12px; }
.scene-method { font-size: 11px; line-height: 1.5; font-weight: 600; color: #93d8ff; margin-bottom: 12px; }
.index-page .method-scene h2 { font-size: clamp(24px,2.1vw,30px); line-height: 1.2; font-weight: 500; letter-spacing: -.035em; margin: 0; color: #fff; text-shadow: 0 2px 15px #0c1629; }
.scene-graph { position: relative; padding-inline: 20px; }
.assignment-diagram { width: 100%; max-width: 460px; height: auto; display: block; margin-inline: auto; overflow: visible; }
.graph-label { font: 500 14px Inter,sans-serif; fill: #e1eafa; }
.population-dot { fill: #d2ddef; }
.graph-stem, .graph-bracket { fill: none; stroke: #8295b4; stroke-width: 1.2; }
.assignment-pill { fill: #1b2942; stroke: #697a9d; }
.graph-assignment { font-size: 13px; }
.graph-branch { fill: none; stroke-width: 1.8; }
.graph-branch-treatment { stroke: #74ceff; }
.graph-branch-comparison { stroke: #c4acff; }
.graph-group { stroke-width: 1; }
.treatment-group { fill: #102b42; stroke: #386c8d; }
.comparison-group { fill: #25233f; stroke: #655487; }
.treatment-label, .treatment-dot { fill: #8bd6ff; }
.comparison-label, .comparison-dot { fill: #cbb6ff; }
.graph-outcomes { font: 12px Inter,sans-serif; fill: #bfcce1; }
.scene-caption { display: flex; flex: 1; flex-direction: column; padding: 15px 25px 20px; }
.index-page .scene-takeaway { font-size: 16px; line-height: 1.5; font-weight: 500; letter-spacing: -.02em; margin: 0 0 7px; }
.index-page .scene-explanation { color: #bdcce3; font-size: 12px; line-height: 1.8; margin: 0 0 10px; }
.scene-chapter { margin-top: auto; display: inline-flex; align-items: center; min-height: 44px; gap: 18px; font-size: 12px; font-weight: 600; color: #8bd6ff; }
.scene-chapter:hover { text-decoration: underline; text-underline-offset: 4px; }
.index-page .scene-note { color: #a7b8d2; font-size: 10px; line-height: 1.6; margin: 5px 0 0; }
.showcase-controls { padding: 15px 25px; border-top: 1px solid #29364d; background: #101c31; }
.method-selectors { display: grid; grid-template-columns: .8fr 1.7fr .8fr .8fr .9fr; gap: 6px; }
.method-selector { border: 1px solid #394962; border-radius: 6px; padding: 8px 6px; min-height: 44px; background: transparent; color: #a7b8d2; font-size: 11px; line-height: 1.4; font-weight: 500; }
.method-selector[aria-selected="true"] { color: #e7f6ff; background: #214666; border-color: #74ceff; cursor: pointer; box-shadow: inset 0 -2px #74ceff; }
.method-selector { cursor: pointer; }
.method-selector:hover { border-color: #74ceff; color: #e7f6ff; }
.method-showcase :focus-visible { outline: 3px solid #d4c4ff; outline-offset: 3px; }
.showcase-playback { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
#showcase-play { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex-shrink: 0; min-height: 44px; min-width: 72px; padding: 7px 10px; border: 1px solid #394962; border-radius: 6px; background: transparent; color: #e7f6ff; font-size: 11px; cursor: pointer; }
#showcase-play:hover { border-color: #74ceff; }
.index-page #showcase-status { color: #a7b8d2; font-size: 10px; line-height: 1.6; margin: 0; }
.plot-text { font: 500 15px Inter,sans-serif; fill: #c6d3e8; }
.graph-subtitle { font-size: 14px; }
.method-plot .result-value { font-size: 22px; }
.scene-note a { color: #8bd6ff; text-decoration: underline; text-underline-offset: 3px; }
.plot-axis { fill: none; stroke: #8c9eb9; stroke-width: 1.2; }
.plot-grid { fill: none; stroke: #293850; stroke-dasharray: 3 6; }
.plot-dot { fill: #8bd6ff; opacity: .8; }
.plot-line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.line-blue { stroke: #8bd6ff; }
.line-purple { stroke: #cbb6ff; }
.line-green { stroke: #70e3b5; }
.label-blue { fill: #8bd6ff; }
.label-purple, .dot-purple { fill: #cbb6ff; }
.label-green { fill: #70e3b5; }
.outcome-group { fill: #122e30; stroke: #397e71; }
.policy-marker { stroke: #b0bfd6; stroke-width: 1.2; stroke-dasharray: 4 5; }
.cutoff-band { fill: #70e3b5; opacity: .05; }
.cutoff-open { fill: #0c1629; stroke: #8bd6ff; stroke-width: 2; }
.counterfactual { stroke-dasharray: 7 6; }
.assignment-playing .plot-reveal { animation: group-reveal .5s ease-out both; }
.assignment-playing .graph-branch { animation: branch-reveal .6s ease-out both; }
.assignment-playing .assigned-group { animation: group-reveal .45s .15s ease-out both; }
@keyframes branch-reveal { from { stroke-dasharray: 150; stroke-dashoffset: 150; } to { stroke-dasharray: 150; stroke-dashoffset: 0; } }
@keyframes group-reveal { from { opacity: .2; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.hero-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-block: 25px; border-top: 1px solid var(--home-line); font-size: 10px; color: var(--home-muted); }
.hero-bottom p { margin: 0; }
.hero-bottom p>span { margin-inline: 15px; opacity: .4; }
.hero-bottom strong { color: var(--text); font-size: 14px; font-weight: 500; margin-right: 4px; }
.hero-bottom a { color: var(--home-muted); }
.hero-bottom a>span { color: var(--blue); margin-left: 25px; }
.learning-path { padding-block: 100px 110px; display: grid; grid-template-columns: .8fr 2fr; gap: 70px; }
.index-page .section-heading-home h2 { font-size: 38px; font-weight: 500; line-height: 1.2; letter-spacing: -.045em; margin: 0 0 20px; }
.section-heading-home>p:last-child { font-size: 13px; line-height: 1.9; color: var(--home-muted); }
.section-heading-home .home-kicker { font-size: 9px; margin-bottom: 18px; }
.learning-steps { list-style: none; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 30px; padding: 12px 0 0; margin: 0; }
.learning-steps li { border-top: 1px solid var(--home-line); padding-top: 22px; display: flex; flex-direction: column; align-items: start; }
.step-number { font: 9px/1.5 'JetBrains Mono',monospace; color: var(--blue); margin-bottom: 28px; letter-spacing: .08em; }
.learning-steps li:nth-child(2) .step-number { color: var(--purple); }
.learning-steps li:nth-child(3) .step-number { color: var(--green); }
.learning-steps h3 { font-size: 16px; line-height: 1.5; font-weight: 500; letter-spacing: -.025em; margin-bottom: 14px; }
.learning-steps p { font-size: 12px; line-height: 1.9; color: var(--home-muted); margin-bottom: 22px; }
.learning-steps a { color: var(--text); font-size: 10px; font-weight: 500; margin-top: auto; padding-block: 10px; }
.learning-steps a span { color: var(--blue); margin-left: 4px; }
.home-curriculum { padding-block: 100px; border-block: 1px solid var(--home-line); background: linear-gradient(180deg,rgba(46,66,99,.11),transparent 45%); }
.curriculum-heading { display: flex; justify-content: space-between; align-items: end; gap: 50px; margin-bottom: 40px; }
.index-page .curriculum-heading h2 { font-size: 60px; margin-bottom: 0; }
.curriculum-heading h2 span { color: var(--home-muted); }
.curriculum-heading>p { max-width: 330px; margin: 0 0 5px; }
/* Live type and vector plots keep the overview sharp at every screen size. */
.methods-overview { color-scheme: dark; color: #f4f7ff; background: #0b1425; border: 1px solid #2e4160; border-radius: 20px; margin-bottom: 38px; overflow: hidden; box-shadow: 0 18px 45px rgba(4,10,25,.16); }
.overview-heading { display: flex; align-items: center; gap: 16px; padding: 26px 30px; background: linear-gradient(110deg,#132c46,#191c39); }
.index-page .overview-title { margin: 0; font-size: clamp(22px,2.1vw,30px); font-weight: 700; line-height: 1.2; letter-spacing: -.035em; }
.overview-mark { color: #6edaff; font-size: 40px; line-height: 1; }
.methods-overview small { display: block; font-size: 13px; font-weight: 400; line-height: 1.5; color: #c0cee4; margin-top: 6px; }
.methods-overview :focus-visible { outline: 3px solid #7ddaff; outline-offset: -4px; }
.overview-content { padding: 28px; }
.index-page .overview-intro { font-size: clamp(18px,1.65vw,24px); line-height: 1.45; color: #c0cee4; letter-spacing: -.025em; margin: 0 0 26px; }
.overview-intro span { color: #f4f7ff; font-weight: 600; }
.overview-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 14px; }
.overview-card { --method-accent: #61d6ff; min-width: 0; padding: 22px 16px 24px; border-radius: 12px; border-top: 4px solid var(--method-accent); background: linear-gradient(155deg,color-mix(in srgb,var(--method-accent) 13%,#142137),#142137 70%); }
.overview-ols { --method-accent: #c5a3ff; }
.overview-iv { --method-accent: #5ce4b5; }
.overview-rd { --method-accent: #ffc163; }
.overview-did { --method-accent: #ff939d; }
.overview-card-heading { display: flex; align-items: center; gap: 12px; color: var(--method-accent); }
.overview-number { font: 500 13px/1 'JetBrains Mono',monospace; opacity: .85; }
.index-page .overview-card h3 { margin: 0; font-size: 32px; font-weight: 700; line-height: 1.2; letter-spacing: -.04em; }
.index-page .overview-method-name { color: #d1dded; font-size: 12px; line-height: 1.5; min-height: 36px; margin: 8px 0 14px; }
.overview-plot { display: block; width: 100%; max-width: 260px; height: auto; margin: 0 auto 16px; color: var(--method-accent); overflow: visible; }
.overview-axis { fill: none; stroke: #70829d; stroke-width: 1.5; }
.overview-stroke { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.overview-dashed { stroke-dasharray: 6 7; }
.overview-plot text { fill: #d1dded; font: 14px Inter,sans-serif; text-anchor: middle; }
.overview-plot .overview-node { fill: var(--method-accent); font-size: 22px; font-weight: 600; }
.overview-equation { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 72px; color: #fff; font: 19px/1.5 Georgia,'Times New Roman',serif; white-space: nowrap; letter-spacing: -.035em; }
.overview-equation sub, .overview-equation sup { font-size: .65em; }
.overview-limit { display: inline-flex; position: relative; flex-direction: column; align-items: center; }
.methods-overview .overview-limit small { position: absolute; top: 100%; margin: -4px 0 0; color: #d1dded; font: 10px/1 Georgia,serif; letter-spacing: 0; }
.overview-equation-stacked { flex-direction: column; gap: 0; font-size: 17px; }
.overview-fraction { display: inline-flex; flex-direction: column; text-align: center; line-height: 1.4; }
.overview-fraction>span:first-child { border-bottom: 1px solid #b0bfd6; }
.index-page .overview-assumption { color: #d1dded; font-size: 14px; line-height: 1.65; margin: 18px 0 0; }
.overview-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 24px; }
.index-page .overview-footer p { margin: 0; color: #c0cee4; font-size: 11px; line-height: 1.7; }
.overview-footer a { color: #8bddff; font-size: 12px; padding-block: 8px; }
.overview-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width:1190px) {
  .overview-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .overview-card { grid-column: span 2; }
  .overview-card:nth-last-child(-n+2) { grid-column: span 3; }
  .overview-equation { font-size: 22px; }
  .overview-equation-stacked { font-size: 19px; }
}
@media (min-width:701px) and (max-width:900px) {
  .overview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .overview-card, .overview-card:nth-last-child(-n+2) { grid-column: auto; }
  .overview-card:last-child { grid-column: 1 / -1; }
}
@media (max-width:700px) {
  .overview-heading { padding: 22px 20px; gap: 12px; }
  .overview-mark { font-size: 30px; }
  .methods-overview small { font-size: 12px; }
  .overview-content { padding: 22px 16px; }
  .overview-grid { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .overview-card, .overview-card:nth-last-child(-n+2) { grid-column: auto; padding: 22px; }
  .index-page .overview-method-name { min-height: 0; font-size: 13px; }
  .overview-plot { max-width: 240px; margin-bottom: 4px; }
  .overview-equation { min-height: 62px; }
  .index-page .overview-assumption { margin-top: 12px; font-size: 15px; }
  .overview-footer { gap: 4px; }
  .overview-footer p span { display: block; }
}
.chapter-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px; }
.index-page .chapter-card { padding: 30px; border: 1px solid var(--home-line); border-radius: 16px; background: var(--home-surface); gap: 0; scroll-margin-top: 100px; box-shadow: 0 12px 45px rgba(0,0,0,.06); }
.index-page .chapter-card:hover { border-color: color-mix(in srgb,var(--blue) 45%,var(--home-line)); box-shadow: 0 12px 45px rgba(0,0,0,.06); }
.chapter-top { display: flex; align-items: center; gap: 13px; margin-bottom: 25px; }
.chapter-number { font: 20px/1.2 'JetBrains Mono',monospace; color: var(--blue); letter-spacing: -.08em; }
.chapter-method { font-size: 11px; font-weight: 500; line-height: 1.5; color: var(--home-muted); }
.chapter-tag { font-size: 9px; font-weight: 500; padding: 5px 9px; border: 1px solid color-mix(in srgb,var(--green) 35%,transparent); color: var(--green); border-radius: 20px; margin-left: auto; white-space: nowrap; }
.chapter-card:nth-child(3n+2) .chapter-number { color: var(--purple); }
.chapter-card:nth-child(3n) .chapter-number { color: var(--green); }
.index-page .chapter-story h3 { font-size: 30px; line-height: 1.24; font-weight: 500; letter-spacing: -.04em; margin: 0 0 16px; max-width: 450px; min-height: 75px; }
.chapter-story>p { font-size: 13px; line-height: 1.9; color: var(--home-muted); margin-bottom: 24px; min-height: 75px; max-width: 510px; }
.index-page .chapter-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16/10; height: auto; padding: 0; border: 1px solid var(--home-line); background: #0e1729; border-radius: 8px; cursor: zoom-in; margin: 0 0 23px; }
.index-page .chapter-thumb img { object-fit: contain; transition: transform .4s ease; }
.index-page .chapter-thumb:hover img { transform: scale(1.025); }
.art-caption { position: absolute; left: 0; bottom: 0; right: 0; padding: 30px 15px 12px; color: #e2e8f0; background: linear-gradient(transparent,rgba(9,17,32,.95)); font-size: 10px; display: flex; justify-content: space-between; }
.chapter-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.index-page .chapter-action { display: inline-flex; gap: 7px; align-items: center; padding: 10px 12px; min-height: 40px; font-size: 11px; border: 1px solid var(--home-line); border-radius: 6px; color: var(--home-muted); font-weight: 500; }
.index-page .chapter-action-primary { color: var(--text); background: color-mix(in srgb,var(--blue) 8%,transparent); border-color: color-mix(in srgb,var(--blue) 25%,transparent); }
.index-page .chapter-action:hover { color: var(--blue); border-color: var(--blue); }
.chapter-action>span { color: var(--blue); font-size: 14px; }
.index-page .podcast-launch-row { margin: 0; padding-top: 15px; border-top: 1px solid var(--home-line); max-width: none; }
.index-page .chapter-listen { display: flex; justify-content: start; gap: 10px; width: 100%; min-height: 40px; border: none; background: transparent; box-shadow: none; padding: 5px 0; color: var(--text); border-radius: 0; font: 500 12px/1.5 Inter,sans-serif; text-align: left; }
.chapter-listen>span:first-child { font-size: 22px; color: var(--purple); }
.chapter-listen .listen-arrow { margin-left: auto; color: var(--home-muted); }
.index-page .chapter-listen:hover { transform: none; color: var(--blue); }
.index-page .chapter-card:has(.podcast-player:not([hidden])) { grid-column: 1/-1; }
.index-page .chapter-card:has(.podcast-player:not([hidden]))>.chapter-thumb { max-width: 540px; }
.index-page .chapter-card:has(.podcast-player:not([hidden])) .chapter-story h3, .index-page .chapter-card:has(.podcast-player:not([hidden])) .chapter-story>p { min-height: 0; max-width: 720px; }
.index-page .chapter-card .podcast-player { margin-top: 22px; scroll-margin-top: calc(var(--site-header-height) + 20px); }
.curriculum-credit { font-size: 10px; line-height: 2; color: var(--home-muted); margin: 30px 0 0; text-align: center; }
.curriculum-credit a { color: var(--text); }
.home-practice { display: grid; grid-template-columns: .85fr 1.2fr; gap: 90px; align-items: center; padding-block: 110px 70px; }
.index-page .practice-copy h2 { font-size: 52px; line-height: 1.15; letter-spacing: -.045em; font-weight: 500; margin-bottom: 25px; }
.practice-copy h2>span { color: var(--blue); }
.practice-copy>p:not(.home-kicker) { font-size: 13px; line-height: 1.9; color: var(--home-muted); margin-bottom: 20px; }
.practice-copy .home-button { margin-top: 8px; }
.practice-note { display: block; font-size: 10px; color: var(--home-muted); margin-top: 16px; }
.home-practice figure { margin: 0; }
.home-practice .media-frame { display: block; width: 100%; padding: 0; border: 1px solid var(--home-line); }
.home-practice figcaption { font-size: 12px; line-height: 1.9; padding-top: 20px; }
.home-practice figcaption>span { color: var(--home-muted); font-size: 10px; }
.home-practice figcaption a { color: var(--blue); }
.toolkit-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-block: 1px solid var(--home-line); padding-block: 25px; gap: 20px; margin-bottom: 95px!important; }
.toolkit-links>a { display: flex; align-items: center; gap: 20px; padding: 15px 20px; color: var(--text); }
.toolkit-links>a+a { border-left: 1px solid var(--home-line); }
.toolkit-links>a>span:last-child { margin-left: auto; color: var(--blue); }
.toolkit-icon { color: var(--purple); font-size: 29px; font-weight: 300; }
.toolkit-links small, .toolkit-links strong, .toolkit-links a>span:nth-child(2)>span { display: block; }
.toolkit-links small { font-size: 8px; color: var(--home-muted); letter-spacing: .1em; margin-bottom: 8px; }
.toolkit-links strong { font-size: 18px; line-height: 1.4; font-weight: 500; letter-spacing: -.02em; margin-bottom: 7px; }
.toolkit-links a>span:nth-child(2)>span { color: var(--home-muted); font-size: 10px; }
.toolkit-links a:hover strong { color: var(--blue); }
.home-resources { padding-block: 80px 95px; border-top: 1px solid var(--home-line); background: color-mix(in srgb,var(--bg-card) 20%,transparent); }
.home-resources .home-kicker { margin-bottom: 18px; }
.index-page .resources-title { font-size: 44px; line-height: 1.2; font-weight: 500; letter-spacing: -.045em; margin-bottom: 18px; }
.home-resources .text-muted { color: var(--home-muted); }
.home-resources .filter-pill { border-radius: 6px; font-size: 11px; padding: 10px 13px; min-height: 40px; }
.home-resources #resource-filters { margin-top: 35px; margin-bottom: 30px; }
.home-resources .resource-card { padding: 25px; border-radius: 10px; background: var(--home-surface); border-color: var(--home-line); }
.home-resources .resource-title { font-size: 17px; line-height: 1.5; letter-spacing: -.025em; font-weight: 500; }
.home-resources .resource-desc { color: var(--home-muted); font-size: 12px; line-height: 1.9; }
.home-resources .resource-link { font-size: 11px; }
.home-resources .resource-cat-icon { font-size: 14px; width: 28px; height: 28px; }
.resource-fallback { text-align: center; font-size: 13px; padding: 20px; }
.resource-fallback a { color: var(--blue); text-decoration: underline; }
.home-footer { border-top: 1px solid var(--home-line); background: radial-gradient(ellipse at 50% 0%,rgba(87,71,165,.12),transparent 65%); }
.footer-invitation { text-align: center; padding-block: 85px 80px; }
.index-page .footer-invitation h2 { font-size: 46px; line-height: 1.2; font-weight: 500; letter-spacing: -.045em; margin: 0 0 30px; }
.footer-details { display: flex; justify-content: space-between; align-items: start; gap: 40px; border-top: 1px solid var(--home-line); padding-block: 35px; }
.footer-author { display: flex; align-items: start; gap: 17px; }
.footer-author img { border-radius: 50%; }
.footer-author p, .footer-feedback p { font-size: 11px; line-height: 1.8; color: var(--home-muted); margin: 0 0 7px; }
.footer-author a { color: var(--text); }
.footer-feedback strong { font-size: 12px; font-weight: 500; display: block; margin-bottom: 8px; }
.footer-feedback>a { color: var(--blue); font-size: 11px; }
.footer-credits { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding-block: 22px; border-top: 1px solid var(--home-line); font-size: 9px; color: var(--home-muted); }
.footer-credits p { margin: 0; line-height: 1.8; }
.footer-credits a { color: var(--home-muted); }
.footer-credits a:hover { color: var(--blue); }
.index-page :is(.home-text-link,.learning-steps a,.footer-feedback a,.curriculum-credit a):hover { text-decoration: underline; text-underline-offset: 4px; }
.index-page .fade-in-up { opacity: 1; transform: none; }
.index-page .home-reveal { animation: home-reveal .55s ease both; }
@keyframes home-reveal { from { opacity: .4; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.index-page :is(#learning-path,#curriculum,#ai-notebooks,#resources) { scroll-margin-top: calc(var(--site-header-height) + 24px)!important; }
.index-page #video-modal button, .index-page #image-modal button { min-height: 44px; min-width: 44px; }
@media (min-width:1600px) { .hero-stage { padding-block: 80px 56px; } }
@media (max-width:1150px) {
  .index-page .home-shell { width: calc(100% - 64px); }
  .hero-stage { column-gap: 36px; padding-block: 48px 40px; }
  .hero-hook { font-size: 24px; }
  .learning-path { grid-template-columns: 1fr; gap: 25px; padding-block: 75px; }
  .learning-path .section-heading-home { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; align-items: end; }
  .learning-path .home-kicker { grid-column: 1/-1; }
  .learning-steps { gap: 40px; }
  .home-practice { gap: 50px; }
  .toolkit-links>a { gap: 12px; padding-inline: 7px; }
}
/* Stack before either column becomes too narrow; keep every section on one rail. */
@media (max-width:1000px) {
  .index-page .home-hero .home-shell { width: min(680px,calc(100% - 64px)); }
  .hero-stage { grid-template-columns: minmax(0,1fr); grid-template-areas: "copy" "author" "showcase"; grid-template-rows: auto; gap: 36px; padding-block: 48px 32px; }
  .hero-summary { max-width: 560px; }
  .hero-author { padding-top: 24px; }
  .hero-orbit { top: -50px; right: -700px; }
  .hero-bottom>a { display: none; }
}
@media (max-width:850px) {

  .home-curriculum { padding-block: 70px; }
  .index-page .curriculum-heading h2 { font-size: 48px; }
  .curriculum-heading { gap: 30px; }
  .curriculum-heading>p { max-width: 260px; }
  .chapter-grid { grid-template-columns: 1fr; gap: 24px; }
  .index-page .chapter-story h3 { min-height: 0; max-width: 580px; font-size: 34px; }
  .chapter-story>p { min-height: 0; max-width: 580px; }
  .index-page .chapter-card:has(.podcast-player:not([hidden]))>.chapter-thumb { max-width: none; }
  .home-practice { grid-template-columns: 1fr; padding-top: 70px; gap: 35px; }
  .practice-copy { max-width: 580px; }
  .toolkit-links { grid-template-columns: 1fr; gap: 0; margin-bottom: 65px!important; padding-block: 0; }
  .toolkit-links>a { padding: 25px 5px; }
  .toolkit-links>a+a { border-left: none; border-top: 1px solid var(--home-line); }
  .toolkit-links small { font-size: 9px; }
  .toolkit-icon { width: 45px; }
  .footer-credits { flex-wrap: wrap; }
}
@media (max-width:520px) {
  .index-page .home-shell, .index-page .home-hero .home-shell { width: calc(100% - 40px); }
  .hero-stage { padding-block: 36px 28px; gap: 28px; }
  .index-page .home-hero h1 { margin-bottom: 22px; }
  .index-page .home-kicker { font-size: 8px; letter-spacing: .13em; }
  .home-hero-copy .home-kicker { gap: 8px; margin-bottom: 20px; font-size: 9px; letter-spacing: .1em; }
  .hero-hook { font-size: 23px; }
  .hero-summary { font-size: 14px; line-height: 1.8; margin-bottom: 24px; }
  .home-hero .home-actions { display: grid; grid-template-columns: minmax(0,1fr); gap: 4px; }
  .home-hero .home-button { width: 100%; min-height: 52px; font-size: 13px; }
  .home-hero .home-text-link { text-align: center; min-height: 44px; font-size: 12px; }
  .index-page .hero-welcome { text-align: center; margin-top: 8px; line-height: 1.7; }
  .hero-author { gap: 14px; padding-top: 22px; }
  .hero-author img { width: 64px; height: 64px; }
  .index-page .hero-author p { font-size: 13px; }
  .index-page .hero-author p:first-child { font-size: 14px; }
  .index-page .home-button { font-size: 12px; gap: 20px; padding: 14px 17px; }
  .home-text-link { font-size: 11px; }
  .hero-welcome { font-size: 10px; }
  .showcase-heading { padding: 17px 18px; font-size: 9px; }
  .scene-intro { padding: 20px 18px 12px; min-height: 150px; }
  .index-page .method-scene h2 { font-size: 25px; }
  .scene-art { height: 290px; }
  .scene-graph { padding-inline: 6px; }
  .graph-label { font-size: 18px; }
  .plot-text { font-size: 17px; }
  .graph-assignment { font-size: 15px; }
  .graph-outcomes { font-size: 16px; }
  .scene-caption { padding: 15px 18px 20px; }
  .index-page .scene-takeaway { font-size: 15px; }
  .showcase-controls { padding: 15px 18px; }
  .method-selectors { gap: 4px; }
  .method-selector { padding-inline: 4px; font-size: 10px; }
  .hero-bottom { padding-block: 21px; font-size: 9px; }
  .hero-bottom p>span { margin-inline: 7px; }
  .hero-bottom strong { font-size: 12px; }
  .learning-path { padding-block: 60px; gap: 14px; }
  .learning-path .section-heading-home { display: block; }
  .index-page .section-heading-home h2 { font-size: 34px; }
  .learning-steps { grid-template-columns: 1fr; gap: 26px; }
  .learning-steps li { padding-top: 19px; }
  .step-number { margin-bottom: 15px; }
  .learning-steps h3 { font-size: 19px; margin-bottom: 8px; }
  .learning-steps p { font-size: 13px; margin-bottom: 8px; }
  .learning-steps a { font-size: 11px; }
  .home-curriculum { padding-block: 60px; }
  .curriculum-heading { display: block; margin-bottom: 25px; }
  .index-page .curriculum-heading h2 { font-size: 42px; margin-bottom: 20px; }
  .curriculum-heading>p { max-width: none; }
  .index-page .chapter-card { padding: 22px 18px; border-radius: 12px; }
  .chapter-top { gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
  .chapter-number { font-size: 18px; }
  .chapter-method { font-size: 10px; }
  .chapter-tag { font-size: 8px; padding: 4px 7px; }
  .index-page .chapter-story h3 { font-size: 27px; line-height: 1.25; }
  .chapter-story>p { font-size: 12px; }
  .index-page .chapter-thumb { aspect-ratio: 1.5; margin-bottom: 20px; }
  .index-page .chapter-action { font-size: 10px; padding: 9px 10px; gap: 5px; }
  .chapter-actions { gap: 7px; }
  .index-page .chapter-listen { font-size: 11px; }
  .index-page .chapter-card .podcast-player { margin-inline: -8px; }
  .index-page .chapter-card .podcast-heading { gap: 8px; }
  .curriculum-credit { font-size: 9px; }
  .home-practice { padding-block: 60px 40px; }
  .index-page .practice-copy h2 { font-size: 42px; }
  .home-practice .media-frame .play-btn { width: 60px; height: 60px; }
  .home-practice figcaption>span { font-size: 9px; }
  .home-resources { padding-block: 55px; }
  .index-page .resources-title { font-size: 34px; }
  .home-resources .text-muted { font-size: 12px; }
  .home-resources .filter-pill { font-size: 10px; padding: 9px 10px; }
  .home-resources .resource-card { padding: 22px; }
  .footer-invitation { padding-block: 60px; }
  .index-page .footer-invitation h2 { font-size: 33px; }
  .footer-details { flex-direction: column; gap: 25px; }
  .footer-credits { font-size: 9px; gap: 15px; }
  .footer-credits p { order: 3; }
  .index-page .back-to-top { right: 12px; bottom: 12px; width: 38px; height: 38px; }
}
/* Short desktop windows need less vertical whitespace, not a clipped/fixed-height hero.
   Keep intrinsic sizing so zoom, larger text, and very short windows can still scroll. */
@media (min-width:1001px) and (max-height:1050px) {
  .hero-stage { padding-block: clamp(16px,3svh,28px); row-gap: 20px; grid-template-rows: auto auto; align-content: center; }
  .home-hero-copy { align-self: center; }
  .home-hero-copy .home-kicker { margin-bottom: 14px; }
  .index-page .home-hero h1 { font-size: clamp(40px,min(12cqi,8svh),68px); margin-bottom: 18px; }
  .hero-hook { font-size: 24px; margin-bottom: 12px; }
  .hero-summary { line-height: 1.65; margin-bottom: 18px; }
  .home-hero .home-actions { gap: 8px 18px; }
  .index-page .hero-welcome { margin-top: 10px; }
  .hero-author { padding-top: 16px; gap: 16px; }
  .hero-author img { width: 60px; height: 60px; }
  .index-page .hero-author p { line-height: 1.5; margin-bottom: 5px; }
  .showcase-heading { padding-block: 10px; }
  .scene-intro { min-height: 0; padding-block: 14px 10px; }
  .scene-method { margin-bottom: 6px; }
  .index-page .method-scene h2 { font-size: 26px; }
  .assignment-diagram { max-width: clamp(340px,44svh,396px); }
  .scene-caption { padding-block: 10px 12px; }
  .index-page .scene-explanation { line-height: 1.6; margin-bottom: 4px; }
  .index-page .scene-note { margin-top: 0; }
  .showcase-controls { padding-block: 10px; }
  .showcase-playback { margin-top: 4px; }
  .hero-bottom { padding-block: 12px; }
}
@media (min-width:1001px) and (max-height:780px) {
  .hero-stage { padding-block: 16px; }
  .scene-intro { padding-block: 8px; }
  .scene-method { margin-bottom: 3px; }
  .index-page .method-scene h2 { font-size: 24px; }
  .scene-caption { padding-block: 8px; }
  .index-page .scene-note { line-height: 1.4; }
  .showcase-controls { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 8px; padding-block: 8px; }
  .showcase-playback { display: contents; }
  #showcase-play { grid-column: 2; grid-row: 1; }
  #showcase-status { grid-column: 1 / -1; }
  .hero-bottom { padding-block: 8px; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto!important; }
  .index-page *, .index-page *::before, .index-page *::after { animation: none!important; transition: none!important; }
  .index-page .home-button:hover, .index-page .chapter-thumb:hover img { transform: none; }
}
@media (max-width:360px) {
  .method-selectors { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 6px; }
  .method-selector { grid-column: span 2; }
  .method-selector:nth-last-child(-n+2) { grid-column: span 3; }
}
@media (max-width:400px) {
  .index-page .chapter-card .podcast-player { grid-template-columns: minmax(0,1fr); grid-template-areas: "heading" "map" "playback" "chapters" "actions" "transcript" "status"; }
  .index-page .podcast-player .podcast-mindmap { max-width: 130px; }
  .index-page .podcast-player .podcast-heading h5 { font-size: 15px; }
  .index-page .podcast-player .podcast-close { min-width: 32px; min-height: 32px; }
}
@media print {
  .index-page .home-shell { width: 100%; }
  .hero-stage { min-height: 0; padding-block: 20px; }
  .hero-orbit, .home-actions, .hero-bottom, .home-footer, .toolkit-links, .chapter-listen { display: none; }
  .chapter-grid { display: block; }
  .chapter-card { break-inside: avoid; margin-bottom: 20px; }
}
