/* ============================================================
   去留 · 设计系统
   冷白底、深蓝首屏、无衬线标题。首屏是点阵世界地图，品牌色只用在可点的东西上；
   路线状态（能申 / 差一步 / 更远 / 走不通）各有一套颜色，全站一致。
   零外部依赖：不引 web font、不引图标库，全部用系统字体与 CSS 绘制。
   ============================================================ */

:root {
  /* 让原生控件（复选框、滚动条、下拉弹层）跟随主题渲染 */
  color-scheme: light;

  /* ── 间距刻度 ── */
  --s1: 4px;   --s2: 8px;   --s3: 12px;  --s4: 16px;
  --s5: 20px;  --s6: 26px;  --s7: 36px;  --s8: 52px;  --s9: 76px;

  --r-sm: 8px; --r-md: 12px; --r-lg: 18px;

  /* ── 字体：正文和标题都用系统无衬线，标题靠字重和字号区分 ── */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
             "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;

  /* ── 浅色主题 ── */
  --bg: #f4f6f9;
  --bg-tint: #eaeef4;
  --panel: #ffffff;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #475569;
  --faint: #5b6678;   /* 最浅的一级正文，在各底色上对比度仍 ≥ 4.5:1 */
  --line: #dfe5ee;
  --hair: #ebeff5;

  --accent: #2456d3;
  --accent-ink: #1b44ad;
  --accent-wash: #edf2ff;

  --ok: #157a3c;     --ok-wash: #e9f7ee;
  --near: #a65a00;   --near-wash: #fdf3e2;
  --far: #c03f13;    --far-wash: #fdeee7;
  --no: #64748b;     --no-wash: #eef1f5;

  /* 首屏：深浅主题下都是深蓝夜空 */
  --hero-bg: #0a1124;
  --hero-ink: #f1f5fb;
  --hero-soft: #b4c0d6;
  --hero-land: rgba(148, 163, 191, .30);
  --hero-dest: #6ea8ff;
  --hero-home: #ffb547;
  --hero-free: #4fd1a5;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-md: 0 1px 2px rgba(15, 23, 42, .04), 0 14px 34px -18px rgba(15, 23, 42, .22);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);   /* 输入框聚焦时的柔光 */
  /* 键盘焦点：底色描一圈再套实色环，任何底色上都看得清 */
  --focus-ring: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --bg: #0b1020;
    --bg-tint: #111830;
    --panel: #121a2e;
    --ink: #e9eef7;
    --ink-soft: #c3ccdc;
    --muted: #9eaabf;
    --faint: #8d99ae;
    --line: #26314b;
    --hair: #1d2741;

    --accent: #7ea6ff;
    --accent-ink: #a3c0ff;
    --accent-wash: #17223f;

    --ok: #5bd18b;     --ok-wash: #0f2a1c;
    --near: #f2b54a;   --near-wash: #2a2111;
    --far: #fb8f5a;    --far-wash: #2c1a10;
    --no: #8b95a7;     --no-wash: #1a2234;

    --hero-bg: #070c1a;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 10px 30px -14px rgba(0, 0, 0, .8);
  }
}

* { box-sizing: border-box; }
h1, h2, h3 { text-wrap: balance; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 var(--s5); }

::selection { background: color-mix(in srgb, var(--accent) 20%, transparent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ============================================================
   页头：品牌和专题导航，每页一样
   ============================================================ */

.site-head {
  position: relative;
  z-index: 2;
  background: var(--hero-bg);
  color: var(--hero-ink);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  max-width: 1200px;
  min-height: 60px;
}
.brand {
  display: inline-flex;
  flex: none;
  white-space: nowrap;
  align-items: center;
  gap: 9px;
  color: inherit;
  text-decoration: none;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .08em;
}
.brand-mark { width: 26px; height: 26px; }
.brand-mark path { fill: none; stroke: var(--hero-soft); stroke-width: 1.6; stroke-dasharray: 2.2 2.4; }
.brand-mark .from { fill: var(--hero-home); }
.brand-mark .to { fill: var(--hero-bg); stroke: var(--hero-dest); stroke-width: 2; }
.site-nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.site-nav a {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--hero-soft);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: color .16s, background .16s;
}
.site-nav a:hover { color: var(--hero-ink); background: rgba(255, 255, 255, .07); }
.site-nav a[aria-current="page"] { color: var(--hero-ink); background: rgba(255, 255, 255, .12); font-weight: 600; }
.site-head :focus-visible, .hero :focus-visible { outline-color: var(--hero-dest); }

/* ============================================================
   首屏
   ============================================================ */

.hero {
  position: relative;
  overflow: hidden;
  padding: var(--s8) 0 calc(var(--s8) + 32px);
  color: var(--hero-ink);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  background:
    radial-gradient(900px 420px at 78% 10%, rgba(80, 130, 255, .16), transparent 70%),
    radial-gradient(700px 360px at 10% 110%, rgba(255, 181, 71, .08), transparent 70%),
    var(--hero-bg);
}

.hero h1 {
  margin: 0 0 var(--s4);
  font-family: var(--display);
  font-size: clamp(34px, 5.2vw, 56px);
  font-weight: 700;
  text-wrap: balance;
  line-height: 1.12;
  letter-spacing: -.01em;
}

.lead {
  margin: 0 0 var(--s5);
  max-width: 34em;
  text-wrap: pretty;
  font-size: clamp(15.5px, 1.8vw, 18px);
  line-height: 1.7;
  color: var(--hero-soft);
}
.lead b {
  font-weight: 700;
  color: var(--hero-ink);
  font-variant-numeric: tabular-nums;
}
.lead strong {
  font-weight: 600;
  color: var(--hero-ink);
  white-space: nowrap;
  border-bottom: 2px solid color-mix(in srgb, var(--hero-dest) 55%, transparent);
  padding-bottom: 1px;
}

.privacy {
  position: relative;
  margin: 0;
  padding-left: 16px;
  font-size: 13px;
  color: var(--hero-soft);
}
.privacy::before {
  content: '';
  position: absolute;
  left: 0; top: .62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #5bd18b;
  box-shadow: 0 0 0 3px rgba(91, 209, 139, .18);
}

/* 首页：左边文字，右边点阵地图；窄屏上地图在上 */
.hero-map { padding: var(--s7) 0 calc(var(--s8) + 32px); }
.hero-map .wrap { max-width: 1200px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6.5fr);
  align-items: center;
  gap: var(--s6);
}
.hero-kicker {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0 .4em;
  margin: 0 0 var(--s4);
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  font-size: 13px;
  color: var(--hero-soft);
}
.hero-kicker b { color: var(--hero-ink); font-variant-numeric: tabular-nums; }
@media (max-width: 620px) { .hero-kicker .kicker-extra { display: none; } }
.hero-map .lead { max-width: 24em; text-wrap: balance; }
.hero-cta { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s4); margin-top: var(--s6); }

.hero-world { position: relative; margin: 0 -2% 0 0; }
.hero-world svg { display: block; width: 100%; height: auto; overflow: visible; }
.hero-world .land, .hero-world .dest {
  fill: none;
  stroke-width: var(--dot, 5px);
  stroke-linecap: round;
}
.hero-world .land, .hero-world .dest.own { stroke: var(--hero-land); }
.hero-world .dest { stroke: var(--hero-dest); transition: opacity .2s, stroke .2s; cursor: default; }
/* 对你开放的路线越多越亮；收录了路线但都不对你的国籍开放的，只比陆地亮一点 */
.hero-world .dest.l1 { stroke: color-mix(in srgb, var(--hero-dest) 62%, var(--hero-bg)); }
.hero-world .dest.l3 { stroke: color-mix(in srgb, var(--hero-dest) 70%, #fff); }
.hero-world .dest.none { stroke: color-mix(in srgb, var(--hero-dest) 30%, var(--hero-bg)); }
.hero-world .dest.free { stroke: var(--hero-free); }
.hero-world .dest.home { stroke: var(--hero-home); }
.hero-world .dests:hover .dest { opacity: .45; }
.hero-world .dests .dest:hover { opacity: 1; }
.hero-world .ping {
  fill: none;
  stroke: color-mix(in srgb, var(--hero-dest) 70%, #fff);
  stroke-width: 1.4px;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  pointer-events: none;
  transform-box: fill-box;
  transform-origin: center;
  animation: ping 2.4s ease-out 3 both;
  animation-delay: calc(.5s + var(--i) * .3s);
}
.hero-world .home-pin { fill: var(--hero-home); stroke: var(--hero-bg); stroke-width: 2; }
@keyframes ping {
  0% { opacity: .9; transform: scale(.3); }
  100% { opacity: 0; transform: scale(1.6); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-world .ping { display: none; }
}

.hero-world-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px 8px;
  margin: var(--s2) 0 0;
  font-size: 12px;
  color: var(--hero-soft);
}
.hero-world-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hero-world-legend span + span { margin-left: var(--s3); }
.hero-world-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--hero-dest); }
.hero-world-legend i.k-free { background: var(--hero-free); }
.hero-world-legend i.k-home { background: var(--hero-home); }

/* 首屏左边：按国籍定制的一行 */
.hero-you { margin: var(--s5) 0 0; max-width: 32em; font-size: 13.5px; line-height: 1.7; color: var(--hero-soft); }
.hero-you b { color: var(--hero-ink); font-variant-numeric: tabular-nums; }
.hero-you a { margin-left: .4em; color: var(--hero-dest); white-space: nowrap; }
.hero-you a:hover { color: var(--hero-ink); }
.hero-you .hero-pass { display: block; margin-top: var(--s2); }
/* 规则在变的一句：用暖色小圆点提个醒，不做成红色警告 */
.hero-urge { position: relative; margin: var(--s4) 0 0; padding-left: 14px; max-width: 32em; font-size: 13px; line-height: 1.7; color: var(--hero-soft); }
.hero-urge::before { content: ''; position: absolute; left: 0; top: .65em; width: 6px; height: 6px; border-radius: 50%; background: #ffb547; }

.hero-tip {
  position: absolute;
  z-index: 3;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 12px));
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .5);
}

@media (max-width: 620px) {
  .site-head .wrap { gap: var(--s2); min-height: 54px; }
  .brand { font-size: 17px; gap: 7px; }
  .brand-mark { width: 22px; height: 22px; }
  .site-nav a { padding: 6px 8px; font-size: 13.5px; }
  /* 窄屏放不下 5 个入口：「全部路线」就是首页，点品牌名一样回去 */
  .site-nav a[href="index.html"] { display: none; }
}

@media (max-width: 860px) {
  .hero-map { padding-top: var(--s5); }
  .hero-grid { grid-template-columns: 1fr; gap: var(--s4); }
  .hero-world { order: -1; margin: 0 -2%; }
  .hero-world-legend { justify-content: flex-start; }
}

main { padding: var(--s8) 0 var(--s9); }
.hero + main { padding-top: 0; }
.hero + main > :first-child { position: relative; margin-top: -32px; box-shadow: var(--shadow-md); }

/* ============================================================
   面板与表单
   ============================================================ */

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s7);
  margin-bottom: var(--s6);
  box-shadow: var(--shadow-sm);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(212px, 1fr));
  gap: var(--s5) var(--s6);
}

.field { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.field[hidden] { display: none; }
.field > span {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}
.field small { font-size: 12.5px; line-height: 1.55; color: var(--faint); }

input[type="number"], select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  font: inherit;
  font-size: 15.5px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color .18s, box-shadow .18s;
  appearance: none;
}

