/* Grade Trends：颜色全部是 :root 上的变量；深色模式另选一组值（不是自动反色）。
   图表配色按 dataviz 参考调色板：分类色固定顺序（slot 1–6），已用 validate_palette.js 校验过浅色 / 深色两种模式。 */
:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --surface-2: #f3f2ee;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #6f6e69;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --brand: #2a78d6;
  --select-bg: #eaf2fc;     /* 对比栏：勾选后"已选"的浅蓝底，和勾上的蓝色勾选框一个颜色 */
  --select-line: #b9d3f2;
  --link: #1c5cab;
  --up: #006300;
  --down: #c62f2f;
  --wash: rgba(42, 120, 214, 0.08);
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300;
  --ref: #898781;          /* 全州平均：灰色参照线 */
  /* 线色当文字用（图上末端的名称）：同色相，调到和背景对比度 ≥ 4.5:1（小字才看得清） */
  --s1-t: #2873ce; --s2-t: #c94714; --s3-t: #14835b; --s4-t: #9b6a00; --s5-t: #da286b; --s6-t: #008300;
  --ref-t: #74726d;
  /* 租售比"买还是租"的刻度条：买蓝、租橙，中间灰（两边各两档，浅→深，浅的一档在底色上至少 2:1） */
  --ptr-buy2: #2a78d6; --ptr-buy1: #86b6ef; --ptr-mid: #a9a8a0; --ptr-rent1: #f09670; --ptr-rent2: #e0582a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --surface-2: #242422;
    --ink: #f0efec;
    --ink-2: #c3c2b7;
    --muted: #9b9a93;
    --grid: #2c2c2a;
    --axis: #383835;
    --border: rgba(255, 255, 255, 0.10);
    --brand: #3987e5;
    --link: #86b6ef;
    --up: #0ca30c;
    --down: #e66767;
    --wash: rgba(57, 135, 229, 0.14);
    --select-bg: #13233a;
    --select-line: #2b4a70;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300;
    --ref: #898781;
    --s1-t: #3987e5; --s2-t: #da5c2a; --s3-t: #199e70; --s4-t: #c98500; --s5-t: #d65584; --s6-t: #009700;
    --ref-t: #898781;
    --ptr-buy2: #6da7ec; --ptr-buy1: #1c5cab; --ptr-mid: #6f6e69; --ptr-rent1: #a8461f; --ptr-rent2: #f08a5d;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #242422;
  --ink: #f0efec;
  --ink-2: #c3c2b7;
  --muted: #9b9a93;
  --grid: #2c2c2a;
  --axis: #383835;
  --border: rgba(255, 255, 255, 0.10);
  --brand: #3987e5;
  --link: #86b6ef;
  --up: #0ca30c;
  --down: #e66767;
  --wash: rgba(57, 135, 229, 0.14);
  --select-bg: #13233a;
  --select-line: #2b4a70;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300;
  --ref: #898781;
  --s1-t: #3987e5; --s2-t: #da5c2a; --s3-t: #199e70; --s4-t: #c98500; --s5-t: #d65584; --s6-t: #009700;
  --ref-t: #898781;
  --ptr-buy2: #6da7ec; --ptr-buy1: #1c5cab; --ptr-mid: #6f6e69; --ptr-rent1: #a8461f; --ptr-rent2: #f08a5d;
  --shadow: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 15px/1.55 var(--font);
  overflow-x: hidden;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; }
h1 { font-size: 28px; letter-spacing: -0.01em; }
h2 { font-size: 19px; }
h3 { font-size: 15px; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 24px; }
button { font: inherit; color: inherit; }

/* ------------------------------------------------------------ 页头 */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: relative; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 700; font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand-mark { display: block; }
.search { position: relative; flex: 1 1 320px; max-width: 460px; display: flex; }
.search-input {
  width: 100%; height: 40px; padding: 0 44px 0 14px; border: 1px solid var(--axis); border-radius: 10px;
  background: var(--page); color: var(--ink); font: inherit; outline: none;
}
.search-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--wash); }
.search-btn { position: absolute; right: 4px; top: 4px; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; }
.nav { display: flex; align-items: center; gap: 16px; margin-left: auto; white-space: nowrap; }
/* 电脑上页头矮一些：标志上下各约 7 像素（原来 15，用户 2026-10-31 要减半）；页头里的搜索框跟着从 40 改成 34 像素高 */
@media (min-width: 721px) {
  .header-inner { min-height: 45px; }
  .site-header .search-input { height: 34px; }
  .site-header .search-btn { top: 3px; width: 28px; height: 28px; }
}
.nav a { color: var(--ink-2); }
.lang-switch { display: inline-flex; gap: 6px; color: var(--muted); }
.lang-switch a.on { color: var(--ink); font-weight: 600; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 12px; line-height: 18px; text-align: center; }
/* 有学校（大学）待对比时，页头的"对比"变成鼓起来的蓝色按钮，数字白底蓝字（家长的建议：一眼就看到去哪里对比） */
.nav a.nav-compare.has-picks {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 8px 0 14px; border-radius: 17px;
  background: linear-gradient(180deg, #2a78d6, #1c62bd); color: #fff; font-weight: 600;
  box-shadow: 0 2px 6px rgba(28, 98, 189, .35), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.nav a.nav-compare.has-picks:hover { text-decoration: none; filter: brightness(1.08); }
.nav a.nav-compare.has-picks .badge { background: #fff; color: #1c62bd; font-weight: 700; }
/* 按钮右边的箭头（和按钮连成一体，颜色深一点），点开小菜单："全部清空" */
.nav-compare-wrap { position: relative; display: inline-flex; align-items: center; }
.nav-compare-wrap.has-picks a.nav-compare { border-radius: 17px 0 0 17px; padding-right: 9px; }
.nav-compare-more { display: none; }
.nav-compare-wrap.has-picks .nav-compare-more {
  display: inline-flex; align-items: center; justify-content: center; height: 34px; width: 30px; padding: 0; border: 0;
  border-left: 1px solid rgba(255, 255, 255, .35); border-radius: 0 17px 17px 0; background: #1a5bb0; color: #fff; cursor: pointer;
  box-shadow: 0 2px 6px rgba(28, 98, 189, .35);
}
.nav-compare-wrap.has-picks .nav-compare-more:hover, .nav-compare-wrap.has-picks .nav-compare-more[aria-expanded="true"] { filter: brightness(1.1); }
.nav-compare-more svg { transition: transform .15s; }
.nav-compare-more[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-compare-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 180px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}
.nav-compare-menu[hidden] { display: none; }
.nav-compare-menu > button, .nav-compare-menu > a {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 6px;
  background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; white-space: nowrap;
}
.nav-compare-menu > a.cmp-go { color: var(--brand); font-weight: 600; }
.nav-compare-menu > a.cmp-go svg { color: var(--brand); }
.nav-compare-menu > button:hover, .nav-compare-menu > button:focus,
.nav-compare-menu > a:hover, .nav-compare-menu > a:focus { background: var(--wash); outline: none; text-decoration: none; }
.nav-compare-menu > hr { margin: 4px 6px; border: 0; border-top: 1px solid var(--border); }
.nav-compare-menu svg { color: var(--ink-2); flex: none; }
/* 页头"性价比学校"：一个链接，在榜单页上是蓝色 */
.nav-value, .nav-college { color: var(--ink-2); white-space: nowrap; }
.nav-value[aria-current="page"] { color: var(--brand); }
.quick-phone { display: none; }
@media (max-width: 720px) {
  .quick-phone { display: inline-flex; margin-left: auto; font-size: 15px; }
  /* 手机上"大学"也在第一行、跟在"性价比学校"后面：导航那一行放不下（英文、西语会把语言切换挤到第三行） */
  .quick-phone + .quick-phone { margin-left: 14px; }
  .nav .quick-desk { display: none; }
}

.suggest {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
  max-height: 360px; overflow-y: auto; z-index: 30;
}
.suggest li { display: flex; gap: 8px; align-items: baseline; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--wash); }
.suggest .s-label { font-weight: 600; }
.suggest .closure-tag { margin-left: 0; }
.suggest .s-detail { color: var(--muted); font-size: 13px; margin-left: auto; text-align: right; }

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 14px; padding-bottom: 4px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--ink-2); }

/* ------------------------------------------------------------ 首页 */
/* 首页标题：页头分隔线到标题字上沿约 12px（内边距 3 + 行高自带约 9.5），标题字底到搜索框约 14px（外边距 5 + 行高自带约 9） */
.hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: 3px 0 36px; }
.hero h1 { font-size: 34px; max-width: 760px; margin-bottom: 0; }
.hero .lead { font-size: 17px; color: var(--ink-2); max-width: 720px; }
.hero-search { position: relative; display: flex; gap: 8px; max-width: 640px; margin-top: 5px; }
.hero-search .search-input { height: 48px; font-size: 16px; padding-right: 14px; }
.page-home .site-header .search { display: none; }
/* 首页：搜索框到"附近的学校"标题 37px（搜索区下边距 10 + 分隔线 1 + 卡片外边距 8 + 卡片内边距 18） */
.page-home .hero { padding-bottom: 10px; }
.page-home #nearby { margin-top: 8px; }
/* 首页标题和搜索框在左，全国地图的入口（文字 + 小方块地图）在右、上下居中；窄屏放到搜索框下面 */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 32px; align-items: center; }
.hero-grid h1, .hero-grid .hero-search { grid-column: 1; }
.hero-map { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; gap: 14px; text-decoration: none;
  padding: 8px 10px; border-radius: 10px; }
.hero-map:hover, .hero-map:focus-visible { background: var(--wash); }
.hero-map-text { font-size: 17px; font-weight: 600; color: var(--link); }
.hero-map:hover .hero-map-text { text-decoration: underline; }
.mini-map { display: block; width: 190px; height: auto; }
/* 电脑上首页：页头线到标题、标题到搜索框、搜索框到下面的线、卡片上边到"Schools near you"，空白是原来的一半（11 / 14 / 10 / 11 像素，用户 2026-10-31）。
   右边的小地图缩小，不再把这一块撑高（原来左边的标题、搜索框在地图的高度里上下居中，多出空白） */
@media (min-width: 961px) {
  .page-home .hero { padding-top: 2px; }
  .page-home .hero-grid .hero-search { margin-top: 11px; }
  .page-home #nearby { padding-top: 7px; }       /* 卡片上边到"Schools near you"约 11 像素（原来 22） */
  .page-home .hero-map { padding: 4px 10px; }
  .page-home .mini-map { width: 144px; }
}
/* 窄屏（手机、竖着的平板）：搜索框下面一个小入口，小地图在左、文字在右，带边框像个按钮，不单独占一大块。
   960 以下就这样放：不然右边的地图入口把标题和搜索框挤成一窄条（西班牙文的入口文字长，搜索框只剩 96 像素） */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-map { grid-column: 1; grid-row: 3; justify-self: start; margin-top: 12px; gap: 10px; padding: 6px 14px 6px 8px;
    border: 1px solid var(--border); background: var(--page); }
  .hero-map-text { font-size: 15px; }
  .hero-map-text::after { content: " \203A"; }
  .mini-map { order: -1; width: 64px; }
}

.section { margin: 32px 0; }
/* 州页面"找城市"：搜索框和下拉建议（.suggest），宽度和页头的搜索框差不多 */
.city-find h2 label { cursor: text; }
.city-find-box { position: relative; max-width: 460px; }
.city-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.city-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.city-grid a { display: flex; flex-direction: column; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; color: var(--ink); }
.city-grid a:hover { border-color: var(--brand); text-decoration: none; }
.city-grid .muted { font-size: 13px; }

