/* qc-design.css — P1r tokens + components. Loaded after theme.css.
   Comments must never contain the two-char sequence star-slash. */

:root,
html[data-theme="light"] {
  --qc-surface-ground: #FBFAF9;
  --qc-surface-raise: #FFFFFF;
  --qc-surface-sunk: #F4F1EE;
  --qc-fg: #1A1613;
  --qc-fg-body: #413A34;
  --qc-fg-muted: #6E6660;
  --qc-hairline: rgba(26, 22, 19, 0.10);
  --qc-hairline-strong: rgba(26, 22, 19, 0.18);
  --qc-brand: #D97757;
  --qc-brand-on: #1D1D1F;
  --qc-brand-text: #A8461F;
  --qc-brand-tint: color-mix(in srgb, var(--qc-brand) 7%, var(--qc-surface-ground));
  --qc-brand-hover: #C8674A;
  --qc-hover: rgba(26, 22, 19, 0.04);
  --qc-active: rgba(26, 22, 19, 0.07);
  --qc-bg: var(--qc-surface-ground);
  --qc-bg-subtle: var(--qc-surface-sunk);
  --qc-fg-secondary: var(--qc-fg-muted);
  --qc-fg-tertiary: var(--qc-fg-muted);
  --qc-brand-text-on-tint: #A8461F;
  --qc-ok: #047857;
  --qc-ok-on: #ffffff;
  --qc-warn: #b45309;
  --qc-warn-on: #ffffff;
  --qc-err: #b91c1c;
  --qc-err-on: #ffffff;
  --qc-info: #1d4ed8;
  --qc-info-on: #ffffff;
  --qc-surface-0: var(--qc-surface-ground);
  --qc-surface-1: var(--qc-surface-raise);
  --qc-surface-2: var(--qc-surface-sunk);
}

html[data-theme="dark"] {
  --qc-surface-ground: #0F0D0C;
  --qc-surface-raise: #171412;
  --qc-surface-sunk: #0A0908;
  --qc-fg: #F5F1EE;
  --qc-fg-body: #CFC7C1;
  --qc-fg-muted: #948C85;
  --qc-hairline: rgba(255, 255, 255, 0.11);
  --qc-hairline-strong: rgba(255, 255, 255, 0.20);
  --qc-brand: #E39A82;
  --qc-brand-on: #0F0D0C;
  --qc-brand-text: #E39A82;
  --qc-brand-tint: color-mix(in srgb, var(--qc-brand) 10%, var(--qc-surface-ground));
  --qc-brand-hover: #EDAF9B;
  --qc-hover: rgba(255, 255, 255, 0.06);
  --qc-active: rgba(255, 255, 255, 0.10);
  --qc-bg: var(--qc-surface-ground);
  --qc-bg-subtle: var(--qc-surface-sunk);
  --qc-fg-secondary: var(--qc-fg-muted);
  --qc-fg-tertiary: var(--qc-fg-muted);
  --qc-brand-text-on-tint: #E39A82;
  --qc-ok: #6ee7b7;
  --qc-ok-on: #0F0D0C;
  --qc-warn: #fcd34d;
  --qc-warn-on: #0F0D0C;
  --qc-err: #fca5a5;
  --qc-err-on: #0F0D0C;
  --qc-info: #93c5fd;
  --qc-info-on: #0F0D0C;
  --qc-surface-0: var(--qc-surface-ground);
  --qc-surface-1: var(--qc-surface-raise);
  --qc-surface-2: var(--qc-surface-sunk);
}

html[data-theme="dark"]:has([data-qc-canvas="ink"]) {
  --qc-surface-ground: #0A0A0B;
  --qc-bg: #0A0A0B;
  --qc-surface-0: #0A0A0B;
}

html[data-theme="dark"]:has([data-qc-canvas="black"]) {
  --qc-surface-ground: #000000;
  --qc-bg: #000000;
  --qc-surface-0: #000000;
  --qc-brand-on: #000000;
}

:root {
  --qc-text-display: 56px;
  --qc-text-h1: 38px;
  --qc-text-h2: 24px;
  --qc-text-h3: 17px;
  --qc-text-body: 16px;
  --qc-text-sm: 14px;
  --qc-text-xs: 12px;
  --qc-text-label: 12px;
  --qc-text-base: var(--qc-text-body);
  --qc-text-md: var(--qc-text-h3);
  --qc-text-lg: var(--qc-text-h2);
  --qc-text-xl: var(--qc-text-h1);
  --qc-space-1: 4px;
  --qc-space-2: 8px;
  --qc-space-3: 12px;
  --qc-space-4: 16px;
  --qc-space-5: 24px;
  --qc-space-6: 32px;
  --qc-space-7: 48px;
  --qc-space-8: 64px;
  --qc-rhythm-lg: 96px;
  --qc-rhythm-md: 64px;
  --qc-rhythm-sm: 40px;
  --qc-radius-sm: 6px;
  --qc-radius-md: 12px;
  --qc-radius-full: 9999px;
  --qc-border: 1px solid var(--qc-hairline);
  --qc-shadow-overlay: 0 8px 32px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.08);
  --qc-col-narrow: 680px;
  --qc-col-default: 1200px;
  --qc-col-wide: 1200px;
  --qc-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --qc-dur-color: 120ms;
  --qc-dur-size: 180ms;
  --qc-mono: "JetBrains Mono", ui-monospace, monospace;
  --qc-sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --qc-term-bg: #0B0A09;
  --qc-term-prompt: #7FD4AE;
  --qc-term-cmd: #F2EFEC;
  --qc-term-out: #8A8580;
  --qc-term-hl: #E39A82;
}

@media (max-width: 639px) {
  :root {
    --qc-rhythm-lg: 58px;
    --qc-rhythm-md: 38px;
    --qc-rhythm-sm: 24px;
  }
}

.qc-mono {
  font-family: var(--qc-mono);
  font-variant-numeric: tabular-nums;
}

.qc-label {
  font-size: var(--qc-text-label);
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--qc-fg-muted);
}

.qc-ico {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: block;
}

.qc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--qc-radius-full);
  font-size: var(--qc-text-body);
  font-weight: 500;
  line-height: 1.2;
  padding: 12px 1.4em;
  min-height: 44px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--qc-fg);
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--qc-dur-color) var(--qc-ease),
    border-color var(--qc-dur-color) var(--qc-ease),
    color var(--qc-dur-color) var(--qc-ease);
}
.qc-btn:hover { background: var(--qc-hover); }
.qc-btn:active { background: var(--qc-active); }
.qc-btn:focus-visible {
  outline: 2px solid var(--qc-brand);
  outline-offset: 2px;
}
.qc-btn:disabled,
.qc-btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}
.qc-btn--primary {
  background: var(--qc-brand);
  color: var(--qc-brand-on);
}
.qc-btn--primary:hover {
  background: var(--qc-brand-hover);
  color: var(--qc-brand-on);
}
.qc-btn--secondary {
  background: transparent;
  color: var(--qc-fg);
  border-color: var(--qc-hairline);
}
.qc-btn--secondary:hover { border-color: var(--qc-hairline-strong); }
.qc-btn--ghost { border-color: transparent; }
.qc-btn--sm { font-size: var(--qc-text-sm); padding: 8px 1.4em; }
.qc-btn--lg { font-size: var(--qc-text-h3); padding: 12px 1.4em; }

