/*
  Site-wide styles. Mobile-first: base rules target phones,
  wider screens are layered on with min-width media queries.
  System fonts only (Google Fonts is unreliable inside mainland China).
*/
:root {
  --bg: #f6f7fd;
  --paper: #ffffff;
  --ink: #1c2147;
  --muted: #5d6488;
  --line: #e3e7f6;
  --brand: #5b5cf0;
  --brand-ink: #ffffff;
  --brand-soft: #ecebff;
  --sun: #ffb703;
  --coral: #ff6b6b;
  --teal: #14b8a6;
  --sky: #4dabf7;
  --radius: 22px;
  --shadow: 0 10px 30px -18px rgba(28, 33, 71, .45);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", Roboto, sans-serif;
  --tabbar-h: 64px;
}

* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  overflow-x: clip;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 8px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 18px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 247, 253, .86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 19px; }
.brand svg { width: 36px; height: 36px; flex: none; }
.top-nav { display: none; margin-left: auto; gap: 4px; }
.top-nav a {
  text-decoration: none; font-weight: 700; color: var(--muted);
  padding: 10px 16px; border-radius: 999px;
}
.top-nav a:hover { color: var(--ink); background: var(--paper); }
.top-nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }

/* ---------- bottom tab bar (phones) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px -18px rgba(28, 33, 71, .5);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; font-size: 13px; font-weight: 700; color: var(--muted);
}
.tabbar svg { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--brand); }

/* ---------- hero ---------- */
.hero { padding: 22px 0 8px; }
.hero-grid { display: grid; gap: 18px; align-items: center; }
.hero h1 {
  margin: 0; font-size: clamp(30px, 7.5vw, 50px); line-height: 1.12;
  letter-spacing: -.01em; text-wrap: balance;
}
.hero h1 .accent { color: var(--brand); }
.hero p.lead { margin: 12px 0 0; font-size: 17px; color: var(--muted); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0;
  font-weight: 800; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 8px 18px -10px rgba(91, 92, 240, .9); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--paper); color: var(--ink); border: 2px solid var(--line); }
.hero-art { position: relative; border-radius: 28px; overflow: hidden; background: linear-gradient(160deg, #7c7dff, #4dabf7); min-height: 230px; }
.hero-art svg { width: 100%; height: 100%; position: absolute; inset: 0; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.hero-facts li {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; background: var(--paper);
  border: 1px solid var(--line); font-size: 14px; font-weight: 700; color: var(--muted);
}
.hero-facts svg { width: 16px; height: 16px; color: var(--teal); }

/* ---------- sections ---------- */
.section { padding: 30px 0 6px; }
.section h2 { margin: 0 0 4px; font-size: clamp(24px, 5vw, 32px); line-height: 1.2; }
.section .sub { margin: 0 0 16px; color: var(--muted); }

/* ---------- tool cards ---------- */
.tools { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.tool {
  position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: start;
  padding: 16px; border-radius: var(--radius); background: var(--paper);
  border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none;
}
a.tool:hover { border-color: #c9ccf7; transform: translateY(-2px); transition: transform .18s, border-color .18s; }
.tool .icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; }
.tool .icon svg { width: 40px; height: 40px; }
.tool h3 { margin: 2px 0 2px; font-size: 18px; }
.tool p { margin: 0; color: var(--muted); font-size: 15px; }
.tool .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.tag.live { background: #dcfce7; color: #166534; }
.tag.soon { background: #fff4d6; color: #8a5a00; }
.tool.is-soon { box-shadow: none; background: rgba(255, 255, 255, .6); }
.tool.is-soon .icon { filter: grayscale(.35); opacity: .8; }
.tool .go {
  grid-column: 1 / -1; justify-self: start;
  display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--brand);
}

/* ---------- steps ---------- */
.steps { display: grid; gap: 12px; counter-reset: step; padding: 0; margin: 0; list-style: none; }
.steps li {
  counter-increment: step; position: relative; padding: 16px 16px 16px 64px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
}
.steps li::before {
  content: counter(step); position: absolute; left: 16px; top: 16px;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-weight: 900;
}
.steps b { display: block; font-size: 17px; }
.steps span { color: var(--muted); font-size: 15px; }

/* ---------- parent promise band ---------- */
.promise { margin-top: 30px; background: var(--ink); color: #eef0ff; }
.promise .wrap { padding-top: 30px; padding-bottom: 30px; }
.promise h2 { color: #fff; }
.promise .sub { color: #b9bde0; }
.promise-list { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.promise-list li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; }
.promise-list svg { width: 36px; height: 36px; color: var(--sun); }
.promise-list b { display: block; color: #fff; }
.promise-list span { color: #b9bde0; font-size: 15px; }

/* ---------- prose pages ---------- */
.prose { max-width: 760px; padding: 26px 0 10px; }
.prose h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.15; margin: 0 0 8px; }
.prose h2 { font-size: 21px; margin: 28px 0 6px; }
.prose p, .prose li { color: #353b63; }
.prose .note { padding: 14px 16px; border-radius: 16px; background: var(--brand-soft); color: var(--ink); }

/* ---------- footer ---------- */
.site-footer { padding: 26px 0 30px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: grid; gap: 8px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--muted); }
.beian { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.beian:empty { display: none; }

/* ---------- 404 ---------- */
.empty { text-align: center; padding: 60px 0 30px; }
.empty svg { width: 160px; margin: 0 auto 10px; }

/* ---------- wider screens ---------- */
@media (min-width: 640px) {
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .promise-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .top-nav { display: flex; }
  .hero { padding: 46px 0 18px; }
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; }
  .hero-art { min-height: 360px; }
  .tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tool.featured { grid-column: span 2; grid-template-columns: 96px minmax(0, 1fr); }
  .tool.featured .icon { width: 96px; height: 96px; }
  .tool.featured .icon svg { width: 60px; height: 60px; }
  .tool.featured h3 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
