/* ═══════════════════════════════════════════════════════════════════════
   整点科技 · 站点样式（单一样式入口）

   方向：editorial-monocle（无圆角卡片、无阴影、无原始 hex）
   页面：index / product / quote / 404 —— 本文件是全站唯一的样式表，
        页面内不再持有 <style> 块。

   级联约定
   ─────────────────────────────────────────────────────────────────────
   1. 通用区块（tokens → reset → 布局 → 排版 → chrome → 组件）在前，
      页面专属区块居中，页面差异覆盖（body.page-*）在后，
      媒体查询统一压在文末，按 980 → 920 → 720 → 420 降序。
   2. 同一选择器只允许出现一次；页面之间真正不同的地方，
      一律登记到「页面差异覆盖」一节，不靠级联先后蒙对。
   3. 窄屏下拉断点 920px 与 nav.js 中的 MQ 常量严格一致，改动需同步。
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── tokens ─────────────────────────────────────────────────────────
   Direction: editorial-monocle (bound verbatim). No raw hex below. */
:root {
  --bg:      oklch(98% 0.004 95);
  --surface: oklch(100% 0.002 95);
  --fg:      oklch(20% 0.018 70);
  --muted:   oklch(48% 0.012 70);
  --border:  oklch(90% 0.006 95);
  --accent:  oklch(52% 0.10 28);

  /* derived — do not change */
  --accent-soft: color-mix(in oklch, var(--accent) 14%, transparent);
  --fg-soft:     color-mix(in oklch, var(--fg) 6%, transparent);

  /* type — display = serif, body = sans, mono for metadata */
  --font-display: 'Iowan Old Style', 'Charter', Georgia,
    'Songti SC', 'Noto Serif CJK SC', 'SimSun', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI',
    'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
    system-ui, sans-serif;
  --font-mono: ui-monospace, 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* scale */
  --fs-h1: clamp(44px, 6vw, 76px);
  --fs-h2: clamp(32px, 4vw, 48px);
  --fs-h3: 22px;
  --fs-lead: 19px;
  --fs-body: 16px;
  --fs-meta: 13px;

  /* spacing — 8-point grid */
  --gap-xs: 8px;
  --gap-sm: 12px;
  --gap-md: 20px;
  --gap-lg: 32px;
  --gap-xl: 56px;
  --gap-2xl: 96px;
  --container: 1120px;
  --gutter: 32px;

  /* editorial posture: no rounded cards, no shadows */
  --radius: 0;
  --radius-lg: 0;
}

/* ─── reset & base ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; }
[hidden] { display: none !important; }

/* bilingual visibility — zh is default; JS toggles root class */
.t.en { display: none; }
html.lang-en .t.en { display: inline; }
html.lang-en .t.zh { display: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ─── layout primitives ───────────────────────────────────────────── */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(48px, 8vw, var(--gap-2xl)); }
.section + .section { border-top: 1px solid var(--border); }
.stack { display: flex; flex-direction: column; }
.stack > * + * { margin-top: var(--gap-md); }
.row { display: flex; align-items: center; gap: var(--gap-md); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--gap-md); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap-md); }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: var(--gap-xl); align-items: start; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: var(--gap-xl); align-items: start; }

