:root {
  --ink: #061a2b;
  --muted: #5d6a78;
  --line: #d9e1e8;
  --soft: #edf4f8;
  --panel: #ffffff;
  --blue: #0076b6;
  --shadow: 0 22px 60px rgba(6, 26, 43, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans TC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: #f7fafc;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 14px clamp(20px, 5vw, 68px);
  border-bottom: 1px solid rgba(6, 26, 43, 0.08);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 800;
}

.brand img {
  width: 158px;
  height: auto;
}

.brand span {
  color: var(--muted);
}

.back-link {
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}

main {
  overflow: hidden;
}

.hero,
.calculator-section,
.table-section,
.notice-section {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: clamp(36px, 6vw, 86px);
  align-items: center;
  min-height: calc(100vh - 78px);
  padding: clamp(64px, 8vw, 112px) 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(4.2rem, 8vw, 7.5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h1 span,
.section-heading h2 span {
  display: block;
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.2rem, 1.8vw, 1.58rem);
  font-weight: 700;
  line-height: 1.8;
}

.hero-panel {
  display: grid;
  gap: 16px;
  padding: 28px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(39, 167, 181, 0.18)),
    #071e31;
  box-shadow: var(--shadow);
}

.hero-panel article {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  align-items: center;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.hero-panel span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
}

.hero-panel h2 {
  margin-bottom: 6px;
  font-size: 1.5rem;
}

.hero-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.calculator-section {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 24px;
  padding: 40px 0 84px;
}

.input-panel,
.result-panel,
.table-section,
.notice-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.input-panel,
.result-panel {
  padding: 28px;
}

.section-heading h2,
.result-header h2 {
  margin-bottom: 22px;
  font-size: clamp(2.2rem, 4vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.quick-scenarios,
.toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}

.toggle-group span {
  width: 100%;
  color: var(--muted);
  font-weight: 800;
}

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.scenario-button,
.option-button,
.return-button {
  min-height: 44px;
  padding: 10px 14px;
}

button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.field {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.field span {
  color: var(--muted);
  font-size: 0.92rem;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.metric-card {
  min-height: 170px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.metric-card strong {
  display: block;
  margin: 16px 0 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1;
}

.metric-card.accent {
  background: #061a2b;
  color: #fff;
}

.metric-card.accent span,
.metric-card.accent small {
  color: rgba(255, 255, 255, 0.78);
}

.advisor-copy {
  padding: 24px;
  border-radius: 8px;
  background: #f6efe1;
}

.advisor-copy h3 {
  margin-bottom: 10px;
}

.advisor-copy p {
  margin: 0;
  color: #526171;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.85;
}

.table-section {
  padding: 34px;
  margin-bottom: 34px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  background: #f4f7fa;
  font-size: 0.9rem;
}

td {
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

.notice-section {
  margin-bottom: 70px;
  padding: 24px 28px;
  background: #071e31;
  color: rgba(255, 255, 255, 0.82);
}

.notice-section p {
  margin: 0;
  font-weight: 700;
  line-height: 1.8;
}

@media (max-width: 980px) {
  .hero,
  .calculator-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 12px 18px;
  }

  .brand img {
    width: 132px;
  }

  .brand span {
    display: none;
  }

  .back-link {
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  .hero,
  .calculator-section,
  .table-section,
  .notice-section {
    width: min(100% - 32px, 1180px);
  }

  h1 {
    font-size: clamp(3.2rem, 16vw, 4.7rem);
  }

  .lead {
    font-size: 1.08rem;
  }

  .hero-panel,
  .input-panel,
  .result-panel,
  .table-section {
    padding: 20px;
  }

  .hero-panel article {
    grid-template-columns: 46px 1fr;
    padding: 18px;
  }
}
