:root {
  --blue: #1594cf;
  --deep: #183047;
  --ink: #17202a;
  --muted: #66717e;
  --line: #d9e4ec;
  --soft: #f4f8fb;
  --white: #ffffff;
  --gold: #d9a928;
  --green: #2c9a9b;
  --shadow: 0 18px 50px rgba(24, 48, 71, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #eef7fb 0, #ffffff 420px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  padding: 24px 0 18px;
}

.brand-strip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(217, 228, 236, 0.9);
  box-shadow: var(--shadow);
}

.logo {
  display: block;
  max-width: 100%;
  object-fit: contain;
}

.logo-642 {
  height: 86px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  align-items: stretch;
  padding: 54px 0 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  max-width: 820px;
  color: var(--deep);
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 760px;
  margin-bottom: 0;
  color: #435160;
  font-size: 18px;
  line-height: 1.8;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 250px;
  padding: 26px;
  color: var(--white);
  background: linear-gradient(135deg, var(--deep), #226b8d);
  box-shadow: var(--shadow);
}

.hero-panel span,
.hero-panel small {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

.hero-panel strong {
  display: block;
  font-size: 34px;
  line-height: 1.15;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 8px 0 42px;
}

.summary-grid article,
.panel,
.calculator {
  background: var(--white);
  border: 1px solid var(--line);
}

.summary-grid article {
  min-height: 190px;
  padding: 20px;
}

.summary-grid span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 18px;
  color: var(--white);
  background: var(--blue);
  font-weight: 800;
}

.summary-grid h2 {
  margin-bottom: 10px;
  color: var(--deep);
  font-size: 20px;
}

.summary-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.calculator {
  padding: 30px;
  box-shadow: var(--shadow);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 1fr);
  column-gap: 36px;
  align-items: end;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin-bottom: 0;
  color: var(--deep);
  font-size: 32px;
}

.section-heading p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 20px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.product-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.product-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 82px;
  padding: 20px;
  color: var(--deep);
  text-decoration: none;
  background: #f8fbfd;
  border: 1px solid var(--line);
}

.product-links a:hover {
  border-color: var(--blue);
  box-shadow: 0 12px 28px rgba(21, 148, 207, 0.12);
}

.product-links span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.product-links strong {
  color: var(--blue);
  font-size: 18px;
  text-align: right;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #415062;
  font-size: 14px;
  font-weight: 700;
}

select,
input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #c9d7e1;
  border-radius: 0;
  font: inherit;
  font-weight: 650;
}

select:focus,
input:focus {
  outline: 2px solid rgba(21, 148, 207, 0.25);
  border-color: var(--blue);
}

.money-input,
.rate-input {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  background: var(--white);
  border: 1px solid #c9d7e1;
}

.money-input input,
.rate-input input {
  border: 0;
}

.money-input em,
.rate-input em {
  padding: 0 12px 0 4px;
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

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

.result-band div {
  padding: 22px;
  color: var(--white);
  background: var(--deep);
}

.result-band div:first-child {
  background: var(--blue);
}

.result-band span,
.result-band small {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.result-band strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 30px;
  line-height: 1.2;
}

.breakdown-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  margin-bottom: 20px;
}

.panel {
  padding: 22px;
}

.panel h3 {
  margin-bottom: 16px;
  color: var(--deep);
  font-size: 22px;
}

.breakdown-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.breakdown-list.compact {
  grid-template-columns: 1fr;
}

.breakdown-list div {
  min-height: 76px;
  padding: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

dd {
  margin: 8px 0 0;
  color: var(--deep);
  font-size: 20px;
  font-weight: 850;
}

.table-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}

.table-heading h3 {
  margin-bottom: 0;
}

.table-heading p {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 13px 12px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  color: var(--deep);
  background: #e8f2f7;
  font-weight: 850;
}

tbody tr:nth-child(even) {
  background: #f8fbfd;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 40px;
  color: var(--muted);
  line-height: 1.6;
}

footer strong {
  color: var(--blue);
}

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

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .controls,
  .product-links,
  .result-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header,
  main,
  footer {
    width: min(100% - 24px, 1180px);
  }

  .brand-strip {
    padding: 14px;
  }

  .logo-642 {
    height: 58px;
  }

  .hero {
    padding-top: 34px;
  }

  h1 {
    font-size: 34px;
  }

  .summary-grid,
  .controls,
  .product-links,
  .result-band,
  .breakdown-list,
  footer {
    grid-template-columns: 1fr;
  }

  footer {
    display: grid;
  }

  .calculator {
    padding: 18px;
  }
}
