:root {
  --paper: #f4f0e7;
  --ink: #17243a;
  --muted: #687284;
  --line: rgba(23, 36, 58, 0.16);
  --accent: #008b80;
  --accent-soft: #d8ede8;
  --white: #fffdf7;
  --warning: #b05d2c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Pretendard, "Apple SD Gothic Neo", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 4vw;
  background: rgba(244, 240, 231, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: white; font-size: 14px; }
nav { display: flex; gap: 30px; color: var(--muted); font-size: 14px; font-weight: 600; }
nav a { padding: 26px 0 23px; border-bottom: 2px solid transparent; }
nav a.active { color: var(--ink); border-color: var(--accent); }
.ghost-button { justify-self: end; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 100px; padding: 10px 16px; cursor: pointer; }
.ghost-button:hover { border-color: var(--ink); transform: translateY(-1px); }

main { overflow: hidden; }
.intro {
  min-height: 430px;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  align-items: end;
  gap: 8vw;
  padding: 78px 6vw 60px;
  border-bottom: 1px solid var(--line);
}
.eyebrow { margin: 0 0 18px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1, h2 { margin: 0; letter-spacing: -.045em; }
h1 { max-width: 760px; font-size: clamp(54px, 6.4vw, 102px); line-height: .96; font-weight: 600; }
h1 span { color: var(--accent); font-family: "Gowun Batang", serif; }
h2 { font-size: clamp(34px, 4vw, 58px); line-height: 1.08; }
.intro-copy { max-width: 520px; padding-bottom: 8px; }
.intro-copy > p { margin: 0 0 28px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.region-selectors { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
.region-selectors label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
.region-selectors select { width: 100%; padding: 10px 30px 10px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; outline: 0; background: transparent; color: var(--ink); font-weight: 600; }
.location-button { width: 100%; display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; margin-bottom: 12px; padding: 11px 13px; border: 1px solid rgba(0,139,128,.28); border-radius: 8px; background: rgba(216,237,232,.55); color: var(--ink); text-align: left; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.location-button:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.location-button > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: white; font-size: 17px; }
.location-button strong { font-size: 13px; }
.location-button small { color: var(--muted); font-size: 9px; }
.location-button.active { border-color: var(--accent); background: var(--accent-soft); }
.location-button:disabled { cursor: wait; opacity: .7; transform: none; }
.search { display: flex; border-bottom: 2px solid var(--ink); }
.search input { flex: 1; min-width: 0; padding: 16px 2px; color: var(--ink); background: transparent; border: 0; outline: 0; }
.search button { padding: 0 5px 0 20px; color: var(--accent); background: transparent; border: 0; font-weight: 700; cursor: pointer; }
.search-help { display: block; margin-top: 10px; color: var(--muted); font-size: 11px; }

.school-directory { margin-bottom: 86px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.directory-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; padding: 26px 4px 22px; border-bottom: 1px solid var(--line); }
.directory-heading h2 { margin-top: 4px; font-size: clamp(28px, 3vw, 40px); }
.directory-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.directory-meta strong { font-size: 15px; }
.directory-meta span { color: var(--muted); font-size: 12px; }
.directory-actions { display: flex; align-items: center; gap: 14px; }
.directory-actions button { padding: 5px 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--accent); font-size: 12px; font-weight: 700; cursor: pointer; }
.directory-actions button:disabled { color: var(--muted); cursor: default; opacity: .45; }
.search-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 410px; overflow-y: auto; scrollbar-color: var(--ink) transparent; }
.search-result { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 88px; padding: 17px 18px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; transition: background .18s ease, padding .18s ease; }
.search-result:nth-child(odd) { border-right: 1px solid var(--line); }
.search-result:hover { padding-left: 23px; background: rgba(216,237,232,.55); }
.search-result.selected { background: var(--accent-soft); }
.search-result.selected span { color: var(--ink); }
.search-result strong, .search-result small { display: block; }
.search-result small { margin-top: 4px; color: var(--muted); }
.search-result span { color: var(--accent); font-size: 12px; font-weight: 700; white-space: nowrap; }
.directory-empty { grid-column: 1 / -1; padding: 50px 18px; color: var(--muted); text-align: center; }

.workspace { padding: 76px 6vw 38px; background: var(--white); }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 44px; }
.section-heading h2 { font-size: 40px; }
.segmented { display: flex; padding: 4px; background: var(--paper); border-radius: 100px; }
.segmented button { padding: 9px 18px; border: 0; border-radius: 100px; background: transparent; color: var(--muted); cursor: pointer; }
.segmented button.selected { background: var(--ink); color: white; }
.data-status { min-height: 18px; margin: -28px 0 14px; color: var(--muted); font-size: 12px; }
.data-status.error { color: var(--warning); }
.comparison-scroll { overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-color: var(--ink) var(--paper); }
.mobile-comparison { display: none; }
.school-strip, .metric-row { display: grid; grid-template-columns: minmax(190px, 1.05fr) repeat(var(--compare-count, 3), minmax(180px, 1fr)); }
.school-strip { position: relative; z-index: 1; background: var(--white); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.school-strip > * { padding: 21px 20px; }
.school-head { position: relative; display: flex; gap: 13px; align-items: center; border-left: 1px solid var(--line); }
.school-head > div { min-width: 0; }
.school-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remove-school { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.remove-school:hover { background: var(--paper); color: var(--ink); }
.comparison-empty { display: flex; align-items: center; padding: 25px 20px; border-left: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.insight.is-empty { display: none; }
.school-index { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--paper); font-size: 12px; font-weight: 700; }
.school-head.featured .school-index { background: var(--accent); color: white; }
.school-head strong, .school-head small { display: block; }
.school-head strong { margin-bottom: 5px; font-size: 16px; }
.school-head small, .muted { color: var(--muted); font-size: 12px; }
.school-label { display: flex; align-items: center; }
.metric-row { min-height: 118px; border-bottom: 1px solid var(--line); transition: opacity .25s, max-height .3s; }
.metric-row > * { padding: 25px 20px; }
.metric-name { display: flex; flex-direction: column; justify-content: center; }
.metric-name strong { font-size: 15px; }
.metric-name small { margin-top: 7px; color: var(--muted); line-height: 1.4; }
.metric-value { display: flex; flex-direction: column; justify-content: center; gap: 9px; border-left: 1px solid var(--line); }
.metric-value b { font-size: 27px; letter-spacing: -.03em; }
.metric-value b.positive { color: var(--accent); }
.metric-value span { color: var(--muted); font-size: 12px; }
.metric-value.accent b { color: var(--accent); }
.status { width: fit-content; padding: 4px 8px; border-radius: 100px; }
.status.good { color: var(--accent); background: var(--accent-soft); }
.status.warn { color: var(--warning); background: #f4e4da; }
.hidden-detail { display: none; }
.hidden-detail.visible { display: grid; animation: reveal .35s ease both; }
.text-button { display: flex; gap: 8px; align-items: center; margin: 24px auto 0; padding: 12px; border: 0; background: none; color: var(--ink); font-weight: 600; cursor: pointer; }
.text-button span { color: var(--accent); font-size: 20px; }
[hidden] { display: none !important; }

.insight { display: grid; grid-template-columns: .82fr 1.18fr; min-height: 610px; background: var(--ink); color: white; }
.insight-copy { display: flex; flex-direction: column; justify-content: center; padding: 80px 6vw; }
.insight-copy h2 { max-width: 560px; }
.insight-copy > p:not(.eyebrow) { max-width: 510px; margin: 28px 0; color: #b7c0ce; line-height: 1.75; }
.source-line { display: flex; align-items: center; gap: 10px; color: #8d98aa; font-size: 12px; }
.source-line span { width: 28px; height: 1px; background: var(--accent); }
.chart-wrap { display: flex; flex-direction: column; justify-content: center; padding: 70px 6vw 70px 2vw; }
.chart-legend { width: 100%; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 9px 18px; margin-bottom: 24px; font-size: 11px; color: #dbe2ec; }
.chart-legend span { min-width: 0; white-space: nowrap; }
.chart-legend span::before { content: ""; display: inline-block; width: 18px; height: 2px; margin-right: 7px; vertical-align: middle; background: var(--series-color); }
.chart-legend b { margin-left: 6px; color: #8e99a9; font-size: 10px; font-weight: 500; }
.grid line { stroke: rgba(255,255,255,.12); stroke-width: 1; }
.years text { fill: #8e99a9; font-size: 12px; }
.line { fill: none; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 900; animation: draw 1.6s .25s ease both; }
.line-a { stroke: #aeb8c7; }.line-b { stroke: #54d8c9; }.line-c { stroke: #d7b77b; }
.chart-dot { stroke: var(--ink); stroke-width: 3; }
.dot-a { fill: #aeb8c7; }.dot-b { fill: #54d8c9; }.dot-c { fill: #d7b77b; }
.label-link { fill: none; stroke-width: 1.5; opacity: .75; }
.link-a { stroke: #aeb8c7; }.link-b { stroke: #54d8c9; }.link-c { stroke: #d7b77b; }
.chart-value rect { fill: #24344d; stroke: var(--series-color); stroke-width: 1.5; }
.chart-value text { fill: white; font-size: 12px; font-weight: 700; }
.chart-value.dense text { font-size: 8.5px; }
.label-link.dense { opacity: .55; }
.value-a rect { stroke: #aeb8c7; }.value-b rect { stroke: #54d8c9; }.value-c rect { stroke: #d7b77b; }

.location { display: grid; grid-template-columns: 1.15fr .85fr; min-height: 640px; background: #dfe8e4; }
.map-panel { position: relative; min-height: 640px; overflow: hidden; background: #d8e3df; }
#schoolMap { position: absolute; inset: 0; z-index: 1; background: #d8e3df; }
.map-loading { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; padding: 30px; background: #d8e3df; color: var(--muted); text-align: center; line-height: 1.7; }
.map-loading a { color: var(--ink); border-bottom: 1px solid currentColor; font-weight: 700; }
.map-toolbar { position: absolute; z-index: 500; top: 20px; left: 20px; width: min(540px, calc(100% - 40px)); display: grid; gap: 12px; padding: 14px 16px; border: 1px solid rgba(23,36,58,.14); border-radius: 9px; background: rgba(255,253,247,.94); box-shadow: 0 10px 30px rgba(23,36,58,.10); backdrop-filter: blur(12px); }
.place-search { display: flex; border-bottom: 1px solid var(--ink); }
.place-search input { flex: 1; min-width: 0; padding: 8px 2px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.place-search button { border: 0; background: transparent; color: var(--accent); font-size: 12px; font-weight: 800; cursor: pointer; }
.place-search-notice { margin: -6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.map-toolbar-bottom { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.map-toolbar span, .map-toolbar strong { display: block; }
.map-toolbar span { margin-bottom: 3px; color: var(--accent); font-size: 10px; font-weight: 700; }
.map-toolbar strong { font-size: 14px; }
.map-controls { display: flex; gap: 5px; align-items: center; }
.map-controls button { min-width: 32px; height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 100px; background: transparent; color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.map-controls button:hover, .map-controls button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: white; }
.map-controls button:disabled { cursor: not-allowed; opacity: .45; }
.place-results { position: absolute; z-index: 510; top: 162px; left: 20px; width: min(540px, calc(100% - 40px)); max-height: 265px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--white); box-shadow: 0 14px 36px rgba(23,36,58,.18); }
.place-results button { width: 100%; display: block; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.place-results button:hover { background: var(--accent-soft); }
.place-results strong, .place-results small { display: block; }
.place-results strong { font-size: 13px; }
.place-results small { margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.place-results-status { padding: 18px 16px; color: var(--muted); font-size: 12px; }
.school-map-icon-wrap { background: transparent; border: 0; }
.school-map-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 4px solid var(--white); border-radius: 50% 50% 50% 8px; background: var(--marker-color); box-shadow: 0 7px 18px rgba(23,36,58,.3); color: white; font-size: 13px; font-weight: 800; transform: rotate(-45deg); transition: transform .18s ease; }
.school-map-icon i { font-style: normal; transform: rotate(45deg); }
.school-map-icon-wrap:hover .school-map-icon { transform: rotate(-45deg) translate(2px, -2px) scale(1.06); }
.school-map-icon { line-height: 1; }
.place-map-icon-wrap { background: transparent; border: 0; }
.place-map-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 4px solid var(--white); border-radius: 50% 50% 50% 8px; background: #bd8152; box-shadow: 0 8px 20px rgba(23,36,58,.3); color: white; font-size: 11px; font-weight: 800; transform: rotate(-45deg); }
.place-map-icon { text-indent: -9999px; }
.place-map-icon::after { content: "집"; text-indent: 0; transform: rotate(45deg); }
.place-map-icon.current-location-icon { border-radius: 50%; background: var(--accent); transform: none; }
.place-map-icon.current-location-icon::after { content: "현위치"; transform: none; }
.school-map-popup { min-width: 190px; color: var(--ink); font-family: Pretendard, "Apple SD Gothic Neo", sans-serif; }
.school-map-popup small, .school-map-popup strong, .school-map-popup span, .school-map-popup b { display: block; }
.school-map-popup small { color: var(--accent); font-size: 10px; font-weight: 700; }
.school-map-popup strong { margin: 5px 0 8px; font-size: 17px; }
.school-map-popup span { font-size: 12px; }
.school-map-popup b { margin-top: 7px; color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.45; }
.leaflet-popup-content-wrapper { border-radius: 8px; box-shadow: 0 12px 34px rgba(23,36,58,.18); }
.leaflet-control-attribution { font-size: 9px; }
.zone-source { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding: 9vw 7vw; background: radial-gradient(circle at 72% 24%, rgba(255,255,255,.72) 0 8%, transparent 8.5%), linear-gradient(145deg, transparent 0 38%, rgba(255,253,247,.72) 38% 45%, transparent 45%), #d8e3df; }
.zone-source span { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.zone-source strong { margin-top: 10px; font-size: clamp(30px, 4vw, 54px); }
.zone-source p { max-width: 430px; margin: 18px 0 28px; color: var(--muted); line-height: 1.7; }
.zone-source a { padding: 12px 0; border-bottom: 1px solid var(--ink); font-weight: 700; }
.zone-school { margin: 24px 0 0; color: var(--accent); font-weight: 700; line-height: 1.6; }
.place-context { margin: 24px 0 4px; padding: 18px; border: 1px solid rgba(23,36,58,.18); background: rgba(255,253,247,.58); }
.place-context header { display: flex; justify-content: space-between; align-items: start; gap: 18px; }
.place-context header small, .place-context header strong { display: block; }
.place-context header small { color: var(--accent); font-size: 10px; font-weight: 700; }
.place-context header strong { margin-top: 4px; font-size: 17px; }
.place-context .close-place { width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--paper); color: var(--muted); cursor: pointer; }
.place-context > p { margin: 12px 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.official-zone-match { margin-top: 14px; padding: 13px; border-left: 3px solid #8f5937; background: rgba(189,129,82,.10); }
.official-zone-match > small, .official-zone-match > strong { display: block; }
.official-zone-match > small { color: #8f5937; font-size: 9px; font-weight: 800; }
.official-zone-match > strong { margin-top: 5px; font-size: 13px; line-height: 1.35; }
.official-zone-match > p { margin: 6px 0 9px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.official-zone-match > div { display: flex; flex-wrap: wrap; gap: 5px; }
.official-zone-match button { padding: 5px 7px; border: 1px solid rgba(143,89,55,.25); border-radius: 100px; background: var(--white); color: var(--ink); font-size: 9px; cursor: pointer; }
.official-zone-match button span { display: inline; margin-left: 3px; color: #8f5937; font-size: inherit; }
.official-zone-match em { align-self: center; color: var(--muted); font-size: 9px; font-style: normal; }
.nearby-school-list { border-top: 1px solid var(--line); }
.nearby-school-list > div { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.nearby-school-list b, .nearby-school-list small { display: block; }
.nearby-school-list b { font-size: 12px; }
.nearby-school-list small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.nearby-school-list button, .place-meal-button { border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--accent); font-size: 10px; font-weight: 800; cursor: pointer; }
.nearby-actions { display: flex; gap: 9px; }
.nearby-actions button:first-child { color: var(--ink); }
.nearby-actions button.selected { color: #8f5937; }
.place-meal-button { margin-top: 14px; padding: 5px 0; font-size: 11px; }
.commute-route-summary { margin-top: 14px; padding: 14px 0; border-block: 1px solid var(--ink); }
.commute-route-summary > div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.commute-route-summary > div small { color: #8f5937; font-size: 9px; font-weight: 800; }
.commute-route-summary > div strong { font-size: 13px; }
.commute-route-summary dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 12px 0; }
.commute-route-summary dl > div { padding-right: 8px; border-right: 1px solid var(--line); }
.commute-route-summary dl > div:last-child { border-right: 0; padding-left: 8px; }
.commute-route-summary dt { color: var(--muted); font-size: 8px; }
.commute-route-summary dd { margin: 4px 0 0; color: var(--ink); font-size: 16px; font-weight: 800; }
.commute-route-summary > p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.commute-route-summary dl + p { margin-top: 0; }
.commute-route-summary > small { display: block; margin-top: 7px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.commute-route-summary a { color: var(--accent); }
.nearby-empty { color: var(--muted); font-size: 11px; }
.zone-school-list { margin: 32px 0 24px; border-top: 1px solid rgba(23,36,58,.28); }
.zone-school-row { width: 100%; display: grid; grid-template-columns: minmax(130px, .7fr) 1.3fr; gap: 24px; align-items: center; padding: 18px 0; border: 0; border-bottom: 1px solid rgba(23,36,58,.16); background: transparent; color: var(--ink); text-align: left; cursor: pointer; transition: padding .18s ease, background .18s ease; }
.zone-school-row:hover, .zone-school-row.focused { padding-inline: 10px; background: rgba(255,253,247,.58); }
.zone-school-name { display: flex; gap: 10px; align-items: center; min-width: 0; }
.zone-school-name span { display: grid; place-items: center; flex: 0 0 27px; height: 27px; border-radius: 50%; background: var(--ink); color: white; font-size: 11px; font-weight: 700; }
.zone-school-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.zone-result { min-width: 0; text-align: right; }
.zone-result b, .zone-result small { display: block; }
.zone-result b { overflow-wrap: anywhere; font-size: 14px; line-height: 1.45; }
.zone-result small { margin-top: 5px; color: var(--muted); line-height: 1.4; }
.zone-result.empty b { color: var(--muted); }
.zone-empty { padding: 28px 0; border-bottom: 1px solid rgba(23,36,58,.16); color: var(--muted); font-size: 13px; }
.road { position: absolute; background: var(--paper); box-shadow: 0 0 0 2px rgba(255,255,255,.55); transform-origin: center; }
.road-one { width: 130%; height: 42px; left: -20%; top: 42%; transform: rotate(-12deg); }
.road-two { width: 40px; height: 120%; left: 63%; top: -10%; transform: rotate(17deg); }
.river { position: absolute; width: 120%; height: 120px; left: -10%; bottom: -8%; border-radius: 50%; background: #a9ccd0; transform: rotate(8deg); }
.block { position: absolute; border-radius: 8px; background: rgba(255,255,255,.34); border: 1px solid rgba(23,36,58,.08); }
.b1 { width: 180px; height: 90px; left: 12%; top: 12%; }.b2 { width: 140px; height: 120px; left: 43%; top: 18%; }.b3 { width: 180px; height: 100px; right: 8%; top: 49%; }.b4 { width: 130px; height: 100px; left: 22%; bottom: 20%; }
.map-label { position: absolute; color: rgba(23,36,58,.4); font-size: 13px; font-weight: 600; }.ml1 { left: 18%; top: 8%; }.ml2 { left: 45%; bottom: 5%; }
.pin { position: absolute; z-index: 5; width: 22px; height: 22px; border: 5px solid white; border-radius: 50%; box-shadow: 0 4px 14px rgba(23,36,58,.2); }
.pin span { position: absolute; top: 21px; left: 50%; transform: translateX(-50%); padding: 5px 8px; border-radius: 5px; background: var(--ink); color: white; white-space: nowrap; font-size: 11px; }
.school-pin { right: 23%; top: 18%; background: var(--accent); }.home-pin { left: 17%; bottom: 25%; background: #d7b77b; }
.route { position: absolute; inset: 12% 8% 12% 8%; width: 84%; height: 76%; }
.route path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-dasharray: 7 7; animation: route 12s linear infinite; }
.location-copy { display: flex; flex-direction: column; justify-content: center; padding: 70px 7vw; }
.location-copy dl { margin: 38px 0 24px; border-top: 1px solid rgba(23,36,58,.2); }
.location-copy dl div { display: flex; justify-content: space-between; gap: 20px; padding: 17px 0; border-bottom: 1px solid rgba(23,36,58,.16); }
.location-copy dt { color: var(--muted); }.location-copy dd { margin: 0; font-weight: 700; text-align: right; }
.notice { color: var(--muted); font-size: 12px; line-height: 1.6; }

.daily { display: grid; grid-template-columns: .8fr 1.2fr; gap: 8vw; padding: 95px 7vw; background: var(--white); }
.daily h2 { margin-bottom: 22px; font-size: 44px; }
.daily > div > p:not(.eyebrow) { color: var(--muted); line-height: 1.7; }
.meal-board { min-width: 0; }
.meal-controls { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 18px; }
.meal-school-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.meal-school-tabs button { padding: 8px 11px; border: 1px solid var(--line); border-radius: 100px; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.meal-school-tabs button.selected { border-color: var(--ink); background: var(--ink); color: white; }
.meal-scope-toggle { flex: 0 0 auto; padding: 7px 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--accent); font-size: 10px; font-weight: 800; cursor: pointer; }
.meal-list { border-top: 1px solid var(--ink); }
.meal-list div { display: grid; grid-template-columns: 95px 1fr auto; gap: 24px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line); }
.meal-list time { color: var(--accent); font-weight: 700; }.meal-list span { color: var(--muted); font-size: 12px; }
.meal-list time small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.meal-empty { display: block !important; padding: 34px 0 !important; color: var(--muted); }

footer { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; gap: 30px; padding: 50px 6vw; background: var(--paper); border-top: 1px solid var(--line); font-size: 13px; }
.prototype-note { color: var(--muted); text-align: right; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 26px; transform: translate(-50%, 30px); padding: 13px 18px; border-radius: 100px; background: var(--ink); color: white; font-size: 13px; opacity: 0; pointer-events: none; transition: .25s ease; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@keyframes reveal { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes draw { from { stroke-dashoffset: 900; } to { stroke-dashoffset: 0; } }
@keyframes route { to { stroke-dashoffset: -100; } }

@media (max-width: 900px) {
  .topbar { grid-template-columns: 1fr auto; height: 64px; } nav { display: none; }
  .intro { grid-template-columns: 1fr; gap: 48px; padding: 64px 6vw 50px; }
  .intro-copy { max-width: none; }
  .school-directory { min-width: 0; }
  .search-results { grid-template-columns: 1fr; }
  .search-result:nth-child(odd) { border-right: 0; }
  .school-strip, .metric-row { grid-template-columns: 150px repeat(var(--compare-count, 3), minmax(150px, 1fr)); }
  .workspace { overflow-x: visible; }
  .insight, .location, .daily { grid-template-columns: 1fr; }
  .insight-copy { padding-bottom: 20px; }
  .chart-wrap { padding: 20px 5vw 70px; }
  .map-panel { min-height: 480px; }
  .daily { gap: 40px; }
  footer { grid-template-columns: 1fr; }.prototype-note { text-align: left; }
}

@media (max-width: 560px) {
  .topbar { padding: 0 18px; }.ghost-button { padding: 8px 11px; font-size: 12px; }
  .intro { min-height: 500px; padding: 56px 20px 42px; }
  h1 { font-size: 51px; }
  .workspace { padding: 55px 20px 30px; }
  .school-directory { margin-bottom: 60px; }
  .directory-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .directory-meta { align-items: flex-start; }
  .search-results { max-height: 360px; }
  .search-result { min-height: 82px; padding-inline: 10px; }
  .search-result:hover { padding-left: 14px; }
  .section-heading { align-items: start; gap: 25px; flex-direction: column; }
  .comparison-scroll { display: none; }
  .mobile-comparison { display: grid; gap: 18px; }
  .mobile-school-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
  .mobile-school-card header { position: relative; display: flex; gap: 12px; align-items: center; padding: 17px 42px 17px 16px; border-bottom: 1px solid var(--ink); }
  .mobile-school-card header > div { min-width: 0; }
  .mobile-school-card header strong, .mobile-school-card header small { display: block; }
  .mobile-school-card header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
  .mobile-school-card header small { margin-top: 4px; color: var(--muted); font-size: 11px; }
  .mobile-remove-school { position: absolute; top: 13px; right: 12px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--paper); color: var(--muted); font-size: 18px; }
  .mobile-school-card dl { margin: 0; }
  .mobile-school-card dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(125px, auto); gap: 14px; align-items: center; min-height: 92px; padding: 16px; border-bottom: 1px solid var(--line); }
  .mobile-school-card dl > div:last-child { border-bottom: 0; }
  .mobile-school-card dt strong, .mobile-school-card dt small, .mobile-school-card dd b, .mobile-school-card dd small { display: block; }
  .mobile-school-card dt { font-size: 13px; font-weight: 700; }
  .mobile-school-card dt small { margin-top: 6px; color: var(--muted); font-size: 10px; font-weight: 400; line-height: 1.35; }
  .mobile-school-card dd { margin: 0; text-align: right; }
  .mobile-school-card dd b { font-size: 22px; letter-spacing: -.03em; }
  .mobile-school-card dd b.positive { color: var(--accent); }
  .mobile-school-card dd small { margin-top: 5px; color: var(--muted); font-size: 10px; }
  .mobile-school-card .status { display: inline-block; margin-top: 7px; font-size: 10px; }
  .mobile-comparison-empty { padding: 30px 18px; border-block: 1px solid var(--line); color: var(--muted); text-align: center; }
  .text-button { display: none; }
  .insight-copy, .location-copy, .daily { padding: 65px 20px; }
  .map-toolbar { top: 12px; left: 12px; width: calc(100% - 24px); padding: 12px; }
  .map-toolbar-bottom { align-items: flex-end; }
  .map-controls { flex-wrap: wrap; justify-content: flex-end; }
  .map-controls button { min-width: 30px; height: 30px; padding-inline: 8px; font-size: 11px; }
  .place-results { top: 150px; left: 12px; width: calc(100% - 24px); }
  .zone-school-row { grid-template-columns: 1fr; gap: 10px; padding: 19px 0; }
  .zone-result { padding-left: 37px; text-align: left; }
  .daily h2 { font-size: 38px; }
  .meal-controls { align-items: flex-start; flex-direction: column; }
  .meal-list div { grid-template-columns: 75px 1fr; gap: 10px; }.meal-list span { grid-column: 2; }
  footer { padding: 42px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