/* ------------------------------------------------------------ 卡片、通用 */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin: 18px 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.card-head p { margin: 0; }
/* 说明后面的 ⓘ：悬停、点一下或键盘聚焦时在标题区下面弹出说明（app.js initInfoTips） */
#zone > .card-head { position: relative; }
/* 治安两格标题后的 ⓘ：黄色（图表的第 4 色，深色模式跟着换），说明弹在格子标题下面 */
#crime .tile-label { position: relative; }
/* 图例、虚线说明、来源三行之间的空白是别处的约 40%（用户 2026-11-11）：行高 1.55→1.2，间距 6→0、10→2 */
#crime .chart .legend { margin-bottom: 0; line-height: 1.2; }
#crime .chart-note { margin-top: 3px; line-height: 1.2; }
#crime .footnote { margin-top: 2px; }
/* 数字后面同一行的小字"（每千名居民 · 共上报 293 起）"：页面紧凑（用户 2026-11-11） */
.tile-unit { margin-left: 8px; font-size: 13px; font-weight: 400; }
/* 手机上两个方块并排太窄，括号里的字会断开：单独一行 */
@media (max-width: 560px) { .tile-unit { display: block; margin: 0; font-size: 12px; } }
#crime .info-btn { color: var(--s4); }
#crime .info-btn:hover, #crime .info-tip.open .info-btn { color: var(--s4-t); }
.info-tip { display: inline; }
.info-btn { display: inline-flex; align-items: center; justify-content: center; vertical-align: -2px; margin-left: 6px; padding: 2px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 50%; }
.info-btn:hover, .info-tip.open .info-btn { color: var(--link); }
.info-btn:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
.info-pop { display: none; position: absolute; left: 0; top: 100%; z-index: 30; max-width: min(560px, 100%); margin-top: 6px; padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.info-tip:hover .info-pop, .info-tip:focus-within .info-pop, .info-tip.open .info-pop { display: block; }
.page-head { margin: 18px 0 8px; }
.page-head .lead { color: var(--ink-2); }
.notice { background: var(--surface-2); border-radius: 8px; padding: 10px 14px; color: var(--ink-2); }
.closure-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; font-size: 0.8em; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.footnote { font-size: 13px; margin-top: 10px; }
.tag { display: inline-block; padding: 0 6px; border-radius: 4px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; line-height: 18px; }
.tag-accent { background: var(--wash); color: var(--link); }
.chips-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-link { padding: 2px 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); font-size: 13px; }
.btn, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--brand); font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn { background: var(--brand); color: #fff; }
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn-ghost { background: transparent; color: var(--link); }
.btn-ghost[aria-pressed="true"] { background: var(--wash); }
.hero-search .btn { height: 48px; }

/* 筛选按钮：一行，放在它所控制的内容上方 */
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 12px; }
/* 列设置：学校列表上方右边一行字"Column set"，点了在下面弹出各列的勾选框（app.js initColumnSet） */
.school-list .filters { position: relative; }
.col-set { margin-left: auto; padding: 4px 2px; border: 0; background: none; color: var(--link); font: inherit; font-size: 14px; cursor: pointer; }
.col-set:hover { text-decoration: underline; }
.col-menu { position: absolute; top: 100%; right: 0; z-index: 30; display: grid; gap: 7px; min-width: 220px; margin-top: 4px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.col-opt { display: flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; cursor: pointer; }
.col-opt input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.col-reset { justify-self: start; margin-top: 2px; padding: 0; border: 0; background: none; color: var(--link); font: inherit; font-size: 13px; cursor: pointer; }
/* 勾掉的列不显示（表格和手机上的卡片都是） */
.school-list.hide-dist .c-dist, .school-list.hide-rating .c-rating, .school-list.hide-math .c-math, .school-list.hide-ela .c-ela,
.school-list.hide-sci .c-sci, .school-list.hide-change .c-change, .school-list.hide-frl .c-frl, .school-list.hide-iep .c-iep,
.school-list.hide-enroll .c-enroll, .school-list.hide-group .c-group, .school-list.hide-growth .c-growth,
.school-list.hide-college .c-college, .school-list.hide-spt .c-spt, .school-list.hide-hv .c-hv, .school-list.hide-rent .c-rent,
.school-list.hide-bully .c-bully, .school-list.hide-susp .c-susp, .school-list.hide-absent .c-absent { display: none !important; }
/* 表格下面的来源：对应的列打开了才显示 */
.school-list.hide-hv.hide-rent .note-housing, .school-list.hide-bully.hide-susp .note-crdc { display: none; }
.chip { height: 30px; padding: 0 12px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); color: var(--ink-2); cursor: pointer; }
.chip:hover { background: var(--wash); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip:disabled { opacity: .4; cursor: default; }
.measure-note { margin: -4px 0 0; font-size: 13px; color: var(--ink-2); max-width: 980px; }   /* 到表头的字约 12 像素（原来 25，用户 2026-10-31 要减半；表头上边距也从 10 改成 5） */
.filters .sep { width: 1px; height: 20px; background: var(--grid); margin: 0 6px; }
/* 学段（全部 / 小学 / 初中 / 高中）：一组分段按钮，浅灰底框 + 大一号的粗体字，一眼看得出是可以点的开关 */
.level-tabs { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--axis); border-radius: 11px; background: var(--surface-2); }
.level-tabs .chip { height: 36px; padding: 0 16px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: 15px; font-weight: 600; white-space: nowrap; }
.level-tabs .chip:hover { background: var(--surface); }
.level-tabs .chip.on { background: var(--ink); color: var(--surface); }
.level-tabs .chip:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
.level-tabs .tab-sep { width: 1px; margin: 6px 4px; background: var(--axis); align-self: stretch; }
/* 学段按钮右边的多选框（特许、天主教……）：放不下换到下一行 */
.tag-picks { display: inline-flex; flex-wrap: wrap; gap: 6px 16px; margin-left: 10px; }
.tag-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; white-space: nowrap; cursor: pointer; }
.tag-pick input { width: 17px; height: 17px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.tag-picks.private-only { display: none; }
.view-private .tag-picks.private-only { display: inline-flex; }
.find-types { margin: 12px 0 4px; }
.find-type-row { display: flex; flex-wrap: wrap; gap: 6px 18px; }
@media (max-width: 720px) {
  .tag-picks { margin-left: 2px; flex-basis: 100%; }
  /* 手机上占满一行、几个平分，排序下拉框换到下一行；放不下时（西语、带"私立"、很窄的手机）横着滑，不撑宽页面 */
  /* 放不下时（西语、带"私立"、卡片里窄一些）换到第二行，不左右滑 */
  .level-tabs { display: flex; flex-wrap: wrap; flex-basis: 100%; max-width: 100%; gap: 0; padding: 2px; }
  /* 字小一号、左右留白少一点：英文、中文的"全部公立 … 私立"五个按钮在手机上排成一行（用户 2026-11-17） */
  .level-tabs .chip { flex: 1 0 auto; height: 34px; padding: 0 4px; font-size: 13px; }
  .level-tabs .tab-sep { margin: 6px 2px; }
  /* 私立学校表：一校一张卡片（学校名一行，下面两列小标题 + 数），不左右滑 */
  .private-table, .private-table tbody { display: block; width: 100%; }
  .private-table thead { display: none; }
  .private-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin: 0 0 10px;
    padding: 12px 14px; border: 1px solid var(--grid); border-radius: 12px; background: var(--surface); }
  .private-table tbody tr[hidden] { display: none; }
  .private-table tbody th, .private-table tbody td { display: block; min-width: 0; padding: 0; border: 0; text-align: left !important; white-space: normal; }
  .private-table tbody th { grid-column: 1 / -1; font-size: 17px; }
  .private-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 11px; color: var(--muted); letter-spacing: .02em; }
  /* 折叠的说明：手机上收起时显示两行（省略号），不是一行 */
  .fold-preview:not(.open):not(.one-line) .fold-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; }
}

/* ------------------------------------------------------------ 学校列表 */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; }
.schools th, .schools td, .data th, .data td { padding: 10px 10px; border-bottom: 1px solid var(--grid); text-align: left; vertical-align: top; }
.schools thead th { padding-top: 5px; }
.schools thead th, .data thead th { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--axis); white-space: nowrap; }
.schools thead th button { border: 0; background: none; padding: 0; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; text-align: inherit; }
.schools thead th[data-sort] button::after { content: "\00a0↕"; color: var(--axis); }   /* 不换行的空格：箭头总跟着最后一个词，不会单独掉到下一行 */
/* 两个词的长表头可以折成两行，列宽由数字决定（升学率、成长加进来后表格才放得下） */
.schools thead th.c-change, .schools thead th.c-group, .schools thead th.c-growth, .schools thead th.c-college { white-space: normal; }
/* 表头最多两行（列名 + 排序箭头）：可排序的列至少 5 个字宽（中文"特殊教育"不会拆成三行），升学率再宽一点（"COLLEGE-GOING RATE"） */
.schools thead th[data-sort] { min-width: 5em; }
.schools thead th.c-college { min-width: 9.5em; }
/* 列表里可以点的数字（升学率 → 学校页 #grad；评分 → 学校页；各科 → #scores；低收入、特殊教育、人数、最多的族裔 → #students）：样子和别的数字一样，鼠标移上去有下划线 */
.cell-link { color: inherit; text-decoration: none; }
.cell-link:hover, .cell-link:focus-visible, .cell-link:hover strong, .cell-link:focus-visible strong { text-decoration: underline; }
.cell-link:hover .rating-pill, .cell-link:focus-visible .rating-pill { box-shadow: 0 0 0 2px var(--link); }
/* 距离列的表头写明从哪里算（"Distance from this school"），分几行放 */
.schools thead th.c-dist { white-space: normal; min-width: 8.5em; max-width: 10em; }
.schools thead th[data-sort] button:hover { color: var(--link); }
.schools thead th[aria-sort] { color: var(--ink); }
.schools thead th[aria-sort] button::after { content: "\00a0↓"; color: var(--ink); }
.schools thead th[aria-sort="ascending"] button::after { content: "\00a0↑"; }
.sort-pick { display: none; margin-left: auto; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; max-width: 100%; font-size: 13px; } /* 放不下时方向按钮换行，手机不左右滑 */
.sort-pick label { display: inline-flex; align-items: center; gap: 6px; }
.sort-dir { height: 30px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; white-space: nowrap; cursor: pointer; }
.sort-pick select { height: 30px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; padding: 0 6px; }
.schools tbody tr:hover { background: var(--wash); }
.c-pick { width: 28px; padding-right: 0 !important; }
/* 勾选框那一列有列名"Compare"，勾之前就知道这一列是干什么的；勾选框居中在列名下面 */
.schools .c-pick { width: auto; padding-right: 6px !important; text-align: center; }
.schools thead th.c-pick { color: var(--ink-2); }
.c-pick input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--brand); }
.c-name { min-width: 200px; }
.school-link { font-weight: 600; }
.c-name .sub { font-size: 13px; margin-top: 2px; }
.c-num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-group { white-space: nowrap; }
/* 总分变化：箭头 + 百分点；方向同时由箭头表示，不只靠颜色。平线是画出来的短横，免得和负号混淆 */
.chg { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chg.up { color: var(--up); }
.chg.down { color: var(--down); }
.chg.flat { color: var(--muted); font-weight: 500; }
.chg.flat .chg-icon { display: inline-block; width: 14px; height: 2px; border-radius: 1px; background: currentColor; }
.c-score { white-space: nowrap; min-width: 104px; }
.score-line { display: flex; align-items: center; gap: 8px; }
.score-line strong { min-width: 38px; font-variant-numeric: tabular-nums; }
.spark { display: block; overflow: visible; width: 56px; height: 18px; }
.spark path { fill: none; stroke: var(--ref); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--s1); stroke: var(--surface); stroke-width: 1.5; }
.vs { font-size: 12px; }
.delta { font-weight: 600; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.empty { padding: 12px; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.pager a, .pager span { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); }
.pager span { background: var(--ink); color: var(--surface); }
/* 浏览器里分页的列表（首页附近学校、邮编、学区页等）：按钮和服务端分页的链接一个样子 */
.pager button { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--link); font: inherit; cursor: pointer; }
.pager button:disabled { opacity: .35; cursor: default; }
.pager span.pager-gap { background: none; color: var(--muted); border: 0; min-width: 16px; }
/* 页码条整体靠右："第 1–10 所，共 244 所 · 每页 [10]" 在页码左边 */
.pager-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 20px; margin: 12px 0 4px; }
.pager-left { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.page-size { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.page-size select { height: 28px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; padding: 0 6px; }
.pager-bottom .pager { margin: 0; }

.letters { columns: 4 200px; column-gap: 24px; }
.letter { break-inside: avoid; margin-bottom: 14px; }
.letter ul { list-style: none; margin: 0; padding: 0; }
.letter li { padding: 1px 0; }
.letter .muted { font-size: 12px; }

.results { list-style: none; margin: 0; padding: 0; }
.results li { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--grid); flex-wrap: wrap; }

/* 对比栏：勾选后贴在页面底部的一条浅蓝色"已选"工具条（和勾上的蓝色勾选框一个颜色），内容和表格左对齐，
   按钮（网站本来的蓝色按钮）紧跟在已选学校后面。试过的：和页面同色、按钮在最右下角——不容易发现；
   深色浮动条——家长说像弹出来的广告，不敢点 */
.compare-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--select-bg); border-top: 1px solid var(--select-line); }
.compare-bar-inner { display: flex; gap: 12px; align-items: center; min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
.compare-info { display: flex; gap: 8px; align-items: baseline; min-width: 0; flex: 0 1 auto; }
.compare-info strong { white-space: nowrap; }
.compare-names { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); max-width: 520px; }
.compare-go { flex: none; }
.compare-clear { flex: none; padding: 0 8px; border-color: transparent; } /* "清空"是文字按钮，不和蓝色按钮抢眼 */
body.has-compare-bar { padding-bottom: 80px; }
@media (max-width: 720px) {
  /* 手机上两行：上面"已选几所"和校名，下面是蓝色按钮和"清空" */
  .compare-bar-inner { flex-wrap: wrap; gap: 8px; }
  .compare-info { flex-basis: 100%; }
  .compare-go { flex: 1 1 auto; }
  body.has-compare-bar { padding-bottom: 110px; }
  .schools .c-pick { padding-left: 0; }
  .schools thead th.c-pick .pick-head { font-size: 10px; letter-spacing: 0; }
}

