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

.bar { display: flex; align-items: center; gap: 18px; padding: 12px 16px; background: white; border-bottom: 1px solid #cbd6d1; }
.bar .brand { font: 20px/1 Georgia, "Times New Roman", serif; letter-spacing: -.02em; color: #142e2c; text-decoration: none; }
.bar span { color: #48605e; 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 Georgia, "Times New Roman", serif; letter-spacing: -.03em; }
.intro p { margin: 0 0 10px; color: #48605e; max-width: 760px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .13em; color: #367069 !important; }
.beta { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 3px; background: #EBBF7B; color: #142e2c; 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 #d9dfdc; 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 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: #48605e; font-size: 12px; }

.summary { min-height: 44px; margin-bottom: 10px; font-size: 14px; }
.summary strong { font-size: 18px; }
#map { height: 600px; border: 1px solid #d9dfdc; background: #eef1ef; }
.legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: #48605e; }
.legend .ramp { width: 180px; height: 10px; border: 1px solid #cbd6d1; }
.legend .outline { width: 14px; height: 10px; border: 2px solid #E5AD3D; }
.result h2 { margin: 24px 0 8px; font: 20px Georgia, "Times New Roman", 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: #48605e; }
.downloads button { margin-top: 14px; padding: 8px 14px; border: 1px solid #164b45; border-radius: 3px; background: white; color: #164b45; font: 14px Arial, sans-serif; cursor: pointer; }
.downloads button:disabled { opacity: .5; cursor: default; }
footer { margin-top: 32px; padding-top: 10px; border-top: 1px solid #cbd6d1; color: #48605e; font-size: 12px; }
footer p { margin: 0 0 6px; overflow-wrap: anywhere; }
.leaflet-popup-content { font: 13px/1.45 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; }
}
