/* ============================================================
   EduRepay — "The Repayment Ledger"
   暖纸账本 × 美元墨绿 × 铜金印章 × 朱砂警示
   ============================================================ */

:root {
  --paper: #f3efe4;            /* 账本纸 */
  --paper-2: #ece7d7;
  --card: #fdfcf7;             /* 纸卡 */
  --ink: #1c3529;              /* 墨绿 */
  --ink-soft: #55604f;
  --ink-faint: #8b937f;
  --green: #1e5c40;            /* 美元绿 */
  --green-deep: #123d2a;
  --green-soft: rgba(30, 92, 64, .08);
  --gold: #a8741a;             /* 铜金 */
  --gold-soft: rgba(168, 116, 26, .1);
  --red: #b3402e;              /* 朱砂（利息/警示） */
  --red-soft: rgba(179, 64, 46, .08);
  --line: #d8d2be;
  --line-strong: #b9b294;
  --shadow-sm: 0 1px 2px rgba(28, 53, 41, .06);
  --shadow-md: 0 6px 22px rgba(28, 53, 41, .1);
  --display: 'Young Serif', Georgia, serif;
  --body: 'Figtree', 'Segoe UI', sans-serif;
  --mono: 'Spline Sans Mono', 'Courier New', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--ink);
  background:
    repeating-linear-gradient(180deg, transparent 0 27px, rgba(28, 53, 41, .04) 27px 28px),
    var(--paper);
  font-size: 15.5px;
  line-height: 1.6;
  min-height: 100vh;
}

/* 账本左装订红线 */
body::before {
  content: '';
  position: fixed; top: 0; bottom: 0; left: 0; width: 5px;
  background: linear-gradient(180deg, var(--red), #8f3325 60%, var(--red));
  z-index: 60;
}

a { color: var(--green); }

.wrap { max-width: 1560px; margin: 0 auto; padding: 0 30px 40px; }
.inner { max-width: 1080px; margin: 0 auto; }
.inner.narrow { max-width: 820px; }

/* ============ Header ============ */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 239, 228, .92);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--ink);
}
.site-header .inner {
  max-width: 1560px; padding: 0 30px;
  height: 68px; display: flex; align-items: center; gap: 28px;
  position: relative;
}
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.logo-img { width: 38px; height: 38px; flex: none; }
.logo-text {
  font-family: var(--display); font-size: 21px; line-height: 1.05;
  display: flex; align-items: baseline; gap: 9px;
}
.logo-text em {
  font-family: var(--mono); font-style: normal; font-size: 10.5px;
  color: var(--ink-faint); letter-spacing: .08em; text-transform: uppercase;
}
nav { margin-left: auto; }
.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links a {
  display: block; padding: 8px 13px; border-radius: 8px;
  font-weight: 500; font-size: 14.5px; text-decoration: none;
  color: var(--ink-soft); transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--green-deep); background: var(--green-soft); }

/* 汉堡按钮（桌面隐藏） */
.menu-btn {
  display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; width: 42px; height: 42px; margin-left: auto;
  border: 1.5px solid var(--ink); border-radius: 10px;
  background: var(--card); cursor: pointer; padding: 0;
}
.menu-btn .bar { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: all .2s; }
.menu-btn[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Hero（一行即工具） ============ */

.hero { padding: 30px 0 22px; border-bottom: 1px solid var(--line-strong); }
.hero h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(26px, 3vw, 38px); line-height: 1.15; letter-spacing: -.01em;
}
.hero h1 .accent { color: var(--green); font-style: italic; }
.hero-sub { margin-top: 8px; color: var(--ink-soft); font-size: 15.5px; max-width: 720px; }

/* ============ Tool ============ */

.tool { padding: 26px 0 8px; }
.tool-grid { display: grid; grid-template-columns: 350px minmax(0, 1fr); gap: 22px; align-items: start; }

/* --- 输入面板 --- */
.inputs {
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px;
  padding: 20px 22px 22px; position: sticky; top: 88px;
  box-shadow: 4px 4px 0 rgba(28, 53, 41, .12);
}
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.panel-stamp {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .14em; color: var(--red);
  border: 1.5px solid var(--red); border-radius: 5px; padding: 2px 8px;
  transform: rotate(-2deg);
}
.panel-no { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); }

.field { margin-bottom: 17px; }
.field label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-weight: 600; font-size: 13.5px; margin-bottom: 6px; color: var(--ink);
}
.f-hint { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); font-weight: 500; }