/* ------------------------------------------------------------ 学校页 */
.school-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; margin: 14px 0 6px; flex-wrap: wrap; }
.school-title h1 { margin-bottom: 6px; }
/* 学校页：面包屑和校名之间的空缩小到原来的一半（面包屑字底到校名字顶约 31px → 15px） */
.page-school .crumbs { padding-bottom: 0; }
.page-school .school-head { margin-top: 2px; }
.school-meta { display: flex; flex-wrap: wrap; gap: 4px 0; color: var(--ink-2); margin: 0 0 2px; }
.school-meta span + span::before { content: "·"; margin: 0 8px; color: var(--muted); }
.school-addr { color: var(--muted); margin: 0; }
/* 手机上校名下面只留一行（学段 · 公立）+ 箭头，学区、划片地图、地址、官网点了再显示，每项一行 */
.meta-toggle { display: none; }
@media (max-width: 720px) {
  .meta-toggle { display: inline-flex; align-items: center; justify-content: center; order: 1; width: 30px; height: 24px; margin-left: 4px;
    padding: 0; border: 0; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); cursor: pointer; }
  .meta-toggle svg { transition: transform .15s; }
  .meta-open .meta-toggle svg { transform: rotate(180deg); }
  .school-meta > .meta-more { order: 2; flex-basis: 100%; }
  .school-meta > .meta-more::before { content: none; }
  .school-head:not(.meta-open) .meta-more { display: none; }
  .meta-open .school-meta { margin-bottom: 0; }
  /* 校名、"学段 · 公立"、对比 / 分享按钮三行之间的空缩小一半（6px → 3px，18px → 9px） */
  .school-title h1 { margin-bottom: 3px; }
  .school-head { row-gap: 7px; }
}
details.years-table { margin-top: 12px; }
details.years-table summary { cursor: pointer; color: var(--link); font-size: 14px; }
details.years-table table { margin-top: 6px; }
details.zip-fold { margin-top: 8px; }
details.zip-fold .chips-line { margin: 8px 0 0; }
.school-addr a { margin-left: 8px; }
.school-web { color: var(--muted); margin: 2px 0 0; overflow-wrap: anywhere; }
/* 每个方框至少 170px：标题（"English (met standard)"）和下面一行（"+2 state 57% · 2025-26"）都放得下一行 */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 16px 0; }
/* 学校页的关键数字有 7–8 个，一行放不下：电脑上排成两行、每行 4 个 */
@media (min-width: 900px) { .tiles.tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.tiles-inline .tile { background: var(--surface-2); border: 0; }
.tile-label { font-size: 13px; color: var(--ink-2); }
.tile-value { font-size: 28px; font-weight: 650; line-height: 1.2; margin: 2px 0; }
.tile-sub { font-size: 12px; }
.table-title { margin-top: 18px; }
.table-note { font-size: 13px; margin: -2px 0 8px; max-width: 760px; }
/* 升学率一列：只看小学 / 初中时隐藏（app.js 在 .school-list 上写 data-level） */
.school-list[data-level="elementary"] .c-college, .school-list[data-level="middle"] .c-college { display: none; }
.school-list[data-level="high"] .c-growth { display: none; }
/* 名字下面那一行只在手机上显示（见 @media） */
.m-extra { display: none; font-size: 13px; margin-top: 2px; }
.pick-wrap { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.pick-text { display: none; }
/* 毕业生去向：比例画成横条；去向、CSU 两张表不拉满整行，数字离名称近一些 */
.data.dest, .data.csu, .data.colleges { max-width: 760px; }
.dest .dest-share { min-width: 180px; white-space: nowrap; }
.dest .bar { display: inline-block; vertical-align: middle; width: 120px; height: 8px; margin-right: 8px; border-radius: 4px; background: var(--grid); overflow: hidden; }
.dest .bar > span { display: block; height: 100%; background: var(--brand); }
.dest .dest-none .bar > span { background: var(--axis); }
.data td strong { margin-right: 6px; font-variant-numeric: tabular-nums; }
.data td .muted { font-size: 12px; }
.data tbody th { font-weight: 600; white-space: nowrap; }

/* 族裔构成：100% 堆叠条，段与段之间留 2px 表面色缝隙 */
.stack { display: flex; gap: 2px; height: 18px; margin: 6px 0 10px; background: var(--surface); }
.stack .seg { display: block; min-width: 2px; }
.stack .seg:first-child { border-radius: 4px 0 0 4px; }
.stack .seg:last-child { border-radius: 0 4px 4px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 0 0 6px; padding: 0; font-size: 13px; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex: none; }
.key.line { width: 14px; height: 2px; border-radius: 1px; }
.r0, .s0 { background: var(--s1); } .r1, .s1 { background: var(--s2); } .r2, .s2 { background: var(--s3); }
.r3, .s3 { background: var(--s4); } .r4, .s4 { background: var(--s5); } .r5, .s5 { background: var(--s6); }
.key.ref { background: var(--ref); }

/* ------------------------------------------------------------ 图表（charts.js） */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px 22px; }
.chart { position: relative; min-width: 0; }
.chart h3 { margin: 4px 0 2px; }
.chart .chart-sub { font-size: 12px; color: var(--muted); margin: 0 0 4px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart .grid line { stroke: var(--grid); stroke-width: 1; }
.chart .axis line { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .gap-label { fill: var(--muted); font-size: 10px; }
.chart .series path { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .series circle { stroke: var(--surface); stroke-width: 2; }
.chart .series.ref path { stroke-width: 1.5; }
.chart .series path.bridge { stroke-width: 1.5; stroke-dasharray: 0.5 5; opacity: .75; }
.chart .gap-band { fill: var(--surface-2); }
.chart .break-line { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 4 3; }
.chart-note { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.key.dotted { width: 16px; height: 0; border-radius: 0; background: none; border-top: 2px dotted var(--ink-2); }
.key.break { width: 0; height: 12px; border-radius: 0; background: none; border-left: 1px dashed var(--ink-2); }
.chart .end-label { fill: var(--ink-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .end-name { font-weight: 600; }
.chart .cross { stroke: var(--axis); stroke-width: 1; }
.chart .bar rect { stroke: none; }
.chart .legend { margin-top: 4px; }
.chart .empty-chart { color: var(--muted); font-size: 13px; padding: 30px 0; text-align: center; border: 1px dashed var(--grid); border-radius: 8px; }
.chart.loading svg { opacity: .45; }
.tip {
  position: absolute; pointer-events: none; z-index: 5; min-width: 140px; padding: 8px 10px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 6px 18px rgba(0,0,0,.14); font-size: 12px;
}
.tip .tip-title { color: var(--muted); margin-bottom: 4px; }
.tip .tip-row { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.tip .tip-row strong { min-width: 34px; color: var(--ink); font-variant-numeric: tabular-nums; }
.tip .tip-row span { color: var(--ink-2); }
details.table-view { margin-top: 6px; font-size: 13px; }
details.table-view summary { cursor: pointer; color: var(--link); }
details.table-view table { margin-top: 6px; }
details.table-view th, details.table-view td { padding: 4px 8px; border-bottom: 1px solid var(--grid); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
details.table-view th:first-child, details.table-view td:first-child { text-align: left; }

/* ------------------------------------------------------------ 对比页 */
.picked { list-style: none; margin: 0 0 3px; padding: 0; display: flex; flex-direction: column; gap: 0; }
.picked li { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; line-height: 18px; }
.picked .remove { margin-left: 2px; width: 18px; height: 18px; padding: 0; border-radius: 9px; border: 1px solid var(--border); background: var(--surface);
  font-size: 12px; line-height: 1; cursor: pointer; }
/* 比较页：卡片之间、页头几行之间的空白都是别的页的一半 */
.page-compare .card { margin: 9px 0; }
.page-compare .page-head { margin: 7px 0 0; }
.page-compare .page-head h1 { margin-bottom: .2em; }
.page-compare .page-head .lead { margin-bottom: 6px; }
.page-compare .page-head + .card { margin-top: 6px; }
.page-compare .picked li:first-child { margin-top: -12px; } /* 白框顶到第一所学校留 6px（用户 2026-11-17：原来 2px 太挤，多加 4px） */
/* 对比表头里私立学校名字下面的"私立" */
.compare-table thead .priv-tag { display: block; font-size: 12px; font-weight: 400; }
.page-compare .picked { margin-bottom: 7px; } /* 最后一所学校到搜索框 7px（用户 2026-11-17：原来 3px，多加 4px） */
.page-compare .picked-actions { margin: 3px 0 -11px; } /* 搜索框到按钮 3px；按钮到白框底留 7px（用户 2026-11-17：多加 5px） */
.page-compare .add-school .search-input { height: 34px; padding: 0 26px 0 8px; } /* 内边距是别处的 60% */
.page-compare .picked-actions .btn-ghost { height: 34px; padding: 0 10px; }
.add-school { position: relative; max-width: 460px; }
.compare-table th:first-child { min-width: 150px; }
.compare-table td, .compare-table thead th { min-width: 150px; }
.compare-table thead th { text-transform: none; font-size: 13px; color: var(--ink); white-space: normal; }
/* 第一列（各项名称）折行，不要撑满手机屏幕把学校 / 大学挤到右边去 */
.compare-table tbody th { white-space: normal; width: 220px; }
/* 升学率后面的"详情"：跳到学校页的大学去向 */
.compare-table .cell-more { margin-left: 8px; font-size: 13px; white-space: nowrap; }
/* 升学率下面的去向几行：缩进、字小一点，看得出是上一行的细分 */
.compare-table .sub-row th { padding-left: 24px; font-weight: 400; font-size: 13px; }
.compare-table .cell-more::after { content: " \203A"; }
#college { scroll-margin-top: 12px; }
/* 点"详情"弹出的"毕业与升学"窗口（app.js initCollegePop）。电脑：浮动、不挡页面，按住标题栏拖动，拖右下角改大小，
   "–"缩成一条标题栏，可以同时开几个 */
.cpop { position: fixed; z-index: 200; display: flex; flex-direction: column; min-width: 340px; min-height: 180px;
  max-width: calc(100vw - 16px); background: var(--surface); color: var(--ink); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0, 0, 0, .3); overflow: hidden; resize: both; }
.cpop.min { height: auto !important; min-height: 0; resize: none; }
.cpop.min .cpop-body { display: none; }
.cpop.dragging { opacity: .92; }
.cpop-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 16px; background: var(--page);
  border-bottom: 1px solid var(--border); cursor: move; touch-action: none; user-select: none; }
.cpop.min .cpop-head { border-bottom: 0; }
.cpop-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.cpop-head h2 > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpop-btn { flex: none; width: 32px; height: 32px; padding: 0; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.cpop-btn:hover { border-color: var(--ink-2); }
.cpop-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 14px 18px 18px; }
.cpop-more { margin: 14px 0 0; }
/* 手机：一次一个，占满屏幕；上面一排学校名，点了切换 */
html.pop-open { overflow: hidden; }
.share-pop.cpop-phone { padding: 8px; align-items: stretch; }
.cpop-phone .cpop { position: static; width: 100%; height: auto; max-height: 100%; min-width: 0; max-width: none; min-height: 0; resize: none; }
.cpop-phone .cpop-head { cursor: default; touch-action: auto; padding-left: 10px; }
.cpop-phone .cpop-body { padding: 12px 14px 16px; }
.cpop-tabs { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.cpop-tabs button { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--border);
  border-radius: 16px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 14px; white-space: nowrap; cursor: pointer; }
.cpop-tabs button[aria-pressed="true"] { border-color: var(--brand); color: var(--ink); font-weight: 600; }
@media (max-width: 720px) {
  .compare-table th:first-child { min-width: 0; width: 120px; }
  .compare-table td, .compare-table thead th { min-width: 120px; }
}

/* ------------------------------------------------------------ 说明页、页脚 */
.prose { max-width: 820px; }
.prose h1 { margin-top: 18px; }
.prose h2 { margin-top: 24px; }
.prose li { margin: 4px 0; }
.site-footer { margin-top: 40px; padding: 24px 0 32px; border-top: 1px solid var(--border); background: var(--surface); font-size: 13px; color: var(--ink-2); }
.footer-title { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 20px; margin: 0 0 20px; padding: 0; list-style: none; }
.state-grid a { color: var(--link); text-decoration: none; }
.state-grid a:hover { text-decoration: underline; }
.footer-sources { margin: 0 0 12px; padding-top: 16px; border-top: 1px solid var(--border); line-height: 1.6; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* 中等宽度（小笔记本）表头放不下一行时才换行 */
@media (max-width: 1200px) {
  .schools thead th { white-space: normal; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  h1, .hero h1 { font-size: 24px; }
  .header-inner { gap: 10px; padding-top: 8px; padding-bottom: 8px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .nav { gap: 10px; flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; } /* 特别窄的手机（320px）放不下时换行 */
  .nav a.nav-compare.has-picks { height: 30px; gap: 4px; padding: 0 5px 0 10px; } /* 西语一行放得下 */
  .nav-compare-wrap.has-picks .nav-compare-more { height: 30px; width: 26px; }
  .c-hide-sm { display: none; }
  .c-score { min-width: 0; }
  .spark { display: none; }
  .vs span:not(.delta) { display: none; } /* 手机上只留 "+38"，表格下方注明是比全州同年级 */
  .sort-pick { display: inline-flex; }
  /* 排序靠左，下拉框窄一点（选中的项太长时显示省略号），"Column set"留在同一行的右边（用户 2026-11-17） */
  .school-list .sort-pick { margin-left: 0; justify-content: flex-start; }
  .school-list .sort-pick select { width: 104px; text-overflow: ellipsis; }
  .school-list .col-set { padding: 4px 0; }
  /* 手机上只放 学校、数学、英语 + 一列：默认低收入；按距离、科学、人数排序时换成那一列（其余列横向滑动可看） */
  .c-dist { display: none; }
  .school-list[data-sorted="dist"] .c-dist, .school-list[data-sorted="sci"] .c-sci,
  .school-list[data-sorted="change"] .c-change, .school-list[data-sorted="enroll"] .c-enroll,
  .school-list[data-sorted="group"] .c-group, .school-list[data-sorted="growth"] .c-growth,
  .school-list[data-sorted="college"] .c-college { display: table-cell; }
  .school-list[data-sorted="dist"] .c-frl, .school-list[data-sorted="sci"] .c-frl,
  .school-list[data-sorted="change"] .c-frl, .school-list[data-sorted="enroll"] .c-frl,
  .school-list[data-sorted="group"] .c-frl, .school-list[data-sorted="growth"] .c-frl,
  .school-list[data-sorted="college"] .c-frl { display: none; }
  /* 名字下面的升学率 / 成长：按这两列排序时那一列已经换出来了，不再重复 */
  .m-extra { display: block; }
  .school-list[data-sorted="growth"] .m-extra, .school-list[data-sorted="college"] .m-extra { display: none; }
  .schools th, .schools td { padding: 9px 5px; }
  .schools thead th { font-size: 11px; letter-spacing: 0; white-space: normal; }
  /* 学校列表在手机上改成一校一张卡片：所有列都显示（每个数字上面写小标题），不用左右滑。
     原来只留数学、英语和"Sort by"选中的一列，别的列看不到（家长反映滑不过去）。大学列表另有自己的手机样式，不动 */
  .school-list:not(.college-list) .table-scroll { overflow: visible; }
  .school-list:not(.college-list) table.schools, .school-list:not(.college-list) .schools tbody { display: block; width: 100%; }
  .school-list:not(.college-list) .schools thead { display: none; }
  .school-list:not(.college-list) .schools tbody tr {
    position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px;
    margin: 0 0 10px; padding: 12px 14px; border: 1px solid var(--grid); border-radius: 12px; background: var(--surface);
  }
  .school-list:not(.college-list) .schools tbody tr[hidden] { display: none; }
  .school-list:not(.college-list) .schools tbody tr:hover { background: var(--surface); }
  .school-list:not(.college-list) .schools td { display: block; min-width: 0; padding: 0; border: 0; text-align: left !important; }
  /* 不适用的格子不放：升学率只有高中有，成长（4–8 年级）高中没有 */
  .school-list:not(.college-list) .schools tr:not([data-levels~="high"]) td.c-college,
  .school-list:not(.college-list) .schools tr[data-levels="high"] td.c-growth { display: none; }
  .school-list:not(.college-list) .schools td.c-name { grid-column: 1 / -1; order: -1; padding-right: 48px; }
  .school-list:not(.college-list) .schools td.c-name .school-link { font-size: 17px; font-weight: 600; }
  .school-list:not(.college-list) .schools td.c-rating { position: absolute; top: 12px; right: 14px; width: auto; } /* 表格里是 width: 1%，卡片里要自己的宽度，不然圆标冒出卡片 */
  .school-list:not(.college-list) .schools td.c-pick { grid-column: 1 / -1; order: 99; width: auto; padding-top: 2px; }
  .school-list:not(.college-list) .pick-text { display: inline; font-size: 14px; color: var(--ink-2); }
  .school-list:not(.college-list) .schools td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 2px; font-size: 11px; color: var(--muted); letter-spacing: .02em;
  }
  .school-list:not(.college-list) .schools td .vs { font-size: 12px; white-space: normal; } /* 西语"por encima de lo esperado"折行，不撑宽卡片 */
  .school-list:not(.college-list) .schools td .vs span:not(.delta) { display: inline; } /* 卡片里放得下"vs state"，写明 +38 是比全州 */
  .school-list:not(.college-list) .m-extra { display: none; }
  .school-list:not(.college-list)[data-level="elementary"] .schools td.c-college,
  .school-list:not(.college-list)[data-level="middle"] .schools td.c-college,
  .school-list:not(.college-list)[data-level="high"] .schools td.c-growth { display: none; }
  /* UC / CSU 各校区：四列在手机上放得下，不用横向滑动才看到"入学" */
  .data.csu th, .data.csu td { padding: 9px 6px; }
  .data.csu thead th { font-size: 11px; letter-spacing: 0; }
  .data.csu tbody th { white-space: normal; } /* "San Luis Obispo" 这类长校区名折行 */
  /* 毕业生去向：去向名称折行，比例条去掉只留百分数，四列都放得下 */
  .data.dest th, .data.dest td { padding: 9px 6px; }
  .data.dest thead th { font-size: 11px; letter-spacing: 0; white-space: normal; }
  .data.dest tbody th { white-space: normal; }
  .data.colleges th, .data.colleges td { padding: 9px 6px; }
  .data.colleges thead th { font-size: 11px; letter-spacing: 0; white-space: normal; }
  .data.colleges tbody th { white-space: normal; } /* 长校名折行 */
  .dest .dest-share { min-width: 0; }
  .dest .bar { display: none; }
  .c-name { min-width: 120px; }
  .c-pick { width: 22px; }
  .card { padding: 14px; border-radius: 10px; }
  .tile-value { font-size: 24px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* 小屏手机（375px）也是一行两个 */
  .tiles .tile { padding: 10px; } /* 窄一点的边距，375px 宽的手机上 "English (met standard)" 也是一行 */
  .hero { padding: 2px 0 24px; }
  .page-home .hero { padding-bottom: 10px; }
  .hero-search .btn { padding: 0 14px; }
}
/* 对比页：已选学校下面的"全部清空" */
.picked-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; }
.refresh-done { color: var(--up); font-weight: 600; }
/* 学生成长等级：文字为主，前面一个小圆点表示高低（颜色不单独表达含义） */
.level { white-space: nowrap; }
.level::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 4px; margin-right: 6px; vertical-align: 1px; background: var(--axis); }
.level-4::before, .level-5::before { background: var(--s1); }
.level-1::before, .level-2::before { background: var(--s2); }
.data.growth { max-width: 760px; }
/* 出勤只有一张数字卡片：不拉满整行 */

/* 和相似学校比：每科一句；附近成绩更好的相似学校 */
.peers-list { list-style: none; padding: 0; margin: 8px 0 4px; }
.peers-list li { padding: 4px 0; }
.peers-better-title { margin: 14px 0 4px; font-weight: 600; }
.peers-better { list-style: none; padding: 0; margin: 0 0 8px; }
/* 分数圆一列，校名和距离、成绩一列：手机上折行时第二行和校名对齐 */
.peers-better li { padding: 4px 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 8px; }
.peers-better li .muted { margin-left: 6px; }
.peers-better .rating-pill { font-size: 13px; }
.peers-better .rating-pill.none { visibility: hidden; }

/* 和其他州比（NAEP）：加进来的州（带图例颜色的小圆点）、前 5 名按钮 */
.naep-compare .filters { margin: 4px 0 8px; }
.naep-compare select { height: 30px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); color: var(--ink-2); padding: 0 10px; font: inherit; }
.naep-chip { display: inline-flex; align-items: center; gap: 6px; }
.naep-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.naep-picked { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.naep-self { cursor: default; }

/* ------------------------------------------------------------ 分享 */
.title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.title-row h1 { margin-right: auto; }
.head-actions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.share { position: relative; flex: none; }
.btn-share { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn-share.done { color: var(--up); }
.share-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 190px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, .14); }
.share-menu[hidden], .share-menu > [hidden] { display: none; }
.share-menu > a, .share-menu > button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 6px;
  background: none; color: var(--ink); font: inherit; text-decoration: none; cursor: pointer; }
.share-menu > a:hover, .share-menu > button:hover, .share-menu > a:focus, .share-menu > button:focus { background: var(--wash); outline: none; }
.share-menu > [data-via="copy"] { font-weight: 600; }
.share-text { display: block; width: 100%; max-width: 760px; box-sizing: border-box; padding: 10px 12px; font: inherit; line-height: 1.5;
  color: var(--ink); background: var(--page); border: 1px solid var(--border); border-radius: 8px; resize: vertical; }
.share-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }
/* 微信二维码、微信里的提示：盖在页面上的一层 */
.share-pop { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(0, 0, 0, .55); }
.share-pop-box { max-width: 340px; padding: 20px; text-align: center; background: var(--surface); color: var(--ink);
  border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0, 0, 0, .3); }
.share-pop-box p { margin: 12px 0 16px; line-height: 1.5; }
.share-qr .qr svg { display: block; width: 220px; height: 220px; margin: 0 auto; background: #fff; border-radius: 6px; }
.share-wechat { align-items: flex-start; justify-content: flex-end; background: rgba(0, 0, 0, .86); }
.share-wechat .share-pop-box { background: none; box-shadow: none; color: #fff; text-align: right; padding: 4px 4px 0; }
.share-wechat .tip-arrow { font-size: 52px; line-height: 1; margin-right: 6px; }
.share-wechat .tip-text { font-size: 18px; font-weight: 600; white-space: pre-line; }
.share-wechat .btn { margin-right: 8px; }
.share-wechat .share-pop-close { color: #fff; border-color: rgba(255, 255, 255, .6); }

/* ------------------------------------------------------------ 全国地图（方块地图） */
/* 同一色系（蓝绿）越深越好：不用红蓝（美国人会读成两党的选举地图）。文字对比度已用 validate_palette.js 的 contrast 校验：
   浅色模式 1–3 档深字、4–5 档白字；深色模式反过来（低分接近背景、高分亮），1–3 档浅字、4–5 档深字 */
:root {
  --q1: #d5f2e7; --q2: #9fdfc6; --q3: #5fc39f; --q4: #1d7f5c; --q5: #0e5a40;
  --q-ink-lo: #0b0b0b; --q-ink-hi: #ffffff;
  --smap-none: #a8a79f; --smap-ring: #ffffff;
  /* 1–10 分（两分一档）：像 GreatSchools，低分红、中间黄、高分绿（深红 / 橙 / 金黄 / 绿 / 深绿）。两头深、中间浅，
     色盲的人靠深浅也分得开：validate_palette.js 相邻两档的色盲、正常视力区分都通过（黄色本身浅，圆标里有数字、
     地图有图例）。圆标里的字按对比度选：1、5 档白字，2–4 档深字 */
  --r1: #a3201a; --r2: #e2602a; --r3: #ebc22a; --r4: #3f9d6a; --r5: #0f6b3a;
  --r-ink-1: #ffffff; --r-ink-2: #0b0b0b; --r-ink-3: #0b0b0b; --r-ink-4: #0b0b0b; --r-ink-5: #ffffff;
  /* 全国地图的其他几栏：低收入 / 族裔用蓝色（--p1…--p5，越深越多）；变化用双色（--d1 跌得多……--d3 差不多（灰）……--d5 涨得多）。
     validate_palette.js：蓝色 --ordinal 通过，双色相邻两档的色盲、正常视力区分都通过；字的颜色按对比度选 */
  --p1: #8db6e8; --p2: #6aa0dc; --p3: #3f7fcb; --p4: #2460ad; --p5: #12386f;
  --p-ink-1: #0b0b0b; --p-ink-2: #0b0b0b; --p-ink-3: #0b0b0b; --p-ink-4: #ffffff; --p-ink-5: #ffffff;
  --d1: #b7410e; --d2: #ec9a6a; --d3: #d9d8d2; --d4: #5fc39f; --d5: #1d7f5c;
  --d-ink-1: #ffffff; --d-ink-2: #0b0b0b; --d-ink-3: #0b0b0b; --d-ink-4: #0b0b0b; --d-ink-5: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --q1: #133a2d; --q2: #1a5a43; --q3: #1f7353; --q4: #46b88e; --q5: #93e2c3;
    --q-ink-lo: #f0efec; --q-ink-hi: #0b0b0b;
    --smap-none: #5c5b56; --smap-ring: #0c0c0c;
    --r1: #ea4f45; --r2: #f39a48; --r3: #f5d965; --r4: #4ac58a; --r5: #1b7f48;
    --r-ink-1: #0b0b0b; --r-ink-2: #0b0b0b; --r-ink-3: #0b0b0b; --r-ink-4: #0b0b0b; --r-ink-5: #ffffff;
    --p1: #2f5688; --p2: #3b6ba8; --p3: #5a90cf; --p4: #8cbaec; --p5: #bcd8f6;
    --p-ink-1: #ffffff; --p-ink-2: #ffffff; --p-ink-3: #0b0b0b; --p-ink-4: #0b0b0b; --p-ink-5: #0b0b0b;
    --d1: #f0955a; --d2: #a0552a; --d3: #3f3f3c; --d4: #2f9a72; --d5: #8de3bf;
    --d-ink-1: #0b0b0b; --d-ink-2: #ffffff; --d-ink-3: #ffffff; --d-ink-4: #0b0b0b; --d-ink-5: #0b0b0b;
  }
  :root:not([data-theme="light"]) .on-light { display: none; }
  :root:not([data-theme="light"]) .on-dark { display: inline; }
}
:root[data-theme="dark"] {
  --q1: #133a2d; --q2: #1a5a43; --q3: #1f7353; --q4: #46b88e; --q5: #93e2c3;
  --q-ink-lo: #f0efec; --q-ink-hi: #0b0b0b;
  --smap-none: #5c5b56; --smap-ring: #0c0c0c;
  --r1: #ea4f45; --r2: #f39a48; --r3: #f5d965; --r4: #4ac58a; --r5: #1b7f48;
  --r-ink-1: #0b0b0b; --r-ink-2: #0b0b0b; --r-ink-3: #0b0b0b; --r-ink-4: #0b0b0b; --r-ink-5: #ffffff;
  --p1: #2f5688; --p2: #3b6ba8; --p3: #5a90cf; --p4: #8cbaec; --p5: #bcd8f6;
  --p-ink-1: #ffffff; --p-ink-2: #ffffff; --p-ink-3: #0b0b0b; --p-ink-4: #0b0b0b; --p-ink-5: #0b0b0b;
  --d1: #f0955a; --d2: #a0552a; --d3: #3f3f3c; --d4: #2f9a72; --d5: #8de3bf;
  --d-ink-1: #0b0b0b; --d-ink-2: #ffffff; --d-ink-3: #ffffff; --d-ink-4: #0b0b0b; --d-ink-5: #0b0b0b;
}
/* 颜色说明跟着主题：浅色“越深越好”，深色“越亮越好” */
.on-dark { display: none; }
:root[data-theme="dark"] .on-light { display: none; }
:root[data-theme="dark"] .on-dark { display: inline; }
.map-filters { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 10px; }
.map-filters label { display: inline-flex; align-items: center; gap: 6px; }
.map-filters select { font: inherit; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); }
.map-nation { margin: 4px 0 12px; font-weight: 600; }
.tilemap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 4px; max-width: 760px; margin: 0 auto; }
/* 只在方块地图里：学校页的"关键数字"也叫 .tile */
.tilemap .tile { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
  text-decoration: none; line-height: 1.1; min-width: 0; }
.tilemap .tile:hover, .tilemap .tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.tilemap .t-abbr { font-size: clamp(9px, 1.9vw, 13px); font-weight: 600; }
.tilemap .t-val { font-size: clamp(9px, 2.1vw, 15px); font-variant-numeric: tabular-nums; }
.tilemap .tile.b1, .swatch.b1 { background: var(--q1); color: var(--q-ink-lo); }
.tilemap .tile.b2, .swatch.b2 { background: var(--q2); color: var(--q-ink-lo); }
.tilemap .tile.b3, .swatch.b3 { background: var(--q3); color: var(--q-ink-lo); }
.tilemap .tile.b4, .swatch.b4 { background: var(--q4); color: var(--q-ink-hi); }
.tilemap .tile.b5, .swatch.b5 { background: var(--q5); color: var(--q-ink-hi); }
/* 颜色按栏（main 上的 sch-q / sch-d / sch-p，见 map.html） */
.sch-p .tilemap .tile.b1, .sch-p .swatch.b1 { background: var(--p1); color: var(--p-ink-1); }
.sch-p .tilemap .tile.b2, .sch-p .swatch.b2 { background: var(--p2); color: var(--p-ink-2); }
.sch-p .tilemap .tile.b3, .sch-p .swatch.b3 { background: var(--p3); color: var(--p-ink-3); }
.sch-p .tilemap .tile.b4, .sch-p .swatch.b4 { background: var(--p4); color: var(--p-ink-4); }
.sch-p .tilemap .tile.b5, .sch-p .swatch.b5 { background: var(--p5); color: var(--p-ink-5); }
.sch-d .tilemap .tile.b1, .sch-d .swatch.b1 { background: var(--d1); color: var(--d-ink-1); }
.sch-d .tilemap .tile.b2, .sch-d .swatch.b2 { background: var(--d2); color: var(--d-ink-2); }
.sch-d .tilemap .tile.b3, .sch-d .swatch.b3 { background: var(--d3); color: var(--d-ink-3); }
.sch-d .tilemap .tile.b4, .sch-d .swatch.b4 { background: var(--d4); color: var(--d-ink-4); }
.sch-d .tilemap .tile.b5, .sch-d .swatch.b5 { background: var(--d5); color: var(--d-ink-5); }
.map-tabs { margin-bottom: 8px; }
.map-sub { margin: 0 0 10px; font-size: 14px; }
.map-legend { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; margin-top: 14px; font-size: 13px; }
.legend-steps { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; }
.legend-step { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.legend-step[hidden] { display: none; }
.swatch { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--border); display: inline-block; }
.swatch.none { background: var(--smap-none); width: 10px; height: 10px; border-radius: 50%; }
.map-click { margin: 10px 0 0; font-size: 13px; text-align: center; }
.rank-list { margin: 0; padding: 0; list-style: none; counter-reset: rank; columns: 2 300px; column-gap: 32px; }
.rank-list li { break-inside: avoid; display: flex; align-items: center; gap: 10px; padding: 3px 0; font-variant-numeric: tabular-nums; }
.rank-list li::before { counter-increment: rank; content: counter(rank); flex: 0 0 1.6em; text-align: right; color: var(--muted); font-size: 13px; }
.rank-list li a { flex: 0 0 9.5em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar { position: relative; flex: 1 1 auto; height: 8px; border-radius: 4px; background: var(--grid); min-width: 40px; }
.rank-bar > span { display: block; height: 100%; background: var(--q4); border-radius: 4px; }
.rank-list li strong { flex: 0 0 3em; text-align: right; }
/* 全国平均：灰色（全站的参照色 --ref）一行，不编号；每个州横条上的竖线 */
.rank-list li.rank-us { margin: 2px -8px; padding: 4px 8px; border-radius: 6px; background: var(--surface-2); font-weight: 650; }
.rank-list li.rank-us::before { counter-increment: none; content: ""; }
.rank-us-name { flex: 0 0 9.5em; }
.rank-us .rank-bar > span { background: var(--ref); }
.rank-bar .us-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ref); }
.sch-p .rank-bar > span { background: var(--p4); }
/* 变化：横条从中间往两边，涨绿、跌橙，中间一条细线 */
.sch-d .rank-bar::before { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--axis); }
.sch-d .rank-bar > span { position: absolute; top: 0; bottom: 0; background: var(--d5); }
.sch-d .rank-bar > span.neg { background: var(--d1); }
.sch-d .rank-us .rank-bar > span, .sch-d .rank-us .rank-bar > span.neg { background: var(--ref); }

/* 同一划片的学校：每级一列（电脑上并排），每所一行：评分、校名和年级、"整个 / 大部分 / 部分片区" */
.zone-notice { margin: 0 0 14px; font-size: 14px; }
.retakes-note { margin: 0 0 14px; }
.zone-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 8px 32px; }
.zone-group h3 { font-size: 15px; margin: 4px 0 4px; }
.zone-list { list-style: none; margin: 0; padding: 0; }
/* 评分固定一列（"10" 比个位数宽，校名照样对齐） */
.zone-list li { display: grid; grid-template-columns: 2.4em minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--grid); }
.zone-list .rating-pill { justify-self: start; }
.zone-list .rating-pill.none { visibility: hidden; }
.zone-name { min-width: 0; display: flex; flex-direction: column; }
.zone-name .muted { font-size: 13px; }
.zone-share { max-width: 12em; font-size: 13px; color: var(--ink-2); text-align: right; }
/* 按住址找学校（/address）：小学、初中、高中各一段 */
.address-level + .address-level { margin-top: 20px; }
.address-level h2 { font-size: 17px; margin: 0 0 2px; }
.address-sub { font-size: 14px; margin: 10px 0 0; }
.address-line { font-size: 14px; margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); }
.address-find p { margin: 0 0 8px; }
.address-choices { list-style: none; padding: 0; margin: 4px 0 0; }
.address-choices li { padding: 10px 0; border-top: 1px solid var(--border); }
.address-choices li:first-child { border-top: 0; }
.bmap-pin { display: inline-block; width: 10px; height: 14px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--ink); margin: 0 4px; }

