:root {
  color-scheme: light;
  --navy: #10274b;
  --navy-soft: #173763;
  --ink: #172033;
  --muted: #5f6b7c;
  --blue: #1769ff;
  --blue-soft: #eaf2ff;
  --coral: #ff6b57;
  --coral-dark: #d94837;
  --purchase-blue: #265bf6;
  --purchase-blue-hover: #174bdc;
  --paper: #ffffff;
  --canvas: #f7f8fb;
  --border: #dfe4ec;
  --border-strong: #c9d2df;
  --shadow: 0 16px 45px rgba(16, 39, 75, 0.08);
  --shell: 1200px;
  --reading: 760px;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

body:has(.mobile-navigation--open) {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--blue);
}

a:focus-visible,
button:focus-visible {
  border-radius: 4px;
  outline: 3px solid rgba(23, 105, 255, 0.35);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--paper);
  color: var(--navy);
  font-weight: 800;
  box-shadow: var(--shadow);
  transform: translateY(-160%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: calc(64px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid rgba(219, 226, 236, 0.9);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
}

.site-header__inner {
  width: min(calc(100% - 40px), var(--shell));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-link strong {
  color: #10274b;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #27344a;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: color 160ms ease;
}

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

.button {
  min-height: 46px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

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

.button--primary {
  background: var(--purchase-blue);
  color: #ffffff;
}

.button--primary:hover {
  background: var(--purchase-blue-hover);
  color: #ffffff;
}

.button--primary:active {
  transform: scale(0.96);
}

.header-enroll {
  min-height: 44px;
  padding-inline: 18px;
}

.menu-button {
  width: 44px;
  height: 44px;
  padding: 0;
  display: none;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #10274b;
  cursor: pointer;
}

.menu-button svg {
  width: 24px;
  height: 24px;
}

.menu-button .close-icon {
  display: none;
}

.menu-button[aria-expanded="true"] .menu-icon {
  display: none;
}

.menu-button[aria-expanded="true"] .close-icon {
  display: block;
}

.mobile-navigation {
  display: none;
}

.legal-hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--paper);
}

.legal-hero::after {
  position: absolute;
  top: -150px;
  right: -80px;
  width: 430px;
  height: 430px;
  content: "";
  border: 78px solid rgba(255, 255, 255, 0.045);
  border-radius: 50%;
}

.legal-hero__inner {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 40px), var(--shell));
  margin: 0 auto;
  padding: 52px 0;
}

.legal-eyebrow {
  margin: 0 0 14px;
  color: #9cc0ff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.legal-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.legal-hero__summary {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.75;
}

.legal-meta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
}

.legal-meta strong {
  color: var(--paper);
}

.legal-layout {
  width: min(calc(100% - 40px), var(--shell));
  margin: 0 auto;
  padding: 68px 0 96px;
  display: grid;
  grid-template-columns: minmax(180px, 232px) minmax(0, var(--reading));
  justify-content: space-between;
  gap: 72px;
}

.toc {
  align-self: start;
}

.toc__inner {
  position: sticky;
  top: 82px;
}

.toc p {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.toc ol {
  margin: 0;
  padding: 0 0 0 15px;
  border-left: 2px solid var(--border);
  list-style: none;
}

.toc li + li {
  margin-top: 2px;
}

.toc a {
  min-height: 42px;
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  text-decoration: none;
}

.toc a:hover {
  color: var(--blue);
}

.legal-content {
  min-width: 0;
}

.legal-content > :first-child {
  margin-top: 0;
}

.legal-content h2 {
  margin: 64px 0 18px;
  padding-top: 4px;
  color: var(--navy);
  font-size: clamp(25px, 3vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.legal-content h3 {
  margin: 32px 0 10px;
  color: var(--navy-soft);
  font-size: 19px;
  line-height: 1.45;
}

.legal-content p {
  margin: 0 0 18px;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 22px;
  padding-left: 1.35em;
}

.legal-content li {
  padding-left: 0.35em;
}

.legal-content li + li {
  margin-top: 9px;
}

.legal-content strong {
  color: var(--navy);
}

.legal-content section {
  border-top: 1px solid var(--border);
}

.legal-content section:first-of-type {
  border-top: 0;
}

.lead {
  margin-bottom: 28px !important;
  color: var(--navy);
  font-size: 19px;
  line-height: 1.8;
}

.callout {
  margin: 28px 0;
  padding: 20px 22px;
  border-left: 4px solid var(--blue);
  background: var(--blue-soft);
  color: var(--navy);
}

.callout--warm {
  border-left-color: var(--coral);
  background: #fff1ee;
}

.callout p:last-child,
.callout ul:last-child {
  margin-bottom: 0;
}

.callout__title {
  margin: 0 0 6px !important;
  font-size: 14px;
  font-weight: 900;
}

.plain-card {
  margin: 24px 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.plain-card h3 {
  margin-top: 0;
}

.key-value {
  margin: 26px 0;
  border-top: 1px solid var(--border-strong);
}

.key-value > div {
  padding: 18px 0;
  display: grid;
  grid-template-columns: minmax(130px, 180px) minmax(0, 1fr);
  gap: 22px;
  border-bottom: 1px solid var(--border);
}

.key-value dt {
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
}

.key-value dd {
  margin: 0;
}

.steps {
  margin: 28px 0 !important;
  padding: 0 !important;
  list-style: none;
  counter-reset: legal-step;
}

.steps li {
  position: relative;
  min-height: 52px;
  padding: 3px 0 20px 62px;
  counter-increment: legal-step;
}

.steps li::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  content: counter(legal-step, decimal-leading-zero);
  border-radius: 50%;
  background: var(--navy);
  color: var(--paper);
  font-size: 12px;
  font-weight: 900;
}

.steps li + li {
  margin-top: 8px;
}

.inline-link {
  color: var(--blue);
  font-weight: 750;
}

.legal-contact {
  margin-top: 64px;
  padding: 34px;
  border-radius: 18px;
  background: var(--navy);
  color: var(--paper);
}

.legal-contact h2 {
  margin: 0 0 10px;
  padding: 0;
  color: var(--paper);
}

.legal-contact p {
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.76);
}

.contact-button {
  min-height: 48px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--coral);
  color: #2e1814;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.contact-button:hover {
  background: #ff8a78;
  color: #2e1814;
}

.not-found-content {
  width: min(calc(100% - 40px), var(--shell));
  min-height: 38vh;
  margin: 0 auto;
  padding: 72px 0 96px;
}

.not-found-content > * {
  max-width: var(--reading);
}

.not-found-content h2 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.25;
}

