/* 童学罗盘 · TTDKID — 全局样式 */

:root {
  --ink: #131A2A;
  --ink2: #4C586E;
  --ink3: #8A96AC;
  --ink4: #B4BECD;

  --bg: #FFFFFF;
  --bg2: #F6F8FC;
  --bg3: #EEF2F9;

  --line: #E3E9F3;
  --line2: #D2DBEA;

  --brand: #2D5BFF;
  --brand-d: #1B3FD1;
  --brand-l: #EDF2FF;

  --accent: #FF7A33;
  --accent-l: #FFF3EB;

  --ok: #0E9E7A;
  --ok-l: #E8F7F2;

  --warn: #C98200;
  --warn-l: #FFF6E5;

  --r-s: 10px;
  --r-m: 14px;
  --r-l: 20px;

  --sh: 0 1px 2px rgba(19, 26, 42, .04), 0 8px 24px -14px rgba(19, 26, 42, .14);
  --sh-h: 0 2px 8px rgba(19, 26, 42, .06), 0 20px 44px -18px rgba(19, 26, 42, .22);

  --wrap: 1140px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

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

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; flex: none; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--brand); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .3px;
  display: grid; place-items: center;
}
.logo-text { display: block; font-size: 16px; font-weight: 600; letter-spacing: .5px; line-height: 1.2; }
.logo-sub { font-size: 11px; color: var(--ink3); letter-spacing: 1.4px; display: block; line-height: 1; margin-top: 3px; }

