/* ==========================================================================
   Claude KYC — Design System
   Single stylesheet, no build step, no external dependency.
   Authored for a virtual-goods storefront: light, warm, legible.
   ========================================================================== */

/* --- 1. Tokens ----------------------------------------------------------- */
:root {
  /* Neutral ramp — warm paper, not blue-tinted. */
  --bg:            #faf9f7;
  --bg-sunk:       #f2efea;
  --surface:       #ffffff;
  --surface-2:     #ffffff;
  --surface-3:     #f4f1ec;
  --border:        #e7e3dc;
  --border-strong: #d5cfc5;

  /* Text — three steps only. */
  --text:          #1b1a18;
  --text-2:        #5c5850;
  --text-3:        #8b867d;

  /* Single accent. Warm clay, tied to the product context. */
  --accent:        #c2603c;   /* 文字 / 边框 / 强调（浅底上要能读） */
  --accent-solid:  #d97757;   /* 大面积填充（按钮） */
  --accent-hi:     #a94f2f;   /* hover：浅底上要更深而不是更亮 */
  --accent-lo:     #8f4126;
  --accent-wash:   rgba(217, 119, 87, 0.09);
  --accent-line:   rgba(217, 119, 87, 0.32);

  /* Semantic — used only to mean something. */
  --ok:            #1f8f4d;
  --ok-wash:       rgba(31, 143, 77, 0.09);
  --ok-line:       rgba(31, 143, 77, 0.26);
  --warn:          #a8760d;
  --warn-wash:     rgba(168, 118, 13, 0.10);
  --warn-line:     rgba(168, 118, 13, 0.26);
  --danger:        #c93a2f;
  --danger-wash:   rgba(201, 58, 47, 0.08);
  --danger-line:   rgba(201, 58, 47, 0.24);

  /* Type */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  /* Radius — three steps. */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  /* Motion */
  --t: 140ms cubic-bezier(0.2, 0, 0.2, 1);

  /* Layout */
  --gutter: 40px;
  --measure: 80ch;
}

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

/* --- 2. Reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
}

img, svg { display: block; max-width: 100%; }

/* [hidden] 是 UA 样式，会被组件类上的 display 覆盖（如 .btn 的 inline-flex）。
   这里提权，保证 hidden 属性在任何元素上都真正生效。 */
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.25; letter-spacing: -0.011em; }

/* One shared focus ring. Keyboard only — never punishes mouse users. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::selection { background: var(--accent-line); color: var(--text); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border: 3px solid var(--bg);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* --- 3. Layout primitives ------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 1000px; }

.page {
  flex: 1 0 auto;
  padding-block: 72px 96px;
}

.stack     { display: grid; gap: 16px; }
.stack--lg { display: grid; gap: 32px; }
.stack--xl { display: grid; gap: 48px; }

/* minmax(0, 1fr) 而非 1fr：grid 轨道的默认最小值是 auto（内容宽度），
   长 URL、等宽数字等会把轨道撑破视口。下同。 */
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 > *, .grid-4 > * { min-width: 0; }

@media (max-width: 860px) {
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) { :root { --gutter: 28px; } }
@media (max-width: 640px) {
  :root { --gutter: 18px; }
  .page { padding-block: 44px 64px; }
}

/* --- 4. Header ----------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: rgba(250, 249, 247, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-header__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 58px;
}
.site-header__bar > * { min-width: 0; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand img {
  width: 26px;
  height: 26px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}
.brand span { color: var(--text-2); font-weight: 450; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; margin-right: 10px; }
.nav a {
  padding: 6px 10px;
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--text-2);
  transition: color var(--t), background var(--t);
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

.lang {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: 2px;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.lang a, .lang span {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-3);
  transition: color var(--t), background var(--t);
}
.lang a:hover { color: var(--text-2); }
.lang [aria-current="true"] { background: var(--surface-3); color: var(--text); }

@media (max-width: 720px) {
  .nav a { padding: 6px 8px; font-size: 13px; }
  .brand span { display: none; }
}

/* 窄屏：导航换到第二行并允许横向滚动。
   否则 flex 子项无法收缩到内容宽度以下，会把整个页面撑出视口。 */