input[type="number"]::placeholder { color: var(--faint); }

/* ── 自绘下拉框 ──────────────────────────────
   原生 select 保留在 DOM 里但透明覆盖在原位：仍可聚焦、
   仍参与表单校验，只是视觉上由下面的按钮接管。 */

.sel { position: relative; }

.sel > select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;   /* 交互全部交给自绘按钮 */
}

.sel-btn {
  width: 100%;
  min-height: 46px;
  padding: 10px 40px 10px 14px;
  font: inherit;
  font-size: 15.5px;
  text-align: left;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s;
}
.sel-btn.is-placeholder { color: var(--faint); }
.sel-btn:hover { border-color: color-mix(in srgb, var(--muted) 55%, var(--line)); }
.sel-btn:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

/* 箭头 */
.sel-btn::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 7px; height: 7px;
  margin-top: -5px;
  border-right: 1.5px solid var(--faint);
  border-bottom: 1.5px solid var(--faint);
  transform: rotate(45deg);
  transition: transform .18s;
  pointer-events: none;
}
.sel-btn[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: -2px; }

.sel.is-invalid .sel-btn { border-color: var(--far); }

/* 选项少的单选题：平铺成一排按钮，长相和筛选区的 chip 一致 */
.field.has-chips { grid-column: 1 / -1; }
.field .sel-chips > .chips { margin-top: 2px; }
.chip-btn {
  padding: 7px 14px;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.45;
  text-align: left;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .16s, border-color .16s, color .16s;
}
.chip-btn:hover { border-color: var(--muted); color: var(--ink); }
.chip-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.chip-btn[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--panel); }
.chip-btn.is-capped { opacity: .45; }
.sel-chips .chip-limit { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--near); }
.sel-chips .chip-limit:empty { display: none; }
.sel-chips.is-invalid .chip-btn { border-color: color-mix(in srgb, var(--far) 60%, var(--line)); }

/* 没填好的项：下面一行中文提示，触屏上也看得到 */
.field .field-error { font-size: 12.5px; font-weight: 600; color: var(--far); }
.field.is-error input[type="number"] { border-color: var(--far); }

/* 长列表里的分组标题（常用 / 全部） */
.sel-group {
  padding: 10px var(--s3) 4px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
}
.sel-group[hidden] { display: none; }

.sel-list {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0; right: 0;
  max-height: 264px;
  overflow-y: auto;
  padding: var(--s1);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  animation: drop .14s ease-out;
}
@keyframes drop {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

.sel-opt {
  padding: 9px var(--s3);
  font-size: 14.5px;
  color: var(--ink-soft);
  border-radius: var(--r-sm);
  cursor: pointer;
  white-space: normal;
}
.sel-opt:hover, .sel-opt.is-active { background: var(--bg-tint); color: var(--ink); }
.sel-opt[hidden] { display: none; }

/* 国家这类长列表顶部的搜索框，滚动时停在顶上 */
.sel-search {
  position: sticky;
  top: calc(-1 * var(--s1));
  z-index: 1;
  display: block;
  width: 100%;
  margin: calc(-1 * var(--s1)) 0 var(--s1);
  padding: 10px var(--s3);
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--panel);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.sel-search:focus { outline: none; border-bottom-color: var(--accent); }
.sel-opt.is-chosen {
  color: var(--accent);
  font-weight: 600;
}
.sel-opt.is-chosen::after {
  content: '✓';
  float: right;
  font-weight: 400;
}

input[type="number"]:hover, select:hover { border-bottom-color: var(--muted); }
input[type="number"]:focus, select:focus {
  outline: none;
  border-bottom-color: var(--accent);
  box-shadow: 0 1px 0 0 var(--accent);
}

input[type="checkbox"] { accent-color: var(--accent); cursor: pointer; }

.field.checkbox {
  flex-direction: row;
  align-items: center;
  gap: var(--s3);
  align-self: end;
  padding: 10px 0;
  border-bottom: 1px solid transparent;
  cursor: pointer;
}
/* 开关题单占一行，它展开的追问紧跟在下面 */
.field.checkbox.row { grid-column: 1 / -1; align-self: start; padding: 0; }
.field.checkbox input { width: 16px; height: 16px; margin: 0; flex: none; }
.field.checkbox span {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

fieldset {
  border: 0;
  border-top: 1px solid var(--hair);
  margin: var(--s7) 0 0;
  padding: var(--s6) 0 0;
}
legend {
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
legend em {
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--faint);
  margin-left: var(--s2);
  font-size: 12px;
}

.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.chip-hints { margin: var(--s3) 0 0; padding: 0; list-style: none; font-size: 13px; line-height: 1.6; color: var(--muted); }
.chip-hints li + li { margin-top: 4px; }
.chip-hints b { color: var(--ink-soft); font-weight: 600; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip span {
  display: inline-block;
  padding: 7px 15px;
  font-size: 13.5px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all .16s;
  user-select: none;
}
.chip:hover span { border-color: var(--muted); color: var(--ink); }
.chip input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--panel);
}
.chip input:focus-visible + span { box-shadow: var(--focus-ring); }

/* 国家细选：跟在地区下面，字号略小，和地区一行区分开 */
.countries[hidden] { display: none; }
.countries { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px dashed var(--line); }
.countries .chip span { padding: 5px 12px; font-size: 13px; }
.countries .hint { width: 100%; font-size: 12.5px; color: var(--faint); }

/* ── 按钮 ── */

button { font: inherit; cursor: pointer; transition: all .16s; }

.primary, .btn-primary {
  width: 100%;
  margin-top: var(--s7);
  padding: 14px 22px;
  font-family: var(--display);
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--panel);
  background: var(--accent);
  border: 0;
  border-radius: var(--r-md);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset, 0 8px 20px -10px color-mix(in srgb, var(--accent) 80%, transparent);
}
.primary:hover, .btn-primary:hover { background: var(--accent-ink); }
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  width: auto;
  margin: 0;
  padding: 14px 26px;
  text-decoration: none;
}
.btn-primary::after { content: '→'; transition: transform .16s; }
.btn-primary:hover::after { transform: translateX(3px); }
/* 首屏上：深底配亮蓝按钮，深色主题下按钮文字用深色 */
.hero .btn-primary { color: #fff; background: #3b6ff0; }
.hero .btn-primary:hover { background: #2f5fdb; }
.primary:active { transform: translateY(1px); }

.ghost {
  padding: 8px 16px;
  font-size: 13.5px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin: 0;
}
.ghost:hover { color: var(--ink); border-color: var(--muted); }

/* ============================================================
   结果摘要
   ============================================================ */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: var(--s5);
}
.stat { position: relative; text-align: center; padding: 0 var(--s3); }
.stat + .stat::before {
  content: '';
  position: absolute;
  left: 0; top: 10%;
  height: 80%;
  border-left: 1px solid var(--hair);
}
.stat b {
  display: block;
  font-family: var(--display);
  font-size: clamp(34px, 5vw, 46px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--accent);
}
.stat span {
  display: block;
  margin-top: var(--s2);
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--muted);
}

.bottleneck {
  margin-top: var(--s6);
  padding-top: var(--s6);
  border-top: 1px solid var(--hair);
}
.bottleneck h3 {
  margin: 0 0 var(--s3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.bottleneck ol { margin: 0; padding: 0; list-style: none; counter-reset: neck; }
.bottleneck li {
  counter-increment: neck;
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  padding: var(--s3) 0;
  font-size: 15px;
}
.bottleneck li + li { border-top: 1px solid var(--hair); }
.bottleneck li::before {
  content: counter(neck, decimal-leading-zero);
  flex: none;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  opacity: .55;
}
.bottleneck em {
  margin-left: auto;
  font-style: normal;
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
}

/* ============================================================
   筛选栏
   ============================================================ */

/* 「我不想…」是排除项，选中时用警示色，和其他正向选择区分开 */
#excludes .chip input:checked + span {
  background: var(--far);
  border-color: var(--far);
}

.filterbar {
  margin-bottom: var(--s7);
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-wrap: wrap;
}
.switch {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all .16s;
  user-select: none;
}
.switch:hover { border-color: var(--muted); }
.switch input { width: 15px; height: 15px; margin: 0; }
.switch:has(input:checked) { border-color: var(--accent); color: var(--accent); }

.filter-note { flex: 1; min-width: 170px; font-size: 12.5px; color: var(--faint); }

/* 「按地区、诉求筛选」：原来是填写的最后一步，挪到结果页，选了马上生效 */
.prefs {
  margin: calc(-1 * var(--s4)) 0 var(--s7);
  padding: 0 var(--s5);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.prefs > summary {
  padding: var(--s4) 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
}
.prefs > summary span { color: var(--accent); }
.prefs[open] { padding-bottom: var(--s5); }
.prefs fieldset.first { margin-top: 0; padding-top: var(--s4); }

/* 「让结果更准」：结果页上按需补充的问题 */
.refine-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); }
.refine-top .ghost { flex: none; }
.refine-title { margin: 0; font-family: var(--display); font-size: 19px; font-weight: 600; color: var(--ink); }
.refine-sub { margin: var(--s2) 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.refine-intro { margin: var(--s4) 0 var(--s2); font-size: 13px; color: var(--muted); }
.refine-q[hidden] { display: none; }
.refine-q { padding: var(--s4) 0; border-top: 1px solid var(--hair); }
.refine-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s2) var(--s3);
  margin: 0 0 var(--s3);
}
.refine-head b { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.refine-count { font-size: 12.5px; color: var(--accent); }
.refine-q.is-answered .refine-count { color: var(--ok); }
.refine-q.is-answered .refine-count::before { content: '✓ '; }
.refine-q .chips { margin-top: var(--s4); }
.refine-status { margin: var(--s3) 0 0; font-size: 12.5px; color: var(--ok); }
.refine-note { margin: calc(-1 * var(--s1)) 0 var(--s3); font-size: 12.5px; line-height: 1.6; color: var(--muted); }
/* 勾了的语言下面各一行等级 */
.lang-levels-note { margin: var(--s4) 0 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.lang-levels { margin-top: var(--s3); }

/* ── 学校输入：打校名，从各签证的认可名单里挑 ── */
.field.school > label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.school-box { position: relative; }
.school-input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  font: inherit;
  font-size: 15.5px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color .18s, box-shadow .18s;
}
.school-input::placeholder { color: var(--faint); }
.school-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}
.school-opt small { display: block; margin-top: 2px; font-size: 12px; color: var(--faint); }
.school-opt.is-extra { color: var(--muted); border-top: 1px solid var(--hair); border-radius: 0; }
.school-opt.is-extra + .school-opt.is-extra { border-top: 0; }
.school-empty { padding: 9px var(--s3); font-size: 13px; line-height: 1.6; color: var(--muted); }
.school-info.is-on { color: var(--ok); }
.refine-source { margin: var(--s3) 0 0; font-size: 11.5px; line-height: 1.6; color: var(--faint); }
.refine-source a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.refine-source a:hover { color: var(--muted); }
.refine-status:empty { display: none; }
.sort-by { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.sort-by > span { flex: none; white-space: nowrap; }
.sort-by .sel { min-width: 104px; }
.sort-by > select { width: auto; }
.sort-by .sel-btn { padding-top: 6px; padding-bottom: 6px; font-size: 13.5px; }
.calc-field select, .whatif select {
  /* 全局 select 去掉了原生箭头，详情页和「如果…会怎样」不用自绘下拉，补一个中性灰的箭头，深浅色都看得清 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23909298' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 6px;
}


.empty {
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  padding: var(--s8) var(--s6);
}

/* ============================================================
   分组与卡片
   ============================================================ */

.group { margin-bottom: var(--s9); }

.group > header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
  margin-bottom: var(--s6);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--line);
}
.group h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -.01em;
  display: inline-flex;
  align-items: baseline;
  gap: var(--s3);
}
.group > header p { margin: 0; flex: 1; min-width: 190px; font-size: 12.5px; color: var(--faint); }