.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  padding: 7px 14px; border-radius: 999px;
  font-size: 14px; color: var(--ink2);
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--bg3); color: var(--ink); }
.nav-links a.active { background: var(--brand-l); color: var(--brand-d); font-weight: 500; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: transform .12s, box-shadow .15s, background .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px -8px rgba(45, 91, 255, .7); }
.btn-primary:hover { background: var(--brand-d); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line2); }
.btn-ghost:hover { border-color: var(--ink4); background: var(--bg2); }
.btn-soft { background: var(--brand-l); color: var(--brand-d); }
.btn-soft:hover { background: #E2EAFF; }
.btn-sm { padding: 8px 15px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- 通用 ---------- */
.sec { padding: 76px 0; }
.sec-alt { background: var(--bg2); }
.sec-head { max-width: 680px; margin-bottom: 40px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 1.6px;
  color: var(--brand); text-transform: uppercase; margin-bottom: 14px;
}
h1 { font-size: 44px; line-height: 1.25; letter-spacing: -.5px; margin: 0 0 18px; font-weight: 600; }
h2 { font-size: 30px; line-height: 1.32; letter-spacing: -.3px; margin: 0 0 14px; font-weight: 600; }
h3 { font-size: 18px; margin: 0 0 8px; font-weight: 600; }
h4 { font-size: 15px; margin: 0 0 6px; font-weight: 600; }
.lead { font-size: 17px; color: var(--ink2); line-height: 1.75; }
.muted { color: var(--ink2); }
.small { font-size: 13px; }
.tiny { font-size: 12px; color: var(--ink3); }

.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; background: var(--bg3); color: var(--ink2); white-space: nowrap;
}
.tag-brand { background: var(--brand-l); color: var(--brand-d); }
.tag-accent { background: var(--accent-l); color: #C2540F; }
.tag-ok { background: var(--ok-l); color: #08705A; }
.tag-warn { background: var(--warn-l); color: var(--warn); }

/* ---------- 首页 Hero ---------- */
.hero { padding: 72px 0 64px; background: linear-gradient(180deg, #F9FBFF 0%, #FFFFFF 100%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 span { color: var(--brand); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-stats { display: flex; gap: 32px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.hero-stats b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -.4px; }
.hero-stats span { font-size: 13px; color: var(--ink3); }

/* 向导卡片 */
.wizard {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-l);
  box-shadow: var(--sh-h); padding: 26px; min-height: 460px; display: flex; flex-direction: column;
}
.wizard-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.wizard-top strong { font-size: 15px; }
.wizard-prog { display: flex; gap: 5px; margin: 14px 0 22px; }
.wizard-prog i { height: 3px; flex: 1; background: var(--bg3); border-radius: 2px; transition: background .25s; }
.wizard-prog i.on { background: var(--brand); }
.wizard-q { font-size: 20px; font-weight: 600; margin-bottom: 6px; letter-spacing: -.2px; }
.wizard-desc { font-size: 13px; color: var(--ink3); margin-bottom: 20px; }
.opts { display: flex; flex-direction: column; gap: 9px; }
.opt {
  text-align: left; padding: 13px 16px; border-radius: var(--r-s);
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 14px; transition: all .15s; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.opt:hover { border-color: var(--brand); background: var(--brand-l); }
.opt small { display: block; color: var(--ink3); font-size: 12px; font-weight: 400; margin-top: 2px; }
.opt-arrow { color: var(--ink4); flex: none; }
.wizard-foot { margin-top: auto; padding-top: 18px; }
.link-back { background: none; border: 0; color: var(--ink3); font-size: 13px; padding: 0; }
.link-back:hover { color: var(--ink); }
.wizard-result { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 400px; padding-right: 4px; }
.res-item { border: 1px solid var(--line); border-radius: var(--r-s); padding: 13px 15px; background: var(--bg2); }
.res-item .rt { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.res-item .rt b { font-size: 14px; }
.res-item p { margin: 0; font-size: 12.5px; color: var(--ink2); line-height: 1.6; }
.match { margin-left: auto; font-size: 12px; color: var(--ok); font-weight: 600; flex: none; }

/* ---------- 分类 ---------- */
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cat {
  padding: 22px; border: 1px solid var(--line); border-radius: var(--r-m);
  background: #fff; transition: all .18s; display: block;
}
.cat:hover { border-color: var(--brand); box-shadow: var(--sh); transform: translateY(-2px); }
.cat-ico {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  font-size: 15px; font-weight: 600; margin-bottom: 14px;
}
.cat h3 { font-size: 16px; margin-bottom: 6px; }
.cat p { margin: 0; font-size: 13px; color: var(--ink2); line-height: 1.65; }
.cat em { display: block; margin-top: 12px; font-size: 12px; color: var(--ink3); font-style: normal; }

/* ---------- 平台卡片 ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.pcard {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--r-m); background: #fff;
  padding: 20px; transition: all .18s;
}
.pcard:hover { border-color: var(--line2); box-shadow: var(--sh); }
.pcard-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.pav {
  width: 42px; height: 42px; border-radius: 11px; flex: none;
  display: grid; place-items: center; font-size: 15px; font-weight: 600; color: #fff;
}
.pname { font-size: 16px; font-weight: 600; line-height: 1.35; }
.pbrand { font-size: 12px; color: var(--ink3); }
.pcard-tag { font-size: 13px; color: var(--ink2); margin-bottom: 14px; line-height: 1.65; min-height: 42px; }
.specs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pblock { border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 2px; }
.pblock + .pblock { margin-top: 10px; }
.pblock h4 { font-size: 12px; color: var(--ink3); font-weight: 500; letter-spacing: .3px; margin-bottom: 5px; }
.pblock p { margin: 0; font-size: 13px; color: var(--ink2); line-height: 1.68; }
.pcard-foot { display: flex; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.pcard-foot .btn { flex: 1; }

/* ---------- 筛选栏 ---------- */
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); padding: 18px 20px; margin-bottom: 24px; }
.frow { display: flex; align-items: flex-start; gap: 14px; padding: 9px 0; }
.frow + .frow { border-top: 1px dashed var(--line); }
.flabel { flex: none; width: 62px; font-size: 13px; color: var(--ink3); padding-top: 5px; }
.fchips { display: flex; flex-wrap: wrap; gap: 7px; flex: 1; }
.chip {
  padding: 5px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-size: 13px; color: var(--ink2); transition: all .15s;
}
.chip:hover { border-color: var(--ink4); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500; }
.searchbar { display: flex; align-items: center; gap: 10px; flex: 1; }
.searchbar input {
  flex: 1; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 14px; font-family: inherit; outline: none; background: var(--bg2);
}
.searchbar input:focus { border-color: var(--brand); background: #fff; }
.result-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; font-size: 13px; color: var(--ink2); flex-wrap: wrap; gap: 10px; }
.empty { text-align: center; padding: 70px 20px; color: var(--ink3); }

/* ---------- 对比 ---------- */
.cmp-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-m); background: #fff; }
table.cmp { width: 100%; border-collapse: collapse; min-width: 620px; }
table.cmp th, table.cmp td { padding: 14px 18px; text-align: left; vertical-align: top; font-size: 13.5px; line-height: 1.65; }
table.cmp thead th { background: var(--bg2); border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14px; position: sticky; top: 0; }
table.cmp tbody th { font-weight: 500; color: var(--ink3); width: 130px; background: var(--bg2); font-size: 13px; border-right: 1px solid var(--line); }
table.cmp tbody tr + tr th, table.cmp tbody tr + tr td { border-top: 1px solid var(--line); }
table.cmp td { border-left: 1px solid var(--line); }
.cmp-head { display: flex; align-items: center; gap: 10px; }
.dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.bars { display: flex; gap: 3px; }
.bars i { width: 12px; height: 6px; border-radius: 2px; background: var(--bg3); }
.bars i.on { background: var(--brand); }

/* ---------- 指南 ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.step { border: 1px solid var(--line); border-radius: var(--r-m); padding: 22px; background: #fff; position: relative; }
.step-n {
  width: 26px; height: 26px; border-radius: 8px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 600; margin-bottom: 14px;
}
.step p { margin: 0; font-size: 13px; color: var(--ink2); line-height: 1.7; }

.pit { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.pit-item { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-s); padding: 20px 22px; background: #fff; }
.pit-item h3 { font-size: 15.5px; }
.pit-item p { margin: 0 0 10px; font-size: 13.5px; color: var(--ink2); line-height: 1.72; }
.pit-fix { font-size: 13px; color: #08705A; background: var(--ok-l); padding: 9px 12px; border-radius: 8px; line-height: 1.62; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  padding: 18px 0; font-size: 15px; font-weight: 500; cursor: pointer;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink3); font-size: 18px; flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq .ans { padding: 0 0 20px; font-size: 14px; color: var(--ink2); line-height: 1.78; max-width: 800px; }
.faq .ans p { margin: 0 0 10px; }

/* ---------- 提示条 ---------- */
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 18px; border-radius: var(--r-s);
  background: var(--warn-l); border: 1px solid #F3E0B0;
  font-size: 13px; color: #6B4E00; line-height: 1.65;
}
.notice b { color: #523C00; }
.notice .ni { flex: none; font-weight: 700; }

/* ---------- 页脚 ---------- */
.foot { background: #131A2A; color: #A7B2C6; padding: 56px 0 30px; margin-top: 0; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot h4 { color: #fff; font-size: 13px; margin-bottom: 14px; }
.foot a { display: block; font-size: 13px; padding: 4px 0; color: #A7B2C6; }
.foot a:hover { color: #fff; }
.foot .logo-text { color: #fff; }
.foot .logo-sub { color: #6C7A91; }
.foot-desc { font-size: 13px; line-height: 1.75; max-width: 300px; margin-top: 14px; }
.foot-bot { margin-top: 44px; padding-top: 22px; border-top: 1px solid #26314A; font-size: 12px; color: #6C7A91; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------- 其他控件 ---------- */
[hidden] { display: none !important; }
.cmp-badge {
  display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 600; line-height: 1; margin-left: 5px; vertical-align: 1px;
}
.btn-soft.on { background: var(--brand); color: #fff; }
.btn-soft.on:hover { background: var(--brand-d); }
.select {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-family: inherit; font-size: 13px; color: var(--ink); outline: none;
}
.select:focus { border-color: var(--brand); }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 34px; }
  h2 { font-size: 25px; }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .sec { padding: 56px 0; }
}
@media (max-width: 700px) {
  .wrap { padding: 0 18px; }
  .nav-in { height: 58px; gap: 12px; }
  .logo-sub { display: none; }
  .nav-links { gap: 0; overflow-x: auto; }
  .nav-links a { padding: 6px 10px; font-size: 13px; }
  .nav-cta { display: none; }
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 28px; }
  .hero-stats { gap: 20px; }
  .hero-stats b { font-size: 20px; }
  .cats, .steps, .pit { grid-template-columns: 1fr; }
  .pgrid { grid-template-columns: 1fr; }
  .wizard { padding: 20px; min-height: 0; }
  .foot-grid { grid-template-columns: 1fr; }
  .frow { flex-direction: column; gap: 8px; }
  .flabel { padding-top: 0; }
  .sec { padding: 44px 0; }
}
