/* 官网跟着产品走：纸色和墨色来自监控面板，绿色只留给负载环和主操作。
   模块自己的颜色只出现在真实界面里，不铺到区块背景上。 */

:root {
  --bg: #f4f5f7;
  --bg-elev: #ffffff;
  --ink: #171d2a;
  --muted: #3e4a5c;
  --line: #e2e5ea;
  --green: #127a52;
  --green-ink: #ffffff;
  --green-press: #0e6b45;
  --yes: #127a52;
  --no: #9a3b36;
  --nav: rgba(244, 245, 247, 0.94);
  --shadow: 0 18px 32px rgba(23, 29, 42, 0.14);
  --shadow-lift: 0 26px 40px rgba(23, 29, 42, 0.2);
  --display: "SF Pro Display", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --body: "SF Pro Text", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
  --s-display: 68px;
  --s-heading: 40px;
  --s-lead: 22px;
  --s-body: 17px;
  --s-small: 13px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181d;
    --bg-elev: #22262c;
    --ink: #f4f5f7;
    --muted: #c5c9d1;
    --line: rgba(255, 255, 255, 0.1);
    --green: #3dd68c;
    --green-ink: #10281c;
    --green-press: #67e3a8;
    --yes: #3dd68c;
    --no: #ff8d88;
    --nav: rgba(22, 24, 29, 0.94);
    --shadow: 0 18px 32px rgba(0, 0, 0, 0.38);
    --shadow-lift: 0 26px 44px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scrollbar-color: var(--muted) transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--s-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; }
