/* ==========================================================================
   ShopCalc — 共享样式
   设计系统：Linear
   - 暗色原生，亮度分层代替投影
   - Inter Variable + "cv01","ss03"；字重 400 / 510 / 590 三档
   - 半透明白边框（0.05 / 0.08），不用实色深边框
   - 品牌靛紫 #5e6ad2 / #7170ff 是全站唯一彩色
   ========================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ---- 自托管 Inter（拉丁子集 90KB，保留 cv01/ss03/tnum 与可变字重轴）
   不用 Google Fonts：目标用户在国内，fonts.googleapis.com 经常超时，
   加载失败会退回系统字体，Linear 的字体特征就没了。同源自托管没有这个问题。 */
@font-face {
  font-family: "Inter Variable";
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---- 背景层（越亮 = 越靠上） */
  --bg: #08090a;                       /* 页面底 */
  --surface: #0f1011;                  /* 面板：表单区、结果区 */
  --surface-2: rgba(255, 255, 255, .04); /* 输入框、代码、内嵌块 */
  --surface-3: #191a1b;                /* 抬升表面 */
  --surface-hover: rgba(255, 255, 255, .05);
  --card: rgba(255, 255, 255, .02);    /* 卡片：永远半透明 */
  --card-hover: rgba(255, 255, 255, .04);

  /* ---- 边框：半透明白，不用实色 */
  --line: rgba(255, 255, 255, .08);    /* 标准：卡片、输入框 */
  --line-soft: rgba(255, 255, 255, .05); /* 细分割线 */
  --line-strong: rgba(255, 255, 255, .12); /* hover 边框 */

  /* ---- 文字 */
  --text: #f7f8f8;                     /* 主文字（不用纯白） */
  --text-2: #d0d6e0;                   /* 正文 */
  --text-3: #8a8f98;                   /* 元数据、占位 */
  --text-4: #62666d;                   /* 时间戳、禁用 */

  /* ---- 品牌（唯一彩色） */
  --accent: #7170ff;                   /* 交互强调 */
  --accent-hover: #828fff;
  --accent-dim: rgba(113, 112, 255, .12);
  --brand: #5e6ad2;                    /* CTA 背景 */

  /* ---- 状态 */
  --green: #10b981;
  --green-dim: rgba(16, 185, 129, .10);
  --red: #ff6369;
  --red-dim: rgba(255, 99, 105, .10);
  --amber: #eab04a;
  --amber-dim: rgba(234, 176, 74, .10);

  /* ---- 圆角 */
  --radius-micro: 2px;
  --radius-sm: 4px;
  --radius-ctl: 6px;                   /* 按钮、输入框 */
  --radius-card: 8px;                  /* 卡片 */
  --radius: 12px;                      /* 面板 */
  --radius-pill: 9999px;

  /* ---- 字体 */
  --font: "Inter Variable", "Inter", -apple-system, BlinkMacSystemFont,
          "SF Pro Display", system-ui, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", sans-serif;
  --mono: "Berkeley Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo,
          Consolas, monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  font-feature-settings: "cv01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 选区：品牌色半透明，不用系统蓝 */
::selection { background: rgba(113, 112, 255, .28); color: #fff; }

/* 暗色滚动条，避免系统白条割裂画面 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .08);
  border-radius: var(--radius-pill);
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .14); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ---------------------------------------------------------------- 站点框架 */
.site-header {
  border-bottom: 1px solid var(--line-soft);
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 9, 10, .82);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
}
.site-header .inner {
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  height: 56px; display: flex; align-items: center; gap: 28px;
}
.logo {
  font-weight: 590; font-size: 15.5px; letter-spacing: -.24px;
  color: var(--text);
}
.logo span { color: var(--accent); }
.logo:hover { text-decoration: none; color: var(--text); }
.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a {
  font-size: 13px; font-weight: 510; letter-spacing: -.13px;
  color: var(--text-2);
  transition: color .15s;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }
.site-nav a.active { color: var(--accent); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------------------------------------------------------------- 页头 */
.page-head { padding: 48px 0 32px; }
.page-head .eyebrow {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); font-weight: 510; margin-bottom: 12px;
}
.page-head h1 {
  font-size: 32px; line-height: 1.13; font-weight: 510;
  letter-spacing: -.704px; margin-bottom: 12px;
  color: var(--text);
}
.page-head p {
  color: var(--text-3); font-size: 15px; line-height: 1.6;
  letter-spacing: -.165px; max-width: 680px;
}

/* ---------------------------------------------------------------- 工具布局 */
.tool {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 20px;
}
/* 嵌套 grid 的每一层子项都要 min-width:0，
   否则内层表单的固有宽度会一路把页面撑出横向滚动 */
.tool > * { min-width: 0; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.panel-head h2 {
  font-size: 10.5px; font-weight: 510; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-3);
}
.panel-body { padding: 18px 20px 20px; }

/* ---------------------------------------------------------------- 表单 */
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field > label {
  display: block; font-size: 12.5px; color: var(--text-3);
  margin-bottom: 6px; font-weight: 510;
}
.field .hint {
  font-size: 11.5px; color: var(--text-3); margin-top: 5px; line-height: 1.5;
}

.input-row { display: flex; gap: 8px; }
.input-row > * { min-width: 0; }

input[type="number"], input[type="text"], select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-ctl);
  color: var(--text);
  font-size: 14px;
  padding: 9px 11px;
  font-family: inherit;
  font-feature-settings: "cv01", "ss03";
  transition: border-color .15s, background .15s, box-shadow .15s;
  appearance: none;
}
input[type="number"] { font-variant-numeric: tabular-nums; }
input::placeholder { color: var(--text-4); }
input:hover, select:hover { border-color: var(--line-strong); }
input:focus, select:focus {
  outline: none;
  border-color: rgba(113, 112, 255, .55);
  background: rgba(255, 255, 255, .06);
  box-shadow: 0 0 0 3px rgba(113, 112, 255, .14);
}
select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a8f98' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 30px;
  cursor: pointer;
}

