/* TagPeek — site styles
   Accent: brand orange · clean white · warm gray
   Offline-first static site */

:root {
  /* H7-5: 底座色仅这 9 个硬编码；其余用 color-mix 派生，暗色同理 */
  --bg: #ffffff;
  --fg: #1c1917;
  --muted: #6b6560;
  --line: #e8e4df;
  --accent: #ee6116;
  --accent-hover: #d4540f;
  /* T-10: text-on-light orange — #EE6116 is only 3.30:1 at 14px; this is 5.50:1 */
  --accent-text: #B34700;
  --ok: #1a7a4c;
  --warn: #a65c00;
  --bad: #b42318;
  --bg-soft: color-mix(in srgb, var(--fg) 5%, var(--bg));
  --bg-warm: color-mix(in srgb, var(--accent) 8%, var(--bg));
  --accent-soft: color-mix(in srgb, var(--accent) 10%, var(--bg));
  --ok-bg: color-mix(in srgb, var(--ok) 12%, var(--bg));
  --warn-bg: color-mix(in srgb, var(--warn) 12%, var(--bg));
  --bad-bg: color-mix(in srgb, var(--bad) 10%, var(--bg));
  --nav-bg: color-mix(in srgb, var(--bg) 92%, transparent);
  --shadow-a: color-mix(in srgb, var(--fg) 4%, transparent);
  --shadow-b: color-mix(in srgb, var(--fg) 6%, transparent);
  --overlay: color-mix(in srgb, var(--fg) 6%, transparent);
  --accent-95: color-mix(in srgb, var(--accent) 95%, transparent);
  --radius: 12px;
  --radius-btn: 999px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 72px;
  --nav-h: 64px;
  --page-hero-pad: var(--space-6) 0 var(--space-4);
  --h1-size: clamp(1.75rem, 3.6vw, 2.35rem);
  --btn-pad-y: 11px;
  --btn-pad-x: 20px;
  --shadow: 0 1px 2px var(--shadow-a), 0 8px 24px var(--shadow-b);
  --font-display: "Avenir Next Condensed", "Futura", "Gill Sans", "Trebuchet MS", "PingFang SC", sans-serif;
  --font-body: "Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --max: 1080px;
  --surface: var(--bg);
  --surface-2: var(--bg-soft);
  --surface-3: var(--bg-warm);
  --surface-4: var(--accent-soft);
  --recipe-border: var(--accent-soft);
  --ok-border: var(--ok-bg);
  --warn-chip: var(--warn-bg);
  --bad-chip: var(--bad-bg);
  --ink: var(--fg);
  --ink-2: var(--fg);
  --white-25: var(--nav-bg);
  --border-soft: var(--line);
  --cream: var(--bg-warm);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 键盘用户必须能看到焦点 */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
:focus:not(:focus-visible) {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(ellipse 80% 50% at 100% -10%, var(--surface-4) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at -5% 30%, var(--surface-2) 0%, transparent 50%),
    var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ——— Nav ——— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--space-4);
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: nowrap;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.625rem; /* 26px — R11-1 */
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
}
.brand:hover {
  text-decoration: none;
  color: var(--fg);
}
.brand:hover .brand-word span,
.brand:hover .brand-mark {
  color: var(--accent);
}
.brand-mark {
  width: 30px;
  height: 30px;
  display: block;
  flex-shrink: 0;
  color: var(--accent);
}
.brand-word {
  color: var(--fg);
}
.brand-word span,
.brand span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 4px 14px;
  flex: 1;
  flex-wrap: nowrap;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  min-width: 0;
}
.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--fg);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  overflow: hidden;
  background: var(--bg);
}
.lang-toggle button {
  border: 0;
  background: transparent;
  padding: 5px 12px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--fg);
  color: var(--surface);
}

.theme-toggle {
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.theme-toggle:hover {
  color: var(--fg);
  border-color: var(--fg);
}
.theme-toggle[aria-pressed="true"] {
  background: var(--fg);
  color: var(--surface);
  border-color: var(--fg);
}

.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--fg);
  border-radius: 1px;
}

@media (max-width: 899px) {
  .nav-burger {
    display: inline-flex;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    padding: var(--space-2) var(--space-4) var(--space-4);
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    white-space: normal;
  }
  .site-nav.nav-open .nav-links {
    display: flex;
  }
  .nav-links li {
    border-bottom: 1px solid var(--line);
  }
  .nav-links a {
    display: block;
    padding: 12px 4px;
  }
  .nav-cta {
    display: none !important;
  }
  .site-nav {
    position: sticky;
  }
  .site-nav-inner {
    position: relative;
    flex-wrap: nowrap;
  }
}

