/* ==========================================================================
   自考本科指南 — 站点样式
   设计目标：信息密度高、层级清晰、长文可读、移动端友好、无需外部资源
   ========================================================================== */

:root {
  --ink:        #14181f;
  --ink-2:      #3d4653;
  --ink-3:      #6b7684;
  --line:       #e3e7ec;
  --line-2:     #eef1f5;
  --bg:         #ffffff;
  --bg-soft:    #f7f9fb;
  --bg-softer:  #fbfcfd;

  --brand:      #1f4e8c;
  --brand-dk:   #163a69;
  --brand-lt:   #e8f0fa;
  --accent:     #c8551a;
  --accent-lt:  #fdf0e8;
  --ok:         #1c7a52;
  --ok-lt:      #e8f5ef;
  --warn:       #b3341f;
  --warn-lt:    #fdeceb;

  --radius:     10px;
  --radius-sm:  6px;
  --shadow:     0 1px 2px rgba(20,24,31,.05), 0 4px 14px rgba(20,24,31,.05);
  --shadow-lg:  0 2px 4px rgba(20,24,31,.06), 0 12px 32px rgba(20,24,31,.09);
  --wrap:       1120px;
  --read:       760px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--brand); text-decoration: none; border-bottom: 1px solid rgba(31,78,140,.25); }
a:hover { color: var(--brand-dk); border-bottom-color: var(--brand); }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.35; font-weight: 700; margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 22px;
  height: 60px; max-width: var(--wrap);
}
.logo { display: flex; align-items: center; gap: 9px; border-bottom: 0; flex: 0 0 auto; }
.logo-mark {
  width: 28px; height: 28px; border-radius: 7px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--brand) 0%, #2f6bb5 100%);
  color: #fff; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.logo-text { font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: .2px; }
.logo-text em { font-style: normal; color: var(--brand); }

.nav { display: flex; gap: 2px; margin-left: auto; flex-wrap: nowrap; overflow-x: auto; }
.nav a {
  border-bottom: 0; padding: 6px 10px; border-radius: var(--radius-sm);
  font-size: 14.5px; color: var(--ink-2); white-space: nowrap;
}
.nav a:hover { background: var(--bg-soft); color: var(--brand); }
.nav a.is-active { color: var(--brand); background: var(--brand-lt); font-weight: 600; }

.nav-toggle { display: none; }

