/* ============================================================
   EngTranslate Tools — 共享主题
   设计取向：工程化、朴素、可复现。不用渐变/发光等 "AI 感" 视觉——
   工程用户对"AI Generated"更警惕，朴素的工程仪表盘风格反而更可信。
   ============================================================ */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #16202c;
  --ink-2: #46576b;
  --muted: #7488a0;
  --line: #dde3ea;
  --line-2: #eef2f6;
  --accent: #0b6bcb;
  --accent-ink: #084d94;
  --accent-soft: #eaf3fc;
  --ok: #0f7b4f;
  --warn: #8a5a00;
  --warn-soft: #fff6e5;
  --radius: 8px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }

/* ---------- 共享导航 ---------- */
.site-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.site-nav .wrap {
  display: flex; align-items: center; gap: 20px;
  height: 56px; flex-wrap: wrap;
}
.brand { font-weight: 700; color: var(--ink); font-size: 16px; letter-spacing: -.2px; }
.brand span { color: var(--accent); font-weight: 600; }
.site-nav nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.site-nav nav a { color: var(--ink-2); }
.site-nav nav a.is-active { color: var(--accent); font-weight: 600; }
.nav-soon { color: var(--muted); cursor: default; }

/* ---------- 页头 ---------- */
.page-head { padding: 28px 0 8px; }
.page-head h1 { font-size: 26px; line-height: 1.3; margin: 0 0 8px; letter-spacing: -.3px; }
.page-head .lede { color: var(--ink-2); margin: 0; max-width: 68ch; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.card > h2 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin: 0 0 14px; font-weight: 700;
}

/* ---------- 表单 ---------- */
.grid {
  display: grid; gap: 14px 16px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.field label {
  display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 5px; font-weight: 600;
}
.field .hint { font-weight: 400; color: var(--muted); }
.field .row { display: flex; gap: 0; }
.field input, .field select {
  width: 100%; padding: 9px 11px; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  font-family: inherit;
}
.field input { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: 0; }
.field .unit {
  flex: 0 0 auto; display: flex; align-items: center; padding: 0 11px;
  background: var(--line-2); border: 1px solid var(--line); border-radius: 0 6px 6px 0;
  font-size: 13px; color: var(--ink-2); font-family: var(--mono); min-width: 52px; justify-content: center;
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

/* ---------- 单位切换 ---------- */
.unit-switch {
  display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  background: var(--surface);
}
.unit-switch button {
  border: 0; background: transparent; padding: 7px 14px; font: inherit; font-size: 13px;
  color: var(--ink-2); cursor: pointer;
}
.unit-switch button.on { background: var(--accent); color: #fff; font-weight: 600; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }

/* ---------- 结果 ---------- */
.results { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.result {
  background: var(--accent-soft); border: 1px solid #cfe4f8; border-radius: 6px; padding: 12px 14px;
}
.result .k { font-size: 12px; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.result .v { font-family: var(--mono); font-size: 21px; font-weight: 600; color: var(--ink); margin-top: 3px; }
.result .v small { font-size: 13px; color: var(--ink-2); font-weight: 400; }

/* ---------- 计算过程（可复现） ---------- */
.steps { font-family: var(--mono); font-size: 13.5px; background: var(--surface); }
.steps ol { margin: 0; padding-left: 22px; }
.steps li { margin-bottom: 5px; color: var(--ink-2); }
.steps li b { color: var(--ink); }

.assump-list, .notes-list { margin: 0; padding-left: 20px; font-size: 14px; color: var(--ink-2); }
.assump-list li, .notes-list li { margin-bottom: 4px; }

/* ---------- 免责 / 方法 ---------- */
.notice {
  background: var(--warn-soft); border: 1px solid #f0dcae; border-left: 3px solid #d9a300;
  border-radius: 6px; padding: 12px 14px; font-size: 13.5px; color: #5c4200; margin-bottom: 16px;
}
.notice strong { color: #4a3500; }
.method { font-size: 14px; color: var(--ink-2); }
.method code {
  font-family: var(--mono); background: var(--line-2); padding: 1px 5px; border-radius: 4px; font-size: 13px;
}
.refs { font-size: 13px; color: var(--muted); margin: 8px 0 0; padding-left: 20px; }

/* ---------- 表格 ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); text-align: right; }
table.data th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; text-align: right; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data td { font-family: var(--mono); }
table.data tr:hover td { background: var(--line-2); }

/* ---------- 目录 / 相关工具 ---------- */
.cat { margin-bottom: 26px; }
.cat > h2 { font-size: 15px; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.cat ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cat li a {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: 6px; padding: 10px 13px; color: var(--ink); font-weight: 600; font-size: 14px;
}
.cat li a:hover { border-color: var(--accent); text-decoration: none; background: var(--accent-soft); }
.cat li small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  font-size: 13px; padding: 5px 11px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface); color: var(--ink-2);
}
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ---------- 页脚 ---------- */
.site-foot { margin-top: 40px; padding: 24px 0 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.site-foot .wrap { display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
.site-foot nav { display: flex; gap: 14px; flex-wrap: wrap; }

@media (max-width: 600px) {
  .page-head h1 { font-size: 22px; }
  .site-nav .wrap { height: auto; padding-top: 10px; padding-bottom: 10px; }
}
