/* =====================================================
 * 光明区义务教育入学 · 视觉系统
 * 风格语言：温暖 + 权威 + 易读
 * 主色 #3D6A8E（信得住的蓝） / 暖色 #D89B47（琥珀）
 * 背景 #FBF8F2（米白） / 表面 #FFFFFF（卡片）
 * ===================================================== */

/* ---------- Reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, p, ul, ol, figure, blockquote, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

:root {
  /* Color */
  --bg:         #FBF8F2;
  --bg-soft:    #F4EEDF;
  --surface:    #FFFFFF;
  --ink:        #1F2937;
  --ink-2:      #374151;
  --muted:      #6B7280;
  --muted-2:    #9CA3AF;
  --line:       #E8E0D1;
  --line-soft:  #F1ECE0;

  --primary:        #3D6A8E;
  --primary-soft:   #DBE7F1;
  --primary-deep:   #2C5374;

  --accent:         #D89B47;
  --accent-soft:    #F6E5C9;

  --success:        #5C9576;
  --success-soft:   #DBEBE1;

  --warning:        #C26B4F;
  --warning-soft:   #F8E1D8;

  --info:           #6E7BA0;
  --info-soft:      #E2E5EE;

  /* Street palette (map) */
  --st-gm:  #7BA098;
  --st-fh:  #B07A85;
  --st-xh:  #7E8AAB;
  --st-yt:  #9DA77A;
  --st-mt:  #D08C4F;
  --st-go:  #B59E5E;

  /* Radius & Shadow */
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  18px;
  --r-xl:  24px;
  --shadow-1: 0 1px 2px rgba(31,41,55,.04), 0 4px 14px rgba(31,41,55,.04);
  --shadow-2: 0 2px 6px rgba(31,41,55,.06), 0 14px 32px rgba(31,41,55,.06);
  --shadow-3: 0 8px 24px rgba(31,41,55,.10), 0 24px 56px rgba(31,41,55,.10);

  /* Layout */
  --maxw: 1280px;
  --topbar-h: 70px;
}

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }

