:root {
  --ink: #151c24;
  --muted: #66717c;
  --canvas: #f5f4ef;
  --surface: #fffefa;
  --surface-2: #f0eee6;
  --line: #dbd8ca;
  --accent: #806526;
  --accent-ink: #3b321e;
  --gold: #b38a34;
  --success: #1f7a57;
  --shadow: 0 18px 45px rgba(21, 28, 36, 0.12);
  --radius: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Noto Sans TC", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

:focus-visible {
  outline: 3px solid rgba(128, 101, 38, 0.28);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background: rgba(245, 244, 239, 0.98);
}

.brand,
.hero-actions,
.nav-links,
.footer nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--accent-ink);
  color: #f7e8bc;
  font-family: "Noto Serif TC", serif;
  font-weight: 700;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  line-height: 1.2;
}

.brand small,
.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.nav-links {
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav-links a:hover,
.footer a:hover,
.source-line a {
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 16px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  border-color: var(--accent-ink);
  background: var(--accent-ink);
  color: #fffefa;
}

.btn.secondary {
  background: var(--surface);
}

.btn.full {
  width: 100%;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(360px, 0.82fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) clamp(18px, 4vw, 44px);
}

.hero-copy {
  display: grid;
  gap: 24px;
}

.hero-copy h1 {
  max-width: 720px;
  font-family: "Noto Serif TC", serif;
  font-size: 56px;
  line-height: 1.08;
}

.lead {
  max-width: 680px;
  color: var(--muted);
  font-size: 19px;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.hero-panel,
.section,
.contact-band {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  gap: 20px;
  padding: clamp(22px, 4vw, 34px);
}

.panel-head h2,
.section-head h2,
.contact-band h2 {
  margin-top: 4px;
  font-family: "Noto Serif TC", serif;
  font-size: 36px;
  line-height: 1.16;
}

.calc-form,
.section-head,
.contact-band > div {
  display: grid;
  gap: 14px;
}

.calc-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.input-row {
  position: relative;
  display: flex;
  align-items: center;
}

.input-row input {
  padding-right: 64px;
}

.input-row span {
  position: absolute;
  right: 14px;
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: var(--surface-2);
  color: var(--ink);
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(128, 101, 38, 0.65);
  background: var(--surface);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.result-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.result-panel div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface-2);
}

.result-panel span,
.feature-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.result-panel strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.result-panel p {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 14px;
}

.note,
.source-line,
.section-head p,
.feature-grid p,
.contact-band p {
  color: var(--muted);
}

.note,
.source-line {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-size: 14px;
}

.source-line {
  border-top: none;
  padding-top: 0;
}

.section {
  display: grid;
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto clamp(24px, 4vw, 42px);
  padding: clamp(28px, 5vw, 48px);
}

.section-head {
  max-width: 780px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-grid article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: #fbfaf4;
}

.feature-grid h3 {
  margin: 8px 0 10px;
  font-size: 20px;
}

.contact-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto clamp(42px, 7vw, 72px);
  padding: clamp(26px, 5vw, 42px);
}

.contact-band > div {
  max-width: 760px;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 4vw, 44px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer nav {
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 920px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 14px;
  }

  .hero,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 44px;
  }

  .hero-copy h1 {
    font-size: 52px;
  }

  .panel-head h2,
  .section-head h2,
  .contact-band h2 {
    font-size: 32px;
  }

  .lead {
    font-size: 18px;
  }

  .contact-band,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .hero-copy h1 {
    font-size: 36px;
  }

  .panel-head h2,
  .section-head h2,
  .contact-band h2 {
    font-size: 28px;
  }

  .form-grid,
  .result-panel {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }
}