@media (max-width: 620px) {
  .site-header__bar {
    height: auto;
    flex-wrap: wrap;
    padding-block: 10px;
    row-gap: 8px;
  }
  .nav {
    order: 3;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; }
  .lang { margin-left: auto; order: 2; }
}

/* --- 5. Typography blocks ------------------------------------------------ */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.eyebrow::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 99px;
  background: var(--accent);
  flex: none;
}

.hero { max-width: 54rem; }
.hero h1 {
  font-size: clamp(32px, 4.4vw, 54px);
  letter-spacing: -0.024em;
  line-height: 1.12;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p {
  margin-top: 18px;
  max-width: 46rem;
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.65;
}

.page-title { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -0.02em; }
.page-title + p { margin-top: 12px; color: var(--text-2); max-width: var(--measure); }

.section-title { font-size: 20px; letter-spacing: -0.015em; }
.prose { color: var(--text-2); max-width: var(--measure); }
.prose strong { color: var(--text); font-weight: 550; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--accent-hi); }

.rule { border: 0; border-top: 1px solid var(--border); }

/* --- 6. Surfaces --------------------------------------------------------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
}
.panel__head > div { min-width: 0; }
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.panel__head h2 { font-size: 15px; font-weight: 600; }
.panel__head p  { font-size: 13px; color: var(--text-3); margin-top: 2px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px;
}
.card h3 { font-size: 15px; margin-bottom: 6px; }
.card p  { font-size: 14px; color: var(--text-2); line-height: 1.6; }

@media (max-width: 640px) { .panel { padding: 18px; } }

/* --- 7. Stats ------------------------------------------------------------ */
.stat {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: 16px 18px;
}
.stat__value {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat__label { font-size: 13px; color: var(--text-3); margin-top: 2px; }

/* --- 8. Steps ------------------------------------------------------------ */
.step { display: flex; gap: 14px; align-items: flex-start; }
.step > div { min-width: 0; }
.step__n {
  flex: none;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
}
.step h3 { font-size: 14px; margin-bottom: 4px; }
.step p  { font-size: 14px; color: var(--text-2); }

/* --- 9. Plan picker（商品卡里的套餐单选） ---------------------------------- */
.plans { border: 0; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.plans__legend {
  padding: 0;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}

.plan {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
}
.plan:hover { border-color: var(--border-strong); background: var(--surface-3); }
.plan:has(input:checked) {
  border-color: var(--accent-line);
  background: var(--accent-wash);
}
.plan:has(input:disabled) { cursor: not-allowed; opacity: 0.55; }
.plan:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.plan input { flex: none; accent-color: var(--accent-solid); margin: 0; }
.plan__name { flex: 1; min-width: 0; font-size: 13px; }
.plan__price { display: flex; align-items: baseline; gap: 6px; font-family: var(--mono); font-size: 13px; }
.plan__was { color: var(--text-3); font-size: 12px; }
.plan__now { color: var(--text); font-weight: 500; }
.plan__price--out { font-family: var(--sans); font-size: 12px; color: var(--text-3); }

/* 页脚价格：划线原价 + 现价 + 折扣角标 */
.pricebox { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.pricebox__was { font-family: var(--mono); font-size: 13px; color: var(--text-3); }
.pricebox__off {
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--ok-wash);
  border: 1px solid var(--ok-line);
  color: var(--ok);
  font-size: 12px;
  font-weight: 600;
}

/* --- 9b. Storefront ------------------------------------------------------ */
.page--flush { padding-block: 0 96px; display: grid; gap: 64px; }
@media (max-width: 640px) { .page--flush { gap: 44px; padding-bottom: 64px; } }

.hero-band {
  padding-block: 96px 76px;
  background:
    radial-gradient(900px 340px at 12% -10%, rgba(217, 119, 87, 0.16), transparent 70%),
    radial-gradient(700px 300px at 92% 0%, rgba(120, 150, 200, 0.14), transparent 70%),
    var(--bg-sunk);
  border-bottom: 1px solid var(--border);
}
@media (max-width: 640px) { .hero-band { padding-block: 44px 40px; } }

/* Hero 文案居中，视线落在下面那个 CTA 上 */
.hero-band .hero { text-align: center; margin-inline: auto; }
.hero-band .hero .eyebrow { justify-content: center; }
.hero-band .hero p { margin-inline: auto; }

.hero__cta { display: grid; justify-items: center; gap: 10px; }
.hero__note { font-size: 13px; color: var(--text-3); }
.btn--lg { padding: 13px 26px; font-size: 15px; }

.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; padding: 0; }
.trust__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  font-size: 13px;
  color: var(--text-2);
}
.trust__mark { color: var(--accent); display: inline-flex; }
.trust__mark svg { width: 16px; height: 16px; }
.trust__item em { font-style: italic; color: var(--text); }