/* ─── type ────────────────────────────────────────────────────────── */
.h1, h1 { font-family: var(--font-display); font-size: var(--fs-h1); line-height: 1.04; letter-spacing: -0.02em; margin: 0; }
.h2, h2 { font-family: var(--font-display); font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -0.015em; margin: 0; }
.h3, h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; margin: 0; }
.lead   { font-size: var(--fs-lead); line-height: 1.55; color: var(--muted); max-width: 60ch; margin: 0; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--gap-md);
}
.meta { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--muted); }
.num  { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ─── chrome: nav + footer ────────────────────────────────────────── */
.topnav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topnav-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 14px; gap: var(--gap-md); }
.topnav .logo { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.topnav nav { display: flex; gap: var(--gap-lg); }
.topnav nav a { font-size: 14px; color: var(--muted); white-space: nowrap; }
.topnav nav a:hover { color: var(--fg); }
.topnav nav a[aria-current="page"] { color: var(--fg); }
.lang-switch { display: flex; align-items: center; border: 1px solid var(--border); padding: 2px; }
.lang-switch button { border: 0; background: transparent; color: var(--muted); padding: 6px 12px; font-size: 13px; font-family: var(--font-body); }
.lang-switch button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.lang-switch button:hover { color: var(--fg); }

/* 桌面态：.nav-panel 只是逻辑分组（display:contents 让 nav / 操作区仍排在同一行），
   汉堡按钮不出现；窄屏见文末 @media 下拉样式。 */
.nav-panel { display: contents; }
.nav-toggle { display: none; }

.pagefoot { padding-block: var(--gap-xl); color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); }
.pagefoot .row-between { flex-wrap: wrap; gap: var(--gap-md); }

/* ─── buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform 0.05s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--surface); border-color: var(--accent); }
.btn-primary:hover { background: color-mix(in oklch, var(--accent) 88%, black); border-color: color-mix(in oklch, var(--accent) 88%, black); color: var(--surface); }
.btn-secondary { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--fg); }
.btn-ghost { background: transparent; color: var(--fg); border-color: transparent; padding-inline: 8px; }
.btn-ghost:hover { color: var(--accent); }
.btn-block { width: 100%; justify-content: center; }
.btn-arrow::after { content: '→'; transition: transform 0.15s ease; }
.btn-arrow:hover::after { transform: translateX(2px); }
.btn-prev::before { content: '←'; transition: transform 0.15s ease; }
.btn-prev:hover::before { transform: translateX(-2px); }
.btn:disabled {
  color: var(--muted);
  border-color: var(--border);
  background: transparent;
  cursor: not-allowed;
  opacity: 0.55;
}
.btn:disabled:hover { border-color: var(--border); }
.btn:disabled::before, .btn:disabled::after { transform: none; }

/* ─── card / surface ──────────────────────────────────────────────── */
.card-rule { background: transparent; border: 0; border-top: 1px solid var(--fg); padding: 24px 0 0; }

/* ─── feature cell ────────────────────────────────────────────────── */
.feature .feature-mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  margin-bottom: var(--gap-md);
}
.feature .feature-mark svg { width: 18px; height: 18px; }
.feature h3 { margin-bottom: 6px; }
.feature p  { margin: 0; color: var(--muted); font-size: 15px; }

/* ─── step cell (four-step process) ───────────────────────────────── */
.step { border-top: 1px solid var(--fg); padding-top: 20px; }
.step-no { display: block; font-family: var(--font-mono); font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.step h3 { margin-bottom: 8px; }
.step p  { margin: 0; color: var(--muted); font-size: 15px; }

/* ─── testimonial（类名 .quote 是「引用块」组件，与 quote 页面无关） ── */
.quote {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.32;
  letter-spacing: -0.01em;
  max-width: 28ch;
}
.quote-author { color: var(--muted); font-size: 14px; margin-top: var(--gap-md); }
.quote-mark   {
  font-family: var(--font-display);
  font-size: 140px; line-height: 0.7;
  color: var(--accent); opacity: 0.18;
  margin-bottom: -28px;
}

/* ─── tag ─────────────────────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center;
  padding: 6px 14px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
}

/* ─── image placeholder (editorial slot, honest label) ────────────── */
.ph-img {
  background:
    linear-gradient(135deg, var(--accent-soft), var(--fg-soft)),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 10;
  display: grid; place-items: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.ph-img.wide { aspect-ratio: 16 / 9; }
.hero-photo-frame { overflow: hidden; }
/* hero 图片下的图注小字（重庆塑协走访） */
.hero-photo { margin: 0; }
.photo-cap { margin: 10px 0 0; font-size: 12px; letter-spacing: 0.02em; color: var(--muted); }
.ph-img > img { width: 100%; height: 100%; object-fit: cover; }

/* ─── hero ────────────────────────────────────────────────────────── */
.hero { padding-block: clamp(64px, 10vw, 128px); }
.hero h1 { margin-bottom: var(--gap-md); }
.hero .lead { margin-bottom: var(--gap-lg); }
.hero-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-2xl); align-items: center; }
.hero-cta { display: inline-flex; gap: var(--gap-sm); flex-wrap: wrap; }