/* ------------------------------------------------------------ 1–10 分（见 Ratings） */
/* 圆标的颜色和州学校地图上的点一样：--r1…--r5（1–2 分红……5–6 分黄……9–10 分绿） */
.rating-pill.r1, .swatch.r1 { background: var(--r1); color: var(--r-ink-1); }
.rating-pill.r2, .swatch.r2 { background: var(--r2); color: var(--r-ink-2); }
.rating-pill.r3, .swatch.r3 { background: var(--r3); color: var(--r-ink-3); }
.rating-pill.r4, .swatch.r4 { background: var(--r4); color: var(--r-ink-4); }
.rating-pill.r5, .swatch.r5 { background: var(--r5); color: var(--r-ink-5); }
.rating-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 1.75em; height: 1.75em;
  padding: 0 .35em; border-radius: 999px; font-weight: 700; font-size: 14px; line-height: 1; font-variant-numeric: tabular-nums;
  border: 1px solid var(--border); }
.rating-of { color: var(--muted); font-size: 13px; font-weight: 600; margin-left: 3px; }
.tile-rating .tile-value { display: flex; align-items: center; }
.tile-rating .rating-pill { font-size: 20px; }
.c-rating { width: 1%; white-space: nowrap; }
.sub .lea-link { color: var(--link); }
.rating-why { font-size: 13px; margin-top: 4px; }

