/* =========================================================================
   失业了咋办？保姆级攻略
   视觉体系：Apple Liquid Glass（apple-design-skill）
     · 冷灰底 #f5f5f7 + 纯白面板 + 发丝分隔线 rgba(0,0,0,.07)
     · 同级内容在一个面板上用 hairline 分隔 —— 禁止拆成一堆带边框的小卡片
     · 玻璃只用在粘性导航（唯一真正发生层叠的地方）
     · 层级靠字重/字号/灰度建立；颜色只给「强调(蓝)」和「要紧(橙红)」
     · 数字统一 tabular-nums，大标题负字距，触控目标 ≥44px
   移动优先；断点 560 / 680 / 760 / 900 / 1024
   ========================================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --hover: #f5f5f7;
  --text: #1d1d1f;
  --text-body: #3a3a3c;
  --text-2: #515156;          /* 次要：白底 7.8:1 */
  --text-3: #6e6e73;          /* 三级/说明：白底 5.0:1，均达 WCAG AA */
  --text-4: #8e8e93;          /* 仅装饰（图标/占位），不用于可读正文 */
  --faint: #d2d2d7;
  --hairline: rgba(0, 0, 0, .07);
  --hairline-2: rgba(0, 0, 0, .12);
  --track: #e8e8ed;

  --accent: #0071e3;
  --accent-link: #0066cc;
  --accent-bg: rgba(0, 113, 227, .09);
  --heat: #ff6b00;            /* 紧急 / 要紧 */
  --heat-bg: rgba(255, 107, 0, .1);
  --heat-text: #c2410c;       /* 小字标签要保证对比度 */
  --good: #1d8a4e;
  --good-bg: rgba(29, 138, 78, .1);

  --r-pill: 999px;
  --r-chip: 6px;
  --r-thumb: 12px;
  --r-card: 18px;
  --r-panel: 22px;
  --r-hero: 26px;

  --sh-card: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .05);
  --sh-panel: 0 1px 3px rgba(0, 0, 0, .05), 0 14px 40px rgba(0, 0, 0, .05);
  --sh-lift: 0 12px 32px rgba(0, 0, 0, .1);
  --sh-cta: 0 8px 24px rgba(0, 113, 227, .26);

  --max-read: 720px;
  --max-grid: 1080px;
  --pad-x: clamp(16px, 4.2vw, 28px);
  --header-h: 56px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
          "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
          "Source Han Sans SC", "Noto Sans SC", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ease-spring: cubic-bezier(.32, .72, 0, 1);
  --ease-out: cubic-bezier(.25, 1, .5, 1);
}

html.dark {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --hover: #232326;
  --text: #f5f5f7;
  --text-body: #d1d1d6;
  --text-2: #aeaeb2;          /* 深色表面 6.3:1 */
  --text-3: #98989d;          /* 5.9:1（面板）/ 4.8:1（浅灰面板） */
  --text-4: #8e8e93;          /* 仅装饰 */
  --faint: #48484a;
  --hairline: rgba(255, 255, 255, .1);
  --hairline-2: rgba(255, 255, 255, .18);
  --track: #3a3a3c;

  --accent: #0a84ff;
  --accent-link: #64b5ff;
  --accent-bg: rgba(10, 132, 255, .16);
  --heat: #ff8a3d;
  --heat-bg: rgba(255, 138, 61, .16);
  --heat-text: #ff9f5a;
  --good: #32d74b;
  --good-bg: rgba(50, 215, 75, .16);

  --sh-card: 0 1px 2px rgba(0, 0, 0, .6);
  --sh-panel: 0 1px 3px rgba(0, 0, 0, .6), 0 14px 40px rgba(0, 0, 0, .5);
  --sh-lift: 0 12px 32px rgba(0, 0, 0, .7);
  --sh-cta: 0 8px 24px rgba(10, 132, 255, .3);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word; display: flex; flex-direction: column; min-height: 100%;
}
h1, h2, h3, h4, h5, h6 { margin: 0; line-height: 1.2; font-weight: 650; letter-spacing: -.02em; }
p { margin: 0; }
a { color: var(--accent-link); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

.wrap { width: min(var(--max-grid), 100% - var(--pad-x) * 2); margin-inline: auto; }
.wrap-read { width: min(var(--max-read), 100% - var(--pad-x) * 2); margin-inline: auto; }
main { flex: 1 0 auto; }

.skip {
  position: absolute; left: 14px; top: -80px; z-index: 90;
  background: var(--surface); padding: 12px 18px; border-radius: var(--r-pill);
  font-weight: 600; box-shadow: var(--sh-panel);
}
.skip:focus { top: 12px; }

/* ---------- 3. 粘性玻璃导航（唯一允许用玻璃的地方） ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 245, 247, .72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
html.dark .topbar { background: rgba(0, 0, 0, .72); }
.topbar .bar { display: flex; align-items: center; gap: 14px; min-height: var(--header-h); }

.brand { flex: none; color: var(--text); display: flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; flex: none; border-radius: 8px; box-shadow: 0 1px 3px rgba(0, 113, 227, .35); }
.brand b { font-size: 16px; font-weight: 650; letter-spacing: -.02em; }

/* 宽屏：横排导航。选中态是文字底下那条蓝线，不是反白药丸 */
.secnav { display: none; gap: 4px; margin-left: 8px; }
.secnav a {
  position: relative;
  flex: none; color: var(--text-2); font-size: 14px; font-weight: 500;
  padding: 9px 12px 11px; white-space: nowrap;
  transition: color .18s var(--ease-out);
}
.secnav a:hover { color: var(--text); text-decoration: none; }
.secnav a::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 4px;
  height: 2px; border-radius: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: center;
  transition: transform .22s var(--ease-out);
}
.secnav a:hover::after { transform: scaleX(.45); opacity: .5; }
.secnav a.current { color: var(--accent-link); font-weight: 600; }
.secnav a.current::after { transform: scaleX(1); opacity: 1; }