.money-row {
  display: flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line-strong); border-radius: 9px;
  background: #fff; padding: 0 12px; height: 46px;
  transition: border-color .15s, box-shadow .15s;
}
.money-row:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.money-sign { font-family: var(--mono); font-size: 16px; color: var(--ink-faint); }
.money-row input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: var(--mono); font-size: 17px; font-weight: 600; color: var(--ink);
  min-width: 0; height: 100%;
}
input[type="range"] {
  width: 100%; margin-top: 10px; accent-color: var(--green); height: 18px; cursor: pointer;
}
select {
  width: 100%; height: 46px; padding: 0 12px;
  border: 1.5px solid var(--line-strong); border-radius: 9px; background: #fff;
  font-family: var(--body); font-size: 14.5px; font-weight: 500; color: var(--ink);
  cursor: pointer;
}
select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }

/* 分段选择 */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.seg.seg-wide { grid-template-columns: 1fr 1fr 1fr; }
.seg-btn {
  height: 40px; border: 1.5px solid var(--line-strong); border-radius: 9px;
  background: #fff; font-family: var(--body); font-size: 13.5px; font-weight: 600;
  color: var(--ink-soft); cursor: pointer; transition: all .15s;
}
.seg-btn:hover { border-color: var(--green); color: var(--green-deep); }
.seg-btn.active { background: var(--green); border-color: var(--green); color: #f6f3e8; }

.f-note { font-size: 12px; color: var(--ink-faint); margin-top: 6px; line-height: 1.5; }
.ledger-rule {
  border-top: 1.5px dashed var(--line-strong); margin: 4px 0 14px;
}
.assumption { font-size: 11.5px; color: var(--ink-faint); line-height: 1.55; }

/* --- 结果区 --- */
.results { min-width: 0; }

.headline {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px;
}
.hl-cell {
  background: var(--card); border: 1.5px solid var(--line-strong); border-radius: 12px;
  padding: 16px 20px 15px; box-shadow: var(--shadow-sm);
}
.hl-label {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint);
  margin-bottom: 6px;
}
.hl-num {
  font-family: var(--mono); font-size: clamp(26px, 2.6vw, 40px); font-weight: 600;
  line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums;
}
.hl-num.hl-red { color: var(--red); }
.hl-num.hl-gold { color: var(--gold); }
.hl-num.hl-green { color: var(--green); }
.hl-sub { font-size: 12px; color: var(--ink-faint); margin-top: 4px; }

/* Tabs */
.tabs {
  display: flex; gap: 2px; border-bottom: 2px solid var(--ink);
  margin-bottom: 18px; flex-wrap: wrap;
}
.tab {
  padding: 10px 18px 9px; border: none; background: transparent; cursor: pointer;
  font-family: var(--body); font-size: 14px; font-weight: 600; color: var(--ink-soft);
  border-radius: 9px 9px 0 0; position: relative; top: 2px;
  transition: color .15s, background .15s;
}
.tab:hover { color: var(--green-deep); }
.tab.active {
  background: var(--card); color: var(--green-deep);
  border: 1.5px solid var(--ink); border-bottom: 3px solid var(--card);
}
.view.hidden, .hidden { display: none !important; }

.view-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; }
.sheet {
  background: var(--card); border: 1.5px solid var(--line-strong); border-radius: 12px;
  padding: 20px 22px; box-shadow: var(--shadow-sm); min-width: 0;
}
.sheet-title {
  font-family: var(--display); font-weight: 400; font-size: 19px; margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1.5px dashed var(--line-strong);
}
.sheet-notes p { font-size: 14px; color: var(--ink-soft); margin-bottom: 12px; }
.sheet-notes strong { color: var(--ink); }
.mono-note {
  font-family: var(--mono); font-size: 12px; color: var(--ink-faint);
  background: var(--paper-2); border-radius: 7px; padding: 9px 12px; line-height: 1.6;
}

/* 账本表 */
.ledger-table { width: 100%; border-collapse: collapse; font-family: var(--mono); }
.ledger-table th {
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-faint); text-align: right; padding: 7px 10px;
  border-bottom: 2px solid var(--ink);
}
.ledger-table th:first-child, .ledger-table td:first-child { text-align: left; }
.ledger-table td {
  font-size: 13px; padding: 7px 10px; text-align: right;
  border-bottom: 1px solid var(--line); color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ledger-table tbody tr:hover { background: var(--green-soft); }
.ledger-table td.l-int { color: var(--red); }
.ledger-wrap { max-height: 430px; overflow-y: auto; }
.ledger-wrap::-webkit-scrollbar { width: 8px; }
.ledger-wrap::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }

