:root {
  color-scheme: light;
  --ink: #19322e;
  --muted: #667b76;
  --green: #124f48;
  --green-dark: #0c3c37;
  --green-pale: #e8f1ed;
  --cream: #f5f7f4;
  --gold: #e6c37e;
  --gold-dark: #c89b4c;
  --line: #dbe5df;
  --white: #fff;
  --danger: #a13931;
  font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

.skip-link {
  position: absolute;
  z-index: 20;
  top: 8px;
  left: 8px;
  padding: 10px 16px;
  transform: translateY(-140%);
  border-radius: 8px;
  background: var(--white);
  color: var(--green-dark);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: relative;
  z-index: 2;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: min(1200px, calc(100% - 48px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--green);
  color: var(--white);
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -2px;
}
.brand-mark span { color: var(--gold); font-size: 15px; vertical-align: top; }
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-size: 14px; letter-spacing: .12em; }
.brand-copy small { color: var(--muted); font-size: 12px; letter-spacing: .18em; margin-top: 4px; }
.header-note { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 9px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #c97c47; box-shadow: 0 0 0 4px #f8eee8; }
.tool-nav {
  width: min(1200px, calc(100% - 48px));
  height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  gap: 32px;
}
.nav-tab {
  position: relative;
  padding: 0 6px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #71837d;
  font-size: 16px;
  font-weight: 700;
  transition: color .18s ease, border-color .18s ease;
}
.nav-tab:hover, .nav-tab.is-active { color: var(--green); }
.nav-tab.is-active { border-bottom-color: var(--green); }
.tab-icon { margin-right: 8px; color: var(--gold-dark); font-size: 18px; }

.hero {
  position: relative;
  overflow: hidden;
  background: var(--green-dark);
  color: var(--white);
}
.hero-inner {
  position: relative;
  isolation: isolate;
  width: min(1200px, calc(100% - 48px));
  min-height: 360px;
  margin: 0 auto;
  padding: 50px 0 46px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: center;
  gap: 60px;
}
.hero-copy { position: relative; z-index: 1; max-width: 660px; }
.eyebrow {
  margin: 0 0 10px;
  color: #75918a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2em;
}
.hero-eyebrow { display: flex; align-items: center; gap: 10px; color: #c7d9d0; }
.hero-eyebrow span { width: 26px; height: 2px; background: var(--gold); }
.hero h1 { margin: 12px 0 14px; font-size: clamp(34px, 4.2vw, 52px); line-height: 1.28; letter-spacing: .02em; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero-description { max-width: 520px; margin: 0; color: #c8d7d2; font-size: 15px; line-height: 1.9; }
.hero-actions { margin-top: 27px; display: flex; align-items: center; gap: 22px; }
.button {
  min-height: 48px;
  padding: 0 20px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 9px;
  font-weight: 750;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .hero-link:focus-visible, .nav-tab:focus-visible, .text-button:focus-visible { outline: 3px solid #f1cf8d; outline-offset: 3px; }
.button-gold { background: var(--gold); color: #163a34; box-shadow: 0 9px 24px #061d1a45; }
.button-gold:hover { background: #f0d297; }
.hero-link { padding: 8px 0; border: 0; background: none; color: #e3eee9; font-size: 14px; font-weight: 650; }
.hero-link span { margin-left: 4px; color: var(--gold); }
.hero-stat {
  position: relative;
  z-index: 1;
  padding: 24px 25px 20px;
  border: 1px solid #ffffff26;
  border-radius: 15px;
  background: linear-gradient(145deg, #ffffff13, #ffffff08);
  box-shadow: inset 0 1px #ffffff15;
  backdrop-filter: blur(4px);
}
.stat-top { display: flex; align-items: center; gap: 9px; color: #d1e0da; font-size: 12px; }
.stat-mark { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; background: #e6c37e24; color: var(--gold); font-size: 16px; }
.hero-stat > strong { display: block; margin: 15px 0 0; color: var(--gold); font-size: 39px; line-height: 1; letter-spacing: -.03em; }
.stat-label { display: block; margin-top: 6px; color: #e2e9e5; font-size: 13px; }
.stat-divider { height: 1px; margin: 19px 0 12px; background: #ffffff22; }
.stat-bottom { display: flex; justify-content: space-between; align-items: center; color: #bfd0ca; font-size: 12px; }
.stat-bottom b { color: white; font-size: 13px; }
.stat-caption { margin: 9px 0 0; color: #93aaa2; font-size: 11px; }
.hero-orbit { position: absolute; z-index: -1; border: 1px solid #ffffff0e; border-radius: 50%; }
.orbit-one { width: 500px; height: 500px; right: 90px; top: -220px; }
.orbit-two { width: 680px; height: 680px; right: 0; top: -290px; }
.hero-bottomline { min-height: 44px; padding: 0 max(24px, calc((100% - 1200px) / 2)); display: flex; align-items: center; gap: 11px; background: #092f2b; color: #b3c7bf; font-size: 11px; letter-spacing: .04em; }
.bottomline-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gold); }

.workspace { width: min(1200px, calc(100% - 48px)); margin: 0 auto; padding: 43px 0 36px; }
.workspace-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 22px; }
.workspace-heading h2 { margin: 0; font-size: 21px; letter-spacing: .02em; }
.workspace-note { margin: 0 0 2px; color: var(--muted); font-size: 12px; }
.tool-panel { display: none; animation: panel-in .22s ease; }
.tool-panel.is-active { display: block; }
@keyframes panel-in { from { opacity: .5; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.panel-intro { margin: 10px 0 17px; display: grid; grid-template-columns: 180px 1fr; align-items: start; gap: 8px; }
.section-number { padding-top: 6px; color: #6f8880; font-size: 11px; font-weight: 800; letter-spacing: .13em; }
.section-number span { color: var(--gold-dark); }
.panel-intro h2 { margin: 0; color: var(--ink); font-size: 27px; letter-spacing: .02em; }
.panel-intro p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.cutoff-banner { min-height: 53px; margin-bottom: 13px; padding: 0 18px; display: flex; align-items: center; gap: 10px; border-left: 3px solid #3f8777; border-radius: 0 8px 8px 0; background: #edf2ee; color: #45615a; font-size: 13px; }
.cutoff-banner strong { color: var(--green-dark); }
.banner-icon { color: var(--gold-dark); font-size: 17px; }
.banner-count { margin-left: auto; color: #72877f; font-size: 12px; }
.form-card, .result-card { border: 1px solid var(--line); border-radius: 13px; background: var(--white); box-shadow: 0 4px 17px #153d3410; }
.form-card { padding: 23px 24px 20px; }
.form-grid { display: grid; gap: 16px 20px; }
.valuation-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mortgage-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { min-width: 0; display: flex; flex-direction: column; gap: 7px; color: #334a44; font-size: 13px; font-weight: 700; }
.field > span { min-height: 20px; }
.field .unit-label { color: #80918b; font-weight: 500; }
.field small { color: #80918b; font-size: 11px; font-weight: 450; }
.field input, .field select {
  width: 100%;
  height: 47px;
  padding: 0 13px;
  border: 1px solid #cbd8d1;
  border-radius: 7px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 550;
}
.field select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='m5 7.5 5 5 5-5' stroke='%23556f67' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.field input:focus, .field select:focus { border-color: #4e9382; box-shadow: 0 0 0 3px #4e93821c; }
.field input:disabled { background: #f3f5f3; color: #8b9a94; }
.field input::placeholder { color: #a1afa9; font-weight: 450; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 45px; }
.input-suffix > span { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: #81918b; font-size: 12px; font-weight: 500; pointer-events: none; }
.form-actions { margin-top: 21px; display: flex; align-items: center; gap: 15px; }
.button-primary { background: var(--green); color: white; box-shadow: 0 5px 12px #124f4822; }
.button-primary:hover { background: #0f6257; }
.button-wide { min-width: 220px; }
.button-wide span { color: var(--gold); font-size: 17px; }
.form-hint { color: #7d8d87; font-size: 11px; }
.result-card { min-height: 90px; margin-top: 15px; padding: 20px 22px; }
.empty-result { min-height: 50px; display: flex; align-items: center; gap: 14px; color: var(--muted); }
.empty-icon { width: 39px; height: 39px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--green-pale); color: var(--green); font-size: 19px; }
.empty-result strong { display: block; color: #4b625b; font-size: 14px; }
.empty-result p { margin: 3px 0 0; font-size: 12px; }
.method-note { margin-top: 15px; padding: 16px 18px; display: flex; align-items: flex-start; gap: 12px; border: 1px solid #e7e7dc; border-radius: 10px; background: #fcfbf5; }
.method-icon { width: 23px; height: 23px; flex: none; display: grid; place-items: center; border: 1px solid #d5b675; border-radius: 50%; color: #a77a34; font: 700 13px Georgia, serif; }
.method-note strong { color: #53645e; font-size: 12px; }
.method-note p { margin: 3px 0 0; color: #76857f; font-size: 11px; line-height: 1.75; }

.valuation-result { padding: 0; overflow: hidden; }
.valuation-result .empty-result { padding: 19px 22px; }
.result-head { padding: 17px 22px; display: flex; justify-content: space-between; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); background: #fbfcfa; }
.result-head h3 { margin: 0; font-size: 15px; }
.result-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.confidence { padding: 5px 10px; border-radius: 99px; background: #eef2df; color: #6b703e; font-size: 11px; font-weight: 750; white-space: nowrap; }
.confidence.low { background: #f8eee8; color: #975e3d; }
.estimate-grid { padding: 20px 22px 19px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.estimate-main { padding: 17px 18px; border-radius: 10px; background: var(--green); color: #fff; }
.estimate-label { color: #bfd4ce; font-size: 12px; }
.estimate-main strong { display: block; margin-top: 4px; color: #f1d493; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.02em; line-height: 1.25; }
.estimate-main small { display: block; margin-top: 5px; color: #d7e4df; font-size: 12px; }
.estimate-range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.range-item { padding: 14px; border: 1px solid var(--line); border-radius: 9px; }
.range-item span { display: block; color: #7b8d86; font-size: 11px; }
.range-item strong { display: block; margin-top: 4px; color: var(--ink); font-size: 18px; }
.range-item em { display: block; margin-top: 1px; color: #87958f; font-size: 10px; font-style: normal; }
.result-foot { padding: 0 22px 19px; display: flex; flex-wrap: wrap; gap: 9px; }
.result-chip { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; color: #647a72; font-size: 11px; }
.result-chip b { color: var(--green); }
.warning-box { margin: 0 22px 19px; padding: 11px 13px; border-left: 3px solid #c79d58; border-radius: 0 7px 7px 0; background: #fcf8ed; color: #7e6b4c; font-size: 11px; line-height: 1.7; }
.error-state { padding: 18px 20px; display: flex; align-items: flex-start; gap: 12px; color: var(--danger); }
.error-state p { margin: 3px 0 0; color: #7a716d; font-size: 12px; line-height: 1.7; }

.mortgage-grid .stage-placeholder { display: contents; }
.stage-controls { min-height: 22px; margin-top: 13px; display: flex; flex-wrap: wrap; gap: 14px; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--green); font-size: 12px; font-weight: 750; }
.text-button:hover { color: #0c7667; }
.mortgage-result { padding: 0; overflow: hidden; }
.mortgage-result .empty-result { padding: 19px 22px; }
.mortgage-result .result-head { align-items: flex-start; }
.mortgage-summary { padding: 18px 22px 22px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.summary-card { min-height: 94px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.summary-card.primary { border-color: #c1d6ce; background: #f0f6f2; }
.summary-card span { color: #758880; font-size: 11px; }
.summary-card strong { display: block; margin-top: 7px; color: #263f38; font-size: clamp(16px, 1.7vw, 22px); line-height: 1.25; white-space: nowrap; }
.summary-card.primary strong { color: var(--green); }
.summary-card small { display: block; margin-top: 4px; color: #8b9892; font-size: 10px; }
.schedule-wrap { margin: 0 22px 21px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.schedule-toolbar { min-height: 48px; padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #f8faf8; }
.schedule-toolbar strong { font-size: 12px; }
.schedule-tools { display: flex; gap: 12px; }
.schedule-button { padding: 5px 8px; border: 1px solid #d5e0da; border-radius: 6px; background: white; color: var(--green); font-size: 10px; font-weight: 700; }
.schedule-scroller { max-height: 405px; overflow: auto; }
.schedule-table { width: 100%; border-collapse: collapse; white-space: nowrap; font-variant-numeric: tabular-nums; }
.schedule-table th, .schedule-table td { padding: 9px 12px; border-top: 1px solid #edf1ee; text-align: right; font-size: 11px; }
.schedule-table th { position: sticky; top: 0; z-index: 1; background: #f2f5f2; color: #6c7d76; font-size: 10px; font-weight: 750; }
.schedule-table th:first-child, .schedule-table td:first-child { text-align: left; }
.schedule-table td { color: #425a52; }
.schedule-table tr.grace-row td { background: #fcf8ed; color: #806a43; }
.schedule-note { margin: 0 22px 19px; color: #77877f; font-size: 11px; }

.privacy-strip { width: min(1200px, calc(100% - 48px)); margin: 0 auto 44px; padding: 17px 20px; display: flex; align-items: center; gap: 14px; border: 1px solid #d9e6de; border-radius: 11px; background: #eef5f0; }
.privacy-symbol { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: white; font-size: 15px; }
.privacy-strip strong { color: #2e5147; font-size: 13px; }
.privacy-strip p { margin: 2px 0 0; color: #70837a; font-size: 11px; }
.privacy-strip a { margin-left: auto; color: var(--green); font-size: 11px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.privacy-strip a:hover { text-decoration: underline; }

.site-footer { padding: 28px max(24px, calc((100% - 1200px) / 2)) 17px; background: #eaf0ec; }
.not-found { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.footer-main { display: flex; align-items: center; gap: 21px; }
.footer-brand .brand-mark { width: 40px; height: 40px; border-radius: 12px; font-size: 20px; }
.footer-brand .brand-copy strong { font-size: 12px; }
.footer-brand .brand-copy small { font-size: 10px; }
.footer-main > p { margin: 0; color: #788981; font-size: 11px; }
.footer-details { margin-top: 22px; padding-top: 17px; display: grid; grid-template-columns: 1.4fr .8fr 1fr; gap: 22px; border-top: 1px solid #d4dfd8; }
.footer-details > div { display: grid; align-content: start; gap: 5px; }
.footer-label { color: #82928a; font-size: 10px; }
.footer-details a, .footer-details > div > span:not(.footer-label) { color: #50655c; font-size: 11px; text-decoration: none; }
.footer-details a:hover { color: var(--green); text-decoration: underline; }
.footer-legal { max-width: 800px; margin: 18px 0 0; color: #84938c; font-size: 10px; line-height: 1.7; }
.footer-bottom { margin-top: 19px; padding-top: 12px; display: flex; justify-content: space-between; border-top: 1px solid #d4dfd8; color: #8c9a93; font-size: 10px; }

@media (max-width: 760px) {
  .header-inner { width: calc(100% - 32px); height: 66px; }
  .brand-mark { width: 40px; height: 40px; border-radius: 12px; font-size: 19px; }
  .brand-copy strong { font-size: 12px; }
  .header-note { font-size: 10px; }
  .tool-nav { width: 100%; height: 53px; gap: 0; justify-content: space-around; border-top: 1px solid #eef2ef; }
  .nav-tab { width: 50%; padding: 0 8px; font-size: 14px; }
  .hero-inner { width: calc(100% - 36px); min-height: auto; padding: 38px 0 30px; grid-template-columns: 1fr; gap: 25px; }
  .hero h1 { font-size: clamp(32px, 8vw, 43px); }
  .hero-description { max-width: 430px; font-size: 13px; }
  .hero-actions { margin-top: 21px; gap: 16px; }
  .button { min-height: 45px; padding: 0 16px; font-size: 13px; }
  .hero-link { font-size: 12px; }
  .hero-stat { max-width: 360px; padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .stat-top { grid-column: 1 / -1; }
  .hero-stat > strong { grid-column: 1; margin-top: 13px; font-size: 30px; }
  .stat-label { grid-column: 1; margin: 4px 0 0; }
  .stat-divider { display: none; }
  .stat-bottom { grid-column: 2; grid-row: 2; align-self: end; display: grid; gap: 2px; text-align: right; }
  .stat-caption { grid-column: 2; grid-row: 3; margin-top: 3px; text-align: right; }
  .hero-bottomline { padding: 0 18px; min-height: 38px; gap: 7px; font-size: 9px; }
  .orbit-one { right: -200px; top: -100px; }
  .orbit-two { right: -260px; top: -160px; }
  .workspace { width: calc(100% - 32px); padding: 31px 0 27px; }
  .workspace-heading { display: block; margin-bottom: 17px; }
  .workspace-heading h2 { font-size: 18px; }
  .workspace-note { margin-top: 7px; font-size: 11px; }
  .panel-intro { grid-template-columns: 1fr; gap: 4px; margin-top: 4px; }
  .panel-intro h2 { font-size: 24px; }
  .panel-intro p { font-size: 12px; line-height: 1.75; }
  .cutoff-banner { min-height: 47px; padding: 0 12px; font-size: 11px; }
  .banner-count { font-size: 10px; }
  .form-card { padding: 17px 15px 16px; }
  .valuation-grid, .mortgage-grid { grid-template-columns: 1fr; gap: 12px; }
  .field { gap: 5px; }
  .field input, .field select { height: 45px; }
  .form-actions { margin-top: 17px; display: grid; gap: 8px; }
  .button-wide { width: 100%; }
  .form-hint { text-align: center; }
  .result-card { margin-top: 12px; }
  .estimate-grid { grid-template-columns: 1fr; padding: 15px; gap: 10px; }
  .result-head { padding: 14px 15px; }
  .result-foot { padding: 0 15px 14px; }
  .warning-box { margin: 0 15px 15px; }
  .valuation-result .empty-result, .mortgage-result .empty-result { padding: 15px; }
  .mortgage-summary { padding: 14px 15px 17px; grid-template-columns: 1fr 1fr; gap: 8px; }
  .summary-card { min-height: 82px; padding: 12px 10px; }
  .summary-card strong { font-size: 16px; }
  .schedule-wrap { margin: 0 12px 15px; }
  .schedule-toolbar { align-items: flex-start; }
  .schedule-tools { gap: 5px; }
  .schedule-button { padding: 5px 6px; }
  .schedule-table th, .schedule-table td { padding: 8px 9px; }
  .schedule-note { margin: 0 13px 14px; }
  .stage-controls { margin-top: 12px; }
  .privacy-strip { width: calc(100% - 32px); margin-bottom: 30px; padding: 14px; align-items: flex-start; flex-wrap: wrap; }
  .privacy-strip > div:nth-child(2) { flex: 1; }
  .privacy-strip a { margin-left: 46px; }
  .site-footer { padding: 23px 18px 15px; }
  .footer-details { grid-template-columns: 1fr; gap: 13px; }
  .footer-main { gap: 12px; }
  .footer-main > p { max-width: 160px; line-height: 1.5; }
}

@media (max-width: 380px) {
  .header-note { max-width: 110px; text-align: right; line-height: 1.35; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 8px; }
  .hero-bottomline { letter-spacing: -.02em; }
  .banner-count { display: none; }
}

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