/* ========== AI学长 · 基础 ========== */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --bg-sink: #fbfcfe;
  --ink: #12151c;
  --ink-2: #4a5261;
  --ink-3: #7b8494;
  --line: #e6e9f0;
  --line-2: #d5dae5;
  --brand: #2f5fe0;
  --brand-2: #1d43b8;
  --brand-soft: #eef3ff;
  --accent: #ff7a45;
  --accent-soft: #fff2ec;
  --green: #16a34a;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(18, 21, 28, .04), 0 8px 24px rgba(18, 21, 28, .06);
  --shadow-lg: 0 2px 6px rgba(18, 21, 28, .05), 0 18px 48px rgba(18, 21, 28, .09);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

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

h1, h2, h3, h4 { margin: 0; line-height: 1.3; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
em { font-style: normal; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ========== Header ========== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #6a8cff);
  color: #fff; font-weight: 700; font-size: 14px; letter-spacing: -.02em;
}
.brand-mark.sm { width: 30px; height: 30px; font-size: 13px; }
.brand-text { display: flex; flex-direction: column; font-weight: 700; font-size: 16px; line-height: 1.15; }
.brand-sub { font-weight: 500; font-size: 10px; letter-spacing: .12em; color: var(--ink-3); text-transform: uppercase; }

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 7px 12px; border-radius: 8px;
  font-size: 14px; color: var(--ink-2);
}
.nav a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.nav a.is-active { color: var(--brand); background: var(--brand-soft); }
.nav a.nav-ext { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); }
.nav a.nav-ext:hover { background: var(--accent-soft); color: #c2410c; }
.nav a.nav-ext svg { width: 11px; height: 11px; opacity: .75; }

/* ========== Hero ========== */
.hero {
  position: relative;
  padding: 88px 0 72px;
  background:
    radial-gradient(900px 420px at 12% -10%, #eef3ff 0%, rgba(238,243,255,0) 60%),
    radial-gradient(700px 380px at 88% 8%, #fff2ec 0%, rgba(255,242,236,0) 62%),
    var(--bg);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .32; mask-image: radial-gradient(720px 420px at 50% 0%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(720px 420px at 50% 0%, #000 0%, transparent 78%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.eyebrow {
  font-size: 12px; letter-spacing: .18em; color: var(--brand);
  font-weight: 600; margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 800; letter-spacing: -.03em;
  margin-bottom: 22px;
}
.hero h1 em {
  color: var(--brand);
  border-bottom: 5px solid var(--accent-soft);
  padding-bottom: 2px;
}
.lede {
  max-width: 640px; font-size: 17px; color: var(--ink-2);
  margin-bottom: 30px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 46px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px;
  font-size: 15px; font-weight: 600;
  border: 1px solid transparent; transition: .18s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(47, 95, 224, .28); }
.btn-primary:hover { background: var(--brand-2); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 40px;
  padding-top: 26px; border-top: 1px solid var(--line);
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.hero-stats span { font-size: 13px; color: var(--ink-3); }

/* ========== Section ========== */
.section { padding: 84px 0; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 720px; margin-bottom: 40px; }
.sec-tag {
  font-size: 12px; font-weight: 700; letter-spacing: .16em;
  color: var(--brand); margin-bottom: 12px;
}
.sec-head h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; margin-bottom: 14px; }
.sec-desc { color: var(--ink-2); font-size: 16px; }

/* ========== 学习地图 ========== */
.map-layout { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; }
.map-rail { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 88px; }
.rail-item {
  display: flex; gap: 14px; align-items: flex-start; text-align: left;
  padding: 14px 16px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--line);
  cursor: pointer; font-family: inherit; transition: .18s;
}
.rail-item:hover { border-color: var(--line-2); transform: translateX(2px); }
.rail-item.is-active {
  border-color: var(--brand); background: var(--brand-soft);
  box-shadow: 0 4px 14px rgba(47, 95, 224, .12);
}
.rail-no {
  flex: none; font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--brand); background: #fff; border: 1px solid var(--line-2);
  border-radius: 7px; padding: 3px 7px; margin-top: 2px;
}
.rail-item.is-active .rail-no { background: var(--brand); color: #fff; border-color: var(--brand); }
.rail-body { display: flex; flex-direction: column; }
.rail-title { font-size: 15px; font-weight: 700; }
.rail-meta { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }

.map-panels {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow);
}
.panel { display: none; }
.panel.is-active { display: block; animation: fade .28s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pill {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--brand); background: var(--brand-soft);
  padding: 4px 10px; border-radius: 999px;
}
.panel-head h3 { font-size: 22px; font-weight: 700; }
.panel-lead { color: var(--ink-2); margin-bottom: 24px; font-size: 15.5px; }
.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.pbox {
  background: var(--bg-sink); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}
.pbox-accent { background: var(--accent-soft); border-color: #ffd9c9; }
.pbox h4 {
  font-size: 13px; font-weight: 700; color: var(--ink-2);
  letter-spacing: .02em; margin-bottom: 10px;
}
.pbox ul { display: flex; flex-direction: column; gap: 8px; }
.pbox li {
  font-size: 14px; color: var(--ink-2); line-height: 1.6;
  padding-left: 15px; position: relative;
}
.pbox li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--brand);
  opacity: .55;
}
.panel-link {
  margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line);
  font-size: 14px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 14px; align-items: baseline;
}

/* 勾选清单 */
ul.check { display: flex; flex-direction: column; gap: 8px; margin-top: 0; }
ul.check li {
  font-size: 14px; color: var(--ink-2); padding-left: 24px; position: relative; line-height: 1.6;
}
ul.check li::before {
  content: "✓"; position: absolute; left: 0; top: -1px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  font-size: 10px; font-weight: 700; display: grid; place-items: center;
}
.pbox-accent ul.check li::before { background: #fff; color: var(--accent); }

/* ========== 工具箱 ========== */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line-2);
  background: #fff; font-size: 13.5px; font-family: inherit; color: var(--ink-2);
  cursor: pointer; transition: .16s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

.table-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
}
.tool-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tool-table th {
  text-align: left; font-size: 12.5px; font-weight: 700; color: var(--ink-3);
  letter-spacing: .04em; padding: 14px 18px;
  background: var(--bg-sink); border-bottom: 1px solid var(--line);
}
.tool-table td {
  padding: 15px 18px; border-bottom: 1px solid var(--line);
  color: var(--ink-2); vertical-align: top;
}
.tool-table tbody tr:last-child td { border-bottom: none; }
.tool-table tbody tr { transition: .15s; }
.tool-table tbody tr:hover { background: var(--bg-sink); }
.tool-table tbody tr.is-hidden { display: none; }
.tool-table td strong { color: var(--ink); font-weight: 600; }
.tool-table td a { white-space: nowrap; }
.table-note { margin-top: 14px; font-size: 13.5px; color: var(--ink-3); }