/* ==================== Topbar ==================== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 248, 242, 0.85);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; gap: 24px;
  height: var(--topbar-h);
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark { width: 38px; height: 38px; }
.brand-text { line-height: 1.2; }
.brand-title { font-weight: 700; font-size: 15.5px; color: var(--ink); letter-spacing: -0.01em; }
.brand-sub   { font-size: 12px; color: var(--muted); margin-top: 2px; }
#policy-year-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-weight: 600;
}

.topnav {
  display: flex; gap: 4px; flex: 1;
  justify-content: center;
}
.nav-tab {
  padding: 9px 16px;
  font-size: 13.5px;
  color: var(--ink-2);
  border-radius: 999px;
  transition: all .15s;
  font-weight: 500;
}
.nav-tab:hover { background: var(--bg-soft); color: var(--primary); }
.nav-tab.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.nav-tab-link { text-decoration: none; }

.brand-meta {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  flex-shrink: 0;
}
.meta-label { font-size: 11px; color: var(--muted); }
.meta-value { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.meta-countdown {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--accent);
}

/* 年份 banner */
.year-banner {
  background: linear-gradient(90deg, #FFF5DA 0%, #FFEFD2 100%);
  border-bottom: 1px solid #EBD9AC;
  padding: 9px 32px;
  font-size: 12.5px;
  color: #7B5C1F;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.banner-tag {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent);
  color: #fff; font-size: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.year-banner strong { color: var(--ink); font-weight: 700; }
.year-banner em { font-style: normal; color: var(--ink-2); }
.year-banner code {
  font-family: SFMono-Regular, Consolas, monospace;
  font-size: 11.5px;
  background: rgba(216,155,71,.18);
  padding: 1px 6px; border-radius: 4px;
  color: var(--ink);
}
.banner-sep { color: var(--muted-2); margin: 0 4px; }
.banner-link {
  margin-left: auto;
  color: var(--primary-deep);
  font-weight: 600;
}
.banner-link:hover { text-decoration: underline; }

/* ==================== Main ==================== */
.main { min-height: calc(100vh - var(--topbar-h) - 100px); }

.page { display: none; }
.page.active { display: block; }

/* ==================== Hero ==================== */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse 80% 60% at 90% 0%, rgba(216,155,71,0.10), transparent 60%),
    radial-gradient(ellipse 60% 70% at 10% 100%, rgba(61,106,142,0.08), transparent 60%),
    linear-gradient(180deg, #FFFFFF 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(31,41,55,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31,41,55,0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 40%, #000 30%, transparent 80%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 56px;
  padding: 72px 32px 80px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(61,106,142,0.10);
  color: var(--primary-deep);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}
.hero-title {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--ink);
}
.hero-accent {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lede {
  margin-top: 20px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 540px;
}
.hero-cta {
  margin-top: 28px;
  display: flex; gap: 12px;
}
.btn {
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: all .15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(61,106,142,0.20);
}
.btn-primary:hover { background: var(--primary-deep); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(61,106,142,0.30); }
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-inline {
  color: var(--primary);
  font-weight: 600;
  padding: 0;
  border-bottom: 1px dashed var(--primary);
  border-radius: 0;
}
.btn-inline:hover { color: var(--primary-deep); }

.hero-meta {
  margin-top: 40px;
  display: flex; gap: 24px; align-items: center;
  flex-wrap: wrap;
}
.hero-meta-item { font-size: 12.5px; color: var(--muted); }
.hm-num {
  font-size: 22px; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.hm-label { color: var(--muted); }
.hero-meta-divider { width: 1px; height: 28px; background: var(--line); }

/* 右侧 hero 卡片 */
.hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-2);
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: ''; position: absolute; top: -40%; right: -20%;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(216,155,71,0.18), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  position: relative;
}
.hc-label { font-size: 12px; color: var(--muted); }
.hc-title { font-size: 16px; font-weight: 700; color: var(--ink); margin-top: 4px; }
.hc-pill {
  font-size: 11px;
  padding: 4px 10px;
  background: var(--success-soft);
  color: var(--success);
  border-radius: 999px;
  font-weight: 600;
}

.hc-countdown {
  display: flex; gap: 14px;
  margin: 22px 0 18px;
  position: relative;
}
.hc-count {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 12px 14px;
  flex: 1;
  text-align: center;
}
.hc-count span {
  font-size: 32px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: block;
  line-height: 1;
}
.hc-count em {
  font-style: normal; font-size: 11px;
  color: var(--muted); margin-top: 4px;
  display: block;
}

.hc-event { padding: 14px 16px; background: var(--bg-soft); border-radius: 12px; position: relative; }
.hc-event-label { font-size: 13px; font-weight: 600; color: var(--ink); }
.hc-event-detail { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.hc-timeline-mini {
  margin-top: 16px;
  display: grid;
  gap: 8px;
  position: relative;
}
.hc-mini-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px;
}
.hc-mini-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
  background: var(--muted-2);
}
.hc-mini-item.critical .hc-mini-dot { background: var(--accent); }
.hc-mini-item.done .hc-mini-dot     { background: var(--success); }
.hc-mini-item.done .hc-mini-name    { text-decoration: line-through; opacity: 0.5; }
.hc-mini-name { color: var(--ink-2); flex: 1; }
.hc-mini-date { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }

.hc-bottom {
  margin-top: 18px;
  width: 100%;
  padding: 10px;
  background: var(--bg-soft);
  border-radius: 10px;
  color: var(--primary-deep);
  font-weight: 600;
  font-size: 13px;
  transition: all .15s;
  position: relative;
}
.hc-bottom:hover { background: var(--primary-soft); }