.topactions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* 「找工作」是独立按钮，不是导航项：跟在进度徽标右边，窄屏收进菜单 */
.jobsbtn {
  display: inline-flex; align-items: center; flex: none;
  min-height: 34px; padding: 0 14px; border-radius: var(--r-pill);
  background: var(--accent); color: #fff; font-size: 13.5px; font-weight: 600;
  white-space: nowrap; box-shadow: var(--sh-cta);
  transition: background .16s var(--ease-out), transform .16s var(--ease-out);
}
.jobsbtn:hover { background: #0077ed; text-decoration: none; color: #fff; }
.jobsbtn:active { transform: scale(.97); }
html.dark .jobsbtn { background: var(--accent); }
/* 当前页：还是同一个蓝按钮，加一圈光晕当「你在这儿」，别做成黑药丸（看着像禁用） */
.jobsbtn.current {
  background: var(--accent); color: #fff;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-bg), var(--sh-cta);
}

/* 进度徽标：用 padding 撑开，不写死高度，A/B 变长也不会挤坏 */
.pcount {
  display: inline-flex; align-items: baseline; gap: 5px; padding: 7px 13px;
  background: rgba(0, 0, 0, .05); border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 550; color: var(--text-2); white-space: nowrap;
}
html.dark .pcount { background: rgba(255, 255, 255, .1); }
.pcount b {
  font-size: 14px; font-weight: 650; color: var(--text);
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.pcount:hover { text-decoration: none; background: rgba(0, 0, 0, .09); }

.tbtn {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  background: rgba(0, 0, 0, .05); border: 0; border-radius: 50%;
  cursor: pointer; color: var(--text-2);
}
html.dark .tbtn { background: rgba(255, 255, 255, .1); }
.tbtn:hover { background: rgba(0, 0, 0, .09); }
.tbtn i {
  width: 15px; height: 15px; display: block; background: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.theme-desktop i {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0-14v2m0 18v-2M3 12h2m14 0h2M5.6 5.6l1.4 1.4m10 10 1.4 1.4M18.4 5.6 17 7M7 17l-1.4 1.4' stroke='%23000' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0-14v2m0 18v-2M3 12h2m14 0h2M5.6 5.6l1.4 1.4m10 10 1.4 1.4M18.4 5.6 17 7M7 17l-1.4 1.4' stroke='%23000' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
}
html.dark .theme-desktop i {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 13a8.5 8.5 0 0 1-10-10 8.5 8.5 0 1 0 10 10Z' fill='%23000'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 13a8.5 8.5 0 0 1-10-10 8.5 8.5 0 1 0 10 10Z' fill='%23000'/%3E%3C/svg%3E");
}
.menu-btn i {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16' stroke='%23000' stroke-width='2.2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16' stroke='%23000' stroke-width='2.2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
}
.menu-btn[aria-expanded="true"] i {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6 6 18' stroke='%23000' stroke-width='2.2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6 6 18' stroke='%23000' stroke-width='2.2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
}

/* 窄屏菜单：悬浮在内容之上，不把页面撑开。
   topbar 是 sticky（已定位），所以面板用 absolute 挂在它下面即可。 */
.menupanel {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 2;
  background: var(--surface);
  border-top: 1px solid var(--hairline);
  border-radius: 0 0 var(--r-card) var(--r-card);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
  animation: menudrop .18s var(--ease-out);
}
@keyframes menudrop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
html.dark .menupanel { box-shadow: 0 18px 40px rgba(0, 0, 0, .6); }
.menupanel-backdrop {
  position: fixed; inset: 0; z-index: 49;
  background: rgba(0, 0, 0, .24);
  animation: fadein .18s var(--ease-out);
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.topbar .bar { position: relative; z-index: 3; }   /* 顶栏本身要盖住蒙层 */
.menupanel-nav { display: grid; gap: 2px; padding: 8px 12px 4px; }
.menupanel-nav a {
  display: flex; align-items: center; min-height: 50px; padding: 0 14px;
  border-radius: var(--r-thumb); color: var(--text); font-size: 16px; font-weight: 500;
}
.menupanel-nav a:hover { background: var(--hover); text-decoration: none; }
.menupanel-nav a.current { background: var(--accent-bg); color: var(--accent-link); font-weight: 600; }
.menupanel-nav a.current::after { content: "✓"; margin-left: auto; font-size: 15px; }
.menupanel-theme {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  min-height: 50px; margin: 2px 0 8px; padding: 0 26px; cursor: pointer;
  background: none; border: 0; border-top: 1px solid var(--hairline);
  color: var(--text); font-size: 15px;
}
.menupanel-theme b { font-weight: 600; color: var(--accent-link); }
html.menu-open { overflow: hidden; }   /* 菜单开着时锁住背景滚动 */

@media (max-width: 767px) {
  .secnav { display: none !important; }
  .jobsbtn { display: none; }             /* 窄屏顶栏放不下，「找工作」在菜单里 */
  .theme-desktop { display: none; }
  .pcount span { display: none; }        /* 窄屏只留 A/B */
}
@media (min-width: 768px) {
  .secnav { display: flex; }
  .menu-btn { display: none; }
  .menupanel, .menupanel-backdrop { display: none !important; }
  .topactions { margin-left: auto; }
}

/* ---------- 4. Hero ---------- */
/* 与正文同一个容器，左缘对齐；文字自身限宽，右侧留白 */
.hero { padding: clamp(44px, 7vw, 84px) 0 clamp(24px, 3.5vw, 40px); }
.hero-inner { width: min(var(--max-grid), 100% - var(--pad-x) * 2); margin-inline: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--text-3);
}
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--good); box-shadow: 0 0 0 3px var(--good-bg);
}
.hero h1 {
  margin-top: 16px; font-size: clamp(34px, 5.4vw, 58px);
  font-weight: 700; letter-spacing: -.035em; line-height: 1.06; max-width: 22ch;
}
.hero .lede {
  margin-top: 18px; max-width: 46ch;
  font-size: clamp(15.5px, 2.2vw, 18px); color: var(--text-2); line-height: 1.65;
}
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 46px; padding: 0 22px; border-radius: var(--r-pill);
  border: 1px solid transparent; font-weight: 600; font-size: 15px; cursor: pointer;
  transition: transform .12s var(--ease-out), box-shadow .18s var(--ease-out), background .18s var(--ease-out);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--sh-cta); }
