:root{--ink:#17231d;--paper:#f4f1e9;--white:#fffdfa;--green:#164b3b;--lime:#d8f06b;--muted:#66716b;--line:#d9ddd5;--rust:#ad4f33;--shadow:0 18px 50px rgba(19,42,31,.12)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--paper);color:var(--ink);font-family:"DM Sans",sans-serif}.hero{min-height:430px;color:#fff;background:var(--green);position:relative;overflow:hidden;padding:0 max(5vw,24px)}.hero:after{content:"";position:absolute;width:520px;height:520px;border:1px solid rgba(216,240,107,.23);border-radius:50%;right:-80px;top:35px;box-shadow:0 0 0 70px rgba(216,240,107,.035),0 0 0 140px rgba(216,240,107,.025)}.nav{height:82px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(255,255,255,.17);position:relative;z-index:1}.brand{display:flex;gap:12px;align-items:center;color:white;text-decoration:none;font-weight:700;font-size:18px}.brand-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:var(--lime);color:var(--green);font-family:"Newsreader",serif}.source{font-size:13px;opacity:.7}.hero-copy{position:relative;z-index:1;padding:54px 0 90px;max-width:900px}.eyebrow{text-transform:uppercase;letter-spacing:.16em;font-size:11px;font-weight:700;color:var(--rust);margin:0 0 12px}.hero .eyebrow{color:var(--lime)}h1,h2{font-family:"Newsreader",serif;font-weight:500;margin:0;line-height:.98}h1{font-size:clamp(48px,7vw,84px);letter-spacing:-.035em}h1 em{color:var(--lime);font-weight:500}.intro{max-width:590px;font-size:17px;line-height:1.6;opacity:.78;margin:24px 0 0}.search-panel{position:relative;z-index:3;width:min(1180px,calc(100% - 40px));margin:-42px auto 0;background:var(--white);border-radius:16px;box-shadow:var(--shadow);display:grid;grid-template-columns:1fr 1.5fr 1.8fr auto;gap:0;padding:14px}.field{padding:5px 20px;border-right:1px solid var(--line);min-width:0}.field label{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.1em;font-weight:700;color:var(--muted);margin-bottom:6px}.field select,.field input{width:100%;border:0;background:transparent;color:var(--ink);font:500 14px "DM Sans";outline:none}.input-wrap{display:flex;align-items:center;gap:8px}.input-wrap svg{width:17px;fill:none;stroke:var(--muted);stroke-width:1.8}.search-panel button{border:0;border-radius:11px;background:var(--lime);color:var(--green);font-weight:700;padding:0 28px;font-size:14px;cursor:pointer}.search-panel button:hover{filter:brightness(.96)}.search-panel button:disabled{opacity:.5;cursor:wait}.content{width:min(1120px,calc(100% - 40px));margin:72px auto 100px;min-height:280px}.welcome{display:grid;grid-template-columns:220px 1fr;align-items:center;gap:70px;max-width:760px;margin:80px auto}.welcome h2,.results-head h2{font-size:clamp(34px,4vw,52px)}.welcome p:last-child{color:var(--muted);line-height:1.7;max-width:520px}.welcome-orbit{width:190px;height:190px;border:1px solid #bdc7ba;border-radius:50%;display:grid;place-items:center;position:relative;font:600 68px "Newsreader";color:var(--green)}.welcome-orbit i,.welcome-orbit b{position:absolute;border-radius:50%;background:var(--rust)}.welcome-orbit i{width:15px;height:15px;top:9px;right:32px}.welcome-orbit b{width:9px;height:9px;bottom:20px;left:19px;background:var(--lime);box-shadow:0 0 0 1px var(--green)}.status{padding:50px;text-align:center;color:var(--muted)}.status.error{color:#8c3025;background:#fff5f2;border:1px solid #eccdc5;border-radius:12px}.results-head{display:flex;justify-content:space-between;align-items:end;margin-bottom:26px}.count{background:var(--green);color:white;border-radius:100px;padding:8px 14px;font-size:12px}.course-list{display:grid;gap:9px}.course{display:grid;grid-template-columns:minmax(260px,2.2fr) 1fr 1.15fr 42px;gap:22px;align-items:center;background:var(--white);border:1px solid transparent;border-radius:12px;padding:20px 22px;cursor:pointer;text-align:left;color:inherit;font:inherit;transition:.18s ease}.course:hover{border-color:#a9bba8;transform:translateY(-2px);box-shadow:0 8px 24px rgba(19,42,31,.07)}.course-title{font:600 20px/1.2 "Newsreader",serif}.course-meta,.course-time{font-size:12px;color:var(--muted);line-height:1.5}.course-tag{display:inline-block;color:var(--rust);font-size:10px;text-transform:uppercase;letter-spacing:.09em;font-weight:700;margin-bottom:6px}.course-arrow{font-size:25px;color:var(--green)}dialog{width:min(900px,calc(100% - 30px));max-height:90vh;border:0;border-radius:18px;padding:0;background:var(--white);color:var(--ink);box-shadow:var(--shadow)}dialog::backdrop{background:rgba(10,28,20,.68);backdrop-filter:blur(4px)}.dialog-close{position:sticky;float:right;top:18px;margin:18px 18px 0 0;z-index:2;width:40px;height:40px;border-radius:50%;border:1px solid var(--line);background:var(--white);font-size:24px;cursor:pointer}.detail{padding:55px clamp(24px,6vw,70px) 70px}.detail h2{font-size:clamp(38px,6vw,64px);padding-right:35px}.detail-lead{font-size:17px;color:var(--muted);margin:18px 0 30px}.facts{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--line);border:1px solid var(--line);border-radius:10px;overflow:hidden}.fact{background:var(--white);padding:16px}.fact dt{font-size:10px;text-transform:uppercase;letter-spacing:.1em;color:var(--muted)}.fact dd{margin:5px 0 0;font-size:14px}.detail-section{border-top:1px solid var(--line);margin-top:32px;padding-top:24px}.detail-section h3{font:600 24px "Newsreader",serif;margin:0 0 14px}.chips{display:flex;flex-wrap:wrap;gap:7px}.chip{padding:8px 11px;border-radius:100px;background:#edf1e9;font-size:12px}.schedule{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(2,1fr);gap:6px}.schedule li{border-left:3px solid var(--lime);background:#f5f6f0;padding:10px 13px;font-size:13px}.schedule small{display:block;color:var(--rust);margin-top:3px}footer{border-top:1px solid var(--line);display:flex;justify-content:space-between;padding:30px max(5vw,24px);font-size:11px;color:var(--muted)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.spinner{width:28px;height:28px;border:3px solid #d7ddd4;border-top-color:var(--green);border-radius:50%;animation:spin .7s linear infinite;margin:0 auto 14px}@keyframes spin{to{transform:rotate(360deg)}}.detail-text{font-size:14px;line-height:1.7;color:var(--ink);margin:0}.detail-link{margin:18px 0 0}.detail-link a{display:inline-block;padding:8px 16px;border-radius:100px;background:var(--lime);color:var(--green);font-weight:700;font-size:13px;text-decoration:none}.detail-link a:hover{filter:brightness(.96)}.chips a{color:inherit;text-decoration:underline}
@media(max-width:850px){.search-panel{grid-template-columns:1fr 1fr}.field{border-bottom:1px solid var(--line)}.field-query{border-bottom:0}.search-panel button{min-height:54px}.course{grid-template-columns:1fr 1fr 30px}.course>div:first-child{grid-column:1/-1}.facts{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.hero{min-height:390px}.source{display:none}.hero-copy{padding-top:45px}.search-panel{grid-template-columns:1fr;padding:10px;margin-top:-30px}.field{border-right:0;padding:12px;border-bottom:1px solid var(--line)}.search-panel button{margin-top:9px}.content{margin-top:55px}.welcome{grid-template-columns:1fr;gap:35px;margin:20px auto}.welcome-orbit{width:140px;height:140px}.course{grid-template-columns:1fr 25px;gap:10px}.course>div:first-child{grid-column:1/-1}.course-time{grid-column:1}.course-arrow{grid-column:2;grid-row:2}.results-head{align-items:start}.facts,.schedule{grid-template-columns:1fr}footer{gap:18px;flex-direction:column}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

footer{display:grid;grid-template-columns:1fr auto 1fr;align-items:center}footer span:last-child{text-align:right}footer a{color:var(--muted);text-decoration:underline;text-underline-offset:3px}footer a:hover{color:var(--green)}
@media(max-width:560px){footer{grid-template-columns:1fr;gap:12px;text-align:center}footer span:last-child{text-align:center}}
.results-actions{display:flex;align-items:center;gap:12px}.json-download{color:var(--green);font-size:12px;font-weight:700;text-decoration:none}.json-download:hover{text-decoration:underline;text-underline-offset:3px}
@media(max-width:560px){.results-actions{align-items:flex-end;flex-direction:column;gap:8px}.json-download{text-align:right}}

/* Page flow: instruction, controls, then results. */
.search-instruction{margin:64px auto 36px}
.search-panel{margin:0 auto}
.content{margin:30px auto 100px}
@media(max-width:560px){.search-instruction{margin:36px auto 24px}.search-panel{margin-top:0}.content{margin-top:24px}}

.nav-actions{display:flex;align-items:center;gap:18px}.nav-actions button{border:1px solid rgba(255,255,255,.35);border-radius:100px;background:transparent;color:#fff;padding:8px 12px;font:600 12px "DM Sans";cursor:pointer}.nav-actions button:hover{border-color:var(--lime);color:var(--lime)}#shortlist-count{display:inline-grid;place-items:center;min-width:20px;height:20px;margin-left:4px;border-radius:50%;background:var(--lime);color:var(--green)}
.course-wrap{position:relative}.course-wrap .course{width:100%}.shortlist-toggle{position:absolute;z-index:2;right:10px;top:8px;width:30px;height:30px;border:0;border-radius:50%;background:var(--paper);color:var(--green);font-size:20px;line-height:1;cursor:pointer}.shortlist-toggle:hover,.shortlist-toggle.saved{background:var(--lime)}
.course-wrap-companion{margin-left:24px}.course-wrap-companion .course{background:#fafbf8}.course-relation{display:inline-block;margin-left:9px;color:var(--muted);font-size:10px;font-weight:600;letter-spacing:.06em;text-transform:uppercase}
.person-entry,.person-affiliation{display:block}.person-affiliation{margin-top:4px;color:var(--muted);font-size:10px;line-height:1.45}
.detail-actions{display:flex;flex-wrap:wrap;gap:9px;margin:-12px 0 28px}.detail-actions a,.detail-actions button,.shortlist-actions button{border:0;border-radius:100px;background:var(--lime);color:var(--green);padding:9px 15px;font:700 12px "DM Sans";text-decoration:none;cursor:pointer}.detail-actions button{background:#edf1e9}.detail-actions a:hover,.detail-actions button:hover,.shortlist-actions button:hover{filter:brightness(.96)}
.shortlist-panel{padding:55px clamp(24px,6vw,70px) 45px}.shortlist-panel h2{font-size:clamp(38px,6vw,58px);margin-bottom:28px}.shortlist-item{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:13px 0;border-bottom:1px solid var(--line)}.shortlist-item strong,.shortlist-item small{display:block}.shortlist-item small{margin-top:3px;color:var(--muted)}.shortlist-item button{border:0;background:transparent;color:var(--rust);font-size:24px;cursor:pointer}.shortlist-empty{padding:24px 0;color:var(--muted)}.shortlist-status{min-height:20px;color:var(--muted);font-size:12px}.shortlist-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:18px}.shortlist-actions .secondary{background:#edf1e9}.shortlist-actions button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:560px){.nav-actions .source{display:none}.nav-actions{gap:8px}.shortlist-toggle{right:7px;top:7px}.detail-actions,.shortlist-actions{align-items:stretch;flex-direction:column}.detail-actions a,.detail-actions button,.shortlist-actions button{text-align:center}}

/* Secondary/tertiary filter rows: each narrows whatever came before it, so
   they're visually a notch lighter than the primary search panel (softer
   shadow, no overlap-margin) rather than equally-weighted bars. Shared by
   the study-program filter and the organization filter -- unrelated
   domains, identical interaction shape. Flex, not grid: .tree-levels holds
   a cascading chain of <select>s whose length varies with the selected
   root's tree depth (one dropdown per level drilled into), not a fixed
   field count. */
.filter-panel{width:min(1180px,calc(100% - 40px));margin:10px auto 0;background:var(--white);border-radius:16px;box-shadow:0 8px 24px rgba(19,42,31,.06);display:flex;flex-wrap:wrap;padding:14px}
.filter-panel .field{border-right:1px solid var(--line);flex:1 1 220px;min-width:0}
.filter-panel .field:last-child{border-right:0}
.filter-panel select:disabled{opacity:.5;cursor:wait}
.tree-levels{display:flex;flex-wrap:wrap;flex:2 1 440px}
@media(max-width:560px){.filter-panel{padding:10px}.filter-panel .field{border-right:0;padding:12px;border-bottom:1px solid var(--line);flex-basis:100%}.filter-panel .field:last-child{border-bottom:0}}
