:root {
  color-scheme: light;
  --ink: #10211e;
  --muted: #53635f;
  --paper: #f5f0e7;
  --card: #fffdf8;
  --forest: #123b35;
  --forest-light: #dceae5;
  --mint: #b9e4d3;
  --coral: #ff795f;
  --line: #d8d3c9;
  --danger: #a63728;
  --shadow: 0 24px 70px rgba(18, 59, 53, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 10% 4%, rgba(185, 228, 211, 0.7), transparent 28rem),
    var(--paper);
}

button, input, select { font: inherit; }

button, summary, select { cursor: pointer; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.wordmark-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px 10px 10px 3px;
  color: #fff;
  background: var(--forest);
}

.wordmark small {
  color: var(--muted);
  font-weight: 600;
  margin-left: 4px;
}

.privacy-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.header-actions { display: flex; align-items: center; gap: 10px; }

.language-toggle {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--forest);
  border-radius: 999px;
  color: var(--forest);
  background: transparent;
  font-size: 0.86rem;
  font-weight: 760;
}

.language-toggle:hover { background: var(--forest); color: #fff; }
.language-toggle:focus-visible { outline: 3px solid rgba(18, 59, 53, 0.2); outline-offset: 3px; }

main { overflow: clip; }

.hero {
  width: min(1180px, calc(100% - 40px));
  margin: 42px auto 90px;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(560px, 1.14fr);
  gap: 64px;
  align-items: start;
}

.hero-copy { padding-top: 42px; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--forest);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }

h1 {
  max-width: 720px;
  margin-bottom: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.4rem, 6.6vw, 6.3rem);
  line-height: 0.92;
  letter-spacing: -0.065em;
  font-weight: 700;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.lede {
  max-width: 610px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.65;
}

