@font-face {
    font-family: "Inter Variable";
    src: url("/assets/fonts/InterVariable.woff2") format("woff2-variations");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    color-scheme: light;
    --ink: #0f172a;
    --muted: #64748b;
    --forest: #047857;
    --forest-dark: #065f46;
    --moss: #d1fae5;
    --cream: #f8fafc;
    --paper: #ffffff;
    --line: #e2e8f0;
    --line-dark: #cbd5e1;
    --amber: #b45309;
    --danger: #b91c1c;
    --shadow: 0 1px 2px rgb(15 23 42 / 4%), 0 8px 24px rgb(15 23 42 / 5%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font: 15px/1.55 "Inter Variable", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible, .boundary-option:focus-within {
    outline: 3px solid rgb(5 150 105 / 28%);
    outline-offset: 2px;
}
a { color: inherit; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 66px;
    border-bottom: 1px solid var(--line);
    background: rgb(255 255 255 / 94%);
    backdrop-filter: blur(12px);
}
.header-inner {
    width: min(1280px, calc(100% - 40px));
    height: 100%;
    margin: auto;
    display: flex;
    align-items: center;
}
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { display: block; width: 166px; height: auto; }
.top-nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.top-nav a { color: #475569; font-size: 13px; font-weight: 650; text-decoration: none; }
.top-nav a:hover { color: var(--ink); }
.top-nav .nav-cta { padding: 9px 15px; border-radius: 7px; color: white; background: var(--forest-dark); }
.top-nav .nav-cta:hover { color: white; background: #064e3b; }

main { width: min(1280px, calc(100% - 40px)); margin: auto; padding-bottom: 72px; }
.eyebrow, .step {
    margin: 0 0 8px;
    color: var(--forest);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
h1, h2, h3 { color: var(--ink); }
h1 { margin: 0; max-width: 850px; font-size: clamp(36px, 5vw, 60px); line-height: 1.06; letter-spacing: -.045em; }
h2 { margin: 0; font-size: 23px; line-height: 1.2; letter-spacing: -.025em; }
.lede { max-width: 790px; margin: 18px 0 0; color: #475569; font-size: clamp(17px, 2vw, 20px); line-height: 1.6; }
.workspace { display: grid; grid-template-columns: minmax(320px, 5fr) minmax(0, 7fr); gap: 30px; align-items: start; }
.search-panel, .map-panel, .results {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
    box-shadow: var(--shadow);
}
.search-panel { padding: 25px; }
.panel-heading, .map-title, .results-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.free-chip {
    padding: 5px 9px;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    color: #065f46;
    background: #ecfdf5;
    font-size: 11px;
    font-weight: 800;
}
.panel-intro { margin: 8px 0 20px; color: var(--muted); font-size: 13px; }
.boundary-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.boundary-option {
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line-dark);
    border-radius: 8px;
    color: #334155;
    background: #f8fafc;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}
button.boundary-option { width: 100%; }
.boundary-option:hover { border-color: #94a3b8; background: #f1f5f9; }
.boundary-option.is-primary { border: 2px solid var(--forest); color: #065f46; background: #ecfdf5; }
.boundary-option svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
#boundary-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-note, .search-note { margin: 8px 0 20px; color: #94a3b8; font-size: 11px; }
.field-label, label { display: block; color: #334155; font-size: 12px; font-weight: 750; }
.field-label span, label span { color: #94a3b8; font-weight: 500; }
input, select {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--line-dark);
    border-radius: 7px;
    color: var(--ink);
    background: #fff;
}
input::placeholder { color: #94a3b8; }
.field-label + input { margin-top: 6px; }
.parameters { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.parameters-title { margin-bottom: 9px; color: #334155; font-size: 12px; font-weight: 800; }
.parameters dl { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.parameters dl div { display: flex; justify-content: space-between; gap: 18px; padding: 10px 11px; border-bottom: 1px solid var(--line); font-size: 12px; }
.parameters dl div:last-child { border-bottom: 0; }
.parameters dt { color: var(--muted); }
.parameters dd { margin: 0; color: var(--ink); font-weight: 750; text-align: right; }
.primary-button {
    width: 100%;
    min-height: 47px;
    margin-top: 20px;
    padding: 11px 15px;
    border: 0;
    border-radius: 8px;
    color: white;
    background: var(--forest-dark);
    box-shadow: 0 1px 2px rgb(15 23 42 / 10%);
    font-weight: 800;
    cursor: pointer;
}
.primary-button:hover { background: #064e3b; }
.primary-button:disabled { cursor: not-allowed; color: #e2e8f0; background: #94a3b8; box-shadow: none; }
.search-note { margin: 9px 8px 0; text-align: center; }
.status-message { margin-top: 14px; min-height: 44px; padding: 10px 11px; border-radius: 7px; color: #475569; background: #f1f5f9; font-size: 12px; }
.status-message.error { color: #991b1b; background: #fef2f2; }

.map-panel { padding: 16px; }
.map-title { min-height: 54px; align-items: center; padding: 0 2px 14px; }
.map-title h2 { font-size: 18px; }
.map-kicker { display: block; margin-bottom: 2px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.text-button { padding: 7px 9px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.text-button:hover { background: #f1f5f9; }
.text-button.danger { color: var(--danger); }
#map { height: 520px; overflow: hidden; border: 1px solid var(--line-dark); border-radius: 8px; background: #e2e8f0; }
.basemap-switcher {
    display: flex;
    gap: 3px;
    padding: 4px;
    border: 1px solid rgb(148 163 184 / 75%);
    border-radius: 10px;
    background: rgb(255 255 255 / 94%);
    box-shadow: 0 3px 14px rgb(15 23 42 / 18%);
    backdrop-filter: blur(8px);
}
.basemap-switcher__button {
    min-width: 74px;
    height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 7px;
    color: #475569;
    background: transparent;
    font: 750 11px/1 Inter, Arial, sans-serif;
    cursor: pointer;
    transition: color .15s ease, background .15s ease, box-shadow .15s ease;
}
.basemap-switcher__button:hover { color: var(--forest-dark); background: #ecfdf5; }
.basemap-switcher__button.is-active {
    color: #fff;
    background: var(--forest-dark);
    box-shadow: 0 1px 3px rgb(15 50 35 / 28%);
}
.basemap-switcher__button:focus-visible { outline: 3px solid rgb(16 185 129 / 32%); outline-offset: 1px; }
.map-help { display: flex; justify-content: space-between; gap: 20px; padding: 10px 2px 0; color: var(--muted); font-size: 10px; }
.coverage-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.coverage-strip div { min-width: 0; padding: 7px; border: 1px solid var(--line); border-radius: 7px; background: white; text-align: center; }
.coverage-strip strong, .coverage-strip span { display: block; }
.coverage-strip strong { font-size: 11px; }
.coverage-strip span { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.results { margin-top: 30px; padding: clamp(22px, 4vw, 36px); }
.results-heading > div > p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.summary-row { display: grid; grid-template-columns: repeat(5, minmax(110px, 1fr)); gap: 10px; margin: 24px 0 16px; }
.summary-row div { padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.summary-row span { display: block; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.summary-row strong { display: block; margin-top: 3px; font-size: 17px; }
.notice { margin: 14px 0; padding: 12px 14px; border-radius: 8px; font-size: 12px; }
.warning { color: #854d0e; border: 1px solid #fde68a; background: #fffbeb; }
.warning:empty { display: none; }
.disclaimer { color: #334155; border: 1px solid #cbd5e1; background: #f8fafc; }
.filters { display: grid; grid-template-columns: 1fr 140px 210px; gap: 12px; align-items: end; margin: 20px 0 12px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: #475569; background: #f8fafc; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .055em; }
td { color: #334155; font-size: 12px; }
tbody tr:hover { background: #fafafa; }
tbody tr:last-child td { border-bottom: 0; }
.missing-periods { color: var(--muted); font-size: 12px; }

.area-limit-dialog { width: min(520px, calc(100% - 32px)); max-width: none; padding: 0; border: 0; border-radius: 14px; color: var(--ink); background: white; box-shadow: 0 24px 80px rgb(15 23 42 / 30%); }
.area-limit-dialog::backdrop { background: rgb(8 31 25 / 58%); backdrop-filter: blur(3px); }
.area-limit-modal { position: relative; padding: clamp(24px, 6vw, 38px); }
.area-limit-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; color: #475569; background: white; font-size: 23px; line-height: 1; cursor: pointer; }
.area-limit-close:hover { color: var(--ink); background: #f1f5f9; }
.area-limit-kicker { display: inline-block; margin-bottom: 10px; color: #b45309; font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .09em; }
.area-limit-modal h2 { max-width: 390px; padding-right: 32px; font-size: clamp(24px, 5vw, 32px); line-height: 1.12; }
.area-limit-modal > p { color: #475569; line-height: 1.65; }
.area-limit-rationale { margin: 20px 0 14px; padding: 16px; border: 1px solid #fde68a; border-radius: 9px; color: #78350f; background: #fffbeb; }
.area-limit-rationale strong { display: block; margin-bottom: 5px; font-size: 13px; }
.area-limit-rationale p { margin: 0; font-size: 12px; line-height: 1.55; }
.area-limit-range { font-size: 12px; font-weight: 750; }
.area-limit-modal .primary-button { width: 100%; margin-top: 10px; }

.method-note { display: flex; gap: 16px; align-items: flex-start; margin-top: 28px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.method-icon { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #065f46; background: #d1fae5; font-weight: 900; }
.method-note h2 { font-size: 16px; }
.method-note p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }

.site-footer { border-top: 1px solid var(--line); background: white; }
.footer-inner { width: min(1280px, calc(100% - 40px)); margin: auto; padding: 38px 0 30px; display: grid; grid-template-columns: minmax(260px, 2fr) 1fr 1.4fr; gap: 70px; }
.footer-brand img { width: 176px; height: auto; }
.footer-brand p { max-width: 380px; margin: 13px 0 0; color: var(--muted); font-size: 12px; }
.footer-column { display: grid; align-content: start; gap: 8px; color: var(--muted); font-size: 12px; }
.footer-column strong { margin-bottom: 2px; color: var(--ink); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.footer-column a { text-decoration: none; }
.footer-column a:hover { color: var(--forest); }
.footer-bottom { width: min(1280px, calc(100% - 40px)); margin: auto; padding: 17px 0 22px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: #94a3b8; font-size: 10px; }

@media (max-width: 980px) {
    .top-nav { gap: 14px; }
    .top-nav a:not(.nav-cta):not(.nav-account) { display: none; }
    .workspace { grid-template-columns: 1fr; }
    .search-panel { order: 1; }
    .map-panel { order: 2; }
    .summary-row { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { gap: 35px; }
}
@media (max-width: 700px) {
    .site-header { height: 60px; }
    .header-inner, main, .footer-inner, .footer-bottom { width: min(100% - 24px, 1280px); }
    .brand img { width: 146px; }
    .top-nav .nav-account { display: none; }
    .top-nav .nav-cta { padding: 8px 11px; }
    h1 { font-size: 36px; }
    .workspace { gap: 18px; }
    .search-panel, .map-panel { border-radius: 10px; }
    .search-panel { padding: 19px; }
    .boundary-modes, .coverage-strip { grid-template-columns: 1fr 1fr; }
    #map { height: 430px; }
    .map-help { display: block; }
    .map-help span:last-child { display: none; }
    .filters { grid-template-columns: 1fr; }
    .summary-row { grid-template-columns: 1fr 1fr; }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-bottom { display: grid; }
}
