/* ============================================================
   CutMyBill — 设计系统 v2
   特色：中文优先排版 / 价格可溯源 / 官方 EAB 对账 / 成本条直观排名
   配色：爱尔兰松绿 + 暖金 + 暖纸底
   ============================================================ */
:root {
  --pine: #0d5c46;
  --pine-dark: #093f30;
  --pine-deep: #06281f;
  --emerald: #159c6b;
  --mint: #e8f6f0;
  --gold: #b8862b;
  --gold-soft: #fbf2dd;
  --ink: #0e1c2b;
  --body: #45576a;
  --muted: #7d8b99;
  --paper: #f8f6f1;
  --card: #ffffff;
  --wash: #eef3f0;
  --line: #e2e7e2;
  --line-soft: #eef1ee;
  --danger: #8a2b2b;
  --radius-lg: 16px;
  --radius: 11px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(14, 28, 43, .05);
  --shadow: 0 1px 2px rgba(14, 28, 43, .05), 0 14px 34px -22px rgba(14, 28, 43, .35);
  --shadow-lg: 0 2px 4px rgba(14, 28, 43, .06), 0 30px 60px -30px rgba(14, 28, 43, .38);
  --field: #ffffff;
  --field-hover: #ffffff;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.18; letter-spacing: -.02em; font-weight: 800; }
p { margin: 0; }
a { color: var(--pine); text-decoration: none; }
.container { width: min(1180px, 92vw); margin: 0 auto; }
/* 用 CSS display 的元素会盖掉 hidden 属性，这里统一兜住（#dualCompare 等会留出一条空白条） */
[hidden] { display: none !important; }

/* ---------- 按钮 ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; font: inherit; font-weight: 700;
  border-radius: 12px; padding: 12px 22px; background: var(--wash); color: var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--pine); color: #fff; box-shadow: 0 10px 24px -14px rgba(13, 92, 70, .8); }
.button.primary:hover { background: var(--pine-dark); }
.button.switch { background: var(--emerald); color: #fff; box-shadow: 0 10px 24px -14px rgba(21, 156, 107, .85); }
.button.switch:hover { background: #10824f; }
.button.ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.button.ghost:hover { background: var(--field); border-color: var(--pine); color: var(--pine); }
.button.big { padding: 15px 30px; font-size: 17px; }
.button.full { width: 100%; }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(248, 246, 241, .9);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; color: var(--ink); }
/* 品牌图标 = logo.png（透明底金色剪刀图形），顶栏与页脚共用 */
.brand-logo { display: block; width: 34px; height: 34px; flex: 0 0 auto; object-fit: contain; }
.nav-links { display: flex; gap: 22px; margin-left: 12px; }
.nav-links a { color: var(--body); font-size: 15px; font-weight: 600; }
.nav-links a:hover { color: var(--pine); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-cta { background: var(--pine); color: #fff; padding: 10px 18px; border-radius: 12px; font-size: 15px; font-weight: 700; }
.nav-cta:hover { background: var(--pine-dark); color: #fff; }
.language-switcher { position: relative; }
.language-button {
  border: 1.5px solid var(--line); background: var(--field); border-radius: 10px;
  padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; color: var(--ink);
}
.language-menu {
  position: absolute; right: 0; top: calc(100% + 8px); background: var(--field); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 6px; min-width: 132px; z-index: 70;
}
.language-menu button {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 9px 12px; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; color: var(--ink);
}
.language-menu button:hover { background: var(--mint); color: var(--pine); }

/* ---------- 主题切换 ---------- */
.theme-button {
  width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--field); cursor: pointer; display: grid; place-items: center; font-size: 16px; line-height: 1;
}
.theme-button svg { display: block; }
.theme-button .ico-sun { display: none; }
[data-theme="dark"] .theme-button .ico-moon { display: none; }
[data-theme="dark"] .theme-button .ico-sun { display: block; }
.theme-button:hover { border-color: var(--pine); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 56px 0 0; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; background-repeat: no-repeat;
  /* 尺寸用百分比 + 四周留足衰减余量：渐变在元素边界之前就淡到 0，任何屏宽都不会出现硬边色块 */
  background-image:
    radial-gradient(62% 72% at 36% 34%, rgba(21, 156, 107, .16), transparent 70%),
    radial-gradient(46% 46% at 82% 24%, rgba(184, 134, 43, .13), transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: 46px; align-items: start; padding-bottom: 54px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--pine);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 4px rgba(21, 156, 107, .16); }
.eyebrow.center { justify-content: center; }
.hero h1 { font-size: clamp(34px, 4.4vw, 56px); margin-bottom: 18px; }
.hero h1 strong { color: var(--pine); }
.hero-copy { font-size: 17px; color: var(--body); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 30px; }

/* 今日最省 */
.today-card { background: var(--card); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-lg); border: 1px solid var(--line-soft); }
.today-head { display: flex; align-items: center; justify-content: space-between; }
.mini-label { font-size: 12.5px; font-weight: 800; letter-spacing: .06em; color: var(--gold); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(21,156,107,.5); } 50% { opacity: .7; box-shadow: 0 0 0 6px rgba(21,156,107,0); } }
.today-sub { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.today-list { list-style: none; margin: 18px 0 16px; padding: 0; display: flex; flex-direction: column; }
.today-list li { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.today-list li:last-child { border-bottom: 0; }
.today-list .rank { width: 24px; height: 24px; border-radius: 8px; background: var(--wash); color: var(--body); font-size: 12.5px; font-weight: 800; display: grid; place-items: center; }
.today-list li:first-child .rank { background: var(--pine); color: #fff; }
.today-list .sup { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.today-list .plan { font-size: 14.5px; font-weight: 600; }
.today-list .price { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.today-note { font-size: 12px; color: var(--muted); margin-bottom: 16px; }

.tricolor { height: 5px; background: linear-gradient(90deg, var(--pine) 0 34%, #fff 34% 66%, var(--gold) 66% 100%); opacity: .9; }

/* ---------- 计算器 ---------- */
.calculator-section { padding: 64px 0 12px; }
.section-heading { max-width: 46em; margin-bottom: 26px; }
.section-heading.center { text-align: center; margin-inline: auto; }
.section-heading h2 { font-size: clamp(26px, 3vw, 36px); }
.section-heading p { color: var(--body); margin-top: 10px; }
.calculator { background: var(--card); border-radius: var(--radius-lg); padding: 26px; border: 1px solid var(--line-soft); box-shadow: var(--shadow); }
.fuel-tabs { display: inline-flex; gap: 6px; background: var(--wash); padding: 5px; border-radius: 12px; margin-bottom: 22px; }
.fuel-tab { border: 0; background: transparent; font: inherit; font-weight: 700; font-size: 15px; color: var(--body); padding: 9px 20px; border-radius: 9px; cursor: pointer; }
.fuel-tab.active { background: var(--field); color: var(--pine); box-shadow: var(--shadow-sm); }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.form-grid label { display: flex; flex-direction: column; gap: 7px; }
.form-grid label > span { font-size: 13.5px; font-weight: 700; color: var(--body); }
.form-grid small { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.input-wrap { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--field); padding: 0 12px; }
.input-wrap:focus-within { border-color: var(--pine); box-shadow: 0 0 0 4px rgba(13, 92, 70, .1); }
.input-wrap b { color: var(--muted); font-size: 13px; font-weight: 700; }
.input-wrap input { border: 0; outline: 0; padding: 12px 0; font: inherit; width: 100%; background: transparent; }
select {
  appearance: none; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 34px 12px 12px; font: inherit; background: var(--field) no-repeat right 12px center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%237d8b99' stroke-width='2'/%3E%3C/svg%3E");
}
select:focus { outline: 0; border-color: var(--pine); box-shadow: 0 0 0 4px rgba(13, 92, 70, .1); }
.advanced { display: flex; flex-wrap: wrap; gap: 20px; margin: 22px 0 20px; }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--body); }
.check input { width: 17px; height: 17px; accent-color: var(--pine); }

/* ---------- 结果区 ---------- */
.results-section { padding: 56px 0 20px; }
.results-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.results-top h2 { font-size: clamp(24px, 2.8vw, 34px); }
#resultSummary { color: var(--body); margin-top: 8px; max-width: 52em; }
.sort-wrap { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.sort-wrap { flex: 0 0 auto; }
.sort-wrap select { flex: 0 0 auto; white-space: nowrap; }
.results-bar {
  margin-top: 20px; background: var(--pine-deep); color: #fff; border-radius: var(--radius);
  padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; box-shadow: var(--shadow);
}
.bar-facts { display: flex; gap: 34px; flex-wrap: wrap; }
.bar-facts div { display: flex; flex-direction: column; }
.bar-facts span { font-size: 12px; color: rgba(255, 255, 255, .68); }
.bar-facts b { font-size: 21px; letter-spacing: -.02em; }
.bar-facts b.gold { color: #f2cd7a; }
.bar-hint { font-size: 12.5px; color: rgba(255, 255, 255, .66); max-width: 30em; }
.hint-row { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 13.5px; color: var(--body); }
.hint-row .hint-text { font-weight: 600; }
.hint-row .button { background: var(--field); padding: 8px 14px; font-size: 13px; }
.data-note { margin-top: 22px; background: var(--gold-soft); border: 1px solid #f0dfb6; color: #6c5220; padding: 13px 16px; border-radius: var(--radius-sm); font-size: 12.5px; }
.data-note.error { border-color: #f0c2c2; background: #fdf2f2; color: var(--danger); }
.dual-compare {
  margin-top: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; display: flex; flex-wrap: wrap; gap: 18px 34px; align-items: center; box-shadow: var(--shadow-sm);
}
.dual-compare .col { display: flex; flex-direction: column; gap: 2px; }
.dual-compare .k { font-size: 12px; font-weight: 700; color: var(--muted); }
.dual-compare .v { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.dual-compare .who { font-size: 12.5px; color: var(--body); }
.dual-compare .delta { margin-left: auto; font-size: 13px; font-weight: 800; color: var(--gold); }
.dual-compare .note { flex-basis: 100%; font-size: 12px; color: var(--muted); }

.results-list { margin-top: 22px; }

/* ---------- 榜单：紧凑行 + 列对齐（宽屏），窄屏退回堆叠 ---------- */
.plans-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.plans-head, .plan-row {
  display: grid;
  grid-template-columns: 44px minmax(210px, 1.7fr) 90px 170px 116px 152px 146px;
  grid-template-areas: "rank sup disc rate stand cost act";
  column-gap: 16px; align-items: center;
}
.plans-head {
  padding: 11px 18px; background: var(--wash); border-bottom: 1px solid var(--line);
  font-size: 12px; font-weight: 700; color: var(--muted);
}
.plans-head .num { text-align: right; }
.plan-row { padding: 14px 18px; row-gap: 10px; border-top: 1px solid var(--line-soft); }
.plan-row:first-child { border-top: 0; }
.plan-row:hover { background: #f6f9f7; }
.plan-row.best { background: var(--mint); }
.plan-row.is-current > td { background: var(--gold-soft); }
.mine-note {
  margin-top: 12px; padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--mint); border: 1px solid var(--line); font-size: 13.5px; color: var(--ink);
}
.mine-note b { font-weight: 800; }
.plan-row .num { text-align: right; }
.c-rank { grid-area: rank; color: var(--muted); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.c-sup { grid-area: sup; min-width: 0; }
.c-disc { grid-area: disc; }
.c-rate { grid-area: rate; }
.c-rate .kv { justify-content: flex-end; gap: 8px; }
.c-act .button { white-space: nowrap; padding: 10px 14px; }
.c-stand { grid-area: stand; }
.c-cost { grid-area: cost; }
.c-act { grid-area: act; }
.sup-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sup-name { font-weight: 800; font-size: 16.5px; letter-spacing: -.01em; }
.plan-name { font-size: 13px; color: var(--body); }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 8px; background: var(--wash); color: var(--body); border: 1px solid transparent; white-space: nowrap; }
.tag.green { background: var(--mint); color: #0a6146; }
.tag.gold { background: var(--gold-soft); color: #8a6318; }
.tag.best { background: var(--pine); color: #fff; }
.tag.wrap { white-space: normal; overflow-wrap: anywhere; line-height: 1.5; max-width: 100%; }
.tag.stale { background: #fdeeee; color: #8a2b2b; }
.data-note.warn { color: var(--gold-deep, #8a6318); }   /* 调价预告那一行 */
.kv { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kv + .kv { margin-top: 3px; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 700; color: var(--ink); }
.c-disc .v { font-size: 15px; font-weight: 800; }
.c-disc .kv { justify-content: flex-end; gap: 8px; }
.c-stand .kv { justify-content: flex-end; gap: 8px; }
.cost-amount { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cost-line { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.cost-line.save { color: var(--gold); }
.price-sub { font-size: 12.5px; color: var(--muted); }

.card-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 12px; line-height: 1.55; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }


/* 价格构成 */

.show-more { margin-top: 6px; }
.empty-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }


/* 窄屏：行退回堆叠，用 data-l 小标题代替表头，不横向滚动 */
@media (max-width: 900px) {
  .plans-head { display: none; }
  .plan-row {
    grid-template-columns: 34px repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "rank sup   sup   sup"
      "rank disc  rate  stand"
      "rank cost  cost  act";
    align-items: start; padding: 16px 16px 12px;
  }
  .plan-row .num { text-align: left; }
  .plan-row [data-l]::before {
    content: attr(data-l); display: block; font-size: 11px; font-weight: 700;
    color: var(--muted); margin-bottom: 3px;
  }
  .plan-row .kv { white-space: normal; flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
  .plan-row .c-cost, .plan-row .c-act { align-self: center; }
  .plan-row .c-act { text-align: right; }
  .plan-row .c-act .button { white-space: nowrap; padding: 10px 14px; }
  .cost-amount { font-size: 20px; }
}

/* 更窄的手机：三格并排会被挤扁，改成两列 */
@media (max-width: 520px) {
  .plan-row {
    grid-template-columns: 30px repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "rank sup   sup"
      "rank disc  stand"
      "rank rate  rate"
      "rank cost  act";
    padding: 14px 12px 10px;
  }
  .plan-row .c-rate .kv { justify-content: flex-start; gap: 8px; }
}

/* ---------- 怎么比 ---------- */
.how-section { padding: 70px 0 40px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 34px; }
.steps > div { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 26px 24px; box-shadow: var(--shadow-sm); }
.steps b { display: block; font-size: 40px; font-weight: 800; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px #cfd9d3; margin-bottom: 14px; }
.steps h3 { font-size: 18px; margin-bottom: 8px; }
.steps p { color: var(--body); font-size: 14.5px; }
.audit { margin-top: 26px; background: var(--wash); border: 1px dashed #cfd9d3; border-radius: var(--radius); padding: 16px 20px; font-size: 13px; color: var(--body); }

/* ---------- 页脚 ---------- */
footer { background: var(--pine-deep); color: rgba(255, 255, 255, .82); padding: 40px 0; margin-top: 40px; }
footer strong { color: #fff; font-size: 17px; }
footer .brand-logo { display: inline-block; width: 21px; height: 21px; vertical-align: -4px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 26px; }
.footer-grid p { font-size: 12.5px; margin-top: 8px; color: rgba(255, 255, 255, .65); }
.footer-bottom {
  margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 12.5px; color: rgba(255, 255, 255, .62);
}

/* ---------- 自适应 ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .nav-links { display: none; }
  .nav { gap: 10px; }
  .nav-cta { padding: 9px 12px; font-size: 13.5px; white-space: nowrap; }
  .language-button { padding: 7px 10px; white-space: nowrap; }
  .form-grid { grid-template-columns: 1fr; }
  .trust-row { gap: 20px; }
  .results-top { align-items: flex-start; }
}

/* ============================================================
   深色主题（爱尔兰夜配色：墨绿底 + 亮绿 + 暖金）
   ============================================================ */
[data-theme="dark"] {
  --pine: #2fa07c;
  --pine-dark: #25866a;
  --pine-deep: #07130f;
  --emerald: #38bd8d;
  --mint: #16302a;
  --gold: #e3b45c;
  --gold-soft: #2b2413;
  --ink: #f0f5f2;
  --body: #c3d0ca;
  --muted: #93a59d;
  --paper: #0b1310;
  --card: #131e1a;
  --wash: #1a2723;
  --line: #27342f;
  --line-soft: #1d2925;
  --field: #182521;
  --danger: #ff9d9d;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 14px 34px -22px rgba(0, 0, 0, .85);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .55), 0 30px 60px -30px rgba(0, 0, 0, .95);
}
[data-theme="dark"] body { background: var(--paper); }
[data-theme="dark"] .site-header { background: rgba(11, 19, 16, .86); }
[data-theme="dark"] .hero::before {
  background-image:
    radial-gradient(62% 72% at 36% 34%, rgba(56, 189, 141, .20), transparent 70%),
    radial-gradient(46% 46% at 82% 24%, rgba(227, 180, 92, .14), transparent 70%);
}
[data-theme="dark"] .tricolor { background: linear-gradient(90deg, #2fa07c 0 34%, #cfd8d4 34% 66%, #e3b45c 66% 100%); opacity: .55; }
[data-theme="dark"] .nav-cta, [data-theme="dark"] .button.primary { color: #06120e; }
[data-theme="dark"] .button.switch { color: #06120e; }
[data-theme="dark"] .results-bar { background: #0d221b; border: 1px solid var(--line); }
[data-theme="dark"] .bar-facts b.gold { color: #f0cc83; }
[data-theme="dark"] .plan-row:hover { background: #16211d; }
[data-theme="dark"] .tag.best { color: #06120e; }
[data-theme="dark"] .steps b { -webkit-text-stroke: 1.5px #2c3b35; }
[data-theme="dark"] .data-note { background: #2b2413; border-color: #453a1d; color: #e6cf9b; }
[data-theme="dark"] .data-note.error { background: #34191b; border-color: #5c2a2e; color: #ffb3b3; }
[data-theme="dark"] .audit { background: #121d19; border-color: #26332e; }
[data-theme="dark"] footer { background: #06110d; }
[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2393a59d' stroke-width='2'/%3E%3C/svg%3E");
}

/* ============================================================
   Cookie 同意条（consent.js）+ 法律页（/privacy/、/about/）
   ============================================================ */

/* ---------- 页脚法律链接：中英各一份静态页，按 <html lang> 显隐 ----------
   为什么不用 JS 改 href：相对路径自己就跟着当前目录走，
   线上（/privacy/）与双击 file://（D:/cutmybill/privacy/）两种用法同时成立。 */
.i18n-zh { display: none !important; }
html[lang^="zh"] .i18n-zh { display: inline !important; }
html[lang^="zh"] .i18n-en { display: none !important; }

/* ---------- 页脚里长得像链接的按钮（「Cookie 设置」） ---------- */
.link-button {
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}
.link-button:hover { color: var(--pine); }

/* ---------- 同意条 ---------- */
.consent-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: var(--card);
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: 14px 0 calc(14px + env(safe-area-inset-bottom, 0px));
  max-height: 62vh; overflow-y: auto;
  transform: translateY(112%);
  transition: transform .24s ease;
}
.consent-bar.shown { transform: translateY(0); }
.consent-inner { display: flex; gap: 18px; align-items: flex-end; justify-content: space-between; }
.consent-copy { max-width: 60em; }
.consent-title { font-weight: 800; font-size: 15px; margin-bottom: 4px; }
.consent-text { font-size: 13px; color: var(--body); line-height: 1.5; }
.consent-text a { color: var(--pine); font-weight: 700; }
.consent-state { margin-top: 6px; font-size: 12.5px; color: var(--pine); font-weight: 700; }
.consent-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.consent-actions .button { padding: 10px 18px; font-size: 14px; border-radius: 10px; white-space: nowrap; }
.consent-accept { background: var(--pine); color: #fff; }
.consent-accept:hover { background: var(--pine-dark); }
.consent-reject { background: var(--wash); color: var(--ink); border: 1px solid var(--line); }
.consent-reject:hover { border-color: var(--pine); }
/* 同意条压在最底下，显示时给页面留出空间，否则会盖住页脚 */
body.has-consent-bar { padding-bottom: 200px; }

@media (max-width: 820px) {
  .consent-inner { flex-direction: column; align-items: stretch; gap: 12px; }
  .consent-copy { max-width: none; }
  .consent-actions { flex-direction: column; }
  .consent-actions .button { width: 100%; }
  body.has-consent-bar { padding-bottom: 340px; }
}

[data-theme="dark"] .consent-accept { color: #06120e; }

/* ---------- 法律页正文（.legal-doc 由 build-pages.mjs 加在外层） ---------- */
.legal-doc { max-width: 62em; }
.legal-doc .tt td:first-child { min-width: 11em; }
.legal-doc .tt .sup { word-break: break-word; }
.legal-doc h2 { margin-top: 32px; }
.legal-doc .lede { font-size: 15.5px; }
.legal-doc .contact-line { margin-top: 6px; font-weight: 700; }
.legal-doc .todo {
  display: inline-block; padding: 1px 6px; border-radius: 5px;
  background: var(--gold-soft); color: var(--gold); border: 1px solid var(--gold);
  font-weight: 700; font-size: .95em;
}
@media (max-width: 520px) {
  .legal-doc .tt { font-size: 12.5px; }
  .legal-doc .tt td, .legal-doc .tt th { padding: 9px 9px; }
  .legal-doc .tt td:first-child { min-width: 0; }
}