.qc-card {
  background: var(--qc-surface-raise);
  border: var(--qc-border);
  border-radius: var(--qc-radius-md);
  padding: var(--qc-space-4);
  box-shadow: none;
  transition: background-color var(--qc-dur-color) var(--qc-ease),
    border-color var(--qc-dur-color) var(--qc-ease);
}
.qc-card:hover { border-color: var(--qc-hairline-strong); }
.qc-card--featured {
  background: var(--qc-brand-tint);
  border-color: var(--qc-brand);
  padding: 0;
  overflow: hidden;
}
.qc-card--featured:hover { border-color: var(--qc-brand); }
.qc-panel {
  background: var(--qc-surface-sunk);
  border-radius: var(--qc-radius-md);
  padding: var(--qc-space-4);
}
.qc-divider {
  height: 1px;
  background: var(--qc-hairline);
  border: 0;
}
.qc-list { list-style: none; margin: 0; padding: 0; }
.qc-list-item {
  padding: var(--qc-space-3) 0;
  border-bottom: 1px solid var(--qc-hairline);
}
.qc-list-item:last-child { border-bottom: 0; }
.qc-list-item:hover { background: var(--qc-hover); }

.qc-table { width: 100%; border-collapse: collapse; }
.qc-table th {
  font-size: var(--qc-text-sm);
  font-weight: 500;
  color: var(--qc-fg-muted);
  text-align: left;
  padding: var(--qc-space-2) var(--qc-space-3);
  border-bottom: 1px solid var(--qc-hairline);
  background: var(--qc-surface-sunk);
}
.qc-table td {
  font-size: var(--qc-text-body);
  padding: var(--qc-space-2) var(--qc-space-3);
  border-bottom: 1px solid var(--qc-hairline);
  color: var(--qc-fg-body);
}
.qc-table .qc-num,
.qc-table .qc-mono {
  font-family: var(--qc-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
/* 7 档对照表下方的自定义引导：一句说明 + 一个实心按钮。
   居中是因为它承接整张表的结论，不属于表格的任何一列。 */
.qc-plans-custom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--qc-space-3);
  margin-top: var(--qc-space-5);
}
.qc-plans-custom-note {
  margin: 0;
  font-size: var(--qc-text-sm);
  color: var(--qc-fg-muted);
}

/* 折扣列：整张表里唯一被强调的一列 —— 它是这张表想让人记住的那个数。
   用品牌文字色而非填充，避免把表格变成花的；对比度取自已验算的 --qc-brand-text
   （浅色 #A8461F 最低 5.24，深色 #E39A82 最低 7.40）。 */
.qc-table .qc-savings {
  color: var(--qc-brand-text);
  font-weight: 600;
  white-space: nowrap;
}

.qc-field { display: flex; flex-direction: column; gap: var(--qc-space-1); }
.qc-input {
  border: 1px solid var(--qc-hairline);
  border-radius: var(--qc-radius-sm);
  background: var(--qc-surface-sunk);
  color: var(--qc-fg);
  font-size: var(--qc-text-body);
  padding: var(--qc-space-2) var(--qc-space-3);
}
.qc-input:focus-visible {
  outline: 2px solid var(--qc-brand);
  outline-offset: 2px;
}

.qc-tabs { display: flex; gap: var(--qc-space-4); border-bottom: 1px solid var(--qc-hairline); }
.qc-tab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--qc-fg-muted);
  font-size: var(--qc-text-body);
  font-weight: 500;
  padding: var(--qc-space-2) 0;
  cursor: pointer;
}
.qc-tab[aria-selected="true"],
.qc-tab.is-active {
  color: var(--qc-fg);
  border-bottom-color: var(--qc-brand);
}
.qc-tab:focus-visible {
  outline: 2px solid var(--qc-brand);
  outline-offset: 2px;
}

.qc-badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--qc-text-xs);
  font-weight: 500;
  border-radius: var(--qc-radius-full);
  padding: 2px 8px;
  background: var(--qc-hover);
  color: var(--qc-fg-muted);
}
.qc-badge--ok { color: var(--qc-ok); background: var(--qc-hover); }
.qc-badge--warn { color: var(--qc-warn); background: var(--qc-hover); }
.qc-badge--err { color: var(--qc-err); background: var(--qc-hover); }
.qc-badge--ok,
.qc-badge--warn,
.qc-badge--err,
.qc-badge--brand {
  border-radius: var(--qc-radius-full);
}
.qc-badge--brand {
  background: var(--qc-brand);
  color: var(--qc-brand-on);
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: var(--qc-text-label);
}

.qc-kbd,
.qc-code {
  font-family: var(--qc-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--qc-text-sm);
  background: var(--qc-surface-sunk);
  border-radius: var(--qc-radius-sm);
  padding: 1px 6px;
}

.qc-stat { display: flex; flex-direction: column; gap: 2px; }
.qc-stat-value {
  font-family: var(--qc-mono);
  font-size: var(--qc-text-h1);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.028em;
  font-variant-numeric: tabular-nums;
  color: var(--qc-fg);
}
.qc-stat-label {
  font-size: var(--qc-text-xs);
  color: var(--qc-fg-muted);
}

.qc-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--qc-space-3);
  color: var(--qc-fg-muted);
  font-size: var(--qc-text-body);
}

.qc-skeleton-text,
.qc-skeleton-row,
.qc-skeleton-card,
.qc-skeleton-stat {
  background: var(--qc-hover);
  border-radius: var(--qc-radius-sm);
  position: relative;
  overflow: hidden;
}
.qc-skeleton-text { height: 12px; width: 100%; }
.qc-skeleton-text:last-child { width: 60%; }
.qc-skeleton-row { height: 36px; }
.qc-skeleton-card { height: 120px; border-radius: var(--qc-radius-md); }
.qc-skeleton-stat { height: 56px; width: 120px; }

.qc-wrap {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 32px;
  padding-right: 32px;
  min-width: 0;
}
.qc-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}
.qc-col { width: 100%; margin-left: auto; margin-right: auto; padding-left: 32px; padding-right: 32px; }
.qc-col--default { max-width: 1200px; }
.qc-col--narrow { max-width: var(--qc-col-narrow); }
.qc-col--wide { max-width: 1200px; }

.qc-section { margin-top: 0; }
.qc-section--lg { margin-top: var(--qc-rhythm-lg); }
.qc-section--md { margin-top: var(--qc-rhythm-md); }
.qc-section--sm { margin-top: var(--qc-rhythm-sm); }

.qc-section-title {
  font-size: var(--qc-text-h1);
  font-weight: 700;
  line-height: 1.10;
  letter-spacing: -0.028em;
  color: var(--qc-fg);
  margin: 0 0 var(--qc-space-5);
  text-wrap: balance;
}
.qc-lede {
  font-size: var(--qc-text-body);
  line-height: 1.60;
  color: var(--qc-fg-body);
  max-width: 70ch;
}

