/* ==========================================================================
   TENERG Battery Information — 全站样式
   ========================================================================== */
:root {
  --brand-900: #063a2c;
  --brand-800: #08503c;
  --brand-700: #0b6349;
  --brand-600: #0f7a5c;
  --brand-500: #179b76;
  --brand-100: #d6efe5;
  --brand-050: #eef8f3;

  --ink: #0b1a16;
  --ink-2: #2f423c;
  --muted: #6b8078;
  --faint: #93a49d;

  --line: #dde7e2;
  --line-strong: #c8d8d0;
  --bg: #f5f8f7;
  --card: #ffffff;

  --amber-bg: #fdf4e3;
  --amber-fg: #8a5a00;
  --blue-bg: #e9f2fd;
  --blue-fg: #1c4f8f;
  --gray-bg: #eef1ef;
  --gray-fg: #4c5b55;

  --radius-lg: 18px;
  --radius: 13px;
  --radius-sm: 9px;

  --shadow-xs: 0 1px 2px rgba(9, 40, 30, .05);
  --shadow-sm: 0 2px 8px rgba(9, 40, 30, .06), 0 1px 2px rgba(9, 40, 30, .04);
  --shadow-md: 0 10px 30px rgba(9, 40, 30, .09), 0 2px 6px rgba(9, 40, 30, .05);
  --shadow-lg: 0 24px 60px rgba(6, 40, 30, .18);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;

  --max: 1160px;
  --header-h: 66px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 74px); }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand-700); text-decoration: none; }
a:hover { color: var(--brand-600); }
img, svg, canvas { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-100); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); font-feature-settings: "tnum" 1; letter-spacing: -.2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(9, 40, 30, .07); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; }

