/* ============================================================
   百题砍导航（fszs.net）
   家族同款视觉语言：纸感底 / 墨绿主色 / 衬线品牌字 / 卡片色条
   参照：d:\经济师\cf-econ-cards、d:\fakao\cf-fakao-cards
   ============================================================ */

:root {
  --paper: #f7f5ef;
  --paper-deep: #efece3;
  --surface: #fffefa;
  --surface-2: #fbfaf6;
  --ink: #22262b;
  --ink-2: #4d545c;
  --muted: #7c838c;
  --faint: #a7adb4;
  --line: #e5e1d7;
  --line-strong: #d6d0c2;
  --accent: #175e54;
  --accent-2: #2d7a6d;
  --accent-soft: #e8f1ed;
  --blue: #2c5f9e;
  --blue-soft: #edf3fa;
  --green: #24734f;
  --green-soft: #edf6f1;
  --amber: #9a6418;
  --amber-soft: #fbf3e4;
  --rose: #9d4b5d;
  --rose-soft: #faeef1;
  --violet: #6a4e8e;
  --violet-soft: #f3eef9;
  --slate: #56616e;
  --slate-soft: #eef1f4;
  --shadow: 0 1px 2px rgba(34, 38, 43, .04), 0 10px 28px rgba(34, 38, 43, .035);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", SimSun, serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select { font: inherit; color: inherit; }

button { cursor: pointer; }

a { color: var(--accent); text-decoration: none; }

button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(23, 94, 84, .55);
  outline-offset: 2px;
}

::selection { background: rgba(23, 94, 84, .16); }

.wrap {
  width: min(1080px, calc(100% - 48px));
  margin-inline: auto;
}

.hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  transform: translateY(-160%);
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
}
.skip-link:focus { transform: translateY(0); }

/* ---------------- Topbar ---------------- */

.topbar { padding: 16px 0 8px; }

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  margin: 0;
  flex: none;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.2;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1;
}

.brand-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}

.brand-free,
.brand-beta {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}

.brand-free {
  border: 1px solid rgba(36, 115, 79, .28);
  background: var(--green-soft);
  color: var(--green);
}

.brand-beta {
  border: 1px solid rgba(146, 96, 12, .32);
  background: rgba(234, 179, 8, .14);
  color: #8a5c0a;
}

/* ---------------- Hero ---------------- */

.hero { padding: 30px 0 6px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 36px;
  align-items: center;
}

.hero h1 {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: clamp(25px, 3.6vw, 36px);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -.015em;
  color: var(--ink);
}

.hero h1 .hero-h1-accent { color: var(--accent); }

.hero-lead {
  margin: 0 0 16px;
  max-width: 34em;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.9;
}

.hero-lead strong { color: var(--ink); font-weight: 650; }

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-chips li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
}

.hero-chips li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* hero 右侧：家族卡片示意（装饰性， aria-hidden ） */

.hero-preview {
  position: relative;
  height: 218px;
  pointer-events: none;
}

.preview-card {
  position: absolute;
  left: 8%;
  width: 84%;
  padding: 15px 18px 13px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--type, var(--slate));
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 2px 4px rgba(34, 38, 43, .045), 0 16px 40px rgba(34, 38, 43, .06);
}

.preview-card.preview-back {
  top: 0;
  transform: rotate(-2.4deg) translateY(6px);
  opacity: .55;
}

.preview-card.preview-front {
  bottom: 0;
  transform: rotate(1.6deg);
}

.preview-card.type-examPoint { --type: var(--blue); --type-soft: var(--blue-soft); }
.preview-card.type-mnemonic { --type: var(--violet); --type-soft: var(--violet-soft); }

.preview-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--type-soft, var(--slate-soft));
  color: var(--type, var(--slate));
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}

.preview-seq {
  color: var(--faint);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .05em;
}

.preview-title {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.62;
}