.count {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid currentColor;
}

.group.ok   h2, .group.ok   .count { color: var(--ok); }
.group.near h2, .group.near .count { color: var(--near); }
.group.far  h2, .group.far  .count { color: var(--far); }
.group.no   h2, .group.no   .count { color: var(--no); }

.cards { display: grid; gap: var(--s5); }

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s7);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  animation: rise .4s cubic-bezier(.22, .8, .3, 1) backwards;
  animation-delay: calc(var(--i, 0) * 32ms);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* 状态用顶部一道细色条表达，比整条左边框更含蓄 */
.card::before {
  content: '';
  position: absolute;
  left: var(--s7); right: var(--s7); top: 0;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: currentColor;
  opacity: .85;
}
.group.ok   .card { color: var(--ok); }
.group.near .card { color: var(--near); }
.group.far  .card { color: var(--far); }
.group.no   .card { color: var(--no); opacity: .68; }
.group.no   .card:hover { opacity: 1; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s4);
  flex-wrap: wrap;
}
.title { display: flex; gap: var(--s4); align-items: baseline; min-width: 0; }

.flag { flex: none; font-size: 26px; line-height: 1; }

/* Windows 无旗帜字体时的降级：设计过的国家代码块 */
.flag-code {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 24px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--muted);
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: default;
}

.card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.005em;
  color: var(--ink);
}
.sub {
  margin: 3px 0 0;
  font-size: 12px;
  letter-spacing: .01em;
  color: var(--faint);
}

.badges { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }
.badge {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .03em;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  color: var(--muted);
  white-space: nowrap;
}
.badge.diff { letter-spacing: 1.6px; font-size: 9.5px; border-color: transparent; }
.badge.match {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 35%, transparent);
  background: var(--ok-wash);
  font-weight: 600;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s4) var(--s6);
  margin: var(--s6) 0;
  padding: var(--s6) 0;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.facts dt {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .09em;
  color: var(--faint);
  text-transform: uppercase;
}
.facts dd {
  margin: var(--s2) 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.notes {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink-soft);
}
.notes strong { font-weight: 600; color: var(--ink); }

.gaps {
  margin-top: var(--s6);
  padding: var(--s4) var(--s5);
  background: var(--bg-tint);
  border-radius: var(--r-md);
  font-size: 13.5px;
}
.gaps b {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .09em;
  color: var(--muted);
  text-transform: uppercase;
}
.gaps ul { margin: var(--s2) 0 0; padding: 0; list-style: none; }
.gaps li { display: flex; gap: var(--s3); padding: 3px 0; line-height: 1.65; color: var(--ink-soft); }
.gaps li::before { flex: none; font-size: 11px; line-height: 1.9; }
.gaps li.hard { color: var(--muted); }
.gaps li.hard::before { content: '✕'; color: var(--far); }
.gaps li.soft::before { content: '△'; color: var(--near); }
.gaps .effort {
  margin: var(--s2) 0 0;
  font-size: 13px;
  color: var(--muted);
}
.gaps li strong { font-weight: 600; color: var(--ink); }

.gaps.none {
  display: flex;
  align-items: center;
  gap: var(--s2);
  background: var(--ok-wash);
  color: var(--ok);
  font-weight: 500;
}

.official {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  margin-top: var(--s6);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding-bottom: 1px;
}
.official:hover { gap: var(--s2); border-bottom-color: var(--accent); }

/* ============================================================
   分步表单
   ============================================================ */

.stepper { padding-top: var(--s6); }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s2);
  margin: 0 0 var(--s6);
  padding: 0;
  list-style: none;
}
.steps button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  color: var(--faint);
  background: var(--bg);
  border: 1px solid transparent;
  border-radius: var(--r-md);
}
.steps button b {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line);
}
.steps button.is-done { color: var(--ink-soft); }
.steps button.is-done b { font-size: 0; color: #fff; background: var(--ok); box-shadow: none; }
.steps button.is-done b::after { content: '✓'; font-size: 13px; }
.steps button[aria-current="step"] { color: var(--accent-ink); background: var(--accent-wash); border-color: color-mix(in srgb, var(--accent) 30%, transparent); font-weight: 600; }
.steps button[aria-current="step"] b { color: #fff; background: var(--accent); box-shadow: none; }
.steps button:hover { color: var(--ink); }
.steps button:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-sm); }

.step[hidden] { display: none; }
.step-title {
  margin: 0;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}
.step-title:focus { outline: none; }
.step-hint { margin: var(--s2) 0 var(--s6); font-size: 14.5px; line-height: 1.7; color: var(--muted); }
.step fieldset.first { margin-top: 0; padding-top: 0; border-top: 0; }

/* 恢复草稿的提示 */
.draft-note { margin: 0 0 var(--s5); font-size: 12.5px; color: var(--muted); }
.draft-note[hidden] { display: none; }
.link-btn {
  padding: 0;
  font-size: inherit;
  color: var(--accent);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.step-nav {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s7);
  padding-top: var(--s5);
  border-top: 1px solid var(--hair);
}
.step-nav .primary { width: auto; min-width: 9em; margin: 0; padding: 12px 22px; font-size: 16px; }
.step-nav .primary[hidden], .step-nav .ghost[hidden] { display: none; }
.step-nav #nextStep + #submitBtn:not([hidden]) {
  color: var(--ink);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
}
.step-nav #nextStep[hidden] + #submitBtn { color: var(--panel); background: var(--accent); }
.step-count { flex: 1; margin: 0; font-size: 12.5px; color: var(--faint); text-align: center; }
.step-nav .ghost { padding: 11px 18px; }

@media (max-width: 620px) {
  .stepper { padding: var(--s5) var(--s4); }
  .steps { gap: 4px; margin-bottom: var(--s5); }
  .steps button { flex-direction: column; gap: 4px; padding: 8px 4px; font-size: 12.5px; text-align: center; }
  .steps button b { width: 22px; height: 22px; font-size: 12px; }
  .steps button span { white-space: nowrap; }
  .step-title { font-size: 19px; }
  .step-nav { flex-wrap: wrap; }
  .step-count { order: -1; flex-basis: 100%; text-align: left; }
  .step-nav .primary { flex: 1; min-width: 0; }
}

/* ============================================================
   结果页顶部：人物卡 + 世界地图
   ============================================================ */

/* 比手机上 .panel 的内边距优先：地图要贴边 */
.panel.atlas { padding: 0; overflow: hidden; }
.atlas[hidden] { display: none; }