.btn-primary:hover { background: #0077ed; }
.btn-secondary {
  background: rgba(255, 255, 255, .8); border: 1px solid var(--hairline-2);
  color: var(--text); backdrop-filter: blur(8px);
}
html.dark .btn-secondary { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .16); }
.btn-secondary:hover { background: var(--surface); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 13.5px; }

.receipt {
  display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 30px; padding-top: 20px;
  border-top: 1px solid var(--hairline);
  font-size: 13px; color: var(--text-3);
}
.receipt b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; margin-right: 3px; font-size: 15px; }

/* ---------- 5. 提示条 ---------- */
.note-bar {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 14px 18px; border-radius: var(--r-thumb);
  background: var(--heat-bg); color: var(--text-body); font-size: 14px; line-height: 1.65;
}
.note-bar b { color: var(--heat-text); font-weight: 650; flex: none; }

/* ---------- 6. 区块骨架 ---------- */
.block { padding: clamp(38px, 6vw, 60px) 0 0; }
/* 「更多」不是流程里的一步，用一条顶线把主线收住 */
.block-plain { margin-top: clamp(26px, 4vw, 40px); border-top: 1px solid var(--hairline); padding-top: clamp(30px, 4.4vw, 46px); }

.block-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; margin-bottom: 22px; }
.step-badge {
  flex: none; width: 44px; height: 44px; border-radius: 14px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums;
  box-shadow: var(--sh-cta);
}
.block-head-text { min-width: 0; }
.block-head h2 {
  font-size: clamp(24px, 3.6vw, 32px);
  font-weight: 700; letter-spacing: -.03em; line-height: 1.15;
}
.block-head p { margin-top: 9px; color: var(--text-2); font-size: 15px; max-width: 62ch; }
/* 「更多」没有编号，标题直接顶格 */
.block-plain .block-head { grid-template-columns: minmax(0, 1fr); }

.page-head {
  padding-top: clamp(30px, 5vw, 52px);
  margin-bottom: 26px; max-width: var(--max-read);
}
.page-head h2 { margin-top: 12px; font-size: clamp(26px, 4vw, 36px); font-weight: 700; letter-spacing: -.03em; line-height: 1.12; }
.page-head p { margin-top: 10px; color: var(--text-2); font-size: 15px; }

.subhead {
  display: flex; align-items: center; gap: 12px; margin: 30px 0 12px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
}
.subhead::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.subhead small { font-weight: 400; color: var(--text-3); }

/* ---------- 7. 统一面板（反碎片化的核心） ---------- */
/* overflow:clip 而不是 hidden —— clip 不会生成滚动容器，
   面板内部的 sticky 筛选条因此仍然相对页面吸顶。 */
.panel {
  background: var(--surface); border-radius: var(--r-panel);
  box-shadow: var(--sh-panel); overflow: clip;
}
.panel-pad { padding: clamp(20px, 3vw, 30px); }
.panel-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  padding: 15px clamp(18px, 3vw, 28px);
  border-bottom: 1px solid var(--hairline);
  font-size: 13px; color: var(--text-3);
}
.panel-head b { font-size: 14px; color: var(--text); font-weight: 650; }
.panel-head .tail { margin-left: auto; }

.rows { list-style: none; }
.rows > * + * { border-top: 1px solid var(--hairline); }

/* ---------- 7b. 任务面板的筛选条 ----------
   控件在它影响的那份清单内部（不是飘在页底色上），随页面滚动，不吸顶。 */
.tasks-bar {
  display: grid; gap: 10px;
  padding: 16px clamp(16px, 2.6vw, 24px) 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
}
.tasks-bar-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.tasks-bar-row .searchwrap { flex: 1 1 240px; min-width: 0; }
.tasks-bar-row .seg { flex: 0 1 auto; min-width: 0; }
.bar-label {
  flex: none; font-size: 12.5px; font-weight: 600; color: var(--text-3);
  min-width: 30px;
}
.tasks-bar .countline { margin: 2px 0 0; }
@media (max-width: 560px) {
  .tasks-bar-row .seg { flex: 1 1 100%; }
  .bar-label { min-width: 0; }
}

/* ---------- 8. 表单 ---------- */
.formgrid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .formgrid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 550; color: var(--text-2); }
.field input, .field select, .fill-in {
  width: 100%; min-height: 44px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--hairline-2);
  border-radius: var(--r-thumb); color: var(--text);
}
.field input:focus, .field select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-bg); }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' stroke='%2386868b' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
input[type="number"] { font-variant-numeric: tabular-nums; }

/* 分段控件（苹果风筛选） */
.seg {
  display: flex; gap: 2px; padding: 3px; border-radius: var(--r-pill);
  background: rgba(0, 0, 0, .05);
}
html.dark .seg { background: rgba(255, 255, 255, .09); }
.seg-scroll { overflow-x: auto; scrollbar-width: none; }
.seg-scroll::-webkit-scrollbar { display: none; }
.seg button {
  flex: none; border: 0; cursor: pointer; white-space: nowrap;
  min-height: 38px; padding: 0 16px; border-radius: var(--r-pill);
  background: transparent; color: var(--text-2);
  font-size: 13.5px; font-weight: 500;
  transition: background .25s var(--ease-out), color .25s var(--ease-out);
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] {
  background: var(--surface); color: var(--text); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.seg button[aria-pressed="true"] small { color: var(--text-3); }
.seg button small { font-size: 12px; color: var(--text-3); margin-left: 5px; font-variant-numeric: tabular-nums; }

/* 独立开关（不放进 seg，避免选项过多） */
.toggle {
  flex: none; display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  min-height: 44px; padding: 0 16px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--hairline-2);
  font-size: 13.5px; font-weight: 550; color: var(--text-2);
  transition: all .2s var(--ease-out);
}
.toggle::before {
  content: ""; width: 15px; height: 15px; border-radius: 50%;
  border: 1.5px solid var(--faint); flex: none;
}
.toggle[aria-pressed="true"] { color: var(--heat-text); border-color: transparent; background: var(--heat-bg); }
.toggle[aria-pressed="true"]::before { background: var(--heat); border-color: var(--heat); }