html:has(body.qc-page-home) {
  overflow-x: clip;
}
body.qc-page-home {
  background: var(--qc-surface-ground);
  color: var(--qc-fg-body);
  font-family: var(--qc-sans);
  font-size: var(--qc-text-body);
  font-weight: 400;
  line-height: 1.60;
  overflow-x: clip;
  max-width: 100%;
}
body.qc-page-home main {
  padding-bottom: var(--qc-rhythm-lg);
}
body.qc-page-home .text-xs { font-size: var(--qc-text-xs) !important; line-height: 1.45; }
body.qc-page-home .text-sm { font-size: var(--qc-text-sm) !important; line-height: 1.50; }
body.qc-page-home .text-base { font-size: var(--qc-text-body) !important; }
body.qc-page-home .text-lg { font-size: var(--qc-text-h3) !important; }
body.qc-page-home .text-xl { font-size: var(--qc-text-h2) !important; line-height: 1.25; }
body.qc-page-home .text-2xl,
body.qc-page-home .text-3xl { font-size: var(--qc-text-h1) !important; line-height: 1.10; letter-spacing: -0.028em; }
body.qc-page-home .text-4xl,
body.qc-page-home .text-5xl,
body.qc-page-home .text-6xl { font-size: var(--qc-text-display) !important; line-height: 1.05; letter-spacing: -0.032em; }
body.qc-page-home .rounded,
body.qc-page-home .rounded-md,
body.qc-page-home .rounded-lg { border-radius: var(--qc-radius-sm) !important; }
body.qc-page-home .rounded-xl,
body.qc-page-home .rounded-2xl,
body.qc-page-home .rounded-3xl { border-radius: var(--qc-radius-md) !important; }
body.qc-page-home .rounded-full { border-radius: var(--qc-radius-full) !important; }
body.qc-page-home .text-\[10px\],
body.qc-page-home .text-\[11px\] { font-size: var(--qc-text-xs) !important; }
body.qc-page-home .bg-gradient-to-r,
body.qc-page-home .bg-gradient-to-br,
body.qc-page-home .bg-gradient-to-l,
body.qc-page-home .bg-gradient-to-t,
body.qc-page-home .bg-gradient-to-b {
  background-image: none !important;
  background-color: var(--qc-surface-sunk);
}

.qc-hero {
  min-height: 0;
  padding-top: var(--qc-space-8);
  padding-bottom: var(--qc-space-8);
  display: flex;
  align-items: center;
}

/* ── 带背景图的 hero ──────────────────────────────────────────────
   这一区块**恒定深色**，不跟随主题：背景图本身是深底橙粒子，
   左 1/3 实测 RGB(5,3,2) 近乎纯黑、右 1/3 RGB(103,45,31) 是光源。
   强行在浅色主题下翻白会毁掉这张图，所以区块内自带一套固定的文字色变量。
   与页面其余部分的衔接靠底部渐变淡出到 --qc-surface-ground，两个主题都平滑。 */
.qc-hero--imaged {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #0A0A0B;
  padding-top: calc(var(--qc-space-8) + var(--qc-space-6));
  padding-bottom: calc(var(--qc-space-8) + var(--qc-space-7));
  --qc-hero-fg: #F5F1EE;
  --qc-hero-fg-sub: #CFC7C1;
  --qc-hero-brand: #E39A82;
  --qc-hero-line: rgba(255, 255, 255, 0.22);
}
.qc-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}
/* 双层遮罩：横向压暗文字所在的左侧，纵向淡出到页面底色。
   横向那层留到 92% 才完全透明，保证右侧光源不被削掉。
   层序警示：background 列表先写的在上层。③ 底部淡出必须写在 ② 横向压暗之前，
   否则左侧底角处 ②（alpha 0.94）会把 ③ 整个盖住，hero 底边与页面底色硬切
   （P2-0 F2：实测底边上下 2px 色差 136，判据 ≤12）。③ 在上方 58% 完全透明，
   提前不影响文字区压暗。 */
.qc-hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    /* ① 顶部保护带：内页的 navbar 是 fixed 且默认透明（navbar_theme=dark），
       它横跨整幅宽度，右半边正好压在背景图的光源上 —— 不压暗就读不出导航项。
       140px 覆盖 64px 的 navbar 再留一段过渡。首页 navbar 不是 fixed，
       这一层对它只是让顶部稍暗，无害。 */
    linear-gradient(180deg,
      rgba(10, 10, 11, 0.78) 0px,
      rgba(10, 10, 11, 0.46) 72px,
      rgba(10, 10, 11, 0) 140px),
    /* ③ 底部：淡出到页面底色，深浅两主题都平滑衔接（必须在 ② 之上，见层序警示）。
       淡出来得晚（74% 起）：P3-1 后徽章文字行是 hero 的收尾元素，落在 75~85% 高度带，
       58% 起步的线性淡出会在那里堆到 ~50% 白 —— 浅字直接洗没（P3-1 复验实测）。
       74% 起、26% 的窗口完成淡出，底边衔接不变、徽章带保持足够暗。 */
    linear-gradient(180deg,
      rgba(10, 10, 11, 0) 74%,
      var(--qc-surface-ground) 100%),
    /* ② 横向：压暗左侧文字区，留到 92% 才透明以保住右侧光源 */
    linear-gradient(90deg,
      rgba(10, 10, 11, 0.94) 0%,
      rgba(10, 10, 11, 0.86) 34%,
      rgba(10, 10, 11, 0.38) 64%,
      rgba(10, 10, 11, 0) 92%);
}
.qc-hero--imaged .qc-hero-center { align-items: flex-start; text-align: left; }
.qc-hero--imaged .qc-hero-title { color: var(--qc-hero-fg); }
/* 600px 不是拍脑袋：实测四语单行需要 zh 525 / en 574 / ja 564 / ru 520 px，
   取最大值 574 再留 26px 余量。ch 单位在中英日俄之间差异太大（46ch 只有 464px，
   四语全部折成两行），这里必须用绝对值。上限也不能再大 ——
   右侧 900px 之后是背景图的光源区，文字压上去会失去对比。 */
.qc-hero--imaged .qc-hero-sub { color: var(--qc-hero-fg-sub); max-width: 600px; }
.qc-hero--imaged .qc-hero-kicker {
  color: var(--qc-hero-fg-sub);
  border-color: var(--qc-hero-line);
  background: rgba(10, 10, 11, 0.45);
}
.qc-hero--imaged .qc-hero-sell { justify-content: flex-start; }
.qc-hero--imaged .qc-hero-sell-item { color: var(--qc-hero-fg); }
.qc-hero--imaged .qc-hero-sell-item svg { color: var(--qc-hero-brand); }
/* 品牌色在本区块内固定用深色版 #E39A82（对 #0A0A0B 为 8.68:1）——
   浅色主题的 #D97757 打在这张深图上只有 3.12:1，不可用。 */