.field-group {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.field-group.three { grid-template-columns: 1fr 1fr 1fr; }
/* grid 子项默认 min-width:auto，会被 input 的固有最小宽度撑开，
   窄屏下三个并排就溢出屏幕。必须显式归零。 */
.field-group > * { min-width: 0; }

.affix { position: relative; }
.affix .sym {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--text-4); font-size: 13px; pointer-events: none;
}
.affix input { padding-left: 26px; }
.affix.suffix input { padding-left: 11px; padding-right: 34px; }
.affix.suffix .sym { left: auto; right: 11px; }

.section-label {
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-4); font-weight: 510;
  margin: 22px 0 12px; padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.section-label:first-child { margin-top: 0; padding-top: 0; border-top: none; }

/* ---------------------------------------------------------------- 结果区 */
.result-panel { position: sticky; top: 72px; }

.verdict {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
  display: flex; gap: 11px; align-items: flex-start;
  font-size: 13.5px; line-height: 1.6;
  color: var(--text-2);
}
.verdict .dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 8px;
}
.verdict.good { background: var(--green-dim); }
.verdict.good .dot { background: var(--green); }
.verdict.warn { background: var(--amber-dim); }
.verdict.warn .dot { background: var(--amber); }
.verdict.bad { background: var(--red-dim); }
.verdict.bad .dot { background: var(--red); }
.verdict strong { color: var(--text); font-weight: 590; }

.headline {
  padding: 26px 20px 22px;
  border-bottom: 1px solid var(--line-soft);
}
.headline .lbl {
  font-size: 11px; color: var(--text-3); letter-spacing: .04em;
  margin-bottom: 6px;
}
.headline .big {
  font-size: 48px; font-weight: 510; line-height: 1.0;
  letter-spacing: -1.056px; font-variant-numeric: tabular-nums;
  color: var(--text);
}
.headline .big.pos { color: var(--green); }
.headline .big.neg { color: var(--red); }
.headline .sub { font-size: 12.5px; color: var(--text-3); margin-top: 10px; }

.stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line-soft);
}
.stats > * { min-width: 0; }
.stat { padding: 14px 16px; border-right: 1px solid var(--line-soft); }
.stat:last-child { border-right: none; }
.stat .k {
  font-size: 10.5px; color: var(--text-4); letter-spacing: .04em;
  margin-bottom: 5px;
}
.stat .v {
  font-size: 19px; font-weight: 510; font-variant-numeric: tabular-nums;
  letter-spacing: -.288px; color: var(--text);
}
.stat .v small {
  font-size: 11px; color: var(--text-4); font-weight: 400; margin-left: 3px;
}

