/* Home tool page + content prose. Token colors only via base.css variables. */

.hero {
  padding: var(--sp-8) 0 var(--sp-6);
  text-align: center;
}

.hero__lede {
  max-width: 40rem;
  margin: var(--sp-4) auto 0;
  color: var(--c-text-muted);
  font-size: clamp(16px, 2.4vw, 18px);
}

.tool {
  max-width: var(--w-tool);
  margin: 0 auto var(--sp-8);
  padding: var(--sp-4);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  box-shadow: var(--shadow-md);
}

.tool__status {
  margin: var(--sp-3) 0;
  color: var(--c-text-muted);
  font-size: var(--fs-small);
}

.tool__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.sheet-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.page-section {
  padding-block: var(--sp-8);
}

.page-section h2 {
  margin-bottom: var(--sp-4);
}

.page-section h3 {
  margin-top: var(--sp-6);
}

.prose {
  max-width: 46rem;
}

.prose p + p {
  margin-top: var(--sp-3);
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.example-grid {
  display: grid;
  gap: var(--sp-4);
}

.related-links {
  display: grid;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-links a {
  font-weight: 600;
}

.sample-downloads {
  margin-top: var(--sp-4);
}

.sample-downloads a {
  font-weight: 600;
}

@media (min-width: 640px) {
  .example-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .how-it-works {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .hero {
    padding-top: var(--sp-12);
  }
}

/* --- 文章顶部：更新时间戳 + 快速答案框（用于 SERP snippet / AI 摘要抽取） --- */
.page-meta {
  color: var(--c-text-subtle);
  font-size: var(--fs-small);
}

.quick-answer {
  margin-top: var(--sp-6);
  padding: var(--sp-4) var(--sp-6);
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-primary);
  border-radius: var(--r-md);
  background: var(--c-surface-alt);
}

.quick-answer__title {
  margin: 0;
  font-size: var(--fs-tiny);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-primary-text);
}

.quick-answer p {
  margin-bottom: 0;
}

.quick-answer p + p {
  margin-top: var(--sp-3);
}

/* --- Pricing (2026-10-29, three tiers added 2026-11-09) --------------------
   Free / Pro (one-time 12 months) / Lifetime (one-time, no expiry). Pro and
   Lifetime unlock the SAME limits; the third card exists only to sell a
   different duration. No card may look like a subscription. Tokens only. */
.pricing-lede {
  max-width: 44rem;
  margin-bottom: var(--sp-6);
  color: var(--c-text-muted);
}

/* stretch, not start: all cards must share a bottom edge. Every card also
   carries a tag row and a bottom action row so the internal baselines line up —
   stretching an otherwise empty card just leaves an awkward blank half. */
.pricing-grid {
  display: grid;
  gap: var(--sp-4);
  align-items: stretch;
}

.price-card {
  display: flex;
  flex-direction: column;
  padding: var(--sp-6);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  background: var(--c-surface);
}

.price-card--featured {
  border-color: var(--c-primary);
  background: var(--c-primary-soft);
  box-shadow: var(--shadow-md);
}

.price-card h3 {
  margin-bottom: var(--sp-1);
}

.price-card__tag {
  align-self: flex-start;
  margin-bottom: var(--sp-3);
  padding: 2px var(--sp-2);
  border: 1px solid transparent;
  border-radius: var(--r-full);
  background: var(--c-primary);
  color: #fff;
  font-size: var(--fs-tiny);
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Same box as the Pro tag, neutral palette: keeps both titles on one baseline. */
.price-card__tag--muted {
  border-color: var(--c-border-strong);
  background: var(--c-surface);
  color: var(--c-text-muted);
}

.price-card__amount {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-text);
}

.price-card__period {
  margin-bottom: var(--sp-4);
  color: var(--c-text-subtle);
  font-size: var(--fs-small);
}

.price-card__list {
  flex: 1;
  display: grid;
  align-content: start;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-6);
  padding: 0;
  list-style: none;
  font-size: var(--fs-small);
}

.price-card__list li {
  position: relative;
  padding-left: 1.4em;
  color: var(--c-text-muted);
}

.price-card__list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--c-primary-text);
  font-weight: 700;
}

.price-card__cta {
  width: 100%;
}

.price-card__cta.is-disabled {
  opacity: 0.6;
}

.price-card__status {
  margin-top: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  background: var(--c-surface);
  color: var(--c-primary-text);
  font-size: var(--fs-small);
  font-weight: 600;
}

.price-card__note {
  margin-top: var(--sp-3);
  color: var(--c-warn);
  font-size: var(--fs-small);
}

.price-card__fine {
  margin-top: var(--sp-3);
  color: var(--c-text-subtle);
  font-size: var(--fs-tiny);
  line-height: 1.5;
}

/* Comparison table inside content pages (/pricing/). No framework table styles
   exist for .prose, so keep this minimal and token-driven. */
.prose table {
  width: 100%;
  margin: var(--sp-4) 0 var(--sp-6);
  border-collapse: collapse;
  font-size: var(--fs-small);
}

.prose th,
.prose td {
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--c-border);
  text-align: left;
  vertical-align: top;
}

.prose thead th {
  border-bottom-width: 2px;
  font-weight: 600;
  white-space: nowrap;
}

.prose tbody tr:last-child td {
  border-bottom: none;
}

/* Three cards need ~340px each before the feature lists turn into two-line
   fragments. Below that, keep a single column instead of squeezing them. */
@media (min-width: 1000px) {
  .pricing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 1180px;
  }
  /* The footnotes differ in length (Free 2 lines vs paid cards 4). Because the
     list above has flex:1, a short footnote pushes its CTA ~50px lower than the
     other two. Reserve equal footnote space so all three CTAs sit on one line. */
  .price-card__fine {
    min-height: 5.5em;
  }
}

/* --- /thanks/ claim page ---------------------------------------------------- */
/* Shown only before the unlock is known to exist. A declined card stops on the
   payment page (verified 2026-11-02), so anyone who reaches this page either
   completed an order or arrived by hand; the hint stops the latter from assuming
   they were charged. */
.thanks-hint {
  padding: var(--sp-3) var(--sp-3);
  border-left: 3px solid var(--c-warn);
  border-radius: var(--r-sm);
  background: var(--c-warn-bg);
  font-size: var(--fs-small);
}

/* Order-id input and its button sit on one row and share a height. Stacking them
   left a 416px-wide field above a 140px-wide button, which read as two unrelated
   blocks (2026-11-02). */
.activation-form {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: var(--sp-2);
  max-width: 30rem;
  margin: var(--sp-4) 0;
}

/* `display: grid` above outranks the UA rule for [hidden], so the attribute has
   to be honoured explicitly or both forms show at once. */
.activation-form[hidden],
.thanks-hint[hidden] {
  display: none;
}

.activation-form label {
  flex: 1 0 100%;
  font-size: var(--fs-small);
  font-weight: 600;
}

.activation-form input {
  flex: 1 1 12rem;
  min-width: 0;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-sm);
  background: var(--c-surface);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
}

.activation-form input:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 1px;
}

.activation-form .btn {
  flex: 0 0 auto;
}

.thanks-msg {
  min-height: 1.5em;
  margin-top: var(--sp-3);
  margin-bottom: var(--sp-4);
  font-size: var(--fs-small);
  font-weight: 600;
}

.thanks-msg--ok {
  color: var(--c-primary-text);
}

.thanks-msg--error {
  color: var(--c-danger);
}
