:root {
  --ink: #1e2824;
  --muted: #63706a;
  --line: #d9dfdb;
  --paper: #ffffff;
  --soft: #f5f7f5;
  --warm: #faf7ef;
  --green: #145343;
  --green-soft: #e7f0ec;
  --cathay: #2369a9;
  --cathay-soft: #eaf1f8;
  --gold: #b4882e;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans TC", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.02em; }
p { color: var(--muted); }
a { color: inherit; }
a:focus-visible { outline: 3px solid #d9b85f; outline-offset: 4px; }
.skip-link { position: fixed; z-index: 1000; top: -60px; left: 16px; padding: 8px 14px; background: white; border: 1px solid var(--line); }
.skip-link:focus { top: 0; }

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  height: 66px;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.brand { margin-right: auto; color: var(--green); font-size: 19px; font-weight: 800; text-decoration: none; }
.site-header nav { display: flex; gap: 25px; }
.site-header nav a { color: #4d5a54; font-size: 14px; font-weight: 600; text-decoration: none; }
.site-header nav a:hover { color: var(--green); }

.section { padding: 86px max(24px, calc((100vw - var(--max)) / 2)); }
.kicker { margin-bottom: 10px; color: var(--green); font-size: 13px; font-weight: 800; letter-spacing: .1em; }
.section-heading { max-width: 760px; margin-bottom: 34px; }
.section-heading h2 { margin-bottom: 12px; font-size: clamp(31px, 3.3vw, 43px); }
.section-heading > p:last-child { margin-bottom: 0; }

.overview { padding-top: 72px; background: #fff; }
.overview-heading { max-width: 880px; margin-bottom: 38px; }
.overview-heading h1 { margin-bottom: 18px; font-size: clamp(38px, 4.3vw, 56px); font-weight: 800; }
.overview-heading > p:last-child { max-width: 800px; margin-bottom: 0; font-size: 19px; }
.plan-summary { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.summary-row { display: grid; grid-template-columns: .8fr 1.3fr .8fr 1.5fr; }
.summary-row > div { min-width: 0; padding: 22px 20px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
.summary-row > div:last-child { border-right: 0; }
.summary-head { color: white; background: var(--green); font-size: 14px; font-weight: 700; }
.summary-head > div { padding-block: 13px; border-top: 0; border-right-color: rgba(255,255,255,.18); }
.summary-row strong, .summary-row small { display: block; }
.summary-row strong { margin-bottom: 4px; font-size: 18px; }
.summary-row small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.bank-pill { display: inline-block; padding: 5px 10px; border-radius: 6px; font-size: 14px; font-weight: 800; }
.bank-pill.sino { color: var(--green); background: var(--green-soft); }
.bank-pill.cathay { color: var(--cathay); background: var(--cathay-soft); }
.overview-result { display: grid; grid-template-columns: 110px 1fr; column-gap: 22px; margin-top: 22px; padding: 22px 25px; background: var(--soft); border-left: 4px solid var(--green); }
.overview-result > span { color: var(--green); font-size: 14px; font-weight: 800; }
.overview-result > strong { font-size: 19px; }
.overview-result > p { grid-column: 2; margin: 5px 0 0; font-size: 14px; }

.plan-section { background: var(--soft); }
.allocation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.allocation-card { padding: 27px; background: white; border: 1px solid var(--line); border-radius: 10px; }
.allocation-card.compact-card { min-height: 0; }
.allocation-title { display: flex; align-items: center; gap: 14px; margin-bottom: 19px; }
.allocation-title .step { flex: 0 0 auto; display: grid; width: 42px; height: 42px; place-items: center; color: var(--green); background: var(--green-soft); border-radius: 7px; font-size: 13px; font-weight: 800; }
.cathay-card .step { color: var(--cathay); background: var(--cathay-soft); }
.allocation-title small { color: var(--muted); font-size: 12px; font-weight: 700; }
.allocation-title h3 { margin: 2px 0 0; font-size: 24px; }
.allocation-card > p { margin-bottom: 0; font-size: 15px; }
.distribution-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 9px; margin: 22px 0; }
.distribution-flow div { padding: 13px; background: var(--soft); border: 1px solid var(--line); border-radius: 7px; text-align: center; }
.distribution-flow span, .distribution-flow strong { display: block; }
.distribution-flow span { color: var(--muted); font-size: 11px; }
.distribution-flow strong { font-size: 15px; }
.distribution-flow > b { color: var(--gold); }
.note { padding: 15px 17px; background: var(--warm); border-left: 3px solid var(--gold); color: #5b5342 !important; }
.qualification-line { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 8px; margin-top: 22px; }
.qualification-line div { padding: 12px; background: var(--soft); border-radius: 7px; text-align: center; }
.qualification-line span, .qualification-line strong { display: block; }
.qualification-line span { color: var(--muted); font-size: 11px; }
.qualification-line strong { font-size: 14px; }
.qualification-line > b { color: var(--gold); }
.qualification-line .qualification-result { color: white; background: var(--green); }
.qualification-line .qualification-result span { color: rgba(255,255,255,.7); }

.comparison-section { background: white; }
.section-heading .legend-crown { vertical-align: -3px; }
.crown { width: 23px; height: 18px; color: var(--gold); overflow: visible; }
.comparison-table { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.comparison-row { display: grid; grid-template-columns: .82fr 1fr 1fr; }
.comparison-row > div { position: relative; min-width: 0; padding: 24px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
.comparison-row > div:last-child { border-right: 0; }
.comparison-head { color: white; background: #2a3832; font-weight: 800; }
.comparison-head > div { display: flex; align-items: center; gap: 9px; padding-block: 14px; border-top: 0; border-right-color: rgba(255,255,255,.16); }
.bank-logo { display: inline-grid; width: 31px; height: 31px; place-items: center; color: white; border-radius: 6px; font-size: 14px; }
.bank-logo.sino { background: #26705c; }
.bank-logo.cathay { background: var(--cathay); }
.comparison-topic { background: var(--soft); }
.comparison-topic strong, .comparison-topic small { display: block; }
.comparison-topic small { margin-top: 6px; color: var(--muted); font-size: 13px; }
.comparison-row p { margin: 7px 0 0; font-size: 14px; }
.comparison-row .winner { background: #fdfaf2; }
.winner .crown { position: absolute; top: 18px; right: 18px; }
.table-note { margin: 18px 0 0; padding: 15px 18px; color: #5c574a; background: var(--warm); font-size: 14px; }

.tier-section { background: var(--soft); }
.tier-comparison { display: grid; gap: 14px; }
.tier-comparison article { display: grid; grid-template-columns: 160px 1fr; background: white; border: 1px solid var(--line); border-radius: 9px; }
.tier-amount { display: flex; align-items: center; justify-content: center; padding: 24px; color: var(--green); background: var(--green-soft); font-size: 22px; font-weight: 800; }
.tier-content { padding: 24px 28px; }
.tier-content h3 { margin: 7px 0 10px; font-size: 25px; }
.tier-content p { margin-bottom: 0; }
.tier-content ul { margin: 0; padding-left: 1.2em; color: var(--muted); }
.status-tag { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 800; }
.status-tag.current { color: white; background: var(--green); }
.status-tag.optional { color: #735b1f; background: #f5e7bd; }
.status-tag.later { color: #53605a; background: #e7ebe8; }
.rule-box { margin-top: 22px; padding: 22px 25px; background: white; border: 1px solid var(--line); }
.rule-box h3 { margin-bottom: 8px; font-size: 19px; }
.rule-box p { margin-bottom: 0; font-size: 15px; }
.fx-section { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; margin-top: 22px; padding: 26px; background: white; border: 1px solid var(--line); border-left: 5px solid var(--green); border-radius: 9px; }
.fx-heading h3 { margin-bottom: 9px; font-size: 25px; }
.fx-heading p { margin-bottom: 0; font-size: 15px; }
.fx-heading p strong { color: var(--ink); }
.fx-example { display: flex; flex-direction: column; justify-content: center; padding: 20px; background: var(--green-soft); border-radius: 7px; }
.fx-example span { color: var(--green); font-size: 13px; font-weight: 700; }
.fx-example strong { margin: 3px 0; color: var(--green); font-size: 29px; }
.fx-example small { color: var(--muted); font-size: 12px; }
.fx-snapshot { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 18px 20px; background: var(--warm); border: 1px solid #e9dfc6; }
.fx-snapshot span, .fx-snapshot strong { display: block; }
.fx-snapshot span { color: #7a652f; font-size: 12px; font-weight: 800; }
.fx-snapshot strong { margin-top: 3px; font-size: 16px; }
.fx-snapshot p { margin: 0; font-size: 13px; }
.fx-rule { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.fx-rule div { padding: 16px 18px; }
.fx-rule div + div { border-left: 1px solid var(--line); }
.fx-rule span, .fx-rule strong { display: block; }
.fx-rule span { color: var(--muted); font-size: 12px; }
.fx-rule strong { margin-top: 3px; font-size: 15px; }
.fx-section .microcopy { grid-column: 1 / -1; margin-bottom: 0; color: var(--muted); font-size: 12px; }

.world-brief { margin-top: 18px; padding: 24px 26px; background: white; border: 1px solid var(--line); border-radius: 9px; }
.world-brief-heading { display: grid; grid-template-columns: 110px 1fr; align-items: center; column-gap: 16px; }
.world-brief-heading > span { grid-row: 1 / span 2; align-self: stretch; display: grid; place-items: center; padding: 10px; color: #735b1f; background: #f5e7bd; border-radius: 6px; font-size: 13px; font-weight: 800; text-align: center; }
.world-brief-heading h3 { margin: 0; font-size: 22px; }
.world-brief-heading p { margin: 3px 0 0; font-size: 14px; }
.world-benefits { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 18px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.world-benefits div { padding: 14px 16px; border-right: 1px solid var(--line); }
.world-benefits div:last-child { border-right: 0; }
.world-benefits span, .world-benefits strong { display: block; }
.world-benefits span { color: var(--muted); font-size: 12px; }
.world-benefits strong { margin-top: 2px; font-size: 14px; }
.world-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; }

.recommendation-section { background: var(--soft); }
.recommendation-table { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 9px; }
.recommendation-row { display: grid; grid-template-columns: 230px 180px 1fr; gap: 22px; align-items: center; padding: 21px 24px; border-bottom: 1px solid var(--line); }
.recommendation-row:last-child { border-bottom: 0; }
.recommendation-row > span { color: var(--muted); font-size: 14px; font-weight: 700; }
.recommendation-row > strong { color: var(--green); }
.recommendation-row p { margin: 0; font-size: 14px; }
.optional-recommendation { background: var(--warm); }
.open-recommendation { background: #f1f3f2; }

.safety-section { display: grid; grid-template-columns: 1fr 240px; gap: 60px; align-items: center; color: white; background: #2a3832; }
.safety-section .kicker { color: #dbc686; }
.safety-section h2 { margin-bottom: 13px; font-size: 35px; }
.safety-section p { margin-bottom: 0; color: rgba(255,255,255,.72); }
.insurance-number { padding: 22px; border: 1px solid rgba(255,255,255,.2); text-align: center; }
.insurance-number span, .insurance-number strong, .insurance-number small { display: block; }
.insurance-number span, .insurance-number small { color: rgba(255,255,255,.65); font-size: 12px; }
.insurance-number strong { color: #e6cf8e; font-size: 31px; }

.sources-section { background: white; }
.source-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.source-grid article { padding: 18px; border: 1px solid var(--line); border-radius: 7px; }
.source-grid article > span { color: var(--green); font-size: 11px; font-weight: 800; }
.source-grid h3 { margin: 5px 0 13px; font-size: 17px; }
.source-grid a { color: var(--green); font-size: 13px; font-weight: 700; }
.disclaimer { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; }
footer { display: flex; justify-content: space-between; padding: 25px max(24px, calc((100vw - var(--max)) / 2)); color: #68736e; background: var(--soft); border-top: 1px solid var(--line); font-size: 13px; }
.svg-defs { position: absolute; }

@media (max-width: 900px) {
  .summary-row { grid-template-columns: .8fr 1.2fr 1fr; }
  .summary-row > div:last-child { grid-column: 1 / -1; border-top: 1px dashed var(--line); border-right: 0; padding-top: 13px; padding-bottom: 13px; }
  .summary-head > div:last-child { display: none; }
  .allocation-grid { grid-template-columns: 1fr; }
  .source-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  html { scroll-padding-top: 62px; }
  .site-header { height: 58px; padding-inline: 16px; }
  .brand { font-size: 17px; }
  .site-header nav { display: none; }
  .section { padding: 62px 17px; }
  .overview { padding-top: 49px; }
  .overview-heading h1 { font-size: 36px; }
  .overview-heading > p:last-child { font-size: 17px; }
  .summary-row.summary-head { display: none; }
  .summary-row { display: block; padding: 18px; border-top: 1px solid var(--line); }
  .summary-row:first-of-type { border-top: 0; }
  .summary-row > div { display: grid; grid-template-columns: 92px 1fr; padding: 8px 0; border: 0 !important; }
  .summary-row > div::before { color: var(--muted); font-size: 12px; font-weight: 700; }
  .summary-row > div:nth-child(1)::before { content: "金額"; }
  .summary-row > div:nth-child(2)::before { content: "用途"; }
  .summary-row > div:nth-child(3)::before { content: "銀行"; }
  .summary-row > div:nth-child(4)::before { content: "理由"; }
  .summary-row strong, .summary-row small, .bank-pill { grid-column: 2; }
  .overview-result { grid-template-columns: 1fr; gap: 6px; padding: 18px; }
  .overview-result > p { grid-column: 1; }
  .allocation-card { padding: 22px 19px; }
  .distribution-flow, .qualification-line { grid-template-columns: 1fr; }
  .distribution-flow > b, .qualification-line > b { transform: rotate(90deg); text-align: center; }
  .comparison-head { display: none; }
  .comparison-row { display: block; border-top: 7px solid var(--soft); }
  .comparison-row > div { padding: 20px 18px; border-right: 0; }
  .comparison-topic { border-top: 0 !important; }
  .comparison-row > div:nth-child(2)::before, .comparison-row > div:nth-child(3)::before { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 800; }
  .comparison-row > div:nth-child(2)::before { content: "永豐銀行"; color: var(--green); }
  .comparison-row > div:nth-child(3)::before { content: "國泰世華"; color: var(--cathay); }
  .tier-comparison article { grid-template-columns: 1fr; }
  .tier-amount { justify-content: flex-start; padding: 14px 20px; }
  .tier-content { padding: 20px; }
  .fx-section { grid-template-columns: 1fr; padding: 22px 19px; }
  .fx-snapshot, .fx-rule { grid-column: 1; grid-template-columns: 1fr; gap: 10px; }
  .fx-rule div + div { border-top: 1px solid var(--line); border-left: 0; }
  .fx-section .microcopy { grid-column: 1; }
  .world-brief { padding: 20px 18px; }
  .world-brief-heading { grid-template-columns: 1fr; }
  .world-brief-heading > span { grid-row: auto; justify-self: start; margin-bottom: 10px; }
  .world-benefits { grid-template-columns: 1fr 1fr; }
  .world-benefits div { border-bottom: 1px solid var(--line); }
  .world-benefits div:nth-child(2n) { border-right: 0; }
  .world-benefits div:nth-last-child(-n+2) { border-bottom: 0; }
  .recommendation-row { grid-template-columns: 1fr; gap: 4px; padding: 18px; }
  .safety-section { grid-template-columns: 1fr; gap: 27px; }
  .insurance-number { max-width: 230px; }
  .source-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

@media print {
  .site-header, footer { display: none; }
  .section { padding: 32px 0; }
  body { font-size: 12pt; }
}
