/* =========================================================
   非标选型平台 — Precision Instrument Design System
   纯静态 · 零依赖 · 浅色绘图纸 + 深色 CAD 双主题
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* cool-tinted neutrals (blue hue) */
  --paper:      oklch(98.6% 0.004 250);
  --paper-2:    oklch(96.5% 0.006 250);
  --surface:    oklch(100% 0 0);
  --surface-2:  oklch(97.5% 0.004 250);
  --ink:        oklch(24% 0.03 255);
  --ink-soft:   oklch(46% 0.022 255);
  --ink-faint:  oklch(62% 0.018 255);
  --line:       oklch(90% 0.012 255);
  --line-strong:oklch(82% 0.016 255);

  /* single confident accent — industrial blue */
  --blue:       oklch(52% 0.135 252);
  --blue-600:   oklch(46% 0.135 252);
  --blue-300:   oklch(72% 0.10 252);
  --blue-wash:  oklch(95% 0.03 252);

  /* data highlight — warm amber, used ONLY for live readouts */
  --amber:      oklch(64% 0.155 62);
  --amber-wash: oklch(95% 0.05 70);

  /* semantic */
  --ok:    oklch(58% 0.13 150);
  --warn:  oklch(66% 0.15 75);
  --bad:   oklch(58% 0.18 25);

  /* type */
  --font-display: "Space Grotesk", "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: system-ui, "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;

  /* fluid spacing scale */
  --s-1: 0.5rem;  --s-2: 0.75rem; --s-3: 1rem;  --s-4: 1.5rem;
  --s-5: 2.25rem; --s-6: 3.5rem; --s-7: 5.5rem;

  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1180px;
  --shadow: 0 1px 2px oklch(24% 0.03 255 / 0.04), 0 8px 24px oklch(24% 0.03 255 / 0.06);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="dark"] {
  --paper:      oklch(16.5% 0.012 255);
  --paper-2:    oklch(19% 0.014 255);
  --surface:    oklch(21% 0.014 255);
  --surface-2:  oklch(24% 0.016 255);
  --ink:        oklch(92% 0.01 255);
  --ink-soft:   oklch(72% 0.014 255);
  --ink-faint:  oklch(58% 0.014 255);
  --line:       oklch(30% 0.014 255);
  --line-strong:oklch(38% 0.016 255);

  --blue:       oklch(64% 0.13 252);
  --blue-600:   oklch(58% 0.13 252);
  --blue-300:   oklch(74% 0.10 252);
  --blue-wash:  oklch(26% 0.05 252);

  --amber:      oklch(74% 0.14 62);
  --amber-wash: oklch(28% 0.06 70);

  --shadow: 0 1px 2px oklch(0% 0 0 / 0.3), 0 12px 32px oklch(0% 0 0 / 0.35);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* faint blueprint grid on the paper */
  background-image:
    linear-gradient(oklch(24% 0.03 255 / 0.035) 1px, transparent 1px),
    linear-gradient(90deg, oklch(24% 0.03 255 / 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}
:root[data-theme="dark"] body {
  background-image:
    linear-gradient(oklch(100% 0 0 / 0.025) 1px, transparent 1px),
    linear-gradient(90deg, oklch(100% 0 0 / 0.025) 1px, transparent 1px);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font: inherit; color: inherit; }
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.5rem); }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.eyebrow {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--blue-600); font-weight: 500;
}