.searchwrap { position: relative; }
/* 输入框要显式上样式：不写的话会用浏览器默认的 2px inset 灰边框，很突兀 */
.searchwrap input {
  width: 100%; padding: 0 34px 0 42px; border-radius: var(--r-pill);
  border: 1px solid var(--hairline-2); background: var(--surface); color: var(--text);
  min-height: 46px; appearance: none; -webkit-appearance: none;
}
.searchwrap input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-bg); }
.searchwrap input::-webkit-search-cancel-button { -webkit-appearance: none; }
.searchwrap::before {
  content: ""; position: absolute; left: 16px; top: 50%; width: 15px; height: 15px;
  transform: translateY(-50%); background: var(--text-3); pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' stroke='%23000' stroke-width='2.2' fill='none'/%3E%3Cpath d='m16.5 16.5 4 4' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' stroke='%23000' stroke-width='2.2' fill='none'/%3E%3Cpath d='m16.5 16.5 4 4' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
}

.toolbar { display: grid; gap: 12px; margin-bottom: 16px; }
@media (min-width: 900px) { .toolbar { grid-template-columns: minmax(0,1fr) auto; align-items: center; } }
.countline { font-size: 12.5px; color: var(--text-3); margin: 0 0 14px; }
.countline b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- 9. 第 0 步：办理顺序单 ---------- */
.ask { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .ask { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.answer { border-top: 1px solid var(--hairline); }
.answer-lead { padding: 18px clamp(18px, 3vw, 28px) 0; font-size: 14px; color: var(--text-2); }
.answer-lead b { color: var(--text); font-weight: 650; }
.steps { list-style: none; counter-reset: s; padding: 0 clamp(18px, 3vw, 28px); }
.steps li {
  counter-increment: s; display: grid; grid-template-columns: 30px minmax(0, 1fr);
  gap: 16px; padding: 16px 0; border-top: 1px solid var(--hairline);
}
.steps li:first-child { border-top: 0; }
.steps li::before {
  content: counter(s); width: 30px; height: 30px; border-radius: 50%;
  background: var(--text); color: var(--bg);
  display: grid; place-items: center; font-size: 14px; font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.step-text { font-size: 15.5px; line-height: 1.65; padding-top: 4px; }
.step-go { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 14px; font-weight: 550; }
.step-go::after { content: "→"; }

.fallback { padding: 0 clamp(18px, 3vw, 28px) clamp(18px, 3vw, 24px); }
.fallback > summary {
  cursor: pointer; min-height: 48px; display: flex; align-items: center;
  font-weight: 550; color: var(--text-2); list-style: none;
}
.fallback > summary::-webkit-details-marker { display: none; }
.fallback > summary::after {
  content: ""; margin-left: auto; width: 8px; height: 8px; flex: none;
  border-right: 1.5px solid var(--text-3); border-bottom: 1.5px solid var(--text-3);
  transform: rotate(45deg); transition: transform .2s var(--ease-out);
}
.fallback[open] > summary::after { transform: rotate(-135deg); }
.seven { list-style: none; counter-reset: n7; padding-top: 6px; }
.seven li {
  counter-increment: n7; display: grid; grid-template-columns: 24px minmax(0, 1fr);
  gap: 14px; padding: 11px 0; font-size: 15px; color: var(--text-body);
}
.seven li::before {
  content: counter(n7); width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0, 0, 0, .05); color: var(--text-2);
  display: grid; place-items: center; font-size: 12px; font-weight: 650; margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.seven li b { color: var(--text); font-weight: 650; }

/* ---------- 10. 任务：一个面板 + hairline ---------- */
.stagelist { list-style: none; }
.stage + .stage { border-top: 1px solid var(--hairline); }
.stage-head {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px 18px; align-items: center;
  padding: 20px clamp(18px, 3vw, 28px) 16px;
  background: var(--surface-2);
}
.stage-no {
  grid-column: 1; grid-row: 1 / span 2; align-self: center;
  font-size: 13px; font-weight: 650; letter-spacing: .06em; color: var(--text-3);
  font-variant-numeric: tabular-nums; min-width: 26px;
}
.stage.is-full .stage-no { color: var(--good); }
.stage-name { grid-column: 2; grid-row: 1; display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.stage-name h3 { font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.stage-time { font-size: 12px; font-weight: 550; color: var(--accent-link); }
.stage-sum { grid-column: 2 / -1; grid-row: 2; font-size: 13px; color: var(--text-3); }
.stage-done {
  grid-column: 3; grid-row: 1 / span 2; text-align: right;
  font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.stage-done b { color: var(--text); font-weight: 650; font-size: 15px; }
.stage.is-full .stage-done b { color: var(--good); }
@media (max-width: 560px) {
  .stage-head { grid-template-columns: auto minmax(0, 1fr); row-gap: 8px; }
  .stage-sum { grid-column: 1 / -1; grid-row: 3; margin-top: 2px; }
  .stage-done { grid-column: 2; grid-row: 2; justify-self: end; }
}

.task + .task { border-top: 1px solid var(--hairline); }
.task-row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 20px;
  gap: 0 8px; align-items: start; width: 100%; text-align: left;
  padding: 16px clamp(14px, 2.4vw, 22px); border: 0; background: none; cursor: pointer;
  transition: background .15s var(--ease-out);
}
.task-row:hover { background: var(--hover); }
.task.is-done .task-title { color: var(--text-3); text-decoration: line-through; }

.tick {
  position: relative; width: 44px; height: 44px; margin: -9px 0 0 -10px;
  background: none; border: 0; padding: 0; cursor: pointer;
  appearance: none; -webkit-appearance: none;
}
.tick::before {
  content: ""; position: absolute; left: 7px; top: 7px; width: 22px; height: 22px;
  border: 1.5px solid var(--faint); border-radius: 50%; background: var(--surface);
  transition: border-color .15s, background .15s;
}
.tick::after {
  content: ""; position: absolute; left: 13px; top: 12px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0);
  transition: transform .15s var(--ease-spring);
}
.tick:hover::before { border-color: var(--accent); }
.tick:checked::before { background: var(--good); border-color: var(--good); }
.tick:checked::after { transform: rotate(45deg) scale(1); }

.task-title { font-size: 16.5px; font-weight: 600; line-height: 1.5; letter-spacing: -.01em; }
.task-text { margin-top: 5px; font-size: 14.5px; color: var(--text-2); line-height: 1.65; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.tag {
  font-size: 11.5px; font-weight: 650; padding: 3px 9px; border-radius: var(--r-pill);
  background: rgba(0, 0, 0, .05); color: var(--text-2);
}
html.dark .tag { background: rgba(255, 255, 255, .09); }
.tag-heat { background: var(--heat-bg); color: var(--heat-text); }
.tag-city { background: var(--accent-bg); color: var(--accent-link); }

.chev {
  width: 14px; height: 14px; margin-top: 15px; background: var(--text-4);
  transition: transform .22s var(--ease-out);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' stroke='%23000' stroke-width='2.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' stroke='%23000' stroke-width='2.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
}
.task-row[aria-expanded="true"] .chev { transform: rotate(180deg); }

.task-detail { padding: 2px clamp(14px, 2.4vw, 22px) 24px 58px; }
@media (max-width: 560px) { .task-detail { padding-left: clamp(14px, 2.4vw, 22px); } }
.dgrid { display: grid; gap: 22px 32px; }
@media (min-width: 900px) { .dgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dsec h4 {
  font-size: 11.5px; font-weight: 650; letter-spacing: .06em; color: var(--text-3);
  margin-bottom: 9px;
}
.dsec ol { list-style: none; counter-reset: d; display: grid; gap: 8px; }
.dsec ol li {
  counter-increment: d; display: grid; grid-template-columns: 19px minmax(0, 1fr);
  gap: 10px; font-size: 14.5px; line-height: 1.6;
}
.dsec ol li::before {
  content: counter(d); width: 19px; height: 19px; border-radius: 50%;
  background: rgba(0, 0, 0, .05); color: var(--text-2);
  display: grid; place-items: center; font-size: 11px; font-weight: 650; margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
html.dark .dsec ol li::before { background: rgba(255, 255, 255, .1); }
.dsec p { font-size: 14.5px; line-height: 1.68; color: var(--text-body); }
.dsec .proof { color: var(--text-body); }
.dsec .stuck { color: var(--text-body); }
.dsec .proof b, .dsec .stuck b { font-weight: 650; }
.srcs { display: grid; gap: 10px; }
.srcs a { display: block; font-size: 14px; font-weight: 550; }
.srcs a span { display: block; font-size: 12.5px; color: var(--text-3); font-weight: 400; }

.empty { padding: 48px 20px; text-align: center; color: var(--text-3); font-size: 15px; }

/* ---------- 11. 工具：每个计算一个独立模块 ---------- */
.modules { display: grid; gap: 18px; }
/* position:relative 必须有 —— 否则水印的包含块会跑到页面级，
   而且 overflow:clip 不裁剪「包含块在外层」的绝对定位后代，大字会飘到卡片外。 */
.module {
  position: relative;
  background: var(--surface); border-radius: var(--r-panel);
  box-shadow: var(--sh-panel); overflow: clip;
}
/* 序号做成卡片右上角的水印：大字、很淡、轻微模糊，完全不占布局位置。
   只给 right 不给 top/bottom —— 绝对定位元素会停在它的静态位置（模块顶部），
   于是水印正好压在标题区右上角。 */
.module-mark {
  position: absolute; right: 8px; z-index: 0;
  font-size: clamp(110px, 13vw, 168px); font-weight: 700; line-height: 1;
  letter-spacing: -.07em; color: var(--text); opacity: .05;
  filter: blur(2px); pointer-events: none; user-select: none;
}
html.dark .module-mark { opacity: .1; }
.module > *:not(.module-mark) { position: relative; z-index: 1; }

.module-head {
  padding: clamp(20px, 3vw, 28px) clamp(20px, 3vw, 30px) 0;
}
.module-head h3 { font-size: clamp(20px, 3vw, 24px); font-weight: 700; letter-spacing: -.025em; }
.module-use { margin-top: 8px; font-size: 14.5px; color: var(--text-2); line-height: 1.65; max-width: 68ch; }

/* CSV 下载卡：把列数 / 空行数 / 表头摆在明面上，证明这是真文件 */
.dl-cards { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 680px) { .dl-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dl-cards > * { min-width: 0; }
.dl-card {
  display: flex; flex-direction: column; gap: 5px; padding: 18px 20px;
  background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card);
  color: inherit;
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.dl-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--sh-lift); }
.dl-file { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
.dl-card b { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.dl-card .dl-desc { font-size: 13.5px; color: var(--text-2); line-height: 1.55; }
.dl-card .dl-facts {
  margin-top: auto; padding-top: 10px; border-top: 1px solid var(--hairline);
  font-size: 12px; color: var(--text-3);
}

/* 「按月摊开」区块 */
.spread { display: grid; gap: 12px; margin-bottom: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .spread { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: end; } }
.spread .calcnote { grid-column: 1 / -1; }

.module-body {
  display: grid; gap: 16px; min-width: 0;
  padding: 20px clamp(20px, 3vw, 30px) clamp(20px, 3vw, 28px);
}
.module-body > * { min-width: 0; }
.module-get {
  padding: 14px clamp(20px, 3vw, 30px);
  border-top: 1px solid var(--hairline); background: var(--surface-2);
  font-size: 13.5px; color: var(--text-2);
}
.module-get b { color: var(--text); font-weight: 650; margin-right: 8px; }

.readout {
  display: grid; gap: 2px;
  padding: 16px 18px; border-radius: var(--r-thumb);
  background: var(--accent-bg); color: var(--accent-link);
}
.readout.warn { background: var(--heat-bg); color: var(--heat-text); }
.readout .k { font-size: 12.5px; font-weight: 600; opacity: .9; }
.readout .v {
  font-size: clamp(26px, 5vw, 36px); font-weight: 700;
  letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1.15;
}
.readout .d { margin-top: 4px; font-size: 13px; color: var(--text-2); }
.readout .d:empty { display: none; }

.calcnote { font-size: 13px; color: var(--text-3); line-height: 1.68; }
.calcnote b { color: var(--text-2); font-weight: 650; margin-right: 4px; }

.fold { border: 1px solid var(--hairline); border-radius: var(--r-thumb); background: var(--surface); }
.fold > summary {
  cursor: pointer; min-height: 46px; padding: 0 16px; display: flex; align-items: center;
  font-weight: 550; font-size: 14px; color: var(--text-body); list-style: none;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after {
  content: ""; margin-left: auto; width: 8px; height: 8px;
  border-right: 1.5px solid var(--text-3); border-bottom: 1.5px solid var(--text-3);
  transform: rotate(45deg); transition: transform .2s var(--ease-out);
}
.fold[open] > summary::after { transform: rotate(-135deg); }
.fold > *:not(summary) { margin: 0 14px 14px; }

.scriptbox {
  padding: 16px 18px; border-radius: var(--r-thumb); background: var(--surface-2);
  font-size: 14.5px; line-height: 1.75; color: var(--text-body);
}

/* 13 周表 */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--hairline); border-radius: var(--r-thumb); max-width: 100%; }
.wk { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 13.5px; }
.wk th, .wk td { padding: 6px 8px; border-bottom: 1px solid var(--hairline); text-align: right; }
.wk thead th { background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.wk th:first-child, .wk td:first-child {
  position: sticky; left: 0; background: var(--surface); border-right: 1px solid var(--hairline);
  text-align: left; font-weight: 650; white-space: nowrap;
}
.wk thead th:first-child { background: var(--surface-2); z-index: 2; }
.wk tbody tr:last-child td { border-bottom: 0; }
.wk input {
  width: 100%; min-width: 80px; min-height: 38px; padding: 6px 8px;
  border: 1px solid var(--hairline-2); border-radius: var(--r-chip);
  background: var(--surface); text-align: right; font-variant-numeric: tabular-nums;
}
.wk input:focus { border-color: var(--accent); outline: none; }
.wk .bal { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wk .bal.neg { color: var(--heat-text); background: var(--heat-bg); }

/* ---------- 12. 出口卡 / 处境卡 / 文档 ---------- */
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 680px) { .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 680px) { .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 680px) { .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid > * { min-width: 0; }

.card {
  display: flex; flex-direction: column; gap: 7px; padding: 20px;
  background: var(--surface); border-radius: var(--r-card);
  box-shadow: var(--sh-card); color: inherit;
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--sh-lift); }
.card .k { font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--accent-link); }
.card h3 { font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.card p { font-size: 14px; color: var(--text-2); line-height: 1.6; }
.card .go { margin-top: auto; padding-top: 8px; font-size: 13.5px; font-weight: 550; color: var(--accent-link); }

.docs { list-style: none; }
.doc-row {
  display: block; padding: 16px clamp(18px, 3vw, 28px); color: inherit;
  transition: background .15s var(--ease-out);
}
.doc-row:hover { background: var(--hover); text-decoration: none; }
.docs > li + li { border-top: 1px solid var(--hairline); }
.doc-row b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.doc-row span { display: block; margin-top: 3px; font-size: 13.5px; color: var(--text-2); }

.srcrow { display: block; padding: 15px clamp(18px, 3vw, 28px); color: inherit; transition: background .15s var(--ease-out); }
.srcrow:hover { background: var(--hover); text-decoration: none; }
.srcrow .org { font-size: 12px; font-weight: 600; color: var(--accent-link); }
.srcrow b { display: block; margin-top: 2px; font-size: 15px; font-weight: 550; }
.srcrow .when { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ---------- 12b. 找工作：导航卡片 ---------- */
/* auto-fill 自适应列数：窄屏 1 列 → 宽屏 4-5 列，和导航站的卡片墙一致 */
.navgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); }
.job-card {
  display: flex; flex-direction: column; gap: 9px; min-width: 0; padding: 16px;
  background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card);
  color: inherit;
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.job-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--sh-lift); }
/* 悬停时名称和箭头变蓝：整卡可点的提示 */
.job-card:hover .job-id b { color: var(--accent-link); }
.job-card:hover .ext-mark { color: var(--accent-link); }
.job-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* favicon 往往是透明底小图，垫一层浅灰底 + 内边距让它立得住 */
.job-logo {
  width: 46px; height: 46px; flex: none; padding: 6px; box-sizing: border-box;
  object-fit: contain; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--hairline);
}
.job-logo-letter {
  display: grid; place-items: center; padding: 0;
  font-size: 19px; font-weight: 650; color: var(--accent-link);
  background: var(--accent-bg); border: 0;
}
.job-id { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.job-id b {
  display: flex; align-items: baseline; gap: 6px; min-width: 0;
  font-size: 15px; font-weight: 650; letter-spacing: -.01em; line-height: 1.4;
  transition: color .15s var(--ease-out);
}
.job-id b > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-id .ext-mark { flex: none; font-size: 11.5px; color: var(--text-4); transition: color .15s var(--ease-out); }
/* 目标站点域名：让用户点之前就知道会去哪儿（代替以前的花哨标签） */
.job-host {
  font-family: var(--mono); font-size: 11px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.job-desc {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  font-size: 12.5px; color: var(--text-2); line-height: 1.6;
}

/* 分类切换条：控件贴着它影响的卡片墙，只有一行、直接切换 */
.jobs-bar { padding: 10px clamp(12px, 2vw, 16px); margin-bottom: 16px; }

/* ---- 多链接选择弹窗 ---- */
html.modal-open { overflow: hidden; }   /* 弹窗开着时锁住背景滚动 */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(0, 0, 0, .42);
  display: grid; place-items: center; padding: 20px;
  animation: fadein .18s var(--ease-out);
}
.modal {
  width: min(460px, 100%); background: var(--surface);
  border-radius: var(--r-panel); box-shadow: var(--sh-lift); overflow: clip;
  animation: menudrop .18s var(--ease-out);
}
html.dark .modal { box-shadow: 0 18px 48px rgba(0, 0, 0, .6); }
.modal-head { padding: 20px 22px 0; }
.modal-head h3 { font-size: 18px; font-weight: 650; letter-spacing: -.02em; line-height: 1.35; }
.modal-sub { margin-top: 6px; font-size: 13px; color: var(--text-3); }
.modal-body { display: grid; gap: 8px; padding: 16px 16px 4px; }
.modal-link {
  display: flex; align-items: center; gap: 10px; padding: 13px 15px;
  border: 1px solid var(--hairline-2); border-radius: var(--r-thumb); color: inherit;
  transition: background .15s var(--ease-out), border-color .15s var(--ease-out);
}
.modal-link:hover { background: var(--hover); border-color: var(--accent); text-decoration: none; }
.modal-link .ml-label { font-weight: 600; font-size: 14.5px; }
.modal-link .ml-host {
  margin-left: auto; font-family: var(--mono); font-size: 11.5px;
  color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.modal-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 12px 16px 16px;
}

/* ---------- 12c. 未登录：只有弹窗，页面上没有任何内容 ---------- */
/* html.locked 由 app.js 的 render() 挂上。这一层是「删掉弹窗也看不到东西」的关键：
   顶栏、页脚、返回顶部全藏起来，#view 里只剩那一个弹窗节点。 */
html.locked .topbar,
html.locked .skip,
html.locked .sitefoot,
html.locked .totop { display: none; }
html.locked body { background: var(--bg); }
html.locked #view { min-height: 100vh; }

.auth-wrap { display: block; }
.auth-backdrop {
  position: fixed; inset: 0; z-index: 90;
  /* 比普通弹窗更实：不给「背后还有东西」的暗示 */
  background: var(--bg);
  display: grid; place-items: center; padding: 20px;
  animation: fadein .18s var(--ease-out);
}
.auth-modal { width: min(420px, 100%); }
.auth-modal .modal-body { gap: 0; padding: 18px 20px 20px; }
.auth-modal .auth-tabs { margin: 16px 0 0; }
.auth-modal .auth-fields { margin-top: 16px; gap: 13px; }
.auth-modal .unlock-row { margin: 20px 0 0; }
.auth-modal .unlock-row .btn-block { width: 100%; min-height: 46px; }
.auth-modal .calcnote { margin: 14px 0 0; }

/* ---------- 12d. 登录/注册控件（公共站点） ---------- */
/* 管理后台（/admin）不用这套，它用 local assets/layui + admin.css */
.auth-tabs { display: flex; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: rgba(0, 0, 0, .05); width: fit-content; margin: 16px 0 2px; }
html.dark .auth-tabs { background: rgba(255, 255, 255, .09); }
.auth-tabs button {
  border: 0; cursor: pointer; min-height: 36px; padding: 0 20px; border-radius: var(--r-pill);
  background: transparent; color: var(--text-2); font-size: 13.5px; font-weight: 550;
}
.auth-tabs button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 650; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.auth-fields { display: grid; gap: 14px; margin-top: 16px; }
.unlock-row { display: flex; gap: 10px; margin: 20px 0 6px; flex-wrap: wrap; }
.btn-block { display: flex; width: 100%; justify-content: center; }
.unlock-err { margin-top: 8px; font-size: 13.5px; font-weight: 600; color: var(--heat-text); }
.unlock-status { margin-top: 8px; font-size: 13.5px; color: var(--good); }

.dl-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- 13. 阅读页 ---------- */
.reader { display: flex; flex-direction: column; gap: 24px; }
.reader > * { min-width: 0; }
@media (min-width: 1024px) {
  .reader { display: grid; grid-template-columns: minmax(0, 1fr) 236px; column-gap: 52px; align-items: start; }
  .reader-main { grid-column: 1; }
  .toc { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: calc(var(--header-h) + 18px); }
}
.reader-main h1 {
  font-size: clamp(26px, 4.4vw, 38px); font-weight: 700; letter-spacing: -.032em; line-height: 1.14;
}
.back { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 18px; font-size: 14px; font-weight: 500; color: var(--text-3); }
.back:hover { color: var(--accent-link); text-decoration: none; }
.toc { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); padding: 6px 16px; }
.toc summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 550; font-size: 14px; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc ul { list-style: none; padding-bottom: 8px; }
.toc a { display: block; padding: 7px 9px; border-radius: var(--r-chip); font-size: 14px; color: var(--text-2); line-height: 1.45; }
.toc a:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.toc a.on { background: var(--accent-bg); color: var(--accent-link); font-weight: 600; }
.toc .l3 { padding-left: 18px; font-size: 13.5px; }
@media (min-width: 1024px) { .toc { padding: 12px 14px; } .toc summary { display: none; } .toc ul { display: block; } }

/* 正文：直接放在页底色上，不装进卡片 */
.doc-body { font-size: 16.5px; line-height: 1.88; color: var(--text-body); }
.doc-body > h2:first-child { margin-top: 8px; }
.doc-body h2 {
  font-size: clamp(21px, 3vw, 25px); font-weight: 700; letter-spacing: -.028em;
  color: var(--text); margin: 48px 0 14px; padding-top: 22px;
  border-top: 1px solid var(--hairline);
}
.doc-body h3 { font-size: 19px; font-weight: 650; color: var(--text); margin: 32px 0 10px; letter-spacing: -.015em; }
.doc-body p { margin: 16px 0; }
.doc-body ul, .doc-body ol { margin: 16px 0; display: grid; gap: 9px; }
.doc-body ul li { list-style: none; padding-left: 20px; position: relative; }
.doc-body ul li::before { content: ""; position: absolute; left: 4px; top: .76em; width: 5px; height: 5px; border-radius: 50%; background: var(--faint); }
.doc-body ol { counter-reset: do; }
.doc-body ol li { counter-increment: do; list-style: none; padding-left: 32px; position: relative; }
.doc-body ol li::before {
  content: counter(do); position: absolute; left: 0; top: .3em; width: 22px; height: 22px;
  border-radius: 50%; background: var(--accent-bg); color: var(--accent-link);
  display: grid; place-items: center; font-size: 11.5px; font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.doc-body ul.checklist { display: grid; gap: 11px; margin: 16px 0; }
.doc-body ul.checklist > li.check-item { padding-left: 0; }
.doc-body blockquote {
  margin: 24px 0; padding: 14px 18px;
  background: var(--surface); border-radius: var(--r-thumb);
  border-left: 3px solid var(--accent); color: var(--text-body);
}
.doc-body blockquote p { margin: 6px 0; }
.doc-body .tbl-scroll { margin: 26px 0; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); border: 0; }
.doc-body table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 440px; }
.doc-body th, .doc-body td { border-bottom: 1px solid var(--hairline); padding: 13px 15px; text-align: left; vertical-align: top; }
.doc-body thead th { color: var(--text-2); font-weight: 600; font-size: 12.5px; letter-spacing: .04em; border-bottom: 1px solid var(--hairline-2); background: var(--surface-2); }
/* 偶数行铺一层浅灰底：核对表列多，斑马纹更不容易串行 */
.doc-body tbody tr:nth-child(even) td { background: var(--surface-2); }
.doc-body tbody tr:last-child td { border-bottom: 0; }
.doc-body td.tick-cell { text-align: center; font-size: 17px; color: var(--accent-link); }
.doc-body pre { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 15px; overflow-x: auto; font-family: var(--mono); font-size: 13px; }
.doc-body code { font-family: var(--mono); font-size: .9em; background: rgba(0, 0, 0, .05); padding: 2px 6px; border-radius: var(--r-chip); }
html.dark .doc-body code { background: rgba(255, 255, 255, .1); }
.doc-body pre code { background: none; padding: 0; }
.doc-body hr { border: 0; border-top: 1px solid var(--hairline); margin: 38px 0; }
.doc-body a.ext::after { content: " ↗"; font-size: .85em; opacity: .5; }

/* 表格里的空单元格 = 留给读者填的格子 */
.doc-body td.fill-cell { padding: 7px 9px; }
.cell-in {
  width: 100%; min-width: 84px; height: 34px; padding: 0 10px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--hairline-2); border-radius: 8px;
  font-size: 14px; line-height: 1;
  transition: border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.cell-in.num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-in::placeholder { color: var(--text-4); }
.cell-in:hover { border-color: var(--text-3); }
.cell-in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }

/* `- [ ]` 清单项 = 真复选框 */
.doc-body li.check-item.has-check {
  display: grid; grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px; align-items: start; padding-left: 0;
}
.doc-body li.check-item.has-check::before { content: none; }
.doc-body li.check-item.is-checked { color: var(--text-3); }
.check-in {
  appearance: none; -webkit-appearance: none;
  width: 22px; height: 22px; margin: 3px 0 0; flex: none; cursor: pointer;
  border: 1.5px solid var(--faint); border-radius: 50%; background: var(--surface);
  position: relative; transition: background .15s, border-color .15s;
}
.check-in::after {
  content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0); transition: transform .15s var(--ease-spring);
}
.check-in:hover { border-color: var(--accent); }
.check-in:checked { background: var(--good); border-color: var(--good); }
.check-in:checked::after { transform: rotate(45deg) scale(1); }

/* 文案留白 → 内联输入框：像真正的表单字段，而不是染色文字 */
.fillbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  margin: 0 0 26px; padding: 14px 18px; border-radius: var(--r-card);
  background: var(--surface); box-shadow: var(--sh-card);
  font-size: 13.5px; color: var(--text-2); line-height: 1.6;
}
.fillbar > span:first-child { flex: 1 1 260px; }
.fillbar b { color: var(--text); font-weight: 650; }
.fillbar .tail {
  font-size: 12.5px; font-weight: 600; color: var(--good);
  opacity: 0; transition: opacity .2s var(--ease-out);
}
.fillbar .tail:not(:empty) { opacity: 1; }