.qc-hero--imaged .qc-btn--primary {
  background: var(--qc-hero-brand);
  color: #0A0A0B;
}
.qc-hero--imaged .qc-btn--primary:hover { background: #EDAF9B; }
.qc-hero--imaged .qc-btn--secondary {
  color: var(--qc-hero-fg);
  border-color: var(--qc-hero-line);
}
.qc-hero--imaged .qc-btn--secondary:hover { background: rgba(255, 255, 255, 0.10); }
.qc-hero--imaged .qc-hero-hook { color: var(--qc-hero-brand); }
.qc-hero--imaged .qc-hero-hook:hover { color: #EDAF9B; }
.qc-hero--imaged .qc-hero-kicker-dot { background: #22A06B; }

/* ── 彩色语义徽章的对比度修正（全站 .qc-ink 页面通用）────────────
   P0 就发现的系统性缺陷：实心语义色底配白字。实测
     白字 on green-500(34,197,94)    = 2.03:1
     白字 on emerald-500(16,185,129) = 2.26:1
   这两个底色饱和度高、亮度居中，正确做法是配深字而非白字 ——
   与 §4B.5 里「品牌橙底配 --qc-brand-on 深字」同一个道理。
   注意 .bg-green-500 与 .bg-green-500\/10 是两个不同的类名，
   这条规则只命中实心底，不会碰到 /10 /15 /20 这些淡底容器。

   !important 的理由同 navbar 那处：要压过的是 theme.css 的
   `.qc-ink .text-white`（特异性 0,5,0）。第一版没加，深色主题下 4 条纹丝不动。 */
.qc-ink :is(.bg-green-500, .bg-emerald-500),
.qc-ink :is(.bg-green-500, .bg-emerald-500) :is(span, b, strong, div) {
  color: #0F0D0C !important;
}

/* 淡底提示框里的文字：red-400 压在 red-500/10 上只有 2.03:1。
   走已验算的语义 token，深浅两主题各自取值。 */
.qc-ink .text-red-400 { color: var(--qc-err); }

/* indigo-400 再叠 70% 透明度，合成到白底后只有 2.08:1 —— 透明度是隐形杀手：
   同一个色值不带透明时尚可，带上 /70 就掉到不足一半。
   这类「语义色 + 透明度」的写法一律改走不透明的 token。 */
.qc-ink .text-indigo-400\/70,
.qc-ink [class*="text-indigo-400/"] { color: var(--qc-info); }

/* amber 是个例外：--qc-warn 恰好就等于 amber-700(#b45309)，
   改了等于没改（实测仍是 4.16:1，差 0.34）。淡底会把有效对比压低，
   「淡底 + 同色系深字」这种组合必须比常规 warn 再深一档。
   深色主题下 amber-300 本就是浅字压深底，无需干预。 */
html[data-theme="light"] .qc-ink .text-amber-300 { color: #7C3A08; }

/* ── 覆盖式导航条（nav_overlay，P2-2）──────────────────────────────────
   形态（fixed 透明覆盖 / 滚动后毛玻璃）由 nav_overlay 决定，与 navbar_theme
   （body 配色体系）解耦 —— GOAL §2.2。滚动后毛玻璃为 Q2 拍板值：
   浅色 rgba(255,255,255,.72) / 深色 rgba(15,13,12,.8)，两主题五页一致。
   条上文字色不做死：页面顶部没有恒深 hero 时（如 dashboard 浅色主题）必须
   跟随主题色；有 .qc-hero--imaged 压顶且未滚动时才用浅字 —— 用 :has() 自适应，
   P2-3 给内页换上 imaged hero 后浅字自动生效。特异性 0,4,1 起，
   压 theme.css 的 [data-theme] .qc-ink .text-*（0,3,0）无需 !important。 */
.qc-nav-overlay { background: transparent; }
.qc-nav-overlay.is-scrolled {
  background: var(--qc-nav-scrolled-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--qc-nav-scrolled-line);
}
:root, [data-theme="light"] {
  --qc-nav-scrolled-bg: rgba(255, 255, 255, 0.72);
  --qc-nav-scrolled-line: rgba(26, 22, 19, 0.10);
}
[data-theme="dark"] {
  --qc-nav-scrolled-bg: rgba(15, 13, 12, 0.8);
  --qc-nav-scrolled-line: rgba(255, 255, 255, 0.11);
}
/* 条上文字：默认跟随主题正文色（页顶非恒深时唯一正确解） */
.qc-nav-overlay .qc-nav-link { color: var(--qc-fg-body); }
.qc-nav-overlay .qc-nav-link:hover { color: var(--qc-fg); }
.qc-nav-overlay .qc-nav-brand { color: var(--qc-fg); }
/* 恒深 imaged hero 压顶 + 未滚动：浅字（F12 的修复点就在 :not(.is-scrolled) 上） */
body:has(.qc-hero--imaged) .qc-nav-overlay:not(.is-scrolled) .qc-nav-link { color: rgba(255, 255, 255, 0.86); }
body:has(.qc-hero--imaged) .qc-nav-overlay:not(.is-scrolled) .qc-nav-link:hover { color: #ffffff; }
body:has(.qc-hero--imaged) .qc-nav-overlay:not(.is-scrolled) .qc-nav-brand { color: #ffffff; }
/* auth 岛是 /auth/status 服务端片段，加不了类，scoped 选择器代劳（同自适应） */
.qc-nav-overlay :is(#auth-status, #mobile-auth-status) a { color: var(--qc-fg-body); }
.qc-nav-overlay :is(#auth-status, #mobile-auth-status) a:hover { color: var(--qc-fg); }
body:has(.qc-hero--imaged) .qc-nav-overlay:not(.is-scrolled) :is(#auth-status, #mobile-auth-status) a:not([href*="sign-up"]) { color: rgba(255, 255, 255, 0.86); }
body:has(.qc-hero--imaged) .qc-nav-overlay:not(.is-scrolled) :is(#auth-status, #mobile-auth-status) a:not([href*="sign-up"]):hover { color: #ffffff; }
/* 注册按钮：F4 修复 —— §4.1 铁律 2 的合规组合 brand 底 + brand-on 字（两主题均 AAA 路径） */
.qc-nav-overlay #auth-status a[href*="sign-up"] { background: var(--qc-brand); color: var(--qc-brand-on); }
.qc-nav-overlay #auth-status a[href*="sign-up"]:hover { background: var(--qc-brand-hover); color: var(--qc-brand-on); }
/* 主题切换按钮本体已是 token 驱动（theme.css），hero 压顶未滚动时给浅色 */
body:has(.qc-hero--imaged) .qc-nav-overlay:not(.is-scrolled) .qc-theme-toggle {
  color: rgba(255, 255, 255, 0.86);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}
/* 骨架屏在恒深 hero 的透明条上要看得见 */
body:has(.qc-hero--imaged) .qc-nav-overlay:not(.is-scrolled) .skeleton { background: rgba(255, 255, 255, 0.14); }


/* ── 内页 hero（pricing / enterprise / partner / models）────────────
   与首页共用 qc-hero--imaged 的图层与遮罩，但标题降到 h1 档(38px)：
   56px 的 display 档是首页独有的，内页与之同级会削掉主页的层级地位。
   下面这组元素类只服务内页 hero 里那些首页没有的内容
   （eyebrow / 平台 chip / 同级页互链 / 锚点导航）。
   颜色一律走 --qc-hero-* 变量并带 fallback，脱离 imaged 语境也不会失色。 */
.qc-hero--inner {
  /* 顶部 112px = 64px(fixed navbar 实测高度) + 48px 呼吸区。
     内页 navbar_theme=dark 时 navbar 脱离文档流覆盖在 hero 上，
     padding 不够会让 kicker/标题被导航压住 —— 原模板的 pt-28 正是 112px，此处对齐。 */
  padding-top: calc(64px + var(--qc-space-7));
  padding-bottom: calc(var(--qc-space-8) + var(--qc-space-4));
}
.qc-hero--inner .qc-hero-title { font-size: var(--qc-text-h1); }

.qc-hero-eyebrow {
  margin: 0 0 var(--qc-space-3);
  font-family: var(--qc-mono);
  font-size: var(--qc-text-xs);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--qc-hero-fg-sub, var(--qc-fg-muted));
}

/* ── 分段控件（P3-1）：同级页互链的正式形态 ─────────────────────────
   三段连体、共用一个外框、当前段实心反色；整体高 32px，明显小于 CTA 的 44px ——
   这个高度差就是信息层级。只有解决方案三页（pricing/enterprise/partner）有。
   当前段是不可点的 span（实心底），其余是链接。 */
.qc-seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  margin-bottom: var(--qc-space-5);
  border: 1px solid var(--qc-hero-line, rgba(255, 255, 255, 0.22));
  border-radius: var(--qc-radius-full);
  max-width: 100%;
}
.qc-seg-item {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 14px;
  border-radius: var(--qc-radius-full);
  font-size: var(--qc-text-xs);
  font-weight: 500;
  line-height: 1;
  color: var(--qc-hero-fg-sub, var(--qc-fg-body));
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--qc-dur-color) var(--qc-ease),
    color var(--qc-dur-color) var(--qc-ease);
}
a.qc-seg-item:hover {
  background: rgba(255, 255, 255, 0.10);
  color: var(--qc-hero-fg, #ffffff);
}
.qc-seg-item.is-current {
  background: var(--qc-hero-fg, #f5f1ee);
  color: #0a0a0b;
  cursor: default;
}

.qc-hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  min-width: 0;
}
.qc-hero-head {
  margin-bottom: var(--qc-space-6);
  min-width: 0;
  width: 100%;
}
.qc-hero-body {
  display: block;
  width: 100%;
  min-width: 0;
}
.qc-hero-title {
  font-size: var(--qc-text-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.032em;
  color: var(--qc-fg);
  margin: 0 0 var(--qc-space-4);
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: normal;
}
.qc-hero-sub {
  font-size: var(--qc-text-body);
  line-height: 1.60;
  color: var(--qc-fg-muted);
  margin: 0;
  max-width: none;
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: normal;
}
.qc-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--qc-space-3);
  margin-bottom: var(--qc-space-5);
  justify-content: center;
}
.qc-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--qc-space-2);
  border: 1px solid var(--qc-hairline);
  border-radius: var(--qc-radius-full);
  padding: 6px 12px;
  margin-bottom: var(--qc-space-4);
  font-family: var(--qc-mono);
  font-size: var(--qc-text-xs);
  font-variant-numeric: tabular-nums;
  color: var(--qc-fg-muted);
  max-width: 100%;
  flex-wrap: wrap;
}
.qc-hero-kicker-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--qc-radius-full);
  background: var(--qc-ok);
  flex: 0 0 8px;
}
.qc-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--qc-space-4);
  align-items: end;
  padding-top: var(--qc-space-4);
  border-top: 1px solid var(--qc-hairline);
  min-width: 0;
}
.qc-hero-copy .qc-hero-hook {
  display: inline-block;
  margin-bottom: var(--qc-space-5);
}
.qc-hero-hook,
.qc-text-link {
  font-size: var(--qc-text-xs);
  font-weight: 500;
  color: var(--qc-brand-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}
.qc-hero-hook { white-space: nowrap; }
.qc-hero-hook:hover,
.qc-text-link:hover {
  color: var(--qc-fg);
  border-bottom-color: currentColor;
}
.qc-hero-hook:focus-visible,
.qc-text-link:focus-visible {
  outline: 2px solid var(--qc-brand);
  outline-offset: 2px;
}
.qc-metric-hint {
  font-size: var(--qc-text-xs);
  color: var(--qc-fg-muted);
  margin: 4px 0 0;
  line-height: 1.45;
}
.qc-metric-unit {
  font-size: var(--qc-text-xs);
  font-weight: 500;
  color: var(--qc-fg-muted);
  margin-left: 4px;
}
.qc-metric-label {
  display: block;
  font-size: var(--qc-text-xs);
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--qc-fg-muted);
  margin-bottom: 4px;
}
.qc-metric-value {
  font-family: var(--qc-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--qc-text-h3);
  font-weight: 500;
  color: var(--qc-fg);
}
.qc-hero-metrics .qc-metric-value {
  font-size: var(--qc-text-h1);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.10;
}
.qc-hero-metrics .qc-metric-label {
  margin-bottom: 0;
  margin-top: 4px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}
.qc-hero-metrics .qc-metric-value--phrase {
  font-size: var(--qc-text-h3);
  font-weight: 600;
  letter-spacing: -0.010em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.qc-term {
  background: var(--qc-term-bg);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--qc-radius-md);
  overflow: hidden;
  color: var(--qc-term-out);
  min-width: 0;
}
.qc-term-bar {
  display: flex;
  align-items: center;
  gap: var(--qc-space-3);
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}
.qc-term-dots {
  display: flex;
  gap: 6px;
}
.qc-term-dots span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: var(--qc-radius-full);
  background: rgba(255, 255, 255, 0.20);
}
.qc-term-title {
  font-family: var(--qc-mono);
  font-size: var(--qc-text-xs);
  font-variant-numeric: tabular-nums;
  color: var(--qc-term-out);
}
pre.qc-term-body,
.qc-term-body {
  margin: 0;
  padding: var(--qc-space-4);
  font-family: var(--qc-mono);
  font-size: var(--qc-text-xs);
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  white-space: pre-wrap;
  overflow-x: auto;
  background: var(--qc-term-bg);
  color: var(--qc-term-out);
  border-radius: 0;
  border: 0;
}
.qc-term-prompt { color: var(--qc-term-prompt); }
.qc-term-cmd { color: var(--qc-term-cmd); }
.qc-term-out { color: var(--qc-term-out); }
.qc-term-hl { color: var(--qc-term-hl); }
.qc-term-ok { color: var(--qc-term-prompt); }
.qc-term-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--qc-term-cmd);
  vertical-align: -2px;
  animation: qc-blink 1s steps(1) infinite;
}
@keyframes qc-blink {
  50% { opacity: 0; }
}