/* ---------- top nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: oklch(98.6% 0.004 250 / 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
:root[data-theme="dark"] .nav { background: oklch(16.5% 0.012 255 / 0.82); }
.nav-inner { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; letter-spacing: -0.01em; }
.brand .mark { width: 30px; height: 30px; color: var(--blue); flex: none; }
.brand small { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.22em; color: var(--ink-faint); display: block; margin-top: 2px; }
.nav-links { display: flex; gap: 0.4rem; margin-left: auto; }
.nav-links a {
  padding: 0.45rem 0.8rem; border-radius: var(--radius-sm); font-size: 0.92rem;
  color: var(--ink-soft); transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-links a.active { color: var(--blue-600); background: var(--blue-wash); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--ink-soft); transition: .2s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.25rem; border-radius: 10px; font-weight: 550; font-size: 0.95rem;
  transition: transform .2s var(--ease), background .2s, box-shadow .2s, border-color .2s;
}
.btn-primary { background: var(--blue); color: white; box-shadow: 0 4px 14px oklch(52% 0.135 252 / 0.35); }
.btn-primary:hover { background: var(--blue-600); transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--ink-faint); }
.btn svg { width: 17px; height: 17px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.7rem); margin-top: 1rem;
}
.hero h1 .accent { color: var(--blue); }
.hero p.lead { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--ink-soft); margin-top: 1.1rem; max-width: 42ch; }
.hero-cta { display: flex; gap: 0.8rem; margin-top: 1.8rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 2rem; margin-top: 2.4rem; flex-wrap: wrap; }
.hero-stats .stat .n { font-family: var(--font-mono); font-size: 1.6rem; font-weight: 600; color: var(--ink); }
.hero-stats .stat .l { font-size: 0.82rem; color: var(--ink-faint); }

/* hero visual — blueprint widget */
.hero-art { position: relative; }
.blueprint {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
}
.blueprint .bp-bar {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line); font-family: var(--font-mono);
  font-size: 0.74rem; letter-spacing: 0.1em; color: var(--ink-faint); text-transform: uppercase;
}
.bp-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.bp-dot.b { background: var(--blue); } .bp-dot.a { background: var(--amber); }
.blueprint svg { width: 100%; height: auto; display: block; }

/* ---------- section heads ---------- */
.sec-head { max-width: 60ch; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.sec-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-top: 0.6rem; }
.sec-head p { color: var(--ink-soft); margin-top: 0.7rem; }

/* ---------- tool matrix ---------- */
.matrix { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; }
.cat-row { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 0.8rem; margin-top: 1.4rem; }
.cat-row:first-child { margin-top: 0; }
.cat-row h3 { font-size: 1.05rem; }
.cat-row .count { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint); }

.card {
  grid-column: span 4; position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.card:hover::before { transform: scaleX(1); }
.card .tag { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; color: var(--blue-600); text-transform: uppercase; }
.card h4 { font-size: 1.18rem; margin-top: 0.5rem; font-family: var(--font-display); }
.card p { color: var(--ink-soft); font-size: 0.92rem; margin-top: 0.5rem; flex: 1; }
.card .go { margin-top: 1.1rem; display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; font-weight: 550; color: var(--blue-600); }
.card .go svg { width: 15px; height: 15px; transition: transform .2s; }
.card:hover .go svg { transform: translateX(3px); }
.card.soon { background: var(--paper-2); border-style: dashed; }
.card.soon .tag { color: var(--ink-faint); }
.card.soon .go { color: var(--ink-faint); }

/* ---------- features ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.feat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; transition: border-color .25s, transform .25s var(--ease);
}
.feat:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.feat .ico { width: 38px; height: 38px; color: var(--blue); margin-bottom: 0.9rem; }
.feat h4 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.feat p { color: var(--ink-soft); font-size: 0.9rem; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--paper-2); padding-block: 3rem 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.footer h5 { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.9rem; }
.footer a { display: block; color: var(--ink-soft); font-size: 0.9rem; padding: 0.25rem 0; }
.footer a:hover { color: var(--blue-600); }
.footer .fine { color: var(--ink-faint); font-size: 0.82rem; max-width: 38ch; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--ink-faint); font-family: var(--font-mono); }

/* =========================================================
   TOOL PAGE
   ========================================================= */
.tool-hero { padding-block: clamp(2rem, 4vw, 3rem) 0; }
.crumb { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint); letter-spacing: 0.05em; }
.crumb a:hover { color: var(--blue-600); }
.tool-hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin-top: 0.6rem; }
.tool-hero p { color: var(--ink-soft); margin-top: 0.7rem; max-width: 62ch; }