video, source { font-size: var(--s-body); }
::selection { background: #b7e4cf; color: #10281c; }
@media (prefers-color-scheme: dark) {
  ::selection { background: #1d5c40; color: #f4f5f7; }
}
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  background: var(--nav);
  border-bottom: 1px solid transparent;
  padding-inline: 24px;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner, .section-inner, .footer-inner, .legal {
  width: min(1120px, 100%);
  margin-inline: auto;
}
.nav-inner {
  min-height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-brand, .footer-brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 600;
  font-family: var(--display); letter-spacing: -0.02em;
}
.nav-brand .ring, .footer-brand .ring { width: 22px; height: 22px; flex: none; }
.brand-ring .track { fill: none; stroke: var(--line); stroke-width: 1.4; }
.brand-ring .arc { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.brand-ring .dot { fill: var(--green); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-links { display: flex; align-items: center; gap: 22px; list-style: none; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: var(--s-small); font-weight: 600; }
.nav-links a:hover { color: var(--ink); }
.nav-github {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums;
}
.nav-github svg { width: 15px; height: 15px; }
.lang-link, .nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 36px; padding: 0 12px;
  color: var(--ink); text-decoration: none;
  background: var(--bg-elev); border-radius: 999px;
  font-size: var(--s-small); font-weight: 600;
}
.nav-toggle { display: none; border: 0; cursor: pointer; font-family: inherit; }

section { padding: 96px 24px; scroll-margin-top: 80px; }
.band { background: var(--bg-elev); }
h1, h2 {
  font-family: var(--display); font-weight: 600; letter-spacing: -0.03em;
  line-height: 1.05; text-wrap: balance;
}
h1 { font-size: var(--s-display); max-width: 22ch; }
h2 { font-size: var(--s-heading); max-width: 18em; }
.lead { font-size: var(--s-lead); line-height: 1.5; max-width: 38em; margin-top: 16px; }
.fine, figcaption, .edition-note, .hint {
  color: var(--muted); font-size: var(--s-small); line-height: 1.5;
}
figcaption { margin-top: 10px; }
figcaption b { display: block; color: var(--ink); font-size: var(--s-body); font-weight: 600; margin-bottom: 2px; }

.hero { padding: 112px 24px 72px; }
.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 500px);
  grid-template-areas: "title panel" "lead panel" "actions panel";
  column-gap: 56px; row-gap: 18px; align-items: center;
}
.hero h1 { grid-area: title; }
.hero .lead { grid-area: lead; margin-top: 0; }
.hero-actions { grid-area: actions; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 8px; }
.hero-panel { grid-area: panel; margin: 0; justify-self: end; width: 100%; }
/* 三张完整面板叠成一叠：静止时收拢，悬停时向两侧分开。 */
.fan {
  position: relative;
  aspect-ratio: 500 / 460;
}
.fan img {
  position: absolute; left: 50%; top: 8px;
  width: 72%; height: auto; margin-left: -36%;
  filter: drop-shadow(var(--shadow));
  transition: transform .6s cubic-bezier(.22, 1, .36, 1), filter .6s cubic-bezier(.22, 1, .36, 1);
}
.fan .front { transform: translate(0, 0) scale(1); z-index: 3; }
.fan .back { transform: translate(-14%, 24px) rotate(-8deg) scale(.94); z-index: 1; }
.fan .mid { transform: translate(14%, 24px) rotate(8deg) scale(.94); z-index: 2; }
.fan:hover .front { transform: translate(0, -14px) scale(1.03); filter: drop-shadow(var(--shadow-lift)); }
.fan:hover .back { transform: translate(-30%, 4px) rotate(-6deg) scale(.98); }
.fan:hover .mid { transform: translate(30%, 4px) rotate(6deg) scale(.98); }

.btn-primary, .text-link, .btn-quiet {
  font-family: inherit; text-decoration: none;
}
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  background: var(--green); color: var(--green-ink);
  border-radius: 999px; font-weight: 600; font-size: var(--s-body);
}
.btn-primary:hover { background: var(--green-press); }
.btn-primary svg, .btn-store svg { width: 18px; height: 18px; }
.btn-store {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  background: var(--bg-elev); color: var(--ink);
  border-radius: 999px; font-weight: 600; font-size: var(--s-body);
  text-decoration: none;
}
.btn-store:hover { color: var(--green); }
.hero-downloads { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hero-actions .brew-install { margin-top: 4px; }
.hero-actions .fine { margin-top: 4px; }
.text-link { color: var(--ink); text-underline-offset: 3px; font-size: var(--s-body); }
.text-link:hover { color: var(--green); }
.btn-quiet {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  color: var(--ink); background: var(--bg);
  border-radius: 999px; font-size: var(--s-small); font-weight: 600;
}
.band .btn-quiet { background: var(--bg); }
.btn-quiet:hover { color: var(--green); }
.btn-quiet svg { width: 16px; height: 16px; }

.theme-vid {
  position: relative;
  aspect-ratio: 692 / 796;
  overflow: hidden;
  border-radius: 16px;
}
.theme-vid video {
  position: absolute;
  top: 0;
  left: calc(-46 / 692 * 100%);
  width: calc(780 / 692 * 100%);
  max-width: none;
  height: auto;
  margin: 0;
  background: transparent;
}
.theme-vid .for-dark { display: none; margin-top: calc(-16 / 692 * 100%); }
@media (prefers-color-scheme: dark) {
  :root .theme-vid { aspect-ratio: 692 / 780; }
  :root .theme-vid .for-light { display: none; }
  :root .theme-vid .for-dark { display: block; }
}

.block-head { max-width: 40em; }
.block-head .lead, .split-copy .lead { margin-top: 14px; }

.theme-row, .mod-grid, .bar-grid, .settings-grid {
  display: grid; gap: 22px; margin-top: 36px;
}
.theme-row { grid-template-columns: repeat(4, 1fr); }
.mod-grid { grid-template-columns: repeat(3, 1fr); }
.mod-grid figure { display: flex; flex-direction: column; margin: 0; }
.mod-grid figcaption { order: -1; margin: 0 0 12px; text-align: center; }
.mod-grid figcaption b { margin-bottom: 0; }
.mod-grid .crop {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.settings-grid { grid-template-columns: repeat(6, 1fr); }
.settings-grid > figure { grid-column: span 2; margin: 0; text-align: center; }
.settings-grid > figure:nth-child(4) { grid-column: 2 / span 2; }
.settings-grid > figure:nth-child(5) { grid-column: 4 / span 2; }
.bar-note { margin-top: 28px; }
.bar-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.crop img { width: 100%; height: auto; display: block; }
.bar-card {
  background: var(--bg-elev); border-radius: 16px; padding: 22px 16px 18px; text-align: center;
}
.band .bar-card { background: var(--bg); }
.bar-card img { height: 28px; width: auto; margin: 0 auto 14px; display: block; }
.bar-card b { display: block; font-size: var(--s-body); }
.bar-card span { display: block; margin-top: 4px; color: var(--muted); font-size: var(--s-small); }

.bar-hero, .split, .stats-layout, .pair {
  display: grid; gap: 36px; align-items: center;
}
.bar-hero { grid-template-columns: 220px minmax(0, 1fr); margin-bottom: 8px; }
.bar-ring-svg { width: 200px; height: 200px; color: var(--ink); display: block; }
.bar-ring-svg .ring-track { fill: none; stroke: var(--line); stroke-width: 5.4; }
.bar-ring-svg .ring-well { fill: var(--bg-elev); }
.band .bar-ring-svg .ring-well { fill: var(--bg); }
.split { grid-template-columns: minmax(0, 1fr) minmax(240px, 360px); margin-top: 8px; }
#quicktools h2,
#quicktools .lead { margin-inline: auto; text-align: center; }
.tool-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 420px));
  justify-content: center;
  gap: 40px 56px;
  margin-top: 40px;
}
.tool-pair figure { margin: 0; }
.stats-layout { grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.7fr); align-items: start; margin-top: 36px; }
.pair { grid-template-columns: 1fr 1fr; align-items: start; margin-top: 32px; }
.shot, .tool-pair figure { margin: 0; min-width: 0; }
.shot img, .tool-pair img { width: 100%; height: auto; display: block; }