/* ==================== Section ==================== */
.section { padding: 64px 32px; }
.section-head { margin-bottom: 36px; }
.section-head.with-side { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section-head.inline { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.section-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.section-title-sm {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.section-sub {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--muted);
  max-width: 640px;
}
.section-sub-sm { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ==================== Quick Grid ==================== */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.quick-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 24px;
  transition: all .2s;
  cursor: pointer;
  overflow: hidden;
}
.quick-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
}
.qc-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.qc-icon svg { width: 24px; height: 24px; }
.qc-icon-1 { background: var(--primary-soft);  color: var(--primary); }
.qc-icon-2 { background: var(--accent-soft);   color: var(--accent); }
.qc-icon-3 { background: var(--success-soft);  color: var(--success); }
.qc-icon-4 { background: var(--info-soft);     color: var(--info); }
.qc-icon-5 { background: var(--accent-soft);   color: var(--accent); }
.quick-card-link { display: block; text-decoration: none; }
.qc-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.qc-desc { font-size: 13px; color: var(--muted); line-height: 1.55; }
.qc-arrow {
  position: absolute; top: 22px; right: 22px;
  font-size: 22px; color: var(--muted-2);
  transition: transform .2s;
}
.quick-card:hover .qc-arrow { transform: translate(4px, -2px); color: var(--primary); }

/* ==================== Dashboard columns ==================== */
.dash-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.dash-col { }
.dc-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dc-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  margin: 8px 0 22px;
  letter-spacing: -0.01em;
}
.dc-hint { font-size: 13px; color: var(--muted); }

.keypoints { display: grid; gap: 18px; }
.keypoints li {
  display: flex; gap: 14px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.kp-num {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--primary);
  color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.keypoints li > div { font-size: 13.5px; color: var(--ink-2); line-height: 1.65; }
.keypoints strong { color: var(--ink); font-weight: 700; }

.audience-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.audience-tile {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all .15s;
}
.audience-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.audience-pct {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-transform: uppercase;
}
.audience-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 6px 0 4px;
}
.audience-hint { font-size: 12px; color: var(--muted); }

/* ==================== Calculator ==================== */
.calc-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 28px;
}
.calc-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
}

.calc-step {
  display: flex; gap: 16px;
  padding-bottom: 26px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line-soft);
}
.calc-step:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 18px; }
.step-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.step-body { flex: 1; min-width: 0; }
.step-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
}
.step-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.55;
}
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-2);
  transition: all .15s;
  background: var(--bg);
}
.radio:hover { border-color: var(--primary); }
.radio input { margin: 0; accent-color: var(--primary); display: none; }
.radio:has(input:checked) {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.radio:has(input:disabled) { opacity: 0.4; cursor: not-allowed; }

.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.input-cell label { font-size: 13px; color: var(--ink-2); display: block; margin-bottom: 6px; font-weight: 600; }
.input-cell small { font-size: 11.5px; color: var(--muted); display: block; margin-top: 6px; }
.input-with-unit {
  display: flex; align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  transition: border-color .15s;
}
.input-with-unit:focus-within { border-color: var(--primary); }
.input-with-unit input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 11px 0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  outline: none;
  width: 100%;
}
.input-with-unit span { color: var(--muted); font-size: 13px; padding-left: 8px; }