.persona {
  display: flex;
  align-items: flex-start;
  gap: var(--s5);
  padding: var(--s6) var(--s7);
  border-bottom: 1px solid var(--hair);
}
.persona-avatar {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-wash);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent);
}
.persona-avatar svg { width: 100%; height: 100%; fill: var(--accent); }
.persona-main { flex: 1; min-width: 0; }
.persona-name {
  margin: 2px 0 var(--s3);
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}
.persona-name span { margin-left: var(--s3); font-family: var(--sans); font-size: 14px; font-weight: 400; color: var(--muted); }
.persona-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.persona-facts div {
  display: flex;
  gap: 6px;
  padding: 3px 10px;
  font-size: 12.5px;
  line-height: 1.6;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.persona-facts dt { color: var(--faint); }
.persona-facts dd { margin: 0; color: var(--ink-soft); }
.persona-edit { flex: none; text-decoration: none; }
.persona-jump {
  display: inline-block;
  margin-top: var(--s3);
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.atlas-map { position: relative; background: var(--panel); }
.atlas.no-map .atlas-map, .atlas.no-map .atlas-legend { display: none; }
/* 手机上地图默认折起，只留一行「展开世界地图」 */
.atlas.map-closed .atlas-map { display: none; }
.atlas.map-closed .persona { border-bottom: 0; }
.atlas.map-closed .atlas-legend { border-top: 1px solid var(--hair); }
.atlas-toggle { flex: none; }
.atlas-map svg { display: block; width: 100%; height: auto; }

/* 海是白的，没有路线的国家是浅灰底图（以前和底色几乎一样，看起来像地图缺了一块），有路线的按档上色 */
.geo-sphere { fill: color-mix(in srgb, var(--bg-tint) 45%, var(--panel)); stroke: var(--line); stroke-width: .6; }
.geo-c {
  fill: color-mix(in srgb, var(--no) 20%, var(--panel));
  stroke: var(--panel);
  stroke-width: .5;
}
.geo-c[data-country] { cursor: pointer; transition: fill .15s; }
.geo-c[data-country]:hover { stroke: var(--ink); stroke-width: 1; }
.geo-c.lvl-now { fill: color-mix(in srgb, var(--ok) 72%, var(--panel)); }
.geo-c.lvl-one { fill: color-mix(in srgb, var(--near) 62%, var(--panel)); }
.geo-c.lvl-job { fill: color-mix(in srgb, var(--accent) 50%, var(--panel)); }
.geo-c.lvl-far { fill: color-mix(in srgb, var(--no) 40%, var(--panel)); }
.geo-c.is-focus { stroke: var(--ink); stroke-width: 1.6; }
/* 键盘焦点：SVG 上的 outline 各浏览器画法不一，用描边代替 */
.geo-c[data-country]:focus { outline: none; }
.geo-c[data-country]:focus-visible { stroke: var(--accent); stroke-width: 2.4; }
.geo-dots .geo-c { stroke: var(--panel); stroke-width: 1.2; }

.arc { fill: none; stroke-width: 1.3; stroke-linecap: round; pointer-events: none; }
.arc-now { stroke: var(--ok); }
.arc-one { stroke: var(--near); stroke-dasharray: .012 .01; }
.arc-now {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: arc-draw .9s ease-out forwards;
}
@keyframes arc-draw { to { stroke-dashoffset: 0; } }

.geo-you { pointer-events: none; }
.geo-you .ring { fill: var(--accent); stroke: var(--panel); stroke-width: 2; }
.geo-you .glyph { fill: var(--panel); }
.geo-you .pulse { fill: var(--accent); opacity: .35; transform-origin: center; animation: you-pulse 2.4s ease-out infinite; }
.geo-you text {
  font-size: 12px;
  font-weight: 600;
  text-anchor: middle;
  fill: var(--ink);
  paint-order: stroke;
  stroke: var(--bg-tint);
  stroke-width: 3px;
}
@keyframes you-pulse { from { transform: scale(1); opacity: .4; } to { transform: scale(2.6); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .arc-now { animation: none; stroke-dashoffset: 0; }
  .geo-you .pulse { animation: none; }
}

.atlas-tip {
  position: absolute;
  z-index: 2;
  min-width: 200px;
  max-width: 280px;
  padding: var(--s3) var(--s4);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  pointer-events: none;
}
.atlas-tip[hidden] { display: none; }
.atlas-tip p { margin: 0; }
.atlas-tip .tip-head { display: flex; align-items: center; gap: var(--s2); margin-bottom: 2px; font-size: 14px; color: var(--ink); }
.atlas-tip .tip-head .flag { font-size: 16px; }
.atlas-tip .tip-time { margin-top: 2px; }
.atlas-tip .tip-time b { font-weight: 600; font-variant-numeric: tabular-nums; }
.atlas-tip .tip-top { margin-top: 4px; color: var(--muted); }
.atlas-tip .tip-top span { margin-left: 6px; color: var(--faint); }

.atlas-legend {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s4) var(--s7);
  border-top: 1px solid var(--hair);
}
.atlas-legend ul { display: flex; gap: var(--s4); margin: 0; padding: 0; list-style: none; }
.atlas-legend li { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }
.atlas-legend li b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.atlas-legend i { width: 10px; height: 10px; border-radius: 3px; }
.atlas-legend i.lvl-now { background: color-mix(in srgb, var(--ok) 72%, var(--panel)); }
.atlas-legend i.lvl-one { background: color-mix(in srgb, var(--near) 62%, var(--panel)); }
.atlas-legend i.lvl-job { background: color-mix(in srgb, var(--accent) 50%, var(--panel)); }
.atlas-legend i.lvl-far { background: color-mix(in srgb, var(--no) 40%, var(--panel)); }
.atlas-hint { flex: 1; font-size: 12px; color: var(--faint); text-align: right; }

/* 手机上：「修改条件」挪到右上角，条件标签占满整行；图例换行，不被裁掉 */
@media (max-width: 620px) {
  .persona { position: relative; gap: var(--s4); padding: var(--s5) var(--s4); }
  .persona-avatar { width: 44px; height: 44px; }
  .persona-name { padding-right: 92px; font-size: 19px; }
  .persona-edit { position: absolute; top: var(--s5); right: var(--s4); padding: 6px 12px; font-size: 13px; }
  .atlas-legend { flex-wrap: wrap; gap: var(--s3); padding: var(--s3) var(--s4); }
  .atlas-legend ul { flex-wrap: wrap; gap: var(--s2) var(--s4); }
  .atlas-hint { order: 2; flex-basis: 100%; text-align: left; }
}

.focus-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  margin: 0 0 var(--s3);
  padding: var(--s3) var(--s5);
  font-size: 14px;
  color: var(--ink-soft);
  background: var(--accent-wash);
  border-radius: var(--r-md);
}
.focus-bar[hidden] { display: none; }
.focus-bar b { color: var(--ink); }

/* ============================================================
   结果页：结论 → 推荐 → 分组列表
   ============================================================ */

.verdict-panel { padding: var(--s6) var(--s7); }

.profile-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s1) var(--s4);
  margin: 0 0 var(--s3);
  font-size: 12.5px;
  color: var(--muted);
}
.profile-line a {
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.verdict {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(22px, 3.4vw, 28px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.01em;
}
.verdict b { color: var(--ok); font-variant-numeric: lining-nums tabular-nums; }
.verdict-sub { margin: var(--s2) 0 0; font-size: 14.5px; line-height: 1.75; color: var(--ink-soft); }
.verdict-list { margin: var(--s3) 0 0; padding-left: 1.2em; font-size: 14.5px; line-height: 1.8; color: var(--ink-soft); }
.verdict-list li::marker { color: var(--faint); }
.verdict-list b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

.moves { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--hair); }
.moves h3 { margin: 0 0 var(--s2); font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--muted); }
.moves ol { margin: 0; padding: 0; list-style: none; counter-reset: move; }
.moves li {
  counter-increment: move;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  column-gap: var(--s3);
  padding: var(--s3) 0;
}
.moves li + li { border-top: 1px solid var(--hair); }
.moves li::before {
  content: counter(move);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-wash);
  border-radius: 50%;
}
.moves li b { font-size: 15px; font-weight: 600; color: var(--ink); }
.moves li span { font-size: 12.5px; line-height: 1.6; color: var(--muted); }
/* 每条建议点开看是哪几条路线 */
.moves details { grid-row: span 2; min-width: 0; }
.moves summary { display: grid; gap: 2px; cursor: pointer; list-style: none; }
.moves summary::-webkit-details-marker { display: none; }
.moves summary b::after { content: ' ›'; color: var(--faint); font-weight: 400; }
.moves details[open] summary b::after { content: ' ⌄'; }
.moves summary:hover b { color: var(--accent); }
.move-routes { margin: var(--s2) 0 0; padding: 0; list-style: none; }
.moves .move-routes li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s2);
  padding: 3px 0; font-size: 13px; border: 0; counter-increment: none;
}
.moves .move-routes li::before { content: none; }
.move-routes a { color: var(--ink-soft); }
.move-routes small { font-size: 12px; color: var(--muted); }
.moves-note { margin: var(--s2) 0 0; font-size: 11.5px; color: var(--faint); }
.moves .moves-rest > summary { display: inline-block; margin: var(--s1, 4px) 0 0 calc(22px + var(--s3)); font-size: 13px; color: var(--accent); }
.moves .moves-rest > summary::after { content: ' ›'; }
.moves .moves-rest[open] > summary { display: none; }

.section-title {
  margin: 0 0 var(--s4);
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.picks { margin-bottom: var(--s7); }
.pick-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--s4); }
.pick {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s5);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.pick.is-first { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.pick-status { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--ok); }
.pick-status.is-near { color: var(--near); }
.pick-head { display: flex; gap: var(--s3); align-items: flex-start; }
.pick-head .flag { font-size: 24px; margin-top: 2px; }
.pick h3 { margin: 0; font-family: var(--display); font-size: 18px; font-weight: 600; line-height: 1.35; }
.pick h3 a { color: var(--ink); text-decoration: none; }
.pick h3 a:hover { color: var(--accent); }
.pick-line { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--ink-soft); }
.mini-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
  margin: auto 0 0;
  padding-top: var(--s3);
  border-top: 1px solid var(--hair);
}
.mini-facts dt { font-size: 10.5px; letter-spacing: .06em; color: var(--faint); }
.mini-facts dd { margin: 2px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); }
.mini-facts .wide { grid-column: 1 / -1; }
/* 结果行展开后的「带家人」：配偶、孩子、父母各一行 */
.fam-fact .fam-item { display: block; }
.fam-fact .fam-item b { display: inline-block; min-width: 3em; margin-right: var(--s2); font-weight: 600; color: var(--ink); }
.fam-fact small a { margin-left: 2px; }
.mini-facts dd small { display: block; font-size: 11px; line-height: 1.4; color: var(--faint); }

/* 标签：缺口、评审提示、永居与否。颜色只表达性质，不靠颜色区分时也有文字 */
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tags-label { font-size: 11.5px; color: var(--faint); }
.tag {
  display: inline-block;
  max-width: 100%;
  padding: 1px 8px;
  overflow: hidden;
  font-size: 11.5px;
  line-height: 1.7;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
  background: var(--bg-tint);
  border-radius: var(--r-sm);
}
.tag.ok { color: var(--ok); background: var(--ok-wash); }
.tag.warn { color: var(--near); background: var(--near-wash); }
.tag.bad { color: var(--far); background: var(--far-wash); }
.tag.review { color: var(--accent); background: var(--accent-wash); }
/* 出生地 / 现居地 / 就业市场的提示：描边区分于「还差」的实心标签 */
.tag.caution { color: var(--near); background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--near) 45%, transparent); }
.tag.info { color: var(--muted); background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.tag.ask { color: var(--accent); background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }

.context-note {
  display: flex;
  gap: var(--s3);
  margin: var(--s3) 0 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.context-note b {
  flex: none;
  min-width: 5.5em;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.95;
  color: var(--muted);
}
.context-note small { margin-left: var(--s2); font-size: 11.5px; color: var(--faint); white-space: nowrap; }
@media (max-width: 620px) {
  .context-note { flex-direction: column; gap: 0; }
}

.facts .wide { grid-column: 1 / -1; }
.facts .wide a { margin-left: var(--s1); color: var(--accent); }
.facts .wide small { margin-left: var(--s2); font-size: 11.5px; color: var(--faint); }

.signals { margin: var(--s3) 0 0; padding: 0; list-style: none; }
.signals li { display: flex; gap: var(--s3); padding: 3px 0; font-size: 13.5px; line-height: 1.65; color: var(--ink-soft); }
.signals li::before { flex: none; font-size: 11px; line-height: 1.9; }
.signals li.good::before { content: '●'; color: var(--ok); }
.signals li.warn::before { content: '!'; font-weight: 700; color: var(--near); }
.signals li.info::before { content: 'i'; font-style: italic; color: var(--muted); }

/* 分组标签页：吸顶，数字在上、名称在下，兼作原来的统计数字 */
.tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  margin: 0 0 var(--s6);
  padding: 5px;
  background: color-mix(in srgb, var(--bg-tint) 92%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.tabs button {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 2px 7px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: var(--r-sm);
}
.tabs button span {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink-soft);
  font-variant-numeric: lining-nums tabular-nums;
}
.tabs button span small { margin-left: 2px; font-size: 11px; font-weight: 400; color: var(--faint); }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--accent); background: var(--panel); box-shadow: var(--shadow-sm); }
.tabs button[aria-selected="true"] span { color: var(--accent); }

.tier + .tier { margin-top: var(--s7); }
.tier > header { margin-bottom: var(--s3); }
.tier h3 {
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  margin: 0;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
}
.tier > header p { margin: 2px 0 0; font-size: 12.5px; color: var(--faint); }
.tier-ready h3, .tier-ready .count { color: var(--ok); }
.tier-review h3, .tier-review .count { color: var(--accent); }
.tier-confirm h3, .tier-confirm .count { color: var(--accent); }
.tier-oneStep h3, .tier-oneStep .count { color: var(--near); }
.tier-employer h3, .tier-employer .count { color: var(--ink-soft); }
.tier-later h3, .tier-later .count { color: var(--far); }
.tier-blocked h3, .tier-blocked .count { color: var(--no); }

