/* RANTAW: institutional banking palette (white, deep navy, steel blue, cool grey). Variable names kept for compatibility. */
:root {
  --paper: #FFFFFF;
  --stone: #F2F4F7;          /* cool grey: alternate section */
  --ivory: #F2F4F7;          /* legacy alias */
  --charcoal: #0B1F3A;       /* deep navy: primary dark */
  --ink: #141B26;            /* body text */
  --terracotta: #2B6CB0;     /* steel blue: rules, links, small accents only */
  --terracotta-dark: #1F4F85;
  --white: #FFFFFF;
  --gray: #F7F8FA;
  --line: #D7DDE5;
  --muted: #4F5A69;
  --on-dark: #E6ECF3;
  --on-dark-muted: #A9B7C9;
  --ok: #2F6B4A;
  --err: #8F2F1C;
  --radius: 2px;
  --font-head: 'Source Serif 4', 'Noto Serif TC', Georgia, serif;
  --font-body: 'Public Sans', 'Noto Sans TC', system-ui, sans-serif;
  --max: 1200px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--paper); line-height: 1.6; font-size: 16.5px; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 400; line-height: 1.12; margin: 0 0 .55em; letter-spacing: -0.012em; color: var(--charcoal); }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); font-weight: 300; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 300; }
h3 { font-size: 1.3rem; font-weight: 500; letter-spacing: 0; }
h4 { font-family: var(--font-body); font-size: .9rem; font-weight: 600; color: var(--ink); }
p { margin: 0 0 1em; }
.num, .price, table td, .tabular, input { font-variant-numeric: tabular-nums lining-nums; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .container { padding: 0 20px; } }
.section { padding: 112px 0; }
.section.tight { padding: 72px 0; }
.section.white { background: var(--stone); }
.section.dark { background: var(--charcoal); color: var(--on-dark); }
.section.dark h2, .section.dark h3 { color: #fff; }
.eyebrow { display: none; }  /* labels above headings removed by design */
.lead { font-size: 1.18rem; color: var(--muted); max-width: 620px; line-height: 1.55; }
.dark .lead { color: var(--on-dark-muted); }
.center { text-align: left; }   /* layout is left-aligned throughout */
.muted { color: var(--muted); }
.small { font-size: .875rem; }
a:focus-visible, button:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; }

