/* 芽芽 Sprout 法律站样式 —— 对齐 App 的清新绿主题（薄荷奶底 + leaf 主色 + 圆润标题）。
   约束：零外部 CDN / 零第三方（与本站隐私承诺一致），字体一律用系统圆体栈，不引 Google Fonts。 */

:root {
  /* 颜色取自 App DesignTokens（leaf #13C16B / sun #FFBE2E / ink #2C2722） */
  --bg: #f1faf4;          /* 薄荷奶白背景 */
  --surface: #ffffff;     /* 卡片/纸面 */
  --surface-alt: #e7f7ee; /* 次级面 */
  --text: #2c2722;        /* 主文字（暖墨） */
  --text-soft: #6f6457;   /* 次要文字 */
  --muted: #a89c8c;       /* 弱化文字 */
  --brand: #13c16b;       /* leaf 主色 */
  --brand-deep: #07a65a;  /* leaf deep */
  --brand-soft: #d2f6e2;  /* leaf 浅底 */
  --sun: #ffbe2e;         /* 阳光强调 */
  --border: rgba(44, 39, 34, 0.10);
  --hero-from: #2fd180;   /* hero 渐变（亮绿，呼应成长花园） */
  --hero-to: #07a65a;
  --hero-fg: #ffffff;
  --radius: 18px;
  --radius-lg: 26px;
  --maxw: 720px;

  /* 圆润无衬线栈：尽量贴近 App 的 Baloo 2 圆体气质，回退系统圆体 / PingFang */
  --round: ui-rounded, "SF Pro Rounded", "Baloo 2", -apple-system, BlinkMacSystemFont,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121511;
    --surface: #1b1f1a;
    --surface-alt: #232a22;
    --text: #f4eee2;
    --text-soft: #b3a998;
    --muted: #6b655b;
    --brand: #36c281;          /* 暗底略提亮，保证对比 */
    --brand-deep: #2fb073;
    --brand-soft: #1e2a22;
    --sun: #ffc94d;
    --border: rgba(244, 238, 226, 0.12);
    --hero-from: #1a8f5c;
    --hero-to: #0c6e44;
    --hero-fg: #ffffff;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.72;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 24px 20px 72px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar .home {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-family: var(--round); font-weight: 700; font-size: 19px; letter-spacing: -0.2px;
}

.logo { width: 32px; height: 32px; border-radius: 9px; display: block; flex: 0 0 auto; }

/* ---------- 语言切换（药丸分段） ---------- */
.lang-switch {
  display: inline-flex; border: 1px solid var(--border); border-radius: 999px;
  overflow: hidden; background: var(--surface); padding: 2px; gap: 2px;
}
.lang-switch button {
  appearance: none; border: 0; background: transparent; color: var(--text-soft);
  font: inherit; font-size: 13.5px; font-weight: 600; padding: 5px 14px;
  border-radius: 999px; cursor: pointer; transition: background .18s, color .18s;
}
.lang-switch button.active { background: var(--brand); color: #fff; }

/* ---------- Hero（亮绿渐变面板，呼应成长花园） ---------- */
.hero {
  text-align: center; margin: 20px 0 4px; padding: 52px 28px 44px;
  background: linear-gradient(160deg, var(--hero-from), var(--hero-to));
  color: var(--hero-fg); border-radius: var(--radius-lg);
}
.hero .logo-lg { width: 84px; height: 84px; border-radius: 22px; margin: 0 auto 18px;
  background: rgba(255,255,255,0.18); padding: 12px; }
.hero h1 { font-family: var(--round); font-weight: 800; font-size: 40px; margin: 0 0 10px;
  letter-spacing: -0.5px; color: var(--hero-fg); }
.hero .tagline { color: color-mix(in srgb, var(--hero-fg) 88%, transparent);
  font-size: 16px; line-height: 1.65; margin: 0 auto; max-width: 460px; }

.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 26px 0 0; }
.badge {
  font-size: 12.5px; letter-spacing: 0.2px; font-weight: 600;
  color: color-mix(in srgb, var(--hero-fg) 92%, transparent);
  background: color-mix(in srgb, var(--hero-fg) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--hero-fg) 22%, transparent);
  padding: 5px 12px; border-radius: 999px;
}

/* ---------- 卡片 / 导航链接 ---------- */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
.card-link {
  display: block; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  transition: transform .16s ease, border-color .16s, box-shadow .16s;
}
.card-link:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  box-shadow: 0 10px 30px rgba(7, 166, 90, 0.10);
}
.card-link .ic { font-size: 24px; }
.card-link h3 { font-family: var(--round); font-weight: 700; margin: 12px 0 5px;
  font-size: 20px; letter-spacing: -0.2px; }
.card-link p { margin: 0; color: var(--text-soft); font-size: 14px; }

/* ---------- 文档页 ---------- */
.doc { padding: 16px 2px 0; margin-top: 6px; }
.doc h1 { font-family: var(--round); font-weight: 800; font-size: 32px; margin: 0 0 6px; letter-spacing: -0.4px; }
.doc .eff { color: var(--muted); font-size: 13.5px; margin: 0 0 24px; }
.doc h2 { font-family: var(--round); font-weight: 700; font-size: 20px; margin: 32px 0 10px; letter-spacing: -0.2px; }
.doc h2:first-of-type { margin-top: 10px; }
.doc p, .doc li { color: var(--text-soft); }
.doc strong { color: var(--text); font-weight: 700; }
.doc ul { padding-left: 20px; margin: 8px 0; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--brand); }
.doc code { background: var(--surface-alt); padding: 2px 6px; border-radius: 6px; font-size: 13.5px; }

/* ---------- 概括 callout ---------- */
.callout {
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 24%, transparent);
  border-left: 3px solid var(--brand);
  border-radius: 14px; padding: 16px 18px; margin: 20px 0;
  color: var(--text); font-size: 15px;
}
.callout strong { color: var(--brand-deep); }

/* ---------- 链接 ---------- */
a.inline { color: var(--brand-deep); text-decoration: none; font-weight: 600; }
a.inline:hover { text-decoration: underline; }
.back {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 28px;
  text-decoration: none; color: var(--brand-deep); font-size: 15px; font-weight: 600;
}
.back:hover { text-decoration: underline; }

.footer { text-align: center; color: var(--muted); font-size: 13px; margin-top: 44px; line-height: 1.6; }
.footer a { color: var(--brand-deep); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ---------- 语言可见性 ---------- */
[data-lang] { display: none; }
html[lang="zh"] [data-lang="zh"] { display: revert; }
html[lang="en"] [data-lang="en"] { display: revert; }
html[lang="zh"] section[data-lang="zh"],
html[lang="en"] section[data-lang="en"] { display: block; }