.calc-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* Result panel */
.calc-result { display: flex; flex-direction: column; gap: 16px; }
.cr-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
}
.cr-main {
  background: linear-gradient(135deg, #FFFFFF 0%, #FAEDD0 100%);
  border-color: var(--accent-soft);
  position: relative;
  overflow: hidden;
}
.cr-main::before {
  content: ''; position: absolute; top: -60%; right: -10%;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(216,155,71,0.16), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.cr-eyebrow { font-size: 11px; font-weight: 700; color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; }
.cr-category {
  font-size: 48px;
  font-weight: 800;
  color: var(--ink);
  margin-top: 8px;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cr-category-name {
  font-size: 14px;
  color: var(--ink-2);
  margin-top: 6px;
  line-height: 1.5;
  font-weight: 500;
  min-height: 42px;
}
.cr-score-row {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(216,155,71,0.30);
  display: flex; align-items: flex-end; gap: 12px;
}
.cr-score-block { flex: 1; }
.scr-label { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.scr-value {
  font-size: 26px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}
.scr-value em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 2px; }
.cr-score-plus {
  font-size: 18px; color: var(--muted-2);
  padding-bottom: 4px;
}
.cr-total {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(216,155,71,0.30);
  display: flex; align-items: center; justify-content: space-between;
}
.scr-total-value {
  font-size: 36px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
}
.scr-total-value em { font-style: normal; font-size: 14px; color: var(--ink-2); margin-left: 2px; }
.cr-notice { font-size: 12px; color: var(--ink-2); margin-top: 14px; line-height: 1.55; }

.cr-detail-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.bonus-list { display: grid; gap: 10px; }
.bonus-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  background: var(--bg-soft);
  border-radius: 8px;
  font-size: 13px;
}
.bonus-empty {
  background: transparent !important;
  color: var(--muted) !important;
  justify-content: center !important;
  padding: 12px !important;
}
.bonus-key { color: var(--ink-2); flex: 1; }
.bonus-val {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
}
.bonus-val.zero { color: var(--muted-2); }

.cr-tip {
  display: flex; gap: 14px;
  background: var(--info-soft);
  border-color: var(--info-soft);
}
.cr-tip-icon {
  width: 26px; height: 26px;
  background: var(--info);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
  font-size: 13px;
}
.cr-tip p { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; line-height: 1.55; }

/* ==================== School Page ==================== */
.school-layout {
  display: grid;
  grid-template-columns: 1.05fr 1.4fr;
  gap: 24px;
}

.map-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex; flex-direction: column;
  position: sticky;
  top: calc(var(--topbar-h) + 50px);
  align-self: start;
}
#dist-map {
  width: 100%;
  height: auto;
  display: block;
}
.map-legend { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.map-legend-title { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.map-legend ul { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.map-legend li { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); }
.map-legend .swatch { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }

.school-list-wrap { display: flex; flex-direction: column; }

.seg {
  display: inline-flex;
  padding: 4px;
  background: var(--bg-soft);
  border-radius: 10px;
  border: 1px solid var(--line);
}
.seg-btn {
  padding: 7px 16px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  border-radius: 7px;
  transition: all .15s;
}
.seg-btn.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(31,41,55,0.08);
}

.school-filter { display: flex; flex-direction: column; gap: 12px; }
.school-filter input {
  width: 100%;
  padding: 11px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13.5px;
  outline: none;
  transition: border-color .15s;
}
.school-filter input:focus { border-color: var(--primary); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 5px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--primary); }
.chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.chip-all { background: var(--bg-soft); }