/* ------------------------------------------------------------ 州学校地图（/map/tx） */
.smap-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.smap-count { margin-left: auto; font-size: 13px; }
.smap { position: relative; height: min(70vh, 640px); min-height: 360px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-2); }
.smap-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; padding: 16px; text-align: center; }
.smap-links { margin: 14px 0 0; }

/* ------------------------------------------------------------ 划片地图（/school/…/boundary） */
/* 划片：品牌蓝涂色 + 描边（app.js initBoundaryMap 读 --brand） */
.bmap { height: min(65vh, 600px); }
.swatch.bmap-area { background: color-mix(in srgb, var(--brand) 22%, transparent); border: 2px solid var(--brand); }
/* 学校：圆里是 1–10 分（.rating-pill 的颜色），没有评分的是灰色小点；本校大一号、两层圈（里浅外深），名字一直显示 */
.bmap-pin-wrap { position: relative; cursor: pointer; line-height: 0; }
.bmap-pin-wrap:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 999px; }
.bmap-pin { font-size: 11px; border: 0; box-shadow: 0 0 0 1.5px var(--smap-ring), 0 1px 3px rgba(0, 0, 0, 0.35); }
.bmap-pin.none { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--smap-none); }
.bmap-pin.none-me { background: var(--smap-none); color: var(--ink); }
.bmap-pin-wrap.me .bmap-pin { font-size: 17px; box-shadow: 0 0 0 2.5px var(--page), 0 0 0 5.5px var(--ink), 0 2px 8px rgba(0, 0, 0, 0.4); }
.bmap-label { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); white-space: nowrap;
  font: 650 13px/1.3 var(--font); color: var(--ink); background: var(--surface); padding: 2px 7px; border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); pointer-events: none; }
