/* Homepage-only polish: preserve each appearance's approved visual world. */
body[data-page=home] .home-intro{padding-block:32px 16px}
body[data-page=home] .home-intro h1{margin-bottom:0}
body[data-page=home] .home-stage>.catalog{padding-top:12px}
body[data-page=home] .home-stage>.trails{padding-top:48px;padding-bottom:0}
body[data-page=home] .home-stage>.home-insight{width:100%;max-width:none;padding:48px 0 56px;grid-column:1/-1}
body[data-page=home] .home-insight .section-heading{margin-bottom:20px}

html[data-theme=light-form] body[data-page=home]{--surface:#101f27}
html[data-theme=light-form] body[data-page=home]::before{background-image:linear-gradient(90deg,color-mix(in srgb,var(--bg) 80%,transparent),color-mix(in srgb,var(--bg) 58%,transparent)),var(--scene)}

@media(min-width:1001px){
 html[data-theme=library] .home-stage{max-width:1440px;grid-template-columns:minmax(0,1fr);gap:0;padding-top:0}
 html[data-theme=library] .home-stage>:is(.home-intro,.catalog,#resume,.more-courses,.trails,.home-insight){grid-column:1;grid-row:auto}
 html[data-theme=library] .home-intro h1{font-size:42px}
 html[data-theme=library] .home-stage::after{display:none}
 html[data-theme=library] .home-stage .course-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:24px}
 html[data-theme=library] .home-stage .course-card{display:flex;flex-direction:column;gap:0;padding:14px;min-height:0}
 html[data-theme=library] .home-stage .course-card .course-visual{width:100%;margin-bottom:16px}
 html[data-theme=library] .home-stage .course-card h3{font-size:28px;min-height:2.2em;margin:0 0 12px}
 html[data-theme=library] .home-stage .course-card h3::after{display:none}
 html[data-theme=library] .home-stage .course-card p{margin:0 0 12px}
 html[data-theme=library] .home-stage .course-card p:last-child{margin-top:auto;margin-bottom:0;padding-top:12px}
}
html[data-theme=library] .more-courses::before{display:none}
html[data-theme=library] .home-stage .more-courses{padding-top:18px}
html[data-theme=library] .home-stage .course-card{align-content:start}
html[data-theme=library] .home-stage .course-card .course-visual,
html[data-theme=library] .home-stage .course-card img{align-self:start}
html[data-theme=library] .home-stage .course-card h3{align-self:start}
@media(min-width:681px) and (max-width:1250px){
 html[data-theme=library] .home-stage .course-card{grid-template-columns:110px minmax(0,1fr);gap:12px}
}

@media(max-width:1000px){
 html[data-theme=library] body[data-page=home] .home-stage{padding-top:0}
 body[data-page=home] .home-stage>.home-insight{grid-column:1;grid-row:auto}
}
@media(max-width:680px){
 body[data-page=home] .home-intro{padding-block:24px 16px}
 body[data-page=home] .home-stage>.catalog{padding-top:0}
 body[data-page=home] .home-stage>.trails{padding-top:36px}
 body[data-page=home] .home-stage>.home-insight{order:6;padding-top:36px;padding-bottom:40px}
 html[data-theme=library] .home-stage .course-card .course-visual{align-self:start}
 /* On phones, text gets the whole card rather than a narrow image-side column. */
 html[data-theme] body[data-page=home] .home-stage .course-card{display:flex;flex-direction:column;gap:0;align-items:stretch;min-height:0}
 html[data-theme] body[data-page=home] .home-stage .course-card .course-visual{width:100%;align-self:stretch;margin-bottom:16px}
 html[data-theme] body[data-page=home] .home-stage .course-card img{width:100%;height:auto;aspect-ratio:4/3;object-fit:contain}
 html[data-theme] body[data-page=home] .home-stage .course-card h3{min-height:0;margin:0 0 12px;align-self:stretch}
 html[data-theme] body[data-page=home] .home-stage .course-card h3::after{display:none}
 html[data-theme] body[data-page=home] .home-stage .course-card p{width:100%;margin:0 0 12px}
 html[data-theme] body[data-page=home] .home-stage .course-card p:last-child{margin-bottom:0;padding-top:8px}
}

/* The two homepage collection links share one footer treatment. */
body[data-page=home] .home-stage>:is(.trails,.home-insight)>.all-ideas{display:inline-flex;align-items:center;gap:12px;min-height:44px;margin:16px 0;font-size:17px;font-weight:400;color:var(--violet)}