.not-found-content p {
  margin: 0 0 24px;
  color: var(--muted);
}

.site-footer {
  min-height: 336px;
  padding: 40px max(40px, calc((100vw - 1200px) / 2));
  background: #17191c;
  color: #d9d9d9;
}

.site-footer__inner {
  width: min(100%, 1200px);
  min-height: 256px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 64px;
}

.site-footer__menus {
  display: flex;
  align-items: flex-start;
  gap: clamp(48px, 7vw, 96px);
}

.site-footer__menus section {
  min-width: 112px;
}

.site-footer h2 {
  margin: 0 0 12px;
  padding: 0;
  color: #9197a1;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  text-align: right;
}

.site-footer__brand > strong {
  color: #ffffff;
  font-size: 24px;
  letter-spacing: 0.08em;
}

.site-footer__brand > div {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.site-footer p,
.site-footer span {
  margin: 0;
  color: #d9d9d9;
  font-size: 12px;
  line-height: 1.6;
}

.site-footer__menus nav {
  display: grid;
  gap: 0;
}

.site-footer a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  color: #d9d9d9;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  transition: color 150ms ease;
}

.site-footer a:hover {
  color: #ffffff;
}

@media (max-width: 1060px) {
  .site-nav {
    gap: 20px;
  }
}

@media (max-width: 900px) {
  .site-nav {
    display: none;
  }

  .header-enroll {
    margin-left: auto;
  }

  .menu-button {
    display: inline-flex;
  }

  .mobile-navigation {
    position: fixed;
    top: calc(64px + env(safe-area-inset-top));
    right: 0;
    left: 0;
    max-height: calc(100dvh - 64px - env(safe-area-inset-top));
    padding:
      16px max(20px, env(safe-area-inset-right))
      calc(24px + env(safe-area-inset-bottom))
      max(20px, env(safe-area-inset-left));
    display: grid;
    gap: 4px;
    overflow: auto;
    border-bottom: 1px solid var(--border);
    background: var(--paper);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition:
      opacity 160ms ease,
      transform 160ms ease;
  }

  .mobile-navigation--open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .mobile-navigation a {
    min-height: 52px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    color: #172033;
    font-weight: 750;
    text-decoration: none;
  }

  .mobile-navigation .button {
    margin-top: 12px;
    justify-content: center;
    color: #ffffff;
  }
}

@media (max-width: 820px) {
  html {
    scroll-padding-top: 70px;
  }

  .legal-layout {
    padding-top: 42px;
    display: block;
  }

  .toc {
    margin-bottom: 42px;
  }

  .toc__inner {
    position: static;
  }

  .toc ol {
    padding: 0;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    border: 0;
    scrollbar-width: none;
  }

  .toc ol::-webkit-scrollbar {
    display: none;
  }

  .toc li + li {
    margin-top: 0;
  }

  .toc a {
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--canvas);
    white-space: nowrap;
  }
}

@media (max-width: 720px) {
  .site-header {
    height: calc(60px + env(safe-area-inset-top));
  }

  .site-header__inner {
    width: auto;
    margin-right: max(14px, env(safe-area-inset-right));
    margin-left: max(14px, env(safe-area-inset-left));
    gap: 10px;
  }

  .mobile-navigation {
    top: calc(60px + env(safe-area-inset-top));
    max-height: calc(100dvh - 60px - env(safe-area-inset-top));
  }

  .header-enroll {
    display: none;
  }

  .menu-button {
    margin-left: auto;
  }

  .site-footer {
    min-height: 0;
    padding:
      36px max(14px, env(safe-area-inset-right))
      calc(96px + env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
  }

  .site-footer__inner {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .site-footer__menus {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
  }

  .site-footer__menus section:last-child {
    grid-column: 1 / -1;
  }

  .site-footer__brand {
    align-items: flex-start;
    gap: 32px;
    text-align: left;
  }

  .site-footer__brand > div {
    justify-items: start;
  }
}

@media (max-width: 620px) {
  .legal-hero__inner,
  .legal-layout,
  .not-found-content {
    width: min(calc(100% - 28px), var(--shell));
  }

  .legal-hero__inner {
    padding: 42px 0 44px;
  }

  .legal-hero h1 {
    font-size: 38px;
  }

  .legal-hero__summary {
    margin-top: 18px;
    font-size: 16px;
  }

  .legal-meta {
    margin-top: 22px;
    display: grid;
    gap: 4px;
  }

  .legal-layout {
    padding-bottom: 68px;
  }

  .legal-content h2 {
    margin-top: 50px;
    font-size: 26px;
  }

  .legal-content h3 {
    font-size: 18px;
  }

  .lead {
    font-size: 17px;
  }

  .callout,
  .plain-card {
    padding: 18px;
  }

  .key-value > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .legal-contact {
    padding: 26px 20px;
  }

  .contact-button {
    width: 100%;
  }

}

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