/* ========== 实践卡片 ========== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(430px, 1fr)); gap: 20px; }
.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: .2s;
}
.card:hover { box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.vol { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--ink); letter-spacing: .04em; }
.tag {
  font-size: 11.5px; padding: 3px 9px; border-radius: 6px;
  background: var(--bg-soft); color: var(--ink-3); border: 1px solid var(--line);
}
.tag-easy { background: #eefaf1; color: #15803d; border-color: #cdeed8; }
.tag-mid { background: var(--brand-soft); color: var(--brand); border-color: #d5e2ff; }
.tag-hard { background: var(--accent-soft); color: #c2410c; border-color: #ffd9c9; }
.card h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.card-desc { color: var(--ink-2); font-size: 15px; margin-bottom: 16px; }
.card-steps { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.card-steps li {
  font-size: 14px; color: var(--ink-2); padding-left: 26px; position: relative; line-height: 1.6;
}
.card-steps li::before {
  content: counter(step); counter-increment: step;
  position: absolute; left: 0; top: 3px;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  font-size: 10.5px; font-weight: 700; display: grid; place-items: center;
}
.card-steps { counter-reset: step; }

.card-flow { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.card-flow li {
  display: flex; gap: 10px; font-size: 14px; color: var(--ink-2);
  background: var(--bg-sink); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 14px; line-height: 1.6;
}
.card-flow strong { color: var(--brand); flex: none; font-family: var(--mono); font-size: 12px; }

/* 提示词折叠 */
.prompt { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; background: var(--bg-sink); }
.prompt summary {
  cursor: pointer; padding: 12px 16px; font-size: 13.5px; font-weight: 600;
  color: var(--ink-2); list-style: none; display: flex; align-items: center; gap: 8px;
}
.prompt summary::-webkit-details-marker { display: none; }
.prompt summary::before {
  content: "▸"; color: var(--brand); font-size: 12px; transition: .2s; display: inline-block;
}
.prompt[open] summary::before { transform: rotate(90deg); }
.prompt summary:hover { background: var(--bg-soft); }
.prompt-body { position: relative; border-top: 1px solid var(--line); }
.prompt-body pre {
  margin: 0; padding: 18px; max-height: 380px; overflow: auto;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.75;
  color: var(--ink-2); white-space: pre-wrap; word-break: break-word;
  background: #fff;
}
.copy-btn {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  padding: 5px 13px; border-radius: 8px; border: 1px solid var(--line-2);
  background: #fff; font-family: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--brand); cursor: pointer; box-shadow: var(--shadow);
}
.copy-btn:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.copy-btn.is-done { background: var(--green); color: #fff; border-color: var(--green); }

.card-check {
  margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line);
}
.card-check h4 { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 10px; }

