:root {
  color-scheme: light;
  --ink: #173c36;
  --muted: #526963;
  --paper: #f7fbf5;
  --panel: #ffffff;
  --line: #c8d9cf;
  --green: #176b53;
  --green-dark: #0e4e3d;
  --mint: #dcefe1;
  --blue: #2f8295;
  --blue-soft: #9bd1db;
  --sand: #f3e7c9;
  --yellow: #f3c65d;
  font: 17px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
button, a { font: inherit; }
button { cursor: pointer; }
a { color: var(--green-dark); }
button:focus-visible, a:focus-visible, [tabindex="-1"]:focus-visible {
  outline: 4px solid #e0a90d;
  outline-offset: 4px;
}
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 20; padding: 10px 14px; border-radius: 8px; background: #fff; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.topbar, main, footer { width: min(100% - 32px, 1080px); margin-inline: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; border-bottom: 1px solid var(--line); }
.topbar p { margin: 0; color: var(--muted); font-weight: 700; }
.back { font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 4px; }
main { padding-block: 48px 80px; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 48px; align-items: end; margin-bottom: 42px; }
.eyebrow, .step-label { margin: 0 0 8px; color: var(--green); font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3, p { text-wrap: pretty; }
h1 { max-width: 740px; margin: 0; font-size: clamp(2.8rem, 8vw, 6.4rem); line-height: .94; letter-spacing: -.065em; }
.lead { max-width: 720px; margin: 22px 0 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.28rem); }
.mission { display: flex; align-items: center; gap: 14px; padding: 20px; border: 1px solid #a9c8b3; border-radius: 18px; background: var(--mint); }
.mission > span { display: grid; place-items: center; flex: 0 0 50px; width: 50px; height: 50px; border-radius: 50%; color: white; background: var(--green); font-size: 2rem; }
.mission p { margin: 0; }
.map-panel, .challenge, .summary, .noscript-note { border: 1px solid var(--line); border-radius: 26px; background: var(--panel); box-shadow: 0 18px 55px rgba(29, 63, 49, .08); }
.map-panel { overflow: hidden; }
.panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 26px 28px 20px; }
h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.08; letter-spacing: -.04em; }
.legend { display: flex; gap: 18px; margin: 0; padding: 0; color: var(--muted); font-size: .85rem; list-style: none; }
.legend li { display: flex; align-items: center; gap: 7px; }
.legend span { width: 20px; height: 8px; border-radius: 20px; }
.legend-water { background: var(--blue); }
.legend-stop { background: var(--yellow); }
.map { position: relative; margin-inline: 16px; overflow: hidden; border-radius: 20px; background: #e6efe4; }
.map svg { display: block; width: 100%; height: auto; }
.map-ground { fill: #e9f1e4; }
.park { fill: #b6d5aa; }
.street { fill: #7d8d8a; }
.river { fill: var(--blue-soft); }
.sea { fill: #4a93a3; }
.river-line, .sea-waves path { fill: none; stroke: #f2fbf9; stroke-width: 5; stroke-linecap: round; opacity: .7; }
.route { fill: none; stroke: #f7c548; stroke-width: 12; stroke-linecap: round; stroke-dasharray: 1 20; opacity: .22; transition: opacity .3s ease, stroke-width .3s ease; }
.map[data-point="drain"] .route-1, .map[data-point="river"] .route-1, .map[data-point="river"] .route-2, .map[data-point="sea"] .route { opacity: 1; stroke-width: 15; }
.house path:first-child { fill: #f3d9b1; }.house path:nth-child(2) { fill: #b45d4d; }.house rect { fill: #745548; }
.tree circle { fill: #4d9565; }.tree rect { fill: #7d6346; }
.drain rect { fill: #304d4c; }.drain path { stroke: #9ab0ab; stroke-width: 5; }
.bin path:first-child { fill: #f3c65d; stroke: #314d42; stroke-width: 4; }.bin path:nth-child(2) { fill: none; stroke: #314d42; stroke-width: 6; stroke-linecap: round; }
.package rect { fill: #fff0bc; stroke: #244b46; stroke-width: 4; }.package path { fill: none; stroke: #d66b50; stroke-width: 4; }
.pin { opacity: .35; transition: opacity .25s ease, transform .25s ease; }
.pin circle { fill: #fff; stroke: var(--green-dark); stroke-width: 4; }
.pin text { fill: var(--green-dark); font-size: 14px; font-weight: 900; text-anchor: middle; }
.map[data-point="street"] .pin-street, .map[data-point="drain"] .pin-drain, .map[data-point="river"] .pin-river, .map[data-point="sea"] .pin-sea { opacity: 1; }
.map-name, .bin-label { fill: #284b45; font-size: 17px; font-weight: 900; letter-spacing: .08em; }
.map-name-light { fill: #f5fffd; }
.bin-label { font-size: 12px; }
.sea-waves path { stroke-width: 4; }
.map-note { position: absolute; left: 24px; bottom: 24px; width: min(390px, calc(100% - 48px)); padding: 16px 18px; border: 1px solid rgba(255,255,255,.7); border-radius: 14px; background: rgba(255,255,255,.94); box-shadow: 0 10px 30px rgba(25,58,50,.12); }
.map-note p { margin: 0; }
.note-kicker { color: var(--green); font-size: .78rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
#map-message { margin-top: 5px; }
.map-actions { display: flex; justify-content: flex-end; padding: 20px 28px 26px; }
.primary, .secondary { min-height: 54px; padding: 12px 20px; border-radius: 12px; font-weight: 800; }
.primary { border: 2px solid var(--green-dark); color: white; background: var(--green); box-shadow: 0 4px 0 var(--green-dark); }
.primary:hover { background: var(--green-dark); }
.primary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--green-dark); }
.challenge, .summary { margin-top: 32px; padding: clamp(24px, 5vw, 48px); }
.challenge > p:not(.step-label) { max-width: 720px; color: var(--muted); }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 26px; }
.choice { display: flex; align-items: center; gap: 16px; min-height: 104px; padding: 16px; text-align: left; color: var(--ink); border: 2px solid var(--line); border-radius: 16px; background: #fbfdf9; }
.choice:hover { border-color: var(--green); background: #f2f8f2; }
.choice[aria-pressed="true"] { border-color: var(--green); box-shadow: 0 0 0 3px #cce5d2; }
.choice-icon, .choice-letter { display: grid; place-items: center; flex: 0 0 54px; width: 54px; height: 54px; border-radius: 12px; background: var(--mint); color: var(--green-dark); font-size: 1.6rem; font-weight: 900; }
.choice small, .choice strong { display: block; }
.choice small { margin-top: 3px; color: var(--muted); }
.feedback { max-width: 760px; margin: 22px 0; padding: 16px 18px; border-left: 5px solid var(--green); border-radius: 0 12px 12px 0; background: var(--mint); }
.feedback.is-try { border-color: #bf7a20; background: #fff3da; }
.new-case { display: flex; gap: 20px; align-items: center; margin-top: 24px; padding: 18px 22px; border-radius: 16px; background: #e8f1f3; }
.new-case p { margin: 0; }
.case-art { display: grid; place-items: center; flex: 0 0 62px; width: 62px; height: 62px; border: 3px solid #316779; border-radius: 13px; color: #316779; background: #fff7da; font-size: 2.3rem; transform: rotate(7deg); }
.summary { text-align: center; background: #edf7ee; }
.summary > p:not(.step-label) { max-width: 750px; margin-inline: auto; }
.summary-mark { display: grid; place-items: center; width: 70px; height: 70px; margin: 0 auto 18px; border-radius: 50%; color: #fff; background: var(--green); font-size: 2.2rem; font-weight: 900; }
.say-it { max-width: 670px; margin: 28px auto; padding: 20px; border: 1px dashed #7ba98a; border-radius: 14px; background: #fff; }
.say-it h3, .say-it p { margin: 0; }
.say-it p { margin-top: 6px; color: var(--muted); }
.secondary { border: 2px solid var(--green); color: var(--green-dark); background: transparent; }
footer { display: flex; justify-content: space-between; gap: 32px; padding-block: 28px 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
footer p { margin: 0; }
.noscript-note { margin-top: 32px; padding: 28px; }

@media (max-width: 760px) {
  .intro { grid-template-columns: 1fr; gap: 24px; }
  .panel-heading { align-items: start; flex-direction: column; }
  .map { margin-inline: 8px; overflow: visible; background: transparent; }
  .map svg { border-radius: 16px; background: #e6efe4; }
  .map-note { position: static; width: 100%; margin-top: 8px; border: 1px solid var(--line); box-shadow: none; }
  .choice-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
}

@media (max-width: 480px) {
  :root { font-size: 16px; }
  .topbar { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 14px; }
  main { padding-top: 34px; }
  .legend { flex-direction: column; gap: 5px; }
  .panel-heading, .map-actions { padding-inline: 18px; }
  .map-actions .primary { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .primary:active { transform: none; }
}

/* The map and its next action are the first screen. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
main { width: min(100% - 32px, 840px); padding-block: 24px 48px; }
.topbar, footer { width: min(100% - 32px, 840px); }
.topbar { min-height: 48px; }
.topbar p { display: none; }
.intro { display: block; margin-bottom: 16px; }
h1 { font-size: clamp(2.4rem, 8vw, 4.5rem); }
.map { margin: 0; border-radius: 0; }
.map-note { position: static; width: auto; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.map-actions { padding: 8px 18px 18px; }
.feedback { border: 1px solid var(--green); border-radius: 12px; }
.challenge, .summary { margin-top: 0; scroll-margin-top: 16px; }
@media (max-width: 480px) {
  main { padding-top: 16px; }
  .topbar { padding-block: 8px; }
}
@media (max-width: 480px) {
  .map-name { font-size: 26px; letter-spacing: 0; }
  .bin-label { font-size: 20px; letter-spacing: 0; }
}

.route-choice small {
  color: inherit;
  font-variant-numeric: tabular-nums;
}
.delivery {
  width: fit-content;
  border: 1px solid currentColor;
  border-radius: 12px;
  padding: 8px 12px;
  color: #155347;
  background: #e0f3db;
  font-weight: 700;
}
.delivery span { margin-right: 8px; }