.fill-in {
  display: inline-block; width: 7.5em; max-width: 100%;
  /* min-height:0 必须写：上面的共享表单规则给了 .fill-in 一个 min-height:44px，
     不归零的话这里的 height:30px 永远不生效，行内填空会被撑成大块头 */
  min-height: 0; height: 30px; padding: 0 9px; margin: 0 2px; vertical-align: baseline;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--hairline-2); border-radius: 8px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
  font-size: .93em; line-height: 1;
  transition: border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.fill-in::placeholder { color: var(--accent-link); opacity: .7; }
.fill-in:hover { border-color: var(--text-3); }
.fill-in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
/* 模板里「- 城市：」后面的留白，跟在冒号后 */
.doc-body li.field-line { padding-left: 20px; }
.doc-body .slot-in { width: 11em; margin-left: 4px; }

.pager { display: grid; gap: 10px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--hairline); }
@media (min-width: 620px) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a { display: flex; flex-direction: column; gap: 2px; padding: 15px 17px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--sh-card); color: inherit; transition: box-shadow .2s var(--ease-out); }
.pager a:hover { text-decoration: none; box-shadow: var(--sh-lift); }
.pager span { font-size: 12px; color: var(--text-3); }
.pager b { font-size: 15px; font-weight: 600; }
.pager .next { text-align: right; }