/* ═══ page: product ═══════════════════════════════════════════════════ */
/* ─── product card (3:2 landscape) ────────────────────────────────── */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.product-card .card-media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--fg-soft);
}
.product-card .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}
.product-card:hover .card-media img { transform: scale(1.025); }
.product-card .card-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--gap-sm);
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}
.product-card .card-name {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: color 0.15s ease;
}
.product-card:hover .card-name { color: var(--accent); }
.product-card .card-no {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ─── pagination ──────────────────────────────────────────────────── */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
  flex-wrap: wrap;
  padding-top: var(--gap-lg);
}
.pager .pager-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pager .pager-btns { display: flex; gap: var(--gap-sm); }

/* page-change fade */
#product-grid { transition: opacity 0.14s ease; }
#product-grid.is-fading { opacity: 0; }

/* ═══ page: quote（表单页） ═══════════════════════════════════════════ */
/* ─── hero facts ──────────────────────────────────────────────────── */
.hero-facts { display: flex; flex-wrap: wrap; gap: 0 var(--gap-lg); border-top: 1px solid var(--fg); padding-top: 16px; }
.hero-facts div { font-size: 14px; color: var(--muted); padding-block: 4px; }
.hero-facts strong { display: block; color: var(--fg); font-weight: 600; }

/* ─── form: fieldsets & fields ────────────────────────────────────── */
fieldset { border: 0; margin: 0; padding: 0; }
fieldset + fieldset { margin-top: var(--gap-xl); padding-top: var(--gap-xl); border-top: 1px solid var(--fg); }
legend { display: flex; align-items: baseline; gap: 12px; padding: 0; font-size: inherit; }
legend .no { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
legend .ti { font-family: var(--font-display); font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }
.legend-note { margin: 8px 0 var(--gap-lg); color: var(--muted); font-size: 15px; max-width: 58ch; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .group-label { font-size: 13px; color: var(--muted); }
.field .req { color: var(--fg); font-family: var(--font-mono); }
.input, .textarea, .select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--fg);
  font: inherit; font-size: 15px;
}
.input::placeholder, .textarea::placeholder { color: color-mix(in oklch, var(--muted) 88%, transparent); }
.input:focus, .textarea:focus, .select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.input:hover, .textarea:hover, .select:hover { border-color: color-mix(in oklch, var(--fg) 28%, var(--border)); }
.textarea { min-height: 112px; resize: vertical; line-height: 1.55; }
.select-wrap { position: relative; }
.select { appearance: none; padding-right: 38px; }
.select-wrap::after {
  content: '▾'; position: absolute; right: 13px; top: 50%;
  transform: translateY(-50%); color: var(--muted); font-size: 12px; pointer-events: none;
}
.hint { font-size: 12.5px; color: var(--muted); }
.err { font-size: 12.5px; color: var(--accent); font-family: var(--font-mono); display: none; }
.err.show { display: block; }
.field[data-invalid="true"] .err { display: block; }
.field[data-invalid="true"] .input,
.field[data-invalid="true"] .textarea,
.field[data-invalid="true"] .select { border-color: var(--accent); }
.suffix {
  display: flex; align-items: stretch;
  border: 1px solid var(--border); background: var(--surface);
}
.suffix:focus-within { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
.suffix .input { border: 0; background: transparent; }
.suffix .input:focus { outline: 0; }
.suffix span {
  display: grid; place-items: center; padding-inline: 14px;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  border-left: 1px solid var(--border); background: var(--fg-soft);
}

/* ─── form: choice cards (single select) ──────────────────────────── */
.choices { display: grid; gap: var(--gap-sm); }
.choices.cols-3 { grid-template-columns: repeat(3, 1fr); }
.choices.cols-2 { grid-template-columns: repeat(2, 1fr); }
.choice {
  position: relative; display: block; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface);
  padding: 16px 16px 15px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice .code {
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.06em; display: block; margin-bottom: 8px;
}
.choice .ti { display: block; font-size: 15.5px; font-weight: 600; letter-spacing: -0.005em; }
.choice .de { display: block; margin-top: 5px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.choice:hover { border-color: var(--fg); }
.choice:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice.is-on { border-color: var(--fg); background: var(--fg-soft); box-shadow: inset 0 0 0 1px var(--fg); }
.choice.is-on .code { color: var(--fg); }
.choice.is-on::after {
  content: '✓'; position: absolute; top: 14px; right: 14px;
  font-family: var(--font-mono); font-size: 12px; color: var(--fg);
}

/* ─── form: chips (multi select) ──────────────────────────────────── */
.chipset { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; font-size: 13.5px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.chip:hover { border-color: var(--fg); color: var(--fg); }
.chip[aria-pressed="true"] {
  border-color: var(--fg); color: var(--fg); background: var(--fg-soft); font-weight: 500;
}
.chip[aria-pressed="true"]::before { content: '✓'; font-family: var(--font-mono); font-size: 11px; }

/* ─── form: stepper ───────────────────────────────────────────────── */
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--border); width: max-content; }
.stepper button {
  width: 44px; border: 0; background: var(--surface); color: var(--fg);
  font-family: var(--font-mono); font-size: 16px;
}
.stepper button:hover { background: var(--fg-soft); }
.stepper button:disabled { color: color-mix(in oklch, var(--muted) 55%, transparent); background: var(--surface); cursor: not-allowed; }
.stepper input {
  width: 64px; border: 0; border-inline: 1px solid var(--border);
  background: var(--surface); color: var(--fg); text-align: center;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 15px;
}
.stepper input:focus { outline: 2px solid var(--accent-soft); outline-offset: -2px; }

/* ─── checkbox line ───────────────────────────────────────────────── */
.checkline { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--muted); cursor: pointer; }
.checkline input { appearance: none; width: 18px; height: 18px; flex: none; margin-top: 2px;
  border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; }