/* IDR */
.idr-plan-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.plan-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  padding: 8px 16px; border: 1.5px solid var(--line-strong); border-radius: 999px;
  background: #fff; color: var(--ink-soft); cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--green); color: var(--green-deep); }
.chip.active { background: var(--green); border-color: var(--green); color: #f6f3e8; }
.ibr-old {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--ink-soft); cursor: pointer;
}
.ibr-old input { accent-color: var(--green); width: 15px; height: 15px; cursor: pointer; }

.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stepper { display: flex; gap: 6px; }
.step-btn {
  width: 44px; height: 46px; border: 1.5px solid var(--line-strong); border-radius: 9px;
  background: #fff; font-family: var(--mono); font-size: 18px; color: var(--ink);
  cursor: pointer; transition: all .15s;
}
.step-btn:hover { border-color: var(--green); background: var(--green-soft); }
.stepper input {
  flex: 1; min-width: 0; height: 46px; border: 1.5px solid var(--line-strong);
  border-radius: 9px; background: #fff; text-align: center;
  font-family: var(--mono); font-size: 16px; font-weight: 600; color: var(--ink);
}
.stepper input:focus, .money-row input:focus { outline: none; }

.idr-result { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0 4px; }
.idr-cell {
  border: 1.5px solid var(--line-strong); border-radius: 12px; padding: 15px 18px;
  background: #fff;
}
.idr-math {
  margin-top: 12px; font-family: var(--mono); font-size: 12.5px;
  color: var(--ink-soft); background: var(--paper-2); border-radius: 8px;
  padding: 11px 14px; line-height: 1.7;
}
.private-warn {
  margin-top: 12px; font-size: 13px; color: var(--red);
  background: var(--red-soft); border: 1.5px dashed var(--red); border-radius: 9px;
  padding: 11px 14px; line-height: 1.55;
}

/* 豁免印章 */
.stamp {
  display: inline-block; transform: rotate(-6deg);
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .18em;
  color: var(--gold); border: 2px solid var(--gold); border-radius: 999px;
  padding: 3px 10px; margin-left: 10px; vertical-align: middle;
}

/* Refinance */
.refi-result { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0 4px; }