.swatch.bmap-school { width: 14px; height: 14px; border-radius: 50%; border: 0; background: var(--surface);
  box-shadow: 0 0 0 2px var(--page), 0 0 0 4px var(--ink); margin: 0 3px; }
.bmap-ramp { gap: 2px; flex-wrap: nowrap; flex: none; }
.bmap-ramp .swatch { width: 10px; height: 10px; border-radius: 50%; }
.bmap-scores { margin-top: 6px; font-variant-numeric: tabular-nums; }
.bmap-met { font-size: 12px; }
.page-boundary .zone-notice { margin-bottom: 12px; }
.smap-pop { font: 14px/1.4 var(--font); color: #0b0b0b; min-width: 160px; }
.smap-pop .smap-name { display: block; font-weight: 650; margin-bottom: 2px; }
.smap-pop .muted { color: #5f5e59; font-size: 13px; }
.smap-pop .smap-rating { margin-top: 6px; display: flex; align-items: center; }
.smap-pop .smap-rating .muted { font-size: 13px; }
.smap-pop .smap-open { display: inline-block; margin-top: 8px; font-weight: 600; }
.smap-pop .smap-metric { margin-top: 4px; font-size: 13px; }
.smap-group { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; }
.smap-group select { font: inherit; padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); }
.smap-pop a { color: #1c5cab; }
.smap .maplibregl-popup-content { border-radius: 10px; padding: 10px 12px; box-shadow: 0 2px 12px rgba(0, 0, 0, .18); }
.smap .maplibregl-popup-close-button { font-size: 18px; width: 28px; height: 28px; }

/* ------------------------------------------------------------ 大学（college.html、colleges.html） */
/* 关键数字里是字（"Open"、"Not used"）而不是数时小一号 */
.tile-value.tile-word { font-size: 22px; }
/* 国际学生不是一个族裔：用参照灰色，和族裔的 6 个颜色分开 */
.stack .rx, .key.rx { background: var(--ref); }
.source { font-size: 13px; margin: 18px 0 8px; }
.college-list .source { margin-top: 12px; }
/* 各专业收入：表头可点排序（和学校列表一样的箭头） */
.data.majors { max-width: 860px; }
.data.majors tbody th { white-space: normal; font-weight: 500; }
.data.majors .sub { display: block; font-size: 12px; font-weight: 400; }
.data.majors td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.data.majors thead th button { border: 0; background: none; padding: 0; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; text-align: inherit; }
.data.majors thead th button::after { content: " ↕"; color: var(--axis); }
.data.majors thead th button:hover { color: var(--link); }
.data.majors thead th[aria-sort] { color: var(--ink); }
.data.majors thead th[aria-sort] button::after { content: " ↓"; color: var(--ink); }
.data.majors thead th[aria-sort="ascending"] button::after { content: " ↑"; }
.data.majors thead th.c-num { text-align: right; }
.majors-more { margin-top: 8px; }
.data.income { max-width: 520px; }
.income-block .table-title { margin-top: 0; }   /* 按收入的表和学费图并排：标题和图标题对齐 */
.income-none { margin: 14px 0 0; }   /* 各收入段人都太少时的一句话 */
.colleges-table td.c-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.colleges-table thead th { white-space: normal; }
/* 大学列表第二列：综合排名（本站自己算的）。列尽量窄；两年制的名次下面小字标"两年制" */
.colleges-table .c-rank { width: 1%; padding-left: 4px; padding-right: 10px; }
/* 大学页排名表下面一条"世界科研排名"（莱顿排名开放版）：全球名次、美国名次并排，手机上折行 */
.rank-world { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 22px; margin: 12px 0 2px; padding: 10px 12px;
  border-radius: 8px; background: var(--surface-2); }
.rank-world-title { font-weight: 600; }
/* 排名说明：默认收起（用户 2026-11-11） */
details.note-fold { margin-top: 10px; }
details.note-fold > summary { cursor: pointer; color: var(--link); font-size: 13px; width: fit-content; }
details.note-fold > .footnote:first-of-type { margin-top: 6px; }
details.measure-fold { margin: -4px 0 0; }   /* 大学列表表格上面的各列说明（默认收起，用户 2026-11-12） */
details.measure-fold > .measure-note { margin: 4px 0 0; }
/* 大学页排名表第一行"综合排名"：和下面的分项隔开一点 */
.data.ranks tr.rank-overall th, .data.ranks tr.rank-overall td { background: var(--surface-2); }
@media (max-width: 720px) {
  /* 手机上：大学、录取率、实际费用、毕业率；按 SAT / 收入 / 人数排序时把毕业率换成那一列。
     综合排名不占一列（表格本来就比屏幕宽），写在校名下面那行小字里（.m-extra） */
  .colleges-table .c-rank { display: none; }
  .college-list[data-sorted="sat"] .c-sat, .college-list[data-sorted="earn"] .c-earn,
  .college-list[data-sorted="students"] .c-stu { display: table-cell; }
  .college-list[data-sorted="sat"] .c-grad, .college-list[data-sorted="earn"] .c-grad,
  .college-list[data-sorted="students"] .c-grad { display: none; }
  .data.majors th, .data.majors td { padding: 9px 6px; }
  .data.majors thead th { font-size: 11px; letter-spacing: 0; white-space: normal; }
}
/* 大学页"学生最多来自哪些高中"：高中名下面一行城市 */
.data.feeders .sub { display: block; font-size: 12px; font-weight: 400; }
.data.feeders tbody th { white-space: normal; }

/* 大学列表的类型勾选框：样子和筛选按钮一样，勾上的深色边框 */
.chip.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.chip.check input { margin: 0; width: 15px; height: 15px; accent-color: var(--ink); cursor: pointer; }
.chip.check:has(input:checked) { border-color: var(--ink); }
.chip.check:has(input:focus-visible) { outline: 2px solid var(--link); outline-offset: 2px; }

/* 大学列表的筛选框（CollegeFilter）：整个框一套 4 列的格子（用户 2026-11-12 嫌参差不齐）——
   第一行：常用的三项 + 按钮；"高级搜索"展开后下面用同一套列（subgrid），上下对齐；专业占两格，
   全美页面 7 项正好两整行。第 4 列至少放得下按钮一行（西班牙文的"Búsqueda avanzada"长）。
   窄屏（≤900）两列：学费、按钮各占一整行，高级里落单的最后一项也占一整行。样子和学校筛选的下拉框一样 */
.college-filter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(max-content, 1fr); align-items: end;
  gap: 12px 14px; padding: 14px 18px; margin: 14px 0 4px; }
.cf-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cf-adv { display: none; grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-columns: subgrid;
  align-items: end; gap: 12px 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.college-filter.cf-open .cf-adv { display: grid; }
.cf-wide { grid-column: span 2; }
.cf-more { padding: 0; border: 0; background: none; color: var(--link); font: inherit; cursor: pointer; white-space: nowrap; }
.cf-more::after { content: " \25BE"; }
.college-filter.cf-open .cf-more::after { content: " \25B4"; }
.cf-label { font-weight: 600; font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.college-filter select { width: 100%; min-width: 0; height: 38px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.cf-actions { display: flex; align-items: center; gap: 6px 14px; min-height: 38px; }
.cf-auto .cf-actions .btn { display: none; }   /* 有 JS：选了就搜，不要"搜索"按钮 */
.cf-result { margin: 8px 0 0; color: var(--ink-2); }
@media (max-width: 900px) {
  .college-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cf-adv { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: subgrid; }
  .cf-wide, .cf-tuition, .cf-actions, .cf-adv > .cf-field:last-child:nth-child(even) { grid-column: 1 / -1; }
  .cf-actions { flex-wrap: wrap; }
}
/* 大学列表页上面一块（面包屑、标题、说明、筛选框）的间距是别处的一半（用户 2026-11-11）：
   面包屑→标题 18→9、标题→说明 11→6、说明→筛选框 14→7、筛选框上下内边距 14→7、行距 12→6、标签→下拉框 5→3 */
.colleges-page .page-head { margin-top: 4px; }   /* 面包屑→标题：再缩到 60%（13→8，用户 2026-11-11） */
.colleges-page .page-head h1 { margin-bottom: 6px; }
.colleges-page .page-head .lead { margin-bottom: 7px; }
.colleges-page .college-filter { margin-top: 7px; padding-top: 7px; padding-bottom: 7px; row-gap: 6px; }
.colleges-page .cf-adv { row-gap: 6px; padding-top: 6px; }
.colleges-page .cf-field { gap: 3px; }
.colleges-page .cf-result { margin-top: 4px; }
.colleges-page .page-head + .section { margin-top: 16px; }   /* 筛选框到"各州的大学" 32→16 */
/* 大学页"排名"：项目下面一行小字写"最低的排第 1"；名次不折行。手机上不放"本校"一列（上面的数字卡片里有） */
.data.ranks td { white-space: nowrap; }
.data.ranks tbody th { white-space: normal; }
@media (max-width: 560px) {
  .data.ranks th:nth-child(2), .data.ranks td:nth-child(2) { display: none; }
  .data.ranks th, .data.ranks td { padding-left: 6px; padding-right: 6px; }
}
@media (max-width: 560px) {
  .college-filter { gap: 10px; padding: 12px 14px; }
  .cf-adv { gap: 10px; }
}

/* 学校页"课程与校园"（CRDC） */
.crdc-line { margin: 4px 0 0; }
.crdc-line .muted { margin-left: 6px; }
.crdc-notes { padding-left: 18px; margin-bottom: 0; }
.crdc-notes li { margin: 3px 0; }
/* 这一块各行之间的间距是别处的 60%（用户 2026-11-11）：方块上下 16→10、小标题上方 18→11、标题下 10→6、说明上方 10→6 */
#climate > .card-head { margin-bottom: 6px; }
#climate .tiles { margin: 10px 0; }
#climate .table-title { margin-top: 11px; }
#climate .footnote { margin-top: 6px; }
/* 一行最多三个方块：只有一两项时不会拉满整行 */
@media (min-width: 721px) { #climate .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* 本校、全州对比竖线（fragments :: cmpScale，位置见 Fmt.scale）：竖线从下到上越来越深；本校蓝点、全州灰横杠，
   和成绩图里学校、全州的颜色一样；不用红绿表示好坏。标签在右边，斜引线连到点上 */
.vscale { position: relative; margin: 8px 0 2px; font-size: 13px; }
.vs-line { position: absolute; left: 3px; top: 10px; bottom: 10px; width: 10px; border-radius: 5px;
  background: linear-gradient(to top, var(--grid), color-mix(in srgb, var(--s1) 45%, var(--grid))); }
.vs-dot { position: absolute; left: 8px; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: var(--s1); box-shadow: 0 0 0 2px var(--surface-2); }
.vs-tick { position: absolute; left: 8px; width: 28px; height: 3px; margin: -1.5px 0 0 -14px; border-radius: 2px; background: var(--ref); }
.vs-leads { position: absolute; left: 14px; top: 0; overflow: visible; }
.vs-leads line { stroke-width: 1; }
.vs-lead-school { stroke: var(--s1); }
.vs-lead-state { stroke: var(--ref); }
.vs-lab { position: absolute; left: 40px; transform: translateY(-50%); white-space: nowrap; line-height: 16px; }
.vs-k { color: var(--ink-2); font-size: 12px; }
.vs-lab b { font-weight: 650; font-variant-numeric: tabular-nums; }
.vs-lab-school b { color: var(--s1-t); }
.vs-lab-state b { color: var(--ink-2); }
/* 电脑上竖线放在大数字右边（方块够宽），不加高方块；手机上方块窄，竖线在数字下面 */
@media (min-width: 721px) {
  #climate .tile:has(> .vscale) { display: grid; grid-template-columns: minmax(0, 1fr) 140px; grid-template-rows: auto auto auto 1fr; column-gap: 12px; }
  #climate .tile:has(> .vscale) > * { grid-column: 1; }
  #climate .tile:has(> .vscale) > .vscale { grid-column: 2; grid-row: 1 / span 4; margin: 0; }
}
/* 手机上距离、成绩另起一行，和校名对齐 */
@media (max-width: 720px) { .peers-better li .peers-better-name .muted { display: block; margin-left: 0; } }

/* 学校页、大学页每一块的"收起 / 展开"（app.js initCollapsible）：按钮在标题行右上角，字加粗、颜色深一些，不容易被忽略；收起时只留标题行 */
.card.collapsible > .card-head { position: relative; padding-right: 92px; }
.card-toggle { position: absolute; top: 0; right: 0; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 14px;
  border: 1.5px solid var(--ink-2); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px;
  font-weight: 700; line-height: 1.4; cursor: pointer; white-space: nowrap; }
.card-toggle:hover { background: var(--surface-2); }
.card-toggle::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(2px) rotate(-135deg); }
.card.collapsed .card-toggle::after { transform: translateY(-2px) rotate(45deg); }
.card.collapsed > .card-head { margin-bottom: 0; }
@media print { .card-toggle { display: none; } .card-body[hidden] { display: block !important; } }

/* 学校页顶部"跳到"一行：各块的锚点链接，手机上自动折行 */
.jump-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 2px 0 14px; }
.jump-label { font-size: 13px; color: var(--ink-2); }
.jump-nav a { font-size: 13px; padding: 3px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  color: var(--ink); text-decoration: none; white-space: nowrap; }
.jump-nav a:hover { background: var(--surface-2); }
/* 手机上"跳到"按钮两行之间、按钮到下面方框的空缩小一半（6px → 3px，16px → 8px）；要写在 .jump-nav 后面才盖得住 */
@media (max-width: 720px) {
  .jump-nav { row-gap: 3px; margin-bottom: 8px; }
  .jump-nav + .tiles { margin-top: 8px; }
}
/* 跳到某一块时上面留一点空 */
main > section.card { scroll-margin-top: 12px; }
/* 标题后面的小链接图标（app.js sectionLink）：复制 / 分享直接跳到这一块的链接；标题行的间距是 14px，往回收一点贴着标题 */
.card-link { align-self: center; display: inline-flex; align-items: center; gap: 6px; margin-left: -8px; padding: 5px;
  border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.card-link:hover, .card-link:focus-visible { color: var(--ink); background: var(--surface-2); }
.card-link.done { color: var(--ink); }
.card-link-done { white-space: nowrap; }
@media print { .card-link { display: none; } }

/* 评分方块里的"州里评级：B · 2025-26" */
.tile-sub.state-rating { margin-top: 6px; color: var(--ink-2); }
.tile-sub.state-rating strong { color: var(--ink); font-size: 14px; }

/* 加州学校仪表盘：每项一个颜色点 + 颜色的字（不只靠颜色），颜色和州里的仪表盘一致 */
.dash-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 4px 0 6px; font-size: 14px; }
.dash-title { font-weight: 600; }
.dash-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.dash-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.dash-dot.d1 { background: #d7301f; }
.dash-dot.d2 { background: #f28e2b; }
.dash-dot.d3 { background: #f2cf3a; }
.dash-dot.d4 { background: #3f9c35; }
.dash-dot.d5 { background: #2f6eb5; }
.dash-color { font-size: 13px; font-weight: 600; }
td .dash-item { display: flex; margin: 2px 0; }

/* 折叠的说明（app.js initFolds）：左边小箭头 + 第一段（折叠时一行、省略号）；展开时箭头朝下、位置不变，第一段整段显示 */
[data-fold][hidden] { display: none !important; }
.fold-preview { display: flex; align-items: flex-start; gap: 6px; max-width: 100%; margin: 8px 0 0; padding: 0; border: 0;
  background: none; font: inherit; font-size: 13px; line-height: 1.5; color: var(--muted); cursor: pointer; text-align: left; }
.fold-preview .fold-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fold-preview.open .fold-text { white-space: normal; overflow: visible; }
.fold-preview:hover .fold-text { color: var(--ink-2); }
.fold-preview + [data-fold] { margin-top: 4px; }
.fold-preview + [data-fold] > :first-child, .fold-preview + [data-fold] > p { margin-top: 4px; }
/* 小箭头：折叠时朝右，展开时朝下；和第一行文字对齐 */
.fold-arrow { flex: none; width: 7px; height: 7px; margin-right: 2px; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
.fold-preview .fold-arrow { margin-top: 6px; }
.fold-preview > .key { flex: none; margin-top: 3px; }   /* 图下面说明前的小图例（竖虚线） */
.fold-preview.open .fold-arrow { transform: rotate(45deg); margin-top: 5px; }
/* 加州仪表盘这一行：点整行展开颜色说明；颜色的字用对应的颜色（比点深一点，字看得清） */
.dash-fold > summary { list-style: none; cursor: pointer; }
.dash-fold > summary::-webkit-details-marker { display: none; }
.dash-fold > summary .fold-arrow { color: var(--muted); margin-right: -8px; }
.dash-fold[open] > summary .fold-arrow { transform: translateY(-2px) rotate(45deg); }
.dash-fold .dash-note { margin-top: 2px; }
.dash-color.d1 { color: #c0392b; }
.dash-color.d2 { color: #c4610b; }
.dash-color.d3 { color: #9a7b00; }
.dash-color.d4 { color: #2e7d32; }
.dash-color.d5 { color: #2560a8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dash-color.d1 { color: #ff7b6b; }
  :root:not([data-theme="light"]) .dash-color.d2 { color: #ffa65a; } :root:not([data-theme="light"]) .dash-color.d3 { color: #f2d04f; }
  :root:not([data-theme="light"]) .dash-color.d4 { color: #6fcf6a; } :root:not([data-theme="light"]) .dash-color.d5 { color: #7fb2f0; } }
:root[data-theme="dark"] .dash-color.d1 { color: #ff7b6b; } :root[data-theme="dark"] .dash-color.d2 { color: #ffa65a; }
:root[data-theme="dark"] .dash-color.d3 { color: #f2d04f; } :root[data-theme="dark"] .dash-color.d4 { color: #6fcf6a; }
:root[data-theme="dark"] .dash-color.d5 { color: #7fb2f0; }
/* "划片内的房子"和下面的对口学校之间留点空 */
#zone .housing-tiles ~ .zone-groups, #zone [data-fold] + .zone-groups, #zone .fold-preview ~ .zone-groups { margin-top: 16px; }

/* 仪表盘说明里的颜色名：用对应的颜色，字号跟说明一样 */
.dash-note .dash-color { font-size: inherit; }

/* 出勤：最新一年一行（"长期缺勤：5% · 全州 18%"） */
.att-line { margin: 2px 0 10px; font-size: 15px; }
.att-line strong { font-size: 18px; margin: 0 2px; }

/* 划片内的房子：和全州比"租还是买"的一句提示 */
/* 租售比格子最下面：附近买 / 租更划算的学校 */
.ptr-links { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; font-size: 13px; }
/* 租售比格子：数字在标题右边同一行（基线对齐） */
.tile-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
/* 房价、月租格子里的历年小图（app.js initHousingHist）；手机上这几个格子一个一行，图才放得下 */
.tile-chart { margin-top: 8px; }
@media (max-width: 560px) { .housing-tiles:has(.tile-chart) { grid-template-columns: 1fr; } }
.tile-head .tile-value { font-size: 24px; margin: 0; }
/* 结论在刻度盘正上方、居中 */
.ptr-box { display: flex; flex-direction: column; align-items: center; width: fit-content; min-width: min(200px, 100%); max-width: 100%; margin: 8px 0 4px; }  /* 和结论一样宽：格子够宽时结论一行，窄了（手机）才折行；刻度盘在下面居中 */
.ptr-box .ratio-level { font-size: 14px; font-weight: 600; color: var(--ink); text-align: center; line-height: 1.3; }
/* 买还是租的刻度盘（像天平）：五段弧，正上方灰色"差不多"，左蓝买、右橙租，越往外越深；指针指着这里的租售比 */
.ptr-gauge { display: block; width: 200px; max-width: 100%; margin-top: 4px; overflow: visible; }
.ptr-gauge .z { fill: none; stroke-width: 12; }
.ptr-gauge .z.b2 { stroke: var(--ptr-buy2); }
.ptr-gauge .z.b1 { stroke: var(--ptr-buy1); }
.ptr-gauge .z.mid { stroke: var(--ptr-mid); }
.ptr-gauge .z.r1 { stroke: var(--ptr-rent1); }
.ptr-gauge .z.r2 { stroke: var(--ptr-rent2); }
.ptr-gauge .lbl { font-size: 12px; fill: var(--muted); }
.ptr-gauge .needle { stroke: var(--ink); stroke-width: 3.5; stroke-linecap: round; }
.ptr-gauge .hub { fill: var(--ink); stroke: var(--surface); stroke-width: 2; }
/* 比较页：租售比数字后面的买 / 租横条 */
.ptr-cell { display: inline-flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; }
/* Buy、Rent 写在线的上面两头，横条只占线的宽度 */
.ptr-bar { display: inline-grid; grid-template-columns: 1fr 1fr; width: 120px;
  font-size: 11px; line-height: 1; color: var(--muted); white-space: nowrap; }
.ptr-bar .end:last-child { grid-row: 1; grid-column: 2; justify-self: end; }
.ptr-bar svg { display: block; overflow: visible; grid-row: 2; grid-column: 1 / -1; margin-top: 1px; }
.ptr-bar .z { stroke-width: 4; }
.ptr-bar .z.b2 { stroke: var(--ptr-buy2); } .ptr-bar .z.b1 { stroke: var(--ptr-buy1); } .ptr-bar .z.mid { stroke: var(--ptr-mid); }
.ptr-bar .z.r1 { stroke: var(--ptr-rent1); } .ptr-bar .z.r2 { stroke: var(--ptr-rent2); }
.ptr-bar .mark path { fill: var(--ink); } .ptr-bar .mark line { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
@media (forced-colors: active) { .ptr-bar .z { stroke: GrayText; } .ptr-bar .mark path { fill: CanvasText; } .ptr-bar .mark line { stroke: CanvasText; } }
@media (forced-colors: active) { .ptr-gauge .z { stroke: GrayText; } .ptr-gauge .needle { stroke: CanvasText; } .ptr-gauge .hub { fill: CanvasText; } }

/* 私立学校表：和公立学校表一样的样式，列少一些 */
.private-table th[scope="row"] { font-weight: 500; }
/* 城市 / 邮编页的"私立"按钮：私立学校表换掉公立学校的表（app.js showPrivate、?level=private） */
.private-only { display: none; }
.view-private .private-only { display: block; }
.view-private .public-only { display: none !important; }

/* ============ 学校筛选（/find，页头"学校筛选"展开的也是它）：像房产网站的筛选——先是地区，再一组一组的下拉框，下面已用条件的小标签 ============ */
.find-panel[hidden] { display: none; }
/* 学校筛选页：外框最上面一行"筛选条件 ⌄"，收起时只剩这一行；里面的表单不再单独是一张卡片 */
.find-frame { padding: 0; overflow: hidden; }
.find-toggle { display: flex; align-items: center; gap: 8px; width: 100%; padding: 14px 20px; border: 0; background: none;
  color: var(--ink); font: inherit; font-size: 16px; font-weight: 600; text-align: left; cursor: pointer; }
.find-toggle:hover { background: var(--surface-2); }
.find-toggle:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
.find-chev { margin-left: auto; color: var(--ink-2); transition: transform .15s; }
.find-toggle[aria-expanded="true"] .find-chev { transform: rotate(180deg); }
.find-frame .find-form { margin: 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; box-shadow: none; }
.find-drop .find-panel { margin: 16px 0 8px; }
.nav a.nav-filter[aria-expanded="true"] { color: var(--brand); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.find-form { padding: 16px 20px; }
.find-region { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; padding: 4px 0 16px; border-bottom: 1px solid var(--border); }
.find-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.find-region .find-field { flex: 1 1 200px; }
.find-region .find-zip { flex: 0 1 150px; }
.find-label { font-weight: 600; font-size: 14px; color: var(--ink); }
.find-hint { color: var(--muted); font-size: 12.5px; line-height: 1.45; margin: 0; }
.find-form select, .find-form input[type="text"] { width: 100%; min-width: 0; height: 40px; padding: 0 10px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.find-form select:disabled { color: var(--muted); background: var(--surface-2); }
/* 四组一行（划片内的房子在最右边）；中等宽度两组一行（房子还在右边）；手机一组一行 */
.find-sections { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 28px; }
@media (max-width: 1080px) { .find-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.find-sec { display: flex; flex-direction: column; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.find-sec h2 { margin: 0; font-size: 17px; }
.find-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px 12px; }
.find-range { display: flex; align-items: center; gap: 8px; }
.find-range select { flex: 1 1 0; }
.find-dash { color: var(--muted); }
/* 最低–最高的滑杆（app.js initRange）：一条线上两个圆钮，中间一段蓝色；下拉框藏起来照常提交 */
.find-range.is-slider > select, .find-range.is-slider > .find-dash { display: none; }
.find-label.has-out { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rng-out { font-weight: 400; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.rng-out.on { color: var(--ink); font-weight: 600; }
.rng { position: relative; flex: 1 1 auto; height: 32px; cursor: pointer; }
.rng-track { position: absolute; left: 11px; right: 11px; top: 14px; height: 4px; border-radius: 2px; background: var(--grid); }
.rng-fill { position: absolute; top: 0; bottom: 0; border-radius: 2px; background: var(--brand); }
.rng input[type="range"] { position: absolute; left: 0; top: 0; width: 100%; height: 32px; margin: 0; padding: 0;
  background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.rng input[type="range"]:focus { outline: none; }
.rng input[type="range"]::-webkit-slider-runnable-track { height: 32px; background: none; border: 0; }
.rng input[type="range"]::-moz-range-track { height: 32px; background: none; border: 0; }
.rng input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; box-sizing: border-box; width: 22px; height: 22px;
  margin-top: 5px; border: 2px solid var(--brand); border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); cursor: grab; }
.rng input[type="range"]::-moz-range-thumb { pointer-events: auto; box-sizing: border-box; width: 22px; height: 22px;
  border: 2px solid var(--brand); border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); cursor: grab; }
.rng input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--wash), 0 0 0 2px var(--link); }
.rng input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--wash), 0 0 0 2px var(--link); }
/* 评分：分段按钮（和学段按钮一样的样子） */
.find-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--axis); border-radius: 11px; background: var(--surface-2); align-self: flex-start; }
.find-seg label { position: relative; }
.find-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.find-seg span { display: block; padding: 7px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.find-seg span:hover { background: var(--surface); }
.find-seg input:checked + span { background: var(--ink); color: var(--surface); }
.find-seg input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 1px; }
.find-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 12px 16px; padding-top: 14px; }
.find-need { margin: 0 auto 0 0; color: var(--down); font-weight: 600; font-size: 14px; }
.find-need[hidden] { display: none; }
.find-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 6px; }
/* 小标签：字是按钮（展开筛选框去改这一项），× 是链接（去掉这一项） */
.find-chip { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); font-size: 13.5px; }
.find-chip:hover { border-color: var(--ink-2); }
.find-chip-edit { padding: 4px 4px 4px 12px; border: 0; border-radius: 16px 0 0 16px; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.find-chip-edit:hover { color: var(--link); text-decoration: underline; }
.find-x { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin: 0 3px 0 2px; border-radius: 50%;
  color: var(--muted); font-size: 16px; line-height: 1; text-decoration: none; }
.find-x:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
/* 从小标签跳过来的那一项：闪一下 */
.find-field.find-flash { border-radius: 8px; background: var(--wash); box-shadow: 0 0 0 8px var(--wash); transition: background .3s, box-shadow .3s; }
.find-count { margin: 18px 0 8px; font-size: 18px; }
/* 快速了解的榜单：三个榜单的切换（和学段按钮不一样：圆角小标签），下面一句怎么排的 */
.find-link { margin: 6px 0 0; font-size: 14px; }
@media (max-width: 720px) {
  .find-form { padding: 12px 14px; }
  .find-region .find-field, .find-region .find-zip { flex: 1 1 100%; }
  .find-sections { grid-template-columns: 1fr; }
}
