.compare-origin-card{border:1px solid rgba(255,255,255,.92);cursor:pointer;text-align:left;color:inherit}.origin-change-label{margin-left:10px;padding:5px 8px;border-radius:999px;background:#e9f2ff;color:#2677ff;font-size:10px;font-weight:900}.origin-dialog[hidden]{display:none}.origin-dialog{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:20px}.origin-dialog-backdrop{position:absolute;inset:0;background:rgba(16,29,52,.38);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}.origin-dialog-panel{position:relative;width:min(680px,100%);max-height:min(82vh,760px);overflow:hidden;display:flex;flex-direction:column;background:#fff;border-radius:26px;box-shadow:0 28px 80px rgba(20,33,61,.25);padding:18px}.origin-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.origin-dialog-head h2{margin:0;font-size:24px}.origin-dialog-close{width:38px;height:38px;border:0;border-radius:50%;background:#f0f4f9;font-size:24px;line-height:1;cursor:pointer}.origin-filter-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:14px 0 0;padding:4px;background:#f1f5fa;border-radius:14px}.origin-filter-tab{border:0;border-radius:10px;background:transparent;color:#607089;padding:8px 10px;font:inherit;font-size:12px;font-weight:900;cursor:pointer}.origin-filter-tab.active,.origin-filter-tab[aria-pressed="true"]{background:#fff;color:#15213a;box-shadow:0 2px 8px rgba(33,52,82,.1)}.origin-search{width:100%;margin:10px 0;border:1px solid #dbe7f5;background:#f8fbff;border-radius:16px;padding:13px 14px;font:inherit;font-size:16px;outline:none}.origin-search:focus{border-color:#2677ff;box-shadow:0 0 0 3px rgba(38,119,255,.12)}.origin-db-status{margin:4px 2px 10px;color:#62708a;font-size:11px}.origin-results{overflow-y:auto;overscroll-behavior:contain;display:grid;gap:7px;padding:2px 2px 10px}.origin-result{width:100%;border:1px solid #e1e9f3;background:#fff;border-radius:15px;padding:10px 12px;text-align:left;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;cursor:pointer}.origin-result:hover,.origin-result:focus-visible{border-color:#2677ff;outline:none;background:#f7fbff}.origin-result--pilot{border-color:#cbdcff;background:#f8fbff}.origin-result--disabled{opacity:.58;cursor:not-allowed;background:#f5f7fa}.origin-result strong{display:block;font-size:14px;overflow-wrap:anywhere}.origin-result small{display:block;margin-top:3px;color:#6f7c91;font-size:10px;overflow-wrap:anywhere}.origin-result-badges{display:flex;align-items:center;justify-content:flex-end;gap:5px;flex-wrap:wrap}.origin-result-badges em{font-style:normal;font-size:9px;font-weight:900;padding:5px 7px;border-radius:999px;background:#e8f7ef;color:#18794e;white-space:nowrap}.origin-result-type,.origin-result-pending{font-size:10px;font-weight:900;padding:5px 8px;border-radius:999px;white-space:nowrap}.origin-result-type{background:#eef2f6;color:#546274}.origin-result-type.is-rail{background:#eaf2ff;color:#2465c7}.origin-result-type.is-bus{background:#f0edff;color:#6751d8}.origin-result-pending{background:#f2f3f5;color:#7a8492}.origin-empty{padding:22px;text-align:center;color:#62708a;font-size:13px}

.compare-ranking{margin:0 0 20px;padding:18px;border:1px solid #dce8f7;border-radius:22px;background:linear-gradient(145deg,#f8fbff,#fff);box-shadow:0 10px 30px rgba(49,78,120,.08)}.compare-ranking:empty{display:none}.compare-ranking-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}.compare-ranking-head h3{margin:2px 0 0;font-size:20px}.ranking-change-origin{border:1px solid #cadcf5;background:#fff;color:#2677ff;border-radius:999px;padding:7px 10px;font-weight:900;font-size:10px;cursor:pointer}.compare-ranking-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}.compare-ranking-row{min-width:0;border:1px solid #e3ebf5;background:#fff;border-radius:14px;padding:10px 8px;display:grid;grid-template-columns:24px minmax(0,1fr);grid-template-rows:auto auto;gap:2px 7px;text-align:left;cursor:pointer}.compare-ranking-row>span{grid-row:1/3;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#eef4ff;color:#2677ff;font-weight:900;font-size:11px}.compare-ranking-row strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.compare-ranking-row b{font-size:16px;color:#15213a}.compare-ranking-row:hover,.compare-ranking-row.active{border-color:#2677ff;background:#f7fbff}.commute-unavailable{opacity:.55}.school-marker.commute-unavailable .school-marker-time{color:#8491a4}.school-marker.muted-candidate{opacity:.68}.compare-origin-map-marker .origin-map-dot{box-shadow:0 0 0 5px rgba(38,119,255,.16),0 2px 9px rgba(38,119,255,.28)}.compare-origin-map-marker.is-bus .origin-map-dot{background:#7b61ff;box-shadow:0 0 0 5px rgba(123,97,255,.18),0 2px 9px rgba(123,97,255,.3)}

.legend-line.compare-rail{background:#2677ff}.legend-line.compare-bus{background:#7b61ff}.legend-line.compare-walk{background:#ff6f61;border-top:2px dashed #ff6f61;height:0}.time-bubble{display:grid;place-items:center;min-width:42px;height:34px;padding:0 9px;border-radius:999px;background:#15213a;color:#fff;border:2px solid #fff;font-size:12px;font-weight:900;box-shadow:0 6px 16px rgba(20,33,61,.25)}

@media(max-width:980px){.compare-ranking-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.origin-dialog{padding:0;place-items:end center}.origin-dialog-panel{width:100%;max-height:88dvh;border-radius:26px 26px 0 0;padding:16px 14px calc(16px + env(safe-area-inset-bottom))}.origin-dialog-head h2{font-size:21px}.origin-filter-tabs{margin-top:11px}.origin-filter-tab{padding:8px 6px;font-size:11px}.origin-search{font-size:16px}.origin-db-status{line-height:1.45}.origin-result{padding:10px;gap:8px}.origin-result-badges{max-width:128px}.origin-result-type,.origin-result-pending{font-size:9px;padding:4px 6px}.compare-origin-card{display:none}.compare-ranking{margin:-2px -2px 16px;padding:14px;border-radius:18px}.compare-ranking-head h3{font-size:17px}.compare-ranking-grid{grid-template-columns:1fr}.compare-ranking-row{grid-template-columns:28px minmax(0,1fr) auto;grid-template-rows:auto;padding:9px 10px;align-items:center}.compare-ranking-row>span{grid-row:auto;width:26px;height:26px}.compare-ranking-row strong{font-size:13px}.compare-ranking-row b{font-size:18px}.ranking-change-origin{font-size:9px}.school-marker.muted-candidate{opacity:.55}}

/* First District 58-school expansion */
.kind-dot.kind-private{background:#ff9f6e}.school-marker.kind-private .school-badge{background:#ff9f6e;color:#5c2c10}.school-marker.kind-private .school-label{border-color:rgba(255,159,110,.28)}


/* School ownership filter + marker color key */
.school-filter-bar{max-width:1440px;margin:0 auto 12px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.school-filter-group{display:flex;align-items:center;gap:6px;padding:4px;background:rgba(255,255,255,.86);border:1px solid #dbe7f5;border-radius:999px;box-shadow:0 6px 18px rgba(37,72,120,.06)}.school-filter-title{padding:0 7px 0 9px;color:#62708a;font-size:10px;font-weight:900;letter-spacing:.08em}.school-filter-button{border:0;border-radius:999px;background:transparent;color:#52627a;padding:7px 12px;font:inherit;font-size:11px;font-weight:900;cursor:pointer}.school-filter-button:hover{background:#f1f6fd}.school-filter-button.active,.school-filter-button[aria-pressed="true"]{background:#2677ff;color:#fff;box-shadow:0 4px 12px rgba(38,119,255,.2)}.school-color-key{display:flex;align-items:center;justify-content:flex-end;gap:10px 12px;flex-wrap:wrap;color:#607089;font-size:10px;font-weight:800}.school-color-key span{display:flex;align-items:center;gap:5px;white-space:nowrap}.school-color-dot{width:10px;height:10px;border-radius:4px;display:inline-block;border:1px solid rgba(20,33,61,.08)}.school-color-dot.is-general{background:#ffd45d}.school-color-dot.is-mixed{background:#78dfc7}.school-color-dot.is-specialized{background:#7b61ff}.school-color-dot.is-comprehensive{background:#27c2ff}.school-color-dot.is-private{background:#ff9f6e}.school-color-dot.is-selected{background:#ff6f61}
@media(max-width:760px){.school-filter-bar{align-items:flex-start;gap:8px;margin-bottom:9px}.school-filter-group{width:max-content;max-width:100%;overflow-x:auto}.school-filter-button{padding:7px 10px}.school-color-key{width:100%;justify-content:flex-start;gap:7px 10px;overflow-x:auto;flex-wrap:nowrap;padding:0 2px 2px}.school-color-key span{font-size:9px}}


/* Issue report / Netlify Forms */
.issue-report-trigger{border-color:rgba(220,38,38,.28);color:#991b1b;background:rgba(255,255,255,.82)}
.issue-report-dialog{position:fixed;inset:0;z-index:1200}
.issue-report-dialog[hidden]{display:none}
.issue-report-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.46);backdrop-filter:blur(4px)}
.issue-report-panel{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(520px,calc(100vw - 28px));max-height:min(720px,calc(100dvh - 28px));overflow:auto;background:#fff;border:1px solid rgba(15,23,42,.12);border-radius:24px;padding:22px;box-shadow:0 28px 80px rgba(15,23,42,.24)}
.issue-report-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.issue-report-head h2{margin:3px 0 0;font-size:22px;line-height:1.25;color:#0f172a}
.issue-report-close{border:0;background:#f1f5f9;color:#334155;width:38px;height:38px;border-radius:999px;font-size:24px;line-height:1;cursor:pointer}
.issue-report-lead{margin:14px 0 10px;color:#475569;font-size:14px;line-height:1.65}
.issue-report-context{margin:0 0 16px;padding:12px 14px;border-radius:14px;background:#eff6ff;color:#1e3a8a;font-size:13px;font-weight:700;line-height:1.5}
.issue-report-field{display:grid;gap:7px;margin:14px 0;color:#0f172a;font-size:13px;font-weight:700}
.issue-report-field small{font-weight:500;color:#94a3b8}
.issue-report-field select,.issue-report-field textarea{width:100%;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:12px;background:#fff;color:#0f172a;font:inherit;font-weight:500;padding:11px 12px;outline:none}
.issue-report-field textarea{resize:vertical;min-height:96px;line-height:1.55}
.issue-report-field select:focus,.issue-report-field textarea:focus{border-color:#60a5fa;box-shadow:0 0 0 3px rgba(96,165,250,.16)}
.issue-report-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}
.issue-report-status{min-height:20px;margin:10px 0 0;color:#475569;font-size:13px}
.issue-report-status.is-success{color:#047857;font-weight:700}
.issue-report-status.is-error{color:#b91c1c;font-weight:700}
.netlify-honeypot{position:absolute!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;height:1px!important;width:1px!important;margin:-1px!important;padding:0!important;border:0!important}
@media (max-width:720px){
  .issue-report-trigger{padding-inline:10px}
  .issue-report-panel{top:auto;bottom:0;left:0;transform:none;width:100%;max-height:86dvh;border-radius:24px 24px 0 0;padding:20px 18px calc(20px + env(safe-area-inset-bottom))}
}


/* Statewide district controls */
@media(max-width:980px){
  .top-actions{justify-content:flex-start;max-width:100%;overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px;scrollbar-width:thin}
  .top-actions .chip-button{flex:0 0 auto}
}

/* Clear rail/bus/walk itinerary. Only compact paths opt in; legacy pills remain unchanged. */
.route-summary.is-timeline{max-height:calc(100% - 145px);display:flex;flex-direction:column}
.route-summary.is-timeline .summary-head{flex:0 0 auto}
.route-steps.route-timeline{display:flex;flex-direction:column;flex-wrap:nowrap;gap:0;min-height:0;max-height:min(47vh,410px);margin:12px 0 8px;padding:5px 3px 2px 0;border-top:1px solid #dce7f4;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.route-timeline .journey-leg{position:relative;flex:none;display:grid;grid-template-columns:28px minmax(0,1fr);column-gap:11px;align-items:start;min-width:0;padding:8px 4px 8px 0}
.route-timeline .journey-leg:not(:last-child)::before{content:'';position:absolute;left:13px;top:37px;bottom:-9px;width:2px;background:#dbe4f1}
.route-timeline .journey-symbol{position:relative;z-index:1;display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:#e7efff;color:#236ce3;font-size:12px;font-weight:900}
.route-timeline .journey-leg.bus .journey-symbol{background:#eeeaff;color:#6953de}
.route-timeline .journey-leg.walk .journey-symbol{background:#fff1eb;color:#c45f39}
.route-timeline .journey-leg.transfer .journey-symbol{background:#eef2f7;color:#64748b}
.route-timeline .journey-body{min-width:0;padding:3px 0 2px}
.route-timeline .journey-headline{display:flex;gap:10px;justify-content:space-between;align-items:baseline;min-width:0}
.route-timeline .journey-name{min-width:0;color:#15213a;font-size:13px;font-weight:900;line-height:1.45;overflow-wrap:anywhere}
.route-timeline .journey-duration{flex:none;color:#293d5a;font-size:12px;font-weight:900;font-variant-numeric:tabular-nums;white-space:nowrap}
.route-timeline .journey-detail{display:block;margin-top:4px;color:#66758d;font-size:11px;font-weight:600;line-height:1.35}
.route-summary.is-timeline .demo-note{flex:0 0 auto}
@media(max-width:760px){
  .mobile-sheet .route-summary.is-timeline{max-height:none;display:block}
  .mobile-sheet .route-steps.route-timeline{max-height:none;overflow:visible;gap:0;margin:10px 0 7px}
  .mobile-sheet[data-state="medium"] .mobile-sheet-content{overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y}
  .mobile-sheet[data-state="full"] .route-summary.is-timeline{position:static;background:transparent}
  .route-timeline .journey-name{font-size:13px}
  .route-timeline .journey-leg{padding:7px 4px 7px 0}
}

/* Smartphone: persistent ownership filters + explicit route / compare tabs. */
@media(max-width:760px){
  .school-filter-bar{display:none!important}
  .topbar{gap:5px}
  .topbar>div:first-child{max-width:calc(100vw - 20px);padding:7px 10px}
  .topbar h1{font-size:clamp(13px,3.6vw,16px);white-space:normal;line-height:1.2}
  .topbar .count-badge{font-size:9px;white-space:nowrap}
  .topbar .title-row{flex-wrap:nowrap}
  .top-actions .chip-button{flex:0 0 auto;padding:7px 10px}
  .mobile-sheet .mobile-quick-controls{display:grid;gap:7px;margin:8px 0 3px}
  .mobile-view-tabs,.mobile-ownership-filter{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
  .mobile-ownership-filter{grid-template-columns:repeat(3,minmax(0,1fr))}
  .mobile-view-tab,.mobile-ownership-button{border:1px solid #dce6f3;border-radius:11px;background:#f4f7fc;color:#4d5f77;min-height:36px;padding:6px;font:inherit;font-size:12px;font-weight:800;cursor:pointer}
  .mobile-ownership-button{min-height:32px;font-size:11px}
  .mobile-view-tab.active,.mobile-ownership-button.active{color:#fff;border-color:#2677ff;background:#2677ff}
  .mobile-sheet-content{height:calc(100% - 171px);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y}
  .mobile-sheet[data-state="peek"] .mobile-quick-controls{display:none}
  .mobile-sheet[data-state="peek"] .mobile-sheet-content{height:calc(100% - 92px);overflow:hidden}
  .mobile-sheet[data-state="medium"] .mobile-sheet-content{overflow-y:auto}
  .mobile-sheet[data-view="compare"] .route-summary{display:none}
  .mobile-sheet[data-view="compare"] .school-strip{display:block!important;margin:0;padding-top:3px}
  .mobile-sheet[data-view="route"] .school-strip{display:none!important}
  .mobile-sheet[data-state="full"] .route-summary.is-timeline{position:static}
  .mobile-sheet[data-state="full"] .mobile-sheet-content{overflow-y:auto}
  .mobile-sheet .compare-ranking{margin:0 0 12px;padding:12px}
  .mobile-sheet .compare-ranking-grid{grid-template-columns:1fr}
  .mobile-sheet .school-list{grid-template-columns:1fr}
  .mobile-sheet .school-card{padding:10px 12px}
}

/* Smartphone: no duplicate controls behind the fixed header.
   All school search settings live in the expandable bottom sheet. */
@media(max-width:760px){
  .topbar{gap:6px}
  .topbar .top-actions{max-width:calc(100vw - 20px);overflow:visible}
  .topbar .top-actions .region-button{display:none!important}
  .topbar .top-actions .chip-button{white-space:nowrap}
  .school-filter-bar{display:none!important}
  .mobile-region-control{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;align-items:center}
  .mobile-region-control label{font-size:11px;font-weight:800;color:#536780}
  .mobile-region-control select{width:100%;min-width:0;min-height:35px;padding:6px 30px 6px 10px;border-radius:11px;background:#fff;color:#14213d;border:1px solid #d3e0f2;font:inherit;font-size:12px;font-weight:800}
  .mobile-sheet .mobile-quick-controls{gap:6px}
  .mobile-sheet .mobile-sheet-content{height:calc(100% - 215px)}
  .mobile-sheet[data-state="peek"] .mobile-sheet-content{height:calc(100% - 92px)}
}

/* Final mobile region selector: swipeable choices below route/compare tabs. */
@media(max-width:760px){
  .school-filter-bar{display:none!important}
  .topbar .top-actions .region-button{display:none!important}
  .mobile-quick-controls .mobile-region-control{display:block;min-width:0}
  .mobile-region-label{display:block;padding:2px 1px 6px;color:#536780;font-size:11px;font-weight:800}
  .mobile-region-scroll{display:flex;align-items:center;gap:7px;min-width:0;width:100%;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding:1px 2px 5px;touch-action:pan-x}
  .mobile-region-scroll::-webkit-scrollbar{display:none}
  .mobile-region-chip{flex:0 0 auto;scroll-snap-align:start;border:1px solid #d3e0f2;background:#fff;color:#425570;border-radius:999px;padding:9px 13px;font:inherit;font-size:12px;font-weight:800;white-space:nowrap;min-height:36px}
  .mobile-region-chip.active{background:#2677ff;border-color:#2677ff;color:#fff}
  .mobile-region-chip:focus-visible{outline:2px solid #2677ff;outline-offset:2px}
  .mobile-sheet .mobile-quick-controls{gap:7px}
  .mobile-sheet .mobile-sheet-content{height:calc(100% - 213px)}
  .mobile-sheet[data-state="peek"] .mobile-sheet-content{height:calc(100% - 92px)}
}
