/* QC Foshan — base styles
   Used by aql-calculator now; extend for the remaining pages.
   Light theme, print-friendly tables, mobile-first. */

:root {
  --ink: #1f1f1e;
  --ink-2: #55534e;
  --ink-3: #8a8880;
  --line: #e2e0d9;
  --line-2: #cfccc2;
  --bg: #ffffff;
  --bg-2: #faf9f6;
  --bg-3: #f1efe8;
  --brand: #0f6e56;
  --brand-ink: #085041;
  --warn: #a86a1a;
  --warn-bg: #fdf5e6;
  --bad: #a32d2d;
  --bad-bg: #fceceb;
  --ok: #0f6e56;
  --ok-bg: #e7f4ef;
  --r: 10px;
  --max: 1080px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */

.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}
.brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--ink);
  text-decoration: none;
}
.brand span { color: var(--brand); }
.site-head nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-head nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14.5px;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.site-head nav a:hover { color: var(--ink); border-bottom-color: var(--brand); }

@media (max-width: 720px) {
  .site-head nav { gap: 14px; font-size: 14px; }
  .site-head .wrap { min-height: 56px; }
}

/* ---------- page head ---------- */

main { padding: 28px 20px 60px; }
.crumb { font-size: 13.5px; color: var(--ink-3); margin: 0 0 14px; }
.crumb a { color: var(--ink-3); }

h1 {
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.7px;
  margin: 0 0 14px;
  max-width: 20ch;
}
.lede {
  font-size: 18px;
  color: var(--ink-2);
  max-width: 68ch;
  margin: 0 0 30px;
}
.lede strong { color: var(--ink); }

h2 {
  font-size: 24px;
  letter-spacing: -0.4px;
  margin: 44px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
h3 { font-size: 18px; margin: 26px 0 8px; }

@media (max-width: 720px) {
  h1 { font-size: 27px; }
  .lede { font-size: 16.5px; }
  h2 { font-size: 21px; margin-top: 34px; }
}

/* ---------- calculator ---------- */

.calc {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: start;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
}
@media (max-width: 800px) {
  .calc { grid-template-columns: 1fr; padding: 18px; }
}

.inputs { display: flex; flex-direction: column; gap: 16px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.field input,
.field select {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 110, 86, 0.12);
}
.tip { font-size: 12.5px; color: var(--ink-3); margin: 6px 0 0; }

.adv {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.adv summary {
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
  font-weight: 600;
}
.adv .field { margin-top: 12px; }

/* ---------- result ---------- */

.output { min-height: 200px; }

.res { width: 100%; border-collapse: collapse; font-size: 15px; }
.res th,
.res td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.res th {
  font-weight: 500;
  color: var(--ink-2);
  width: 46%;
  background: var(--bg);
}
.res td { background: var(--bg); }
.res tr.hi th,
.res tr.hi td { background: var(--ok-bg); font-size: 16.5px; }
.res tr.hi:first-child th,
.res tr.hi:first-child td { border-top-left-radius: 8px; border-top-right-radius: 8px; }
.res tr.hi:last-child th,
.res tr.hi:last-child td { border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }
.res strong { font-size: 19px; font-weight: 700; }
.muted { color: var(--ink-3); font-size: 14px; font-weight: 400; }

.verdict {
  margin-top: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 14.5px;
}
.verdict p { margin: 0 0 10px; }
.verdict p:last-child { margin-bottom: 0; }

.hint {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--ink-2);
  font-size: 15px;
  margin: 0;
}

.cta { margin: 18px 0 0; }
.cta a,
.bottom-cta a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--brand);
}

/* ---------- prose ---------- */

.prose { max-width: 72ch; margin-top: 44px; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }

/* ---------- tables ---------- */

.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 8px; }

table.data {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15px;
}
table.data th,
table.data td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
table.data thead th {
  background: var(--bg-3);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.35;
}
table.data tr.mark td { background: var(--ok-bg); font-weight: 600; }
.cap { font-size: 13px; color: var(--ink-3); margin: 0 0 14px; }

/* ---------- bottom CTA ---------- */

.bottom-cta {
  margin-top: 46px;
  padding: 22px 24px;
  background: var(--bg-3);
  border-radius: var(--r);
}
.bottom-cta p { margin: 0 0 10px; }
.bottom-cta p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 26px 0;
  font-size: 14px;
  color: var(--ink-2);
}
.site-foot p { margin: 0 0 8px; }
.site-foot p:last-child { margin-bottom: 0; }
.site-foot a { color: var(--ink-2); margin-right: 6px; }

/* ---------- inline code ---------- */

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--bg-3);
  padding: 2px 5px;
  border-radius: 4px;
}

/* ================================================================
   扩展样式 v2 · 案例页 / 品类页 / 首页
   ================================================================ */

.wrap { padding-left: 20px; padding-right: 20px; }
.prose-wide { max-width: 880px; padding-bottom: 60px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; font-size: 15px; font-weight: 600;
  padding: 11px 20px; border-radius: 8px;
  background: var(--brand); color: #fff; text-decoration: none;
  border: 1px solid var(--brand); transition: background .15s;
}
.btn:hover { background: var(--brand-ink); }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--ok-bg); }