.logo { display: flex; align-items: center; gap: 11px; color: var(--ink); flex-shrink: 0; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(150deg, var(--brand-600), var(--brand-800));
  display: grid; place-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 2px 6px rgba(6, 58, 44, .28);
}
.logo-mark svg { width: 17px; height: 17px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-name {
  font-size: 15.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
}
.logo-sub { font-size: 10.5px; color: var(--faint); letter-spacing: .04em; }

.header-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.header-nav a {
  padding: 7px 12px; border-radius: 8px; font-size: 13.5px; color: var(--ink-2); font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.header-nav a:hover { background: var(--brand-050); color: var(--brand-800); }
.header-nav a.is-active { color: var(--brand-800); background: var(--brand-050); }

.lang-switch {
  display: flex; padding: 3px; gap: 2px; border-radius: 999px;
  background: #f0f4f2; border: 1px solid var(--line);
}
.lang-switch button {
  padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--muted); transition: all .15s ease;
}
.lang-switch button.is-on { background: #fff; color: var(--brand-800); box-shadow: var(--shadow-xs); }

/* 多语言下拉（6 语精翻 + 欧盟机翻兜底） */
.lang-switch select.lang-select {
  height: 30px; padding: 0 26px 0 12px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%236b8078' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center;
  font-family: var(--font); font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  appearance: none; -webkit-appearance: none; cursor: pointer;
}
/* Google 网页翻译的横幅与占位不占版面 */
.goog-te-banner-frame { display: none !important; }
.goog-te-gadget { height: 0 !important; overflow: hidden !important; }
body { top: 0 !important; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: 9px;
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent; transition: all .16s ease;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(180deg, var(--brand-600), var(--brand-700));
  color: #fff; box-shadow: 0 1px 2px rgba(6, 58, 44, .2), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.btn-primary:hover { background: linear-gradient(180deg, var(--brand-500), var(--brand-600)); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--brand-500); color: var(--brand-800); background: var(--brand-050); }
.btn-quiet { background: transparent; color: var(--muted); }
.btn-quiet:hover { background: var(--brand-050); color: var(--brand-800); }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14.5px; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; display: inline-grid; place-items: center;
  color: var(--brand-700); border: 1px solid var(--line);
  background: #fff; transition: all .15s ease;
}
.icon-btn:hover { border-color: var(--brand-500); background: var(--brand-050); }
.icon-btn svg { width: 17px; height: 17px; }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative;
  background:
    radial-gradient(760px 300px at 8% -10%, rgba(23, 155, 118, .13), transparent 70%),
    radial-gradient(620px 260px at 92% 0%, rgba(11, 99, 73, .1), transparent 72%),
    linear-gradient(180deg, #fbfdfc, var(--bg));
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(11, 99, 73, .045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(11, 99, 73, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(680px 300px at 30% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(680px 300px at 30% 0%, #000 20%, transparent 78%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; padding-top: 46px; padding-bottom: 38px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand-700); background: var(--brand-050);
  border: 1px solid var(--brand-100); border-radius: 999px; padding: 5px 12px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(23, 155, 118, .16);
}
.hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.22; letter-spacing: -.02em; font-weight: 700;
}
.hero h1 .thin {
  display: block; margin-top: 8px;
  font-size: clamp(14px, 1.35vw, 16px); font-weight: 500;
  letter-spacing: .04em; color: var(--muted);
}
.hero-lead {
  margin-top: 16px; max-width: 640px; color: var(--ink-2); font-size: 14.6px; line-height: 1.78;
}
.hero-meta {
  margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 20px;
  font-size: 13px; color: var(--muted);
}
.hero-meta b { color: var(--ink-2); font-weight: 600; }

/* 搜索 */
.search-block { margin-top: 24px; max-width: 620px; }
.search-field {
  position: relative; display: flex; align-items: center;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 12px;
  height: 52px; padding: 0 14px 0 46px;
  box-shadow: var(--shadow-sm);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.search-field:focus-within {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(23, 155, 118, .12), var(--shadow-sm);
}
.search-field svg {
  position: absolute; left: 15px; width: 18px; height: 18px; color: var(--faint);
}
.search-field input {
  flex: 1; height: 100%; border: 0; background: transparent; font-size: 15px; min-width: 0;
}
.search-field input::placeholder { color: var(--faint); }
.search-field input:focus { outline: none; }
.kbd {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px;
  font-family: var(--mono); font-size: 11px; color: var(--muted); background: #fafcfb;
}
.search-clear {
  width: 26px; height: 26px; border-radius: 50%; display: none; place-items: center;
  color: var(--muted); background: #f1f5f3;
}
.search-clear:hover { background: var(--brand-100); color: var(--brand-800); }
.search-field.has-value .search-clear { display: grid; }
.search-field.has-value .kbd { display: none; }

/* 概览数字 */
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; margin-top: 30px; padding: 0;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.stat { background: #fff; padding: 14px 18px; }
.stat-label { font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.stat-value {
  font-family: var(--mono); font-size: 21px; font-weight: 600; color: var(--brand-800);
  letter-spacing: -.5px; line-height: 1.3;
}
.stat-value small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; }

/* 章节标题 */
.sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sec-head h2 { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.sec-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.scope { margin-top: 46px; scroll-margin-top: calc(var(--header-h) + 24px); }
.scope-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.scope-grid .stat { padding: 18px 20px; }
.scope-grid .footer-text { font-size: 12.6px; line-height: 1.7; }

/* ---------------------------------------------------------------- toolbar */
.list-section { padding: 30px 0 70px; }
.toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-bottom: 16px;
}
.filters { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  height: 33px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: #fff;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px; transition: all .15s ease;
}
.chip:hover { border-color: var(--brand-500); color: var(--brand-800); }
.chip.is-on {
  background: var(--brand-700); border-color: var(--brand-700); color: #fff;
  box-shadow: 0 1px 3px rgba(6, 58, 44, .22);
}
.chip .count { font-family: var(--mono); font-size: 11.5px; opacity: .65; }

.toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.result-count { font-size: 13px; color: var(--muted); }
.result-count b { color: var(--ink); font-family: var(--mono); font-weight: 600; }
.sort-select {
  height: 33px; padding: 0 30px 0 11px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b8078' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  font-size: 13px; color: var(--ink-2); appearance: none; -webkit-appearance: none;
}

/* ---------------------------------------------------------------- table */
@media (min-width: 761px) {
  table.list { table-layout: fixed; }
  table.list th:nth-child(1), table.list td:nth-child(1) { width: 27%; }
  table.list th:nth-child(2), table.list td:nth-child(2) { width: 11%; }
  table.list th:nth-child(3), table.list td:nth-child(3) { width: 12%; }
  table.list th:nth-child(4), table.list td:nth-child(4) { width: 9%; }
  table.list th:nth-child(5), table.list td:nth-child(5) { width: 18%; }
  table.list th:nth-child(6), table.list td:nth-child(6) { width: 12%; }
  table.list th:nth-child(7), table.list td:nth-child(7) { width: 11%; }
  table.list td.c-qr { padding-left: 8px; padding-right: 8px; }
}

.table-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
table.list { width: 100%; border-collapse: collapse; }
table.list thead th {
  background: #fbfdfc;
  text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
  padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.list tbody tr { transition: background .14s ease; }
table.list tbody tr:hover { background: var(--brand-050); }
table.list tbody td {
  padding: 15px 16px; border-bottom: 1px solid #eef3f0; vertical-align: middle;
}
table.list tbody tr:last-child td { border-bottom: 0; }

.cell-model { display: flex; flex-direction: column; gap: 3px; }
.model-code { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -.2px; }
.model-code mark { background: #fff5cc; color: inherit; padding: 0 1px; border-radius: 2px; }
.model-note { font-size: 11.5px; color: var(--faint); }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 6px;
  background: var(--brand-050); color: var(--brand-800); border: 1px solid var(--brand-100);
  white-space: nowrap;
}
.tag.neutral { background: #f4f6f5; color: var(--ink-2); border-color: var(--line); }
.cell-num { font-family: var(--mono); font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.cell-dim { color: var(--faint); font-size: 12.5px; }

.row-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.link-detail {
  display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600;
  color: var(--brand-700); padding: 7px 10px; border-radius: 8px; white-space: nowrap;
}
.link-detail:hover { background: var(--brand-050); }
.link-detail svg { width: 14px; height: 14px; transition: transform .16s ease; }
.link-detail:hover svg { transform: translateX(2px); }

.empty {
  padding: 64px 24px; text-align: center;
}
.empty-icon {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 14px;
  display: grid; place-items: center; background: var(--brand-050); color: var(--brand-600);
}
.empty h3 { font-size: 15.5px; margin-bottom: 6px; }
.empty p { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }

.table-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 16px; background: #fbfdfc; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted); flex-wrap: wrap;
}

/* ---------------------------------------------------------------- modal */
.modal {
  position: fixed; inset: 0; z-index: 90; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(6, 26, 21, .48); backdrop-filter: blur(3px);
}
.modal.is-open { display: flex; animation: fade .16s ease; }
.modal-card {
  width: 100%; max-width: 400px; background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 22px; animation: pop .2s cubic-bezier(.2, .8, .3, 1);
}
.modal-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 4px; }
.modal-head h3 { font-size: 15.5px; line-height: 1.4; }
.modal-head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.modal-close { margin-left: auto; color: var(--faint); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.modal-close:hover { background: #f2f5f4; color: var(--ink); }
.qr-frame {
  margin: 16px auto 12px; width: 232px; height: 232px; padding: 12px;
  border-radius: 14px; background: #fff; border: 1px solid var(--line);
  display: grid; place-items: center;
}
.qr-frame canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.qr-model { text-align: center; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); word-break: break-all; }
.qr-url {
  margin-top: 10px; padding: 9px 11px; border-radius: 9px; background: #f7faf8;
  border: 1px solid var(--line); font-family: var(--mono); font-size: 11px;
  color: var(--muted); word-break: break-all; line-height: 1.5;
}
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.modal-actions .btn { width: 100%; }

/* ---------------------------------------------------------------- passport */
.passport-hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(700px 300px at 85% -30%, rgba(23, 155, 118, .5), transparent 65%),
    linear-gradient(140deg, #063a2c 0%, #08503c 46%, #0b6349 100%);
}
.passport-hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(760px 340px at 80% 0%, #000, transparent 76%);
  -webkit-mask-image: radial-gradient(760px 340px at 80% 0%, #000, transparent 76%);
  pointer-events: none;
}
.passport-hero .wrap { position: relative; z-index: 1; padding-top: 20px; padding-bottom: 30px; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: rgba(255, 255, 255, .62); padding: 10px 0 18px; }
.crumb a { color: rgba(255, 255, 255, .78); display: inline-flex; align-items: center; gap: 5px; }
.crumb a:hover { color: #fff; }
.crumb svg { width: 13px; height: 13px; }

.passport-head { display: flex; align-items: flex-start; gap: 28px; flex-wrap: wrap; }
.passport-id { flex: 1 1 380px; min-width: 0; }
.passport-badge {
  display: inline-flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .1em; padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
  color: rgba(255, 255, 255, .9);
}
.passport-id h1 {
  font-family: var(--mono); font-size: clamp(21px, 2.6vw, 30px); font-weight: 600;
  letter-spacing: -.6px; margin: 12px 0 8px; word-break: break-word;
}
.passport-sub { font-size: 13.5px; color: rgba(255, 255, 255, .72); }
.passport-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.passport-chips span {
  font-size: 12px; padding: 3px 10px; border-radius: 6px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .92);
}
.passport-tools { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.passport-tools .btn-ghost {
  background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .26); color: #fff;
}
.passport-tools .btn-ghost:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.passport-tools .btn-primary { background: #fff; color: var(--brand-800); box-shadow: none; }
.passport-tools .btn-primary:hover { background: var(--brand-050); color: var(--brand-900); }

.qr-tile {
  flex: 0 0 auto; width: 150px; padding: 12px; border-radius: 14px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2);
  text-align: center; backdrop-filter: blur(6px);
}
.qr-tile canvas { width: 126px; height: 126px; border-radius: 6px; background: #fff; display: block; margin: 0 auto; }
.qr-tile span { display: block; margin-top: 7px; font-size: 10.5px; letter-spacing: .04em; color: rgba(255, 255, 255, .7); }

/* 关键规格 */
.spec-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; margin-top: 24px;
}
.spec-item { background: #fff; padding: 12px 16px; }
.spec-item dt { font-size: 11.5px; color: var(--muted); }
.spec-item dd { font-family: var(--mono); font-size: 16px; font-weight: 600; color: var(--ink); margin-top: 2px; }

/* 目录 */
.section-nav {
  position: sticky; top: var(--header-h); z-index: 20;
  background: rgba(245, 248, 247, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.section-nav { position: sticky; }
.section-nav::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 1px; width: 42px;
  background: linear-gradient(90deg, rgba(245, 248, 247, 0), rgba(245, 248, 247, .96));
  pointer-events: none;
}
.section-nav .wrap { display: flex; gap: 6px; align-items: center; overflow-x: auto; padding: 10px 24px; scrollbar-width: none; }
.section-nav .wrap::-webkit-scrollbar { display: none; }
.section-nav a {
  flex: 0 0 auto; padding: 6px 12px; border-radius: 8px; font-size: 12.8px;
  color: var(--ink-2); border: 1px solid transparent; white-space: nowrap; transition: all .15s ease;
}
.section-nav a:hover { background: #fff; border-color: var(--line); }
.section-nav a.is-active {
  background: var(--brand-700); color: #fff; border-color: var(--brand-700);
}
.nav-label {
  flex: 0 0 auto; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint); padding-right: 6px; margin-right: 4px; border-right: 1px solid var(--line-strong);
}

/* 章节卡片 */
.passport-body { padding: 26px 0 80px; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.card.wide { grid-column: 1 / -1; }
@media (max-width: 1080px) {
  .cards { grid-template-columns: 1fr; }
}
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs); overflow: hidden; scroll-margin-top: calc(var(--header-h) + 74px);
}
.card-head {
  display: flex; align-items: center; gap: 11px; padding: 15px 20px;
  border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fdfefd, #fbfdfc);
}
.card-icon {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--brand-050); border: 1px solid var(--brand-100); font-size: 15px;
}
.card-head h2 { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.card-head h2 small { display: block; font-size: 11.5px; font-weight: 400; color: var(--faint); letter-spacing: 0; }
.card-body { padding: 6px 20px 18px; }

.pill {
  margin-left: auto; flex-shrink: 0;
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px;
}
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.ready { background: var(--brand-050); color: var(--brand-700); border: 1px solid var(--brand-100); }
.pill.pending { background: var(--amber-bg); color: var(--amber-fg); border: 1px solid #f0e0bd; }
.pill.na { background: var(--gray-bg); color: var(--gray-fg); border: 1px solid var(--line); }
.pill.standard { background: var(--blue-bg); color: var(--blue-fg); border: 1px solid #cfe0f7; }

.spec-table { width: 100%; border-collapse: collapse; }
.spec-table tr + tr { border-top: 1px solid #f0f4f2; }
.spec-table th {
  width: 254px; text-align: left; vertical-align: top;
  padding: 9px 18px 9px 0; font-size: 12.8px; font-weight: 500; color: var(--muted);
}
.spec-table td {
  padding: 9px 0; font-size: 13.2px; color: var(--ink); vertical-align: top;
  word-break: break-word; white-space: pre-line;
}
.spec-table td.mono { font-family: var(--mono); font-size: 12.8px; }

.card p.note { font-size: 13px; color: var(--ink-2); line-height: 1.75; white-space: pre-line; }
.card p.note + p.note { margin-top: 8px; }
.card .muted-line { font-size: 12px; color: var(--faint); margin-top: 10px; }

.notice {
  display: flex; gap: 9px; margin-top: 10px; padding: 10px 13px;
  border-radius: 0 8px 8px 0; border-left: 3px solid; font-size: 12.5px; line-height: 1.65;
  white-space: pre-line;
}
.notice.warn { background: #fffaf0; border-color: #e5a83c; color: #6b4a00; }
.notice.info { background: #f2f8ff; border-color: #4a90e2; color: #17456f; }
.notice.danger { background: #fff5f4; border-color: #e05545; color: #7d2318; }

.doc-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.doc-link {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px;
  border-radius: 8px; border: 1px solid var(--line-strong); background: #fff;
  font-size: 12.8px; font-weight: 500; color: var(--brand-800);
}
.doc-link:hover { border-color: var(--brand-500); background: var(--brand-050); }
.doc-link.is-disabled { color: var(--faint); border-style: dashed; background: #fafcfb; cursor: not-allowed; }
.doc-link.is-disabled:hover { border-color: var(--line-strong); background: #fafcfb; }

.contact-grid { display: grid; gap: 2px; margin-top: 6px; }
.contact-row { display: flex; gap: 14px; padding: 8px 0; border-bottom: 1px solid #f2f5f4; font-size: 13px; }
.contact-row:last-child { border-bottom: 0; }
.contact-row dt { flex: 0 0 128px; color: var(--muted); font-size: 12.5px; }
.contact-row dd { color: var(--ink); word-break: break-word; }
.contact-row dd a { border-bottom: 1px dotted var(--line-strong); }

/* ---------------------------------------------------------------- footer */
.site-footer {
  border-top: 1px solid var(--line); background: #fff; padding: 34px 0 30px;
}
.footer-grid { display: flex; gap: 34px; justify-content: space-between; flex-wrap: wrap; }
.footer-brand { display: flex; gap: 12px; align-items: flex-start; max-width: 420px; }
.footer-brand .logo-mark { width: 30px; height: 30px; border-radius: 9px; }
.footer-brand .logo-mark svg { width: 15px; height: 15px; }
.footer-title { font-size: 13.5px; font-weight: 600; letter-spacing: .02em; }
.footer-text { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-top: 4px; }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-col h4 { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 600; margin-bottom: 8px; }
.footer-col a, .footer-col span { display: block; font-size: 12.8px; color: var(--ink-2); padding: 2px 0; }
.footer-bottom {
  margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap;
  font-size: 11.8px; color: var(--faint);
}

/* ---------------------------------------------------------------- builder */
.builder { padding: 34px 0 70px; }
.builder-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 20px; align-items: start; }
.builder-grid > * { min-width: 0; }
.panel {
  min-width: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.panel-head { padding: 16px 20px; border-bottom: 1px solid var(--line); background: #fbfdfc; }
.panel-head h2 { font-size: 15px; }
.panel-head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.panel-body { padding: 18px 20px 22px; }

.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 5px; }
.field label .req { color: #c0392b; margin-left: 2px; }
.field input[type="text"], .field select, .field textarea {
  width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--line-strong);
  border-radius: 8px; background: #fff; font-size: 13.5px; transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { height: auto; padding: 9px 11px; resize: vertical; min-height: 62px; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(23, 155, 118, .12);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-hint { font-size: 11.5px; color: var(--faint); margin-top: 4px; }

.sticky-side { position: sticky; top: calc(var(--header-h) + 18px); min-width: 0; }
.qr-preview { text-align: center; padding: 6px 0 2px; }
.qr-preview canvas {
  width: 200px; height: 200px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff;
}
.qr-preview .qr-caption { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 8px; word-break: break-all; }

.code-out {
  min-width: 0; margin-top: 14px; border-radius: 10px; border: 1px solid var(--line);
  background: #0d2420; color: #d6e9e1; padding: 12px 13px; max-height: 300px; overflow: auto;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.65; white-space: pre; tab-size: 2;
}
.code-out::-webkit-scrollbar { width: 8px; height: 8px; }
.code-out::-webkit-scrollbar-thumb { background: #2b4a43; border-radius: 4px; }
.builder-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; font-size: 13px; padding: 9px 16px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: all .22s ease; z-index: 120;
  box-shadow: var(--shadow-md);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- motion */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .32s ease both; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 860px) {
  .builder-grid { grid-template-columns: 1fr; }
  .scope-grid { grid-template-columns: 1fr; }
  .sticky-side { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .spec-strip { grid-template-columns: repeat(2, 1fr); }
  .hero .wrap { padding-top: 32px; padding-bottom: 28px; }
  .footer-grid { gap: 24px; }
}

@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .wrap { padding: 0 16px; }
  .header-nav { display: none; }
  .site-header .wrap { gap: 12px; justify-content: space-between; }
  .logo-sub { display: none; }
  .lang-switch { margin-left: auto; }
  .kbd { display: none; }
  .search-field { padding-right: 10px; }
  .hero h1 { font-size: 27px; }
  .hero-lead { font-size: 13.6px; }

  /* 表格 → 卡片 */
  .table-card { background: transparent; border: 0; box-shadow: none; border-radius: 0; }
  table.list thead { display: none; }
  table.list, table.list tbody, table.list tr, table.list td { display: block; width: 100%; }
  table.list tbody tr {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-xs); margin-bottom: 10px; padding: 14px 15px 12px;
    position: relative;
  }
  table.list tbody tr:hover { background: #fff; }
  table.list tbody td { border: 0; padding: 0; }
  td.c-model { margin-bottom: 8px; padding-right: 44px !important; }
  .model-code { font-size: 14.5px; }
  table.list tbody td.c-chem, table.list tbody td.c-cap,
  table.list tbody td.c-volt, table.list tbody td.c-config {
    display: inline-flex; width: auto; align-items: center; gap: 6px;
    margin: 2px 10px 4px 0; font-size: 12.8px; color: var(--ink-2);
  }
  table.list tbody td.c-config { display: inline-flex; margin-bottom: 10px; }
  table.list tbody td.c-cap .cell-num,
  table.list tbody td.c-volt .cell-num { font-size: 13.5px; color: var(--ink); }
  td.c-cap::before, td.c-volt::before { content: ""; }
  td.c-qr { position: absolute; top: 12px; right: 12px; width: auto !important; }
  td.c-qr .btn span { display: none; }
  td.c-qr .btn { width: 34px; height: 34px; padding: 0; }
  td.c-action { margin-top: 10px; }
  .row-actions { justify-content: stretch; }
  td.c-action .link-detail {
    width: 100%; justify-content: center; background: var(--brand-050); border: 1px solid var(--brand-100);
    padding: 9px; font-size: 13px;
  }
  .table-foot { border-top: 0; padding: 6px 2px; }

  .toolbar { gap: 8px; }
  .toolbar-right { margin-left: 0; width: 100%; justify-content: space-between; }
  .chip { height: 31px; font-size: 12.5px; padding: 0 11px; }

  .passport-head { gap: 18px; }
  .qr-tile { display: none; }
  .passport-tools .btn { flex: 1 1 auto; }
  .card-body { padding: 4px 16px 16px; }
  .card-head { padding: 13px 16px; }
  .spec-table th { width: 40%; font-size: 12.2px; padding-right: 12px; }
  .spec-table td { font-size: 12.6px; }
  .contact-row { flex-direction: column; gap: 1px; }
  .contact-row dt { flex: none; }
  .section-nav .wrap { padding: 8px 16px; }
  .section-nav::after {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 34px;
    background: linear-gradient(90deg, rgba(245,248,247,0), rgba(245,248,247,.95));
    pointer-events: none;
  }
  .nav-label { display: none; }
}

@media (max-width: 420px) {
  .modal-actions { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------------- print */
@media print {
  :root { --header-h: 0px; }
  body { background: #fff; font-size: 11pt; }
  .site-header, .section-nav, .passport-tools, .site-footer .footer-links,
  .qr-tile, .modal, .toolbar, .toast { display: none !important; }
  .passport-hero { color: #000; background: #fff !important; border-bottom: 2px solid #0b6349; }
  .passport-hero::after { display: none; }
  .passport-id h1 { color: #063a2c; }
  .passport-sub, .passport-chips span { color: #333; }
  .passport-chips span { border-color: #ccc; background: #f6f6f6; }
  .passport-badge { color: #063a2c; border-color: #063a2c; background: none; }
  .cards { max-width: none; gap: 8px; }
  .card { break-inside: avoid; box-shadow: none; border-color: #ddd; }
  .card-head { background: #f7faf8 !important; }
  .passport-body { padding: 10px 0; }
  .spec-strip { break-inside: avoid; }
}

/* hidden 属性优先级（避免被 display:flex 等覆盖） */
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- 数据加载失败 */
.load-error {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  z-index: 999; display: flex; gap: 14px; align-items: center;
  background: #fff; border: 1px solid #f3c8c8; border-radius: 12px;
  box-shadow: 0 12px 32px rgba(180, 40, 40, .14); padding: 12px 16px; max-width: min(92vw, 520px);
}
.load-error b { display: block; font-size: 13.5px; color: #b4262a; }
.load-error span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; word-break: break-all; }

/* ---------------------------------------------------------------- 离线快照提示 */
.offline-note {
  position: fixed; left: 16px; bottom: 16px; z-index: 998;
  max-width: min(90vw, 400px);
  background: var(--amber-bg); border: 1px solid #f0d9a8; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(120, 80, 0, .12); padding: 9px 12px;
}
.offline-note b { display: block; font-size: 12.5px; color: var(--amber-fg); }
.offline-note span { display: block; font-size: 11.5px; color: var(--amber-fg); opacity: .78; margin-top: 2px; word-break: break-all; }