/* 段落引导语 */
.section-lead { display: grid; gap: 6px; }
.section-lead p { font-size: 14px; }

/* 分类筛选 + 搜索 */
.catalog-bar {
  position: sticky;
  top: 57px;              /* 站点头部高度，避免筛选条被盖住 */
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 12px;
  background: var(--bg);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 15px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--t), background var(--t), border-color var(--t);
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.is-active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.search { position: relative; flex: 1; min-width: 220px; max-width: 320px; margin-left: auto; }
.search__icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  color: var(--text-3);
  pointer-events: none;
}
.search__icon svg { width: 16px; height: 16px; }
.input.search__input { padding-left: 38px; border-radius: 99px; }
.search__input::-webkit-search-cancel-button { cursor: pointer; }

/* 商品卡 */
.products { display: grid; gap: 22px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.products > * { min-width: 0; }
@media (max-width: 1180px) { .products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px)  { .products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .products { grid-template-columns: 1fr; } }

.product {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 1px 2px rgba(38, 33, 28, 0.04);
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.product:hover {
  border-color: var(--border-strong);
  box-shadow: 0 14px 30px -14px rgba(38, 33, 28, 0.28);
  transform: translateY(-2px);
}
.product[hidden] { display: none !important; }

.product__cover { position: relative; aspect-ratio: 8 / 5; background: var(--surface-3); }
.product__cover img { width: 100%; height: 100%; object-fit: cover; }
.product__veil {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(250, 249, 247, 0.72);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.product__flag {
  position: absolute;
  top: 10px; right: 10px;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.product.is-out .product__cover img { filter: grayscale(1); }

.product__body { flex: 1; padding: 16px 18px 0; min-width: 0; }
.product.is-out .plans { opacity: 0.6; }
.product__title { font-size: 15px; font-weight: 600; }
.product__desc {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
}
.product__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 18px;
}
.product__foot > :first-child { min-width: 0; }
.product__price {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.product__price .u { font-family: var(--sans); font-size: 13px; color: var(--text-2); margin-left: 4px; }
.product__stock { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12px; color: var(--text-3); }
.product__stock .dot { width: 6px; height: 6px; border-radius: 99px; background: var(--ok); flex: none; }
.product.is-out .product__stock { color: var(--text-3); }
.buy-btn { flex: none; }

.empty-note { text-align: center; color: var(--text-3); padding-block: 32px; }

/* 弹窗里的商品行 */
.lineitem {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-sunk);
}
.lineitem__img { width: 72px; height: 45px; flex: none; object-fit: cover; border-radius: var(--r-sm); }
.lineitem__text { min-width: 0; }
.lineitem__title { font-size: 14px; font-weight: 600; }
.lineitem__meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* 数量步进器 */
.stepper { display: flex; align-items: stretch; gap: 8px; }
.stepper__btn {
  width: 40px;
  flex: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.stepper__btn:hover { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.input.stepper__input { text-align: center; }
.stepper__input::-webkit-outer-spin-button,
.stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper__input { -moz-appearance: textfield; appearance: textfield; }

/* 金额小计 */
.summary {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-sunk);
}
.summary__row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-2); }
.summary__row .is-cut { color: var(--ok); }
.summary__row--total {
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.summary__row--total span:last-child { font-family: var(--mono); color: var(--accent); }

.form-error { font-size: 13px; color: var(--danger); }
.fineprint { font-size: 12px; color: var(--text-3); text-align: center; }
#faq .fineprint { text-align: left; }

/* --- 9e. Brand landing page ---------------------------------------------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.crumbs a:hover { color: var(--text-2); }
.crumbs [aria-current] { color: var(--text-2); }

.brandhead {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  align-items: center;
}
@media (max-width: 860px) { .brandhead { grid-template-columns: minmax(0, 1fr); } }
.brandhead__img { width: 100%; border-radius: var(--r-lg); border: 1px solid var(--border); }
.brandhead .trust { justify-content: flex-start; }

.crosslinks { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .crosslinks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .crosslinks { grid-template-columns: 1fr; } }
.crosslink {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color var(--t), background var(--t);
}
.crosslink:hover { border-color: var(--border-strong); background: var(--surface-3); }
.crosslink__name { font-size: 14px; font-weight: 550; }
.crosslink__price { font-family: var(--mono); font-size: 12px; color: var(--text-3); }

/* 商品卡底部通往品牌页的链接 */
.product__more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 550;
  color: var(--accent);
}
.product__more:hover { color: var(--accent-hi); }

/* --- 9d. Delivery format ------------------------------------------------- */
.delivery {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
}
@media (max-width: 900px) { .delivery { grid-template-columns: minmax(0, 1fr); } }

.delivery__sample {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.delivery__sample-head {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 12px;
}
.delivery__block { margin-bottom: 12px; font-size: 13px; line-height: 1.75; }

.delivery__steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding-left: 22px;
  color: var(--text-2);
}
.delivery__steps li { line-height: 1.65; }
.delivery__steps li::marker { color: var(--accent); font-weight: 600; }
.delivery__steps strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }

/* --- 9c. Policy page ----------------------------------------------------- */
.formula {
  padding: 18px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-md);
  background: var(--accent-wash);
  text-align: center;
}
.formula__body {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--text);
}
@media (max-width: 560px) { .formula__body { font-size: 13px; } }