/* hidden 属性必须真的隐藏 —— 否则 .btn 的 display 会盖掉浏览器默认的隐藏 */
[hidden] {
  display: none !important;
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: var(--radius-btn);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.12s;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--accent);
  color: var(--surface);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--surface);
}
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--fg);
  color: var(--fg);
}
.btn-lg {
  padding: 14px 28px;
  font-size: 1.02rem;
}

/* ——— Layout ——— */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* R10-8: only set vertical padding — do NOT use the padding shorthand,
   or it wipes .wrap's horizontal 24px (same specificity, later rule wins). */
.hero {
  padding-top: var(--space-8);
  padding-bottom: var(--space-6);
  text-align: left;
}

/* R11-4: scheme B — centered copy, full-width visual below */
.hero-b {
  text-align: center;
}
.hero-b .hero-copy {
  max-width: 40rem;
  margin: 0 auto;
}
.hero-b .hero-brand,
.hero-b h1,
.hero-b .lead {
  margin-left: auto;
  margin-right: auto;
}
.hero-b h1 {
  /* Was 22ch (~369px @1440) — too narrow; keep readable wrap without squeezing */
  max-width: 18em;
}
.hero-b .lead {
  max-width: 42ch;
}
.hero-b .cta-row {
  justify-content: center;
}
.hero-b .evidence-bar {
  margin-left: auto;
  margin-right: auto;
}
.hero-b .fact-wall,
.hero-b .promise-badges,
.hero-b .tool-strip,
.hero-b .trust-note {
  margin-left: auto;
  margin-right: auto;
  max-width: 52rem;
}
.hero-b .dim-grid {
  /* T-10: full-bleed inside .wrap — NOT inside .hero-copy (was 640÷4 ≈ 118px/col) */
  width: 100%;
  max-width: 64rem;
  margin: 28px auto 12px;
}
.hero-b .tool-strip {
  text-align: center;
  margin: 8px auto 4px;
  font-size: 0.92rem;
}
.hero-b .tool-strip a {
  color: var(--accent);
  font-weight: 600;
}
.hero-b .hero-visual-wide {
  margin: var(--space-6) auto 0;
  max-width: 920px;
}
.hero-b .hero-visual-wide figcaption {
  text-align: center;
}

/* T-10: measure — body copy ~45–75ch (cap at 65ch). Do not !important. */
.rule-list {
  max-width: 65ch;
}
.rule-list > p,
.feature-item > p,
.feature-item > .how-check,
.section-head > p,
.page-hero > .lead,
.page-hero > p,
.faq-item > p,
.step-card > p,
.note-box > p,
.trust-block > p,
.plan > .plan-desc,
.closing-cta > .lead,
.highlight-solo + .section-head > p,
.who-card > p,
.home-changelog > p,
.fee-intro,
.fee-note,
.detector-body p,
main.wrap > p.lead {
  max-width: 65ch;
}
.section-head > p,
.page-hero > .lead {
  margin-left: 0;
  margin-right: auto;
}
.hero-b .section-head > p {
  margin-left: auto;
  margin-right: auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--space-5) var(--space-6);
  align-items: start;
}
@media (max-width: 899px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero-copy {
  min-width: 0;
}

.hero-visual {
  margin: 0;
  min-width: 0;
}
.hero-visual img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}
.hero-visual figcaption {
  margin-top: var(--space-2);
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 18px;
  color: var(--fg);
}
.hero-brand .hero-brand-mark {
  width: clamp(36px, 5vw, 48px);
  height: clamp(36px, 5vw, 48px);
  flex-shrink: 0;
}
.hero-brand .dot {
  color: var(--accent);
}