.workbench { display: grid; grid-template-columns: 340px 1fr; gap: 1.4rem; align-items: start; padding-block: 2rem 1rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-pad { padding: 1.3rem; }

/* controls */
.ctl-group { margin-bottom: 1.3rem; }
.ctl-group > label.gl { display: block; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.6rem; }
.seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
.seg button {
  padding: 0.55rem 0.5rem; border: 1px solid var(--line); border-radius: 9px;
  font-size: 0.82rem; color: var(--ink-soft); background: var(--surface-2); transition: .18s; text-align: center; line-height: 1.3;
}
.seg button:hover { border-color: var(--line-strong); }
.seg button.on { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: 0 3px 10px oklch(52% 0.135 252 / 0.3); }
.seg.cols3 { grid-template-columns: repeat(3, 1fr); }

.field { margin-bottom: 1rem; }
.field .row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.35rem; }
.field label { font-size: 0.88rem; color: var(--ink); }
.field .unit { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-faint); }
.field input[type="number"], .field select {
  width: 100%; padding: 0.55rem 0.7rem; border: 1px solid var(--line-strong);
  border-radius: 9px; background: var(--surface); font-family: var(--font-mono); font-size: 0.95rem;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }
.range-wrap { display: flex; align-items: center; gap: 0.7rem; }
input[type="range"] { -webkit-appearance: none; appearance: none; flex: 1; height: 4px; border-radius: 4px; background: var(--line-strong); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 17px; height: 17px; border-radius: 50%; background: var(--blue); border: 3px solid var(--surface); box-shadow: 0 1px 4px oklch(24% 0.03 255 / 0.3); cursor: pointer; transition: transform .15s; }
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--blue); border: 3px solid var(--surface); cursor: pointer; }

/* 滑动条右侧微调箭头（由 site.js 注入） */
.spin { display:inline-flex; flex-direction:column; gap:2px; margin-left:6px; vertical-align:middle; }
.spin button { width:22px; height:15px; line-height:13px; padding:0; border:1px solid var(--line-strong); background:var(--surface); color:var(--ink-faint); border-radius:5px; cursor:pointer; font-size:9px; display:flex; align-items:center; justify-content:center; transition:background .12s,color .12s,border-color .12s; }
.spin button:hover { background:var(--blue); color:#fff; border-color:var(--blue); }
.spin button:active { transform:translateY(1px); }
.field .val { font-family: var(--font-mono); font-size: 0.85rem; min-width: 4.2rem; text-align: right; color: var(--ink); }
.hint { font-size: 0.76rem; color: var(--ink-faint); margin-top: 0.3rem; }

/* results */
.viz-panel { padding: 1.3rem; }
.viz-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.8rem; }
.viz-head h3 { font-size: 1.05rem; }
.tab-row { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.tab-row button { padding: 0.4rem 0.8rem; border-radius: 8px; font-size: 0.82rem; color: var(--ink-soft); border: 1px solid transparent; }
.tab-row button.on { background: var(--blue-wash); color: var(--blue-600); border-color: oklch(52% 0.135 252 / 0.25); }
.viz svg { width: 100%; height: auto; display: block; border-radius: 10px; background: var(--surface-2); }
.viz-note { font-size: 0.78rem; color: var(--ink-faint); margin-top: 0.7rem; }

.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin-top: 1.2rem; }
.results[hidden] { display: none; }
.res.full-row { grid-column: 1 / -1; }
.res {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 0.9rem 1rem;
  position: relative; overflow: hidden;
}
.res .k { font-size: 0.74rem; color: var(--ink-faint); font-family: var(--font-mono); letter-spacing: 0.04em; }
.res .v { font-family: var(--font-mono); font-weight: 600; font-size: 1.35rem; color: var(--ink); margin-top: 0.2rem; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.res .u { font-size: 0.74rem; color: var(--ink-faint); margin-left: 0.25rem; font-weight: 400; }
.res.key { background: var(--amber-wash); border-color: oklch(64% 0.155 62 / 0.4); }
.res.key .v { color: oklch(48% 0.15 62); }
:root[data-theme="dark"] .res.key .v { color: var(--amber); }

/* theory */
.theory { margin-top: 2.5rem; }
.prose { max-width: 70ch; color: var(--ink-soft); }
.prose h3 { color: var(--ink); font-size: 1.2rem; margin: 1.8rem 0 0.7rem; }
.prose h4 { color: var(--ink); font-size: 1.02rem; margin: 1.3rem 0 0.5rem; font-family: var(--font-display); }
.prose p { margin: 0.6rem 0; }
.prose code, .formula { font-family: var(--font-mono); background: var(--surface-2); padding: 0.1rem 0.4rem; border-radius: 5px; font-size: 0.9em; color: var(--ink); }
.formula { display: block; padding: 0.8rem 1rem; margin: 0.7rem 0; border-left: 3px solid var(--blue); overflow-x: auto; }
.qa { border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.4rem; margin-top: 1rem; background: var(--surface); }
.qa .q { font-weight: 600; color: var(--blue-600); }
.qa .q::before { content: "Q  "; font-family: var(--font-mono); }
.qa .a { margin-top: 0.4rem; color: var(--ink-soft); }
.qa .a::before { content: "A  "; font-family: var(--font-mono); color: var(--ink-faint); }

/* 弹簧设计依据与算例 */
.example { margin: 1rem 0 0.4rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.example .ex-step { padding: 0.6rem 1.1rem; border-bottom: 1px solid var(--line); display: flex; gap: 0.9rem; align-items: baseline; }
.example .ex-step:last-child { border-bottom: 0; }
.example .ex-step b { flex: 0 0 5.2rem; font-family: var(--font-mono); font-size: 0.82rem; color: var(--blue-600); }
.example .ex-step span { font-family: var(--font-mono); font-size: 0.86rem; color: var(--ink); line-height: 1.55; }
.example .ex-step em { font-style: normal; color: var(--amber); font-weight: 600; }
.std-ref { margin: 0.5rem 0 0 1.2rem; line-height: 1.95; color: var(--ink-soft); }

/* table */
.tbl { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin-top: 0.8rem; }
.tbl th, .tbl td { border: 1px solid var(--line); padding: 0.55rem 0.7rem; text-align: left; }
.tbl th { background: var(--surface-2); font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.04em; color: var(--ink-soft); font-weight: 500; }
.tbl td { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink); }

.pill { display: inline-block; font-family: var(--font-mono); font-size: 0.72rem; padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--blue-wash); color: var(--blue-600); }