.rows {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.row + .row { border-top: 1px solid var(--hair); }
.row > summary {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  padding: var(--s4) var(--s5);
  list-style: none;
  cursor: pointer;
  transition: background .16s;
}
.row > summary::-webkit-details-marker { display: none; }
.row > summary:hover { background: color-mix(in srgb, var(--bg-tint) 55%, transparent); }
.row .flag { width: 30px; font-size: 22px; margin-top: 2px; text-align: center; }
.row .flag-code { width: 30px; height: 22px; font-size: 10.5px; }
.row-main { flex: 1; min-width: 0; }
.row h4 { margin: 0; font-size: 15.5px; font-weight: 600; line-height: 1.45; color: var(--ink); }
.row h4 .pick-mark { margin-left: var(--s2); vertical-align: 2px; font-weight: 500; color: var(--accent); background: var(--accent-wash); }
.row .sub { margin: 1px 0 0; }
.row-line {
  display: -webkit-box;
  margin: var(--s2) 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.row[open] .row-line { display: none; }
.row[open] .row-main .tags { margin-top: var(--s2); }
.chev {
  flex: none;
  width: 8px; height: 8px;
  margin: 9px 4px 0 0;
  border-right: 1.5px solid var(--faint);
  border-bottom: 1.5px solid var(--faint);
  transform: rotate(45deg);
  transition: transform .2s;
}
.row[open] .chev { transform: rotate(-135deg); margin-top: 13px; }
.row-body { padding: 0 var(--s5) var(--s5) calc(var(--s5) + 30px + var(--s3)); }
.row-body .facts { margin: 0 0 var(--s4); padding: var(--s4) 0; }
.row-body .notes { font-size: 14px; }
.row-body .gaps { margin-top: var(--s4); }
.row-body .official { margin-top: var(--s4); }
.tier-blocked .row { opacity: .72; }
.tier-blocked .row:hover, .tier-blocked .row[open] { opacity: 1; }

.more { display: block; margin: var(--s3) auto 0; }

@media (max-width: 620px) {
  .verdict-panel { padding: var(--s5); }
  .tabs { margin-left: calc(var(--s2) * -1); margin-right: calc(var(--s2) * -1); }
  .tabs button { font-size: 11.5px; }
  .tabs button span { font-size: 18px; }
  .row > summary { padding: var(--s4); }
  .row-body { padding: 0 var(--s4) var(--s4); }
  .row-body .facts { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   免责声明与页脚
   ============================================================ */

.disclaimer {
  background: transparent;
  border: 1px solid var(--line);
  border-left: 2px solid var(--near);
}
.disclaimer h2 {
  margin: 0 0 var(--s3);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
}
.disclaimer ul {
  margin: 0;
  padding-left: var(--s5);
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--muted);
}
.disclaimer li { margin-bottom: var(--s2); }
.disclaimer li::marker { color: var(--near); }
.disclaimer b { color: var(--ink); font-weight: 600; }

footer {
  border-top: 1px solid var(--line);
  padding: var(--s7) 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--faint);
}
footer p { margin: var(--s1) 0; }
footer a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }
footer a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ============================================================
   详情页
   ============================================================ */

.detail-head {
  padding: var(--s7) 0 var(--s6);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--bg));
}
.back {
  display: inline-block;
  margin-bottom: var(--s5);
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
}
.back:hover { color: var(--accent); }

.d-title { display: flex; gap: var(--s5); align-items: center; }
.d-flag { font-size: 40px; line-height: 1; flex: none; }
.d-country {
  margin: 0 0 var(--s1);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--faint);
}
.detail-head h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(26px, 4.4vw, 38px);
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.2;
}
.d-badges { margin-top: var(--s5); }

.d-block h2 {
  margin: 0 0 var(--s4);
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
}
.d-facts { margin-top: var(--s6); margin-bottom: 0; border-bottom: 0; padding-bottom: 0; }

.d-req { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.d-source { margin: var(--s4) 0 0; font-size: 12.5px; color: var(--faint); }
.d-source a { color: var(--accent); }
.d-req tr + tr th, .d-req tr + tr td { border-top: 1px solid var(--hair); }
.d-req th {
  width: 122px;
  padding: var(--s3) var(--s4) var(--s3) 0;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  vertical-align: top;
  white-space: nowrap;
}
.d-req td { padding: var(--s3) 0; color: var(--ink-soft); }
.d-req-sum { margin: 0 0 var(--s3); }
.d-req-hint { margin: 0 0 var(--s3); }
.d-me { margin: 4px 0 0; font-size: 13px; font-weight: 600; line-height: 1.5; color: var(--muted); }
.d-me > span { display: inline-block; width: 1.1em; }
.d-me.is-ok { color: var(--ok); }
.d-me.is-bad { color: var(--far); }
.d-me.is-warn { color: var(--near); }
.d-me.is-ask { color: var(--muted); }
@media (max-width: 620px) {
  .d-req th { width: 84px; padding-right: var(--s3); white-space: normal; }
}

.d-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.d-steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 var(--s5) var(--s8);
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink-soft);
}
.d-steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0; top: 0;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  opacity: .6;
}
/* 竖线把步骤串起来，最后一条不画 */
.d-steps li::after {
  content: '';
  position: absolute;
  left: 9px; top: 24px; bottom: 4px;
  border-left: 1px solid var(--hair);
}
.d-steps li:last-child { padding-bottom: 0; }
.d-steps li:last-child::after { display: none; }

.d-list { margin: 0; padding-left: var(--s5); font-size: 14.5px; line-height: 1.8; color: var(--ink-soft); }
.d-list li { margin-bottom: var(--s2); }
.d-warn { border-left: 2px solid var(--near); }
.d-warn li::marker { color: var(--near); }

.d-links { margin: 0; padding: 0; list-style: none; }
.d-links li { padding: var(--s2) 0; }
.d-links li + li { border-top: 1px solid var(--hair); }
.d-links a { font-size: 14.5px; color: var(--accent); text-decoration: none; }
.d-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

.d-todo { border-left: 2px solid var(--line); }
.d-todo h2 { color: var(--muted); }

.card-links { display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; }
.official.secondary { color: var(--muted); border-bottom-color: var(--line); }
.official.secondary:hover { color: var(--ink); }

/* ============================================================
   数字游民专页
   ============================================================ */

.prose p { margin: 0 0 var(--s4); font-size: 15px; line-height: 1.9; color: var(--ink-soft); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose em { font-style: italic; color: var(--ink); }
.prose blockquote {
  margin: var(--s5) 0;
  padding: var(--s3) 0 var(--s3) var(--s5);
  border-left: 2px solid var(--accent);
  font-family: var(--display);
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink);
}

.btn-link {
  display: block;
  width: 100%;
  margin-top: var(--s7);
  padding: 15px;
  text-align: center;
  text-decoration: none;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  color: var(--panel);
  background: var(--accent);
  border-radius: var(--r-md);
  transition: background .16s;
}
.btn-link:hover { background: var(--accent-ink); }

/* 宽表格自己横向滚动，页面本身不出现横向滚动条 */
.table-scroll {
  overflow-x: auto;
  margin-top: var(--s5);
  -webkit-overflow-scrolling: touch;
}

.cmp { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
.cmp th {
  padding: 0 var(--s4) var(--s3) 0;
  text-align: left;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.cmp td {
  padding: var(--s4) var(--s4) var(--s4) 0;
  border-bottom: 1px solid var(--hair);
  vertical-align: top;
  color: var(--ink-soft);
}
.cmp tr:last-child td { border-bottom: 0; }
.cmp b { font-size: 15.5px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.cmp .unit { font-size: 11.5px; font-weight: 400; color: var(--faint); margin-left: 1px; }
.cmp .sub2 { display: block; margin-top: 2px; font-size: 11.5px; color: var(--faint); }
.cmp .flag-note { font-style: normal; color: var(--near); }
.cmp .c-flag { margin-right: var(--s2); }
.cmp a { color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line); }
.cmp a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.cmp .diff { letter-spacing: 1.5px; font-size: 10px; white-space: nowrap; }

.pr-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.pr-tag.yes { color: var(--ok); background: var(--ok-wash); }
.pr-tag.no { color: var(--muted); background: var(--bg-tint); }

/* ============================================================
   护照和居留卡：换护照专页、详情页的一节、当地概况里的一行
   ============================================================ */

.facts-nums.pp-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pp-block h3, .pp-more h3 { margin: var(--s5) 0 var(--s2); font-size: 15px; font-weight: 600; color: var(--ink); }
.pp-block h2 + h3 { margin-top: var(--s3); }
.pp-list { margin: var(--s3) 0 0; padding: 0 0 0 1.1em; font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.pp-list li + li { margin-top: 6px; }
.pp-list b { color: var(--ink); font-weight: 600; }
.facts-passport { margin: var(--s3) 0 0; font-size: 13.5px; color: var(--ink-soft); }
.facts-passport b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.facts-passport a { margin-left: .3em; color: var(--accent); }

.pp-mine { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr); gap: var(--s5); align-items: start; }
.pp-pick { margin: 0; }
.pp-mine-text .notes { margin: 0; }
.pp-mine-num { margin: 0; font-size: 15px; color: var(--ink); }
.pp-mine-num b { font-family: var(--display); font-size: 22px; font-variant-numeric: tabular-nums; }
.pp-origin { margin-top: var(--s2) !important; font-size: 13.5px; }
.pp-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); }
.pp-tools h2 { margin: 0; }
.pp-table .pp-toggle {
  padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--ink);
  border-bottom: 1px dashed var(--line); cursor: pointer;
}
.pp-table .pp-toggle::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 7px; border: solid var(--faint); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform .15s; }
.pp-table .pp-toggle[aria-expanded="true"]::after { transform: rotate(-135deg); margin-bottom: -1px; }
.pp-table .pp-toggle:hover { color: var(--accent); border-bottom-color: var(--accent); }
.pp-table .pp-note { display: block; margin-top: 3px; font-size: 11.5px; font-style: normal; color: var(--ok); }
.pp-table .pp-up { color: var(--ok); }
.pp-table .pp-years { font-size: 13.5px; }
.pp-table th .sub2 { font-weight: 400; letter-spacing: 0; }
.pp-table .pp-steps { margin-top: var(--s3); }
.pp-table .pp-steps li { padding-bottom: var(--s3); font-size: 13.5px; }
.pp-table tr.pp-off td { color: var(--faint); }
.pp-table tr:target td { background: var(--accent-wash, color-mix(in srgb, var(--accent) 8%, transparent)); }
.pp-table .pp-more td { padding-top: 0; background: color-mix(in srgb, var(--bg-tint) 45%, var(--panel)); }
.pp-table .pp-more td > :first-child { margin-top: var(--s3); }
.pp-table .pp-more .notes { font-size: 13.5px; }
.pp-table .pp-more a { font-weight: 400; }
.pp-permits { margin: var(--s4) 0 0; padding: 0; list-style: none; display: grid; gap: var(--s3); }
.pp-permits li {
  padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-md);
  font-size: 14px; line-height: 1.7; color: var(--ink-soft);
}
.pp-permits b { display: block; color: var(--ink); font-size: 15px; }
.pp-permits .pp-from { display: block; margin-bottom: 2px; font-size: 12.5px; color: var(--faint); }

