:root { --navy: #0A1628; --navy2: #152D55; --teal: #00B4D8; --blue: #0077b6; --ink: #334155; --mute: #64748b; --line: #d1d5db; --bg: #f8fafc; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; overflow-x: clip; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.5; }
.wrap { max-width: 1152px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 1000; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.top-links { display: flex; gap: 4px; }
.top-links a { color: rgba(255,255,255,.75); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: .92rem; }
.top-links a:hover, .top-links a:focus-visible { color: #fff; background: rgba(255,255,255,.1); }

main { padding-top: 28px; padding-bottom: 56px; }
h1 { color: var(--navy); font-size: clamp(1.5rem, 4vw, 1.9rem); margin: 0; }
h2 { color: var(--navy); font-size: 1.1rem; margin: 0 0 8px; }
.lead { max-width: 42rem; margin: 8px 0 22px; color: #4b5563; }

.controls { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.controls select, .controls input { font: inherit; color: var(--navy); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; min-width: 0; }
.controls select { flex: 1 1 260px; max-width: 100%; }
#find { display: flex; flex: 2 1 280px; gap: 8px; min-width: 0; }
#find input { flex: 1 1 auto; }
button { font: inherit; font-weight: 600; border-radius: 12px; padding: 10px 16px; cursor: pointer; }
button.dark { background: var(--navy); color: #fff; border: 1px solid var(--navy); }
button.dark:hover { background: var(--navy2); }
button.light { background: #fff; color: var(--navy); border: 1px solid var(--line); flex: 0 0 auto; }
button.light:hover { background: #f1f5f9; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

#status { min-height: 1.5rem; margin: 0 0 8px; font-size: .9rem; color: #4b5563; }
.map-box { position: relative; z-index: 0; }
#map { height: 62vh; min-height: 380px; width: 100%; border: 1px solid #e5e7eb; border-radius: 16px; background: #e2e8f0; z-index: 0; }
#card { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 500; background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 14px 16px; box-shadow: 0 10px 25px rgba(10,22,40,.18); }
@media (min-width: 640px) { #card { right: auto; width: 320px; } }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
#c-route { margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--navy); overflow-wrap: anywhere; }
#c-close { background: none; border: 0; padding: 2px 4px; color: var(--mute); font-weight: 500; font-size: .9rem; }
#card dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 16px; margin: 8px 0 0; font-size: .9rem; }
#card dt { color: var(--mute); }
#card dd { margin: 0; overflow-wrap: anywhere; }
.small { font-size: .78rem; color: var(--mute); margin: 8px 0 0; }

.two { display: grid; gap: 24px; margin-top: 40px; }
@media (min-width: 640px) { .two { grid-template-columns: 1fr 1fr; } }
.two ul { margin: 0; padding-left: 20px; }
.two p { margin: 0; }
.credits { margin-top: 40px; padding-top: 24px; border-top: 1px solid #e5e7eb; font-size: .88rem; color: #4b5563; scroll-margin-top: 80px; }
#how, #map-top { scroll-margin-top: 80px; }
.credits p { margin: 6px 0; }
#credit-list { margin: 12px 0; }
#credit-list dt { font-weight: 600; color: var(--navy); margin-top: 8px; }
#credit-list dd { margin: 0; }

.foot { background: var(--navy); color: rgba(255,255,255,.8); padding: 22px 0; font-size: .88rem; }
.foot p { margin: 2px 0; }
.foot strong { color: #fff; }
.leaflet-container { font: inherit; }