/* ---------- result status (选型合理性) ---------- */
.res.ok   { border-color: oklch(58% 0.13 150 / 0.5);  background: oklch(58% 0.13 150 / 0.09); }
.res.ok .v   { color: oklch(44% 0.13 150); }
.res.warn { border-color: oklch(66% 0.15 75 / 0.5);   background: oklch(66% 0.15 75 / 0.11); }
.res.warn .v { color: oklch(48% 0.15 75); }
.res.bad  { border-color: oklch(58% 0.18 25 / 0.55);  background: oklch(58% 0.18 25 / 0.09); }
.res.bad .v  { color: oklch(50% 0.18 25); }
:root[data-theme="dark"] .res.ok .v   { color: var(--ok); }
:root[data-theme="dark"] .res.warn .v { color: var(--warn); }
:root[data-theme="dark"] .res.bad .v  { color: var(--bad); }
.res .tag-st { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase;
  position: absolute; top: 0.55rem; right: 0.7rem; padding: 0.1rem 0.4rem; border-radius: 6px; }
.res.ok   .tag-st { background: oklch(58% 0.13 150 / 0.18); color: oklch(42% 0.13 150); }
.res.warn .tag-st { background: oklch(66% 0.15 75 / 0.2);   color: oklch(46% 0.15 75); }
.res.bad  .tag-st { background: oklch(58% 0.18 25 / 0.2);   color: oklch(48% 0.18 25); }
:root[data-theme="dark"] .res.ok .tag-st   { color: var(--ok); }
:root[data-theme="dark"] .res.warn .tag-st { color: var(--warn); }
:root[data-theme="dark"] .res.bad .tag-st  { color: var(--bad); }

