* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: #FAFAF8; color: #222326; font-family: Inter, Arial, sans-serif; line-height: 1.5; }
a { color: #0E6B6B; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid #0E6B6B; outline-offset: 3px; }
[hidden] { display: none !important; }

.bar { display: flex; align-items: center; gap: 18px; padding: 12px 16px; background: white; border-bottom: 1px solid #DCD6CB; }
.bar .brand { font: 20px/1 "Inter Tight", Inter, Arial, sans-serif; letter-spacing: -.02em; color: #222326; text-decoration: none; }
.bar span { color: #64676C; font-size: 14px; }

main { max-width: 1280px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 48px) 40px; }
.intro h1 { margin: 0 0 8px; font: 32px/1.15 "Inter Tight", Inter, Arial, sans-serif; letter-spacing: -.03em; }
.intro p { margin: 0 0 10px; color: #64676C; max-width: 760px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .13em; color: #0E6B6B !important; }
.beta { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 3px; background: #EBBF7B; color: #222326; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.beta-note { padding: 8px 12px; background: #fff7e8; border-left: 3px solid #E5AD3D; font-size: 14px; }

.workspace { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; margin-top: 20px; align-items: start; }
.options { background: white; border: 1px solid #DCD6CB; padding: 4px 16px 16px; }
.options summary { padding: 10px 0; font-weight: 700; cursor: pointer; }
form label, legend { display: block; margin: 12px 0 4px; font-size: 13px; font-weight: 700; }
fieldset { margin: 0; padding: 0; border: 0; }
select, input[type="number"] { width: 100%; padding: 7px 8px; border: 1px solid #b7c5bf; border-radius: 3px; background: white; color: inherit; font: 14px Inter, Arial, sans-serif; }
.ticks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.ticks label { display: flex; align-items: center; gap: 5px; margin: 0; font-weight: 400; font-size: 14px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint { margin: 12px 0 0; color: #64676C; font-size: 12px; }

.summary { min-height: 44px; margin-bottom: 10px; font-size: 14px; }
.summary strong { font-size: 18px; }
#map { height: 600px; border: 1px solid #DCD6CB; background: #eef1ef; }
.legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: #64676C; }
.legend .ramp { width: 180px; height: 10px; border: 1px solid #DCD6CB; }
.legend .outline { width: 14px; height: 10px; border: 2px solid #E5AD3D; }
.result h2 { margin: 24px 0 8px; font: 20px "Inter Tight", Inter, Arial, sans-serif; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; background: white; }
th, td { padding: 6px 10px; border-bottom: 1px solid #e3e8e5; text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { font-size: 12px; color: #64676C; }
.downloads button { margin-top: 14px; padding: 8px 14px; border: 1px solid #0E6B6B; border-radius: 3px; background: white; color: #0E6B6B; font: 14px Inter, Arial, sans-serif; cursor: pointer; }
.downloads button:disabled { opacity: .5; cursor: default; }
footer { margin-top: 32px; padding-top: 10px; border-top: 1px solid #DCD6CB; color: #64676C; font-size: 12px; }
footer p { margin: 0 0 6px; overflow-wrap: anywhere; }
.leaflet-popup-content { font: 13px/1.45 Inter, Arial, sans-serif; }

@media (max-width: 799px) {
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .intro h1 { font-size: 25px; }
  #map { height: 70vh; min-height: 360px; }
}