/* ---------- 移动端菜单 ---------- */
.menu-btn {
  display: none; font-size: 20px; background: none; border: 0;
  cursor: pointer; color: var(--ink); padding: 6px 10px; line-height: 1;
}
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .site-head nav { display: none; width: 100%; flex-direction: column; gap: 0; padding: 8px 0 14px; }
  .site-head nav.open { display: flex; }
  .site-head nav a { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
  .site-head .wrap { padding-bottom: 4px; }
}

/* ---------- 数字对比 ---------- */
.numbers {
  display: grid; gap: 14px; grid-template-columns: 1fr 1fr;
  margin: 26px 0 8px;
}
@media (max-width: 640px) { .numbers { grid-template-columns: 1fr; } }
.num {
  background: var(--ok-bg); border: 1px solid #b9ddd0;
  border-radius: var(--r); padding: 18px 20px;
}
.num.neg { background: var(--bad-bg); border-color: #edc4c2; }
.num .n { display: block; font-size: 26px; font-weight: 700; letter-spacing: -0.8px; color: var(--ok); }
.num.neg .n { color: var(--bad); }
.num .l { display: block; margin-top: 5px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }

/* ---------- 品类页顶部数据条 ---------- */
.stats {
  display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 22px 0 30px;
}
.stat {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 16px;
}
.stat .v { display: block; font-size: 21px; font-weight: 700; color: var(--brand); letter-spacing: -0.5px; }
.stat .l { display: block; margin-top: 4px; font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }

/* ---------- 两栏 ---------- */
.two-col {
  display: grid; gap: 22px; grid-template-columns: 1fr 1fr;
  align-items: start; margin: 0 0 18px;
}
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- 小表格 ---------- */
table.mini { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.mini td, table.mini th {
  padding: 7px 9px; border-bottom: 1px solid var(--line);
  text-align: left; vertical-align: top; line-height: 1.5;
}
table.mini th { background: var(--bg-3); font-weight: 600; }
table.mini.wide { min-width: 420px; }
table.mini tr:last-child td { border-bottom: 0; }

/* ---------- 提示框 ---------- */
.box-note {
  background: var(--bg-2); border-left: 3px solid var(--brand);
  border-radius: 8px; padding: 16px 18px; margin: 0 0 20px;
}
.box-note p { margin: 0 0 10px; }
.box-note p:last-child { margin-bottom: 0; }
.box-note ol, .box-note ul { margin: 8px 0 0; padding-left: 22px; }

/* ---------- CTA 带 ---------- */
.cta-band {
  background: var(--ink); color: #fff;
  border-radius: var(--r); padding: 22px 24px; margin: 30px 0;
}
.cta-band p { margin: 0 0 10px; }
.cta-band p:last-child { margin-bottom: 0; }
.cta-band a { color: #7fe0bd; font-weight: 600; border-bottom: 2px solid #7fe0bd; text-decoration: none; }
.cta-band strong { color: #fff; }

/* ---------- 步骤 ---------- */
ol.steps { counter-reset: st; list-style: none; padding: 0; margin: 0 0 24px; }
ol.steps li {
  counter-increment: st; position: relative;
  padding: 12px 0 12px 42px; border-bottom: 1px solid var(--line);
}
ol.steps li:last-child { border-bottom: 0; }
ol.steps li::before {
  content: counter(st); position: absolute; left: 0; top: 12px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: #fff;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- AQL 内嵌 ---------- */
.aql-inline {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px 20px; margin: 0 0 12px;
  max-width: 460px;
}
.aql-inline label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.aql-inline input {
  width: 100%; font: inherit; font-size: 16px; padding: 9px 12px;
  border: 1px solid var(--line-2); border-radius: 8px; background: #fff;
}
.aql-inline input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,110,86,.12); }
#aqlout { margin-top: 14px; }
.hint-sm { font-size: 13.5px; color: var(--ink-3); margin: 0; }

/* ---------- 对照表高亮列 ---------- */
table.data.compare tbody td:nth-child(3) { background: var(--ok-bg); }
table.data.compare thead th:nth-child(3) { background: var(--brand); }

/* ---------- 页脚多栏 ---------- */
.foot-grid {
  display: grid; gap: 24px;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  margin-bottom: 18px;
}
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-brand { font-size: 17px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.foot-brand span { color: var(--brand); }
.foot-h { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); margin: 0 0 8px; }
.foot-sm { font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }
.foot-btm {
  border-top: 1px solid var(--line); padding-top: 14px;
  font-size: 12.5px; color: var(--ink-3); margin: 0;
}

/* ---------- 表格滚动提示 ---------- */
.tbl-scroll { position: relative; }
@media (max-width: 640px) {
  .tbl-scroll::after {
    content: "→ scroll"; position: absolute; right: 6px; top: 6px;
    font-size: 11px; color: var(--ink-3); background: var(--bg);
    padding: 2px 6px; border-radius: 4px; pointer-events: none;
  }
}