.list { padding-left: 20px; display: grid; gap: 8px; }
.list li { line-height: 1.65; }
.list li::marker { color: var(--text-3); }

.claimrow { display: flex; gap: 12px; align-items: flex-start; }
.claimrow + .claimrow { padding-top: 14px; border-top: 1px solid var(--border); }
.claimrow > div { min-width: 0; }
.claimrow__n {
  flex: none;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 99px;
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
}

.link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.link:hover { color: var(--accent-hi); }
.faq__body a { color: var(--accent); }

.site-footer__links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--text-3); }
.site-footer__links a:hover { color: var(--text-2); }

/* 结算弹窗里的转化件：券码折叠、省钱行、按钮下的三条保障 */
.couponbox { font-size: 13px; }
.couponbox > summary {
  cursor: pointer;
  color: var(--accent);
  list-style: none;
  padding: 2px 0;
}
.couponbox > summary::-webkit-details-marker { display: none; }
.couponbox > summary::before { content: "+ "; }
.couponbox[open] > summary::before { content: "− "; }
.couponbox > summary:hover { color: var(--accent-hi); }
.couponbox > .field { margin-top: 10px; }

.summary__saved { color: var(--ok); font-weight: 550; }
.summary__note {
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-3);
}
.summary__note .mono { color: var(--text-2); }

.reassure { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.reassure li {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
}
.reassure li::before { content: "✓"; color: var(--ok); flex: none; font-weight: 600; }

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

/* 付款成功后的结果块 */
.paidbox {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
  padding: 22px 18px;
  border: 1px solid var(--ok-line);
  border-radius: var(--r-md);
  background: var(--ok-wash);
}
.paidbox__mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 99px;
  background: var(--ok);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}
.paidbox__title { font-size: 17px; }
.paidbox__body { font-size: 14px; line-height: 1.65; color: var(--text-2); max-width: 42ch; }
.paidbox__body strong { color: var(--text); }
.paidbox .copyrow { width: 100%; text-align: left; background: var(--surface); }
.paidbox .fineprint { max-width: 40ch; }

/* 后台：待发货工作台 */
.deliver {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-sunk);
}
.deliver + .deliver { margin-top: 12px; }
.deliver__meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; }
.deliver__meta > div { display: flex; align-items: center; gap: 6px; }
.deliver textarea.input { line-height: 1.7; resize: vertical; }

.stockform { display: flex; gap: 6px; align-items: center; }
.stockform__input { width: 84px; padding: 6px 8px; text-align: center; }

/* --- 10. Forms ----------------------------------------------------------- */
.field { display: grid; gap: 7px; }
.field > label { font-size: 13px; font-weight: 550; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); }