@media (max-width: 620px) {
  .facts-nums.pp-nums { grid-template-columns: minmax(0, 1fr); }
  .pp-mine { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
}

/* ============================================================
   大学生专题
   ============================================================ */

.student-kicker, .eyebrow {
  display: block; margin: 0 0 var(--s3); font-size: 13px; font-weight: 600; color: var(--accent);
}
.student-kicker { margin-bottom: var(--s4); color: var(--hero-soft); }
.student-intro-grid { display: grid; grid-template-columns: minmax(190px, .7fr) minmax(0, 1.5fr); gap: var(--s8); align-items: start; }
.student-intro-grid h2, .section-head h2 { margin: 0; font-family: var(--display); font-size: 27px; font-weight: 600; letter-spacing: -.01em; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s4); margin-bottom: var(--s5); }
.section-head h2 { font-size: 25px; }
.section-note { font-size: 12px; color: var(--faint); }
.student-form-panel { padding-bottom: var(--s8); }
.student-quiz { margin-top: var(--s5); }
.student-q { border-top: 1px solid var(--hair); margin: 0; padding: var(--s6) 0 0; }
.student-q:first-child { border-top: 0; padding-top: 0; }
.student-q + .student-q { margin-top: var(--s5); }
.student-q legend { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; width: 100%; font-size: 16px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); }
.student-q legend em { flex-basis: 100%; margin: 0 0 0 32px; font-style: normal; font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--faint); }
.q-index { flex: none; font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--accent); opacity: .62; }
.student-q .chips { margin-top: var(--s4); }
.q-optional { padding: 1px 8px; font-size: 11.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; }
.student-progress { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--hair); }
.student-progress p { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--muted); }
.student-progress p.is-done { color: var(--ok); font-weight: 600; }
.student-progress .ghost { flex: none; }
.student-progress .ghost[hidden] { display: none; }
.student-chip span { background: var(--bg); }
.student-number { width: 180px !important; margin-top: var(--s4); }
.student-empty { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s4); font-size: 15px; color: var(--muted); }
.student-empty span { font-size: 12px; color: var(--faint); }
.student-result-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--s6); gap: var(--s4); }
.student-result-head h2 { margin: 0; font-family: var(--display); font-size: 28px; font-weight: 600; }
.student-next { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--hair); }
.student-next h3 { margin: 0 0 var(--s3); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.student-next ul { margin: 0; padding-left: var(--s5); color: var(--ink-soft); }
.student-next li { margin-bottom: var(--s2); font-size: 14px; }
.student-results-list { display: grid; gap: var(--s5); margin-bottom: var(--s8); }
.student-card { position: relative; padding: var(--s7); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); animation: rise .4s cubic-bezier(.22,.8,.3,1) backwards; }
.student-card::before { content: ''; position: absolute; top: 0; left: var(--s7); right: var(--s7); height: 2px; background: var(--muted); border-radius: 0 0 2px 2px; }
.student-card.ok::before { background: var(--ok); } .student-card.near::before { background: var(--near); } .student-card.far::before { background: var(--far); }
.student-card.no { opacity: .65; } .student-card.no:hover { opacity: 1; }
.student-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s4); flex-wrap: wrap; }
.student-name { display: flex; align-items: center; gap: var(--s4); }
.student-flag { font-size: 27px; line-height: 1; }
.student-country { display: block; margin-bottom: var(--s1); font-size: 11px; color: var(--faint); letter-spacing: .04em; }
.student-card h3 { margin: 0; font-family: var(--display); font-size: 21px; font-weight: 600; }
.student-status { padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.student-status.ok { color: var(--ok); background: var(--ok-wash); } .student-status.near { color: var(--near); background: var(--near-wash); } .student-status.far { color: var(--far); background: var(--far-wash); } .student-status.no { color: var(--muted); background: var(--bg-tint); }
.student-tags { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s5) 0; }
.student-tags span { padding: 3px 9px; border: 1px solid var(--hair); border-radius: 999px; font-size: 11px; color: var(--muted); }
.student-platform-warning { margin: var(--s5) 0; padding: var(--s3) var(--s4); color: var(--near); background: var(--near-wash); border-left: 2px solid var(--near); border-radius: var(--r-sm); font-size: 13px; }
.student-summary-text { margin: 0; font-size: 14px; line-height: 1.8; color: var(--ink-soft); }
.student-summary-text strong, .student-card .gaps strong { color: var(--ink); font-weight: 600; }
.student-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); margin: var(--s6) 0 0; padding: var(--s5) 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.student-facts dt { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.student-facts dd { margin: var(--s2) 0 0; font-size: 13px; line-height: 1.6; color: var(--ink-soft); }
.student-gaps { margin-top: var(--s5); }
.student-card-links { display: flex; gap: var(--s5); flex-wrap: wrap; margin-top: var(--s5); }
.student-card-links a { color: var(--accent); font-size: 13.5px; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.student-card-links a:hover { border-bottom-color: var(--accent); }
.student-card-links a + a { color: var(--muted); border-bottom-color: var(--line); }
.student-meta { display: block; margin-top: var(--s4); font-size: 11px; color: var(--faint); }
.student-cmp .sub2 { max-width: 220px; }
.student-c-flag { margin-right: var(--s2); }
.student-method { background: var(--accent-wash); border-color: color-mix(in srgb, var(--accent) 15%, var(--line)); }
.student-detail-page .detail-head { background: linear-gradient(180deg, var(--accent-wash), var(--bg)); }
.student-detail-facts { margin: var(--s6) 0 0; padding-bottom: 0; border-bottom: 0; }
.student-detail-block { margin-bottom: var(--s6); }
.student-nature { margin: 0 0 var(--s3); color: var(--accent); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.student-branches { margin-top: var(--s6); }
.student-branch { padding: var(--s5); background: var(--bg-tint); border-radius: var(--r-md); }
.student-branch + .student-branch { margin-top: var(--s3); }
.student-branch h3 { margin: 0 0 var(--s3); font-family: var(--display); font-size: 17px; font-weight: 600; }
.student-branch .d-list { margin: 0; }
.student-kind { display: inline-grid; place-items: center; width: 19px; height: 19px; margin-right: var(--s2); border-radius: 50%; font-size: 10px; font-weight: 700; }
.student-kind.hard { color: var(--far); background: var(--far-wash); } .student-kind.soft { color: var(--near); background: var(--near-wash); }
.student-rights { display: grid; grid-template-columns: 140px 1fr; gap: var(--s3) var(--s5); margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--hair); }
.student-rights h3 { margin: 0; font-size: 12px; color: var(--muted); } .student-rights p { margin: 0; font-size: 14px; color: var(--ink-soft); }
.student-link-kind { display: inline-block; min-width: 38px; margin-right: var(--s3); font-size: 11px; color: var(--faint); }
.student-detail-links a { font-size: 14px; }
.student-faq { border-top: 1px solid var(--hair); padding: var(--s4) 0; }
.student-faq:last-child { border-bottom: 1px solid var(--hair); }
.student-faq summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.student-faq p { margin: var(--s3) 0 0; font-size: 14px; color: var(--muted); }

@media (max-width: 620px) {
  .student-intro-grid { grid-template-columns: 1fr; gap: var(--s4); }
  .section-head { display: block; } .section-note { display: block; margin-top: var(--s2); }
  .student-facts { grid-template-columns: 1fr; gap: var(--s3); }
  .student-facts dd { margin-top: 0; }
  .student-empty { display: block; } .student-empty span { display: block; margin-top: var(--s2); }
  .student-rights { grid-template-columns: 1fr; gap: var(--s2); }
  .student-q legend em { margin-left: 0; }
  .student-number { width: 100% !important; }
}


.student-guide-intro { margin: var(--s4) 0 0; padding-top: var(--s4); border-top: 1px solid var(--hair); font-size: 14px; color: var(--ink-soft); }
.student-age-callout { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s5); padding: var(--s4) var(--s5); background: var(--accent-wash); border-radius: var(--r-md); }
.student-age-callout span { font-size: 12px; color: var(--muted); }
.student-age-callout strong { font-family: var(--display); font-size: 19px; font-weight: 600; color: var(--accent-ink); }
.student-special-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.student-special { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s4); background: var(--bg-tint); border-radius: var(--r-md); }
.student-special > span { flex: none; font-family: var(--display); font-size: 13px; color: var(--accent); opacity: .7; }
.student-special p { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--ink-soft); }
.student-checklist { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--hair); }
.student-checklist label { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3) 0; cursor: pointer; }
.student-checklist input { flex: none; width: 16px; height: 16px; margin-top: 3px; }
.student-checklist label > span { display: flex; gap: var(--s3); align-items: baseline; font-size: 14px; color: var(--ink-soft); }
.student-checklist label > span b { flex: none; font-family: var(--display); font-weight: 600; color: var(--accent); opacity: .65; }
.student-checklist input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }
.student-checklist input:checked + span b { text-decoration: none; }

@media (max-width: 620px) {
  .student-special-grid { grid-template-columns: 1fr; }
  .student-age-callout { display: block; }
  .student-age-callout strong { display: block; margin-top: var(--s1); }
}


@media (max-width: 620px) {
  .wrap { padding: 0 var(--s4); }
  .hero { padding: var(--s7) 0 calc(var(--s7) + 32px); }
  .panel, .card { padding: var(--s5); }
  .card::before { left: var(--s5); right: var(--s5); }
  .facts { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
  .stat + .stat::before { display: none; }
  .bottleneck li { flex-wrap: wrap; }
  .bottleneck em { margin-left: 0; width: 100%; }
}

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


/* ============================================================
   香港专题页
   ============================================================ */

.hk-quiz { margin-top: var(--s5); }
.hk-q { border-top: 1px solid var(--hair); margin: 0; padding: var(--s5) 0 0; }
.hk-q:first-child { border-top: 0; padding-top: 0; }
.hk-q legend { font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); }
.hk-q legend em {
  display: block;
  margin: var(--s1) 0 0;
  font-style: normal;
  font-size: 12.5px;
  color: var(--faint);
}
.hk-q .chips { margin-top: var(--s3); margin-bottom: var(--s5); }
.hk-school { margin-top: var(--s3); max-width: 480px; }
.hk-q .refine-source { margin: var(--s2) 0 var(--s5); }
.hk-q .chip input { position: absolute; opacity: 0; width: 0; height: 0; }

.hk-summary .hk-none {
  margin: var(--s5) 0 0;
  padding-top: var(--s5);
  border-top: 1px solid var(--hair);
  font-size: 14px;
}

.hk-card { border-left: 3px solid var(--line); }
.hk-card.ok { border-left-color: var(--ok); }
.hk-card.near { border-left-color: var(--near); }
.hk-card.ask { border-left-color: var(--accent); }
.hk-card.no { border-left-color: var(--no); opacity: .72; }
.hk-card.no:hover { opacity: 1; }

