:root {
  --ink: #10243f;
  --ink-soft: #496079;
  --navy: #0b2d4f;
  --blue: #0b5fa5;
  --blue-bright: #1785ca;
  --teal: #0d7b78;
  --teal-soft: #dff4f1;
  --gold: #be8c2d;
  --gold-soft: #fff5d8;
  --sky: #e9f3fb;
  --surface: #ffffff;
  --surface-soft: #f5f8fb;
  --line: #dbe4ec;
  --line-strong: #c4d2df;
  --danger: #9b4c35;
  --shadow: 0 18px 45px rgba(12, 43, 71, 0.1);
  --shadow-small: 0 8px 24px rgba(12, 43, 71, 0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shell: min(1180px, calc(100% - 48px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background: var(--surface-soft);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid rgba(23, 133, 202, 0.45);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 999;
  top: 10px;
  left: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  color: #fff;
  background: var(--navy);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 72px;
  padding: 10px max(24px, calc((100% - 1180px) / 2));
  border-bottom: 1px solid rgba(196, 210, 223, 0.75);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.site-title {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  text-decoration: none;
  white-space: nowrap;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-header nav a {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--blue);
}

.header-compare {
  min-height: 42px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--navy);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

.header-compare span {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  min-height: 24px;
  margin-left: 6px;
  border-radius: 99px;
  color: var(--navy);
  background: #fff;
}

.header-compare:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
  gap: 56px;
  align-items: center;
  width: var(--shell);
  min-height: 620px;
  margin: 0 auto;
  padding: 78px 0 88px;
}

.hero::before {
  position: absolute;
  z-index: -1;
  top: 24px;
  right: -12vw;
  width: 55vw;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(23, 133, 202, 0.16), transparent 66%);
  content: "";
  filter: blur(4px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3.2rem, 6.3vw, 5.7rem);
  font-weight: 900;
  letter-spacing: -0.065em;
  line-height: 1.04;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 3.35rem);
  letter-spacing: -0.045em;
  line-height: 1.12;
}

h3 {
  margin: 0;
  line-height: 1.32;
}

.hero-lead {
  max-width: 680px;
  margin: 28px 0 0;
  color: var(--ink-soft);
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 22px rgba(11, 95, 165, 0.18);
}

.button-primary:hover {
  background: var(--navy);
}

.button-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.button-ghost:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.research-note {
  max-width: 630px;
  margin: 26px 0 0;
  color: #66798c;
  font-size: 0.84rem;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
  color: #fff;
  background: var(--navy);
  box-shadow: 0 30px 70px rgba(11, 45, 79, 0.22);
}

.hero-panel::after {
  position: absolute;
  right: -64px;
  bottom: -70px;
  width: 210px;
  height: 210px;
  border: 42px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  content: "";
}

.metric {
  display: flex;
  flex-direction: column;
}

.metric-main {
  margin-bottom: 26px;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.metric-value {
  font-size: 3.4rem;
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
}

.metric-main .metric-value {
  font-size: 6rem;
  color: #8ee8df;
}

.metric-label {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  font-weight: 700;
}

.panel-rule {
  height: 1px;
  margin: 30px 0 20px;
  background: rgba(255, 255, 255, 0.18);
}

.hero-panel p {
  position: relative;
  z-index: 1;
  margin: 8px 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
}

.section-shell {
  width: var(--shell);
  margin: 0 auto;
}

.reading-guide {
  padding: 92px 0;
}

.section-heading {
  max-width: 760px;
}

.section-heading > p:last-child {
  margin: 18px 0 0;
  color: var(--ink-soft);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 42px;
}

.guide-grid article {
  min-height: 240px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.step-number {
  display: block;
  margin-bottom: 42px;
  color: var(--blue-bright);
  font-size: 0.82rem;
  font-weight: 900;
}

.guide-grid h3 {
  font-size: 1.35rem;
}

.guide-grid p {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.products-section {
  padding: 86px 0 110px;
}

.products-heading {
  display: flex;
  max-width: none;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.products-heading > p {
  flex: 0 0 auto;
  margin: 0 0 6px;
  color: var(--ink-soft);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(150px, 0.75fr)) auto;
  gap: 12px;
  align-items: end;
  margin-top: 38px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.field span {
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 850;
}

.field input,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--ink);
  background: var(--surface-soft);
}

.field input:focus,
.field select:focus {
  border-color: var(--blue-bright);
  background: #fff;
}

.clear-button {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.clear-button:hover {
  color: var(--blue);
  border-color: var(--blue);
}

.active-summary {
  margin: 16px 2px 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.product-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 430px;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 2px 0 rgba(12, 43, 71, 0.02);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.product-card:hover {
  border-color: #aac6da;
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.product-card.is-selected {
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 3px rgba(23, 133, 202, 0.12), var(--shadow-small);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.insurer-name {
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
}

.product-code {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 99px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  font-size: 0.7rem;
  font-weight: 800;
}

.product-card h3 {
  min-height: 3.85em;
  margin-top: 15px;
  font-size: 1.18rem;
  letter-spacing: -0.015em;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 30px;
  margin-top: 14px;
}

.badge,
.source-level {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 99px;
  color: var(--ink-soft);
  background: var(--sky);
  font-size: 0.68rem;
  font-weight: 850;
}

.badge-contract {
  color: #5b4d17;
  background: var(--gold-soft);
}

.card-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0 0;
}

.card-facts .fact:first-child,
.card-facts .fact:last-child {
  grid-column: 1 / -1;
}

.version-note {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}

.document-links {
  width: 100%;
  margin: 0;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.8;
}

.fact {
  min-width: 0;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.fact dt {
  color: #718397;
  font-size: 0.68rem;
  font-weight: 800;
}

.fact dd {
  margin: 4px 0 0;
  font-size: 0.84rem;
  font-weight: 750;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 20px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 800;
}

.status-line::before {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--teal);
  content: "";
}

.status-line.status-page::before {
  background: var(--gold);
}

.status-line.status-catalog::before {
  background: #8797a7;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 14px;
}

.detail-button,
.compare-toggle {
  min-height: 42px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.detail-button {
  border: 0;
  color: #fff;
  background: var(--navy);
}

.compare-toggle {
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: #fff;
}

.compare-toggle[aria-pressed="true"] {
  color: var(--blue);
  border-color: var(--blue-bright);
  background: var(--sky);
}

.empty-state {
  margin-top: 24px;
  padding: 62px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  text-align: center;
  background: #fff;
}

.empty-state p {
  margin: 8px 0 22px;
  color: var(--ink-soft);
}

.source-section {
  padding: 100px 0;
  color: #fff;
  background: var(--navy);
}

.source-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 70px;
  align-items: start;
}

.source-heading p:last-child {
  color: rgba(255, 255, 255, 0.65);
}

.source-section .eyebrow {
  color: #8ee8df;
}

.source-cards {
  display: grid;
  gap: 12px;
}

.source-cards article {
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.055);
}

.source-cards h3 {
  margin-top: 14px;
}

.source-cards p {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.87rem;
}

.source-level {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
}

.level-high {
  color: #092e32;
  background: #8ee8df;
}

.level-medium {
  color: #40310d;
  background: #ffe29b;
}

.level-low {
  color: #27394a;
  background: #dbe4ec;
}

.disclaimer {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 70px;
  align-items: center;
  padding: 86px 0;
}

.disclaimer h2 {
  font-size: clamp(1.75rem, 3vw, 2.65rem);
}

.disclaimer > p {
  margin: 0;
  color: var(--ink-soft);
}

footer {
  display: flex;
  min-height: 130px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 24px;
  color: #62768a;
  text-align: center;
  background: #eef3f7;
}

footer p {
  margin: 2px 0;
  font-size: 0.78rem;
}

footer p:first-child {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 900;
}

.compare-tray {
  position: fixed;
  z-index: 80;
  right: 20px;
  bottom: 20px;
  left: 20px;
  display: flex;
  max-width: 980px;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  padding: 14px 16px 14px 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  color: #fff;
  background: rgba(11, 45, 79, 0.96);
  box-shadow: 0 20px 60px rgba(7, 32, 57, 0.32);
  backdrop-filter: blur(18px);
}

.compare-tray[hidden] {
  display: none;
}

.compare-tray > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.compare-tray span {
  overflow: hidden;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

dialog {
  width: min(980px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 40px 90px rgba(7, 32, 57, 0.35);
}

dialog::backdrop {
  background: rgba(6, 24, 42, 0.66);
  backdrop-filter: blur(6px);
}

.dialog-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 26px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
}

.dialog-header h2 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.icon-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
}

.dialog-body {
  padding: 26px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

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

.detail-item {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.detail-item-wide {
  grid-column: 1 / -1;
}

.detail-item dt {
  color: #708398;
  font-size: 0.72rem;
  font-weight: 850;
}

.detail-item dd {
  margin: 6px 0 0;
  font-weight: 690;
}

.detail-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding: 18px;
  border-radius: 14px;
  color: #fff;
  background: var(--navy);
}

.detail-source p {
  margin: 0;
  font-size: 0.8rem;
}

.detail-source a {
  color: #8ee8df;
  font-weight: 900;
  text-underline-offset: 3px;
}

.compare-dialog {
  width: min(1380px, calc(100% - 24px));
}

.compare-scroll {
  overflow: auto;
  max-height: calc(100dvh - 126px);
  padding: 0 0 18px;
}

.compare-table {
  width: 100%;
  min-width: 840px;
  border-collapse: separate;
  border-spacing: 0;
}

.compare-table th,
.compare-table td {
  min-width: 220px;
  padding: 15px 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.compare-table th:first-child,
.compare-table td:first-child {
  position: sticky;
  z-index: 1;
  left: 0;
  min-width: 145px;
  width: 145px;
  color: var(--ink-soft);
  background: #f4f7fa;
  font-size: 0.76rem;
  font-weight: 900;
}

.compare-table thead th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #fff;
}

.compare-table thead th:first-child {
  z-index: 3;
}

.compare-product-name {
  display: block;
  margin-top: 5px;
  font-size: 0.98rem;
  line-height: 1.35;
}

.compare-insurer {
  color: var(--blue);
  font-size: 0.7rem;
  font-weight: 900;
}

.compare-table td {
  color: #344b63;
  font-size: 0.82rem;
}

@media (max-width: 1080px) {
  :root {
    --shell: min(100% - 40px, 980px);
  }

  .site-header {
    padding-inline: 20px;
  }

  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.65fr);
    gap: 34px;
    min-height: 600px;
  }

  .filter-panel {
    grid-template-columns: 1.25fr repeat(2, 0.75fr);
  }

  .field:nth-of-type(4) {
    grid-column: 1 / 2;
  }

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

  .product-card {
    min-height: 450px;
    padding: 20px;
  }
}

@media (max-width: 820px) {
  :root {
    --shell: calc(100% - 32px);
  }

  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 66px;
  }

  .site-header nav {
    display: none;
  }

  .site-title {
    font-size: 0.92rem;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 58px 0 72px;
  }

  h1 {
    font-size: clamp(3.2rem, 11vw, 5rem);
  }

  .hero-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .metric-main {
    margin-bottom: 0;
  }

  .panel-rule,
  .hero-panel > p {
    display: none;
  }

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

  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }

  .field-search {
    grid-column: 1 / -1;
  }

  .field:nth-of-type(4) {
    grid-column: auto;
  }

  .source-layout,
  .disclaimer {
    grid-template-columns: 1fr;
    gap: 38px;
  }
}

@media (max-width: 620px) {
  :root {
    --shell: calc(100% - 24px);
    --radius-lg: 22px;
  }

  .site-header {
    padding-inline: 12px;
  }

  .header-compare {
    padding-inline: 12px;
    font-size: 0.75rem;
  }

  .site-title {
    font-size: 0.86rem;
  }

  .hero {
    min-height: auto;
    padding: 44px 0 58px;
  }

  h1 {
    font-size: clamp(2.75rem, 15vw, 4.15rem);
  }

  .hero-lead {
    margin-top: 22px;
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    padding: 26px;
  }

  .metric-main .metric-value {
    font-size: 5rem;
  }

  .reading-guide,
  .products-section,
  .source-section {
    padding-block: 68px;
  }

  .guide-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .guide-grid article {
    min-height: auto;
  }

  .step-number {
    margin-bottom: 24px;
  }

  .products-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .field-search,
  .field:nth-of-type(4) {
    grid-column: auto;
  }

  .product-card {
    min-height: 410px;
  }

  .compare-tray {
    right: 10px;
    bottom: 10px;
    left: 10px;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
  }

  .compare-tray .button {
    min-height: 44px;
  }

  .dialog-header,
  .dialog-body {
    padding-inline: 18px;
  }

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

  .detail-item-wide {
    grid-column: auto;
  }

  .disclaimer {
    padding-block: 68px;
  }
}

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