.checkline input:hover { border-color: var(--fg); }
.checkline input:checked { background: var(--fg); border-color: var(--fg); }
.checkline input:checked::after { content: '✓'; color: var(--bg); font-size: 12px; font-family: var(--font-mono); }
.checkline input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ─── summary rail ────────────────────────────────────────────────── */
.rail { position: sticky; top: 84px; }
.rail-card { border: 1px solid var(--fg); background: var(--surface); }
.rail-head { padding: 18px 20px; border-bottom: 1px solid var(--border); }
.rail-head h2 { font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.rail-body { padding: 18px 20px 22px; }
.prog { display: grid; gap: 7px; margin-bottom: 20px; }
.prog div { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.03em; color: var(--muted); }
.prog div[data-done="true"] { color: var(--fg); }
.prog div::after { content: '○'; }
.prog div[data-done="true"]::after { content: '●'; }
.sum { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.sum li { display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.sum li dt, .sum .k { color: var(--muted); font-size: 12.5px; flex: none; }
.sum .v { text-align: right; font-weight: 500; }
.sum .v.empty { color: var(--muted); font-weight: 400; }
.rail-note { margin: 16px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* ─── table ───────────────────────────────────────────────────────── */
.ds-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ds-table th, .ds-table td { padding: 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.ds-table th { color: var(--muted); font-weight: 500; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.ds-table tbody tr:hover { background: var(--fg-soft); }
.ds-table td:first-child { font-weight: 600; }
.ds-table .thin { color: var(--muted); }

/* ─── log rows (FAQ) ──────────────────────────────────────────────── */
.log-row { border-top: 1px solid var(--border); padding: 22px 0; }
.log-row:first-of-type { border-top: 1px solid var(--fg); }
.log-row h3 { font-size: 19px; margin-bottom: 6px; }
.log-row p { margin: 0; color: var(--muted); font-size: 15px; max-width: 68ch; }
.log-row .meta { display: block; margin-bottom: 8px; }

/* ─── result panel ────────────────────────────────────────────────── */
.result { border: 1px solid var(--fg); background: var(--surface); padding: 28px; }
.result-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.result h2 { font-family: var(--font-display); font-size: 28px; font-weight: 600; margin: 0; letter-spacing: -0.015em; }
.ref { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em;
  border: 1px solid var(--fg); padding: 6px 12px; }
pre.rfq {
  margin: 0; padding: 20px; background: var(--bg);
  border: 1px solid var(--border); overflow-x: auto;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.65; color: var(--fg);
}
.result-actions { display: flex; flex-wrap: wrap; gap: var(--gap-sm); margin-top: 20px; }
.flag { display: inline-flex; gap: 8px; align-items: center; font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.flag::before { content: ''; width: 8px; height: 8px; background: var(--fg); flex: none; }

/* ─── commitments band ────────────────────────────────────────────── */
.band { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ═══ page: 404 ═══════════════════════════════════════════════════════ */
.notfound {
  flex: 1;
  display: grid; place-items: center;
  text-align: center;
  padding: clamp(64px, 12vh, 120px) var(--gutter);
}
.notfound-inner { max-width: 46ch; }
.code {
  display: block;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(120px, 22vw, 240px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--fg);
  margin-bottom: var(--gap-lg);
}
.title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12; letter-spacing: -0.015em;
  margin: 0 0 var(--gap-md);
}
.back {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--fg);
  font-size: 15px; font-weight: 500; letter-spacing: -0.005em;
  transition: transform 0.05s ease, border-color 0.15s ease, background 0.15s ease;
}
.back:hover { background: var(--fg); color: var(--surface); }
.back:active { transform: translateY(1px); }
.back::after { content: '→'; transition: transform 0.15s ease; }
.back:hover::after { transform: translateX(2px); }

/* ═══ 页面差异覆盖（page-scoped overrides） ═══════════════════════════
   这里是页面之间「真正不同」的唯一登记处。每条都必须说明为什么这页不一样；
   新增页面差异请写在这里，不要塞回通用区块，也不要靠级联先后顺序生效。
   页面标记：<body class="page-index|page-product|page-quote|page-404"> */

/* 404：独立版式 —— 满屏居中，footer 沉底，header 不吸顶 */
body.page-404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.page-404 p { margin: 0; }
body.page-404 .topnav { position: static; background: transparent; backdrop-filter: none; }
body.page-404 .lead { font-size: 17px; max-width: 42ch; margin: 0 auto var(--gap-lg); }
body.page-404 .pagefoot { padding-block: var(--gap-lg); }

/* quote：表单页信息密度高，标题与 hero 高度整体收一档 */
body.page-quote {
  --fs-h1: clamp(40px, 5.4vw, 68px);
  --fs-h2: clamp(30px, 3.6vw, 44px);
}
body.page-quote .hero { padding-block: clamp(56px, 8vw, 104px); }
body.page-quote .topnav nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--fg); }

/* product：hero 下方紧接产品网格，说明文字不再留下间距 */
body.page-product .hero .lead { margin-bottom: 0; }

/* ═══ responsive ══════════════════════════════════════════════════════
   降序排列：越窄的断点越靠后，后者胜出的直觉与移动优先一致。 */

/* 980 —— quote 专用：两栏 / 侧栏塌成单列。
   与 920 的「导航跨屏」是两件事，故不并档。 */
@media (max-width: 980px) {
  body.page-quote .grid-2,
  body.page-quote .grid-3,
  body.page-quote .grid-2-1,
  body.page-quote .grid-1-2 { grid-template-columns: 1fr; }
  body.page-quote .choices.cols-3,
  body.page-quote .choices.cols-2 { grid-template-columns: 1fr; }
}

/* 920 —— 网格塌单列 + 窄屏下拉导航（断点与 nav.js 的 MQ 严格一致） */
@media (max-width: 920px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-split { grid-template-columns: 1fr; }

  /* header 只留 logo + 汉堡按钮；导航、语言切换、CTA 收进贴在下方的面板 */
  .nav-toggle {
    position: relative;
    display: inline-flex; align-items: center; gap: 9px;
    border: 1px solid var(--border); background: transparent; color: var(--fg);
    padding: 10px 13px; font-size: 13px; line-height: 1; white-space: nowrap;
  }
  .nav-toggle:hover { border-color: var(--fg); }
  /* 三横线 ⇄ 叉号，纯 CSS，无图标依赖 */
  .nav-toggle-icon { position: relative; width: 16px; height: 2px; background: currentColor; flex: none; }
  .nav-toggle-icon::before, .nav-toggle-icon::after {
    content: ''; position: absolute; left: 0; width: 16px; height: 2px;
    background: currentColor; transition: top .18s ease, transform .18s ease;
  }
  .nav-toggle-icon::before { top: -5px; }
  .nav-toggle-icon::after  { top: 5px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-icon { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-icon::before { top: 0; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-icon::after  { top: 0; transform: rotate(-45deg); }
  /* 「菜单 ⇄ 关闭」文案互换：!important 用于压过 .t.zh / .t.en 的语言显隐规则 */
  .nav-state-open { display: none !important; }
  .nav-toggle[aria-expanded="true"] .nav-state-open   { display: inline !important; }
  .nav-toggle[aria-expanded="true"] .nav-state-closed { display: none !important; }

  .nav-panel {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; left: 0; right: 0; z-index: 1;
    max-height: calc(100vh - 62px);
    max-height: calc(100dvh - 62px);
    overflow-y: auto;
    padding: 0 var(--gutter);
    background: var(--bg);
    border-bottom: 1px solid var(--fg);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
  }
  .topnav.nav-open .nav-panel {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity .18s ease, transform .18s ease;
  }
  .topnav nav { display: block; padding-top: 6px; }
  .topnav nav a {
    display: block; padding: 15px 0; font-size: 16px; color: var(--fg);
    border-top: 1px solid var(--border); white-space: normal;
  }
  .topnav nav a:first-child { border-top: 0; }
  .topnav nav a:hover { color: var(--accent); }
  .nav-actions { padding: 14px 0 18px; border-top: 1px solid var(--border); }
  .nav-actions .btn { flex: 1; justify-content: center; }
}

/* 720 —— quote 的价格表转为竖排卡片（表头隐藏，用 data-th 复述列名） */
@media (max-width: 720px) {
  .ds-table thead { display: none; }
  .ds-table tr { display: grid; gap: 4px; border-bottom: 1px solid var(--fg); padding: 14px 0; }
  .ds-table td { border: 0; padding: 0; }
  .ds-table td::before {
    content: attr(data-th) ' '; font-family: var(--font-mono); font-size: 11px;
    text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); display: block;
  }
}

/* 420 —— 极窄屏：header 左右留白收窄，汉堡只留图标 */
@media (max-width: 420px) {
  .topnav-inner { padding-inline: 18px; }
  .topnav .logo { font-size: 17px; }
  .nav-toggle { padding: 10px 11px; }
  /* 文案转为 visually-hidden：不占宽，但仍作为按钮可读名称 */
  .nav-toggle-label {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .nav-panel { padding-inline: 18px; }
}