.hk-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s4);
  flex-wrap: wrap;
}
.hk-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  flex-wrap: wrap;
}
.hk-tag {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  padding: 2px 9px;
  border: 1px solid var(--hair);
  border-radius: 999px;
}
.hk-status {
  flex: none;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
}
.hk-status.ok { color: var(--ok); background: var(--ok-wash); }
.hk-status.near { color: var(--near); background: var(--near-wash); }
.hk-status.ask { color: var(--accent); background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.hk-status.no { color: var(--muted); background: var(--bg-tint); }

.hk-notes { margin-top: var(--s5); font-size: 14px; line-height: 1.8; }
.hk-notes li { margin-bottom: var(--s2); }
.hk-notes li::marker { color: var(--accent); }

.hk-verified { margin-left: var(--s4); font-size: 11.5px; color: var(--faint); }

.hk-uncertain li { margin-bottom: var(--s4); }
.hk-uncertain b { color: var(--ink); }

/* ── 学生攻略完整版：阶段进度与逐项材料 ── */
.student-guide-intro { margin: var(--s4) 0 0; padding: var(--s4) var(--s5); background: var(--accent-wash); border-left: 2px solid var(--accent); font-size: 14px; line-height: 1.8; color: var(--ink-soft); }
.student-age-callout { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s5); padding: var(--s4) var(--s5); background: var(--accent-wash); border-radius: var(--r-md); }
.student-age-callout span { font-size: 12px; color: var(--muted); }
.student-age-callout strong { font-family: var(--display); font-size: 19px; font-weight: 600; color: var(--accent-ink); }
.student-special-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.student-special { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s4); background: var(--bg-tint); border-radius: var(--r-md); }
.student-special > span { flex: none; font-family: var(--display); font-size: 13px; color: var(--accent); opacity: .7; }
.student-special p { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--ink-soft); }
.student-timeline { position: relative; margin-top: var(--s5); }
.student-timeline::before { content: ''; position: absolute; left: 16px; top: 18px; bottom: 18px; border-left: 1px solid var(--line); }
.student-timeline-step { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: var(--s4); padding-bottom: var(--s6); }
.student-timeline-step:last-child { padding-bottom: 0; }
.student-timeline-mark { position: relative; z-index: 1; width: 34px; height: 34px; display: grid; place-items: center; font-family: var(--display); font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-wash); border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); border-radius: 50%; }
.student-timeline-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); border-bottom: 1px solid var(--hair); padding-bottom: var(--s2); }
.student-timeline-title h3 { margin: 0; font-family: var(--display); font-size: 17px; font-weight: 600; color: var(--ink); }
.student-timeline-title span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.student-timeline-step .d-list { margin: var(--s3) 0 0; font-size: 13.5px; color: var(--ink-soft); }
.student-progress { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--hair); }
.student-progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s4); font-size: 13px; color: var(--muted); }
.student-progress-head strong { color: var(--ink); font-weight: 600; }
.student-progress-head span { font-size: 12px; }
.student-progress-head b { color: var(--accent); font-variant-numeric: tabular-nums; }
.student-progress-track { height: 7px; margin-top: var(--s3); overflow: hidden; background: var(--bg-tint); border-radius: 999px; }
.student-progress-track span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .25s ease; }
.student-checklist { margin-top: var(--s4); }
.student-checklist label { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3) var(--s2); border-bottom: 1px solid var(--hair); cursor: pointer; }
.student-checklist label:last-child { border-bottom: 0; }
.student-checklist input { flex: none; width: 16px; height: 16px; margin-top: 3px; accent-color: var(--accent); }
.student-checklist label > span { display: grid; grid-template-columns: 28px 1fr; gap: 0 var(--s2); align-items: baseline; width: 100%; }
.student-checklist label > span > b { grid-row: span 3; font-family: var(--display); font-weight: 600; color: var(--accent); opacity: .65; }
.student-checklist label strong { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.student-checklist label small, .student-checklist label em { grid-column: 2; font-style: normal; font-size: 12px; line-height: 1.55; color: var(--muted); }
.student-checklist label em { color: var(--faint); }
.student-checklist input:checked + span strong { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }

@media (max-width: 620px) {
  .student-special-grid { grid-template-columns: 1fr; }
  .student-age-callout { display: block; }
  .student-age-callout strong { display: block; margin-top: var(--s1); }
  .student-timeline-title { display: block; }
  .student-timeline-title span { display: block; margin-top: var(--s1); }
  .student-progress-head { display: block; }
  .student-progress-head span { display: block; margin-top: var(--s1); }
}

/* ── 拿永居、换护照的时间 ───────────────────── */

/* 结果行右侧的两个数字，跨行对齐，方便上下比较快慢 */
.row-time {
  flex: none;
  display: grid;
  gap: 4px;
  min-width: 96px;
  margin-top: 1px;
  text-align: right;
}
.row-time div { display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; }
.row-time span { font-size: 11px; letter-spacing: .04em; color: var(--faint); }
.row-time b {
  font-size: 14px; font-weight: 600; color: var(--ink);
  font-variant-numeric: lining-nums tabular-nums;
}
.row-time div + div b { color: var(--accent); }
.row-time.is-uncertain div:not(.is-none) b::after { content: '?'; margin-left: 1px; font-size: 11px; font-weight: 500; color: var(--near); }
.row-time .is-none b { font-weight: 400; color: var(--faint); }

.tl-steps { margin: 0; padding-left: 1.3em; }
.tl-steps li { margin: 2px 0; }
.tl-steps li::marker { color: var(--faint); font-size: 12px; }
.facts .wide small { display: block; margin-top: 4px; font-size: 12px; line-height: 1.6; color: var(--muted); }

/* 结论里的两个大数字 */
.fastest {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s3);
  margin-top: var(--s5);
}
.fast-cell {
  display: grid;
  gap: 2px;
  padding: var(--s4) var(--s5);
  background: color-mix(in srgb, var(--bg-tint) 60%, var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.fast-cell > span { font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.fast-cell > b {
  font-family: var(--display); font-size: 28px; font-weight: 600; line-height: 1.25; color: var(--ink);
  font-variant-numeric: lining-nums tabular-nums;
}
.fast-cell + .fast-cell > b { color: var(--accent); }
.fast-cell.is-uncertain > b::after { content: ' ?'; font-family: var(--sans); font-size: 15px; font-weight: 500; color: var(--near); }
.fast-cell small { font-size: 12.5px; line-height: 1.6; color: var(--ink-soft); }
.fast-cell small a { color: inherit; }
.fast-cell .flag { font-size: 14px; }
.fast-cell .flag-code { font-size: 9.5px; }
.fast-note { grid-column: 1 / -1; margin: 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
@media (max-width: 620px) {
  .fast-cell { padding: var(--s3) var(--s4); }
  .fast-cell > b { font-size: 22px; }
}
@media (max-width: 359px) {
  .fastest { grid-template-columns: minmax(0, 1fr); }
}

/* 详情页：拿永居、换护照 */
.d-timeline { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin: 0 0 var(--s5); }
.d-timeline div {
  display: grid; gap: 2px; padding: var(--s3) var(--s4);
  border: 1px solid var(--line); border-radius: var(--r-md);
}
.d-timeline span { font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.d-timeline b { font-family: var(--display); font-size: 24px; font-weight: 600; color: var(--ink); }
.d-timeline div + div b { color: var(--accent); }
.d-block .d-timeline + .d-steps { margin-bottom: var(--s4); }
.d-warn-note { padding-left: var(--s3); border-left: 2px solid var(--near); font-size: 13.5px; }

/* 详情页：积分估算 */
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: var(--s5); align-items: start; margin-top: var(--s4); }
.calc-form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3) var(--s4); }
.calc-field { display: grid; gap: 4px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.calc-field select, .calc-field input {
  width: 100%; padding: 7px 10px; font: inherit; font-size: 13.5px; color: var(--ink);
  background-color: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.calc-field select, .whatif select { padding-right: 30px; }
.calc-field select:focus, .calc-field input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.calc-num { display: flex; align-items: center; gap: 6px; }
.calc-num em { font-style: normal; font-size: 12.5px; color: var(--faint); white-space: nowrap; }
.calc-check {
  grid-column: 1 / -1; display: flex; gap: 8px; align-items: flex-start;
  font-size: 13px; line-height: 1.6; color: var(--ink-soft); cursor: pointer;
}
.calc-check input { margin-top: 4px; accent-color: var(--accent); }
.calc-result {
  position: sticky; top: var(--s4);
  padding: var(--s4) var(--s5);
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: color-mix(in srgb, var(--bg-tint) 60%, var(--panel));
}
.calc-result.is-pass { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.calc-result.is-fail { border-color: color-mix(in srgb, var(--near) 45%, var(--line)); }
.calc-total { display: flex; align-items: baseline; gap: 6px; margin: 0; }
.calc-total b { font-family: var(--display); font-size: 36px; font-weight: 600; line-height: 1.1; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.calc-total span { font-size: 13px; color: var(--muted); }
.calc-total em { margin-left: auto; padding: 2px 8px; font-style: normal; font-size: 12px; border-radius: 999px; }
.is-pass .calc-total em { color: var(--ok); background: var(--ok-wash); }
.is-fail .calc-total em { color: var(--near); background: var(--near-wash); }
.calc-target { margin: var(--s2) 0 0; font-size: 12.5px; line-height: 1.6; color: var(--ink-soft); }
.calc-problems { margin: var(--s2) 0 0; padding-left: 1.1em; font-size: 12.5px; line-height: 1.6; color: var(--near); }
.calc-parts { width: 100%; margin-top: var(--s3); border-collapse: collapse; font-size: 12.5px; }
.calc-parts th { padding: 4px 0; font-weight: 400; text-align: left; color: var(--muted); }
.calc-parts td { padding: 4px 0; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.calc-parts tr + tr th, .calc-parts tr + tr td { border-top: 1px solid var(--hair); }

/* ============================================================
   意见反馈对话框（js/feedback.js，所有页面共用）
   ============================================================ */

.feedback-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}
.feedback-dialog::backdrop { background: rgba(20, 20, 26, .45); }
.feedback-form { display: flex; flex-direction: column; gap: var(--s4); padding: var(--s6); }
.feedback-form h2 { margin: 0; font-family: var(--display); font-size: 20px; }
.feedback-intro, .feedback-privacy { margin: 0; font-size: 13px; line-height: 1.7; color: var(--muted); }
.feedback-kinds { margin: 0; padding: 0; border: 0; }
.feedback-kinds legend { padding: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--muted); }
.feedback-kinds .chips { margin-top: var(--s2); }
.feedback-form textarea, .feedback-form input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  resize: vertical;
}
.feedback-form textarea::placeholder, .feedback-form input::placeholder { color: var(--faint); }
.feedback-form textarea:focus, .feedback-form input[type="text"]:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.feedback-status { margin: 0; min-height: 1.5em; font-size: 13px; font-weight: 600; color: var(--muted); }
.feedback-status.is-ok { color: var(--ok); }
.feedback-status.is-error { color: var(--far); }
.feedback-actions { display: flex; justify-content: flex-end; gap: var(--s3); }
.feedback-actions .primary { width: auto; margin: 0; padding: 10px 22px; font-size: 15px; }
.feedback-actions .primary:disabled { opacity: .6; cursor: progress; }

/* ============================================================
   当地概况：在地图上点国家时出现，详情页底部也用（facts.js）
   ============================================================ */
.panel.country-facts { padding: var(--s5) var(--s6); }
.country-facts[hidden] { display: none; }
.facts-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.facts-head h2, .facts-head h3 {
  display: flex; align-items: center; gap: var(--s2); margin: 0;
  font-family: var(--display); font-size: 20px; font-weight: 600; color: var(--ink);
}
.facts-head h2 span, .facts-head h3 span { font-family: var(--sans); font-size: 13px; font-weight: 400; color: var(--muted); }
.facts-actions { display: flex; gap: var(--s2); }
.facts-actions a { text-decoration: none; }
.facts-nums {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3);
  margin: var(--s4) 0 0;
}
.facts-nums > div {
  display: grid; align-content: start; gap: 2px;
  padding: var(--s3) var(--s4);
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: color-mix(in srgb, var(--bg-tint) 50%, var(--panel));
}
.facts-nums dt { font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.facts-nums dd { display: grid; gap: 2px; margin: 0; }
.facts-nums b { font-family: var(--display); font-size: 22px; font-weight: 600; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.facts-nums small { font-size: 12px; line-height: 1.5; color: var(--muted); }
.facts-more { margin: var(--s2) 0 0; font-size: 13px; color: var(--ink-soft); }
.facts-more b { font-weight: 600; }
.facts-regions, .facts-market { margin-top: var(--s5); }
.facts-regions h4, .facts-market h4 {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s3);
  margin: 0 0 var(--s2); font-size: 14px; font-weight: 600; color: var(--ink);
}
.facts-regions h4 small, .facts-market h4 small { font-size: 12px; font-weight: 400; color: var(--faint); }
.facts-regions ul { margin: 0; padding: 0; list-style: none; }
.facts-regions li {
  display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr) 3.4em; align-items: center; gap: var(--s3);
  padding: 3px 0; font-size: 13px; color: var(--ink-soft);
}
.facts-regions li span { min-width: 0; }
.facts-regions li span small { margin-left: 6px; font-size: 11.5px; color: var(--faint); }
.facts-regions li i { position: relative; height: 8px; border-radius: 4px; background: var(--hair); }
/* 竖线：全国平均 */
.facts-regions li i::after {
  content: ''; position: absolute; top: -3px; bottom: -3px; left: var(--nat);
  width: 2px; background: var(--ink-soft); opacity: .55;
}
.facts-regions li em { display: block; height: 100%; border-radius: 4px; }
.facts-regions li.lo em { background: color-mix(in srgb, var(--ok) 60%, var(--panel)); }
.facts-regions li.hi em { background: color-mix(in srgb, var(--far) 60%, var(--panel)); }
.facts-regions li b { font-weight: 600; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.facts-market p { margin: 0 0 var(--s2); font-size: 13.5px; line-height: 1.7; color: var(--ink-soft); }
.facts-market dl { display: grid; gap: 4px; margin: 0; }
.facts-market dl div { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: var(--s3); font-size: 13px; line-height: 1.6; }
.facts-market dt { color: var(--muted); }
.facts-market dd { margin: 0; color: var(--ink-soft); }
.facts-note { margin: var(--s2) 0 0; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.facts-src { margin: var(--s4) 0 0; font-size: 11.5px; line-height: 1.7; color: var(--faint); }
.facts-src a { color: inherit; }
.facts-market .facts-src { margin-top: var(--s2); }
@media (max-width: 620px) {
  .panel.country-facts { padding: var(--s4); }
  .facts-nums {
    grid-template-columns: minmax(0, 1fr); gap: 0;
    border: 1px solid var(--line); border-radius: var(--r-md);
    background: color-mix(in srgb, var(--bg-tint) 50%, var(--panel));
  }
  .facts-nums > div {
    grid-template-columns: 6.5em minmax(0, 1fr); align-items: baseline;
    padding: var(--s2) var(--s3); border: 0; border-radius: 0; background: none;
  }
  .facts-nums > div + div { border-top: 1px solid var(--hair); }
  .facts-nums dd { gap: 0; }
  .facts-nums b { font-size: 19px; }
  .facts-regions li { grid-template-columns: minmax(0, 1fr) 30% 3.2em; }
  .facts-regions li span small { display: block; margin: 0; }
  .facts-market dl div { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* 专题页里折起来的长文：先给工具，想看的再点开 */
details.essay > summary {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3);
  cursor: pointer; list-style: none;
}
details.essay > summary::-webkit-details-marker { display: none; }
details.essay > summary h2 { margin: 0; }
details.essay > summary h2::after { content: ' ›'; font-weight: 400; color: var(--faint); }
details.essay[open] > summary h2::after { content: ' ⌄'; }
details.essay > summary span { font-size: 13px; color: var(--muted); }
details.essay[open] > summary { margin-bottom: var(--s4); }

/* ============================================================
   我的计划（plan.html）、导航里的计划入口、「加入计划」按钮
   ============================================================ */

.site-nav .nav-plan { position: relative; display: inline-flex; align-items: center; gap: 5px; }
.nav-badge {
  min-width: 18px; padding: 0 5px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; line-height: 18px; text-align: center;
  color: var(--hero-bg); background: var(--hero-home);
}
.nav-plan.has-news::after {
  content: ''; position: absolute; top: 5px; right: 4px;
  width: 7px; height: 7px; border-radius: 50%; background: #ff6b5a;
  box-shadow: 0 0 0 2px var(--hero-bg);
}
@media (max-width: 620px) {
  /* 窄屏导航要横向滚动，「我的计划」放最前面，不会被挤到看不见 */
  .site-nav .nav-plan { order: -1; }
}

.plan-btn {
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  font: inherit; font-size: 13px; color: var(--ink-soft); background: var(--panel); cursor: pointer;
  transition: color .16s, border-color .16s, background .16s;
}
.plan-btn:hover { color: var(--accent); border-color: var(--accent); }
.plan-btn[aria-pressed="true"] { color: var(--near); border-color: color-mix(in srgb, var(--near) 50%, transparent); background: var(--near-wash); }
.pick .plan-btn { margin-top: var(--s3); }

.plan-hero h1 { margin-bottom: var(--s3); }
.plan-hero .privacy { margin-top: var(--s4); }
#plan { display: grid; gap: var(--s5); padding-top: var(--s6); padding-bottom: var(--s8); }
#plan > .panel { margin: 0; }
.plan-loading { color: var(--muted); }

.plan-me-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s4); }
.plan-me-head h2 { margin: 0 0 var(--s3); font-size: 18px; }
.plan-me-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.plan-me-actions .ghost { text-decoration: none; }

.plan-news { border-color: color-mix(in srgb, var(--near) 40%, var(--line)); background: color-mix(in srgb, var(--near-wash) 55%, var(--panel)); }
.plan-count { display: inline-block; margin-left: 4px; padding: 0 8px; border-radius: 999px; font-size: 13px; color: #fff; background: var(--near); vertical-align: 2px; }
.plan-changes { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s3); font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.plan-changes .tag { margin-right: 6px; }
.plan-changes small { display: block; color: var(--faint); font-size: 12px; }

.plan-card-head { display: flex; align-items: flex-start; gap: var(--s3); }
.plan-flag { font-size: 30px; line-height: 1; }
.plan-card-title { flex: 1; min-width: 0; }
.plan-card-title h2 { margin: 0; font-size: 19px; line-height: 1.35; }
.plan-card-title h2 a { color: var(--ink); text-decoration: none; }
.plan-card-title h2 a:hover { color: var(--accent); }
.plan-card-title .sub { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.plan-status { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.plan-status.is-ok { color: var(--ok); background: var(--ok-wash); }
.plan-status.is-near { color: var(--near); background: var(--near-wash); }
.plan-status.is-far { color: var(--far); background: var(--far-wash); }
.plan-status.is-bad { color: var(--no); background: var(--no-wash); }
.plan-status.is-ask { color: var(--accent); background: var(--accent-wash); }

.plan-gaps, .plan-windows { margin-top: var(--s4); font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.plan-gaps ul, .plan-windows ul { margin: var(--s1) 0 0; padding-left: var(--s5); }
.plan-gaps li.hard { color: var(--far); }
.plan-windows { padding: var(--s3) var(--s4); border-radius: var(--r-sm); background: var(--near-wash); }
.plan-windows b { color: var(--near); }
.plan-ok { margin: var(--s4) 0 0; color: var(--ok); font-size: 14px; }
.plan-card .mini-facts { margin-top: var(--s4); }

.plan-progress { height: 8px; margin-top: var(--s5); border-radius: 999px; background: var(--hair); overflow: hidden; }
.plan-progress span { display: block; height: 100%; border-radius: inherit; background: var(--ok); transition: width .25s; }
.plan-progress-text { margin: var(--s2) 0 0; font-size: 13px; color: var(--muted); }
.plan-list { margin-top: var(--s3); border-top: 1px solid var(--hair); }
.plan-list > summary { padding: var(--s3) 0; font-weight: 600; font-size: 14.5px; cursor: pointer; }
.checklist { margin: 0 0 var(--s3); padding: 0; list-style: none; display: grid; gap: var(--s2); }
.checklist label { display: flex; gap: var(--s3); align-items: flex-start; font-size: 14px; line-height: 1.7; color: var(--ink-soft); cursor: pointer; }
.checklist input { flex: none; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--ok); }
.checklist input:checked + span { color: var(--faint); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--faint) 60%, transparent); }
.plan-remove { margin-left: auto; color: var(--muted); }

.plan-follow-form { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.plan-follow-form input { flex: 1 1 220px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); font: inherit; color: var(--ink); background: var(--panel); }
.plan-follow-status { min-height: 1.5em; margin: var(--s2) 0 0; font-size: 14px; color: var(--ink-soft); }
.plan-extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s5); }
.plan-extras .panel { margin: 0; }
.plan-extras h2, .plan-follow h2, .plan-empty h2, .plan-news h2 { margin: 0 0 var(--s2); font-size: 18px; }
.plan-shared { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--accent-wash); }
.plan-shared p { margin: 0 0 var(--s3); }
.foot-privacy { font-size: 12.5px; color: var(--faint); }

/* ── 结果页：时间窗口、如果…会怎样、两人对比 ───────────────────────── */

.time-windows { margin-top: var(--s5); padding: var(--s4) var(--s5); border-radius: var(--r-sm); background: var(--near-wash); }
.time-windows h3 { margin: 0 0 var(--s2); font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--near); }
.time-windows ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s3); }
.time-windows li { display: flex; align-items: flex-start; gap: var(--s3); font-size: 13.5px; line-height: 1.65; }
.time-windows li .flag { font-size: 20px; }
.time-windows li div { display: grid; gap: 1px; min-width: 0; }
.time-windows a { font-weight: 600; color: var(--ink); text-decoration: none; }
.time-windows a:hover { color: var(--accent); }
.time-windows span { color: var(--ink-soft); }

