:root {
  --primary: #5b6cff;
  --primary-dark: #3d4bd8;
  --secondary: #ffb23f;
  --ink: #17213a;
  --muted: #667085;
  --line: #e6e9f2;
  --surface: #ffffff;
  --surface-soft: #f6f7fb;
  --success: #24a16a;
  --shadow: 0 16px 45px rgba(34, 45, 88, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #eef1f8;
  line-height: 1.65;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.site-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  background: var(--surface-soft);
  min-height: 100vh;
  overflow: hidden;
}

.hero {
  position: relative;
  padding: 24px clamp(20px, 5vw, 76px) 90px;
  color: #fff;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.18), transparent 25%),
    linear-gradient(135deg, #5566ee 0%, #6f57d9 55%, #7b4ec5 100%);
  border-radius: 0 0 48px 48px;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -130px 42%;
  height: 220px;
  transform: rotate(-7deg);
  background: rgba(255,255,255,.08);
  border-radius: 50%;
}
.topbar, .hero-content {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 15px;
  background: rgba(255,255,255,.14);
  font-size: 25px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 18px; letter-spacing: .04em; }
.brand small { opacity: .78; font-size: 12px; }
.nav-actions { display: flex; gap: 10px; }
.primary-btn, .ghost-btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  font-weight: 700;
  transition: .2s ease;
}
.primary-btn { color: #fff; background: var(--primary); box-shadow: 0 8px 20px rgba(91,108,255,.28); }
.primary-btn:hover { transform: translateY(-2px); background: var(--primary-dark); }
.ghost-btn { color: inherit; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12); }
.ghost-btn:hover { background: rgba(255,255,255,.2); }

.hero-content {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(40px, 7vw, 90px);
  padding-top: 76px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .86;
}
.eyebrow::before { content: ""; width: 24px; height: 3px; border-radius: 3px; background: var(--secondary); }
.eyebrow.dark { color: var(--primary); opacity: 1; }
.hero h1 {
  margin: 18px 0;
  font-size: clamp(42px, 6vw, 70px);
  line-height: 1.08;
  letter-spacing: -.04em;
}
.hero h1 em { color: #ffe08b; font-style: normal; }
.hero-copy > p { max-width: 650px; margin: 0; color: rgba(255,255,255,.83); font-size: 17px; }
.site-notice {
  max-width: 700px;
  margin: 0 0 22px;
  padding: 17px 19px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 18px;
  background: rgba(16,24,40,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  color: rgba(255,255,255,.9);
  font-size: 13px;
  line-height: 1.75;
}
.site-notice p { margin: 0; }
.site-notice p + p { margin-top: 7px; }
.hero-stats { display: flex; gap: 38px; margin-top: 34px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 28px; line-height: 1; }
.hero-stats span { margin-top: 8px; font-size: 12px; opacity: .7; }

.hero-board {
  position: relative;
  min-height: 350px;
  border-radius: 40px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
  backdrop-filter: blur(4px);
}
.math-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 190px;
  min-height: 118px;
  padding: 22px;
  color: var(--ink);
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 22px 35px rgba(30, 32, 70, .28);
}
.math-card span { color: var(--muted); font-size: 14px; }
.math-card strong { margin-top: 8px; font-size: 25px; }
.card-a { top: 42px; left: 30px; transform: rotate(-7deg); }
.card-b { right: 22px; top: 105px; transform: rotate(6deg); }
.card-c { left: 95px; bottom: 28px; transform: rotate(-2deg); }
.card-b::before, .card-c::before {
  content: ""; position: absolute; right: 18px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--secondary);
}
.card-c::before { background: #50c995; }
.orbit { position: absolute; border: 1px dashed rgba(255,255,255,.3); border-radius: 50%; }
.orbit-one { width: 260px; height: 260px; right: 70px; top: 36px; }
.orbit-two { width: 180px; height: 180px; left: 42px; bottom: 18px; }
.shape { position: absolute; font-size: 26px; font-weight: 800; color: #ffe08b; }
.shape-one { right: 32px; top: 30px; }
.shape-two { left: 18px; bottom: 22px; }
.shape-three { right: 36px; bottom: 28px; }

main { max-width: 1180px; margin: -42px auto 0; padding: 0 20px 72px; position: relative; z-index: 3; }
.control-panel {
  padding: 26px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.search-wrap { position: relative; }
.search-icon { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: var(--primary); font-size: 24px; font-weight: 800; }
.search-wrap input {
  width: 100%;
  height: 56px;
  padding: 0 52px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  background: var(--surface-soft);
  transition: .2s ease;
}
.search-wrap input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(91,108,255,.1); }
.clear-search { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #98a2b3; font-size: 22px; }
.filter-row { display: grid; gap: 16px; margin-top: 22px; }
.filter-group { display: grid; grid-template-columns: 54px 1fr; gap: 10px; align-items: start; }
.filter-label { padding-top: 7px; font-size: 13px; font-weight: 800; color: var(--muted); }
.chip-list { display: flex; flex-wrap: wrap; gap: 9px; }
.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  transition: .18s ease;
}
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { color: #fff; border-color: var(--primary); background: var(--primary); box-shadow: 0 6px 14px rgba(91,108,255,.22); }

.quick-guide {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0 60px;
}
.quick-guide article {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.guide-icon { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border-radius: 14px; color: var(--primary); background: #eef0ff; font-weight: 800; }
.quick-guide strong { font-size: 15px; }
.quick-guide p { margin: 3px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-heading h2 { margin: 7px 0 0; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.03em; }
.section-heading > p { color: var(--muted); font-weight: 700; }
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.topic-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(36,45,84,.06);
  overflow: hidden;
  transition: .22s ease;
}
.topic-card::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 4px; background: var(--card-accent, var(--primary)); }
.topic-card:hover { transform: translateY(-5px); box-shadow: 0 16px 30px rgba(36,45,84,.12); border-color: transparent; }
.topic-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grade-tag, .category-tag { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 10px; font-size: 11px; font-weight: 800; }
.grade-tag { color: var(--primary); background: #eef0ff; }
.category-tag { color: var(--muted); background: var(--surface-soft); }
.topic-card h3 { margin: 18px 0 8px; font-size: 21px; line-height: 1.35; }
.topic-summary { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.topic-points { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.topic-points li { position: relative; padding-left: 18px; color: #3e485f; font-size: 13px; }
.topic-points li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 900; }
.card-action { margin-top: auto; padding-top: 18px; border-top: 1px dashed var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--primary); font-weight: 800; font-size: 13px; }
.card-action span:last-child { transition: .2s ease; }
.topic-card:hover .card-action span:last-child { transform: translateX(4px); }
.topic-card button { position: absolute; inset: 0; width: 100%; opacity: 0; border: 0; }

.empty-state { padding: 70px 20px; text-align: center; border: 2px dashed var(--line); border-radius: var(--radius-lg); background: #fff; }
.empty-symbol { width: 64px; height: 64px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; color: var(--primary); background: #eef0ff; font-size: 30px; font-weight: 900; }
.empty-state h3 { margin: 0; }
.empty-state p { color: var(--muted); margin: 8px 0 20px; }

.method-section { margin-top: 72px; }
.method-card {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 40px;
  align-items: center;
  padding: clamp(30px, 5vw, 54px);
  color: #fff;
  background: linear-gradient(135deg, #17213a, #27355d);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.method-card h2 { margin: 12px 0 0; font-size: 36px; }
.method-card ol { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
.method-card li { min-height: 135px; padding: 16px; border-radius: 18px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); }
.method-card li strong { display: block; color: #ffe08b; font-size: 28px; }
.method-card li span { display: block; margin-top: 8px; color: rgba(255,255,255,.72); font-size: 12px; line-height: 1.5; }

footer { display: flex; justify-content: space-between; align-items: end; gap: 30px; padding: 34px clamp(20px,5vw,76px); color: #fff; background: #131b30; }
footer strong { font-size: 18px; }
footer p { margin: 4px 0 0; color: rgba(255,255,255,.58); font-size: 12px; }

.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(13,19,37,.7); backdrop-filter: blur(6px); }
.modal-panel { position: relative; width: min(720px, 100%); max-height: min(86vh, 820px); overflow: auto; padding: clamp(26px, 4vw, 42px); border-radius: 28px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.32); }
.modal-close { position: sticky; float: right; top: 0; z-index: 2; width: 38px; height: 38px; border: 0; border-radius: 50%; color: var(--muted); background: var(--surface-soft); font-size: 24px; }
.modal-head { padding-right: 48px; }
.modal-head h2 { margin: 12px 0 8px; font-size: clamp(28px,4vw,40px); line-height: 1.2; }
.modal-head p { color: var(--muted); }
.detail-section { margin-top: 28px; }
.detail-section h3 { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; font-size: 18px; }
.detail-section h3::before { content: ""; width: 5px; height: 18px; border-radius: 5px; background: var(--primary); }
.detail-box { padding: 18px; border-radius: 16px; background: var(--surface-soft); }
.detail-box ul { margin: 0; padding-left: 20px; }
.formula-box { padding: 18px; border-radius: 16px; color: var(--primary-dark); background: #eef0ff; font-size: 20px; font-weight: 900; text-align: center; letter-spacing: .02em; }
.example-box { padding: 18px; border: 1px solid #f2d9a2; border-radius: 16px; background: #fff9e9; }
.example-box strong { display: block; margin-top: 12px; color: #9a6500; }
.mistake-box { padding: 18px; border-radius: 16px; color: #8f3b3b; background: #fff1f1; }
body.modal-open { overflow: hidden; }

@media (max-width: 980px) {
  .hero-content { grid-template-columns: 1fr; }
  .hero-board { min-height: 320px; max-width: 600px; width: 100%; margin: 0 auto; }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .method-card { grid-template-columns: 1fr; }
  .method-card ol { grid-template-columns: repeat(5, minmax(110px,1fr)); overflow-x: auto; padding-bottom: 4px; }
}

@media (max-width: 680px) {
  .hero { padding-inline: 16px; padding-bottom: 72px; border-radius: 0 0 30px 30px; }
  .topbar { align-items: flex-start; }
  .nav-actions { flex-direction: column; }
  .nav-actions button { padding: 8px 11px; font-size: 12px; }
  .hero-content { padding-top: 52px; gap: 38px; }
  .hero h1 { font-size: 43px; }
  .hero-copy > p { font-size: 15px; }
  .site-notice { padding: 14px 15px; font-size: 12px; line-height: 1.65; }
  .hero-stats { gap: 24px; }
  .hero-board { min-height: 290px; }
  .math-card { width: 160px; min-height: 105px; padding: 16px; }
  .card-a { left: 12px; }
  .card-b { right: 8px; }
  .card-c { left: 58px; }
  main { margin-top: -30px; padding-inline: 14px; }
  .control-panel { padding: 18px; border-radius: 22px; }
  .filter-group { grid-template-columns: 1fr; }
  .filter-label { padding: 0; }
  .quick-guide { grid-template-columns: 1fr; margin-bottom: 45px; }
  .topic-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading > p { margin: 0; }
  .method-card { border-radius: 24px; }
  footer { align-items: flex-start; flex-direction: column; }
}

@media print {
  body { background: #fff; }
  .hero { color: #000; background: #fff; padding: 20px 0 30px; border-radius: 0; }
  .hero-board, .topbar, .control-panel, .quick-guide, .method-section, footer, .card-action, .modal { display: none !important; }
  .hero-content { display: block; padding-top: 15px; }
  .hero h1 { font-size: 34px; }
  .hero h1 em, .hero-copy > p, .hero-stats span, .site-notice { color: #000; }
  .site-notice { border-color: #bbb; background: #fff; box-shadow: none; }
  main { margin: 0; padding: 0; max-width: none; }
  .topic-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .topic-card { min-height: auto; break-inside: avoid; box-shadow: none; }
}

/* 页脚声明链接（2026-07 添加） */
footer .foot-links a { color: #9fb0ff; text-decoration: none; }
footer .foot-links a:hover { text-decoration: underline; }
