/* Design system: warm paper, ink blue and transit orange; 4/8/16/24/40 spacing. */
:root {
  color-scheme: light;
  --paper: oklch(97% .012 88);
  --surface: oklch(99.3% .005 88);
  --surface-warm: oklch(94.5% .019 88);
  --ink: oklch(25% .032 235);
  --ink-soft: oklch(39% .025 235);
  --muted: oklch(52% .022 230);
  --line: oklch(85% .018 85);
  --line-soft: oklch(91% .012 85);
  --accent: oklch(51% .16 38);
  --accent-soft: oklch(93% .035 48);
  --navy: oklch(30% .05 235);
  --display: 'Noto Serif TC', serif;
  --ui: 'Outfit', 'Noto Sans TC', sans-serif;
  font-family: var(--ui);
  font-synthesis: none;
  scroll-behavior: smooth;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p, dl, dd { margin: 0; }
.skip-link { position: fixed; z-index: 100; left: 16px; top: 12px; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); padding: 10px 14px; background: var(--ink); color: white; text-decoration: none; }
.skip-link:focus { width: auto; height: auto; overflow: visible; clip-path: none; }
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner { height: 78px; max-width: 1432px; margin: 0 auto; padding: 0 48px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; color: var(--surface); background: var(--navy); }
.brand-mark svg { width: 32px; height: 32px; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-family: var(--display); font-size: 15px; font-weight: 900; letter-spacing: .1em; }
.brand-copy span { color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .15em; }
.header-right { display: flex; align-items: center; gap: 32px; }
.header-note { color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.header-link { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 12px; font-weight: 600; text-decoration: none; }
.header-link span { color: var(--accent); font-size: 16px; }
.header-link:hover { color: var(--accent); }
.page-shell { max-width: 1432px; margin: 0 auto; padding: 0 48px; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 32px; padding: 54px 0 47px; }
.eyebrow, .section-kicker { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--accent); }
.eyebrow-symbol { display: block; width: 8px; height: 8px; background: var(--accent); transform: rotate(45deg); }
h1 { margin-top: 20px; font-family: var(--display); font-size: clamp(36px, 4.1vw, 55px); font-weight: 900; line-height: 1.35; letter-spacing: .035em; }
h1 em { color: var(--accent); font-style: normal; }
.intro-description { margin-top: 18px; color: var(--ink-soft); font-size: 13px; line-height: 1.9; letter-spacing: .035em; }
.intro-aside { display: grid; grid-template-columns: auto 45px auto; align-items: center; gap: 13px; padding-bottom: 3px; color: var(--ink-soft); font-size: 10px; font-weight: 600; line-height: 1.55; letter-spacing: .1em; }
.intro-rule { height: 1px; background: var(--line); }
.intro-number { grid-column: 1 / -1; color: var(--muted); text-align: right; letter-spacing: .14em; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.17fr) minmax(380px, .83fr); align-items: start; gap: 22px; }
.planner { min-width: 0; display: grid; gap: 22px; }
.planner-section, .result-card, .insight-card, .method-card { min-width: 0; background: var(--surface); border: 1px solid var(--line); }
.planner-section { padding: 30px 32px; }
.section-heading { display: flex; align-items: start; gap: 17px; }
.step-number { min-width: 44px; padding-top: 1px; color: var(--accent); font-size: 30px; font-weight: 500; line-height: 1; letter-spacing: -.04em; }
.step-number span { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .06em; }
.heading-copy { flex: 1; min-width: 0; }
.heading-copy h2 { margin-top: 5px; font-family: var(--display); font-size: 23px; font-weight: 700; line-height: 1.4; letter-spacing: .03em; }
.heading-copy > p:last-child { margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.sample-tag { flex-shrink: 0; padding: 6px 9px; color: var(--accent); border: 1px solid oklch(82% .06 50); background: var(--accent-soft); font-size: 10px; font-weight: 600; }
.location-fields { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.location-rail { width: 12px; flex: 0 0 12px; height: 94px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rail-dot { width: 10px; height: 10px; border: 2px solid var(--navy); border-radius: 50%; background: var(--surface); }
.work-dot { border-color: var(--accent); background: var(--accent); }
.rail-line { height: 49px; border-left: 1px dashed var(--line); }
.location-inputs { display: grid; gap: 8px; flex: 1; min-width: 0; }
.location-row { display: flex; align-items: center; gap: 9px; min-width: 0; }
.location-row > label { width: 34px; flex: 0 0 34px; color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.3; }
.location-row > label span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 9px; font-weight: 500; }
.search-wrap { flex: 1; min-width: 0; position: relative; }
.search-wrap input { width: 100%; height: 46px; padding: 0 36px 0 12px; border: 1px solid var(--line); border-radius: 0; color: var(--ink); background: var(--surface); font-size: 13px; text-overflow: ellipsis; transition: border-color 160ms ease-out, background 160ms ease-out; }
.search-wrap input:focus { outline: none; border-color: var(--accent); background: white; }
.search-wrap input::placeholder { color: oklch(67% .018 230); }
.search-icon { position: absolute; top: 13px; right: 11px; height: 19px; color: var(--muted); pointer-events: none; }
.search-icon svg { width: 19px; height: 19px; }
.search-results { position: absolute; z-index: 8; top: calc(100% + 4px); left: 0; right: 0; max-height: 250px; overflow: auto; padding: 4px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 10px 24px oklch(25% .03 235 / .15); }
.search-result { display: block; width: 100%; padding: 10px; border: 0; text-align: left; color: var(--ink); background: transparent; }
.search-result:hover, .search-result.active { background: var(--surface-warm); }
.search-result strong, .search-result span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result strong { font-size: 12px; }
.search-result span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.search-message { padding: 11px 10px; color: var(--ink-soft); font-size: 11px; line-height: 1.6; }
.map-target { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 46px; padding: 0 10px; border: 1px solid var(--line); color: var(--ink-soft); background: var(--surface); font-size: 11px; font-weight: 600; white-space: nowrap; }
.map-target svg { width: 17px; height: 17px; }
.map-target:hover, .map-target[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.swap-button { display: grid; place-items: center; flex: 0 0 33px; width: 33px; height: 33px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--ink-soft); background: var(--surface); }
.swap-button:hover { color: var(--accent); border-color: var(--accent); }
.swap-button svg { width: 17px; height: 17px; }
.map-wrap { position: relative; height: 300px; margin-top: 20px; overflow: hidden; border: 1px solid var(--line); background: oklch(91% .025 150); }
#map { position: absolute; inset: 0; }
.map-instruction { position: absolute; top: 12px; left: 12px; z-index: 1; display: flex; align-items: center; gap: 7px; padding: 8px 10px; color: var(--ink); border: 1px solid var(--line); background: oklch(99% .005 88 / .96); font-size: 11px; font-weight: 600; pointer-events: none; }
.map-instruction-dot { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; }
.map-fallback { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 30px; color: var(--ink-soft); background: var(--surface-warm); text-align: center; font-size: 12px; line-height: 1.7; }
.maplibregl-ctrl-top-right { top: 7px !important; right: 6px !important; }
.maplibregl-ctrl-group { overflow: hidden; border-radius: 1px !important; box-shadow: 0 1px 5px oklch(20% .02 235 / .2) !important; }
.maplibregl-ctrl-group button { width: 29px !important; height: 29px !important; }
.maplibregl-ctrl-attrib { font-size: 9px !important; }
.map-marker { display: flex; flex-direction: column; align-items: center; gap: 3px; pointer-events: none; }
.marker-symbol { display: grid; place-items: center; width: 30px; height: 30px; border: 3px solid white; border-radius: 50% 50% 50% 5px; transform: rotate(-45deg); box-shadow: 0 2px 6px oklch(20% .02 235 / .25); }
.marker-symbol span { transform: rotate(45deg); color: white; font-size: 12px; font-weight: 700; }
.marker-symbol.home { background: var(--navy); }
.marker-symbol.work { background: var(--accent); }
.marker-label { padding: 3px 6px; color: var(--ink); background: white; box-shadow: 0 1px 4px oklch(20% .02 235 / .2); font-size: 10px; font-weight: 700; }
.map-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; margin-top: 10px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.map-line-symbol { display: inline-block; width: 19px; margin-right: 6px; vertical-align: middle; border-top: 2px dashed var(--accent); }
.mode-fieldset { min-width: 0; margin: 27px 0 0; padding: 0; border: 0; }
.mode-fieldset legend, .field label { color: var(--ink); font-size: 12px; font-weight: 700; }
.mode-fieldset legend { margin-bottom: 10px; }
.mode-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.mode-option { min-width: 0; cursor: pointer; }
.mode-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mode-option > span { min-height: 70px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; border: 1px solid var(--line); color: var(--ink-soft); background: var(--surface); font-size: 11px; font-weight: 600; white-space: nowrap; transition: background 160ms ease-out, border-color 160ms ease-out; }
.mode-option > span:hover { border-color: var(--accent); }
.mode-option input:checked + span { border-color: var(--navy); color: var(--surface); background: var(--navy); }
.mode-option input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.mode-option svg { width: 23px; height: 23px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px 16px; margin-top: 26px; }
.field { min-width: 0; }
.field label { display: block; margin-bottom: 9px; }
.field label > span { color: var(--muted); font-size: 10px; font-weight: 400; }
.number-field { display: flex; align-items: center; gap: 9px; height: 47px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); }
.number-field:focus-within { border-color: var(--accent); }
.number-field:has(input[aria-invalid="true"]) { border-color: var(--accent); }
.number-field > span { flex: 0 0 auto; color: var(--muted); font-size: 11px; font-weight: 600; }
.number-field input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 15px; font-weight: 600; }
.suffix-field > span { font-weight: 400; }
input[type=number] { appearance: textfield; -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.field small { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.field:has(input[aria-invalid="true"]) small { color: var(--accent); }
.privacy-note { display: flex; align-items: start; gap: 7px; margin-top: 25px; padding-top: 17px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 11px; line-height: 1.7; }
.privacy-note svg { width: 15px; height: 15px; flex: 0 0 15px; }
.results-column { min-width: 0; display: grid; gap: 16px; }
.result-card { background: var(--surface-warm); }
.result-top { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 29px 30px 0; }
.result-top h2 { margin-top: 8px; font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: .03em; scroll-margin-top: 24px; }
.live-indicator { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; margin-top: 1px; color: var(--ink-soft); font-size: 10px; font-weight: 600; }
.live-indicator span { width: 7px; height: 7px; border-radius: 50%; background: oklch(57% .1 155); }
#result-content { padding: 0 30px; }
.payback-block { padding: 36px 0 27px; }
.result-label { display: block; color: var(--ink-soft); font-size: 12px; }
.hero-result { margin-top: 9px; color: var(--accent); font-size: clamp(35px, 3.15vw, 47px); font-weight: 600; line-height: 1.3; letter-spacing: -.035em; overflow-wrap: anywhere; }
.payback-block p { margin-top: 8px; color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.breakdown-heading { display: flex; justify-content: space-between; gap: 10px; padding: 14px 0 0; border-top: 1px solid var(--line); color: var(--ink); font-size: 11px; font-weight: 700; }
.breakdown-heading span:last-child { color: var(--muted); font-size: 9px; letter-spacing: .09em; }
.daily-breakdown { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 10px; padding: 17px 0 12px; }
.daily-breakdown div { display: grid; gap: 6px; }
.daily-breakdown div > span { color: var(--muted); font-size: 11px; }
.daily-breakdown strong { font-size: 19px; font-weight: 600; white-space: nowrap; }
.breakdown-plus { color: var(--accent); font-size: 19px; }
.route-summary { color: var(--muted); font-size: 11px; line-height: 1.5; }
.route-summary strong { color: var(--ink-soft); font-weight: 600; }
.monthly-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-top: 30px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.monthly-heading h3 { margin-top: 5px; font-family: var(--display); font-size: 16px; }
.monthly-heading > span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.monthly-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 65px; border-bottom: 1px solid var(--line); }
.monthly-list dt { color: var(--ink); font-size: 12px; font-weight: 600; }
.monthly-list dt small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 400; }
.monthly-list dd { color: var(--ink); font-size: 18px; font-weight: 600; text-align: right; }
.cost-note { margin: 17px 0 22px; color: var(--ink-soft); font-size: 11px; line-height: 1.8; }
.receipt-end { display: flex; justify-content: space-between; gap: 10px; padding: 13px 30px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .1em; }
.empty-results { min-height: 350px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px; text-align: center; }
.empty-mark { margin-bottom: 15px; color: var(--accent); font-size: 32px; line-height: 1; }
.empty-results strong { font-family: var(--display); font-size: 16px; }
.empty-results p { max-width: 260px; margin-top: 10px; color: var(--ink-soft); font-size: 12px; line-height: 1.8; }
.insight-card { padding: 24px 29px; }
.insight-heading { display: flex; justify-content: space-between; align-items: center; }
.insight-heading > span { color: var(--accent); font-size: 22px; }
.insight-card h3 { margin-top: 9px; font-family: var(--display); font-size: 18px; }
.insight-card p:not(.section-kicker) { margin-top: 10px; color: var(--ink-soft); font-size: 11px; line-height: 1.7; }
.wage-line { display: flex; align-items: baseline; margin-top: 15px; }
.wage-line strong { color: var(--navy); font-size: 30px; font-weight: 600; line-height: 1; }
.wage-line > span, .wage-original { color: var(--muted); font-size: 11px; }
.wage-original { margin-top: 6px; }
.insight-card small { display: block; margin-top: 13px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.method-card summary { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; list-style: none; }
.method-card summary::-webkit-details-marker { display: none; }
.method-card summary span { color: var(--accent); font-size: 20px; font-weight: 400; transition: transform 160ms ease-out; }
.method-card[open] summary span { transform: rotate(45deg); }
.method-content { padding: 0 20px 19px; color: var(--ink-soft); font-size: 11px; line-height: 1.8; }
.method-content p + p { margin-top: 9px; }
.site-footer { display: flex; justify-content: space-between; gap: 30px; padding: 38px 0 44px; color: var(--muted); }
.site-footer > div { display: grid; gap: 7px; }
.site-footer strong { color: var(--ink); font-family: var(--display); font-size: 13px; letter-spacing: .07em; }
.site-footer span { font-size: 9px; font-weight: 600; letter-spacing: .1em; }
.site-footer p { font-size: 10px; line-height: 1.8; text-align: right; }
.mobile-result-bar { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 1100px) { .header-inner, .page-shell { padding-left: 32px; padding-right: 32px; } .workspace { grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr); gap: 16px; } .planner-section { padding: 26px 23px; } .result-top { padding-left: 23px; padding-right: 23px; } #result-content { padding-left: 23px; padding-right: 23px; } .receipt-end { padding-left: 23px; padding-right: 23px; } .map-target { width: 42px; padding: 0; } .map-target span { display: none; } .daily-breakdown strong { font-size: 17px; } }
@media (max-width: 760px) { .header-inner { height: 68px; padding-left: 20px; padding-right: 20px; } .header-note { display: none; } .page-shell { padding-left: 18px; padding-right: 18px; } .intro { padding: 40px 2px 32px; } .intro-aside { display: none; } h1 { margin-top: 17px; font-size: clamp(30px, 7vw, 42px); } .intro-description { margin-top: 14px; font-size: 12px; } .workspace { display: flex; flex-direction: column; gap: 16px; } .planner, .results-column { width: 100%; gap: 16px; } .planner-section { padding: 23px 20px; } .map-wrap { height: 270px; } .result-top { padding: 24px 22px 0; } #result-content { padding-left: 22px; padding-right: 22px; } .hero-result { font-size: 42px; } .receipt-end { padding-left: 22px; padding-right: 22px; } .site-footer { flex-direction: column; gap: 14px; padding: 32px 0 112px; } .site-footer p { text-align: left; } .mobile-result-bar { position: fixed; z-index: 10; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 18px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: oklch(99% .005 88 / .98); box-shadow: 0 -5px 20px oklch(25% .03 235 / .08); } .mobile-result-bar div { display: grid; gap: 2px; } .mobile-result-bar div span { color: var(--muted); font-size: 10px; } .mobile-result-bar strong { color: var(--accent); font-size: 17px; font-weight: 600; } .mobile-result-bar a { padding: 10px 14px; color: white; background: var(--navy); text-decoration: none; font-size: 11px; font-weight: 600; white-space: nowrap; } .mobile-result-bar a span { margin-left: 8px; } body:has(input[type="text"]:focus, input[type="number"]:focus) .mobile-result-bar, .mobile-result-bar.is-result-visible { display: none; } }
@media (max-width: 430px) { .brand-mark { width: 38px; height: 38px; } .header-link { font-size: 11px; } .desktop-only { display: none; } .intro { padding-top: 35px; } .eyebrow { font-size: 9px; } .intro-description { max-width: 330px; } .planner-section { padding: 22px 16px; } .section-heading { gap: 11px; } .step-number { min-width: 35px; font-size: 27px; } .heading-copy h2 { font-size: 20px; } .heading-copy > p:last-child { font-size: 11px; } .sample-tag { padding: 5px 6px; font-size: 9px; } .location-fields { gap: 6px; } .location-rail { flex-basis: 10px; width: 10px; } .location-row { gap: 5px; } .location-row > label { flex-basis: 30px; width: 30px; font-size: 12px; } .search-wrap input { padding-left: 9px; padding-right: 28px; font-size: 12px; } .search-icon { right: 8px; } .search-icon svg { width: 16px; height: 16px; } .map-target { width: 39px; } .swap-button { flex-basis: 30px; width: 30px; height: 30px; } .map-wrap { height: 235px; } .map-meta { font-size: 9px; } .mode-options { gap: 4px; } .mode-option > span { min-height: 65px; font-size: 9px; } .mode-option svg { width: 21px; height: 21px; } .field-grid { gap: 17px 10px; } .field label { font-size: 11px; } .number-field { gap: 6px; padding: 0 9px; } .number-field > span { font-size: 10px; } .number-field input { font-size: 14px; } .daily-breakdown { gap: 7px; } .daily-breakdown strong { font-size: 16px; } .hero-result { font-size: 37px; } }
@media (max-width: 430px) { .sample-tag, .map-meta, .mode-option > span { font-size: 10px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
