/* Student workspace shares the existing palette and card/button language. */

#learn-view{padding:0 16px 28px;max-width:1600px;width:100%;margin:auto}

.learning-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:14px 8px 18px}

.learning-heading p{font-size:.84rem;color:var(--ink2);line-height:1.65;max-width:56rem}

.learning-steps button,.learning-button{border:1.5px solid var(--line);background:var(--card);font-weight:800}

.learning-grid{display:grid;grid-template-columns:minmax(0,1fr) 420px;gap:16px;align-items:start}

.learning-map-card,.learning-panel,.learning-library{background:var(--card);border:1.5px solid var(--line);border-radius:24px;box-shadow:var(--shadow);overflow:hidden}

#learning-map{height:520px;background:var(--track)}

.learning-map-caption{padding:12px 16px;font-size:.77rem;line-height:1.65;border-top:1px solid var(--line)}

.learning-panel{padding:18px;overflow:auto}

.learning-panel h2{font-size:1.15rem;margin:0 0 8px}

.learning-panel h3{font-size:.85rem;margin:15px 0 7px}

.learning-panel p,.learning-help{line-height:1.65;color:var(--ink2)}

.learning-fields{display:grid;gap:11px;margin:14px 0}

.learning-fields label{display:grid;gap:5px;font-weight:800}

.learning-fields input,.learning-fields select,.learning-fields textarea{font:inherit;color:var(--ink);padding:9px 10px;width:100%;min-width:0}

.learning-fields textarea{min-height:76px;resize:vertical;line-height:1.6}

.learning-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}