/* verdict banner — 选型结论 */
.verdict { margin-top: 1.1rem; padding: 0.85rem 1.1rem; border-radius: 11px; font-size: 0.92rem; line-height: 1.5;
  display: flex; gap: 0.6rem; align-items: flex-start; border: 1px solid; }
.verdict .ic { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.verdict.ok   { background: oklch(58% 0.13 150 / 0.10); border-color: oklch(58% 0.13 150 / 0.4); color: oklch(40% 0.13 150); }
.verdict.warn { background: oklch(66% 0.15 75 / 0.12);  border-color: oklch(66% 0.15 75 / 0.45); color: oklch(44% 0.15 75); }
.verdict.bad  { background: oklch(58% 0.18 25 / 0.10);  border-color: oklch(58% 0.18 25 / 0.4); color: oklch(46% 0.18 25); }
:root[data-theme="dark"] .verdict.ok   { color: oklch(80% 0.1 150); }
:root[data-theme="dark"] .verdict.warn { color: oklch(82% 0.1 75); }
:root[data-theme="dark"] .verdict.bad  { color: oklch(80% 0.12 25); }

/* ---------- safety assessment (安全评估) ---------- */
.safety { margin-top: 1.1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 1rem 1.1rem; }
.safety-h { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.85rem; }
.safety-h b { color: var(--blue-600); font-weight: 600; letter-spacing: 0; }
.gauge { margin-bottom: 0.9rem; }
.gauge:last-child { margin-bottom: 0; }
.gauge-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.4rem; gap: 0.6rem; }
.gauge-l { font-size: 0.86rem; color: var(--ink); }
.gauge-l em { font-style: normal; font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-faint); margin-left: 0.4rem; white-space: nowrap; }
.gauge-val { font-family: var(--font-mono); font-size: 0.92rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.gauge-val.ok  { color: var(--ok); }
.gauge-val.warn { color: var(--warn); }
.gauge-val.bad { color: var(--bad); }
.bar { position: relative; height: 9px; border-radius: 6px; background: var(--line); overflow: hidden; }
.bar > span { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 6px; background: var(--blue); transition: width .25s var(--ease), background .25s; }
.bar > span.ok  { background: var(--ok); }
.bar > span.warn { background: var(--warn); }
.bar > span.bad { background: var(--bad); }

/* ---------- calculation process ---------- */
.proc { margin-top: 1.5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.proc > summary { cursor: pointer; padding: 0.9rem 1.2rem; font-family: var(--font-mono); font-size: 0.82rem;
  letter-spacing: 0.05em; color: var(--blue-600); list-style: none; display: flex; align-items: center; gap: 0.55rem; user-select: none; }
.proc > summary::-webkit-details-marker { display: none; }
.proc > summary::before { content: "▸"; transition: transform .2s var(--ease); }
.proc[open] > summary::before { content: "▾"; }
.proc .proc-body { padding: 0.2rem 1.2rem 1.3rem; }
.proc .step { border-left: 2px solid var(--line-strong); padding: 0.45rem 0 0.55rem 1rem; margin: 0.5rem 0; position: relative; }
.proc .step::before { content: ""; position: absolute; left: -5px; top: 0.85rem; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.proc .step .lbl { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-faint); letter-spacing: 0.04em; }
.proc .step .eq { font-family: var(--font-mono); font-size: 0.88rem; color: var(--ink); margin-top: 0.28rem;
  background: var(--surface-2); padding: 0.45rem 0.65rem; border-radius: 7px; overflow-x: auto; white-space: pre-wrap; }
.proc .step .out { color: var(--amber); font-weight: 600; }

/* ---------- candidate table (设计模式多方案) ---------- */
.cand-wrap { margin-top: 1.2rem; }
.cand-wrap h4 { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.5rem; }
.cand { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
.cand th, .cand td { border: 1px solid var(--line); padding: 0.5rem 0.6rem; text-align: right; }
.cand th { background: var(--surface-2); font-family: var(--font-mono); font-size: 0.71rem; color: var(--ink-soft); font-weight: 500; }
.cand td { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.cand tr.ok  td { background: oklch(58% 0.13 150 / 0.10); }
.cand tr.bad td { background: oklch(58% 0.18 25 / 0.08); color: oklch(50% 0.18 25); }
.cand tr.rec td { outline: 2px solid var(--blue); outline-offset: -2px; }
.cand .rec-tag { font-size: 0.62rem; color: var(--blue-600); font-family: var(--font-mono); }
.cand-scroll { overflow-x: auto; }

/* wire-diameter hint chip */
.wire-note { font-size: 0.74rem; color: var(--ink-faint); margin-top: 0.3rem; font-family: var(--font-mono); }

/* reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .workbench { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .card { grid-column: span 6; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .nav-links { display: none; }
  .card { grid-column: 1 / -1; }
  .feat-grid { grid-template-columns: 1fr; }
  .results { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 工具页通用补充样式（结果行 / 注释 / 页脚 / 引用 / 算例） ---------- */
.res-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.55rem 0.2rem; border-bottom: 1px dashed var(--line); font-size: 0.92rem; }
.res-row:last-child { border-bottom: none; }
.res-row span { color: var(--ink-soft); }
.res-row b { font-family: var(--font-mono); font-weight: 600; color: var(--ink); text-align: right; }

.note { font-size: 0.8rem; color: var(--ink-faint); line-height: 1.7; margin-top: 0.6rem; }

.ex-steps { display: grid; gap: 0.5rem; margin-top: 0.4rem; }
.ex-step { font-family: var(--font-mono); font-size: 0.84rem; color: var(--ink-soft);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 0.55rem 0.7rem; line-height: 1.55; }
.ex-step b { color: var(--ink); }

.ref-table { width: 100%; border-collapse: collapse; margin-top: 0.6rem; font-size: 0.84rem; }
.ref-table th, .ref-table td { border: 1px solid var(--line); padding: 0.45rem 0.6rem; text-align: left; vertical-align: top; }
.ref-table th { background: var(--surface-2); color: var(--ink-soft); font-family: var(--font-mono); font-size: 0.74rem; }
.ref-table a { color: var(--blue); }

.vendor-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.vendor-links a { font-size: 0.8rem; color: var(--blue); text-decoration: none; border: 1px solid var(--line);
  border-radius: 999px; padding: 0.25rem 0.8rem; background: var(--surface-2); }
.vendor-links a:hover { border-color: var(--blue); }

/* 工具页页脚 */
.f-brand { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink); letter-spacing: 0.04em; }
.f-links { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-top: 0.5rem; }
.f-links a { color: var(--ink-soft); text-decoration: none; font-size: 0.82rem; }
.f-links a:hover { color: var(--blue); }
.f-copy { margin-top: 0.8rem; font-size: 0.76rem; color: var(--ink-faint); }

/* =========================================================
   HOMEPAGE ELEVATION — clean / high-end (scoped, no tool-page impact)
   ========================================================= */
.hero { padding-block: clamp(3.4rem, 8vw, 6.5rem); }
.hero .eyebrow,
.sec-head .eyebrow { display: inline-flex; align-items: center; gap: 0.6rem; }
.hero .eyebrow::before,
.sec-head .eyebrow::before {
  content: ""; width: 26px; height: 2px; background: var(--blue); border-radius: 2px; flex: none;
}
.hero h1 { letter-spacing: -0.03em; font-weight: 700; }
.hero-stats { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.hero-stats .stat { display: flex; flex-direction: column; gap: 0.15rem; }
.hero-stats .stat .n { font-size: 1.75rem; }
.hero-art { position: relative; }
.hero-art::before {
  content: ""; position: absolute; inset: -16% -8% auto auto; width: 64%; height: 72%;
  background: radial-gradient(60% 60% at 72% 28%, var(--blue-wash), transparent 72%);
  z-index: 0; pointer-events: none;
}
.blueprint { position: relative; z-index: 1; }
.cat-row h3 { position: relative; padding-left: 0.9rem; }
.cat-row h3::before {
  content: ""; position: absolute; left: 0; top: 0.18em; bottom: 0.18em; width: 3px;
  background: var(--blue); border-radius: 2px;
}