.school-stats {
  margin: 14px 0;
  font-size: 13px;
  color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
.school-stats strong { color: var(--ink); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; margin-right: 4px; }
.stats-sep { color: var(--line); }

.school-list { display: grid; gap: 10px; max-height: 760px; overflow-y: auto; padding-right: 6px; }
.school-list::-webkit-scrollbar { width: 6px; }
.school-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.school-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 18px;
  cursor: pointer;
  transition: all .15s;
  display: flex; gap: 16px; align-items: flex-start;
}
.school-row:hover { border-color: var(--primary); transform: translateX(2px); box-shadow: var(--shadow-1); }
.school-row-meta { flex-shrink: 0; padding-top: 2px; }
.sr-color { width: 6px; height: 100%; min-height: 38px; border-radius: 3px; }
.school-row-main { flex: 1; min-width: 0; }
.sr-name { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.sr-meta { margin-top: 4px; font-size: 12px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.sr-meta span { display: inline-flex; align-items: center; gap: 4px; }
.sr-serves { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.sr-tag {
  padding: 3px 8px;
  background: var(--bg-soft);
  border-radius: 5px;
  font-size: 11.5px;
  color: var(--ink-2);
}

.sr-name-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.sr-cutoff {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--bg-soft);
  color: var(--muted);
  border: 1px solid var(--line);
  cursor: help;
  font-variant-numeric: tabular-nums;
}
.sr-cutoff-low  { background: var(--success-soft); color: var(--success); border-color: transparent; }
.sr-cutoff-mid  { background: var(--accent-soft);  color: var(--warning);  border-color: transparent; }
.sr-cutoff-high { background: var(--warning-soft); color: var(--warning);  border-color: transparent; }
.sr-cutoff-none { background: var(--info-soft);    color: var(--info);    border-color: transparent; }
.sr-cutoff-score { font-weight: 700; font-size: 12px; }
.sr-cutoff-cat   { font-weight: 500; opacity: 0.85; }
.sr-cutoff-year  { opacity: 0.55; font-weight: 500; font-size: 10.5px; }
.sr-note {
  margin-top: 8px;
  padding: 6px 10px;
  background: var(--warning-soft);
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--warning);
  display: inline-block;
}

/* SVG Map elements */
.map-bg     { fill: var(--bg-soft); }
.map-street {
  cursor: pointer;
  transition: filter .15s, fill-opacity .15s;
}
.map-street:hover, .map-street.active {
  fill-opacity: 0.85 !important;
  filter: brightness(0.95) drop-shadow(0 1px 3px rgba(31,41,55,0.18));
}
.map-school { cursor: pointer; transition: r .15s, stroke-width .15s; }
.map-school:hover {
  r: 6;
  stroke-width: 2.5;
}
.map-school-label { display: none; }

/* Drawer */
.school-drawer {
  position: fixed; inset: 0; z-index: 200;
  display: none;
  pointer-events: auto;
}
.school-drawer.open { display: block; }
.drawer-mask {
  position: absolute; inset: 0;
  background: rgba(31,41,55,0.4);
  backdrop-filter: blur(2px);
}
.drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 480px;
  max-width: 100vw;
  background: var(--bg);
  padding: 32px;
  overflow-y: auto;
  animation: slideIn .25s ease-out;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-close {
  position: absolute; top: 20px; right: 20px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface);
  font-size: 22px; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-1);
}
.drawer-body { padding-right: 20px; }
.dr-stage { font-size: 11.5px; font-weight: 700; color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; }
.dr-name { font-size: 24px; font-weight: 800; color: var(--ink); margin: 8px 0 6px; line-height: 1.25; letter-spacing: -0.01em; }
.dr-street { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; color: #fff; font-weight: 600; }

.dr-block { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.dr-block-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }
.dr-address { font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.dr-phone {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.dr-serves-list { display: flex; flex-wrap: wrap; gap: 6px; }
.dr-serves-list li {
  padding: 5px 10px;
  background: var(--accent-soft);
  color: var(--warning);
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
}
.dr-note {
  padding: 12px 14px;
  background: var(--warning-soft);
  border-radius: 8px;
  font-size: 13px;
  color: var(--warning);
  line-height: 1.55;
}
.dr-call-btn {
  display: block;
  margin-top: 24px;
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
}

/* ==================== Timeline ==================== */
.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  background: linear-gradient(145deg, #fff 0%, #fffdf9 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
}
.tl-item {
  min-height: 174px;
  padding: 16px 17px 15px;
  border: 1px solid #eee7da;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(55, 67, 82, .035);
  position: relative;
  overflow: hidden;
}
.tl-item::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #cdd8d2;
}
.tl-item.done::before { background: var(--success); }
.tl-item.critical::before { background: var(--accent); }
.tl-card-head { display: flex; align-items: center; gap: 9px; min-height: 28px; }
.tl-step {
  display: grid; place-items: center;
  width: 27px; height: 27px;
  border-radius: 50%;
  color: #728279;
  background: #edf2ee;
  font-size: 11px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.tl-item.critical .tl-step { color: #fff; background: var(--accent); }
.tl-date {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.tl-item.critical .tl-date { color: var(--accent); }
.tl-status {
  padding: 4px 7px;
  border-radius: 999px;
  color: #68776e;
  background: #edf2ee;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.tl-item.critical .tl-status { color: #9a651e; background: #fff1d9; }
.tl-tag {
  margin-top: 7px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .02em;
}
.tl-body { padding: 18px 2px 0; }
.tl-event {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.45;
}
.tl-detail {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.65;
}

/* ==================== Materials ==================== */
.material-section { margin-top: 48px; }

.mat-progress {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 260px;
}
.mat-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.mat-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success) 0%, var(--accent) 100%);
  width: 0%;
  transition: width .3s;
}
#mat-progress-all { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }

.mat-tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--line);
  margin: 20px 0 16px;
}
.mat-tab {
  padding: 10px 16px;
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .15s;
}
.mat-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.mat-blurb {
  font-size: 13px;
  color: var(--ink-2);
  padding: 12px 14px;
  background: var(--info-soft);
  border-radius: 8px;
  margin-bottom: 18px;
  line-height: 1.6;
  border-left: 3px solid var(--info);
}

.mat-list { display: grid; gap: 18px; }
.mat-group-head {
  padding: 12px 16px;
  border-radius: 10px 10px 0 0;
  border: 1px solid var(--line);
  border-bottom: none;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  position: relative;
}
.mat-group-head::before {
  content: ''; position: absolute;
  left: 0; top: 0; bottom: 0; width: 4px;
}
.mat-group-required {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FCF9 100%);
}
.mat-group-required::before { background: var(--success); }
.mat-group-any {
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFAEC 100%);
}
.mat-group-any::before { background: var(--accent); }
.mat-group-housing {
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFAEC 100%);
}
.mat-group-housing::before { background: var(--accent); }
.mat-group-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  flex: 1;
}
.mat-group-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.mat-group-required .mat-group-badge {
  background: var(--success-soft);
  color: var(--success);
}
.mat-group-any .mat-group-badge,
.mat-group-housing .mat-group-badge {
  background: var(--accent-soft);
  color: var(--warning);
}
.mat-group-hint {
  flex: 1 0 100%;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}
