:root {
    --ink: #1c2834;
    --muted: #667584;
    --line: #dde5e8;
    --paper: #f6f8f7;
    --card: #ffffff;
    --green: #087f5b;
    --green-dark: #075c43;
    --mint: #dff4eb;
    --orange: #e07734;
    --shadow: 0 18px 50px rgba(31, 53, 64, .09);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.5; }
button, input { font: inherit; }
button { cursor: pointer; }
.container { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.site-header { background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1000; backdrop-filter: blur(12px); }
.header-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 12px; color: white; background: var(--green); font-size: 25px; font-weight: 800; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 1.03rem; letter-spacing: -.02em; }
.brand div span { color: var(--muted); font-size: .74rem; }
.admin-link { color: var(--green-dark); text-decoration: none; font-weight: 700; font-size: .9rem; }
.main-content { padding: 52px 0 80px; }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 32px; }
.hero h1 { max-width: 700px; margin: 6px 0 13px; font-size: clamp(2.2rem, 5vw, 4.2rem); line-height: 1.01; letter-spacing: -.065em; }
.lead { max-width: 640px; color: var(--muted); font-size: 1.1rem; margin: 0; }
.eyebrow { color: var(--green); text-transform: uppercase; letter-spacing: .13em; font-size: .71rem; font-weight: 800; margin: 0; }
.privacy-note { max-width: 270px; padding: 15px 17px; border-left: 3px solid var(--green); background: var(--mint); border-radius: 0 12px 12px 0; font-size: .85rem; color: var(--green-dark); }
.privacy-note strong, .privacy-note span { display: block; }
.privacy-note strong { margin-bottom: 4px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 19px; box-shadow: var(--shadow); }
.map-card { padding: 25px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
h2 { font-size: 1.45rem; line-height: 1.1; letter-spacing: -.035em; margin: 5px 0 0; }
.button { border: 0; border-radius: 10px; padding: 11px 17px; font-weight: 750; transition: transform .15s, background .15s, box-shadow .15s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: .46; cursor: not-allowed; }
.button-primary { background: var(--green); color: white; box-shadow: 0 8px 18px rgba(8,127,91,.18); }
.button-primary:hover:not(:disabled) { background: var(--green-dark); }
.button-secondary { color: var(--green-dark); background: var(--mint); }
.button-ghost { color: var(--green-dark); background: transparent; border: 1px solid #acd8c6; }
.map-tools { position: relative; margin-bottom: 13px; }
.search-form { display: flex; gap: 8px; }
input { width: 100%; min-width: 0; border: 1px solid #cfdadd; border-radius: 10px; background: white; color: var(--ink); padding: 11px 13px; outline: none; }
input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(8,127,91,.1); }
.search-results { position: absolute; left: 0; right: 110px; top: calc(100% + 5px); z-index: 1100; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: var(--shadow); }
.search-result { width: 100%; display: block; text-align: left; border: 0; background: white; border-bottom: 1px solid var(--line); padding: 11px 13px; color: var(--ink); font-size: .84rem; }
.search-result:last-child { border-bottom: 0; }
.search-result:hover { background: var(--mint); }
.map-instructions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .82rem; margin: 16px 0 10px; }
.instruction-number { display: grid; place-items: center; width: 23px; height: 23px; color: white; background: var(--green); border-radius: 50%; font-size: .72rem; font-weight: 800; }
.instruction-arrow { color: #a5b4b9; font-size: 1.1rem; }
.category-list { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.category-button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); padding: 9px 12px; font-weight: 700; font-size: .86rem; }
.category-button:hover, .category-button.selected { border-color: var(--green); background: var(--mint); color: var(--green-dark); }
.category-icon { font-size: 1.35rem; line-height: 1; }
.map { height: 540px; border-radius: 15px; overflow: hidden; border: 1px solid var(--line); z-index: 1; }
.map-legend { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: .76rem; padding: 10px 2px 0; }
.legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; }
.legend-dot.active { background: var(--green); }
.legend-dot.heat { background: var(--orange); }
.map-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 17px; }
.selection-summary { font-size: .89rem; }
.selection-summary.empty { color: var(--muted); }
.selection-summary.ready { color: var(--green-dark); font-weight: 700; }
.public-pin { display: grid; place-items: center; width: 34px; height: 34px; border: 3px solid white; border-radius: 50% 50% 50% 3px; transform: rotate(-45deg); background: var(--green); box-shadow: 0 5px 14px rgba(18,55,47,.3); color: white; font-size: 17px; }
.public-pin span { transform: rotate(45deg); }
.draft-pin { display: grid; place-items: center; width: 39px; height: 39px; border: 4px solid white; border-radius: 50% 50% 50% 3px; transform: rotate(-45deg); background: var(--orange); box-shadow: 0 5px 15px rgba(130,62,18,.3); color: white; font-size: 19px; }
.draft-pin span { transform: rotate(45deg); }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 22px; }
.lookup-card, .how-card { padding: 25px; }
.lookup-card p:not(.eyebrow), .privacy-full p { color: var(--muted); font-size: .9rem; }
.stack-form { display: grid; gap: 8px; margin-top: 20px; }
.stack-form label { font-size: .8rem; color: var(--muted); font-weight: 700; }
.lookup-result { margin-top: 20px; padding: 15px; border-radius: 12px; background: #f0f5f3; border: 1px solid #d8e9e1; }
.lookup-result h3 { margin: 0 0 8px; font-size: 1rem; }
.lookup-result dl { display: grid; grid-template-columns: max-content 1fr; gap: 5px 12px; margin: 0; font-size: .82rem; }
.lookup-result dt { color: var(--muted); }
.lookup-result dd { margin: 0; font-weight: 700; }
.lookup-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 15px; }
.steps-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 17px; }
.steps-list li { display: flex; align-items: center; gap: 14px; }
.steps-list li > span { color: var(--green); font-weight: 850; font-size: .76rem; }
.steps-list strong, .steps-list small { display: block; }
.steps-list small { color: var(--muted); font-size: .82rem; }
.privacy-full { margin-top: 25px; padding: 18px 20px; border: 1px solid #cfe5dc; border-radius: 14px; background: #eaf7f1; color: var(--green-dark); font-size: .88rem; }
.privacy-full p { margin: 5px 0 0; color: var(--green-dark); }
.toast { position: fixed; bottom: 25px; left: 50%; transform: translate(-50%, 120px); opacity: 0; z-index: 3000; padding: 12px 17px; border-radius: 10px; color: white; background: var(--ink); box-shadow: var(--shadow); transition: .22s; font-size: .88rem; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.error { background: #a63b35; }
.modal-backdrop { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; z-index: 2000; background: rgba(11,24,27,.58); }
.modal-backdrop[hidden] { display: none; }
.modal { position: relative; width: min(500px, 100%); border-radius: 19px; background: white; padding: 31px; box-shadow: 0 24px 80px rgba(0,0,0,.25); }
.modal p:not(.eyebrow) { color: var(--muted); font-size: .9rem; }
.modal-close { position: absolute; right: 14px; top: 12px; border: 0; background: transparent; color: var(--muted); font-size: 1.65rem; }
.created-protocol { margin: 20px 0 10px; border: 1px dashed #92c9b2; border-radius: 12px; background: var(--mint); color: var(--green-dark); text-align: center; padding: 17px 10px; font-weight: 850; font-size: 1.28rem; letter-spacing: .08em; }
.created-details { color: var(--muted); font-size: .83rem; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.notice-error { color: #a63b35; }
@media (max-width: 780px) {
    .container { width: min(100% - 24px, 1160px); }
    .main-content { padding-top: 32px; }
    .hero { display: block; }
    .privacy-note { max-width: none; margin-top: 20px; }
    .map-card, .lookup-card, .how-card { padding: 17px; }
    .section-heading { align-items: start; display: block; }
    .section-heading .button { margin-top: 14px; }
    .map { height: 470px; }
    .map-actions { align-items: stretch; display: block; }
    .map-actions .button { width: 100%; margin-top: 11px; }
    .two-columns { grid-template-columns: 1fr; }
    .search-form .button { padding-inline: 13px; }
}
@media print {
    body * { visibility: hidden; }
    .modal, .modal * { visibility: visible; }
    .modal { position: absolute; inset: 0; width: 100%; box-shadow: none; }
    .modal-actions, .modal-close { display: none; }
}