.preview-answer {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.preview-answer b { color: var(--type, var(--slate)); }

/* ---------------- Sites（站点导航卡片） ---------------- */

.sites { padding: 34px 0 10px; }

.sites-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.sites-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.sites-head .sites-count {
  color: var(--faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.site-card {
  --type: var(--slate);
  --type-soft: var(--slate-soft);
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 24px 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--type);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 2px 4px rgba(34, 38, 43, .045), 0 18px 44px rgba(34, 38, 43, .055);
  transition: transform .18s cubic-bezier(.2, .8, .3, 1), box-shadow .18s ease, border-color .18s ease;
}

.site-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 4px 8px rgba(34, 38, 43, .05), 0 24px 56px rgba(34, 38, 43, .09);
}

.site-card.site-econ { --type: var(--accent); --type-soft: var(--accent-soft); }
.site-card.site-fakao { --type: var(--blue); --type-soft: var(--blue-soft); }
.site-card.site-soon { --type: var(--slate); --type-soft: var(--slate-soft); }

/* 即将上线：虚线轮廓 + 无浮起，明示「还不是入口」 */
.site-card.is-soon {
  border-style: dashed;
  border-left-style: solid;
  background: transparent;
  box-shadow: none;
}
.site-card.is-soon:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: none;
}

.site-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.tag-free,
.tag-beta {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}

.tag-free {
  border: 1px solid rgba(36, 115, 79, .28);
  background: var(--green-soft);
  color: var(--green);
}

.tag-beta {
  border: 1px solid rgba(146, 96, 12, .32);
  background: rgba(234, 179, 8, .14);
  color: #8a5c0a;
}

.site-name {
  margin: 13px 0 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -.008em;
}

.site-name a { color: var(--ink); }
.site-name a:hover { color: var(--type); }

.site-desc {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.85;
}

.site-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.site-chips li {
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.site-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
}

.site-domain {
  color: var(--faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  min-width: 0;
  overflow-wrap: anywhere;
}

.site-go {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px;
  border: 1px solid var(--type);
  border-radius: 9px;
  background: var(--type);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  transition: background .16s ease, border-color .16s ease;
}

.site-go:hover { filter: brightness(1.08); }
.site-go:active { filter: brightness(.96); }

.site-go .arr {
  display: inline-block;
  font-weight: 700;
  transition: transform .16s cubic-bezier(.2, .8, .3, 1);
}

.site-card:hover .site-go .arr,
.site-go:hover .arr { transform: translateX(3px); }

.site-soon-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 600;
}

/* ---------------- Notes（可被爬虫读到的正文） ---------------- */

.notes {
  padding: 30px 0 6px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.85;
}

.notes h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.01em;
}

.notes h3 {
  margin: 15px 0 3px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 650;
}

.notes p { margin: 0 0 9px; }
.notes strong { color: var(--ink); font-weight: 650; }
.notes code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-2);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
}

.notes-keys {
  margin: 0;
  padding: 0;
  list-style: none;
}

.notes-keys li {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 6px;
}

.notes-keys li > span:first-child {
  flex: none;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--slate-soft);
  color: var(--slate);
  font-size: 11px;
  font-weight: 600;
}

.notes-keys .nk-body {
  flex: 1 1 auto;
  min-width: 0;
}

.notes kbd {
  display: inline-block;
  min-width: 17px;
  margin: 0 1px;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}

.notes details {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
}

.notes summary {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  list-style: none;
}

.notes summary::-webkit-details-marker { display: none; }

.notes summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 1px solid rgba(23, 94, 84, .35);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.notes details[open] summary { margin-bottom: 8px; }
.notes details[open] summary::before { content: "−"; }

/* ---------------- Footer ---------------- */

.footer {
  padding: 20px 0 26px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 11px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* 文档页链接行：独占一行，与子站链接区分 */
.footer-docs {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.footer a,
.notes a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(23, 94, 84, .3);
}

.footer a:hover,
.notes a:hover { border-bottom-color: var(--accent); }

/* ---------------- Responsive ---------------- */

@media (max-width: 920px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .hero-preview {
    height: 190px;
    max-width: 460px;
  }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 36px); }
  .hero { padding-top: 22px; }
  .sites-grid { grid-template-columns: 1fr; }
  .site-card { padding: 19px 18px 17px; min-width: 0; }
  .site-foot { padding-top: 15px; }
  .preview-card { left: 4%; width: 92%; }
}

/* ---------------- 动效减弱 ---------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-card,
  .site-go,
  .site-go .arr { transition: none; }
  .site-card:hover { transform: none; }
  .site-card:hover .site-go .arr { transform: none; }
}