.mat-items-group {
  display: grid; gap: 8px;
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 14px;
  background: #FBFAF6;
}

.mat-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
}
.mat-row:hover { border-color: var(--accent); }
.mat-row.checked {
  background: var(--success-soft);
  border-color: var(--success);
}
.mat-checkbox {
  width: 20px; height: 20px;
  border: 1.5px solid var(--line);
  border-radius: 5px;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
  background: #fff;
}
.mat-row.checked .mat-checkbox {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.mat-checkbox::after {
  content: '✓';
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  transition: opacity .15s;
}
.mat-row.checked .mat-checkbox::after { opacity: 1; }
.mat-text { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; flex: 1; }
.mat-text .mat-label { font-weight: 500; color: var(--ink-2); }
.mat-text .mat-meta {
  margin-top: 6px;
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 9px;
  background: var(--accent-soft);
  color: var(--warning);
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.mat-row.checked .mat-text .mat-label { color: var(--ink); text-decoration: line-through; opacity: 0.75; }
.mat-row.checked .mat-text .mat-meta { opacity: 0.55; }

/* ==================== Tips grid ==================== */
.tips-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.tip-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
}
.tip-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; margin-bottom: 12px;
  font-size: 16px;
}
.tip-card h4 { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.tip-card p { font-size: 12.5px; color: var(--muted); line-height: 1.55; }

/* ==================== Policy Page ==================== */
.policy-h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 40px 0 16px;
  letter-spacing: -0.01em;
  position: relative;
  padding-left: 14px;
}
.policy-h3::before {
  content: ''; position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 4px;
  background: var(--accent);
  border-radius: 2px;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.cat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 18px;
  position: relative;
  overflow: hidden;
}
.cat-card::before {
  content: ''; position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--accent);
}
.cat-card:nth-child(4n+2)::before { background: var(--primary); }
.cat-card:nth-child(4n+3)::before { background: var(--info); }
.cat-card:nth-child(4n)::before   { background: var(--success); }