/* ---------- 面包屑 ---------- */
.crumb {
  font-size: 13.5px; color: var(--ink-3);
  padding: 16px 0 0; line-height: 1.6;
}
.crumb a { border-bottom: 0; color: var(--ink-3); }
.crumb a:hover { color: var(--brand); }
.crumb span { margin: 0 7px; opacity: .5; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 340px at 12% -18%, #e9f1fb 0%, rgba(233,241,251,0) 68%),
    linear-gradient(180deg, var(--bg-softer) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  padding: 52px 0 46px;
}
.hero h1 {
  font-size: clamp(27px, 4.2vw, 40px);
  letter-spacing: -.4px; line-height: 1.25;
  max-width: 20em;
}
.hero .lede {
  font-size: 17.5px; color: var(--ink-2);
  max-width: 46em; margin: 18px 0 0;
}
.hero .meta-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; padding: 4px 11px; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink-3);
}
.chip.is-brand { background: var(--brand-lt); border-color: #d3e2f5; color: var(--brand); }

/* ---------- 核心结论框 ---------- */
.verdict {
  border-left: 4px solid var(--brand);
  background: var(--brand-lt);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 22px; margin: 28px 0;
}
.verdict .vt { font-size: 12.5px; font-weight: 700; letter-spacing: .08em;
  color: var(--brand); text-transform: uppercase; margin-bottom: 8px; }
.verdict p { margin: 0; font-size: 17px; color: var(--ink); line-height: 1.75; }
.verdict p + p { margin-top: 10px; }

/* ---------- 通用提示框 ---------- */
.box { border-radius: var(--radius); padding: 18px 20px; margin: 24px 0; border: 1px solid var(--line); background: var(--bg-soft); }
.box .bt { font-weight: 700; color: var(--ink); margin-bottom: 8px; font-size: 15.5px; }
.box p:last-child, .box ul:last-child { margin-bottom: 0; }
.box.is-warn { background: var(--warn-lt); border-color: #f6d5d1; }
.box.is-warn .bt { color: var(--warn); }
.box.is-ok { background: var(--ok-lt); border-color: #cfe9dd; }
.box.is-ok .bt { color: var(--ok); }
.box.is-tip { background: var(--accent-lt); border-color: #f6ddcb; }
.box.is-tip .bt { color: var(--accent); }

/* ---------- 主体布局 ---------- */
.section { padding: 52px 0; }
.section.is-soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: var(--read); margin-bottom: 28px; }
.section-head h2 { font-size: clamp(21px, 2.6vw, 27px); letter-spacing: -.2px; }
.section-head p { margin: 10px 0 0; color: var(--ink-3); font-size: 16px; }

.prose { max-width: var(--read); }
.prose > * + * { margin-top: 18px; }
.prose h2 {
  font-size: clamp(20px, 2.4vw, 25px); margin-top: 46px; padding-top: 4px;
  letter-spacing: -.2px; scroll-margin-top: 84px;
}
.prose h3 { font-size: 18.5px; margin-top: 34px; scroll-margin-top: 84px; }
.prose h4 { font-size: 16.5px; margin-top: 26px; color: var(--ink); }
.prose p { margin: 0; }
.prose ul, .prose ol { margin: 0; padding-left: 1.35em; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--brand); }
.prose strong { color: var(--ink); font-weight: 700; }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

.card {
  display: block; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 20px 22px;
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
a.card { border-bottom: 1px solid var(--line); }
a.card:hover {
  border-color: #c9d9ec; box-shadow: var(--shadow);
  transform: translateY(-2px); text-decoration: none;
}
.card .ct { font-size: 16.5px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.card .cq {
  font-size: 14px; color: var(--brand); margin-top: 7px;
  font-family: var(--mono); line-height: 1.6; word-break: break-word;
}
.card .cd { font-size: 14.5px; color: var(--ink-3); margin-top: 10px; line-height: 1.75; }
.card .cf { font-size: 13px; color: var(--ink-3); margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.card .num {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px;
  background: var(--brand-lt); color: var(--brand);
  font-size: 12.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

.tag {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: 2px 9px; border-radius: 5px; line-height: 1.7;
}
.tag.t-high { background: #fdeceb; color: #b3341f; }
.tag.t-mid  { background: #fdf5e6; color: #96630f; }
.tag.t-low  { background: #eef1f5; color: var(--ink-3); }

/* ---------- 表格 ---------- */
.table-scroll { overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; background: var(--bg); }
caption { caption-side: top; text-align: left; font-size: 14px; color: var(--ink-3); padding: 12px 16px 0; }
th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: top; }
thead th {
  background: var(--bg-soft); font-weight: 700; color: var(--ink);
  font-size: 14.5px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--bg-softer); }
td strong { color: var(--ink); }

/* ---------- 清单 ---------- */
.checklist { list-style: none; padding: 0; margin: 22px 0; }
.checklist li {
  position: relative; padding-left: 30px; margin-top: 12px;
  font-size: 16px; line-height: 1.8;
}
.checklist li::before {
  content: ""; position: absolute; left: 4px; top: .62em;
  width: 13px; height: 8px; border-left: 2.5px solid var(--ok);
  border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg);
}
.checklist.is-no li::before {
  border-color: var(--warn); transform: none; border-left: 0;
  content: "✕"; width: auto; height: auto; top: 0; left: 3px;
  font-size: 13px; font-weight: 700; color: var(--warn); line-height: 1.9;
}

/* ---------- 步骤流 ---------- */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 26px 0; }
.steps > li {
  counter-increment: s; position: relative;
  padding: 0 0 24px 46px; border-left: 2px solid var(--line);
  margin-left: 15px;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  content: counter(s); position: absolute; left: -17px; top: -2px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--brand); color: var(--brand);
  font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.steps > li .st { font-weight: 700; color: var(--ink); font-size: 16.5px; display: block; margin-bottom: 4px; }
.steps > li p { margin: 0; font-size: 15.5px; color: var(--ink-2); }

/* ---------- FAQ ---------- */
.faq { max-width: var(--read); margin: 0; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 10px; background: var(--bg); overflow: hidden;
}
.faq details[open] { border-color: #cddcee; box-shadow: var(--shadow); }
.faq summary {
  cursor: pointer; padding: 15px 18px; font-weight: 700; color: var(--ink);
  font-size: 16px; list-style: none; display: flex; gap: 12px; align-items: flex-start;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; margin-left: auto; color: var(--brand);
  font-size: 20px; font-weight: 400; line-height: 1.4; flex: 0 0 auto;
}
.faq details[open] summary::after { content: "–"; }
.faq .fa-body { padding: 0 18px 18px; font-size: 15.5px; color: var(--ink-2); }
.faq .fa-body p { margin: 0; }
.faq .fa-body p + p { margin-top: 10px; }

/* ---------- 目录（页内锚点） ---------- */
.toc {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-soft); padding: 18px 20px; margin: 28px 0;
}
.toc .tt { font-size: 13px; font-weight: 700; letter-spacing: .06em;
  color: var(--ink-3); text-transform: uppercase; margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 1.25em; columns: 2; column-gap: 28px; font-size: 15px; }
.toc li { margin-top: 6px; }
.toc a { border-bottom: 0; }
.toc a:hover { text-decoration: underline; }

/* ---------- 页尾 ---------- */
.site-footer {
  background: #101720; color: #9aa6b4; font-size: 14.5px;
  padding: 46px 0 34px; margin-top: 0;
}
.site-footer a { color: #c8d4e2; border-bottom-color: rgba(200,212,226,.3); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 34px; }
.footer-grid h3 { color: #fff; font-size: 14px; margin-bottom: 12px; letter-spacing: .04em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-top: 8px; }
.footer-note {
  margin-top: 32px; padding-top: 22px; border-top: 1px solid #222c39;
  font-size: 13px; color: #6f7d8d; line-height: 1.8;
}
.footer-note p { margin: 0; }
.footer-note p + p { margin-top: 6px; }

/* ---------- 相关阅读 ---------- */
.related { border-top: 1px solid var(--line); margin-top: 56px; padding-top: 30px; }
.related .rt { font-size: 13px; font-weight: 700; letter-spacing: .06em;
  color: var(--ink-3); text-transform: uppercase; margin-bottom: 16px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; line-height: 1.8; }
  .site-header .wrap { height: auto; min-height: 56px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 6px; gap: 6px; }
  .nav {
    order: 3; width: 100%; margin-left: 0;
    margin: 0 -20px; padding: 0 20px 2px;
    -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  /* 触控目标：移动端链接高度不低于 44px，避免点不准 */
  .nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 14px; }
  .logo { min-height: 44px; }
  .footer-grid li { margin-top: 2px; }
  .footer-grid li a { display: inline-block; padding: 7px 0; }
  /* 表格：缩小字号与内边距，降低横滑幅度 */
  .table-scroll { cursor: grab; }
  table { min-width: 460px; font-size: 13.5px; }
  caption { font-size: 13px; padding: 10px 12px 0; }
  th, td { padding: 9px 11px; }
  thead th { font-size: 13.5px; }
  .hero { padding: 34px 0 30px; }
  .section { padding: 38px 0; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .toc ol { columns: 1; }
  .prose h2 { margin-top: 38px; }
}

@media print {
  .site-header, .site-footer, .nav, .related { display: none; }
  body { font-size: 12pt; }
}