/* ========== 7 天时间线 ========== */
.timeline { position: relative; padding-left: 4px; }
.timeline::before {
  content: ""; position: absolute; left: 52px; top: 10px; bottom: 10px;
  width: 2px; background: linear-gradient(var(--brand), #c9d7ff);
}
.timeline li { display: flex; gap: 22px; padding-bottom: 22px; }
.tl-day {
  flex: none; width: 62px; font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--brand); text-align: right; padding-top: 14px;
}
.tl-body {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 22px; flex: 1;
  box-shadow: var(--shadow);
}
.tl-body::before {
  content: ""; position: absolute; left: -29px; top: 20px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 3px solid var(--brand);
}
.tl-body h4 { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.tl-body p { font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.tl-k {
  display: inline-block; min-width: 34px; margin-right: 8px;
  font-size: 11.5px; font-weight: 700; color: var(--ink-3);
  background: var(--bg-soft); border-radius: 5px; padding: 1px 6px; text-align: center;
}

/* ========== About ========== */
.about-layout { display: grid; grid-template-columns: minmax(0, 780px); gap: 26px; justify-content: start; }
.about-main h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; margin: 12px 0 16px; }
.about-main p { color: var(--ink-2); margin-bottom: 14px; font-size: 15.5px; }
.about-rules { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.about-rules div {
  display: flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 15px; font-size: 14px;
}
.about-rules strong { font-family: var(--mono); color: var(--brand); font-size: 12px; }
.about-rules span { color: var(--ink-2); }

/* ========== Footer ========== */
.site-footer { background: #10131a; color: #9aa3b2; padding: 40px 0 32px; }
.footer-inner { display: flex; flex-direction: column; gap: 20px; }
.f-brand { display: flex; align-items: center; gap: 12px; }
.f-brand strong { color: #fff; font-size: 16px; display: block; }
.f-brand p { font-size: 13px; margin: 0; }
.f-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.f-nav a { color: #9aa3b2; font-size: 14px; }
.f-nav a:hover { color: #fff; text-decoration: none; }
.f-copy { font-size: 12.5px; padding-top: 18px; border-top: 1px solid #232833; margin: 0; }

/* ========== Toast ========== */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 10px 22px; border-radius: 999px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 100;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ========== 响应式 ========== */
@media (max-width: 900px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-rail {
    position: static; flex-direction: row; overflow-x: auto;
    padding-bottom: 6px; gap: 10px; scrollbar-width: none;
  }
  .map-rail::-webkit-scrollbar { display: none; }
  .rail-item { flex: none; min-width: 210px; }
  .about-layout { grid-template-columns: 1fr; max-width: 100%; }
  .cards { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 56px; }
  .section { padding: 60px 0; }
}
@media (max-width: 720px) {
  .nav { overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; font-size: 13px; padding: 6px 9px; }
  .brand-sub { display: none; }
  .hero-stats { gap: 26px; }
  .hero-stats strong { font-size: 24px; }
  .tool-table th:nth-child(3), .tool-table td:nth-child(3) { display: none; }
  .timeline::before { left: 26px; }
  .tl-day { width: 34px; font-size: 11px; }
  .timeline li { gap: 12px; }
  .tl-body { padding: 15px 16px; }
  .tl-body::before { left: -21px; }
  .map-panels { padding: 22px; }
}
