:root{font-family:Arial,Helvetica,sans-serif;color:#e9edf0;background:#101c27;font-size:16px}*{box-sizing:border-box}body{margin:0;min-width:320px}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed}a{color:inherit}.app-shell{min-height:100vh;display:grid;grid-template-columns:338px minmax(0,1fr)}.sidebar{background:#142330;border-right:1px solid #2d3c47;display:flex;flex-direction:column;min-height:100vh}.brand{height:86px;padding:0 28px;border-bottom:1px solid #2d3c47;display:flex;align-items:center;gap:13px}.brand-mark{width:39px;height:39px;background:#dcb26a;border-radius:9px;display:grid;place-items:center;flex:none}.brand-mark svg{width:30px;fill:none;stroke:#162430;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round}.brand-mark circle{fill:#162430}.brand h1{margin:0;display:block;letter-spacing:.095em;font-size:.88rem}.brand span:not(.brand-mark){display:block;color:#9baab6;font-size:.63rem;letter-spacing:.22em;margin-top:5px}.sidebar-content{display:flex;flex-direction:column;flex:1;padding:31px 25px 25px}.section-label,.small-label,.eyebrow{color:#dcb26a;font-size:.67rem;font-weight:800;letter-spacing:.18em}.section-label{display:flex;align-items:center;gap:13px;margin-bottom:22px}.section-label span{font-size:.67rem;color:#8c9da8;letter-spacing:0;border:1px solid #52616b;padding:5px 6px;border-radius:4px}.district-form label{display:block;font-size:1.45rem;line-height:1.27;font-weight:650;letter-spacing:-.035em;margin-bottom:17px}.search-row{display:flex;height:48px;border:1px solid #61717a;border-radius:7px;overflow:hidden;background:#1c2d3a}.search-row:focus-within{outline:2px solid #dbb36e;outline-offset:2px}.search-row input{min-width:0;flex:1;background:none;border:0;color:#fff;outline:0;padding:0 13px;font-size:.95rem}.search-row input::placeholder{color:#a7b5bd}.search-button{width:49px;background:#dcb26a;border:0;color:#162430;display:grid;place-items:center}.search-button:hover{background:#f0c781}.search-button svg{width:21px;height:21px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round}.field-help{font-size:.81rem;color:#aab7bf;line-height:1.5;margin:12px 0 0}.district-results{margin-top:14px;border:1px solid #52616b;background:#1d2e3c;border-radius:8px;max-height:290px;overflow:auto}.result-item{display:block;width:100%;text-align:left;color:#e9edf0;padding:12px 13px;border:0;border-bottom:1px solid #3a4b57;background:none}.result-item:last-child{border:0}.result-item:hover,.result-item:focus-visible{background:#2b4253}.result-item strong{display:block;font-size:.91rem}.result-item small{display:block;color:#aab7bf;margin-top:3px;font-size:.78rem}.result-message{padding:14px;color:#c0cbd0;font-size:.9rem;line-height:1.5}.district-active{margin-top:17px;padding:15px;border:1px solid #56636d;background:#1d303e;border-left:3px solid #dcb26a;border-radius:5px}.district-active strong,.district-active>span{display:block}.district-active strong{font-size:1.03rem;margin:10px 0 3px}.district-active>span{font-size:.85rem;color:#b5c1c8}.text-button{color:#e2b86e;border:0;background:none;padding:10px 0 0;text-decoration:underline;text-underline-offset:3px;font-size:.83rem}.divider{height:1px;background:#344651;margin:29px 0}.mode-choices{border:0;padding:0;margin:0;display:grid;gap:10px}.mode-choices:disabled{opacity:.5}.mode-card{position:relative;border:1px solid #50616c;border-radius:8px;display:flex;gap:13px;align-items:center;padding:14px 12px;min-height:76px;cursor:pointer;transition:background .15s,border-color .15s}.mode-card:has(input:checked){border-color:#dcb26a;background:#293947}.mode-card:focus-within{outline:2px solid #e1b875;outline-offset:2px}.mode-card input{position:absolute;top:50%;left:12px;width:1px;height:1px;margin:0;opacity:0;clip-path:inset(50%);pointer-events:none}.mode-icon{display:grid;place-items:center;width:36px;height:36px;border:1px solid #77848b;border-radius:6px;color:#ddbc86;font-family:Georgia,serif;font-size:1.2rem;flex:none}.mode-card strong,.mode-card small{display:block}.mode-card strong{font-size:.94rem}.mode-card small{font-size:.77rem;color:#b3c0c8;line-height:1.35;margin-top:5px}.mode-check{width:14px;height:14px;border-radius:50%;border:1px solid #77848b;flex:none;margin-left:auto}.mode-card:has(input:checked) .mode-check{border:4px solid #dcb26a}.sidebar-bottom{margin-top:auto;padding-top:35px}.sidebar-bottom .keyline{width:28px;height:2px;background:#dcb26a}.sidebar-bottom p{font-size:.83rem;color:#99aab5;line-height:1.55}.main{min-width:0;display:flex;flex-direction:column;min-height:100vh}.topbar{height:86px;border-bottom:1px solid #2d3c47;display:flex;justify-content:space-between;align-items:center;padding:0 34px}.topbar-title{display:flex;flex-direction:column;gap:7px}.topbar-location,#topbar-location{color:#e4e9ec;font-size:.9rem;font-weight:700;letter-spacing:.07em}.topbar-right{font-size:.7rem;letter-spacing:.12em;color:#acb9c1;font-weight:700}.live-mark,.badge-dot{display:inline-block;width:7px;height:7px;background:#dcb26a;border-radius:50%;margin-right:8px}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 360px;flex:1;min-height:590px}.map-panel{position:relative;overflow:hidden;background:#182936;min-height:550px;touch-action:none}.map-panel canvas{position:absolute;inset:0;width:100%;height:100%;display:block;cursor:grab}.map-panel canvas:active{cursor:grabbing}.map-grid{position:absolute;inset:0;pointer-events:none;opacity:.23;background-image:linear-gradient(#496071 1px,transparent 1px),linear-gradient(90deg,#496071 1px,transparent 1px);background-size:60px 60px}.map-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;padding:38px;background:radial-gradient(circle at 58% 49%,#243c49 0,transparent 46%)}.empty-symbol{position:absolute;inset:0;opacity:.32}.empty-symbol span{position:absolute;border:1px solid #78909d;transform:rotate(-22deg);border-radius:50%}.empty-symbol span:nth-child(1){width:390px;height:190px;left:12%;top:20%}.empty-symbol span:nth-child(2){width:620px;height:330px;left:32%;top:41%}.empty-symbol span:nth-child(3){width:230px;height:450px;left:65%;top:3%}.empty-copy{position:relative;z-index:1;max-width:390px;text-align:center}.empty-copy h2{font-family:Georgia,'Times New Roman',serif;font-size:clamp(2.7rem,4vw,4.5rem);font-weight:400;line-height:1.07;letter-spacing:-.04em;margin:19px 0}.empty-copy p{color:#b9c5cb;line-height:1.55;margin:0;font-size:1rem}.map-badge{position:absolute;top:23px;left:23px;background:#172631e8;border:1px solid #5b6c75;border-radius:5px;padding:11px 14px;font-size:.75rem;letter-spacing:.08em;font-weight:700;max-width:calc(100% - 90px)}.map-controls{position:absolute;right:22px;top:22px;display:grid;background:#182a36;border:1px solid #62737b;border-radius:7px;overflow:hidden}.map-controls button{width:39px;height:39px;border:0;border-bottom:1px solid #52616b;background:#1d303d;color:#f0ede6;font-size:1.35rem}.map-controls button:last-child{border:0}.map-controls button:hover{background:#324957}.map-legend{position:absolute;bottom:20px;left:22px;padding:9px 11px;background:#142532db;border:1px solid #576772;border-radius:5px;display:flex;gap:16px;font-size:.66rem;font-weight:700;letter-spacing:.07em;color:#c3ced3}.legend-line{display:inline-block;vertical-align:middle;width:22px;border-top:3px solid #637d8d;margin-right:6px}.legend-line.accent{border-color:#e6b96d}.exercise-panel{background:#f0f1ee;color:#1c2e3a;border-left:1px solid #465964;padding:29px 27px;min-width:0}.exercise-panel .section-label{color:#8b6332}.exercise-panel .section-label span{color:#526370;border-color:#b9c0c1}.panel-intro{padding-top:5px}.panel-intro h2,.exercise-panel h2{font-family:Georgia,'Times New Roman',serif;font-size:2rem;line-height:1.14;font-weight:400;letter-spacing:-.035em;margin:34px 0 14px}.panel-intro p,.exercise-panel p{line-height:1.55;color:#53616a;font-size:.95rem}.intro-lines{display:grid;gap:10px;margin-top:55px}.intro-lines span{height:1px;background:#cdd2d0}.intro-lines span:nth-child(2){width:72%}.intro-lines span:nth-child(3){width:42%}.question-count{font-size:.7rem;color:#53616a;font-weight:800;letter-spacing:.16em;margin-top:35px}.prompt{font-family:Georgia,'Times New Roman',serif;font-size:1.95rem;line-height:1.22;letter-spacing:-.035em;margin:16px 0 17px;overflow-wrap:anywhere}.prompt.street-name{color:#153d51}.instruction{color:#5c6870;font-size:.92rem;line-height:1.5;margin-bottom:20px}.guess-form{display:grid;gap:11px}.guess-form label{font-size:.77rem;font-weight:800;letter-spacing:.06em}.guess-form input{width:100%;height:48px;border:1px solid #7b898f;background:white;border-radius:5px;padding:0 12px;color:#1b2d39;outline-color:#b47c35}.primary-button,.secondary-button{min-height:46px;padding:11px 15px;border-radius:5px;font-size:.9rem;font-weight:700}.primary-button{background:#bb8645;color:#101e29;border:1px solid #bb8645}.primary-button:hover{background:#d7a762}.secondary-button{background:transparent;color:#1d3544;border:1px solid #7b898f}.secondary-button:hover{background:#e3e8e5}.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.feedback{padding:12px 13px;border-left:3px solid #b57b3c;background:#e2e7e4;color:#273b47;font-size:.9rem;line-height:1.5;margin-top:17px}.feedback.good{border-color:#3c8d79;background:#dceae3}.score{border-top:1px solid #c9cfcc;margin-top:26px;padding-top:19px;display:flex;justify-content:space-between;color:#5a6870;font-size:.79rem}.score strong{display:block;font-size:1.35rem;color:#213541;margin-top:5px}.loading-spinner{width:22px;height:22px;border:2px solid #adbab9;border-top-color:#ac762f;border-radius:50%;animation:spin .8s linear infinite;margin-top:24px}@keyframes spin{to{transform:rotate(360deg)}}.footer{min-height:49px;border-top:1px solid #2d3c47;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:10px 34px;color:#9fb0ba;font-size:.7rem;letter-spacing:.02em}.footer a{text-underline-offset:3px}.footer>span:last-child{letter-spacing:.12em}@media(max-width:1100px){.app-shell{grid-template-columns:300px minmax(0,1fr)}.workspace{grid-template-columns:minmax(0,1fr) 310px}.exercise-panel{padding:25px 20px}.topbar{padding:0 22px}}@media(max-width:1100px){.app-shell{display:block}.sidebar{min-height:0}.brand{height:70px}.sidebar-content{padding:22px}.sidebar-bottom{display:none}.mode-choices{grid-template-columns:1fr 1fr}.mode-card{align-items:flex-start}.divider{margin:22px 0}.topbar{height:63px}.workspace{grid-template-columns:1fr;display:flex;flex-direction:column}.map-panel{height:60vh;min-height:400px;order:2}.exercise-panel{order:1;border-left:0;border-bottom:1px solid #51636d;min-height:210px}.panel-intro h2,.exercise-panel h2{margin-top:16px}.question-count{margin-top:8px}.footer{flex-wrap:wrap}}@media(max-width:560px){.brand{padding:0 18px}.sidebar-content{padding:20px 17px}.mode-choices{grid-template-columns:1fr}.mode-card{min-height:62px}.topbar{padding:0 17px}.topbar-right,.footer>span:last-child{display:none}.map-panel{height:55vh;min-height:370px}.map-badge{left:12px;top:12px;font-size:.67rem}.map-controls{right:12px;top:12px}.map-legend{left:12px;bottom:12px;gap:9px;font-size:.59rem}.exercise-panel{padding:20px 17px}.footer{padding:14px 17px}.empty-copy h2{font-size:2.7rem}}.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}[hidden]{display:none!important}

.municipality-help{font-size:.88rem;line-height:1.45;color:#b3c0c8;margin:-8px 0 14px}.municipality-toolbar{display:flex;gap:13px;flex-wrap:wrap;margin-bottom:11px}.municipality-toolbar button{padding:2px 0;border:0;background:none;color:#e2b86e;font-size:.83rem;text-decoration:underline;text-underline-offset:3px}.municipality-list{max-height:245px;overflow:auto;border:1px solid #52616b;border-radius:7px;background:#1b2d3a;padding:4px}.municipality-option{display:flex;align-items:center;gap:11px;min-height:39px;padding:7px 9px;border-radius:4px;font-size:.89rem;line-height:1.3;cursor:pointer}.municipality-option:hover{background:#2b4253}.municipality-option input{width:18px;height:18px;accent-color:#dcb26a;flex:none;cursor:pointer}.municipality-count{font-size:.83rem;color:#b7c5cc;min-height:35px;padding-top:11px}.municipality-count.error{color:#f3c396}.municipality-start{width:100%;min-height:46px;padding:10px;border:1px solid #dcb26a;border-radius:5px;background:#dcb26a;color:#13222e;font-size:.88rem;font-weight:700}.municipality-start:hover:not(:disabled){background:#f0c781}.municipality-start:disabled{opacity:.48}.municipality-section-active .municipality-list{max-height:165px}

.locality-list{max-height:220px}.locality-group-title{padding:11px 9px 5px;color:#e2b86e;font-size:.77rem;font-weight:800;letter-spacing:.07em}.locality-group-title:not(:first-child){border-top:1px solid #3a4b57;margin-top:5px}.locality-note{font-size:.78rem;line-height:1.45;color:#aab8c0;margin:0 0 13px}.street-scope-choices{border:0;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:8px}.street-scope-choices:disabled{opacity:.5}.street-scope-choices label{display:flex;align-items:center;gap:7px;min-height:40px;padding:7px 11px;border:1px solid #556873;border-radius:6px;background:#1a2b38;font-size:.86rem;cursor:pointer}.street-scope-choices label:has(input:checked){border-color:#dcb26a;background:#293947}.street-scope-choices input{accent-color:#dcb26a;width:16px;height:16px}.street-scope-help{margin:10px 0 0}.municipality-toolbar button:disabled{opacity:.5;cursor:not-allowed}@media(max-width:1100px){.locality-list{max-height:180px}}

@media(min-width:1101px){.app-shell{height:100vh;min-height:650px}.sidebar{height:100%;min-height:0;overflow-y:auto}.main{height:100%;min-height:0}.workspace{min-height:0}.map-panel{min-height:0}.exercise-panel{overflow-y:auto}}

.session-option{border:1px solid #c6cfcc;border-radius:8px;padding:17px;margin-top:16px;background:#f8f9f6}.session-option h3{font-family:Georgia,'Times New Roman',serif;font-size:1.3rem;font-weight:400;margin:0 0 7px}.session-option p{font-size:.85rem;margin:0 0 14px}.session-option .primary-button{width:100%}.session-option form{display:grid;gap:9px}.session-option label{font-size:.75rem;font-weight:800;letter-spacing:.08em;color:#354c58}.session-option input{width:100%;height:46px;padding:0 12px;border:1px solid #7b898f;border-radius:5px;background:#fff;color:#1c2e3a;outline-color:#bb8645}.session-option input:disabled{opacity:.55}.session-option small{font-size:.78rem;line-height:1.4;color:#5b6b70}.session-option button:disabled{opacity:.48}.field-error{color:#9a3e2b;font-size:.81rem}.test-note{font-size:.78rem!important;margin-top:19px}.result-score{font-family:Georgia,'Times New Roman',serif;font-size:4rem;color:#193c4d;line-height:1;margin:30px 0}.result-score span{font:700 .88rem Arial,Helvetica,sans-serif;letter-spacing:.06em;color:#53616a}.exercise-panel button:focus-visible,.exercise-panel input:focus-visible{outline:2px solid #aa7134;outline-offset:2px}

.answer-heading{font-size:1rem;margin:0 0 12px;color:#253a46}.answer-list{list-style:none;padding:0;margin:0 0 22px;border-top:1px solid #c9cfcc}.answer-row{display:grid;grid-template-columns:25px minmax(0,1fr) minmax(0,1fr);column-gap:8px;row-gap:6px;padding:12px 0;border-bottom:1px solid #c9cfcc;align-items:start}.answer-row div{min-width:0}.answer-row small{display:block;font-size:.61rem;letter-spacing:.06em;font-weight:800;color:#53616a;margin-bottom:4px}.answer-row strong{display:block;font-size:.83rem;line-height:1.35;overflow-wrap:anywhere}.answer-number{color:#53616a;font-size:.78rem;padding-top:2px}.answer-status{grid-column:2 / -1;font-size:.72rem;font-weight:700;color:#a24b3d}.answer-correct .answer-status{color:#27715e}.answer-wrong div:nth-of-type(1) strong{color:#9a4234}

.answer-help{font-size:.8rem!important;margin:0 0 13px;color:#5b6971}.answer-solution{padding:1px 0 2px;border:0;border-bottom:1px dashed #a3753a;background:transparent;color:#184960;font-size:.83rem;font-weight:700;line-height:1.35;text-align:left;overflow-wrap:anywhere;max-width:100%}.answer-solution:hover,.answer-solution.is-active{color:#83561d;border-bottom-style:solid}.answer-solution.is-active{background:#ead9b9;box-shadow:0 0 0 3px #ead9b9;border-radius:1px}.answer-solution:focus-visible{outline:2px solid #aa7134;outline-offset:3px}

/* Layout resilience, touch targets and keyboard navigation. */
html { scroll-padding-top: 16px; }
body { min-width: 0; }
button, input, fieldset { min-width: 0; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, .mode-card, .session-option, .municipality-option {
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #f0c781;
  outline-offset: 3px;
}
.exercise-panel :focus-visible { outline-color: #825318; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 20; padding: 14px 18px; background: #f0c781; color: #142330; border-radius: 6px; transform: translateY(-160%); font-weight: 700; }
.skip-link:focus { transform: translateY(0); }
.noscript-notice { padding: 18px; margin: 0; background: #f0c781; color: #142330; }
.brand, .topbar, .footer { flex-shrink: 0; }
.brand h1 { font-weight: 700; }
h2.section-label { margin-top: 0; }
.topbar { height: auto; min-height: 86px; gap: 20px; padding-top: 15px; padding-bottom: 15px; }
.topbar-title { min-width: 0; }
#topbar-location, #district-name, .map-badge, .municipality-option span { overflow-wrap: anywhere; }
.topbar-right { flex-shrink: 0; }
.mode-card > span:nth-of-type(2) { min-width: 0; }
.search-row input, .guess-form input, .session-option input { font-size: 1rem; }
.municipality-option, .street-scope-choices label, .municipality-toolbar button, .text-button, .answer-solution { min-height: 44px; }
.municipality-toolbar button { padding: 8px 0; }
.map-controls button { width: 44px; height: 44px; }
.map-panel canvas:focus-visible { outline-offset: -4px; }
.map-crosshair { display: none; position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; transform: translate(-50%, -50%); pointer-events: none; border: 1px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px #142330; }
.map-crosshair::before, .map-crosshair::after { content: ''; position: absolute; background: #fff; box-shadow: 0 0 1px 1px #142330; }
.map-crosshair::before { left: 10px; top: -5px; width: 2px; height: 32px; }
.map-crosshair::after { top: 10px; left: -5px; height: 2px; width: 32px; }
.map-keyboard-help { display: none; position: absolute; bottom: 64px; left: 16px; right: 16px; padding: 12px; margin: 0; background: #142330; color: #e9edf0; font-size: .85rem; line-height: 1.5; pointer-events: none; }
.map-panel canvas:focus-visible ~ .map-crosshair, .map-panel canvas:focus-visible ~ .map-keyboard-help { display: block; }
.exercise-panel h2.prompt { margin: 16px 0 17px; }
.score { gap: 12px; flex-wrap: wrap; }
.score > div { flex: 1 1 65px; }
.map-legend { max-width: calc(100% - 32px); flex-wrap: wrap; }
.answer-row { column-gap: 10px; }
.answer-row small { font-size: .7rem; letter-spacing: .025em; }
.answer-solution { padding: 7px 0; }
.footer span { min-width: 0; overflow-wrap: anywhere; }
@media (hover: hover) {
  .mode-card:hover { background-color: #293f50; }
  .session-option:hover { border-color: #9eacaa; box-shadow: 0 3px 12px #1830400c; }
}
@media (max-width: 1100px) {
  .topbar { min-height: 63px; }
  .mode-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exercise-panel { scroll-margin-top: 16px; }
  .map-panel { flex: none; }
}
@media (max-width: 560px) {
  .mode-choices { grid-template-columns: minmax(0, 1fr); }
  .map-panel { height: 55svh; }
  .map-badge { max-width: calc(100% - 82px); }
  .brand { padding-right: 12px; }
}
/* Content remains visible when animation support is unavailable. */
@keyframes gentle-reveal { from { opacity: .35; } to { opacity: 1; } }
.reveal-enter, .exercise-panel > h2, .exercise-panel > .session-option { animation: gentle-reveal 320ms ease-out both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Site identity and noncommercial purpose. */
.brand h1 { font-size: 1.06rem; line-height: 1.25; letter-spacing: -.015em; max-width: 220px; }
.brand { height: auto; min-height: 86px; padding-top: 16px; padding-bottom: 16px; }
.footer { display: block; padding-top: 16px; padding-bottom: 16px; }
.purpose-note { margin: 0 0 12px; max-width: 1100px; color: #b8c5cd; font-size: .8rem; line-height: 1.6; }
.purpose-note strong { color: #e2e8ec; }
.footer-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; }
.footer-meta > span:last-child { letter-spacing: .12em; }
@media (max-width: 560px) { .footer-meta > span:last-child { display: none; } }

.answer-given { color: #15536a; border-bottom-color: #22708a; }
.answer-given:hover, .answer-given.is-active { color: #123e50; }
.answer-given.is-active { background: #c8e8ef; box-shadow: 0 0 0 3px #c8e8ef; }

.legend-point { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: middle; border: 2px solid #fff; border-radius: 50%; background: #72d9ef; }
/* Visually hidden live regions must not create a scroll range after the footer. */
.sr-only { top: 0; left: 0; }
@media (min-width: 1101px) {
  .app-shell { height: 100dvh; min-height: 0; }
  .main { overflow: hidden; }
}
@media (max-width: 1100px) {
  .main { min-height: 0; }
  .workspace { flex: none; min-height: 0; }
}

/* One bounded application scroller prevents document overflow below the content. */
html, body { height: 100%; overflow: hidden; }
.app-shell { position: fixed; inset: 0; height: 100%; min-height: 0; overflow: hidden; }
.sidebar, .main, .workspace, .exercise-panel { min-height: 0; }
@media (max-width: 1100px) {
  .app-shell { overflow-y: auto; overflow-x: hidden; }
  .sidebar, .main { height: auto; overflow: visible; }
  .sidebar-content { flex: none; }
  .workspace { flex: none; }
}

#name-scope-options { width:100%; margin:4px 0 0; padding:12px; border:1px solid #556873; border-radius:6px; }
#name-scope-options legend { padding:0 6px; color:#c8d3da; font-size:.875rem; }
#name-scope-options label + label { margin-top:8px; }
#name-scope-options[hidden] { display:none; }
.legend-line.excluded { border-top-color:#df777a; background:transparent; }

.scope-info { display:flex; align-items:center; flex-wrap:wrap; column-gap:4px; margin:0 0 18px; font-size:.75rem; }
.scope-info > .section-label { margin:0; font-size:inherit; }
.scope-info-button { position:relative; display:grid; place-items:center; flex:none; width:44px; height:44px; padding:0; border:0; background:transparent; color:#dcb26a; font:italic 700 1em Georgia,serif; }
.scope-info-button::before { content:''; position:absolute; width:1.6em; height:1.6em; border:1px solid currentColor; border-radius:50%; }
.scope-info-button:hover { color:#f0ce96; }

.scope-info-button:focus-visible { outline:2px solid #dcb26a; outline-offset:3px; }
.scope-info-text { flex-basis:100%; padding:14px; margin-top:8px; border:1px solid #718793; border-radius:6px; background:#1a2b38; color:#d9e3e9; font-size:.875rem; line-height:1.55; overflow-wrap:anywhere; }
.scope-info-text p { margin:0 0 12px; }
.scope-info-text p:last-child { margin-bottom:0; }

.legal-actions { display:flex; flex-wrap:wrap; gap:8px 12px; margin-top:12px; }
.legal-actions button, .legal-dialog button { min-height:44px; padding:9px 14px; border:1px solid #718793; border-radius:6px; background:#1a2b38; color:#e9edf0; font-size:.875rem; }
.legal-actions button:hover, .legal-dialog button:hover { background:#314657; }
.legal-actions button:focus-visible, .legal-dialog button:focus-visible { outline:2px solid #dcb26a; outline-offset:3px; }
.legal-dialog { width:min(540px,calc(100% - 32px)); max-height:calc(100dvh - 48px); overflow:auto; padding:24px; border:1px solid #718793; border-radius:12px; background:#142330; color:#e9edf0; line-height:1.6; }
.legal-dialog::backdrop { background:rgb(0 0 0 / .65); }
.legal-dialog h2 { margin:0 0 12px; font-size:1.5rem; overflow-wrap:anywhere; }
.legal-dialog .placeholder-label { color:#e9b86a; font-weight:700; }
.legal-dialog form { margin-top:24px; text-align:right; }

/* Reserve exactly 86px for the footer; only training panels scroll. */
.app-shell { display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) 86px; overflow:hidden; }
.training-layout { min-height:0; min-width:0; display:grid; grid-template-columns:338px minmax(0,1fr); overflow:hidden; }
.training-layout > .sidebar, .training-layout > .main { height:100%; min-height:0; }
.app-shell > .footer { display:flex; align-items:center; justify-content:space-between; gap:24px; min-height:0; height:86px; padding:2px 24px; background:#101c27; }
.footer-purpose { min-width:0; flex:1; }
.footer-purpose p { margin:0; max-width:none; font-size:.8rem; line-height:1.25; letter-spacing:normal; color:#b8c5cd; }

.footer-right { flex:none; text-align:right; display:grid; row-gap:4px; }
.footer-meta { display:block; font-size:.75rem; line-height:1.3; }
.footer-meta > span:last-child { display:inline; letter-spacing:normal; }
.footer-right .legal-actions { justify-content:flex-end; margin:0; gap:10px; }
.footer-right .legal-actions button { min-height:36px; padding:4px 10px; font-size:.75rem; }
@media (max-width:1100px) {
  .training-layout { display:block; overflow-y:auto; }
  .training-layout > .sidebar, .training-layout > .main { height:auto; }
}
@media (max-width:560px) {
  .app-shell > .footer { flex-wrap:nowrap; gap:10px; padding:2px 12px; }
  .footer-purpose { flex:1; }
  .footer-right { flex:0 1 240px; min-width:0; }
  .footer-meta { line-height:1.3; font-size:.6875rem; }
  .footer-right .legal-actions { gap:6px; }
  .footer-right .legal-actions button { font-size:.6875rem; padding:4px 6px; }
}

.footer-right .legal-actions button { padding:0; min-height:0; line-height:1.3; border:0; border-radius:0; background:transparent; color:#e9edf0; text-decoration:underline; text-underline-offset:3px; }
.footer-right .legal-actions button:hover { background:transparent; color:#e9b86a; }
@media (max-width:1100px) {
  .app-shell { grid-template-rows:minmax(0,1fr) auto; }
  .app-shell > .footer { height:auto; min-height:86px; }
}
@media (max-width:700px) {
  .app-shell > .footer { display:block; padding:2px 12px; }
  .footer-purpose p { display:block; font-size:.8rem; }
  .footer-right { margin-top:6px; }
}

/* Focus must never scroll the fixed frame; only the visible content panels scroll. */
html, body, .app-shell { overflow:clip; }
.training-layout { grid-template-rows:minmax(0,1fr); }
@media (min-width:1101px) {
  .training-layout, .training-layout > .main { overflow:clip; }
  .training-layout > .sidebar { overflow-x:hidden; overflow-y:auto; }
}
@media (max-width:1100px) {
  .training-layout { overflow-x:hidden; overflow-y:auto; overscroll-behavior-y:contain; }
}

.legal-content { display:block; width:100%; height:clamp(210px,40dvh,360px); border:0; background:#142330; }

/* The first choice and POI controls share the existing training panel. */
.subject-choices { border:0; padding:0; margin:0 0 25px; display:grid; gap:9px; min-width:0; }
.subject-choices label { position:relative; display:flex; align-items:center; gap:12px; border:1px solid #526271; border-radius:7px; padding:13px; cursor:pointer; transition:background .18s,border-color .18s; }
.subject-choices label:hover { background:#243747; }
.subject-choices label:has(input:checked) { border-color:#e9b86a; background:#293741; }
.subject-choices label:focus-within { outline:2px solid #e9b86a; outline-offset:3px; }
.subject-choices input { accent-color:#e9b86a; flex:none; }
.subject-choices strong,.subject-choices small { display:block; }
.subject-choices strong { color:#f5f1e8; font-size:15px; }
.subject-choices small { color:#bac5cc; margin-top:5px; font-size:12px; }
#poi-category-choices { min-width:0; border:0; margin:0; padding:0; }
.poi-category-list { max-height:260px; overflow-y:auto; overscroll-behavior:contain; border:1px solid #435565; border-radius:5px; }
.poi-category-list small { color:#b8c6d0; }
#poi-settings .field-help { line-height:1.65; color:#bac5cc; }
#poi-answer select { width:100%; min-height:44px; margin:7px 0 12px; border:1px solid #8294a3; border-radius:5px; padding:10px; color:#f5f1e8; background:#172b3a; font:inherit; }
#poi-test-form { display:grid; gap:10px; }
#poi-test-count { width:100%; min-height:44px; border:1px solid #8294a3; border-radius:5px; padding:10px; color:#f5f1e8; background:#172b3a; font:inherit; }
#poi-test-plan { font-size:13px; line-height:1.5; color:#e9b86a; }
.poi-results { display:grid; gap:12px; margin-bottom:22px; }
.poi-result { display:grid; gap:7px; padding:14px; border:1px solid #465a69; border-radius:6px; }
.poi-result > span { font-size:11px; color:#b8c6d0; text-transform:uppercase; margin-top:5px; }
.poi-review { text-align:left; border:0; background:transparent; color:#e9b86a; font:inherit; padding:6px 0; cursor:pointer; text-decoration:underline; text-underline-offset:3px; overflow-wrap:anywhere; }
.poi-review[data-kind="given"] { color:#72d9ef; }
.poi-review:hover { background:#243747; }
.map-attribution { position:absolute; z-index:4; right:0; bottom:0; padding:3px 7px; background:rgba(255,255,255,.94); color:#243746; font:10px/1.5 sans-serif; max-width:100%; }
.map-attribution a { color:#174a78; }
.poi-map-notice { position:absolute; z-index:5; top:60px; left:12px; right:12px; padding:9px 12px; background:#fff6df; color:#483713; border-radius:5px; font-size:12px; }
.map-panel:has(#poi-attribution:not([hidden])) .map-legend { bottom:28px; background:rgba(20,35,48,.94); padding:7px; border-radius:4px; }
@media (prefers-reduced-motion:reduce) { .subject-choices label { transition:none; } }
/* POI questions and results sit on the light exercise surface. */
#poi-answer select, #poi-test-count { background:#fff; color:#1c2e3a; }
#poi-test-plan { color:#765025; }
.poi-result { border-color:#bcc8cc; }
.poi-result > span { color:#53616a; }
.poi-review { color:#765025; }
.poi-review[data-kind="given"] { color:#126178; }
.poi-review:hover { background:#e0e7e7; }
