/* 2026-12-02：全站連結與手機輸入密度統一。 */
a, a:link, a:visited, a:hover, a:focus { text-decoration: none !important; }
[data-ad-reserved][hidden]{display:none!important}
.site-ad.ad-active,.article-ad.ad-active{display:block;min-height:90px;max-width:980px;margin:18px auto}
.site-legal-links{display:flex;justify-content:center;gap:16px;flex-wrap:wrap;margin:20px auto 8px;font-size:.82rem}
@media(max-width:600px){.site-footer .footer-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;text-align:center}.site-footer .footer-links a{min-width:0;overflow-wrap:anywhere}.site-footer .site-legal-links{gap:8px 18px;margin:18px auto 8px;padding:0 14px}.site-footer .site-legal-links a{white-space:nowrap}}
img,canvas{-webkit-touch-callout:default}
@media print { [data-ad-reserved], .site-ad, .article-ad, .site-legal-links, .site-footer, .page-update { display:none!important; } }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #08776b; outline-offset: 2px; }
/* 可操作元件在滑鼠、鍵盤與觸控下都有可辨認的回饋。 */
@media (hover:hover){
  button:not(:disabled):hover,a.btn:hover,[role="button"]:hover{filter:brightness(.9);box-shadow:0 4px 12px #214e3b30}
  .filter-pill.active:hover{background:#173d2d!important;border-color:#173d2d!important;color:#fff!important}
  .article-prevnext a:hover,.guide-tool-links a:hover,.tool-guide-links a:hover{background:#dce9dc;color:#173d2d;box-shadow:inset 0 0 0 1px #214e3b}
  .page-guides .article-card h2 a:hover{color:#12604a;text-decoration:underline!important;text-underline-offset:3px}
}
button:not(:disabled):active,a.btn:active,[role="button"]:active{transform:translateY(1px);filter:brightness(.82)}
@media (max-width: 600px) {
  button, .tab-btn, [role="button"] { line-height: 1.3; }
  input, select, textarea { max-width: 100%; font-size: 16px; }
  .debt-wrap, .invest-wrap, .saving-wrap, .career-wrap { padding-bottom: 42px; }
  .debt-hero, .invest-hero, .saving-hero, .career-hero { padding: 18px !important; border-radius: 16px !important; }
  .debt-hero h1, .invest-hero h1, .saving-hero h1, .career-hero h1 { font-size: 1.55rem !important; line-height: 1.3; }
  .debt-main, .invest-main, .saving-main, .career-main { padding: 16px !important; }
  .debt-inputs, .invest-inputs, .saving-inputs, .career-inputs { gap: 10px !important; }
  .debt-field, .invest-field, .saving-field, .career-field { margin-bottom: 0 !important; }
  .debt-action, .invest-action, .saving-action, .career-action { min-height: 42px !important; padding: 9px 16px !important; }
  .debt-results, .invest-results, .saving-results, .career-results { gap: 8px !important; }
}
/* 目錄進入的試算網址採獨立閱讀模式，先呈現輸入欄位。 */
body.tool-focus .debt-menu, body.tool-focus .invest-menu, body.tool-focus .saving-menu, body.tool-focus .career-menu,
body.tool-focus .tool-tabs, body.tool-focus .quick-intro { display: none !important; }
body.tool-focus .debt-layout, body.tool-focus .invest-layout, body.tool-focus .saving-layout, body.tool-focus .career-layout { display: block !important; max-width: 920px; margin-inline: auto; }
body.tool-focus .debt-hero, body.tool-focus .invest-hero, body.tool-focus .saving-hero, body.tool-focus .career-hero { padding: 17px 22px !important; border-radius: 16px !important; }
body.tool-focus .debt-hero h1, body.tool-focus .invest-hero h1, body.tool-focus .saving-hero h1, body.tool-focus .career-hero h1 { font-size: clamp(1.15rem, 4vw, 1.55rem) !important; margin: 0 0 3px !important; }
body.tool-focus .debt-hero p:not([class*="meta"]), body.tool-focus .invest-hero p:not([class*="meta"]), body.tool-focus .saving-hero p:not([class*="meta"]), body.tool-focus .career-hero p:not([class*="meta"]) { display: none; }
body.tool-focus .debt-layout, body.tool-focus .invest-layout, body.tool-focus .saving-layout, body.tool-focus .career-layout { margin-top: 10px !important; }
body.tool-focus .quick-wrap { padding-top: 8px; }
body.tool-focus .quick-wrap .tab-panel.active { margin-top: 0; }
.quick-disclosure { border: 1px solid #e0e8df; border-radius: 9px; padding: 6px 9px; margin: 8px 0; color: #536760; font-size: .72rem; }
.quick-disclosure summary { cursor: pointer; font-weight: 700; }
.quick-disclosure .card-desc { margin: 7px 0 0; }
.page-update { color: #61746b; font-size: .75rem; margin: 14px 0; }
.year-note { font-size: .75rem !important; line-height: 1.5 !important; color: #355e53 !important; background: #e9f4ea; border-radius: 8px; padding: 7px 10px; margin: 0 0 12px !important; }
.formula-details { margin-top: 18px; padding-top: 10px; border-top: 1px solid #e0e9e3; }
.formula-details summary { cursor: pointer; color: #12635b; font-weight: 800; font-size: .82rem; }
.formula-details[open] summary { margin-bottom: 8px; }
.formula-disclaimer { font-size: .75rem !important; line-height: 1.55 !important; color: #61746b !important; margin: 10px 0 0 !important; }
.mobile-explanation { margin: 10px 0; border-top: 1px solid #e0e9e3; padding-top: 8px; }
.mobile-explanation summary { color: #12635b; font-weight: 800; font-size: .82rem; cursor: pointer; }
.mobile-explanation[open] summary { margin-bottom: 8px; }
@media (max-width: 600px) {
  body.tool-focus .debt-hero, body.tool-focus .invest-hero, body.tool-focus .saving-hero, body.tool-focus .career-hero { padding: 11px 15px !important; }
  body.tool-focus .debt-hero p[class*="meta"], body.tool-focus .invest-hero p[class*="meta"], body.tool-focus .saving-hero p[class*="meta"], body.tool-focus .career-hero p[class*="meta"] { font-size: .68rem !important; margin-top: 4px !important; line-height: 1.35; }
  body.tool-focus .debt-main h2, body.tool-focus .invest-main h2, body.tool-focus .saving-main h2, body.tool-focus .career-main h2 { font-size: 1.3rem !important; }
  body.tool-focus .quick-wrap .card { padding: 16px !important; }
  body.tool-focus .quick-wrap .card-desc { line-height: 1.45; margin-block: 5px 9px; }
  .hall-hero { padding: 12px 15px !important; }
  .hall-hero h1 { font-size: 1.35rem !important; margin: 2px 0 4px !important; }
  .hall-hero p { font-size: .73rem !important; line-height: 1.4 !important; }
  .hall-summary { margin-top: 6px !important; }
  .hall-controls { gap: 7px !important; margin: 10px 0 !important; }
  .hall-search label, .hall-jump label { margin-bottom: 3px !important; }
  .hall-filters button { min-height: 35px; padding: 6px 9px !important; }
}

/* 算盤仔視覺系統：沿用墨綠與米白，統一字級、留白和純文字符號。 */
:root {
  --bg: #f5f7f3;
  --surface-muted: #eff4ee;
  --border: #d9e5dd;
  --border-strong: #b9d1c3;
  --ink: #183631;
  --ink-secondary: #405b53;
  --ink-muted: #5d746b;
  --primary: #14584f;
  --primary-hover: #0e453e;
  --accent: #98651d;
  --accent-soft: #fbf1dc;
  --shadow-sm: 0 5px 20px rgba(25, 67, 53, .055);
}
body { background: var(--bg); color: var(--ink); }
button, input, select, textarea { font-family: inherit; }
input, select, textarea { accent-color: var(--primary); }
.topbar { background: rgba(250, 252, 249, .96); box-shadow: 0 1px 0 rgba(17, 70, 52, .04); }
.brand-mark { background: #174f46; box-shadow: none; }
.article-shell { max-width: 900px; }
.article-shell .article-card { border-color: var(--border); box-shadow: var(--shadow-sm); }
.article-shell .article-card h1 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); line-height: 1.32; letter-spacing: -.025em; margin: 8px 0 20px; }
.article-shell .article-card p, .article-shell .article-card li { font-size: 1rem; line-height: 1.75; }
.article-shell .article-card h2, .article-shell .article-card h3 { line-height: 1.4; }
.article-meta { color: #6e511e; background: #fbf0d5; }
.page-guides .article-shell { max-width: 1040px; }
.page-guides .hero { text-align: left; padding: 30px 34px; border-radius: 18px; background: linear-gradient(125deg, #153f39, #1d6256); box-shadow: none; }
.page-guides .hero::after { display: none; }
.page-guides .hero-badge { background: #f5f1df; color: #564924; border: 0; border-radius: 6px; padding: 5px 10px; }
.page-guides .hero h1 { font-size: clamp(1.6rem, 3.3vw, 2.5rem); letter-spacing: -.03em; }
.page-guides .hero h1 span { color: #cde7d8; }
.page-guides .hero p { max-width: 680px; line-height: 1.65; }
.page-guides .hero p { margin-left: 0; margin-right: 0; text-align: left; }
.page-guides .article-card { padding: 22px 26px; }
.hall-icon { font-family: ui-monospace, Consolas, monospace; font-size: .9rem !important; font-weight: 800; letter-spacing: .02em; color: #14584f; background: #e6f1e9; border: 1px solid #cbe1d2; }
.hall-card { box-shadow: var(--shadow-sm); border-color: var(--border); }
.hall-card-head { border-bottom: 1px solid #edf2ee; padding-bottom: 13px; }
.hall-tools li { background: #f5f8f5; }
.hall-tools li:hover { background: #e9f3ec; }
.quick-wrap .tool-tabs { background: #edf3ed; border: 1px solid var(--border); border-radius: 15px; }
.quick-wrap .tab-btn { font-variant-numeric: tabular-nums; }
.quick-wrap .card { border-color: var(--border); box-shadow: var(--shadow-sm); }
.debt-main, .invest-main, .saving-main, .career-main, .tax-main { box-shadow: var(--shadow-sm); }
.debt-field input:focus, .invest-field input:focus, .saving-field input:focus, .career-field input:focus { border-color: #267c69; outline: 2px solid #b7ddc9; outline-offset: 1px; }
@media (max-width: 600px) {
  .topbar { position: static; }
  .topbar-inner { flex-wrap: nowrap; gap: 8px; padding: 8px 14px; }
  .topbar-inner .brand { width: auto; min-width: 0; font-size: .93rem; }
  .topbar-inner .brand small { display: none; }
  .topbar-actions { display: flex; width: auto; gap: 6px; }
  .topbar-actions .btn { padding: 7px 9px; font-size: .74rem; white-space: nowrap; }
  .article-shell { padding: 16px 14px 48px; }
  .article-shell .article-card { padding: 18px; border-radius: 16px; }
  .article-shell .article-card h1 { font-size: 1.55rem; margin: 6px 0 15px; }
  .page-guides .hero { padding: 22px 18px; margin-bottom: 18px !important; }
  .page-guides .hero h1 { font-size: 1.55rem; }
  .page-guides .hero-badge { font-size: .72rem; }
  .page-guides .article-card { padding: 17px; }
}

/* 04 雜誌故事型共用視覺：工具與政策頁延續首頁的紙張、墨色與酒紅。 */
:root{--bg:#faf7f1;--surface:#fffdf8;--surface-muted:#eee8db;--border:#d7cfc4;--border-strong:#b8ada1;--ink:#282621;--ink-secondary:#514c43;--ink-muted:#675f54;--primary:#214e3b;--primary-hover:#173d2d;--primary-soft:#e4eee4;--accent:#214e3b;--accent-soft:#e4eee4}
body{background:#faf7f1;color:#282621}
.topbar{background:#faf7f1;border-bottom:2px solid #282621;box-shadow:none}
.brand-mark{background:#214e3b;border-radius:0}
.article-shell .article-card{background:transparent;border:0;border-top:2px solid #282621;border-radius:0;box-shadow:none}
.article-shell .article-card h1,.article-shell .article-card h2{font-family:"Noto Serif TC","PMingLiU",serif}
.quick-header{border-bottom:2px solid #282621}
.quick-brand span{background:#214e3b;border-radius:0}
.quick-intro h1{font-family:"Noto Serif TC","PMingLiU",serif}
.quick-wrap .tool-tabs{background:transparent;border:0;border-bottom:1px solid #b8ada1;border-radius:0}
.quick-wrap .card{border-radius:0;border-color:#d7cfc4;box-shadow:none}
:is(.debt-hero,.career-hero,.saving-hero,.invest-hero,.tax-hero){background:#f3ecdf!important;color:#282621!important;border-top:2px solid #282621;border-bottom:1px solid #b8ada1;border-radius:0!important;box-shadow:none!important}
:is(.debt-hero,.career-hero,.saving-hero,.invest-hero,.tax-hero) h1{font-family:"Noto Serif TC","PMingLiU",serif;color:#282621!important}
:is(.debt-hero,.career-hero,.saving-hero,.invest-hero,.tax-hero) p{color:#514c43!important}
:is(.debt-main,.career-main,.saving-main,.invest-main,.tax-main){border-radius:0!important;box-shadow:none!important}
:is(.debt-menu,.career-menu,.saving-menu,.invest-menu,.tax-menu){border-radius:0!important;box-shadow:none!important}
:is(.debt-list,.career-list,.saving-list,.invest-list,.tax-list) button[aria-current="true"]{background:#e4eee4!important;color:#214e3b!important;border-radius:0!important}
:is(.debt-field,.career-field,.saving-field,.invest-field,.tax-field) input,:is(.debt-field,.career-field,.saving-field,.invest-field,.tax-field) select{border-color:#b8ada1!important;border-radius:0!important;background:#fffdf8!important}
:is(.debt-action,.career-action,.saving-action,.invest-action,.tax-action){background:#214e3b!important;border-radius:0!important}
.site-legal-links a,.site-copyright{color:#214e3b}
:is(.debt-top,.career-top,.saving-top,.invest-top,.tax-top,.debt-links,.career-links,.saving-links,.invest-links,.tax-links) a{color:#214e3b!important}

/* 手機版按鈕：同一組等寬等高，長名稱換行也不擠出畫面。 */
@media(max-width:600px){
 :is(.debt-list,.career-list,.saving-list,.invest-list,.tax-list){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;overflow:visible!important;margin-right:0!important;padding:0!important;scroll-snap-type:none!important}
 :is(.debt-list,.career-list,.saving-list,.invest-list,.tax-list) button{width:100%!important;min-width:0!important;min-height:46px!important;white-space:normal!important;text-align:center!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:7px 6px!important;font-size:.76rem!important;line-height:1.3!important;border:1px solid #c7bbae!important;border-radius:0!important;overflow-wrap:anywhere}
 :is(.debt-action,.career-action,.saving-action,.invest-action,.tax-action){width:100%!important;min-height:46px!important;text-align:center!important}
 :is(.debt-actions,.career-actions,.saving-actions,.invest-actions,.tax-actions){display:block!important}
 .filter-pills{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;justify-content:stretch}
 .filter-pills .filter-pill{width:100%;min-width:0;min-height:44px;display:flex;align-items:center;justify-content:center;text-align:center;white-space:normal;padding:7px 6px;font-size:.75rem;line-height:1.3;border-radius:0}
 .home-hero .hero-actions,.home-next .next-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .home-hero .hero-actions a,.home-next .next-links a{width:100%;min-width:0;min-height:42px;display:flex;align-items:center;justify-content:center;text-align:center;white-space:normal;padding:8px 5px;font-size:.75rem;line-height:1.3}
}