/* 费用明细 */
.breakdown { padding: 16px 20px 4px; }
.breakdown h3 {
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-4); font-weight: 510; margin-bottom: 14px;
}
.bd-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--line-soft);
  align-items: baseline;
}
.bd-row:last-of-type { border-bottom: none; }
.bd-row .k {
  color: var(--text-3); display: flex; align-items: center; gap: 7px;
}
.bd-row .v {
  font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 510;
}
.bd-row.total {
  border-top: 1px solid var(--line); border-bottom: none;
  margin-top: 6px; padding-top: 12px;
}
.bd-row.total .k { color: var(--text); font-weight: 510; }
.bd-row.total .v { color: var(--accent); font-weight: 590; }
/* 占比条：在 Linear 的克制体系里它与行分隔线难以区分，
   反而像文字下划线。信息价值低于视觉噪音，隐藏。
   DOM 仍由 JS 生成，不影响计算与测试。 */
.bd-bar { display: none; }

.chip {
  font-size: 10px; padding: 1px 6px; border-radius: var(--radius-micro);
  background: rgba(255, 255, 255, .05); color: var(--text-4);
  font-weight: 510; letter-spacing: 0;
  border: 1px solid var(--line-soft);
}
.chip.est { background: var(--amber-dim); color: var(--amber); border-color: transparent; }

/* 提醒 */
.notes { padding: 4px 20px 20px; }
.note {
  display: flex; gap: 10px;
  font-size: 12.5px; line-height: 1.65;
  padding: 11px 13px;
  border-radius: var(--radius-card);
  margin-top: 8px;
  background: var(--surface-2);
  color: var(--text-2);
  border-left: 2px solid var(--line);
}
.note .ni {
  flex-shrink: 0; font-size: 11px; line-height: 1.7; color: var(--text-4);
  font-weight: 590;
}
.note.bad { background: var(--red-dim); border-left-color: var(--red); }
.note.warn { background: var(--amber-dim); border-left-color: var(--amber); }
.note.good { background: var(--green-dim); border-left-color: var(--green); }
.note.info { background: var(--accent-dim); border-left-color: var(--accent); }

/* ---------------------------------------------------------------- 排行榜 */
.rank-list { padding: 16px 20px 20px; }
.rank-list h3 {
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-4); font-weight: 510; margin-bottom: 8px;
}
.rank-row {
  display: flex; gap: 11px; padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.rank-row:last-child { border-bottom: none; }
.rr-rank {
  width: 18px; flex-shrink: 0; font-size: 12px; color: var(--text-4);
  font-variant-numeric: tabular-nums; padding-top: 2px;
}
.rank-row.best .rr-rank { color: var(--accent); font-weight: 590; }
.rr-main { flex: 1; min-width: 0; }
.rr-top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
}
.rr-name { font-size: 13.5px; font-weight: 510; color: var(--text-2); }
.rank-row.best .rr-name { color: var(--text); }
.rr-net {
  font-size: 14.5px; font-weight: 590; font-variant-numeric: tabular-nums;
  letter-spacing: -.13px;
}
.rr-net.pos { color: var(--green); }
.rr-net.neg { color: var(--red); }
/* 排行条同理：夹在平台名与明细之间会被读成下划线。
   排名 + 金额 + 明细三行已经足够，去掉视觉噪音。 */
.rr-bar { display: none; }
.rr-sub { font-size: 11.5px; color: var(--text-3); line-height: 1.5; margin-top: 5px; }
.best-badge {
  font-size: 9.5px; padding: 1.5px 7px; border-radius: var(--radius-pill);
  background: transparent; color: var(--accent); font-weight: 510;
  border: 1px solid rgba(113, 112, 255, .35);
  margin-left: 7px; letter-spacing: .02em; vertical-align: middle;
}

/* 复选框 */
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input[type="checkbox"] {
  width: 15px; height: 15px; accent-color: var(--accent);
  cursor: pointer; flex-shrink: 0;
}
.check span { font-size: 12.5px; color: var(--text-3); }

/* ---------------------------------------------------------------- 批量报表 */
.hidden { display: none !important; }