.learning-button.primary{background:var(--accent);border-color:var(--accent);color:#fff;box-shadow:0 3px 0 var(--accentDeep)}

.learning-status{font-size:.8rem;line-height:1.65;padding:10px 12px;border-radius:12px;margin:12px 0;overflow-wrap:anywhere}

.learning-library{padding:18px;margin-top:16px}

.learning-library h2{font-size:1rem}
.learning-library ul{padding:0;list-style:none;display:grid;gap:8px}

.learning-library li{display:flex;justify-content:space-between;align-items:center;gap:10px;border-bottom:1px dashed var(--line);padding:7px 0;font-size:.8rem}

.learning-library button{font:inherit}
.learning-library .learning-help{margin-top:8px}

body[data-view=learn] .topbar{position:static;height:auto;min-height:56px;overflow:visible;flex-wrap:wrap;margin:10px;top:auto;left:auto;right:auto;padding:10px}

@media(max-width:760px){#learn-view{padding:0 10px 20px}
.learning-heading{display:block}
.learning-grid{display:flex;flex-direction:column}
.learning-map-card,.learning-panel{width:100%}
#learning-map{height:310px}
.learning-panel{max-height:none}
.learning-steps{gap:5px}
.learning-steps button{font-size:.73rem;padding:.45rem .65rem}
body[data-view=learn] .logo small{display:none}
body[data-view=learn] .tb-right{margin-left:0;width:100%;justify-content:flex-end}
body[data-view=learn] .modes{margin-left:0}
.learning-library li{align-items:flex-start;flex-wrap:wrap}}

.learning-steps button:disabled,.learning-button:disabled{opacity:.5;cursor:not-allowed}

/* One palette and component language across every workspace. */
:root{--accent:#e8742a;--accentDeep:#c55a17;--accentSoft:#fde6d3;--bg:#fbf4ea;--card:#fffdf9;--line:#eadcc8;--ink:#3d2c1e;--ink2:#746354;--muted:#746354;--track:#eadcc8;--num:system-ui;--shadow:0 5px 18px #3d2c1e0c;--radius:18px;--space:16px;--student:#2f8f83;--expert:#3d6fb6}

*{box-sizing:border-box}
html{font-size:16px}
body{margin:0;background:var(--bg);color:var(--ink);font-family:'Noto Sans TC','Microsoft JhengHei',sans-serif;line-height:1.65}
[hidden]{display:none!important}
h1,h2,h3,p{margin-top:0}
h1{font-size:clamp(24px,3vw,36px);line-height:1.4}
h2{font-size:21px}
h3{font-size:17px}
a{color:var(--accentDeep)}
small,.meta,.lead{color:var(--muted)}
small{display:block;font-size:12px}
img{max-width:100%}
button,input,select,textarea{font:inherit;color:inherit}
button,.button,.learning-button,.expert-downloads a{display:inline-block;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--ink);padding:10px 16px;min-height:44px;cursor:pointer;font-weight:700;text-decoration:none;box-shadow:none}
button:hover,.button:hover{border-color:var(--accent)}
button:disabled{opacity:.5;cursor:not-allowed}
button[aria-pressed=true],button[aria-current=step],.primary,.learning-button.primary,.expert-run,[data-rank], [data-save],.expert-downloads a:first-child{background:var(--accent);border-color:var(--accent);color:white;box-shadow:none}
.secondary{background:var(--card);color:var(--ink)}
:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea{border:1px solid var(--line);border-radius:10px;padding:9px 11px;background:var(--card);min-width:0;max-width:100%;min-height:44px}
input[type=range]{accent-color:var(--accent);min-width:70px;max-width:100%}
input[type=checkbox],input[type=radio]{accent-color:var(--accent);width:18px;height:18px;flex-shrink:0}
fieldset{border:1px solid var(--line);border-radius:12px;margin:16px 0;padding:12px}
legend{font-weight:700}
label{font-size:14px}
details{margin:12px 0;overflow-wrap:anywhere}
summary{cursor:pointer;font-weight:700;min-height:40px;padding:7px 0}
pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;max-height:300px;overflow:auto;background:var(--bg);padding:10px;border-radius:10px}
table{border-collapse:collapse;width:100%;font-size:12px;table-layout:fixed}
td,th{text-align:left;padding:8px 5px;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
meter{width:100%;height:12px;accent-color:var(--accent)}

body[data-view]>.topbar{position:relative;display:flex;align-items:center;gap:20px;padding:12px 24px;margin:0;min-height:76px;height:auto;background:var(--card);border-bottom:1px solid var(--line);border-radius:0;flex-wrap:nowrap;z-index:20}
.logo{display:flex;align-items:center;gap:9px;flex-shrink:0;text-decoration:none;color:var(--ink)}
.logo img{width:46px;height:46px}
.logo b{font-size:17px}
#shared-menu{display:flex;flex:1;align-items:center;justify-content:space-between;gap:16px}
.modes,.account-nav{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.mode{padding:8px 12px;border-radius:10px;text-decoration:none;color:var(--ink);font-weight:700;font-size:14px}
.mode[aria-current=page]{background:var(--accentSoft);color:var(--accentDeep)}
#account-name{font-size:11px;color:var(--muted);max-width:130px}
.account-nav a{font-size:12px}
.menu-toggle{display:none}

.landing{max-width:1080px;margin:0 auto;padding:36px 24px 48px;text-align:center}
.hero-map{margin-bottom:8px}
.landing h1{margin:0 0 12px}
.lead{font-size:15px;margin:0 auto 24px;max-width:650px}
.data-statement{max-width:820px;margin:24px auto;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:16px 22px;text-align:left;font-size:13px}
.data-statement p{margin:5px 0}
.data-statement details{margin-bottom:0}
.source-entry{border-top:1px solid var(--line);padding:9px 0}
.choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:28px 0}
.choice{display:flex;flex-direction:column;text-align:left;text-decoration:none;color:var(--ink);background:var(--card);padding:24px;border:1px solid var(--line);border-top:4px solid var(--accent);border-radius:var(--radius);box-shadow:var(--shadow);min-width:0}
.choice[data-view=learn]{border-top-color:var(--student)}
.choice[data-view=expert]{border-top-color:var(--expert)}
.choice-ico{font-size:30px;margin-bottom:12px}
.choice h2{margin-bottom:8px}
.choice p{font-size:14px;color:var(--muted);flex:1}
.go{font-size:14px;color:var(--accentDeep);font-weight:700}

.unified-business,#expert-view{width:100%;max-width:1680px;margin:auto;padding:24px}
.unified-business>header h1{margin:0 0 20px}
.unified-rec-steps,.learning-steps{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}
.unified-rec-steps button{font-size:13px}
.unified-rec-layout{display:grid;grid-template-columns:minmax(330px,440px) minmax(0,1fr);gap:24px;align-items:start}
.unified-rec-form,.expert-controls,.expert-result,.expert-export,.expert-model,.expert-process,.expert-sources,.expert-consumption,.learning-panel,.learning-map-card,.learning-library{padding:20px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);min-width:0}
.unified-rec-form [data-page] > label, .unified-rec-form details>label{display:grid;gap:5px;margin:12px 0}
.unified-rec-form fieldset>div{display:flex;flex-wrap:wrap;gap:7px}
.unified-rec-form fieldset label,.site-model-conditions fieldset label{display:inline-flex;align-items:center;gap:5px;padding:7px;border:1px solid var(--line);border-radius:10px;font-size:13px}
.unified-types{display:flex;flex-wrap:wrap;gap:7px}
.unified-types button{font-size:13px;padding:8px 11px}
.start-illustration{width:100px;display:block;margin:0 auto 16px}
.start-options{display:grid;gap:12px}
.start-options button{text-align:left;padding:20px}
.start-options b{display:block}
.start-options small{margin-top:5px;font-weight:400}
.unified-rec-actions{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0 8px}
[data-status]{font-size:13px;color:var(--muted);margin-top:12px}
[data-search-results]{display:grid;gap:8px;margin-top:12px}
.business-output{min-width:0}
#unified-rec-map,#expert-map{height:520px;border:1px solid var(--line);border-radius:var(--radius);z-index:0;background:var(--track)}
[data-result-panel]{margin-top:16px}
.unified-rec-card{padding:16px 20px;border:1px solid var(--line);background:var(--card);border-radius:var(--radius);margin-bottom:10px}
.unified-rec-card h3{margin-bottom:8px}
.unified-rec-card p{font-size:12px;margin:6px 0}
.rank-pin{background:var(--accent);color:white;border:2px solid white;border-radius:50%;text-align:center;font-weight:bold;line-height:24px}
.presets{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.presets article{border:1px solid var(--line);padding:10px;border-radius:12px;min-width:0}
.presets button{width:100%;font-size:13px;padding:8px}
.presets small{margin-top:7px}
.presets p{font-size:12px}
.presets details{margin:0}
.presets summary{font-size:12px;min-height:32px}
.site-model{font-size:14px;min-width:0}
.site-model h3,.site-model-note{display:none}
.site-model-indicator{display:flex;align-items:center;flex-wrap:wrap;gap:8px;border-bottom:1px solid var(--line);padding:10px 0}
.site-model-indicator>label{display:flex;align-items:center;gap:6px;flex:1;min-width:130px}
.site-model-indicator input[type=number]{width:70px}
.site-model-indicator input[type=range]{width:100px;flex:1}
.site-model-indicator small{flex-basis:100%;color:var(--muted);font-size:11px}
.site-model-actions{display:flex;gap:8px;flex-wrap:wrap}
.site-model-weight-sum{font-weight:bold}
.site-model-breakdown{overflow-x:auto}
.site-model-warning{color:var(--accentDeep)}
.mobile-panel-toggle{display:none}

.expert-heading{margin-bottom:20px}
.expert-heading h1{margin:4px 0}
.expert-heading p{font-size:13px;color:var(--muted);max-width:850px}
.expert-heading>a{display:none}
.expert-layout{display:grid;grid-template-columns:300px minmax(280px,1fr) 310px;gap:16px;align-items:start}
.expert-controls{grid-column:1;grid-row:1;max-height:calc(100vh - 140px);overflow:auto}
.expert-output{display:contents}
.expert-center{grid-column:2;grid-row:1;min-width:0}
.expert-detail{grid-column:3;grid-row:1;min-width:0;max-height:calc(100vh - 140px);overflow:auto}
.expert-controls label{display:grid;gap:5px;margin-bottom:12px}
.expert-controls .site-model-indicator>label{display:flex}
.expert-pair,.expert-metrics{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.expert-controls h2,.expert-detail h2{font-size:18px}
.expert-metrics>div{padding:12px;background:var(--bg);border-radius:10px;min-width:0}
.expert-metrics strong{display:block;font-size:18px;overflow-wrap:anywhere}
.expert-tabs{display:none}
.expert-model{padding:12px;margin-top:16px}
.expert-result h3{font-size:13px}
.expert-downloads{display:flex;gap:7px;flex-wrap:wrap}
.expert-downloads a{font-size:13px}
.expert-consumption{margin-top:16px}
.consumption-panel select{width:100%}

/* Shared student components; only its established layout is retained. */
.learning-steps button,.learning-button{border-radius:12px;font-size:13px;padding:10px 14px}
.learning-button.secondary{background:var(--card);color:var(--ink);border-color:var(--line)}
.learning-heading{padding-top:24px}
.learning-panel p,.learning-help{font-size:13px}
.learning-fields label{font-size:13px}
.learning-map-card{padding:0}
.learning-status{background:var(--bg)}
.learning-panel{max-height:780px}
.learning-entry{display:flex;grid-column:auto}
.learning-entry .choice-ico{width:auto;height:auto;font-size:30px}
.learning-entry h2{font-size:21px}
.learning-entry .go{margin:0}
.learning-choices label{font-size:13px}
.learning-fields input,.learning-fields select,.learning-fields textarea{border:1px solid var(--line);background:var(--card);border-radius:10px}
.learning-metrics div,.learning-glossary,.learning-term-notes{border-radius:var(--radius)}

@media(max-width:1100px){#account-name{display:none}
.expert-layout{grid-template-columns:260px minmax(0,1fr) 260px}
.unified-rec-layout{grid-template-columns:minmax(300px,40%) minmax(0,1fr)}}

@media(max-width:1000px){body[data-view]>.topbar{padding:9px 14px;min-height:64px;flex-wrap:wrap;justify-content:space-between;gap:8px}
.logo b{font-size:15px}
.logo img{width:38px;height:38px}
.menu-toggle{display:block}
#shared-menu{display:none;flex-basis:100%;flex-direction:column;align-items:stretch;padding:8px 0}
.menu-toggle[aria-expanded=true]+#shared-menu{display:flex}
.modes{margin:0!important;max-width:100%;gap:4px}
.account-nav{justify-content:flex-start}
.unified-business,#expert-view{padding:16px 12px}
.unified-rec-layout,.learning-grid{display:flex;flex-direction:column;gap:14px}
.unified-rec-form,.business-output,.learning-map-card,.learning-panel{width:100%;max-height:none}
.business-output{order:-1}
.unified-rec-form{padding:16px}
#unified-rec-map,#learning-map,#expert-map{height:44vh;min-height:260px;max-height:none}
.mobile-panel-toggle{display:block;width:100%;margin:0 0 12px;text-align:left}
.mobile-collapsed>:not(.mobile-panel-toggle){display:none!important}
.expert-layout{display:flex;flex-direction:column}
.expert-output{display:contents}
.expert-center{order:-2;width:100%}
.expert-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}
.expert-controls,.expert-detail{width:100%;max-height:none;overflow:visible}
.expert-layout[data-tab=layers] .expert-detail,.expert-layout[data-tab=weights] .expert-detail,.expert-layout[data-tab=data] .expert-controls,.expert-layout[data-tab=export] .expert-controls{display:none}
.expert-layout[data-tab=layers] .expert-model,.expert-layout[data-tab=layers] .expert-export,.expert-layout[data-tab=weights] #expert-form,.expert-layout[data-tab=weights] .expert-controls>h2,.expert-layout[data-tab=weights] .expert-controls>.expert-status,.expert-layout[data-tab=weights] .expert-export,.expert-layout[data-tab=data] .expert-export{display:none}
.expert-layout[data-tab=export] .expert-detail>:not(.expert-export){display:none}
.learning-heading{display:block}
.learning-grid .learning-map-card{order:-1}
.choices{grid-template-columns:1fr}
.landing{padding:24px 16px}
.hero-map{width:120px;height:120px}
.choice{padding:20px}
.data-statement{padding:14px}
.learning-steps button{font-size:12px}
.learning-panel{padding:16px}
.learning-library li{flex-wrap:wrap}}

@media(max-height:500px) and (max-width:1000px){#unified-rec-map,#learning-map,#expert-map,#expert-selection-map{height:65vh;min-height:0}
.unified-business>header,.expert-heading,.learning-heading{padding:6px 0;margin-bottom:8px}
.unified-business>header h1,.expert-heading h1,.unified-rec-steps,.learning-steps{margin-bottom:10px}
.hero-map{width:80px;height:80px}}

:is(#business-view,#expert-view)[data-stage="0"] .business-output{display:none}

@media(max-width:1000px){:is(#business-view,#expert-view):not([data-stage="3"]):not([data-address="true"]) .business-output{order:0}
.expert-layout[data-tab=layers] .expert-model{display:block}
.expert-layout[data-tab=layers] .site-model-indicator>input,.expert-layout[data-tab=layers] .site-model-indicator>output,.expert-layout[data-tab=layers] .site-model-indicator>span,.expert-layout[data-tab=layers] .site-model-indicator>select{display:none}
.expert-layout[data-tab=layers] .site-model-weight-sum{display:none}
.expert-layout[data-tab=weights] .site-model-indicator input[type=checkbox]{display:none}}

:is(#business-view,#expert-view)[data-stage="0"] .unified-rec-layout{display:block;max-width:620px;margin:auto}

:is(#business-view,#expert-view)[data-stage="0"] .unified-business>header,:is(#business-view,#expert-view)[data-stage="0"] .unified-rec-steps{justify-content:center;text-align:center}

:is(#business-view,#expert-view)[data-stage="0"] .unified-rec-actions{display:none}

/* Student three-step tasks use the shared card, chip and form system. */

.hero-map{display:flex;align-items:center;justify-content:center;gap:22px;margin:0 auto 18px;color:var(--accent);font-size:40px;width:auto!important;height:auto!important}
.hero-map img{width:100px;height:100px}

.learning-launch{text-align:center;max-width:680px;margin:32px auto;padding:40px}
.learning-launch h2{font-size:26px}
.learning-launch p{margin:16px 0 24px}

.learning-progress{display:flex;gap:16px;margin-bottom:16px}
.learning-progress .learning-steps{display:grid;grid-template-columns:repeat(3,1fr);flex:1;margin:0;gap:8px}
.learning-progress b{font-size:14px;color:var(--accent)}

#learn-view .learning-coach{border-left:4px solid var(--accent);border-radius:var(--radius);background:var(--accentSoft);padding:16px;margin:16px 0;line-height:1.7;font-weight:700}
.learning-chips{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.learning-chips button{font-size:13px;min-height:44px}
.learning-chips button[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:var(--card)}

#learn-view .learning-panel{max-height:none;overflow:visible}
#learn-view .learning-grid{align-items:start}
.learning-number{font:800 36px var(--num);color:var(--accent);padding:14px 0;animation:learning-count .25s ease-out}
.learning-number small{font:500 13px var(--font)}
.learning-summary-maps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.learning-summary-maps article{padding:14px;border:1px solid var(--line);border-radius:var(--radius);background:var(--bg)}
.learning-summary-maps svg{width:100%;max-height:180px;background:var(--card);border-radius:12px}
.learning-summary-maps p{font-size:13px;margin:8px 0}
.learning-celebration{color:var(--accent);font-size:56px;animation:learning-count .5s ease-out}

#learning-overlay-fields .site-model-indicator small{display:none}
#learning-overlay-fields .site-model-breakdown{margin-top:12px}
#learning-overlay-fields .site-model-breakdown>p,#learning-overlay-fields .site-model-warning{display:none}
#learning-overlay-fields .site-model-breakdown table{font-size:12px}
#learning-overlay-fields .site-model>details{margin-top:12px}
#learning-metrics table{width:100%;font-size:13px}
#learning-metrics td,#learning-metrics th{padding:8px 4px;text-align:left}
#learning-term-notes{margin-top:16px}
#learning-term-notes p{font-size:13px;line-height:1.7}

@keyframes learning-count{from{opacity:.4;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}

@media(max-width:1000px){#learn-view .learning-panel{max-height:none}
.learning-summary-maps{grid-template-columns:1fr}
.learning-launch{padding:24px}
.learning-launch h2{font-size:22px}}

@media(prefers-reduced-motion:reduce){.learning-number,.learning-celebration{animation:none}}

/* Shared 6px progress tracks; the button retains its 44px target. */
h1,.learning-heading h1,.unified-business>header h1{font-size:clamp(24px,3vw,36px)}

.kicker{font-size:13px;font-weight:700;margin:0 0 6px;color:var(--accentDeep)}

body[data-view=learn] .kicker{color:var(--student)}
body[data-view=expert] .kicker{color:var(--expert)}

.step-progress,.learning-progress .step-progress{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:8px;flex:1;margin:0 0 16px}

.step-progress button,.learning-progress .step-progress button{position:relative;display:block;min-height:44px;height:auto;border:0;padding:0;background:transparent;color:var(--muted);border-radius:0;font-size:12px;font-weight:400;white-space:normal;box-shadow:none;text-align:center}

.progress-track{display:block;width:100%;height:6px;border-radius:99px;background:var(--line);margin-bottom:6px}

.step-progress button[aria-current=step],.step-progress button[aria-pressed=true]{background:transparent;color:var(--accentDeep);font-weight:800}

.step-progress [aria-current=step] .progress-track,.step-progress [aria-pressed=true] .progress-track,.step-progress [data-complete=true] .progress-track{background:var(--accent)}

.progress-label{display:block;font-size:12px;line-height:1.5}
.learning-progress{align-items:flex-start}
.learning-progress b{padding-top:10px}

.expert-controls .expert-model,.expert-controls .expert-export,.expert-controls .site-model fieldset{border:0;box-shadow:none;background:transparent;padding:0;border-radius:0}

.expert-controls .expert-model{margin-top:20px;border-top:1px solid var(--line);padding-top:12px}

.mobile-panel-toggle{border:0;background:transparent;padding:0;min-height:30px;text-align:center!important;color:var(--muted)}

.address-comparison{height:112px;background:linear-gradient(to right,var(--accentSoft),var(--accent));position:relative;border-radius:8px;margin:16px 24px;font-size:11px}

.address-comparison span{position:absolute;top:8px;transform:translateX(-100%);max-width:100%;border-right:2px solid var(--ink);padding:0 3px 70px 0;white-space:nowrap}

.address-comparison span:nth-child(2){top:35px;padding-bottom:43px}
.address-comparison span:nth-child(3){top:64px;padding-bottom:14px;font-weight:800}

#learning-station-flow{font-size:13px;background:var(--bg);padding:12px;border-radius:12px;margin:12px 0}

#learning-village-detail{font-size:13px;border-top:1px solid var(--line);margin-top:12px;padding-top:10px}
.walk-bar{font-size:13px;margin:8px 0}
.walk-bar meter{display:block}

@media(max-width:1000px){
 body{padding-bottom:76px}
.learning-actions:has(#learning-next),.unified-rec-actions{position:fixed;bottom:0;left:0;right:0;z-index:19;background:var(--card);margin:0;padding:10px 16px;box-shadow:0 -2px 8px #3d2c1e14;justify-content:flex-end}

 .mobile-collapsed>.learning-actions{display:flex!important}

 .learning-map-card,#unified-rec-map,#expert-map{scroll-margin-bottom:80px}

 .learning-actions.map-visible,.unified-rec-actions.map-visible{visibility:hidden;pointer-events:none}
}

.walk-track{height:10px;background:#f9e6d2;border-radius:5px;overflow:hidden}.walk-track span{display:block;height:100%;background:var(--accent);border-radius:5px}.score-tick{position:absolute;bottom:-18px;transform:translateX(-50%)}

/* Transparent classroom sheets reuse the shared warm theme. */
.learning-stack-row{display:grid;grid-template-columns:18px minmax(0,1fr) 24px;gap:10px;align-items:center;padding:9px 0;border-bottom:1px solid var(--line,#eadcc8)}
.learning-stack-row small{display:block;line-height:1.5;overflow-wrap:anywhere}.learning-swatch{width:16px;height:24px;border-radius:3px}
#learning-suggestions{display:grid;gap:4px;grid-column:1/-1}#learning-suggestions:empty{display:none}#learning-suggestions button{text-align:left}#learning-suggestions [aria-selected=true]{outline:2px solid #e8742a;background:#fff4e9}
#learning-hours{min-width:0;flex-wrap:wrap}#learning-hours label{display:inline-flex;align-items:center;gap:5px}
.site-model-indicator input[type=number][data-weight-id]{width:68px;min-width:0}
@media(max-width:600px){.learning-stack-row{font-size:14px}.site-model-indicator{min-width:0}.site-model-indicator input[type=range]{min-width:0;width:100%}}

/* Village count fills and condition badges share the classroom legend. */
.learning-village-badge{background:none;border:0}
.learning-village-badge>span{display:flex;gap:2px;padding:2px;background:#fffef9;border-radius:4px;box-shadow:0 1px 3px #3d2c1e80;width:max-content}
.learning-village-badge i,.learning-badge-legend i{display:inline-block;width:10px;height:10px;border-radius:50%;box-shadow:inset 0 0 0 1px #0003;flex:none}
.learning-count-legend,.learning-badge-legend{display:flex;gap:8px 12px;flex-wrap:wrap}
.learning-count-legend span,.learning-badge-legend span{display:inline-flex;align-items:center;gap:4px}
.learning-count-legend i,.learning-hatch-key{display:inline-block;width:18px;height:13px;border:1px solid #9c9085;vertical-align:middle}
.learning-hatch-key{background:repeating-linear-gradient(135deg,transparent 0 4px,#65452f 4px 5px)}
#learning-legend p{margin:6px 0}
.learning-score-badge{border:0;background:none;text-align:center;font-size:11px;line-height:1.35}
.learning-score-badge>span{display:block;background:#fffdf2eF;border:1px solid #b94b10;border-radius:5px;padding:3px;box-shadow:0 1px 3px #3d2c1e40}
.learning-score-badge{line-height:16px;font-size:11px;font-weight:800}
.learning-score-badge>span{padding:1px}
.learning-score-full{display:none}.learning-score-rank{display:block}
#learning-score-toggle{padding:10px;flex-wrap:wrap}#learning-score-rows{display:grid;gap:6px}
#learning-score-rows button{text-align:left;white-space:normal;overflow-wrap:anywhere}
#learning-finish{max-width:800px;margin:20px auto;overflow-wrap:anywhere}
#learning-finish .learning-fields input,#learning-finish textarea{width:100%;box-sizing:border-box}
#learning-finish textarea{min-height:150px}#learning-finish>button{margin:6px 4px 6px 0}
#learning-model .site-model-breakdown{overflow-x:auto}
/* V28: visible districts, ranked position cards and expert guidance. */
[data-districts],[data-hours]{display:flex;flex-wrap:wrap;gap:8px}
[data-districts] label,[data-hours] label{display:inline-flex;align-items:center;gap:5px;padding:9px 12px;border:1px solid var(--line);border-radius:24px;background:var(--card);cursor:pointer}
[data-districts] label:has(:checked),[data-hours] label:has(:checked){background:var(--accentSoft);border-color:var(--accentDeep);color:var(--accentDeep)}
.district-choices{border:2px solid var(--accent);padding:14px;border-radius:12px;margin:18px 0}
.district-choices button{margin:10px 8px 0 0}
.rank-map-wrap{position:relative;min-width:0}
.rank-pin.rank-podium{border-radius:14px;background:#b94b10;display:flex;align-items:center;justify-content:center;gap:6px;line-height:1.2;box-shadow:0 3px 8px #3d2c1e50;font-size:14px}
.rank-podium b{font-size:26px}.rank-pin.rank-place-2{background:#86563b}.rank-pin.rank-place-3{background:#a4663d}
.rank-bubble{position:absolute;z-index:500;right:12px;top:12px;width:min(320px,52%);max-height:460px;overflow:auto;box-sizing:border-box;padding:14px;background:#fffaf3;border:2px solid var(--accent);border-radius:16px;box-shadow:var(--shadow);font-size:13px;overscroll-behavior:contain}
.rank-bubble:before{content:'';position:sticky;float:left;top:50%;margin-left:-23px;border-top:10px solid transparent;border-bottom:10px solid transparent;border-right:10px solid var(--accent)}
.rank-bubble>button{float:right;padding:6px 10px}.rank-bubble h3{clear:both;font-size:17px}.rank-contribution{border-top:1px solid var(--line);padding:6px 0}.rank-contribution p{margin:0 0 4px}.rank-contribution meter{width:100%}
.expert-guide{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}
.expert-guide button{min-width:0;white-space:normal;text-align:left;font-size:13px;border:1px solid var(--line)}
.expert-guide button[aria-current=step]{background:var(--accentSoft);border:2px solid var(--accentDeep)}
.expert-guide button:before{content:attr(data-done);margin-right:4px;color:var(--accentDeep)}
.expert-section-note{display:block;font-weight:400;font-size:12px;color:var(--muted);margin:6px 0}
.expert-tour-start{margin:0 0 12px}.expert-tour{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);z-index:1500;background:#fffaf3;border:2px solid var(--accent);border-radius:14px;padding:16px;box-shadow:var(--shadow);width:min(420px,calc(100vw - 32px));box-sizing:border-box}.expert-tour button{margin-right:8px}
.tour-highlight{outline:4px solid var(--accent)!important;outline-offset:-4px;scroll-margin:30px}
@media(max-width:1000px){
.rank-bubble{position:relative;right:auto;top:auto;width:100%;max-height:300px;margin-top:10px}.rank-bubble:before{display:none}
.expert-guide{grid-template-columns:1fr}.expert-guide button{min-height:44px}
.expert-tour{bottom:85px}
.expert-layout[data-tab=layers] .expert-status,.expert-layout[data-tab=weights] .expert-status{display:block}
}
.rank-bubble{color:var(--ink)}
.rank-bubble:before{display:none}
.rank-navigation{display:flex;clear:both;gap:8px;position:sticky;top:0;background:#fffaf3;padding:4px 0;z-index:1}
.rank-navigation[hidden]{display:none}
.rank-navigation button{flex:1;min-width:0;min-height:44px;padding:8px 6px;white-space:normal}
.rank-navigation button:focus-visible{outline:3px solid var(--accentDeep);outline-offset:-3px}
.rank-pin.rank-selected{outline:4px solid #c55a17;outline-offset:3px}
.unified-rec-card[aria-current=true]{border:2px solid var(--accent);background:#fff3df}
.rank-connector{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:450;overflow:visible}
.rank-connector[hidden]{display:none}
.expert-guide button[aria-current=step]{color:var(--accentDeep)}
.expert-section-note{white-space:normal}
/* v28: warm-orange score bars in entrepreneur bubble card (no browser-default green) */
.rank-contribution meter{appearance:none;-webkit-appearance:none;height:10px;border:0;border-radius:999px;background:#f3e3d3}
.rank-contribution meter::-webkit-meter-bar{background:#f3e3d3;border:0;border-radius:999px;height:10px}
.rank-contribution meter::-webkit-meter-optimum-value,.rank-contribution meter::-webkit-meter-suboptimum-value,.rank-contribution meter::-webkit-meter-even-less-good-value{background:#e8742a;border-radius:999px}
.rank-contribution meter::-moz-meter-bar{background:#e8742a;border-radius:999px}

.boundary-notice{font-size:.9rem;color:#625e58;overflow-wrap:anywhere}.boundary-tooltip{white-space:normal;width:260px;max-width:calc(100vw - 64px)}.rent-estimate{font-size:11px;color:#006d50;line-height:16px;background:#fff;padding:0 2px}

/* Student score card shares the entrepreneur bubble and contribution meters. */
.student-map-wrap{position:relative;min-width:0}
.student-map-wrap.has-bubble{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:12px;padding-right:12px}
.student-bubble.rank-bubble{position:relative;inset:auto;width:100%;max-height:520px;margin:0;padding:16px;border-radius:24px;background:#fff6e9;overflow-wrap:anywhere;animation:student-bubble-pop .22s ease-out}
.student-bubble.rank-bubble:before{display:none}
.student-map-wrap.has-bubble:after{content:'';position:absolute;right:322px;top:36px;border-top:10px solid transparent;border-bottom:10px solid transparent;border-right:10px solid #e8742a;z-index:501;pointer-events:none}
.student-bubble[hidden]{display:none}
.student-bubble h3{margin:0 30px 10px 0;clear:none;font-size:19px}
.student-bubble-total{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px;color:#94400e}
.student-bubble-total strong{font-size:40px;line-height:1.1}
.student-bubble-rank{border-radius:99px;padding:5px 10px;background:#ffdfac;font-size:13px}
.student-bubble-summary{padding:10px;border-radius:14px;background:#ffe8c9;line-height:1.6}
.student-bubble .rank-contribution p{display:flex;flex-wrap:wrap;gap:4px;align-items:baseline}
.student-bubble-value{margin-left:auto;font-variant-numeric:tabular-nums}
.student-bubble .rank-contribution small,.student-bubble-scope{font-size:11px;line-height:1.5;color:#625349}
.student-bubble [data-bubble-close]{position:absolute;right:9px;top:8px;min-width:36px;min-height:36px;font-size:21px;line-height:1}
.student-bubble [data-bubble-decide]{float:none;width:100%;margin-top:8px}
@keyframes student-bubble-pop{from{opacity:0;transform:translateY(6px) scale(.98)}to{opacity:1;transform:none}}
@media(max-width:1000px){
  .student-map-wrap.has-bubble{display:block;padding-right:0}
  .student-bubble.rank-bubble{max-height:none;margin:10px 0 0;box-shadow:none}
  .student-map-wrap.has-bubble:after{display:none}
}
@media(prefers-reduced-motion:reduce){.student-bubble.rank-bubble{animation:none}}

:is(#business-view,#expert-view):not([data-stage="3"]) [data-boundary-notice]{display:none}

/* Expert selection uses the same four-step layout, with advanced controls folded. */
#expert-selection-map{height:520px;border:1px solid var(--line);border-radius:var(--radius);z-index:0;background:var(--track)}
#expert-view .site-model-indicator{display:flex;flex-wrap:wrap;gap:8px;min-width:0}
#expert-view .site-model-indicator>label{flex-basis:100%}
#expert-view .site-model-indicator>small{flex-basis:100%;overflow-wrap:anywhere}
#expert-view .site-model-indicator input[type=range]{flex:1;min-width:80px;max-width:100%}
#expert-view .site-model-indicator input[type=number]{max-width:90px}
#expert-view .site-model-indicator select{max-width:100%}
#expert-view .site-model-indicator details{flex-basis:100%}
#expert-view [data-thresholds] fieldset{min-width:0;margin:12px 0}
#expert-view [data-thresholds] label{display:inline-flex;gap:8px;margin:5px;max-width:100%}
#expert-view [data-thresholds] input{width:100px;min-width:0}
#expert-view [data-expert-sources]{margin-top:20px;overflow-wrap:anywhere}
#expert-view pre{max-width:100%;overflow:auto}
#expert-view [data-result-panel]{min-width:0}
#expert-view [data-result-panel] table{width:100%;table-layout:fixed;overflow-wrap:anywhere}
#expert-view:not([data-stage="3"]) [data-result-panel]{display:none}
#expert-view .consumption-controls{display:flex;flex-wrap:wrap;gap:10px}
#expert-view .consumption-controls select{max-width:100%}
@media(max-width:1000px){#expert-selection-map{height:44vh;min-height:260px;scroll-margin-bottom:80px}#expert-view .unified-rec-actions{padding-bottom:calc(12px + env(safe-area-inset-bottom))}#expert-view .site-model-indicator input[type=range]{min-height:40px}}

@media(max-height:500px) and (max-width:1000px){#expert-selection-map{height:65vh;min-height:0}}

/* The weight choice must remain actionable when the following map enters the viewport. */
@media(max-width:1000px){:is(#business-view,#expert-view)[data-stage="2"] .unified-rec-actions.map-visible{visibility:visible;pointer-events:auto}}

/* Expert reference layer sits beside the map, outside rank cards and scoring controls. */
.zoning-reference{background:var(--paper,#fffdf8);border:1px solid #d4cbbc;border-radius:12px;padding:12px;margin:0 0 12px;min-width:0}
.zoning-reference>label{display:flex;align-items:center;gap:8px;font-weight:700;cursor:pointer;min-height:44px}
.zoning-reference input[type=checkbox]{width:20px;height:20px;flex:0 0 20px}
.zoning-reference p{font-size:13px;line-height:1.6;margin:6px 0;overflow-wrap:anywhere}
.zoning-reference .zoning-source{color:#655e54;font-size:12px}
.zoning-legend{display:flex;flex-wrap:wrap;gap:8px 16px;font-size:13px}
.zoning-legend span{display:inline-flex;align-items:center;gap:5px}
.zoning-legend i{display:inline-block;width:14px;height:14px;opacity:.75;border:1px solid #777}

/* Task 37: shared accessible information and calculation feedback. */
.information-dialog{border:1px solid #bd9b7b;border-radius:18px;padding:24px;max-width:620px;width:calc(100% - 32px);max-height:85dvh;overflow:auto;color:#3d2c1e;background:#fffaf3;box-sizing:border-box}
.information-dialog::backdrop{background:rgba(40,28,18,.55)}
.information-dialog li{margin:12px 0;line-height:1.65}.information-dialog button{margin:12px 10px 0 0}.information-dialog label{display:block}
.information-link,.information-footer button{font-size:14px;padding:8px 12px}.information-footer{display:flex;flex-wrap:wrap;gap:12px;padding:24px;justify-content:center}.save-reminder{font-size:13px;color:#705a49}.rank-explanation{margin:16px 0;font-size:14px;line-height:1.65}
.calculation-veil{position:fixed;inset:0;z-index:10000;background:rgba(255,250,243,.8);display:grid;place-items:center;pointer-events:all;text-align:center}.calculation-veil[hidden]{display:none}.calculation-veil>div{padding:24px;background:#fffaf3;border-radius:16px;box-shadow:0 4px 30px #3d2c1e33}.calculation-spinner{display:inline-block;width:32px;height:32px;border:4px solid #e2d1c0;border-top-color:#b94b10;border-radius:50%;animation:calculation-spin 1s linear infinite}@keyframes calculation-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.calculation-spinner{animation:none}}
:is(#business-view,#expert-view)[data-address="false"] [data-address-save-info]{display:none}

.learning-comparison{margin:14px 0;padding:14px 18px;background:#fff0dc;border:2px solid #edaa65;border-radius:18px;color:#693817;min-width:0}.learning-comparison p{margin:0 0 8px;overflow-wrap:anywhere}.learning-comparison .learning-chips{flex-wrap:wrap}.learning-comparison b{align-self:center}

/* Research mapping tables stay inside the source disclosure on narrow screens. */
.research-mapping{min-width:0;max-width:100%}.research-table-scroll{max-width:100%;overflow-x:auto}.research-mapping table{min-width:460px;width:100%;border-collapse:collapse;font-size:12px}.research-mapping th,.research-mapping td{padding:6px;border-bottom:1px solid var(--line,#ddd);text-align:left;vertical-align:top}.research-mapping td small{display:block}.research-mapping p,.research-mapping li,.student-mapping-note{overflow-wrap:anywhere}.presets article,.learning-chips article{min-width:0}
.presets article:has(>details[open]){grid-column:1/-1}
@media(max-width:600px){.presets{grid-template-columns:minmax(0,1fr)}.research-mapping table{min-width:520px}.learning-chips article{max-width:100%}}

/* author credit */
.site-credit{flex-basis:100%;text-align:center;font-size:14px;line-height:1.7;color:#5a4a3c}.site-credit p{margin:0}.site-credit-brand{font-weight:700;font-size:15px;color:#3b2f25}.site-credit a{display:inline-block;padding:10px 4px;color:inherit}