.input, .select {
  width: 100%;
  padding: 11px 13px;
  background: var(--bg-sunk);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--text);
  transition: border-color var(--t), box-shadow var(--t);
}
.input::placeholder { color: var(--text-3); }
.input:hover, .select:hover { border-color: var(--border-strong); }
.input:focus, .select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.input[type="url"], .input--mono { font-family: var(--mono); font-size: 13px; }

.select {
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236d6d78' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M4 6.5 8 10.5 12 6.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}
.select option { background: var(--surface); color: var(--text); }

/* --- 11. Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t), border-color var(--t), color var(--t), opacity var(--t);
}
.btn--primary { background: var(--accent-solid); color: #fff; }
.btn--primary:hover { background: var(--accent); }
.btn--primary:active { background: var(--accent-lo); color: #fff; }
.btn--quiet {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}
.btn--quiet:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn--link {
  padding: 0;
  background: none;
  color: var(--accent);
  font-size: 13px;
}
.btn--link:hover { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 2px; }
.btn--block { width: 100%; padding-block: 13px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* --- 12. Console --------------------------------------------------------- */
.console {
  height: 144px;
  overflow-y: auto;
  padding: 14px;
  background: var(--bg-sunk);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--text-2);
  overscroll-behavior: contain;
}
.console__line { display: flex; gap: 8px; }
.console__ts   { color: var(--text-3); flex: none; }
.console__line--ok    { color: var(--ok); }
.console__line--warn  { color: var(--warn); }
.console__line--error { color: var(--danger); }

/* --- 13. Badges & callouts ----------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 550;
  color: var(--text-2);
}
.badge--ok     { color: var(--ok);     background: var(--ok-wash);     border-color: var(--ok-line); }
.badge--warn   { color: var(--warn);   background: var(--warn-wash);   border-color: var(--warn-line); }
.badge--danger { color: var(--danger); background: var(--danger-wash); border-color: var(--danger-line); }

.method {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 7px;
  border-radius: var(--r-sm);
}
.method--post { color: var(--ok);   background: var(--ok-wash);   border: 1px solid var(--ok-line); }
.method--get  { color: var(--accent); background: var(--accent-wash); border: 1px solid var(--accent-line); }

.callout {
  display: flex;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 14px;
  color: var(--text-2);
}
.callout svg { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.callout > div > strong:first-child { display: block; color: var(--text); font-weight: 600; margin-bottom: 3px; }
.callout strong { color: var(--text); font-weight: 600; }
.callout--warn { border-color: var(--warn-line); background: var(--warn-wash); }
.callout--warn svg { color: var(--warn); }
.callout--info svg { color: var(--accent); }

/* --- 14. Code ------------------------------------------------------------ */
code {
  font-family: var(--mono);
  font-size: 0.9em;
  padding: 1.5px 5px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--text);
}
.endpoint {
  display: block;
  padding: 10px 13px;
  background: var(--bg-sunk);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  word-break: break-all;
  user-select: all;
}
.pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  background: var(--bg-sunk);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
}
.pre code { background: none; padding: 0; color: inherit; }

/* --- 15. Tables ---------------------------------------------------------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); }
.table { font-size: 14px; min-width: 520px; }
.table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}
.table td { padding: 12px 14px; border-top: 1px solid var(--border); color: var(--text-2); vertical-align: top; }
.table tbody tr:first-child td { border-top: 0; }
.table .mono { font-family: var(--mono); font-size: 13px; color: var(--text); }
.table .num  { font-family: var(--mono); color: var(--text); }
.table .right { text-align: right; }

/* --- 16. Definition list (API params) ------------------------------------ */
.req  { color: var(--danger); font-size: 12px; font-weight: 600; }
.opt  { color: var(--text-3); font-size: 12px; font-weight: 600; }