.dropzone {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-card);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over {
  border-color: rgba(113, 112, 255, .5);
  background: var(--accent-dim);
}
.dropzone .dz-icon { font-size: 20px; color: var(--text-4); margin-bottom: 10px; }
.dropzone .dz-t {
  font-size: 14.5px; font-weight: 510; color: var(--text); margin-bottom: 5px;
}
.dropzone .dz-d { font-size: 12.5px; color: var(--text-3); }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .02);
  border: 1px solid var(--line);
  color: #e2e4e7; font-size: 12.5px; font-weight: 510;
  padding: 8px 14px; border-radius: var(--radius-ctl); cursor: pointer;
  font-family: inherit; letter-spacing: -.13px;
  transition: background .15s, border-color .15s;
}
.btn:hover {
  background: rgba(255, 255, 255, .05);
  border-color: var(--line-strong);
  color: var(--text);
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(113, 112, 255, .2);
}
.btn.primary {
  background: var(--brand); border-color: var(--brand);
  color: #fff; font-weight: 510;
}
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.sum-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; margin-bottom: 16px;
}
.sum-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 16px 18px;
}
.sum-card .k {
  font-size: 11px; color: var(--text-4); margin-bottom: 6px;
  letter-spacing: 0;
}
.sum-card .v {
  font-size: 24px; font-weight: 510; font-variant-numeric: tabular-nums;
  letter-spacing: -.288px; line-height: 1.2; color: var(--text);
}
.sum-card .v.pos { color: var(--green); }
.sum-card .v.neg { color: var(--red); }
.sum-card .v.mid { color: var(--amber); }
.sum-card .s { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th {
  text-align: left; padding: 10px 12px; font-size: 10.5px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-4);
  border-bottom: 1px solid var(--line); white-space: nowrap; font-weight: 510;
}
.data-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--line-soft);
  color: var(--text-3); white-space: nowrap;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table td.num, .data-table th.num {
  text-align: right; font-variant-numeric: tabular-nums;
}
.data-table td.strong { color: var(--text); font-weight: 510; }
.data-table tr.loss td { background: var(--red-dim); }
.data-table tr:hover td { background: rgba(255, 255, 255, .02); }

.st {
  font-size: 10.5px; padding: 2px 8px; border-radius: var(--radius-pill);
  font-weight: 510; letter-spacing: 0;
  border: 1px solid transparent;
}
.st.ok { background: var(--green-dim); color: var(--green); }
.st.warn { background: var(--amber-dim); color: var(--amber); }
.st.bad { background: var(--red-dim); color: var(--red); }

.err-list {
  background: var(--red-dim);
  border: 1px solid rgba(255, 99, 105, .2);
  border-radius: var(--radius-card);
  padding: 12px 16px; margin-top: 14px; font-size: 12.5px; color: #ffb3b6;
}
.err-list div { margin-bottom: 4px; }
.err-list div:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- 内容区 */
.content { padding: 40px 0 64px; max-width: 720px; }
.content h2 {
  font-size: 21px; font-weight: 510; letter-spacing: -.24px;
  margin: 40px 0 12px; color: var(--text); line-height: 1.3;
}
.content h2:first-child { margin-top: 0; }
.content h3 {
  font-size: 15.5px; font-weight: 590; letter-spacing: -.13px;
  margin: 24px 0 8px; color: var(--text);
}
.content p {
  color: var(--text-2); margin-bottom: 14px; font-size: 14.5px; line-height: 1.7;
}
.content ul, .content ol { margin: 0 0 16px 22px; color: var(--text-2); }
.content li { margin-bottom: 8px; font-size: 14.5px; line-height: 1.7; color: var(--text-2); }
.content strong { color: var(--text); font-weight: 590; }
.content code {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--surface-2); padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  color: var(--accent);
}

.formula {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  padding: 16px 20px; margin: 18px 0;
  font-family: var(--mono); font-size: 13px;
  color: var(--text-2); line-height: 1.9;
  overflow-x: auto;
}
.formula .cm { color: var(--text-4); }