/* R12-C2: four dimensions under hero (Apple-style claim + mechanism) */
.dim-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 12px;
  text-align: left;
}
@media (max-width: 899px) {
  .dim-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  /* T-10: at 520px two cols still squeeze h3 into orphan lines — go single column earlier */
  .dim-grid {
    grid-template-columns: 1fr;
  }
}
.dim-card {
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.dim-card h3 {
  text-wrap: balance;
}
.dim-card .dim-score {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.dim-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
}
.dim-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}
.stance-line {
  margin: 20px auto 0;
  max-width: 42ch;
  text-align: center;
  font-size: 1.05rem;
}
.promise-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--muted);
}
.promise-badges li::before {
  content: "· ";
  color: var(--accent);
  font-weight: 700;
}
.hero-b .dim-grid,
.hero-b .stance-line,
.hero-b .promise-badges {
  margin-left: auto;
  margin-right: auto;
}
.footnote-src {
  font-size: 0.78em;
  vertical-align: super;
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
  margin-left: 1px;
}

.hero h1,
.page-hero h1 {
  font-family: var(--font-display);
  font-size: var(--h1-size);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 12px;
  max-width: 22ch;
}

.evidence-bar {
  display: block;
  margin: 28px 0 18px;
  max-width: 420px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--bg-soft, #f7f5f3);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.evidence-bar:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.evidence-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 8px;
  background: var(--bg, #fff);
  border: 1px solid var(--line);
}
.evidence-k {
  font-size: 0.95rem;
  font-weight: 600;
}
.evidence-chip {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.evidence-bad .evidence-chip {
  color: var(--bad, #b42318);
  background: var(--bad-bg, #fef0ee);
}
.evidence-ok .evidence-chip {
  color: var(--ok, #1a7a4c);
  background: var(--ok-bg, #e8f6ee);
}
.evidence-cap {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}
.fact-wall {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0 0 16px;
}
.fact-wall a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  background: var(--bg, #fff);
}
.fact-wall a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lead {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 42ch;
  margin: 0 0 28px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.trust-note {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 14px;
}

/* ——— Sections ——— */
/* R10-8: same cascade pitfall as .hero — vertical only so .wrap keeps 24px sides */
.section {
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
}
.section-head {
  margin-bottom: 28px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.section-head p {
  color: var(--muted);
  margin: 0;
  max-width: 52ch;
}

.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ——— Detector ——— */
.detector {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.dropzone {
  /* R11-2: <label> defaults to inline — vertical padding paints but does not
     grow the parent .detector → "double frame" overflow. Force a block box. */
  display: block;
  position: relative;
  padding: 48px 28px;
  text-align: center;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.15s;
}
.dropzone:hover,
.dropzone.is-drag {
  background: var(--accent-soft);
}
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.dropzone-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--surface);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  font-weight: 700;
}
.dropzone strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 4px;
}
.dropzone span {
  color: var(--muted);
  font-size: 0.9rem;
}

.detector-body {
  display: none;
  padding: 28px;
}
.detector-body.is-open {
  display: block;
}

.detector-top {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 24px;
  margin-bottom: 28px;
}
@media (max-width: 700px) {
  .detector-top {
    grid-template-columns: 1fr;
  }
}

.preview-thumb {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ink);
  aspect-ratio: 1;
}
.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.checks {
  display: grid;
  gap: 10px;
}
.check {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid transparent;
}
.check.ok {
  background: var(--ok-bg);
  border-color: var(--ok-border);
}
.check.warn {
  background: var(--warn-bg);
  border-color: var(--warn-chip);
}
.check.bad {
  background: var(--bad-bg);
  border-color: var(--bad-chip);
}
.check-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--overlay);
  color: var(--fg);
  white-space: nowrap;
}
.check.ok .check-badge {
  background: var(--ok);
  color: var(--surface);
}
.check.warn .check-badge {
  background: var(--warn);
  color: var(--surface);
}
.check.bad .check-badge {
  background: var(--bad);
  color: var(--surface);
}
.check-label {
  font-weight: 600;
  font-size: 0.95rem;
}
.check-detail {
  grid-column: 2 / -1;
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}
.check-value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--fg);
  white-space: nowrap;
}

/* Three-crop previews */
.crops {
  margin: 28px 0;
}
.crops h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 6px;
}
.crops > p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 18px;
}
.crop-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
}
.crop-card {
  text-align: center;
}
.crop-frame {
  position: relative;
  overflow: hidden;
  background: var(--ink-2);
  border: 1px solid var(--line);
  margin: 0 auto 8px;
}
.crop-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.crop-safe {
  position: absolute;
  inset: 10%;
  border: 1.5px dashed var(--accent-95);
  pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--white-25);
}
.crop-label {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}
.crop-1x1 {
  width: 200px;
  height: 200px;
}
.crop-4x5 {
  width: 160px;
  height: 200px;
}
.crop-4x3 {
  width: 266px;
  height: 200px;
}
.crop-5x4 {
  width: 250px;
  height: 200px;
}