/* ---------- 14. 页脚 / 提示 / 加载 ---------- */
.sitefoot { margin-top: clamp(56px, 8vw, 88px); padding: 32px 0 44px; background: var(--surface); border-top: 1px solid var(--hairline); }
.sitefoot p { font-size: 13px; color: var(--text-3); line-height: 1.75; max-width: 72ch; }
.sitefoot .foot-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; font-size: 14px; font-weight: 500; }

.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(10px); z-index: 60; max-width: min(92vw, 420px);
  background: var(--text); color: var(--bg); padding: 12px 20px;
  border-radius: var(--r-pill); font-size: 14.5px; font-weight: 550;
  box-shadow: var(--sh-lift); opacity: 0; pointer-events: none;
  transition: opacity .2s var(--ease-out), transform .2s var(--ease-out);
}
.toast.show { opacity: 1; transform: translateX(-50%); }

/* 返回顶部：只在滚下去以后出现，放右下角 */
.totop {
  position: fixed; right: clamp(14px, 3vw, 26px);
  bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 55;
  width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer;
  background: var(--surface); color: var(--text-2);
  border: 1px solid var(--hairline-2); border-radius: 50%;
  box-shadow: var(--sh-lift);
  transition: opacity .2s var(--ease-out), transform .2s var(--ease-out);
}
.totop svg { width: 19px; height: 19px; }
.totop:hover { color: var(--text); transform: translateY(-2px); }

.boot { padding: 120px 20px; text-align: center; color: var(--text-3); }
.noscript { padding: 48px 20px; max-width: 620px; margin: auto; }

/* ---------- 15. 打印 / 无障碍 ---------- */
@media print {
  .topbar, .toolbar, .filterbar, .countline, .pager, .toc, .toast, .chev, .boot, .sitefoot { display: none !important; }
  body { background: #fff; }
  .panel, .module, .card { box-shadow: none; border: 1px solid #ccc; }
  .task-detail[hidden] { display: block !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8.5pt; color: #666; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}