.cc-num {
  display: inline-block;
  padding: 3px 10px;
  background: var(--bg-soft);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 10px;
}
.cc-base {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cc-base em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 2px; font-weight: 500; }
.cc-title { font-size: 13.5px; font-weight: 700; color: var(--ink); margin: 8px 0 6px; line-height: 1.4; }
.cc-desc { font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.cc-bonus { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.cc-bonus-item {
  font-size: 11.5px; color: var(--ink-2);
  margin-top: 3px;
  display: flex; gap: 6px;
}
.cc-bonus-item::before { content: '+'; color: var(--accent); font-weight: 700; }

/* bonus table */
.bonus-table-wrap { overflow-x: auto; }
.bonus-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.bonus-table th, .bonus-table td { padding: 13px 16px; text-align: left; font-size: 13px; }
.bonus-table thead th {
  background: var(--bg-soft);
  font-weight: 700; color: var(--ink);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bonus-table tbody tr { border-top: 1px solid var(--line-soft); }
.bonus-table tbody tr:hover { background: var(--bg-soft); }
.bonus-table td { color: var(--ink-2); }
.bonus-table .applies {
  display: inline-block;
  padding: 2px 8px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  border-radius: 4px;
  font-size: 11.5px;
  margin: 1px;
  font-weight: 600;
}

.tiebreak-list {
  counter-reset: step;
  display: grid; gap: 8px;
}
.tiebreak-list li {
  position: relative;
  padding: 14px 18px 14px 48px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.6;
  counter-increment: step;
}
.tiebreak-list li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 14px;
  width: 22px; height: 22px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}

.pref-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.pref-list li {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--ink-2);
  display: flex; gap: 10px; align-items: flex-start;
}
.pref-list li::before {
  content: '★';
  color: var(--accent);
  font-weight: 700;
}

.policy-footer {
  margin-top: 40px;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--bg-soft) 0%, var(--bg) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.pf-meta { font-size: 14px; color: var(--ink); }
.pf-meta strong { color: var(--accent); font-weight: 700; }
.pf-desc { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.55; }

/* ==================== Footer ==================== */
.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  margin-top: 40px;
}
.footer-inner {
  padding: 24px 32px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px;
  color: var(--muted);
}
.foot-brand { font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.foot-sub { font-size: 11.5px; }
.foot-sep { color: var(--line); margin: 0 8px; }

/* ==================== Responsive ==================== */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .calc-layout { grid-template-columns: 1fr; }
  .school-layout { grid-template-columns: 1fr; }
  .map-wrap { position: static; max-width: 480px; margin: 0 auto; }
  .quick-grid, .tips-grid, .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-columns { grid-template-columns: 1fr; gap: 32px; }
  .pref-list { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: repeat(4, 1fr); row-gap: 28px; }
  .timeline::before { display: none; }
}
@media (max-width: 720px) {
  .container, .section, .topbar-inner { padding-left: 16px; padding-right: 16px; }
  .topnav { display: none; } /* mobile, would need burger */
  .hero-title { font-size: 32px; }
  .quick-grid, .tips-grid, .cat-grid, .pref-list { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr 1fr; }
  .input-row { grid-template-columns: 1fr; }
  .year-banner { font-size: 11px; padding: 8px 16px; }
  .banner-link { display: none; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
}