.self-checks {
  margin-top: 16px;
  padding: 14px 18px;
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius);
  background: var(--cream);
}
.self-checks h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 8px;
}
.self-checks ul {
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.self-checks li + li {
  margin-top: 6px;
}

.recipe {
  background: var(--bg-warm);
  border: 1px solid var(--recipe-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 8px;
}
.recipe h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 8px;
}
.recipe code,
.recipe-text {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 10px 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.recipe-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.privacy-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 16px;
}
.privacy-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
}

/* ——— Feature strip ——— */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 800px) {
  .features {
    grid-template-columns: 1fr;
  }
}
.feature {
  padding: 8px 0;
}
.feature h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 6px;
}
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.highlight-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-4);
}
@media (max-width: 720px) {
  .highlight-duo {
    grid-template-columns: 1fr;
  }
}
.highlight-duo figure,
.highlight-solo figure {
  margin: 0;
}
.highlight-duo img,
.highlight-solo img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-soft);
}
.highlight-solo {
  max-width: 720px;
}
.feature-catalog {
  display: grid;
  gap: 48px;
  padding-bottom: 48px;
}
.feature-group h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 20px;
}
.feature-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
  background: var(--bg);
}
.feature-item h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 8px;
}
.feature-item .feature-icon {
  font-size: 1.25rem;
  margin-right: 6px;
}
.feature-item p {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 0.95rem;
}
.feature-item .how-check {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.feature-item img {
  display: block;
  width: 100%;
  max-width: 640px;
  margin-top: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--muted) 8%, transparent);
}
.steps-list {
  display: grid;
  gap: 32px;
  padding-bottom: 32px;
}
.step-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  background: var(--bg);
}
.step-card .step-num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.faq-block {
  display: grid;
  gap: 16px;
  padding-bottom: 48px;
}
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: var(--bg);
}
.faq-item h3 {
  font-size: 1rem;
  margin: 0 0 8px;
}
.faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ——— Rules page ——— */
.page-hero {
  padding: var(--page-hero-pad);
}
.page-hero .lead {
  margin-bottom: 0;
}

.rule-list {
  display: grid;
  gap: var(--space-3);
  padding-bottom: var(--space-7);
}

/* ——— Blog cards (R10-4) ——— */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-7);
}
@media (max-width: 720px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}
.blog-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.blog-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.blog-card-meta {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-transform: uppercase;
}
.blog-card h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0;
}
.blog-card h2 a {
  color: var(--fg);
  text-decoration: none;
}
.blog-card h2 a:hover {
  color: var(--accent);
}
.blog-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  flex: 1;
}
.rule {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  background: var(--bg);
}
.rule-num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.rule h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.rule p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.95rem;
}
.rule-source {
  font-size: 0.82rem;
  color: var(--fg);
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 8px 12px;
  margin: 0;
}
.rule-source a {
  font-weight: 600;
}

.trust-block h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 10px;
}
.trust-block p:last-child {
  margin-bottom: 0;
}

.billing-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  margin: 0 auto 28px;
}
.billing-toggle button {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 18px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.billing-toggle button[aria-pressed="true"] {
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 1px 3px var(--shadow-a);
}
.plan[data-billing] {
  transition: opacity 0.15s ease;
}
.plan[data-billing].is-hidden {
  display: none;
}

.compare-table-wrap {
  overflow-x: auto;
  margin: 40px 0 48px;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.compare-table th,
.compare-table td {
  border: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
}
.compare-table th {
  background: var(--bg-soft);
  font-family: var(--font-display);
}
.compare-table td:nth-child(n + 2) {
  text-align: center;
  width: 22%;
}
.compare-yes {
  color: var(--ok);
  font-weight: 700;
}
.compare-no {
  color: var(--muted);
}

.faq-list {
  display: grid;
  gap: 14px;
  padding-bottom: 48px;
}
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: var(--bg);
}
.faq-item h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 8px;
}
.faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.rule-hub {
  display: grid;
  gap: 12px;
  margin-bottom: 32px;
}
.rule-hub a {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--fg);
  text-decoration: none;
  font-weight: 600;
}
.rule-hub a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}
.rule-hub .rule-hub-sub {
  display: block;
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 4px;
}