.whatif-grid { margin-top: var(--s5); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.whatif-out { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--hair); }
.whatif-out h3 { margin: var(--s4) 0 var(--s1); font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--muted); }
.whatif-out .move-routes li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s2); padding: 3px 0; font-size: 13px; }
.whatif-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--s3); margin: 0; }
.whatif-counts div { padding: var(--s3); border-radius: var(--r-sm); background: var(--hair); }
.whatif-counts dt { font-size: 12px; color: var(--muted); }
.whatif-counts dd { margin: 2px 0 0; font-size: 14px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.whatif-counts dd b { font-size: 18px; color: var(--ink); }
.whatif-counts .up, .whatif-counts .down { margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.whatif-counts .up { color: var(--ok); background: var(--ok-wash); }
.whatif-counts .down { color: var(--far); background: var(--far-wash); }

.partner h2 { margin: 0 0 var(--s2); font-family: var(--display); font-size: 19px; font-weight: 600; }
.partner-lead { margin: 0 0 var(--s4); font-size: 14.5px; line-height: 1.75; color: var(--ink-soft); }
.partner-lead b { color: var(--ink); }
.partner-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.partner-table th, .partner-table td { padding: var(--s2) var(--s3); text-align: left; border-bottom: 1px solid var(--hair); }
.partner-table thead th { font-size: 12px; font-weight: 600; color: var(--muted); }
.partner-table tbody th { font-weight: 500; color: var(--muted); white-space: nowrap; }
.partner-table td b { font-size: 17px; color: var(--ink); }
.partner-only { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s4); margin-top: var(--s4); }
.partner-only h3 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--muted); }
.partner-only .move-routes li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s2); padding: 3px 0; font-size: 13px; }
.partner-note { padding: var(--s3) var(--s4); border-radius: var(--r-sm); font-size: 13.5px; color: var(--ink-soft); background: var(--accent-wash); }
.partner-note b { color: var(--accent); }

/* 详情页：加入计划、变化记录、居留天数计算器入口 */
.d-plan { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin: var(--s4) 0 0; font-size: 12.5px; color: var(--muted); }
.d-changes { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s3); font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.d-changes .tag { margin-right: 6px; }
.d-changes small { display: block; color: var(--faint); font-size: 12px; }