/* FAQ */
.faq { margin-top: 16px; }
.faq details {
  border-bottom: 1px solid var(--line-soft);
  padding: 14px 0;
}
.faq summary {
  cursor: pointer; font-size: 14px; font-weight: 510;
  color: var(--text); list-style: none;
  display: flex; justify-content: space-between; gap: 16px;
  letter-spacing: -.13px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; color: var(--text-4); font-size: 17px; line-height: 1;
  flex-shrink: 0; transition: transform .2s;
  font-weight: 400;
}
.faq details[open] summary::after { content: "−"; }
.faq .a { padding-top: 10px; color: var(--text-2); font-size: 13.5px; }
.faq .a p { margin-bottom: 10px; }
.faq .a p:last-child { margin-bottom: 0; }

/* 相关工具 */
.related {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-top: 18px;
}
.related a {
  display: block; padding: 16px 18px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-card);
  transition: background .15s, border-color .15s;
}
.related a:hover {
  background: var(--card-hover); border-color: var(--line-strong);
  text-decoration: none;
}
.related .rt {
  font-size: 13.5px; font-weight: 510; color: var(--text); margin-bottom: 4px;
}
.related .rd { font-size: 12px; color: var(--text-3); line-height: 1.55; }

/* ---------------------------------------------------------------- 首页 */
.hero { padding: 72px 0 44px; max-width: 700px; }
.hero h1 {
  font-size: 44px; line-height: 1.1; font-weight: 510;
  letter-spacing: -.9px; margin-bottom: 18px; color: var(--text);
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p {
  color: var(--text-3); font-size: 15.5px; line-height: 1.65;
  letter-spacing: -.165px;
}

.tool-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin: 8px 0 44px;
}
.tool-card {
  display: flex; flex-direction: column;
  padding: 20px 20px 18px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-card);
  transition: background .15s, border-color .15s;
  position: relative; overflow: hidden;
}
.tool-card:hover {
  background: var(--card-hover); border-color: var(--line-strong);
  text-decoration: none;
}
.tool-card .tc-t {
  font-size: 15px; font-weight: 590; color: var(--text);
  margin-bottom: 6px; letter-spacing: -.13px;
}
.tool-card .tc-d {
  font-size: 12.5px; color: var(--text-3); line-height: 1.6;
  margin-bottom: 14px;
}
.tool-card .tc-tag {
  margin-top: auto; align-self: flex-start;
  font-size: 10px;
  padding: 2px 8px; border-radius: var(--radius-pill);
  background: transparent; color: var(--text-3);
  border: 1px solid var(--line); font-weight: 510;
  letter-spacing: .02em;
}
.tool-card:hover .tc-tag {
  color: var(--accent); border-color: rgba(113, 112, 255, .35);
}

/* ---------------------------------------------------------------- 页脚 */
.site-footer {
  border-top: 1px solid var(--line-soft);
  margin-top: 48px; padding: 28px 0 48px;
  font-size: 12px; color: var(--text-4); line-height: 1.8;
}
.site-footer .wrap { max-width: 1180px; }
.site-footer strong { color: var(--text-3); font-weight: 510; }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 980px) {
  .tool { grid-template-columns: 1fr; }
  .result-panel { position: static; }
  .tool-grid, .related { grid-template-columns: 1fr 1fr; }
}

/* 导航在窄屏放不下 6 个链接：改为单行横向滚动，
   否则会把 body 撑宽、整页横向溢出、输入框被裁切 */
@media (max-width: 760px) {
  .site-header .inner {
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .site-header .inner::-webkit-scrollbar { display: none; }
  .logo { flex-shrink: 0; }
  .site-nav { gap: 18px; flex-shrink: 0; }
  .site-nav a { white-space: nowrap; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .page-head { padding: 32px 0 24px; }
  .page-head h1 { font-size: 26px; letter-spacing: -.5px; }
  .hero h1 { font-size: 32px; letter-spacing: -.6px; }
  .hero { padding: 44px 0 28px; }
  .tool-grid, .related { grid-template-columns: 1fr; }
  .headline .big { font-size: 38px; letter-spacing: -.8px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(3) {
    grid-column: 1 / -1; border-top: 1px solid var(--line-soft);
  }
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 12px; }
  .panel-body { padding: 16px; }
  .breakdown, .notes, .headline, .verdict {
    padding-left: 16px; padding-right: 16px;
  }
  .sum-grid { grid-template-columns: 1fr 1fr; }
}