/* --- 17. FAQ ------------------------------------------------------------- */
.faq { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.faq + .faq { margin-top: 10px; }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 550;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 9px; height: 9px;
  border-right: 1.5px solid var(--text-3);
  border-bottom: 1.5px solid var(--text-3);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--t);
}
.faq[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq[open] summary { color: var(--text); }
.faq__body {
  padding: 0 18px 18px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
  max-width: var(--measure);
}
.faq__body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* --- 18. Modal ----------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(38, 33, 28, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity var(--t);
}
.modal[hidden] { display: none; }
.modal.is-open { opacity: 1; }
.modal__panel {
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 60px -12px rgba(38, 33, 28, 0.22);
  transform: translateY(6px) scale(0.99);
  transition: transform var(--t);
}
.modal.is-open .modal__panel { transform: none; }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal__head h2 { font-size: 16px; }
.modal__head p  { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.modal__close {
  flex: none;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border: 0; border-radius: var(--r-sm);
  background: none;
  color: var(--text-3);
  cursor: pointer;
  transition: background var(--t), color var(--t);
}
.modal__close:hover { background: var(--surface-3); color: var(--text); }

.qr { display: grid; justify-items: center; gap: 10px; margin: 0; }
.qr img {
  width: 180px; height: 180px;
  object-fit: contain;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.qr figcaption {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-3);
  text-align: center;
  max-width: 34ch;
}
.qr figcaption strong { color: var(--text-2); }

.copyrow {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: var(--bg-sunk);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.copyrow + .copyrow { margin-top: 10px; }
.copyrow__label { font-size: 12px; color: var(--text-3); }
.copyrow__body { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.copyrow__body > :first-child { min-width: 0; }
.copyrow__value {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
  word-break: break-all;
  user-select: all;
}
.copyrow__value--lead { font-size: 17px; color: var(--accent); }

.status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-size: 13px;
  color: var(--text-2);
}
.status-strip__timer { font-family: var(--mono); color: var(--text); }

.spinner {
  width: 13px; height: 13px;
  flex: none;
  border: 1.5px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 99px;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.result-mark {
  width: 44px; height: 44px;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 99px;
  background: var(--ok-wash);
  border: 1px solid var(--ok-line);
  color: var(--ok);
}

/* --- 19. Toast ----------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 70;
  transform: translate(-50%, 12px);
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  box-shadow: 0 12px 32px -8px rgba(38, 33, 28, 0.20);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t), transform var(--t);
}
.toast.is-open { opacity: 1; transform: translate(-50%, 0); }

/* 页脚：三栏链接 + 免责声明 */
.site-footer__grid {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  padding-block: 44px 32px;
}
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer__brand { display: grid; gap: 10px; align-content: start; }
.site-footer__brand p { max-width: 30ch; }
.site-footer__col { display: grid; gap: 9px; align-content: start; font-size: 14px; }
.site-footer__col h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 2px;
}
.site-footer__col a { color: var(--text-2); }
.site-footer__col a:hover { color: var(--text); }
.site-footer__note { font-size: 12px; color: var(--text-3); max-width: 68ch; line-height: 1.6; }

/* --- 20. CTA & footer ---------------------------------------------------- */
.cta > div { min-width: 0; }
.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.cta h2 { font-size: 18px; }
.cta p  { font-size: 14px; color: var(--text-2); margin-top: 4px; }
@media (max-width: 640px) { .cta { flex-direction: column; align-items: flex-start; } }

.site-footer {
  flex: none;
  border-top: 1px solid var(--border);
  background: var(--bg-sunk);
  font-size: 13px;
  color: var(--text-3);
}
.site-footer__bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-block: 18px 28px;
  font-size: 13px;
  color: var(--text-3);
}
.site-footer a:hover { color: var(--text-2); }

/* --- 21. Auth ------------------------------------------------------------ */
.auth { flex: 1 0 auto; display: grid; place-items: center; padding: 48px 20px; }
.auth__card { width: 100%; max-width: 380px; }
.auth__brand { text-align: center; margin-bottom: 28px; }
.auth__brand img { width: 44px; height: 44px; margin: 0 auto 14px; border-radius: var(--r-md); border: 1px solid var(--border); }
.auth__brand h1 { font-size: 19px; }
.auth__brand p  { font-size: 14px; color: var(--text-2); margin-top: 4px; }

.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.checkbox input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }

/* --- 22. Utilities (deliberately few) ------------------------------------ */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted     { color: var(--text-3); }
.mono      { font-family: var(--mono); }
.text-sm   { font-size: 13px; }
.accent    { color: var(--accent); }
.ok        { color: var(--ok); }