.qc-plan-grid {
  display: flex;
  gap: 24px;
  align-items: stretch;
}
.qc-plan {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.qc-plan--featured {
  flex: 1.28 1 0;
}
.qc-plan-tint {
  background: color-mix(in srgb, var(--qc-brand) 12%, var(--qc-surface-raise));
  padding: var(--qc-space-3) var(--qc-space-4);
  border-bottom: 1px solid var(--qc-brand);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--qc-space-2);
}
.qc-plan-body { padding: var(--qc-space-4); display: flex; flex-direction: column; flex: 1; }
.qc-plan--featured .qc-plan-body { padding: var(--qc-space-5); }
.qc-plan-name {
  font-size: var(--qc-text-h3);
  font-weight: 600;
  letter-spacing: -0.010em;
  color: var(--qc-fg);
  margin: 0 0 var(--qc-space-2);
}
.qc-plan-price {
  font-family: var(--qc-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--qc-text-h2);
  font-weight: 700;
  letter-spacing: -0.018em;
  color: var(--qc-fg);
  margin: 0;
  line-height: 1.15;
}
.qc-plan--featured .qc-plan-price {
  font-size: var(--qc-text-h1);
  letter-spacing: -0.028em;
}
.qc-plan-note {
  font-family: var(--qc-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--qc-text-xs);
  color: var(--qc-fg-muted);
  margin: var(--qc-space-2) 0 var(--qc-space-4);
}
.qc-plan-feats {
  list-style: none;
  margin: 0 0 var(--qc-space-4);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--qc-space-2);
  flex: 1;
}
.qc-plan-feats li {
  display: flex;
  align-items: flex-start;
  gap: var(--qc-space-2);
  font-size: var(--qc-text-sm);
  color: var(--qc-fg-body);
}
.qc-plan-feats .qc-ico { color: var(--qc-fg-muted); margin-top: 2px; }
.qc-plan--featured .qc-plan-feats .qc-ico { color: var(--qc-brand-text); }

.qc-split {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 48px;
  align-items: start;
  min-width: 0;
}
.qc-split > * { min-width: 0; }
.qc-cli-list {
  display: flex;
  flex-direction: column;
  gap: var(--qc-space-3);
  min-width: 0;
}
.qc-cli-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--qc-space-2);
  padding: 8px 12px;
  background: var(--qc-surface-raise);
  border: 1px solid var(--qc-hairline);
  border-radius: var(--qc-radius-md);
  min-width: 0;
  max-width: 100%;
}
.qc-cli-row .qc-code {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
}
.qc-cli-name {
  font-family: var(--qc-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--qc-text-sm);
  color: var(--qc-fg);
  overflow-wrap: anywhere;
}
.qc-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.qc-step {
  background: var(--qc-surface-raise);
  border: 1px solid var(--qc-hairline);
  border-radius: var(--qc-radius-md);
  padding: var(--qc-space-5);
}
.qc-step-num {
  font-family: var(--qc-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--qc-text-xs);
  font-weight: 600;
  letter-spacing: 0.10em;
  color: var(--qc-fg-muted);
  margin-bottom: var(--qc-space-3);
}
.qc-step h3 {
  font-size: var(--qc-text-h3);
  font-weight: 600;
  letter-spacing: -0.010em;
  color: var(--qc-fg);
  margin: 0 0 var(--qc-space-2);
}
.qc-step p {
  margin: 0;
  font-size: var(--qc-text-sm);
  color: var(--qc-fg-body);
}
.qc-step-note {
  margin-top: var(--qc-space-3);
  font-size: var(--qc-text-xs);
  color: var(--qc-fg-muted);
}