.meter {
  display: flex; flex-wrap: wrap; gap: 28px 40px; margin-top: 36px;
}
.meter .n {
  font-family: var(--display); font-size: var(--s-heading); font-weight: 600;
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.meter .n small { font-size: var(--s-lead); color: var(--muted); font-weight: 600; margin-left: 2px; }
.meter .l { color: var(--muted); font-size: var(--s-small); margin-top: 4px; }

.editions { list-style: none; margin-top: 32px; }
.edition {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px 148px;
  gap: 12px 20px; align-items: center;
  padding: 14px 0;
}
.edition + .edition { border-top: 1px solid var(--line); }
.edition-head { color: var(--muted); font-size: var(--s-small); font-weight: 600; }
.edition .name { font-size: var(--s-body); }
.mark {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--s-small); font-weight: 600;
}
.mark svg { width: 16px; height: 16px; }
.mark.yes { color: var(--yes); }
.mark.no { color: var(--no); }
.edition-note { margin-top: 16px; max-width: 46em; }

.brew-install {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  margin-top: 14px; padding: 12px 14px;
  background: #171d2a; color: #f4f5f7; border: 0; border-radius: 12px;
  font-family: var(--mono); font-size: var(--s-body); cursor: pointer; text-align: left;
}
.brew-install .prompt { color: #9aa3b2; }
.brew-install svg { width: 15px; height: 15px; flex: none; }
.brew-install .copied { display: none; color: #8ee0b5; font-family: var(--body); font-size: var(--s-small); }
.hint { margin-top: 18px; }

.download-actions, .feedback-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin-top: 28px; }
.download-note { margin-top: 18px; }

.footer { padding: 28px 24px 36px; color: var(--muted); font-size: var(--s-small); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

.legal { padding: 120px 24px 80px; }
.legal h1 { max-width: 16ch; }
.legal .meta { margin-top: 12px; }
.legal h2 { font-size: var(--s-lead); max-width: none; margin: 28px 0 8px; }
.legal p, .legal li { font-size: var(--s-body); max-width: 62ch; }
.legal p + p, .legal li { margin-top: 10px; }
.legal ul { padding-left: 1.2em; }
.legal a { color: var(--ink); }
.legal .back { display: inline-block; margin-top: 36px; }

@media (max-width: 900px) {
  .hero-row, .bar-hero, .split, .tool-pair, .stats-layout, .pair, .theme-row {
    grid-template-columns: 1fr;
  }
  .hero-row { grid-template-areas: "title" "lead" "panel" "actions"; row-gap: 16px; }
  .hero { padding-top: 96px; }
  .hero-panel.fan { width: min(100%, 380px); margin-inline: auto; }
  .fan:hover .back { transform: translate(-24%, 12px) rotate(-7deg) scale(.96); }
  .fan:hover .mid { transform: translate(24%, 12px) rotate(7deg) scale(.96); }
  .mod-grid, .settings-grid { grid-template-columns: 1fr 1fr; }
  .settings-grid > figure,
  .settings-grid > figure:nth-child(4),
  .settings-grid > figure:nth-child(5) { grid-column: auto; }
  .settings-grid > figure:last-child { grid-column: 1 / -1; width: min(100%, 420px); justify-self: center; }
  .tool-pair { justify-items: center; }
  .tool-pair figure { width: min(100%, 420px); }
  .theme-row { grid-template-columns: 1fr 1fr; }
  .bar-ring-svg { width: 148px; height: 148px; }
  h1 { max-width: none; }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); padding: 4px 24px 12px;
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open .nav-links { display: flex; }
  .nav-links a, .nav-links .nav-github {
    padding: 12px 0; font-size: var(--s-body); color: var(--ink);
  }
}

@media (max-width: 640px) {
  .nav-inner, .footer-inner { width: min(1120px, calc(100% - 32px)); }
  .hero { padding-left: 16px; padding-right: 16px; }
  .legal { padding: 104px 16px 64px; }
  section { padding: 72px 16px; }
  .mod-grid, .settings-grid, .bar-grid { grid-template-columns: 1fr; }
  .settings-grid > figure:last-child { width: 100%; }
  .edition { grid-template-columns: 1fr 1fr; }
  .edition .name, .edition-head.name { grid-column: 1 / -1; }
  .download-actions, .feedback-actions { align-items: stretch; }
  .btn-primary, .btn-quiet, .btn-store { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fan img { transition: none; filter: none; }
  .fan:hover .front { transform: translate(0, 0) scale(1); }
  .fan:hover .back { transform: translate(-14%, 24px) rotate(-8deg) scale(.94); }
  .fan:hover .mid { transform: translate(14%, 24px) rotate(8deg) scale(.94); }
}