.walkthrough {
  max-width: 610px;
  margin-bottom: 24px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.walkthrough summary {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  font-weight: 780;
  list-style: none;
}

.walkthrough summary::-webkit-details-marker { display: none; }
.walkthrough summary span { color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.walkthrough summary .summary-title { color: var(--ink); font-size: inherit; font-weight: 780; }
.walkthrough ol { margin: 0 0 18px; padding-left: 22px; color: var(--muted); line-height: 1.6; }
.walkthrough li + li { margin-top: 8px; }

.truth-note {
  max-width: 610px;
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border-left: 4px solid var(--coral);
  background: rgba(255, 253, 248, 0.65);
  color: var(--muted);
  line-height: 1.5;
}
.truth-note strong { color: var(--ink); }

.calculator-card {
  position: relative;
  padding: 34px;
  border: 1px solid rgba(16, 33, 30, 0.14);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.calculator-card::before {
  content: "";
  position: absolute;
  inset: -10px 24px auto;
  height: 10px;
  border-radius: 18px 18px 0 0;
  background: var(--mint);
  z-index: -1;
}

.card-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.card-heading p { margin-bottom: 4px; color: var(--coral); font-size: 0.78rem; font-weight: 850; text-transform: uppercase; letter-spacing: 0.1em; }
.card-heading h2 { margin: 0; font-size: 2.3rem; }

.step-count {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--forest);
  background: var(--forest-light);
  font-size: 0.76rem;
  font-weight: 800;
}

.form-step {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.form-step + .form-step {
  margin-top: 30px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.form-step > legend {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 8px;
  padding: 0;
  color: var(--ink);
  font-size: 1rem;
}

.form-step > legend span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--forest);
  font-size: 0.78rem;
  font-weight: 850;
}

.step-help {
  margin: 0 0 20px 38px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 18px; }
.field { min-width: 0; }
.field.full-width { margin-bottom: 20px; }
.field.compact-field { max-width: calc(50% - 9px); }
.field label { display: block; margin-bottom: 8px; font-size: 0.9rem; font-weight: 760; }
.field small { display: block; margin-top: 7px; color: var(--muted); font-size: 0.76rem; line-height: 1.35; }

.conditional-fields { margin: 20px 0 0; }
.conditional-fields[hidden] { display: none; }

.extras-group {
  margin: 22px 0;
  padding: 0;
  border: 0;
}

.extras-group > legend {
  margin-bottom: 10px;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 760;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.check-grid label {
  min-width: 0;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: #fff;
  font-size: 0.78rem;
  line-height: 1.25;
  cursor: pointer;
}

.check-grid label:has(input:checked) {
  border-color: var(--forest);
  color: var(--forest);
  background: var(--forest-light);
}

.check-grid input {
  width: 17px;
  min-height: 17px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--forest);
}

input, select {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input:focus, select:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(18, 59, 53, 0.12); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(166, 55, 40, 0.1); }

.input-with-unit { position: relative; display: flex; align-items: center; }
.input-with-unit input { padding-right: 66px; }
.input-with-unit > span { position: absolute; right: 14px; color: var(--muted); font-size: 0.82rem; pointer-events: none; }
.money-input input { padding-left: 34px; padding-right: 14px; }
.money-input > span { left: 14px; right: auto; font-weight: 760; color: var(--ink); }

.primary-button {
  width: 100%;
  min-height: 56px;
  margin-top: 26px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--coral);
  font-weight: 850;
  box-shadow: 0 8px 0 #d95841;
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.primary-button:hover { transform: translateY(2px); box-shadow: 0 6px 0 #d95841; }
.primary-button:active { transform: translateY(7px); box-shadow: 0 1px 0 #d95841; }
.primary-button:focus-visible, .text-button:focus-visible, summary:focus-visible { outline: 3px solid rgba(255, 121, 95, 0.38); outline-offset: 4px; }
.primary-button.dark { margin-top: 22px; background: var(--forest); box-shadow: 0 8px 0 #082720; }

.form-error { margin-top: 18px; padding: 12px 14px; border-radius: 10px; background: #fff0ec; color: var(--danger); font-weight: 700; line-height: 1.4; }
.form-footnote { margin: 16px 0 0; text-align: center; color: var(--muted); font-size: 0.76rem; }

.result-section {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto 90px;
  padding: 48px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  border-radius: 30px;
  color: #fff;
  background: var(--forest);
  box-shadow: var(--shadow);
}
.result-section[hidden] { display: none; }
.result-section .eyebrow { color: var(--mint); }
.result-section h2 { margin-bottom: 12px; }
.quote-total { margin-bottom: 12px; font-size: clamp(3.2rem, 7vw, 5.8rem); line-height: 1; font-weight: 870; letter-spacing: -0.06em; color: var(--mint); }
.result-context { color: rgba(255, 255, 255, 0.72); line-height: 1.55; }
.time-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}
.time-summary div {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}
.time-summary span { display: block; margin-bottom: 6px; color: rgba(255, 255, 255, 0.62); font-size: 0.72rem; }
.time-summary strong { color: var(--mint); font-size: 1.02rem; }
.text-button { border: 0; background: transparent; color: #fff; text-decoration: underline; margin-top: 18px; padding: 8px; }
.copy-status { min-height: 24px; color: var(--mint); font-size: 0.86rem; }
.copy-fallback { display: block; width: 100%; min-height: 120px; margin-top: 10px; }

.breakdown { margin: 0; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.breakdown div { display: flex; justify-content: space-between; gap: 24px; padding: 15px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.18); }
.breakdown dt { color: rgba(255, 255, 255, 0.7); }
.breakdown dd { margin: 0; font-weight: 760; text-align: right; }
.breakdown .highlight { margin-top: 14px; padding: 16px 18px; border: 0; border-radius: 12px; background: var(--mint); color: var(--forest); }
.breakdown .highlight dt { color: var(--forest); }

.app-preview, .method, .pricing-guide, .faq {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto 90px;
}

.app-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  padding: 50px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.7);
}
.app-preview p { color: var(--muted); line-height: 1.65; }
.app-preview ul { margin: 0; padding: 0; list-style: none; }
.app-preview li { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 760; }
.app-preview li span { color: var(--coral); font-size: 0.8rem; }
.app-preview li b { font: inherit; }

.app-interest-panel {
  grid-column: 1 / -1;
  display: grid;
  justify-items: start;
  gap: 8px;
  padding-top: 4px;
}

.interest-button {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--forest);
  border-radius: 12px;
  color: #fff;
  background: var(--forest);
  font-weight: 800;
}

.interest-button:hover { background: #082720; }
.interest-button:focus-visible { outline: 3px solid rgba(18, 59, 53, 0.22); outline-offset: 3px; }
.interest-button:disabled { opacity: 0.62; cursor: default; }
.interest-status { min-height: 22px; margin: 0; color: var(--forest) !important; font-weight: 760; }
.app-interest-panel small { color: var(--muted); line-height: 1.5; }

.method { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 70px; align-items: start; }
.formula-card { padding: 30px; border-radius: 22px; background: #fff; border: 1px solid var(--line); }
.formula-card code { display: block; padding: 18px; border-radius: 12px; background: var(--forest-light); color: var(--forest); font-size: clamp(1rem, 2vw, 1.28rem); font-weight: 820; overflow-wrap: anywhere; }
.formula-card p { margin: 20px 0 0; color: var(--muted); line-height: 1.65; }
.assumption-details { margin-top: 20px; border-top: 1px solid var(--line); }
.assumption-details summary { padding: 17px 0 10px; color: var(--forest); font-weight: 780; }
.assumption-details ul { margin: 0; padding: 0 0 0 20px; color: var(--muted); font-size: 0.86rem; line-height: 1.6; }
.assumption-details li + li { margin-top: 6px; }

.pricing-guide {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 28px 70px;
  padding: 50px;
  border-radius: 28px;
  background: var(--forest-light);
}
.guide-heading p { color: var(--muted); line-height: 1.7; }
.guide-steps { margin: 0; padding: 0; list-style: none; }
.guide-steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid rgba(18, 59, 53, 0.16); }
.guide-steps li:first-child { padding-top: 0; }
.guide-steps li > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--forest); color: #fff; font-weight: 820; }
.guide-steps b { color: var(--forest); }
.guide-steps p { margin: 6px 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.6; }
.worked-example { grid-column: 1 / -1; padding: 26px 28px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.worked-example h3 { margin: 5px 0 10px; font-size: 1.35rem; }
.worked-example p:not(.eyebrow) { margin: 0 0 10px; color: var(--muted); line-height: 1.65; }
.worked-example small { color: var(--muted); }

.faq { max-width: 780px; }
.faq h2 { margin-bottom: 24px; }
.faq details { border-top: 1px solid var(--ink); }
.faq details:last-child { border-bottom: 1px solid var(--ink); }
.faq summary { padding: 20px 0; font-weight: 780; }
.faq details p { padding: 0 0 20px; margin: 0; color: var(--muted); line-height: 1.65; }

footer { padding: 30px 20px 44px; text-align: center; color: var(--muted); font-size: 0.82rem; }
footer p { margin: 0; }

html[lang="zh-CN"] h1 {
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: clamp(3rem, 5.2vw, 5.2rem);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

html[lang="zh-CN"] h2 {
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  line-height: 1.12;
}

html[lang="zh-CN"] .lede,
html[lang="zh-CN"] .truth-note,
html[lang="zh-CN"] .formula-card p,
html[lang="zh-CN"] .faq details p,
html[lang="zh-CN"] .app-preview p,
html[lang="zh-CN"] .guide-heading p,
html[lang="zh-CN"] .guide-steps p,
html[lang="zh-CN"] .worked-example p { line-height: 1.8; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 44px; }
  .hero-copy { padding-top: 0; }
  h1 { max-width: 800px; }
  .result-section, .app-preview, .method, .pricing-guide { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 620px) {
  .site-header, .hero, .result-section, .app-preview, .method, .pricing-guide, .faq { width: min(100% - 28px, 1180px); }
  .site-header { min-height: 66px; }
  .wordmark small, .privacy-chip { display: none; }
  .hero { margin-top: 26px; margin-bottom: 64px; }
  h1 { font-size: clamp(3.1rem, 16vw, 4.6rem); }
  html[lang="zh-CN"] h1 { font-size: clamp(2.65rem, 12vw, 4rem); }
  .lede { font-size: 1rem; }
  .walkthrough summary { display: grid; gap: 4px; }
  .calculator-card { padding: 22px 18px; border-radius: 20px; }
  .card-heading { display: block; }
  .step-count { display: inline-block; margin-top: 12px; }
  .card-heading h2 { font-size: 2rem; }
  .field-grid { grid-template-columns: 1fr; gap: 18px; }
  .field.compact-field { max-width: none; }
  .check-grid { grid-template-columns: 1fr 1fr; }
  .step-help { margin-left: 0; }
  .result-section { padding: 30px 20px; border-radius: 22px; }
  .quote-total { font-size: clamp(3rem, 16vw, 4.8rem); overflow-wrap: anywhere; }
  .time-summary { grid-template-columns: 1fr; }
  .breakdown div { gap: 12px; }
  .app-preview { padding: 30px 22px; }
  .method { gap: 20px; }
  .pricing-guide { padding: 30px 22px; gap: 20px; }
  .worked-example { padding: 22px 18px; }
  .formula-card { padding: 20px; }
}

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