/* 对比条 */
.compare {
  margin-top: 20px; background: var(--card); border: 1.5px solid var(--ink);
  border-radius: 12px; padding: 20px 24px 22px;
  box-shadow: 4px 4px 0 rgba(28, 53, 41, .12);
}
.compare-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.compare-head h3 { font-family: var(--display); font-weight: 400; font-size: 20px; }
.compare-note { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
.cmp-row { margin-bottom: 15px; }
.cmp-row:last-child { margin-bottom: 0; }
.cmp-meta { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; gap: 10px; flex-wrap: wrap; }
.cmp-name { font-weight: 700; font-size: 14px; }
.cmp-name .cmp-tag {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500; color: var(--ink-faint);
  margin-left: 8px; letter-spacing: .05em;
}
.cmp-pay { font-family: var(--mono); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cmp-bar { display: flex; height: 26px; border-radius: 6px; overflow: hidden; background: var(--paper-2); }
.cmp-seg-principal { background: var(--green); }
.cmp-seg-interest { background: var(--red); }
.cmp-seg-forgive { background: repeating-linear-gradient(45deg, var(--gold), var(--gold) 6px, #c99a4a 6px, #c99a4a 12px); }
.cmp-legend { display: flex; gap: 18px; margin-top: 13px; flex-wrap: wrap; }
.cmp-legend span { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-soft); }
.cmp-dot { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.cmp-dot.d-p { background: var(--green); }
.cmp-dot.d-i { background: var(--red); }
.cmp-dot.d-f { background: repeating-linear-gradient(45deg, var(--gold), var(--gold) 3px, #c99a4a 3px, #c99a4a 6px); }

/* ============ Content / FAQ ============ */

.content-section { padding: 34px 0 6px; }
.content-section h2 {
  font-family: var(--display); font-weight: 400; font-size: clamp(22px, 2.4vw, 30px);
  margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--ink);
}
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.info-card {
  background: var(--card); border: 1.5px solid var(--line-strong); border-radius: 11px;
  padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.info-card h3 { font-family: var(--display); font-weight: 400; font-size: 17.5px; margin-bottom: 8px; }
.info-card p { font-size: 13.8px; color: var(--ink-soft); }

.faq-item {
  background: var(--card); border: 1.5px solid var(--line-strong); border-radius: 11px;
  margin-bottom: 10px; overflow: hidden;
}
.faq-item summary {
  cursor: pointer; padding: 15px 20px; font-weight: 600; font-size: 15px;
  list-style: none; position: relative; padding-right: 46px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 19px; color: var(--green); font-weight: 600;
  transition: transform .2s;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item[open] summary { border-bottom: 1px dashed var(--line-strong); }
.faq-item p { padding: 13px 20px 16px; font-size: 14px; color: var(--ink-soft); }
.mono { font-family: var(--mono); font-size: 12.5px; background: var(--paper-2); padding: 1px 5px; border-radius: 4px; }

/* ============ 文章列表（CMS 强制白卡规范） ============ */

.article-list { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.article-list a {
  display: block; padding: 16px 20px;
  border: 1px solid #e0e0e0; border-radius: 8px; background: #ffffff;
  text-decoration: none; transition: border-color .2s, box-shadow .2s; color: #1a1a1a;
}
.article-list a:hover {
  border-color: #2563eb; box-shadow: 0 4px 12px rgba(37, 99, 235, .15);
}
.article-list .article-title { font-weight: 600; font-size: .95rem; color: #1a1a1a; margin-bottom: 6px; line-height: 1.4; }
.article-list a:hover .article-title { color: #2563eb; }
.article-list .article-desc { font-size: .82rem; color: #666; line-height: 1.5; }
.articles-empty { color: var(--ink-faint); font-size: 14px; padding: 14px 0; }
.view-all-link { margin-top: 16px; }

/* ============ 文章详情页（亮色阅读区，强制规范） ============ */

.article-content { padding: 56px 0; background: #f5f6f8; }
.article-content .inner { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.article-content article {
  background: #ffffff; border-radius: 16px; padding: 56px 64px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .06);
}
.article-content h1 { font-family: var(--display); font-size: 30px; line-height: 1.3; margin-bottom: 12px; }
.article-meta { font-size: 13px; color: #888; margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid #eee; }
.article-content h2 { font-family: var(--display); font-size: 22px; margin: 30px 0 12px; }
.article-content h3 { font-size: 17px; margin: 22px 0 10px; }
.article-content p { font-size: 15px; line-height: 1.8; color: #333; margin-bottom: 14px; }
.article-content ul, .article-content ol { padding-left: 24px; margin-bottom: 14px; color: #333; }
.article-back {
  display: inline-block; margin-bottom: 20px; text-decoration: none;
  color: var(--green); font-weight: 600; font-size: 14px;
}
.article-back:hover { text-decoration: underline; }

.faq-section { margin-top: 36px; border-top: 2px solid #eee; padding-top: 24px; }
.faq-section h2 { font-family: var(--display); font-size: 20px; margin-bottom: 16px; }
.faq-section details {
  border: 1px solid #e5e5e5; border-radius: 9px; margin-bottom: 9px; background: #fafafa;
}
.faq-section summary { padding: 13px 17px; font-weight: 600; font-size: 14.5px; cursor: pointer; }
.faq-section p { padding: 0 17px 13px; margin: 0; }

.related-articles { margin-top: 36px; border-top: 2px solid #eee; padding-top: 24px; }
.related-articles h2 { font-family: var(--display); font-size: 20px; margin-bottom: 14px; }
.related-articles a {
  display: block; padding: 12px 16px; border: 1px solid #e5e5e5; border-radius: 8px;
  background: #fff; text-decoration: none; color: #1a1a1a; margin-bottom: 8px;
  font-weight: 600; font-size: .92rem; transition: border-color .2s;
}
.related-articles a:hover { border-color: #2563eb; color: #2563eb; }

/* ============ Footer ============ */

.site-footer { border-top: 2px solid var(--ink); background: var(--paper-2); margin-top: 50px; }
.foot-inner {
  max-width: 1560px; margin: 0 auto; padding: 34px 30px 20px;
  display: grid; grid-template-columns: minmax(0, 1.6fr) auto auto; gap: 44px;
}
.foot-brand .brand-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-bottom: 10px; }
.foot-brand img { width: 30px; height: 30px; }
.foot-brand .brand-link span { font-family: var(--display); font-size: 19px; }
.foot-brand p { font-size: 13px; color: var(--ink-soft); max-width: 420px; line-height: 1.6; }
.foot-col h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 10px;
}
.foot-col a { display: block; font-size: 13.5px; color: var(--ink-soft); text-decoration: none; padding: 3.5px 0; }
.foot-col a:hover { color: var(--green-deep); }
.foot-base {
  max-width: 1560px; margin: 0 auto; padding: 14px 30px 18px;
  border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint);
}

/* ============ 动效 ============ */

@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hero h1, .hero-sub { animation: riseIn .5s ease both; }
.hero-sub { animation-delay: .08s; }
.hl-cell { animation: riseIn .5s ease both; }
.hl-cell:nth-child(2) { animation-delay: .07s; }
.hl-cell:nth-child(3) { animation-delay: .14s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ============ 断点 1120px（平板降列） ============ */

@media (max-width: 1120px) {
  .tool-grid { grid-template-columns: 320px minmax(0, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .view-grid { grid-template-columns: 1fr; }
  .foot-inner { grid-template-columns: 1fr auto; gap: 28px; }
}

/* ============ 断点 760px（手机全量收紧） ============ */

@media (max-width: 760px) {
  .wrap, .site-header .inner, .foot-inner, .foot-base { padding-left: 18px; padding-right: 18px; }
  body::before { width: 3px; }

  /* 头部防横向滚动（7.8.1） */
  .site-header .inner { flex-wrap: wrap; height: auto; padding: 10px 18px; row-gap: 6px; }
  .logo-text { font-size: 18px; }
  .logo-img { width: 32px; height: 32px; }
  .logo-text em { display: none; }
  .menu-btn { display: flex; }
  nav { display: contents; }
  .nav-links {
    position: absolute; top: 100%; left: 14px; right: 14px;
    flex-direction: column; gap: 2px; padding: 8px; margin: 0;
    background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px;
    box-shadow: 0 14px 40px rgba(28, 53, 41, .16);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-links a { padding: 11px 13px; font-size: 15px; }

  /* 布局降单列 */
  .tool-grid { grid-template-columns: 1fr; }
  .inputs { position: static; box-shadow: none; }
  .headline { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .field-pair { grid-template-columns: 1fr; }
  .idr-result, .refi-result { grid-template-columns: 1fr; }
  .foot-inner { grid-template-columns: 1fr; gap: 24px; }

  /* 字号与内边距收紧（7.8.4） */
  .hero h1 { font-size: 23px; }
  .hero { padding: 22px 0 18px; }
  .hero-sub { font-size: 14px; }
  .content-section h2 { font-size: 20px; }
  .content-section { padding: 26px 0 4px; }
  .hl-num { font-size: 30px; }
  .inputs, .sheet, .compare, .info-card, .faq-item { padding: 14px 15px; }
  .compare { padding: 16px 15px 18px; }
  .sheet-notes p { font-size: 13.5px; }
  .tab { padding: 9px 13px; font-size: 13px; }
  .ledger-table th, .ledger-table td { padding: 6px 7px; font-size: 12px; }
  .money-row input { font-size: 16px; }   /* ≥16px 防 iOS 聚焦缩放 */
  .tabs { gap: 0; }
  .tab { padding: 9px 11px; font-size: 12.5px; }

  /* 汉堡 :has 门控（7.7.3，保护无按钮的合规页/文章页） */
  .site-header .inner:not(:has(.menu-btn)) nav { display: block; }
  .site-header .inner:not(:has(.menu-btn)) .nav-links {
    position: static; opacity: 1; visibility: visible; transform: none;
    flex-direction: row; flex-wrap: wrap; gap: 6px;
    background: none; border: none; box-shadow: none; padding: 0;
    transition: none;
  }
  .site-header .inner:not(:has(.menu-btn)) .nav-links a { padding: 6px 9px; font-size: .8rem; }
}

/* ============ 断点 400px（超窄屏） ============ */

@media (max-width: 400px) {
  .plan-chips { gap: 5px; }
  .chip { padding: 7px 12px; font-size: 12px; }
  .seg-btn { font-size: 12.5px; height: 38px; }
  .step-btn { width: 38px; }
  .hl-num { font-size: 26px; }
  .stamp { display: none; }
}

/* 触屏常显（7.8.3：本站无 hover 依赖控件，占位保底） */
@media (hover: none) {
  .tab:hover, .chip:hover, .seg-btn:hover, .step-btn:hover { color: inherit; }
  .tab.active:hover, .chip.active:hover, .seg-btn.active:hover { color: #f6f3e8; }
}