.fee-calc {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  padding: 24px;
  background: var(--bg);
  margin-bottom: 24px;
}
.fee-calc .field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px 18px;
  margin-bottom: 18px;
}
.fee-calc label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
}
.fee-calc input,
.fee-calc select {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.fee-calc .check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  margin: 12px 0;
}
.fee-result {
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  font-size: 0.92rem;
}
.fee-result .fee-line {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}
.fee-result .fee-total {
  font-weight: 700;
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 10px;
}
.fee-result .fee-big {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 12px;
}
.fee-result.lose .fee-big {
  color: var(--bad);
}
.fee-free-badge {
  display: inline-block;
  margin: 0 0 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-text);
}
.fee-prefill-note,
.fee-cap-note {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.45;
  max-width: 42rem;
}
.fee-cap-note {
  margin-top: 8px;
}
.fee-verdict {
  margin: 0 0 10px;
  font-weight: 700;
  line-height: 1.4;
}
.fee-verdict-lose {
  color: var(--bad);
}
.fee-verdict-thin {
  color: #b45309;
}
.fee-verdict-ok {
  color: var(--text);
}
.fee-reverse {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.fee-reverse-warn {
  margin: 10px 0 0;
  color: var(--bad);
  font-size: 0.9rem;
  line-height: 1.45;
}
.fee-section {
  margin: 28px 0;
  max-width: 42rem;
}
.fee-section h2 {
  font-size: 1.25rem;
  margin: 0 0 8px;
}
.fee-section > p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.5;
}
.fee-sales-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  max-width: 260px;
  margin-bottom: 12px;
}
.fee-sales-label input {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.fee-threshold {
  padding: 14px 16px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  font-size: 0.92rem;
  line-height: 1.5;
}
.fee-threshold blockquote {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-left: 3px solid var(--line);
  font-size: 0.86rem;
  color: var(--muted);
}
.fee-tier-wrap {
  overflow-x: auto;
}
.fee-tier-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.fee-tier-table th,
.fee-tier-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.fee-tier-table th {
  font-weight: 700;
}

.changelog-list {
  display: grid;
  gap: 16px;
  padding-bottom: 48px;
}
.changelog-entry {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 16px;
}
.changelog-entry time {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.changelog-entry h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 6px 0 6px;
}
.changelog-entry p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.vs-table {
  margin: 24px 0 32px;
}

/* ——— Pricing ——— */
.pricing-grid {
  display: grid;
  /* 3 档定价（Free / Pro 月付 / Pro 年付）：宽屏 3 列，中屏 2 列，窄屏 1 列 */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  padding-bottom: 40px;
}
@media (max-width: 860px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
}
.plan {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  padding: 28px 24px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
}
.plan.featured {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.plan-badge {
  position: absolute;
  top: -11px;
  left: 24px;
  background: var(--accent);
  color: var(--surface);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.plan h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 4px;
}
.plan-price {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 8px 0 4px;
  line-height: 1;
}
.plan-price small {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
}
.plan-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 18px;
}
.plan ul {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  flex: 1;
}
.plan li {
  padding: 7px 0 7px 22px;
  position: relative;
  font-size: 0.92rem;
  border-top: 1px solid var(--line);
}
.plan li:first-child {
  border-top: 0;
}
.plan li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.plan .btn {
  width: 100%;
}

.guarantees {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: center;
  padding: 8px 0 56px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}
.guarantees span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.guarantees span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.creem-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  padding-bottom: 48px;
  max-width: 65ch;
  margin-left: auto;
  margin-right: auto;
}

/* ——— Privacy prose ——— */
.prose {
  max-width: 720px;
  padding-bottom: 72px;
}
.prose h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 36px 0 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.prose h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.prose p,
.prose li {
  color: var(--muted);
}
.prose ul {
  padding-left: 22px;
}
.prose li {
  margin: 6px 0;
}
.prose strong {
  color: var(--fg);
}
.prose code {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.9em;
}
.note-box {
  background: var(--bg-warm);
  border: 1px solid var(--recipe-border);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 18px 0;
  color: var(--fg);
}