.qc-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.qc-metric-card {
  background: var(--qc-surface-raise);
  border: 1px solid var(--qc-hairline);
  border-radius: var(--qc-radius-md);
  padding: var(--qc-space-4);
  min-height: 108px;
}
.qc-metric-card .qc-metric-value {
  font-size: var(--qc-text-h1);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.10;
}

.qc-quotes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.qc-quote {
  background: var(--qc-surface-raise);
  border: 1px solid var(--qc-hairline);
  border-radius: var(--qc-radius-md);
  padding: var(--qc-space-4);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.qc-quote-text {
  font-size: var(--qc-text-sm);
  line-height: 1.50;
  color: var(--qc-fg-body);
  margin: 0 0 var(--qc-space-4);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.qc-quote-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--qc-space-2);
  flex-wrap: wrap;
  min-width: 0;
}
.qc-quote-who {
  font-size: var(--qc-text-xs);
  color: var(--qc-fg);
  font-weight: 500;
  min-width: 0;
  overflow-wrap: anywhere;
}
.qc-quote-loc {
  color: var(--qc-fg-muted);
  font-weight: 400;
  overflow-wrap: anywhere;
}

.qc-trust {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: var(--qc-space-3) 0;
  min-height: 0;
}
.qc-trust-item {
  display: flex;
  align-items: flex-start;
  gap: var(--qc-space-3);
  min-width: 0;
}
.qc-trust-item p {
  margin: 0;
  font-size: var(--qc-text-sm);
  color: var(--qc-fg-body);
  overflow-wrap: anywhere;
}
.qc-trust-item .qc-ico { color: var(--qc-brand-text); margin-top: 2px; }

.qc-mix { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

.qc-lines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--qc-space-5);
  min-width: 0;
}
.qc-line {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--qc-space-2);
  min-width: 0;
  padding: var(--qc-space-4);
  text-decoration: none;
  color: inherit;
}
.qc-line .qc-ico { color: var(--qc-brand-text); }
.qc-line:hover { color: var(--qc-fg); }
.qc-line-name {
  font-size: var(--qc-text-h3);
  font-weight: 600;
  color: var(--qc-fg);
}
.qc-line-desc {
  font-size: var(--qc-text-sm);
  color: var(--qc-fg-muted);
  overflow-wrap: anywhere;
}
.qc-line .qc-text-link { margin-top: var(--qc-space-2); }

.qc-howto {
  margin-top: var(--qc-space-5);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.qc-howto-label {
  margin: 0;
  font-size: var(--qc-text-xs);
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--qc-fg-muted);
}
.qc-howto-cmd {
  display: block;
  font-family: var(--qc-mono);
  font-size: var(--qc-text-xs);
  color: var(--qc-fg);
  background: var(--qc-surface-sunk);
  border-radius: var(--qc-radius-sm);
  padding: 8px 12px;
  overflow-x: auto;
  white-space: nowrap;
  max-width: 100%;
  min-width: 0;
}
.qc-mix-row {
  display: grid;
  grid-template-columns: minmax(0, 9rem) minmax(0, 1fr) 3.5rem;
  gap: var(--qc-space-3);
  align-items: center;
}
.qc-mix-name {
  font-family: var(--qc-mono);
  font-size: var(--qc-text-xs);
  color: var(--qc-fg);
  overflow-wrap: anywhere;
}
.qc-mix-track {
  height: 8px;
  background: var(--qc-surface-sunk);
  border-radius: var(--qc-radius-full);
  min-width: 0;
  overflow: hidden;
}
.qc-mix-fill {
  height: 100%;
  background: var(--qc-brand);
  border-radius: var(--qc-radius-full);
}
.qc-mix-pct {
  font-family: var(--qc-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--qc-text-xs);
  color: var(--qc-fg);
  text-align: right;
}

.qc-pay {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--qc-space-5);
  padding: var(--qc-space-4) var(--qc-space-5);
  background: var(--qc-surface-raise);
  border: 1px solid var(--qc-hairline);
  border-radius: var(--qc-radius-md);
}
.qc-pay-icons {
  display: flex;
  align-items: center;
  gap: var(--qc-space-4);
  color: var(--qc-fg-muted);
}
.qc-pay-icons svg {
  width: 20px;
  height: 20px;
  display: block;
}
.qc-pay-note {
  margin: 0;
  font-size: var(--qc-text-sm);
  color: var(--qc-fg-body);
}

.qc-spark {
  margin-top: var(--qc-space-4);
  display: none;
}
.qc-spark.is-on { display: block; }
.qc-spark-svg {
  display: block;
  width: 100%;
  height: 40px;
}
.qc-spark-line {
  fill: none;
  stroke: var(--qc-brand);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.qc-spark-ends {
  display: flex;
  justify-content: space-between;
  font-family: var(--qc-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--qc-text-xs);
  color: var(--qc-fg);
  margin-top: 4px;
}

/* 页尾 CTA 面板。
   原为 grid-template-columns: 7fr 5fr，但结构里只有一个子元素 ——
   内容被塞进左 7/12、右 5/12 恒空，视觉上就是「整块偏左错位」。
   页尾 CTA 是收口动作，单列居中才是它该有的形态。 */
.qc-cta-panel {
  background: var(--qc-surface-raise);
  border: 1px solid var(--qc-hairline);
  border-radius: var(--qc-radius-md);
  padding: var(--qc-space-7) var(--qc-space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.qc-cta-panel .qc-lede { max-width: 52ch; }
.qc-cta-panel .qc-hero-actions { justify-content: center; }
.qc-cta-panel .qc-section-title { margin-bottom: var(--qc-space-3); }

.qc-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--qc-hairline);
  border-radius: var(--qc-radius-md);
  background: var(--qc-surface-raise);
}
.qc-table-wrap .qc-table { margin: 0; }
.qc-table-wrap .qc-table th:first-child,
.qc-table-wrap .qc-table td:first-child { padding-left: var(--qc-space-4); }
.qc-table-wrap .qc-table th:last-child,
.qc-table-wrap .qc-table td:last-child { padding-right: var(--qc-space-4); }

.qc-debug-switcher {
  font-size: var(--qc-text-xs);
  color: var(--qc-fg-muted);
  padding: var(--qc-space-4) 32px;
  max-width: 1200px;
  margin: var(--qc-space-6) auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--qc-space-3);
}
.qc-debug-switcher a { color: var(--qc-fg-muted); }
.qc-debug-switcher a[aria-current="true"] { color: var(--qc-fg); font-weight: 500; }

body.qc-page-home .probe-ok { color: var(--qc-ok); }
body.qc-page-home .probe-rate { color: var(--qc-brand-text); }
body.qc-page-home .text-qcode-primary,
body.qc-page-home a.text-qcode-primary { color: var(--qc-brand-text); }
body.qc-page-home .text-gray-300 { color: var(--qc-fg-muted) !important; }
body.qc-page-home .text-yellow-800,
body.qc-page-home .text-yellow-900 { color: var(--qc-fg) !important; }
body.qc-page-home .text-green-600,
body.qc-page-home .text-green-400,
body.qc-page-home .text-emerald-400,
body.qc-page-home .text-blue-400 { color: var(--qc-ok); }
body.qc-page-home nav a[href*="#stability"] { display: none !important; }
/* P3-3：此处原有「首页导航项 margin-left:12px !important」—— P1 为塞运行天数徽章的临时压缩，
   徽章早已隐藏，压缩导致首页 12px vs 内页 32px 间距不一致（实测基线）。已删，五页统一 32px。 */