/* Buttons: rectangular, quiet */
.btn { display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-body); font-weight: 600; font-size: .95rem; padding: 15px 26px; border-radius: var(--radius); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; letter-spacing: .005em; }
.btn-primary, .btn-dark { background: var(--charcoal); color: #fff; }
.btn-primary:hover, .btn-dark:hover { background: #16335C; }
.btn-outline { border-color: var(--charcoal); color: var(--charcoal); background: transparent; }
.btn-outline:hover { background: var(--charcoal); color: #fff; }
.dark .btn-primary, .hero .btn-primary { background: #fff; color: var(--charcoal); }
.dark .btn-primary:hover, .hero .btn-primary:hover { background: var(--on-dark); }
.dark .btn-outline, .hero .btn-outline { border-color: rgba(255,255,255,.55); color: #fff; }
.dark .btn-outline:hover, .hero .btn-outline:hover { background: rgba(255,255,255,.08); border-color: #fff; }
.btn-sm { padding: 10px 18px; font-size: .875rem; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn:disabled { opacity: .55; cursor: default; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 16px; max-width: 1360px; }
.logo { font-family: var(--font-head); font-weight: 600; font-size: 1.45rem; text-decoration: none; letter-spacing: .16em; color: var(--charcoal); }
.logo-mark { display: none; }
.nav-links { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-size: .87rem; font-weight: 500; padding: 8px 8px; color: #2A3442; white-space: nowrap; border-bottom: 1px solid transparent; }
.nav-links a:hover { color: var(--charcoal); border-bottom-color: var(--terracotta); }
.nav-links a[aria-current="page"] { color: var(--charcoal); border-bottom-color: var(--charcoal); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang-select { font: inherit; font-size: .85rem; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 7px 8px; color: var(--ink); }
.nav-login { text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.nav-cta { white-space: nowrap; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); width: 42px; height: 42px; cursor: pointer; color: var(--charcoal); }
.menu-toggle svg { margin: auto; }
@media (max-width: 1300px) {
  .nav-links { display: none; position: absolute; top: 76px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 8px 20px 20px; border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 13px 0; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .menu-toggle { display: grid; }
  .nav-actions .nav-cta { display: none; }
}
@media (max-width: 480px) { .nav-login { display: none; } }

/* Hero: the one memorable element is the corridor route on the right */
.hero { background: var(--charcoal); color: var(--on-dark); padding: 104px 0 112px; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .lead { color: var(--on-dark-muted); margin-bottom: 36px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 72px; align-items: center; }
.hero-note { margin-top: 28px; font-size: .875rem; color: var(--on-dark-muted); display: flex; gap: 28px; flex-wrap: wrap; }
.route { position: relative; padding-left: 36px; margin: 0; list-style: none; }
.route::before { content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 1px; background: #7FA6D6; transform-origin: top; animation: draw 1.4s ease-out .2s both; }
.route li { position: relative; padding: 0 0 26px; }
.route li:last-child { padding-bottom: 0; }
.route li::before { content: ""; position: absolute; left: -35px; top: 8px; width: 11px; height: 11px; border-radius: 50%; background: var(--charcoal); border: 1px solid #7FA6D6; }
.route li:first-child::before, .route li:last-child::before { background: #7FA6D6; }
.route strong { display: block; font-family: var(--font-head); font-weight: 400; font-size: 1.25rem; color: #fff; }
.route span { font-size: .875rem; color: var(--on-dark-muted); }
.route-caption { font-size: .85rem; color: var(--on-dark-muted); margin: 0 0 22px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.14); }
@keyframes draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 56px; } .hero { padding: 64px 0 72px; } .section { padding: 80px 0; } }

/* Grids: editorial columns separated by rules, not boxed cards */
.grid { display: grid; gap: 40px 36px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1000px) { .g4, .g5, .g3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g2, .g3, .g4, .g5 { grid-template-columns: 1fr; } }
.card { border-top: 1px solid var(--charcoal); padding: 22px 0 0; background: none; }
.card.soft, .card.gray { border-top-color: var(--line); }
.dark .card { border-top-color: rgba(255,255,255,.25); }
.card h3 { margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }
.icon { display: none; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { padding: 7px 0 7px 22px; position: relative; font-size: .95rem; border-bottom: 1px solid var(--line); }
.check-list li:last-child { border-bottom: 0; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 17px; width: 10px; height: 1px; background: var(--terracotta); }
.x-list li { color: var(--muted); }
.x-list li::before { background: var(--muted); }
.section-head { margin-bottom: 56px; max-width: 760px; }
.dark .reveal p, .dark p { color: var(--on-dark-muted); }

/* Sequences (real steps only) */
.step { border-top: 1px solid var(--charcoal); padding-top: 18px; }
.step-num { display: block; font-family: var(--font-head); font-size: 2.2rem; font-weight: 300; color: var(--terracotta); line-height: 1; margin-bottom: 18px; font-variant-numeric: lining-nums; }
.step h3 { font-size: 1.12rem; }

/* Pricing */
.price-card { display: flex; flex-direction: column; }
.price-row { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.price-row:last-of-type { border-bottom: 0; }
.price-row .price { font-weight: 600; white-space: nowrap; }
.price-big { font-family: var(--font-head); font-size: 2.5rem; font-weight: 300; color: var(--charcoal); line-height: 1.1; }
.price-big small { font-family: var(--font-body); font-size: .85rem; font-weight: 400; color: var(--muted); }
.tag { display: inline-block; font-size: .85rem; font-weight: 600; color: var(--charcoal); }
.tag.dark { color: var(--charcoal); }
.min-card { border-top: 3px solid var(--charcoal); }
.notice { background: var(--stone); border-left: 2px solid var(--terracotta); padding: 18px 22px; font-size: .92rem; }
.section.white .notice { background: #fff; }
.notice strong { color: var(--charcoal); }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th, table.data td { text-align: left; padding: 12px 8px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-size: .85rem; font-weight: 600; color: var(--muted); border-bottom-color: var(--charcoal); }
table.data td.r, table.data th.r { text-align: right; padding-right: 0; }
.table-wrap { overflow-x: auto; }

/* Services detail */
.service-detail { display: grid; grid-template-columns: 300px 1fr; gap: 48px; padding: 56px 0; border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.service-detail:first-of-type { border-top: 0; padding-top: 16px; }
.service-detail h2 { font-size: 1.85rem !important; }
.service-detail .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.service-detail h4 { margin: 0 0 8px; }
.service-detail p + h4, .service-detail ul + h4 { margin-top: 22px; }
.provider { display: block; font-size: .85rem; color: var(--muted); margin-top: 6px; padding-left: 12px; border-left: 2px solid var(--terracotta); }
.provider.us { border-left-color: var(--charcoal); color: var(--charcoal); font-weight: 600; }
@media (max-width: 900px) { .service-detail { grid-template-columns: 1fr; gap: 20px; } .service-detail .cols { grid-template-columns: 1fr; } }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--charcoal); }
.faq summary { cursor: pointer; padding: 22px 0; font-family: var(--font-head); font-size: 1.2rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; color: var(--charcoal); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-body); font-weight: 300; font-size: 1.5rem; line-height: 1; color: var(--terracotta); }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 24px; color: var(--muted); max-width: 70ch; }
.faq h3 { font-size: 1rem; font-family: var(--font-body); font-weight: 600; color: var(--muted); }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.hint { font-weight: 400; color: var(--muted); font-size: .8rem; }
input, select, textarea { width: 100%; font: inherit; font-size: .97rem; padding: 12px 14px; border: 1px solid #C5CED9; border-radius: var(--radius); background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--charcoal); outline-offset: 0; border-color: var(--charcoal); }
textarea { min-height: 120px; resize: vertical; }
.checkbox { display: flex; gap: 10px; align-items: center; font-weight: 500; font-size: .95rem; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--charcoal); }
.form-status { margin-top: 16px; font-size: .92rem; padding: 14px 16px; display: none; border-left: 2px solid; }
.form-status.show { display: block; }
.form-status.ok { background: #EEF4F0; color: var(--ok); border-color: var(--ok); }
.form-status.err { background: #F9ECEA; color: var(--err); border-color: var(--err); }

/* Calculator: the total is the focal point of this page */
.calc-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: start; }
#calc.card { border-top: 1px solid var(--charcoal); }
.calc-group { margin-bottom: 36px; }
.calc-group > h3 { font-size: 1.15rem; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.calc-result.card { position: sticky; top: 100px; background: var(--stone); border-top: 3px solid var(--charcoal); padding: 28px 28px 24px; }
.result-line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: .92rem; border-bottom: 1px solid var(--line); }
.result-line .num { font-weight: 600; white-space: nowrap; }
.result-line.sub { padding-left: 14px; color: var(--muted); font-size: .85rem; }
.result-line.adj { color: var(--terracotta-dark); }
.result-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0 4px; flex-wrap: wrap; }
.result-total .num { font-family: var(--font-head); font-size: 2.9rem; font-weight: 300; color: var(--charcoal); line-height: 1.05; }
.result-label { font-size: .9rem; font-weight: 600; color: var(--muted); margin: 0; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kpi { padding: 14px 0; }
.kpi + .kpi { padding-left: 18px; border-left: 1px solid var(--line); }
.kpi .num { font-family: var(--font-head); font-size: 1.45rem; display: block; color: var(--charcoal); }
.kpi span:last-child { font-size: .8rem; color: var(--muted); }
@media (max-width: 960px) { .calc-layout { grid-template-columns: 1fr; } .calc-result.card { position: static; } }

/* Footer */
.site-footer { background: var(--charcoal); color: var(--on-dark-muted); padding: 72px 0 36px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 36px; }
.site-footer h4 { color: #fff; font-size: .9rem; margin-bottom: 12px; }
.site-footer a { text-decoration: none; display: block; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.site-footer .logo { color: #fff; margin-bottom: 16px; display: inline-block; }
.footer-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.14); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: .8rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

.narrow > * { max-width: 820px; }
.narrow > .grid, .narrow > .btn-row { max-width: 980px; }

/* Page header for inner pages */
.page-head { padding: 88px 0 48px; border-bottom: 1px solid var(--line); margin-bottom: 0; }
.page-head h1 { max-width: 20ch; }
.page-head .lead { margin-top: 8px; }

/* Static content, no scroll animations */
.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .route::before { animation: none; } }

/* Print (calculator estimate) */
@media print {
  .site-header, .site-footer, .no-print, .calc-inputs, .page-head { display: none !important; }
  .calc-layout { grid-template-columns: 1fr; }
  .calc-result.card { position: static; background: #fff; }
  .print-only { display: block !important; }
}
.print-only { display: none; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 100; }

/* Hide content briefly while a non-English translation is applied (avoids an English flash). */
.i18n-pending main, .i18n-pending .site-footer { visibility: hidden; }