.withdraw-form {
  display: grid;
  gap: 14px;
  max-width: 420px;
  margin: 24px 0;
}
.withdraw-form label {
  display: grid;
  gap: 6px;
}
.withdraw-form .field-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fg);
}
.withdraw-form input[type="text"] {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
}
.withdraw-form input[type="text"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ——— Footer ——— */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 24px 40px;
  color: var(--muted);
  font-size: 0.88rem;
}
.site-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.site-footer a {
  color: var(--muted);
}
.site-footer a:hover {
  color: var(--fg);
}
/* 第三方出处免责声明（rules 页）—— 独占一行，排在标题与导航之后 */
.footer-note {
  order: 3;
  flex-basis: 100%;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  opacity: 0.85;
}

/* ——— i18n helpers ——— */
[data-lang-hide] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* R10-3: dark via html[data-theme] — boot script sets first-visit from prefers-color-scheme */
html[data-theme="dark"] {
  --bg: #121417;
  --fg: #f2efe9;
  --muted: #a8a29a;
  --line: #2e333b;
  --accent: #f0783a;
  --accent-hover: #ff8a4c;
  --accent-text: #F5A66A;
  --ok: #3dbe7a;
  --warn: #e0a04a;
  --bad: #f07167;
  --surface: var(--bg);
  --surface-2: var(--bg-soft);
  --surface-3: var(--bg-warm);
  --surface-4: var(--accent-soft);
  --ink: var(--fg);
  --ink-2: var(--fg);
}
html[data-theme="dark"] body {
  background:
    radial-gradient(ellipse 80% 50% at 100% -10%, var(--surface-4) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at -5% 30%, var(--surface-2) 0%, transparent 50%),
    var(--bg);
  color: var(--fg);
}
html[data-theme="dark"] .site-nav,
html[data-theme="dark"] .site-footer {
  border-color: var(--line);
}
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .btn-ghost {
  background: var(--bg-soft);
  color: var(--fg);
  border-color: var(--line);
}
html[data-theme="dark"] .hero-visual img,
html[data-theme="dark"] .highlight-solo img,
html[data-theme="dark"] .highlight-duo img {
  background: color-mix(in srgb, var(--fg) 6%, var(--bg));
}

/* R11-5 demo video */
.demo-video-wrap {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}
.demo-video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

/* R11-7 who-for */
.who-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 720px) {
  .who-grid {
    grid-template-columns: 1fr;
  }
}
.who-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  background: var(--bg);
  text-align: left;
}
.who-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 8px;
}
.who-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* R11-9 band rhythm */
.band-soft {
  background: var(--bg-soft);
  border-radius: calc(var(--radius) + 4px);
}
.band-soft.wrap {
  /* keep .wrap horizontal padding; vertical already from .section */
  max-width: calc(var(--max) + 48px);
}

/* R11-10 changelog strip + closing CTA */
.home-changelog {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  background: var(--bg);
}
.home-changelog h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 8px;
}
.closing-cta {
  text-align: center;
  padding-bottom: var(--space-7);
}
.closing-cta .cta-row {
  justify-content: center;
}

/* ——— R10-7 pre-publish form ——— */
.prepublish-form {
  display: grid;
  gap: var(--space-2);
  padding-bottom: var(--space-5);
}
.prepublish-form .field-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: var(--space-2);
}
.prepublish-form input[type="text"],
.prepublish-form input[type="number"],
.prepublish-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}
.prepublish-form textarea {
  resize: vertical;
  min-height: 96px;
}
.prepublish-optional {
  margin: var(--space-3) 0 0;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.prepublish-optional legend {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0 6px;
}
.prepublish-optional-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}
@media (max-width: 720px) {
  .prepublish-optional-row {
    grid-template-columns: 1fr;
  }
}
.prepublish-optional-row label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}
.prepublish-status {
  margin: 0 0 var(--space-3);
  color: var(--muted);
  font-size: 0.95rem;
}
.prepublish-status.is-error {
  color: var(--bad);
}
.prepublish-results {
  padding-bottom: var(--space-7);
}
.prepublish-score-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  background: var(--bg);
}
.prepublish-total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  margin: 0 0 var(--space-3);
  font-size: 1.05rem;
}
.prepublish-total strong {
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}
.prepublish-grade {
  font-weight: 700;
  color: var(--accent);
}
.prepublish-fixes {
  margin: 0 0 var(--space-3);
  padding-left: 1.25rem;
  color: var(--fg);
}
.prepublish-score-card .data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-3);
}
.prepublish-score-card .data-table th,
.prepublish-score-card .data-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
}
.prepublish-score-card h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 8px;
}