.qc-nav-ico {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: block;
}
.qc-nav-chevron {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  display: block;
  transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1);
}
.qc-nav-chevron.is-open {
  transform: rotate(180deg);
}

.qc-hero-sell {
  list-style: none;
  margin: 0;
  padding: var(--qc-space-4) 0 0;
  border-top: 1px solid var(--qc-hairline);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--qc-space-2);
  width: 100%;
}
/* P3-1：特性徽章就是一行文字 —— 去框、小号、次级色、`·` 分隔，不许再像按钮 */
.qc-hero-sell-item {
  display: flex;
  align-items: center;
  gap: var(--qc-space-2);
  margin: 0;
  font-size: var(--qc-text-xs);
  line-height: 1.45;
  color: var(--qc-fg-muted);
  white-space: nowrap;
}
.qc-hero-sell-item + .qc-hero-sell-item::before {
  content: "·";
  margin-right: var(--qc-space-2);
  opacity: 0.45;
}
.qc-hero-sell-item .qc-ico {
  color: var(--qc-brand-text);
  margin-top: 0;
}
.qc-hero-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--qc-space-2);
  margin: var(--qc-space-5) 0 0;
  font-size: var(--qc-text-xs);
  color: var(--qc-fg-muted);
}
.qc-hero-trust-sep { color: var(--qc-fg-muted); }
.qc-hero-copy .qc-hero-hook { margin-bottom: 0; }

.qc-cap-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--qc-space-4);
}
.qc-cap-grid .qc-metric-value {
  font-size: var(--qc-text-h3);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.qc-cap-spark {
  margin-top: var(--qc-space-4);
  height: 72px;
  max-height: 120px;
}
.qc-cap-spark-svg {
  display: block;
  width: 100%;
  height: 72px;
}

.qc-why {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--qc-space-5);
}
.qc-why-item h3 {
  margin: 0 0 var(--qc-space-2);
  font-size: var(--qc-text-h3);
  font-weight: 600;
  color: var(--qc-fg);
}
.qc-why-item p {
  margin: 0;
  font-size: var(--qc-text-sm);
  line-height: 1.50;
  color: var(--qc-fg-muted);
}

.qc-docs #docs-resources {
  padding-top: var(--qc-space-2);
  padding-bottom: 0;
  background: transparent !important;
  border: 0 !important;
}
.qc-docs #docs-resources .max-w-7xl {
  max-width: 1200px;
  padding-left: 0;
  padding-right: 0;
}
.qc-docs #docs-resources .text-center.mb-10,
.qc-docs #docs-resources .text-center {
  text-align: left;
  margin-bottom: var(--qc-space-5);
}
.qc-docs #docs-resources .max-w-2xl {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}
.qc-docs-fold {
  display: block;
}
.qc-docs-sum {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
@media (min-width: 640px) {
  .qc-docs-inner { display: block !important; }
}
.qc-docs #docs-resources .mb-12,
.qc-docs #docs-resources .mb-8 {
  margin-bottom: var(--qc-space-5) !important;
}
.qc-docs #docs-resources .p-5 {
  padding: var(--qc-space-4);
}
.qc-docs #docs-resources .px-6.py-3 {
  padding: 8px 16px;
}
body.qc-page-home .qc-docs #docs-resources h2,
body.qc-page-home .qc-docs #docs-resources h3,
body.qc-page-home .qc-docs #docs-resources h4,
body.qc-page-home .qc-docs #docs-resources .text-gray-900,
body.qc-page-home .qc-docs #docs-resources .text-gray-800 {
  color: var(--qc-fg) !important;
}
body.qc-page-home .qc-docs #docs-resources p,
body.qc-page-home .qc-docs #docs-resources .text-gray-500,
body.qc-page-home .qc-docs #docs-resources .text-gray-600,
body.qc-page-home .qc-docs #docs-resources .text-white\/60,
body.qc-page-home .qc-docs #docs-resources .text-white\/50,
body.qc-page-home .qc-docs #docs-resources .text-white\/30,
body.qc-page-home .qc-docs #docs-resources .text-gray-300 {
  color: var(--qc-fg-muted) !important;
}
body.qc-page-home .qc-docs #docs-resources a.group {
  background: var(--qc-surface-raise) !important;
  border-color: var(--qc-hairline) !important;
  box-shadow: none !important;
}

@media (max-width: 1023px) {
  .qc-split,
  .qc-cta-panel { grid-template-columns: 1fr; gap: var(--qc-space-6); }
  .qc-hero { min-height: 0; }
}

