:root {
  color-scheme: light;
  /* 既有 token（保留以兼容现有引用） */
  --blue: #0b5cff;
  --blue-strong: #0646c8;
  --navy: #17233d;
  --ink: #24324a;
  --muted: #68758b;
  --line: #dfe5ee;
  --soft: #f4f7fb;
  --green: #11855b;
  --green-soft: #e8f7f0;
  --amber: #bd6b00;
  --amber-soft: #fff4dc;
  --red: #c33b45;
  --red-soft: #fff0f1;
  --white: #fff;
  --shadow: 0 18px 50px rgba(30, 52, 86, 0.09);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;

  /* ===== 设计令牌（§3.1） ===== */
  /* 主色 / 品牌 */
  --c-brand: #0b5cff;
  --c-brand-strong: #0646c8;
  --c-brand-soft: #eaf1ff;
  --c-brand-tint: #f3f7ff;
  --c-navy: #17233d;

  /* 中性 */
  --c-ink: #24324a;
  --c-ink-2: #4e5b70;
  --c-muted: #68758b;
  --c-line: #dfe5ee;
  --c-line-2: #e7ebf1;
  --c-surface: #ffffff;
  --c-canvas: #edf2f8;
  --c-soft: #f4f7fb;

  /* 语义色 */
  --c-success: #11855b; --c-success-soft: #e8f7f0;
  --c-warning: #bd6b00; --c-warning-soft: #fff4dc;
  --c-danger: #c33b45; --c-danger-soft: #fff0f1;
  --c-info: #0b5cff; --c-info-soft: #eaf1ff;

  /* 冲稳保 tier */
  --tier-reach: var(--c-danger); --tier-reach-soft: var(--c-danger-soft);
  --tier-match: var(--c-warning); --tier-match-soft: var(--c-warning-soft);
  --tier-safe: var(--c-success); --tier-safe-soft: var(--c-success-soft);

  /* 圆角尺度 */
  --r-xs: 6px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;

  /* 间距尺度（4 的倍数） */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 40px;

  /* 字体层级 */
  --fs-display: 40px; --fs-h1: 28px; --fs-h2: 23px; --fs-h3: 17px;
  --fs-body: 14px; --fs-sm: 12px; --fs-xs: 11px;
  --fw-med: 500; --fw-bold: 700; --fw-xbold: 800; --fw-black: 900;

  /* 阴影 / 层级 */
  --e-1: 0 1px 2px rgba(23, 35, 61, .06), 0 4px 14px rgba(30, 52, 86, .06);
  --e-2: 0 8px 24px rgba(30, 52, 86, .10);
  --e-3: 0 18px 50px rgba(30, 52, 86, .12);

  /* 焦点环 */
  --focus-ring: 0 0 0 3px rgba(11, 92, 255, .35);
  --focus-ring-soft: 0 0 0 3px rgba(124, 240, 197, .42);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; background: #edf2f8; color: var(--ink); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }
.skip-link { position: fixed; left: 12px; top: -60px; padding: 10px 14px; background: var(--navy); color: white; z-index: 100; }
.skip-link:focus { top: 12px; }

/* ===== 首页 masthead（替换顶部导航栏） ===== */
.home-masthead { text-align: center; padding: clamp(28px, 5vw, 56px) 16px 6px; }
.home-title { margin: 0; font-size: clamp(32px, 6vw, 54px); font-weight: 900; letter-spacing: -.03em; line-height: 1.1; color: var(--c-ink); }
.home-byline { margin: 12px 0 0; font-size: 15px; font-weight: 700; color: var(--c-brand); }
.home-source-note { margin: 10px auto 0; max-width: 660px; font-size: 13px; line-height: 1.6; color: var(--c-muted); }
.home-source-note .text-button { color: var(--c-brand); }
.home-data-version { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--c-muted); }
.text-button { border: 0; padding: 5px 8px; background: transparent; color: #d8e2f3; text-decoration: underline; }

.app-shell { max-width: 1440px; margin: 0 auto; padding: 24px; }
.intro-strip { background: linear-gradient(125deg, #0d5cf0, #173d89); color: white; border-radius: var(--r-xl); padding: 28px 32px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 420px); align-items: center; gap: 28px; box-shadow: var(--e-3); }
.intro-copy { min-width: 0; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .12em; color: #a9f5db; }
.intro-strip h1 { margin: 8px 0 7px; font-size: clamp(26px, 3vw, 40px); letter-spacing: -.035em; }
.intro-copy > p { max-width: 790px; margin: 0; color: #dbe7ff; line-height: 1.65; }
.intro-trust { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.intro-trust span { padding: 5px 8px; border: 1px solid rgba(169,245,219,.28); border-radius: 999px; color: #c9f9e8; background: rgba(5,32,91,.2); font-size: 11px; font-weight: 750; }
.intro-actions, .analysis-actions, .form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.intro-actions { margin-top: 17px; }
.intro-visual { position: relative; min-width: 0; height: 270px; padding: 8px 8px 31px; display: grid; grid-template-columns: 1.35fr .8fr; grid-template-rows: 1fr 1fr; gap: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,.2); border-radius: 16px; background: rgba(8,26,69,.3); box-shadow: inset 0 1px rgba(255,255,255,.08); }
.intro-visual figure { position: relative; min-width: 0; min-height: 0; margin: 0; overflow: hidden; border-radius: 10px; background: #edf2f8; box-shadow: 0 8px 18px rgba(5,18,51,.22); }
.intro-visual .preview-main { grid-row: 1 / 3; }
.intro-visual img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: top center; }
.intro-visual figcaption { position: absolute; right: 7px; bottom: 7px; padding: 4px 7px; color: white; background: rgba(11,28,57,.86); border-radius: 7px; font-size: 10px; font-weight: 800; }
.intro-visual > p { position: absolute; right: 12px; bottom: 7px; left: 12px; margin: 0; color: #dbe7ff; font-size: 10px; text-align: center; }
button { border: 0; border-radius: 10px; padding: 11px 16px; font-weight: 700; }

/* ===== 统一按钮基类与五级层级（§3.2） ===== */
.btn, .primary-button, .ghost-button, .danger-button, .text-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--r-md);
  padding: 11px 16px; font-weight: var(--fw-bold); font-size: var(--fs-body);
  line-height: 1; cursor: pointer; text-decoration: none; white-space: nowrap; color: inherit;
  transition: background .16s, box-shadow .16s, transform .12s, border-color .16s, color .16s, filter .16s;
}
/* 仅主/次按钮在 hover 时轻微上浮（§3.3-3：避免小按钮位移） */
.btn:hover:not(:disabled), .primary-button:hover:not(:disabled), .ghost-button:hover:not(:disabled), .btn--secondary:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(.98); }
.btn:active:not(:disabled), .primary-button:active:not(:disabled), .ghost-button:active:not(:disabled), .danger-button:active:not(:disabled), .btn--secondary:active:not(:disabled) { transform: translateY(0); box-shadow: none; }
.btn:disabled, .primary-button:disabled, .ghost-button:disabled, .danger-button:disabled, .text-button:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }

.btn--primary, .primary-button { background: var(--c-brand); color: var(--white); box-shadow: var(--e-2); }
.btn--secondary, .ghost-button { background: var(--c-surface); color: var(--c-ink); border-color: var(--c-line); }
.btn--ghost, .ghost-button { background: var(--c-surface); color: var(--c-ink); border-color: var(--c-line); }
.btn--danger, .danger-button { background: var(--c-danger-soft); color: var(--c-danger); border-color: var(--c-danger); }
.btn--danger:hover:not(:disabled), .danger-button:hover:not(:disabled) { background: var(--c-danger); color: var(--white); }
.btn--text, .text-button { background: transparent; color: var(--c-brand); border-color: transparent; padding: 5px 8px; text-decoration: underline; }
/* 顶栏内文字链按钮保持浅色可读 */

.intro-strip .btn--primary, .intro-strip .primary-button { background: var(--white); color: var(--c-brand-strong); box-shadow: var(--e-1); }
.intro-strip .btn--ghost, .intro-strip .ghost-button { color: var(--white); border-color: rgba(255, 255, 255, .32); background: rgba(255, 255, 255, .1); }

.button-link { display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-md); padding: 11px 16px; font-weight: var(--fw-bold); text-decoration: none; }

/* Loading 态（§3.2）：spinner + 禁用交互，适用于任意按钮 */
button.is-loading { position: relative; }
button.is-loading::before {
  content: ""; width: 14px; height: 14px; margin-right: 8px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  display: inline-block; vertical-align: -2px; animation: btn-spin .6s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* 卡片基类（§3.2） */
.card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); box-shadow: var(--e-1); padding: var(--s-4); }
.card--raised { box-shadow: var(--e-3); }

/* 表单字段基类（§3.2） */
.field { display: grid; gap: var(--s-2); }
label.field, .field > label { color: var(--c-ink-2); font-size: var(--fs-sm); font-weight: var(--fw-bold); }

/* 统一焦点环（§3.3-9）：默认蓝环，顶栏内用柔色环 */
:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.topbar :focus-visible, .global-nav a:focus-visible, .brand:focus-visible, .quick-return :focus-visible { box-shadow: var(--focus-ring-soft); }

.panel, .direction-workspace, .direction-result, .qualification-card, .school-section, .access-hero, h2[id], form[id] { scroll-margin-top: 112px; }
.compact-back { padding: 8px 11px; color: var(--c-brand); background: white; box-shadow: none; white-space: nowrap; font-weight: var(--fw-bold); border-radius: var(--r-sm); }
.compact-back:hover { color: var(--c-brand-strong); text-decoration: underline; }
.compact-back:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* 可选次要文字链（返回入口降级，T02/T05） */
.text-link-back { color: var(--c-brand); font-size: var(--fs-sm); font-weight: var(--fw-bold); text-decoration: none; padding: 6px 4px; border-radius: var(--r-sm); white-space: nowrap; }
.text-link-back:hover { color: var(--c-brand-strong); text-decoration: underline; }
.text-link-back:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* 学校筛选常驻「已选 N 所」概览卡（T05） */
.selected-overview { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 14px; border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-brand-tint); box-shadow: var(--e-1); text-align: left; cursor: pointer; transition: border-color .16s, box-shadow .16s; }
.selected-overview:hover { border-color: var(--c-brand); }
.selected-overview:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.selected-overview-count { color: var(--c-brand-strong); font-size: var(--fs-sm); font-weight: var(--fw-bold); }
.selected-overview-hint { color: var(--c-muted); font-size: var(--fs-xs); }
.selected-preview { margin: 12px 0 0; padding: 12px 14px; border: 1px dashed var(--c-line); border-radius: var(--r-md); background: var(--c-surface); }
.preview-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.preview-slot { display: flex; flex-direction: column; gap: 2px; padding: 7px 10px; border-radius: var(--r-sm); background: var(--c-soft); border: 1px solid var(--c-line-2); }
.preview-slot--empty { opacity: .6; }
.preview-slot-key { color: var(--c-muted); font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.preview-slot-name { color: var(--c-ink); font-size: var(--fs-sm); }
.panel-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.inline-back { width: max-content; display: flex; margin-bottom: 10px; color: #dbe7ff; font-size: 13px; font-weight: 800; text-decoration: none; }
.inline-back:hover, .inline-back:focus-visible { color: white; text-decoration: underline; }
.quick-return { position: fixed; left: 50%; bottom: 18px; z-index: 46; display: flex; gap: 3px; padding: 5px; border: 1px solid rgba(255,255,255,.16); border-radius: 13px; background: rgba(16,28,51,.94); box-shadow: 0 12px 30px rgba(8,18,36,.24); backdrop-filter: blur(10px); transform: translateX(-50%); }
.quick-return button, .quick-return a { min-height: 36px; padding: 8px 11px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 9px; color: #e5edf9; background: transparent; font-size: 12px; font-weight: 800; line-height: 1; text-decoration: none; white-space: nowrap; box-shadow: none; }
.quick-return button:hover, .quick-return a:hover, .quick-return button:focus-visible, .quick-return a:focus-visible { color: white; background: rgba(255,255,255,.11); transform: none; }

.starter-guide { margin-top: 16px; padding: 20px 22px; border: 1px solid #cfe0ff; border-radius: 16px; background: linear-gradient(135deg, #f5f9ff, #fff); box-shadow: 0 9px 28px rgba(30, 72, 145, .055); }
.starter-guide-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.starter-guide h2 { margin: 3px 0 0; color: var(--navy); font-size: 19px; }
.guide-kicker { color: var(--blue); font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.guide-start-button { padding: 9px 13px; color: var(--blue); background: #eaf1ff; }
.guide-step-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 15px; }
.guide-step-grid button { min-width: 0; padding: 12px; display: flex; align-items: flex-start; gap: 9px; text-align: left; color: var(--ink); background: white; border: 1px solid var(--line); box-shadow: 0 4px 12px rgba(31, 55, 91, .035); }
.guide-step-grid b { flex: 0 0 25px; width: 25px; height: 25px; display: grid; place-items: center; color: white; background: var(--blue); border-radius: 50%; font-size: 12px; }
.guide-step-grid span, .guide-step-grid strong, .guide-step-grid small { display: block; min-width: 0; }
.guide-step-grid strong { color: var(--navy); font-size: 13px; line-height: 1.35; }
.guide-step-grid small { margin-top: 4px; color: var(--muted); font-weight: 500; line-height: 1.45; }
.guide-rules { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 7px 14px; align-items: center; color: #56647a; font-size: 12px; }
.guide-rules strong { color: var(--navy); }
.guide-rules span::before { content: "✓"; margin-right: 5px; color: var(--green); font-weight: 900; }

.workflow-guide { margin-top: 16px; padding: 18px 20px; border: 1px solid #cfe0ff; border-radius: 16px; background: linear-gradient(135deg, #f5f9ff, #fff); box-shadow: 0 9px 28px rgba(30, 72, 145, .055); }
.workflow-guide-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.workflow-guide h2 { margin: 3px 0 4px; color: var(--navy); font-size: 19px; }
.workflow-guide p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.workflow-steps { margin-top: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.workflow-steps button { min-width: 0; padding: 11px 12px; display: flex; align-items: center; gap: 9px; text-align: left; color: #607089; background: white; border: 1px solid var(--line); box-shadow: none; }
.workflow-steps button.active { color: var(--blue); border-color: #9ebdff; background: #f3f7ff; }
.workflow-steps button.done { color: var(--green); border-color: #bfe4d5; background: #f4fbf8; }
.workflow-steps b { flex: 0 0 26px; width: 26px; height: 26px; display: grid; place-items: center; color: white; background: #9ba8ba; border-radius: 50%; font-size: 12px; }
.workflow-steps button.active b { background: var(--blue); }
.workflow-steps button.done b { background: var(--green); }
.workflow-steps span, .workflow-steps strong, .workflow-steps small { display: block; min-width: 0; }
.workflow-steps strong { color: var(--navy); font-size: 13px; }
.workflow-steps small { margin-top: 2px; font-weight: 600; line-height: 1.35; }

.workspace-switch { margin-top: 16px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid #d8e0ec; border-radius: 15px; background: white; }
.workspace-switch > div:first-child strong { display: block; margin-top: 4px; color: var(--navy); font-size: 15px; }
.workspace-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; width: min(890px, 70%); padding: 4px; background: #eef2f7; border-radius: 12px; }
.workspace-tabs button { padding: 10px 14px; text-align: left; color: #617087; background: transparent; box-shadow: none; }
.workspace-tabs button.active { color: var(--blue); background: white; box-shadow: 0 4px 14px rgba(28, 50, 82, .09); }
.workspace-tabs span, .workspace-tabs small { display: block; }
.workspace-tabs span { font-size: 13px; }
.workspace-tabs small { margin-top: 2px; font-weight: 500; }

.direction-workspace { margin-top: 16px; padding: 24px; border: 1px solid #dce4ef; border-radius: 17px; background: white; box-shadow: var(--e-1); }
.direction-hero, .direction-result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; }
.direction-hero h2, .direction-result-head h2 { margin: 4px 0 7px; color: var(--navy); font-size: 23px; }
.direction-hero p, .direction-result-head p { max-width: 820px; margin: 0; color: var(--muted); line-height: 1.6; }
.direction-result-actions { display: grid; flex: 0 0 auto; gap: 9px; justify-items: stretch; }
.direction-risk-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 11px; background: #eef2f7; }
.direction-risk-switch button { min-width: 74px; padding: 7px 10px; color: #617087; background: transparent; box-shadow: none; }
.direction-risk-switch button b, .direction-risk-switch button small { display: block; }
.direction-risk-switch button b { font-size: 12px; }
.direction-risk-switch button small { margin-top: 2px; color: inherit; font-size: 9px; font-weight: 600; white-space: nowrap; }
.direction-risk-switch button.active { color: var(--blue); background: white; box-shadow: 0 3px 12px rgba(28, 50, 82, .11); }
.direction-risk-switch button:disabled { cursor: progress; opacity: .65; }
.direction-form { margin-top: 20px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 13px; }
.direction-form label > small { min-height: 16px; color: var(--muted); font-weight: 500; line-height: 1.35; }
#directionForm { grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: start; }
#directionForm > label { grid-template-rows: minmax(16px, auto) 42px minmax(32px, auto); align-content: start; }
#directionForm > label > small { min-height: 32px; }
.direction-submit { grid-column: 1 / -1; padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-radius: 12px; background: #f3f7ff; }
.direction-submit p { margin: 0; }
.direction-submit p strong, .direction-submit p span { display: block; }
.direction-submit p strong { color: var(--navy); font-size: 13px; }
.direction-submit p span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.target-form > label { grid-template-rows: 16px 42px minmax(16px, auto); align-content: start; }
.direction-result { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); scroll-margin-top: 82px; }
.direction-stats { margin-top: 17px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.direction-stat { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #f9fbfe; }
.direction-stat span, .direction-stat strong, .direction-stat small { display: block; }
.direction-stat span { color: var(--muted); font-size: 11px; }
.direction-stat strong { margin-top: 4px; color: var(--navy); font-size: 21px; }
.direction-stat small { margin-top: 3px; color: var(--muted); line-height: 1.4; }
.direction-groups { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.direction-group { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; }
.direction-group-head { padding: 13px 15px; background: #f3f7fd; border-bottom: 1px solid var(--line); }
.direction-group-head strong, .direction-group-head small { display: block; }
.direction-group-head strong { color: var(--navy); }
.direction-group-head small { margin-top: 3px; color: var(--muted); }
.direction-school { padding: 11px 13px; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: center; border-bottom: 1px solid #edf0f4; }
.direction-school:last-child { border-bottom: 0; }
.direction-position { color: #617087; font-size: 11px; font-weight: 800; }
.direction-school strong, .direction-school small { display: block; }
.direction-school strong { color: var(--navy); font-size: 13px; }
.direction-school small { margin-top: 3px; color: var(--muted); line-height: 1.4; }
.same-district-badge { margin-left: 7px; padding: 3px 6px; display: inline-block; color: var(--green); background: var(--green-soft); border-radius: 999px; font-size: 9px; font-style: normal; vertical-align: 1px; }
.direction-chance { min-width: 74px; text-align: right; }
.direction-chance b, .direction-chance span, .direction-chance em { display: block; }
.direction-chance b { color: var(--blue); }
.direction-chance span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.direction-chance em { margin-top: 4px; color: #8290a4; font-size: 10px; font-style: normal; }
.direction-notice { margin-top: 14px; padding: 13px 15px; display: flex; gap: 10px; color: #6c5225; background: var(--amber-soft); border-radius: 11px; font-size: 12px; line-height: 1.55; }
.direction-notice strong { flex: 0 0 auto; color: #71490d; }
.target-school-field { grid-column: span 2; }
.target-detail-grid { margin-top: 16px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 14px; }
.target-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: white; }
.target-card-head { padding: 13px 15px; background: #f3f7fd; border-bottom: 1px solid var(--line); }
.target-card-head strong, .target-card-head small { display: block; }
.target-card-head strong { color: var(--navy); }
.target-card-head small { margin-top: 3px; color: var(--muted); }
.target-history-row { padding: 10px 14px; display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 10px; border-bottom: 1px solid #edf0f4; font-size: 12px; }
.target-history-row:last-child { border-bottom: 0; }
.target-history-row span { color: var(--muted); }
.target-history-row strong { color: var(--navy); }
.target-history-row b { color: var(--blue); }
.target-advice { margin: 0; padding: 8px 18px 12px 38px; }
.target-advice li { padding: 8px 4px; color: #425068; line-height: 1.6; border-bottom: 1px solid #edf0f4; }
.target-advice li:last-child { border-bottom: 0; }

.step-nav { margin: 16px 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); background: var(--line); border-radius: 14px; }
.step-nav a { background: white; text-decoration: none; padding: 13px 16px; display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 13px; font-weight: 700; }
.step-nav b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #eaf1ff; color: var(--blue); }

.panel { margin-top: 16px; background: white; border: 1px solid #e2e7ef; border-radius: 16px; padding: 22px; box-shadow: var(--e-1); scroll-margin-top: 88px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.panel-heading h2 { margin: 3px 0 0; font-size: 20px; color: var(--navy); }
.step-label { font-size: 10px; color: var(--blue); font-weight: 900; letter-spacing: .12em; }
.privacy-chip { padding: 7px 10px; background: var(--green-soft); color: var(--green); border-radius: 999px; font-size: 12px; font-weight: 700; }
.muted { color: var(--muted); font-size: 13px; }

.profile-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.profile-essentials { align-items: start; }
.profile-confirmations { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.profile-confirmations .checkbox-field { min-height: 62px; padding: 11px 13px; align-items: flex-start; border: 1px solid #d8e5f8; border-radius: 11px; background: #f7faff; }
.profile-confirmations .checkbox-field input { margin-top: 2px; }
.profile-confirmations span, .profile-confirmations strong, .profile-confirmations small { display: block; }
.profile-confirmations strong { color: var(--navy); font-size: 13px; }
.profile-confirmations small { margin-top: 3px; color: var(--muted); font-weight: 500; line-height: 1.4; }
.quota-details { margin-top: 10px; padding: 13px 14px; display: grid; grid-template-columns: minmax(260px, 1fr) minmax(280px, 1.4fr); gap: 16px; align-items: end; border: 1px solid #b9d1ff; border-radius: 11px; background: #eef5ff; }
.quota-details > div > strong, .quota-details > div > small { display: block; }
.quota-details > div > strong { margin-top: 3px; color: var(--navy); font-size: 14px; }
.quota-details > div > small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.advanced-profile { margin-top: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfe; }
.advanced-profile summary { padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; }
.advanced-profile summary::-webkit-details-marker { display: none; }
.advanced-profile summary span, .advanced-profile summary strong, .advanced-profile summary small { display: block; }
.advanced-profile summary strong { color: var(--navy); font-size: 13px; }
.advanced-profile summary small { margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 500; }
.advanced-profile summary b { flex: 0 0 auto; color: var(--blue); font-size: 11px; }
.advanced-profile[open] summary { border-bottom: 1px solid var(--line); background: #f4f7fb; }
.advanced-profile-grid { padding: 14px; }
label { display: grid; gap: 7px; color: #4e5b70; font-size: 12px; font-weight: 700; }
input, select { width: 100%; min-width: 0; height: 42px; padding: 0 11px; border: 1px solid var(--c-line); border-radius: var(--r-sm); background: white; color: var(--ink); transition: border-color .16s, box-shadow .16s; }
input:hover, select:hover { border-color: #9eb7e9; }
input:focus-visible, select:focus-visible { outline: none; box-shadow: var(--focus-ring); border-color: var(--c-brand); }
input:hover, select:hover { border-color: #9eb7e9; }
.checkbox-field { display: flex; align-items: center; gap: 9px; padding: 24px 0 0; }
.checkbox-field input { width: 18px; height: 18px; }
.simulation-mode-card { grid-column: span 2; min-height: 82px; padding: 13px 14px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 2px solid #cbd8e8; border-radius: 13px; background: #f8fbff; cursor: pointer; transition: border-color .16s, background .16s, box-shadow .16s; }
.simulation-mode-card:hover { border-color: #8fb5ed; background: #f2f7ff; }
.simulation-mode-card:has(input:checked) { border-color: var(--blue); background: #eef5ff; box-shadow: 0 0 0 3px rgba(32, 105, 210, .1); }
.simulation-mode-card input { width: 26px; height: 26px; margin: 0; padding: 0; accent-color: var(--blue); cursor: pointer; }
.simulation-mode-copy, .simulation-mode-copy strong, .simulation-mode-copy small { display: block; }
.simulation-mode-copy strong { color: var(--navy); font-size: 14px; }
.simulation-mode-copy small { margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.45; }
.simulation-mode-state { justify-self: end; padding: 5px 8px; border-radius: 999px; color: #526579; background: #e8eef5; font-size: 10px; font-style: normal; white-space: nowrap; }
.simulation-mode-state::before { content: '未开启'; }
.simulation-mode-card:has(input:checked) .simulation-mode-state { color: #0756b8; background: #d9e9ff; }
.simulation-mode-card:has(input:checked) .simulation-mode-state::before { content: '已开启'; }
.policy-banner { margin-top: 16px; border-left: 4px solid var(--amber); background: var(--amber-soft); padding: 11px 13px; color: #7d4b0b; font-size: 13px; }

.filter-row { display: grid; grid-template-columns: 2fr repeat(3, minmax(130px, .75fr)); gap: 12px; margin-bottom: 15px; }
.school-selection-status { display: flex; align-items: center; gap: 10px; }
.school-selection-status button { padding: 8px 11px; color: var(--blue); }
.school-table-wrap { overflow: auto; max-height: 520px; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; }
th { position: sticky; top: 0; z-index: 2; background: #f7f9fc; color: #526079; text-align: left; font-size: 12px; }
th, td { padding: 12px 13px; border-bottom: 1px solid #e7ebf1; vertical-align: middle; }
td { font-size: 13px; }
td strong { color: var(--navy); }
.school-table td:nth-child(3), .school-table td:nth-child(4), .school-table td:nth-child(5) { white-space: nowrap; }
.add-school { padding: 7px 10px; background: #eaf1ff; color: var(--blue); font-size: 12px; }
.add-school:disabled { cursor: default; color: var(--green); background: var(--green-soft); opacity: 1; transform: none; }
.table-note { margin: 11px 0 0; color: var(--muted); font-size: 12px; }

.legend { display: flex; gap: 6px; }
.legend span, .tier-badge { border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 800; }

/* 志愿表内「冲刺/匹配/保底」概率等级标签（复用 --tier-* token） */
.tier-tag { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 800; line-height: 1; margin-right: 6px; vertical-align: middle; }
.tier-tag.tier-reach { color: var(--tier-reach); background: var(--tier-reach-soft); }
.tier-tag.tier-match { color: var(--tier-match); background: var(--tier-match-soft); }
.tier-tag.tier-safe { color: var(--tier-safe); background: var(--tier-safe-soft); }
.reach { color: var(--red); background: var(--red-soft); }
.match { color: var(--amber); background: var(--amber-soft); }
.safe { color: var(--green); background: var(--green-soft); }
.batch-forms { display: grid; gap: 14px; }
.plan-coach { margin: 0 0 14px; padding: 14px; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(360px, 2fr) auto; gap: 14px; align-items: center; border: 1px solid #d9e5f8; border-radius: 12px; background: #f7faff; }
.coach-summary span, .coach-summary strong, .coach-summary small { display: block; }
.coach-summary span { color: var(--blue); font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.coach-summary strong { margin-top: 3px; color: var(--navy); }
.coach-summary small { margin-top: 4px; color: var(--muted); line-height: 1.4; }
.coach-checklist { display: flex; flex-wrap: wrap; gap: 7px; }
.coach-check { padding: 6px 9px; border-radius: 999px; color: #6d7787; background: #edf1f6; font-size: 11px; font-weight: 700; }
.coach-check.done { color: var(--green); background: var(--green-soft); }
.coach-check.warn { color: var(--amber); background: var(--amber-soft); }
.batch-card { border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.batch-card summary { cursor: pointer; list-style: none; }
.batch-card summary::-webkit-details-marker { display: none; }
.batch-card-optional:not([open]) .batch-head { border-bottom: 0; }
.batch-card-optional .batch-head::after { content: "展开填写"; flex: 0 0 auto; padding: 5px 8px; color: var(--blue); background: #eaf1ff; border-radius: 999px; font-size: 10px; font-weight: 800; }
.batch-card-optional[open] .batch-head::after { content: "收起"; }
.batch-head { padding: 13px 15px; display: flex; justify-content: space-between; gap: 15px; align-items: center; background: #f5f8fd; border-bottom: 1px solid var(--line); }
.batch-head strong { color: var(--navy); }
.batch-head span { color: var(--muted); font-size: 12px; }
.volunteer-row { display: grid; grid-template-columns: 88px minmax(260px, 1fr) 190px 105px; gap: 12px; align-items: center; min-height: 59px; padding: 8px 13px; border-bottom: 1px solid #edf0f4; }
.volunteer-row:last-child { border-bottom: 0; }
.volunteer-row.dragging { opacity: .45; background: #eaf1ff; }
.volunteer-label { display: flex; align-items: center; gap: 7px; color: #5b6880; font-weight: 800; font-size: 12px; }
.drag-handle { cursor: grab; color: #9aa7ba; font-size: 16px; }
.slot-meta { color: var(--muted); font-size: 12px; }
.row-actions { display: flex; gap: 5px; justify-content: flex-end; }
.row-actions button { width: 30px; height: 30px; padding: 0; background: #f1f4f8; color: #66758c; }
.form-actions { margin-top: 16px; justify-content: flex-end; }

.analysis-panel { border-top: 4px solid var(--blue); }
.score-overview { display: grid; grid-template-columns: 145px 1fr 1.7fr; align-items: center; gap: 24px; padding: 20px; background: linear-gradient(120deg, #f0f5ff, #f7fbff); border-radius: 14px; }
.score-ring { --score: 0; width: 116px; height: 116px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(circle closest-side, #fff 76%, transparent 77% 99%), conic-gradient(var(--c-brand) calc(var(--score) * 1%), #dce4f0 0); }
.score-ring strong { display: block; color: var(--navy); font-size: 35px; line-height: 1; }
.score-ring span { color: var(--muted); font-size: 11px; margin-top: 6px; }
.score-summary h3 { margin: 10px 0 6px; color: var(--navy); }
.score-summary p { margin: 0; color: var(--muted); font-size: 13px; }
.grade-badge { background: var(--blue); color: white; padding: 5px 9px; border-radius: 6px; font-size: 12px; font-weight: 800; }
.dimension-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.dimension-card { padding: 11px; border: 1px solid #dce5f2; background: white; border-radius: 9px; text-align: center; }
.dimension-card strong, .dimension-card span { display: block; }
.dimension-card strong { font-size: 20px; color: var(--blue); }
.dimension-card span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.improvement-section { margin-top: 18px; padding: 18px; border: 1px solid #d8e5fb; border-radius: 14px; background: #f7faff; }
.improvement-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.improvement-head span { color: var(--blue); font-size: 11px; font-weight: 800; }
.improvement-head h3 { margin: 3px 0 0; color: var(--navy); font-size: 17px; }
.improvement-head > strong { flex: 0 0 auto; padding: 7px 10px; border-radius: 8px; color: #0b5fd7; background: #e5efff; font-size: 13px; }
.score-caps { margin-top: 12px; display: grid; gap: 7px; }
.score-cap { padding: 10px 12px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid #f0c7be; border-radius: 9px; background: #fff4f1; }
.score-cap b { flex: 0 0 auto; color: #aa3825; font-size: 12px; }
.score-cap span { color: #713d34; font-size: 12px; line-height: 1.5; }
.improvement-list { margin-top: 13px; display: grid; gap: 9px; }
.improvement-card { padding: 12px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 11px; align-items: center; border: 1px solid #dce5f2; border-radius: 11px; background: white; }
.improvement-rank { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--blue); font-size: 12px; font-weight: 800; }
.improvement-copy > div { display: flex; align-items: center; gap: 8px; }
.improvement-copy strong { color: var(--navy); font-size: 14px; }
.improvement-copy span { color: var(--muted); font-size: 11px; }
.improvement-copy p { margin: 4px 0 0; color: #536177; font-size: 12px; line-height: 1.55; }
.improvement-points { display: grid; justify-items: end; gap: 5px; }
.improvement-points b { color: #0b7a50; font-size: 13px; }
.improvement-points button { padding: 6px 10px; color: var(--c-brand); background: var(--c-brand-soft); border: 1px solid var(--c-line); border-radius: var(--r-sm); font-size: 11px; font-weight: var(--fw-bold); white-space: nowrap; cursor: pointer; box-shadow: none; }
.improvement-complete { padding: 13px; display: flex; gap: 9px; border-radius: 10px; color: var(--c-success); background: var(--c-success-soft); font-size: 12px; }
.improvement-complete b { flex: 0 0 auto; }
.improvement-note { margin: 11px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.analysis-grid { display: grid; grid-template-columns: 1.35fr .8fr; gap: 18px; margin-top: 20px; }
.analysis-grid h3, .advice-section h3 { margin: 0 0 12px; color: var(--navy); font-size: 16px; }
.chance-list, .outcome-list { display: grid; gap: 8px; }
.chance-row, .outcome-row { border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
.chance-row-head, .outcome-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.section-hint { margin: -6px 0 12px; color: var(--muted); font-size: 12px; }
.outcome-row.school-outcome-button { width: 100%; color: inherit; background: #fcfdff; text-align: left; cursor: pointer; box-shadow: none; transition: border-color .18s, background .18s, transform .18s; }
.outcome-row.school-outcome-button:hover { border-color: #8eb3df; background: #f4f8fd; transform: translateY(-1px); }
.outcome-row.school-outcome-button:focus-visible { outline: 3px solid rgba(28, 91, 154, .22); outline-offset: 2px; }
.outcome-row-main { min-width: 0; display: grid; gap: 2px; }
.outcome-row-main small { color: var(--muted); }
.outcome-row-value { display: grid; justify-items: end; gap: 2px; white-space: nowrap; }
.outcome-row-value small { color: var(--c-brand); font-weight: var(--fw-bold); }
.chance-row small { display: block; color: var(--muted); margin-top: 3px; }
.chance-value { font-weight: 900; color: var(--navy); white-space: nowrap; }
.chance-track { margin-top: 8px; height: 6px; background: #e8edf4; border-radius: 999px; overflow: hidden; }
.chance-track i { display: block; height: 100%; width: calc(var(--chance) * 1%); background: var(--c-brand); border-radius: inherit; }
.outcome-row b { color: var(--blue); }
.advice-section { margin-top: 18px; padding: 16px; border-radius: 12px; background: #fff9ec; border: 1px solid #f2dfb3; }
.advice-section ol { margin: 0; padding-left: 23px; }
.advice-section li { margin: 7px 0; line-height: 1.55; }
.method-details { margin-top: 15px; color: var(--muted); font-size: 13px; }
.method-details summary { cursor: pointer; font-weight: 700; color: #4b5971; }
.method-details ul { line-height: 1.7; }

.disclaimer { margin: 18px 0 0; padding: 17px 19px; border-radius: 12px; color: #5d6676; background: #f7f8fa; border: 1px solid #dfe3e8; }
.disclaimer strong { color: #353f50; }
.disclaimer p { margin: 7px 0 0; font-size: 12px; line-height: 1.7; }
footer { max-width: 1440px; margin: 0 auto; padding: 10px 24px 28px; display: flex; justify-content: space-between; color: #657187; font-size: 12px; }

dialog { width: min(760px, calc(100vw - 32px)); max-height: 80vh; border: 0; border-radius: 16px; padding: 0; box-shadow: 0 28px 80px rgba(20, 36, 66, .32); }
dialog::backdrop { background: rgba(11, 22, 43, .58); }
.dialog-head { padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 19px; }
.dialog-head button { background: #eef2f7; width: 34px; height: 34px; padding: 0; }
#sourceContent { padding: 19px 20px; overflow: auto; max-height: calc(80vh - 70px); }
#sourceContent a { color: var(--blue); word-break: break-all; }
.source-row { padding: 9px 0; border-bottom: 1px solid var(--line); }
.source-row small { display: block; color: var(--muted); margin-top: 3px; }
.school-detail-dialog { width: min(720px, calc(100vw - 24px)); max-height: min(88vh, 900px); }
.school-detail-dialog .dialog-head small { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.school-detail-content { padding: 20px; overflow: auto; max-height: calc(88vh - 76px); }
.school-detail-lead { margin: 0 0 15px; color: #46546a; line-height: 1.65; }
.school-detail-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 16px; }
.school-detail-kpi { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.school-detail-kpi span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.school-detail-kpi strong { color: var(--navy); font-size: 14px; line-height: 1.35; }
.school-detail-section { margin-top: 18px; }
.school-detail-section h3 { margin: 0 0 9px; color: var(--navy); font-size: 16px; }
.school-fact-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; margin: 0; }
.school-fact-list div { padding: 8px 0; border-bottom: 1px solid var(--line); }
.school-fact-list dt { color: var(--muted); font-size: 11px; }
.school-fact-list dd { margin: 4px 0 0; color: #334158; line-height: 1.5; }
.school-history-wrap { overflow-x: auto; }
.school-history { width: 100%; border-collapse: collapse; font-size: 12px; }
.school-history th, .school-history td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.school-history th { color: var(--muted); background: #f8fafc; }
.school-detail-note { padding: 10px 12px; color: #655321; background: #fff8e8; border: 1px solid #f0dda8; border-radius: 9px; font-size: 12px; line-height: 1.55; }
.school-source-links { display: flex; flex-wrap: wrap; gap: 8px; }
.school-source-links a { padding: 7px 10px; color: var(--blue); background: #f2f7fc; border: 1px solid #d9e6f3; border-radius: 8px; text-decoration: none; font-size: 12px; }
.school-detail-actions { position: sticky; bottom: -20px; display: flex; justify-content: flex-end; gap: 9px; margin: 20px -20px -20px; padding: 13px 20px; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); }
.school-detail-actions button { width: auto; }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: 380px; background: #15223a; color: white; border-radius: 10px; padding: 12px 15px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s; z-index: 50; }
.toast.show { opacity: 1; transform: translateY(0); }
.error-box { color: var(--red); background: var(--red-soft); border-radius: 10px; padding: 12px; }

@media (max-width: 1100px) {
  .topbar-meta #dataVersion { display: none; }
  .workflow-steps { grid-template-columns: repeat(2, 1fr); }
  .guide-step-grid { grid-template-columns: repeat(3, 1fr); }
  .direction-form { grid-template-columns: repeat(3, 1fr); }
  #directionForm { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .direction-stats { grid-template-columns: 1fr 1fr; }
  .target-detail-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: repeat(3, 1fr); }
  .plan-coach { grid-template-columns: 1fr 1.7fr; }
  .plan-coach > button { grid-column: 1 / -1; justify-self: end; }
  .score-overview { grid-template-columns: 120px 1fr; }
  .dimension-grid { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  .topbar { height: auto; min-height: 70px; padding: 10px 18px 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .global-nav { grid-column: 1 / -1; width: calc(100% + 36px); margin: 0 -18px -8px; padding: 0 18px 8px; justify-content: flex-start; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; }
  .global-nav::-webkit-scrollbar { display: none; }
  .global-nav a { padding: 8px 10px; }
}

@media (max-width: 760px) {
  body { padding-bottom: 66px; }
  .topbar { min-height: 66px; padding: 10px 15px 8px; }
  .global-nav { width: calc(100% + 30px); margin-right: -15px; margin-left: -15px; padding-right: 15px; padding-left: 15px; }
  .topbar-meta #dataVersion { display: none; }
  .app-shell { padding: 12px; }
  .school-detail-dialog { width: 100vw; max-width: none; max-height: 86vh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .school-detail-content { max-height: calc(86vh - 76px); padding: 16px; }
  .school-detail-kpis { grid-template-columns: 1fr; }
  .school-fact-list { grid-template-columns: 1fr; }
  .school-detail-actions { bottom: -16px; margin: 18px -16px -16px; padding: 12px 16px; }
  .intro-strip { padding: 22px 18px; grid-template-columns: 1fr; align-items: flex-start; gap: 18px; }
  .intro-actions { width: 100%; }
  .intro-actions button, .intro-actions .button-link { flex: 1; min-width: 110px; }
  .intro-visual { width: 100%; height: 260px; }
  .starter-guide { padding: 17px 14px; }
  .workflow-guide { padding: 16px 14px; }
  .workflow-guide-head { align-items: stretch; flex-direction: column; }
  .workflow-guide-head .guide-start-button { width: 100%; }
  .workspace-switch { align-items: stretch; flex-direction: column; }
  .workspace-tabs { width: 100%; }
  .direction-workspace { padding: 18px 14px; }
  .direction-hero, .direction-result-head { flex-direction: column; }
  .direction-form { grid-template-columns: 1fr 1fr; }
  #directionForm { grid-template-columns: 1fr 1fr; }
  .simulation-mode-card { grid-column: span 2; }
  .target-school-field { grid-column: 1 / -1; }
  .direction-submit { align-items: stretch; flex-direction: column; }
  .direction-submit button, .direction-result-head button { width: 100%; }
  .direction-result-actions, .direction-risk-switch { width: 100%; }
  .panel-heading-actions { width: 100%; justify-content: space-between; }
  .compact-back { white-space: normal; }
  .direction-risk-switch button { min-width: 0; }
  .direction-groups { grid-template-columns: 1fr; }
  .starter-guide-head { align-items: flex-start; }
  .guide-step-grid { grid-template-columns: 1fr 1fr; }
  .guide-rules { align-items: flex-start; flex-direction: column; }
  .quick-return { right: 12px; left: 12px; bottom: 10px; display: grid; grid-template-columns: repeat(3, 1fr); transform: none; }
  .quick-return button, .quick-return a { min-width: 0; padding: 9px 6px; }
  .step-nav { grid-template-columns: repeat(5, minmax(68px, 1fr)); overflow-x: auto; }
  .step-nav a { padding: 10px 4px; display: grid; justify-items: center; font-size: 10px; }
  .panel { padding: 16px 13px; }
  .panel-heading { align-items: flex-start; }
  .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-confirmations { grid-template-columns: 1fr; }
  .quota-details { grid-template-columns: 1fr; }
  .school-selection-status { align-items: flex-end; flex-direction: column; gap: 5px; }
  .filter-row { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .school-table th:nth-child(4), .school-table td:nth-child(4), .school-table th:nth-child(5), .school-table td:nth-child(5) { display: none; }
  .volunteer-row { grid-template-columns: 76px minmax(0, 1fr) 72px; gap: 7px; }
  .plan-coach { grid-template-columns: 1fr; }
  .plan-coach > button { grid-column: auto; width: 100%; }
  .slot-meta { grid-column: 2; }
  .row-actions { grid-column: 3; grid-row: 1 / 3; }
  .score-overview { padding: 15px; grid-template-columns: 100px 1fr; gap: 13px; }
  .score-ring { width: 94px; height: 94px; }
  .dimension-grid { grid-template-columns: repeat(2, 1fr); }
  .improvement-card { grid-template-columns: 28px minmax(0, 1fr); }
  .improvement-points { grid-column: 2; display: flex; align-items: center; justify-content: space-between; }
  .analysis-grid { grid-template-columns: 1fr; }
  .analysis-actions { width: 100%; }
  .analysis-actions button { flex: 1; }
  footer { padding: 8px 15px 22px; gap: 10px; flex-direction: column; }
}

@media (max-width: 430px) {
  .brand strong { font-size: 14px; }
  .brand small { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .global-nav a { padding: 8px 9px; font-size: 12px; }
  .profile-grid { grid-template-columns: 1fr; }
  .workflow-steps { grid-template-columns: 1fr 1fr; }
  .workflow-steps button { padding: 9px; }
  .starter-guide-head { display: grid; }
  .workspace-tabs { grid-template-columns: 1fr; }
  .intro-visual { height: 225px; }
  .direction-form, .direction-stats { grid-template-columns: 1fr; }
  .simulation-mode-card { grid-column: span 1; grid-template-columns: 26px minmax(0, 1fr); }
  .simulation-mode-state { grid-column: 2; justify-self: start; }
  #directionForm { grid-template-columns: 1fr; }
  .direction-school { grid-template-columns: 50px minmax(0, 1fr); }
  .direction-chance { grid-column: 2; text-align: left; }
  .direction-notice { display: grid; }
  .guide-start-button { width: 100%; }
  .guide-step-grid { grid-template-columns: 1fr; }
  .checkbox-field { padding-top: 4px; }
  .filter-row { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .school-table th:nth-child(2), .school-table td:nth-child(2) { display: none; }
  .volunteer-row { grid-template-columns: 70px minmax(0, 1fr); }
  .row-actions { grid-column: 1 / -1; grid-row: auto; justify-content: flex-end; }
  .score-overview { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .improvement-head, .score-cap, .improvement-complete { align-items: flex-start; flex-direction: column; }
}

@media print {
  body { background: white; }
  .topbar, #landing, #innerTools, .intro-actions, .intro-trust, .intro-visual, .workspace-switch, #directionWorkspace, #targetWorkspace, .step-nav, #profile, #schoolExplorer, #volunteerForm .form-actions, .analysis-actions, .quick-return, footer, .toast { display: none !important; }
  .app-shell { max-width: none; padding: 0; }
  .intro-strip { color: #111; background: white; box-shadow: none; padding: 0 0 14px; }
  .intro-strip p, .eyebrow { color: #333; }
  .panel { box-shadow: none; border: 1px solid #bbb; break-inside: avoid; }
  #analysis { display: block !important; }
  .disclaimer { break-inside: avoid; }
}

/* ===== 极简首屏 landing（无横幅，仅核心入口） ===== */
.landing { margin: clamp(28px, 6vw, 72px) auto 0; max-width: 1080px; padding: 0; }

.landing-cards { margin-top: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.landing-card { text-align: left; padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; color: var(--c-ink); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); box-shadow: var(--e-2); transition: transform .14s ease, box-shadow .16s ease, border-color .16s ease; }
.landing-card:hover, .landing-card:focus-visible { transform: translateY(-3px); border-color: var(--c-brand); box-shadow: var(--e-3); outline: none; }
.landing-card:focus-visible { box-shadow: var(--focus-ring); }
.landing-card-kicker { font-size: 11px; font-weight: 900; letter-spacing: .12em; color: var(--c-brand); }
.landing-card h2 { margin: 2px 0 0; font-size: 19px; color: var(--c-navy); }
.landing-card p { margin: 0; color: var(--c-muted); font-size: 13px; line-height: 1.5; }
.landing-card-cta { margin-top: 12px; align-self: flex-start; pointer-events: none; }
.landing-card--featured { border-color: var(--c-brand); box-shadow: 0 0 0 2px rgba(11,92,255,.18), var(--e-3); }
.landing-card--featured .landing-card-kicker::after { content: " · 推荐"; color: var(--c-success); }

.landing-more { margin: 28px auto 0; max-width: 980px; border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-surface); box-shadow: var(--e-1); }
.landing-more > summary { padding: 12px 16px; color: var(--c-ink); font-size: 13px; font-weight: 750; cursor: pointer; list-style: none; }
.landing-more > summary::-webkit-details-marker { display: none; }
.landing-more-grid { padding: 4px 16px 14px; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.landing-more .text-button { color: var(--c-brand); text-decoration: underline; }
.landing-more .text-button:hover { color: var(--c-brand-strong); }
.landing-previews { padding: 0 16px 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.landing-previews figure { margin: 0; overflow: hidden; border-radius: var(--r-sm); border: 1px solid var(--c-line); background: var(--c-surface); box-shadow: var(--e-1); }
.landing-previews img { width: 100%; height: 150px; object-fit: cover; object-position: top center; display: block; }

@media (max-width: 760px) {
  .landing-cards { grid-template-columns: 1fr; }
  .landing-previews { grid-template-columns: 1fr; }
  .landing-previews img { height: 200px; }
}

/* ===== 统一顶部导航（各功能独立页共享，保证跳转流畅） ===== */
.site-nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 16px; padding: 9px 22px; background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--c-line); }
.site-nav .brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--c-navy); font-weight: 900; font-size: 15px; white-space: nowrap; }
.site-nav .brand-mark { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--c-brand), var(--c-brand-strong)); color: #fff; }
.site-nav .brand-mark svg { width: 19px; height: 19px; }
.site-nav .nav-links { margin-left: auto; display: flex; align-items: center; gap: 3px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav .nav-links a { padding: 8px 12px; border-radius: var(--r-md); text-decoration: none; color: var(--c-ink-2); font-size: 13px; font-weight: 700; white-space: nowrap; }
.site-nav .nav-links a:hover, .site-nav .nav-links a:focus-visible { background: var(--c-soft); color: var(--c-navy); outline: none; }
.site-nav .nav-links a.is-current { color: var(--c-brand-strong); background: var(--c-brand-tint); }
.site-nav .nav-links a.nav-cta { color: #fff; background: var(--c-brand); }
.site-nav .nav-links a.nav-cta:hover, .site-nav .nav-links a.nav-cta:focus-visible { background: var(--c-brand-strong); color: #fff; }

/* 子页 hero（区别于首页 landing 大图） */
.page-hero { margin: clamp(20px, 4vw, 40px) auto 0; max-width: 1080px; padding: 0 4px; }
.page-hero .back-home { display: inline-flex; align-items: center; gap: 6px; color: var(--c-brand); font-size: 13px; font-weight: 800; text-decoration: none; margin-bottom: 14px; }
.page-hero .back-home:hover { text-decoration: underline; }
.page-hero .page-eyebrow { font-size: 11px; font-weight: 900; letter-spacing: .12em; color: var(--c-brand); }
.page-hero h1 { margin: 6px 0 8px; font-size: clamp(24px, 4vw, 34px); color: var(--c-navy); }
.page-hero p { margin: 0; color: var(--c-muted); font-size: 14px; line-height: 1.6; max-width: 760px; }

/* 首页 landing 卡片转为链接（保留卡片视觉） */
a.landing-card { text-decoration: none; }

@media (max-width: 760px) {
  .site-nav { flex-wrap: wrap; gap: 10px 12px; padding: 8px 14px; }
  .site-nav .nav-links { width: 100%; margin-left: 0; overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .site-nav .nav-links a { font-size: 12px; padding: 7px 10px; }
}
@media print {
  .site-nav { display: none !important; }
}

/* ============================================================
   视觉优化层（图标 / 排版层次 / 留白 / 色块）— 2026-07-24
   仅在既有结构与令牌上叠加样式，不改动业务逻辑与调用点。
   ============================================================ */

/* 图标徽标：统一小型圆角底色 + 描边图标 */
.icon-badge { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; background: var(--c-brand-soft); color: var(--c-brand); box-shadow: inset 0 0 0 1px rgba(11,92,255,.10); }
.icon-badge svg { width: 21px; height: 21px; display: block; }
.icon-badge--brand { background: var(--c-brand-soft); color: var(--c-brand); }
.icon-badge--success { background: var(--c-success-soft); color: var(--c-success); }
.icon-badge--warning { background: var(--c-warning-soft); color: var(--c-warning); }
.icon-badge--info { background: var(--c-info-soft); color: var(--c-info); }
.icon-badge--navy { background: #eef2f8; color: var(--c-navy); }

/* 标题组：图标 + 文字 横向对齐 */
.panel-heading-title, .hero-title-group { display: flex; align-items: flex-start; gap: 12px; }
.panel-heading-title > div, .hero-title-group > div { min-width: 0; }
.hero-title-group .icon-badge { margin-top: 2px; }

/* step-label 升级为胶囊标签，弱化但更精致 */
.step-label { display: inline-block; margin-bottom: 5px; padding: 3px 9px; border-radius: 999px; background: var(--c-brand-tint); color: var(--c-brand); border: 1px solid rgba(11,92,255,.14); font-size: 10px; font-weight: 900; letter-spacing: .12em; }

/* 首屏品牌徽标：渐变圆角方块 + 白色图标，作为视觉锚点 */
.home-brandmark { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 18px; border-radius: 19px; background: linear-gradient(135deg, var(--c-brand), var(--c-brand-strong)); color: #fff; box-shadow: var(--e-2); }
.home-brandmark svg { width: 33px; height: 33px; }

/* landing 卡片图标 */
.landing-card-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; margin-bottom: 2px; background: var(--c-brand-tint); color: var(--c-brand); }
.landing-card--featured .landing-card-icon { background: var(--c-brand); color: #fff; }
.landing-card-icon svg { width: 24px; height: 24px; }

/* 排版层次：导语放大、标题加重，用字号/颜色/间距拉出主次 */
.direction-hero h2 { font-size: 25px; letter-spacing: -.01em; }
.workflow-guide h2 { font-size: 21px; }
.panel-heading h2 { font-size: 21px; letter-spacing: -.01em; }
.direction-hero p, .workflow-guide p { font-size: 14px; line-height: 1.7; color: var(--c-muted); }
.home-source-note { font-size: 13px; line-height: 1.7; }

/* 留白：放大面板与分区间距，降低信息密度 */
.panel { padding: 26px 28px; margin-top: 22px; border-radius: 18px; }
.direction-workspace { padding: 28px; margin-top: 22px; border-radius: 20px; }
.panel-heading { margin-bottom: 22px; }
.direction-hero, .direction-result-head { gap: 24px; }
.direction-form, .profile-grid { gap: 16px; }
label { gap: 8px; }

/* 色块：数据卡 / 维度卡 升级为柔和渐变底，强化"卡片"观感 */
.direction-stat { background: linear-gradient(160deg, #ffffff, #f6f9fe); border-color: #e4eaf4; }
.dimension-card { background: linear-gradient(160deg, #ffffff, #f6f9fe); border-color: #e4eaf4; }
.dimension-card strong { font-weight: 900; }
.chance-row, .outcome-row { background: #fcfdff; border-color: #e6ebf2; }
.chance-row-head strong, .outcome-row strong { color: var(--c-navy); }

@media (max-width: 760px) {
  .panel { padding: 18px 15px; margin-top: 18px; }
  .direction-workspace { padding: 20px 16px; margin-top: 18px; }
  .panel-heading { margin-bottom: 18px; }
  .direction-form, .profile-grid { gap: 13px; }
  .hero-title-group, .panel-heading-title { gap: 10px; }
}

/* ============================================================
   次要入口 / 概览预览 / 付费弹层 — 2026-07-25
   仅在既有结构与令牌上叠加样式，不改动业务逻辑与调用点。
   ============================================================ */

/* 次要入口：位于三个功能格子下方，视觉层级低于主卡片 */
.secondary-entries { margin: 26px auto 0; max-width: 1100px; padding: 0 16px; }
.secondary-eyebrow { margin: 0 0 12px; font-size: 12px; font-weight: 900; letter-spacing: .1em; color: var(--c-muted); }
.secondary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.secondary-entry { display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: var(--c-ink); text-decoration: none; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md); box-shadow: var(--e-1); transition: transform .14s ease, border-color .16s ease, box-shadow .16s ease; }
.secondary-entry:hover, .secondary-entry:focus-visible { transform: translateY(-2px); border-color: var(--c-brand); box-shadow: var(--e-2); outline: none; }
.secondary-entry:focus-visible { box-shadow: var(--focus-ring); }
.secondary-icon { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--c-brand-soft); color: var(--c-brand); }
.secondary-icon svg { width: 23px; height: 23px; display: block; }
.secondary-text { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.secondary-text strong { color: var(--c-navy); font-size: 15px; }
.secondary-text small { color: var(--c-muted); font-size: 12px; line-height: 1.4; }
.secondary-go { flex: 0 0 auto; color: var(--c-brand); font-size: 18px; font-weight: 800; }

/* 功能概览预览：未付费用户可见的概览内容 */
.home-preview { margin: 30px auto 0; max-width: 1100px; padding: 0 16px; }
.home-preview-title { margin: 0 0 16px; font-size: clamp(20px, 3vw, 26px); color: var(--c-navy); }
.preview-copy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.preview-copy p { margin: 0; padding: 15px 16px; border-radius: var(--r-md); border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-muted); font-size: 13px; line-height: 1.7; }
.preview-copy strong { color: var(--c-navy); }
.preview-note { margin: 14px 0 0; font-size: 12.5px; color: var(--c-muted); display: none; }
body.is-locked .preview-note { display: block; }

/* 付费弹层 */
.paywall-open { overflow: hidden; }
.paywall-overlay { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(18, 28, 48, .55); }
.paywall-overlay.show { display: flex; animation: paywall-fade .18s ease; }
@keyframes paywall-fade { from { opacity: 0; } to { opacity: 1; } }
.paywall-card { position: relative; width: min(440px, 100%); max-height: 90vh; overflow: auto; padding: 30px 28px 26px; background: var(--c-surface); border-radius: var(--r-xl); box-shadow: 0 30px 80px rgba(18, 28, 48, .35); text-align: left; }
.paywall-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--c-soft); color: var(--c-muted); font-size: 20px; line-height: 1; cursor: pointer; transition: background .14s, color .14s; }
.paywall-close:hover { background: var(--c-line); color: var(--c-ink); }
.paywall-eyebrow { font-size: 11px; font-weight: 900; letter-spacing: .1em; color: var(--c-brand); }
.paywall-title { margin: 6px 0 8px; font-size: 24px; color: var(--c-navy); }
.paywall-sub { margin: 0 0 16px; font-size: 13px; line-height: 1.6; color: var(--c-muted); }
.paywall-benefits { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 9px; }
.paywall-benefits li { position: relative; padding-left: 24px; font-size: 13px; color: var(--c-ink); line-height: 1.5; }
.paywall-benefits li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--c-success-soft); color: var(--c-success); font-size: 11px; font-weight: 900; }
.paywall-price { display: flex; align-items: baseline; gap: 10px; padding: 14px 16px; border-radius: var(--r-md); background: var(--c-brand-tint); }
.paywall-price strong { font-size: 30px; color: var(--c-brand); }
.paywall-price strong small { font-size: 16px; }
.paywall-price span { font-size: 12px; color: var(--c-muted); }
.paywall-pay { width: 100%; min-height: 48px; margin-top: 16px; color: #fff; background: var(--c-success); border: 1px solid transparent; border-radius: var(--r-md); font-size: 15px; font-weight: var(--fw-bold); cursor: pointer; box-shadow: 0 10px 24px rgba(17, 133, 91, .25); transition: filter .14s, box-shadow .14s; }
.paywall-pay:hover { filter: brightness(.97); }
.paywall-pay:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.paywall-later { width: 100%; margin-top: 10px; padding: 8px; color: var(--c-muted); background: transparent; border: 0; font-size: 13px; cursor: pointer; }
.paywall-later:hover { color: var(--c-ink); }

@media (max-width: 760px) {
  .secondary-grid { grid-template-columns: 1fr; }
  .preview-copy { grid-template-columns: 1fr; }
}

/* ===== 内容级付费马赛克（access-gate） ===== */
[data-gate] { position: relative; }
[data-gate].gated > *:not(.gate-veil) {
  filter: blur(9px);
  -webkit-filter: blur(9px);
  pointer-events: none;
  user-select: none;
}
.gate-veil {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.30);
  border-radius: inherit;
  cursor: pointer;
  outline: none;
  transition: background .15s ease;
}
.gate-veil:hover { background: rgba(255, 255, 255, 0.44); }
.gate-veil-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 86%;
  padding: 16px 22px;
  border-radius: var(--r-xl, 14px);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 14px 36px rgba(18, 28, 48, 0.20);
  text-align: center;
  transition: transform .15s ease;
}
.gate-veil:hover .gate-veil-card { transform: translateY(-2px); }
.gate-lock {
  width: 30px;
  height: 30px;
  color: var(--c-brand, #2563eb);
}
.gate-lock svg { width: 100%; height: 100%; display: block; }
.gate-veil-card strong { font-size: 15px; color: var(--c-navy, #0f172a); line-height: 1.3; }
.gate-desc { font-size: 12.5px; color: var(--c-muted, #64748b); line-height: 1.4; }
.gate-price { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--c-brand, #2563eb); }
.gate-veil:focus-visible { box-shadow: var(--focus-ring, 0 0 0 3px rgba(37, 99, 235, .35)); }