@media (max-width: 639px) {
  .qc-wrap,
  .qc-col { padding-left: 20px; padding-right: 20px; }
  .qc-hero-title,
  .qc-hero--inner .qc-hero-title { font-size: 34px; letter-spacing: -0.028em; }
  .qc-section-title { font-size: 28px; }
  .qc-plan-grid,
  .qc-steps,
  .qc-metric-grid,
  .qc-quotes,
  .qc-trust,
  .qc-lines,
  .qc-hero-metrics,
  .qc-cap-grid,
  .qc-why { grid-template-columns: 1fr; }
  .qc-pay { flex-direction: column; align-items: flex-start; }
  .qc-mix-row { grid-template-columns: minmax(0, 1fr) 3.5rem; }
  .qc-mix-name { grid-column: 1 / -1; }
  .qc-plan-grid { flex-direction: column; }
  .qc-term { overflow-x: auto; }
  .qc-term-body { min-width: 520px; }
  .qc-secondary { display: none; }
  .qc-line { padding: var(--qc-space-3); gap: 4px; }
  /* 移动端文字占满宽度，横向遮罩失去意义 —— 改为整体压暗 + 纵向淡出；
     图片焦点右移，让左上角文字落在更暗的区域。
     注意：这里的 padding-top 会被同媒体查询尾部的 .qc-hero 规则（同特异性、更靠后）
     覆盖 —— 真正的移动端顶距在那里的 .qc-hero--imaged/.qc-hero--inner 覆盖规则上。 */
  .qc-hero--imaged {
    padding-top: var(--qc-space-7);
    padding-bottom: var(--qc-space-7);
  }
  .qc-hero-bg { object-position: 72% center; }
  .qc-hero-veil {
    background:
      linear-gradient(180deg,
        rgba(10, 10, 11, 0.90) 0%,
        rgba(10, 10, 11, 0.84) 78%,
        var(--qc-surface-ground) 100%);
  }
  .qc-hero--imaged .qc-hero-sell { align-items: flex-start; }
  .qc-hero-sell { flex-direction: column; align-items: center; gap: var(--qc-space-2); }
  .qc-hero-sell-item { min-height: 44px; }
  .qc-docs-sum {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    width: 100%;
    padding: 12px 0;
    font-size: var(--qc-text-h3);
    font-weight: 600;
    color: var(--qc-fg);
    border-bottom: 1px solid var(--qc-hairline);
  }
  .qc-docs-fold:not(.is-open) .qc-docs-inner { display: none; }
  .qc-docs-fold.is-open .qc-docs-inner { display: block; }
  .qc-docs #docs-resources .text-center.mb-10 { display: none; }
  /* P3-3：此处原有「body.qc-page-home a/button { min-height:44px }」—— 已被下方
     (pointer:coarse),(max-width:1023px) 块的全站 44px 规则完全覆盖，首页限定零增量。已删。 */
  .qc-term a,
  .qc-term button { min-height: 0; }
  .qc-text-link,
  .qc-hero-hook {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  footer a,
  footer button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  /* P3-3 泛化：footer 是共享组件，长链接换行需求各页一致 —— 去掉首页限定词 */
  footer { overflow-wrap: anywhere; word-break: break-word; }
  .qc-hero-sell-item { white-space: normal; }
  .qc-hero { padding-top: var(--qc-space-6); padding-bottom: var(--qc-space-6); }
  /* imaged hero 的 fixed navbar 占位：上面的 .qc-hero 规则与本条同特异性且在前，
     不写这条的话 64px 高的透明 navbar 会直接压住 hero 首行（P2-0 F1 实测重叠 32px；
     P2-2 起首页 navbar 也变 overlay，首页 hero 同样需要 —— 故覆盖 .qc-hero--imaged 全体）。
     底距同理必须写在这条里：移动端内容竖排，末个徽章项落在 ~90% 高度带，
     淡出从 78% 起步，112px 底距让末项停在淡出强区之上（P3-1 实测末项 1.77→达标）。 */
  .qc-hero--imaged,
  .qc-hero--inner {
    padding-top: calc(64px + var(--qc-space-6));
    padding-bottom: calc(var(--qc-space-8) + var(--qc-space-7));
  }
  /* P3-1：分段控件移动端保持连体、可横滑（藏滚动条）；
     sell 行竖排时不显示 `·` 分隔符 */
  .qc-seg { overflow-x: auto; scrollbar-width: none; }
  .qc-seg::-webkit-scrollbar { display: none; }
  .qc-hero-sell-item + .qc-hero-sell-item::before { content: none; }
  .qc-section-title { margin-bottom: var(--qc-space-3); }
}

/* 触摸设备的点击热区 —— 判据是「输入方式」而不只是「屏幕宽度」。
   原先这批规则只写在 @media (max-width: 639px) 里，于是 768px 平板
   （同样是触摸操作）整个漏掉：实测 iPad 768 有 40 个高度 <40px 的可点击元素。
   两个条件并列：pointer:coarse 覆盖报告粗指针的设备，max-width:1023px 兜住
   那些不报告 coarse 的平板；桌面（宽屏 + fine pointer）不受影响。 */
@media (pointer: coarse), (max-width: 1023px) {
  /* 原先限定 body.qc-page-home，于是只有首页受益 —— 实测 pricing 在 390px
     下仍有 41 个 <40px 的热区。44px 是触摸可用性的底线，对所有页面都成立，
     没有理由只给首页。 */
  a,
  button {
    min-height: 44px;
    box-sizing: border-box;
  }
  /* 终端块内的行不是点击目标，撑高会破坏等宽排版 */
  .qc-term a,
  .qc-term button { min-height: 0; }
  .qc-text-link,
  .qc-hero-hook {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  footer a,
  footer button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .qc-hero-sell-item { min-height: 44px; }
  .qc-docs-sum { min-height: 44px; }
}

@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;
  }
}
/* ── sticky 子导航（P3-2）────────────────────────────────────────
   承接从 hero 移出的页内锚点。未吸顶：透明 + hairline 分隔；
   吸顶：sticky top 64px（主导航正下方），48px 高，主题毛玻璃（Q2 拍板值，
   直接吃 token —— 不借 bg-black/80 这类会被 theme.css 映射的旧 utility，防 F12 重演）。
   当前区块：2px 品牌色下划线（五页统一）。移动端 <768px 不吸顶、可横滑。 */
.qc-subnav {
  position: sticky;
  /* 主导航 h-16=64px + is-scrolled 的 border-b 1px → 底边在 65px；top:64 会压掉那 1px 边（复验实测） */
  top: 65px;
  z-index: 40;
  background: transparent;
  border-bottom: 1px solid var(--qc-hairline);
}
.qc-subnav.is-stuck {
  background: var(--qc-nav-scrolled-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.qc-subnav-inner {
  display: flex;
  align-items: center;
  gap: var(--qc-space-5);
  height: 48px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.qc-subnav-inner::-webkit-scrollbar { display: none; }
.qc-subnav a {
  display: inline-flex;
  align-items: center;
  height: 100%;
  font-size: var(--qc-text-sm);
  color: var(--qc-fg-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--qc-dur-color) var(--qc-ease);
}
.qc-subnav a:hover { color: var(--qc-fg); }
.qc-subnav a.is-active {
  color: var(--qc-fg);
  border-bottom-color: var(--qc-brand);
}
.qc-subnav .qc-subnav-ext {
  margin-left: auto;
  color: var(--qc-brand-text);
}
@media (max-width: 767px) {
  .qc-subnav { position: static; }
}

/* models 页原有的 sticky 家族 tab 条：子导航来了之后让到 112px（64 主导航 + 48 子导航）；
   移动端子导航不吸顶，tab 条回到 64px。 */
.qc-models-tabbar { top: 113px; }
@media (max-width: 767px) {
  .qc-models-tabbar { top: 65px; }
}

/* M1 顺带项：移动端子导航可横滑时的右缘渐隐提示（无 JS 时不出现，渐进增强） */
@media (max-width: 767px) {
  .qc-subnav.is-scrollable .qc-subnav-inner {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), rgba(0, 0, 0, 0.25));
    mask-image: linear-gradient(90deg, #000 calc(100% - 28px), rgba(0, 0, 0, 0.25));
  }
}

/* ── P3-5 B1：dashboard 页头骨架对齐五页 qc 语言 ─────────────────
   范围：pages/dashboard.html hero 区 + components/hero_user_bar.html
   （共享组件，recharge / subscribe 页头同受影响，属预期内外溢）。
   只用既有 token，不新增颜色：
   字号阶  标题 30/24 → text-h1(38)、副标题 14 → text-body(16)、余额 18 → text-h3(17)
   圆角    卡片 8 → radius-md(12)、按钮 8 → radius-full（模板类同步换）
   移动端  用户条整宽平铺（原 self-end 收缩靠右，390px 下四块宽窄不一）。 */
.qc-dash-hero-title {
  font-size: var(--qc-text-h1);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.qc-dash-hero-sub {
  font-size: var(--qc-text-body);
  margin-top: var(--qc-space-2);
}
.qc-dash-action { min-height: 44px; }
.qc-dash-balance { font-size: var(--qc-text-h3); }
@media (max-width: 639px) {
  /* 与五页 .qc-hero-title 移动端同档（本站既有值，非 token）：
     38px 下 ru「Панель управления」会折行，34px 四语单行。 */
  .qc-dash-hero-title { font-size: 34px; letter-spacing: -0.028em; }
  .qc-dash-userbar { align-self: stretch; width: 100%; }
  .qc-dash-userbar > * { width: 100%; }
}

/* ── P3-5 B3：usage_stats 数字统一等宽数字（tabular-nums）────────────
   只加 font-variant-numeric，不改任何字号/颜色/口径。
   元素清单见 REPORTS/phase-p3-5-b2b3.md「数字元素动/未动」一节。 */
.qc-usage-num { font-variant-numeric: tabular-nums; }

/* ── P3-5 B4：dashboard 子导航锚点的吸顶补偿 ─────────────────────
   锚点跳转时让目标顶边避开 64 主导航 + 48 子导航，多留 8px 呼吸。
   docs-resources 与 home 共用，home 无子导航时这条只是更大的余量，无害。 */
.qc-anchor-offset { scroll-margin-top: 120px; }
