:root {
  --bg: #f8fafc;
  --bg-soft: #eef5ff;
  --panel: #ffffff;
  --line: #dbeafe;
  --line-strong: #cbd5e1;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --accent: #0284c7;
  --text: #0f172a;
  --muted: #475569;
  --danger: #b91c1c;
  --maxw: 1120px;
  --font-sans: "Hiragino Sans", "Yu Gothic", "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at 0% 0%, #dbeafe 0%, transparent 44%),
    radial-gradient(circle at 100% 8%, #e0f2fe 0%, transparent 38%),
    linear-gradient(180deg, #f9fbff 0%, var(--bg) 56%, #f3f8ff 100%);
  line-height: 1.65;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: -1;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-sans);
  line-height: 1.25;
  margin: 0 0 10px;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(2rem, 4.2vw, 3.45rem);
  letter-spacing: 0.015em;
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

h3 {
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
}

p {
  margin: 0 0 10px;
}

a {
  color: inherit;
}

.container {
  width: min(var(--maxw), 92vw);
  margin: 0 auto;
}

.section {
  padding: clamp(58px, 10vw, 108px) 0;
}

.skip-link {
  position: absolute;
  left: -1000px;
  top: 0;
  background: #1d4ed8;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 1000;
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus-visible {
  left: 14px;
  top: 12px;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.top-nav.scrolled {
  background: rgba(248, 250, 252, 0.9);
  border-color: #dbeafe;
}

.nav-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 700;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(145deg, #2563eb, #0284c7);
  color: #eff6ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  box-shadow: 0 8px 18px rgba(2, 132, 199, 0.26);
}

.nav-links {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: #475569;
  font-size: 0.94rem;
}

.nav-links > a,
.nav-links > details > summary {
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.nav-links > a:hover,
.nav-links > details > summary:hover {
  color: #0f172a;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown > summary {
  list-style: none;
  cursor: pointer;
  padding-right: 14px;
  position: relative;
}

.nav-dropdown > summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown > summary::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid #475569;
  border-bottom: 2px solid #475569;
  transform: translateY(-60%) rotate(45deg);
}

.nav-dropdown[open] > summary::after {
  transform: translateY(-25%) rotate(225deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  padding: 8px;
  display: grid;
  gap: 4px;
  z-index: 120;
}

.nav-dropdown-menu a {
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  color: #334155;
}

.nav-dropdown-menu a:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 18px;
  border: 1px solid transparent;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 170ms ease, background-color 170ms ease, border-color 170ms ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #f8fafc;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

.btn-ghost {
  border-color: #cbd5e1;
  background: rgba(255, 255, 255, 0.88);
  color: #1e293b;
}

.btn-ghost:hover {
  border-color: #93c5fd;
}

.hero {
  padding-top: clamp(52px, 8vw, 86px);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(20px, 4vw, 38px);
  align-items: start;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  color: #1e40af;
  margin-bottom: 12px;
  font-weight: 700;
}

.hero-subtitle {
  color: #334155;
  max-width: 60ch;
  font-size: clamp(1.02rem, 1.7vw, 1.16rem);
}

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

.hero-panel,
.card,
.roadmap-step,
.disclaimer,
.testimonial-card,
.final-cta .container,
.legal-surface,
.about-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(168deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 30px rgba(2, 132, 199, 0.08);
}

.hero-panel {
  padding: 22px;
}

.panel-title {
  font-size: 1.02rem;
  letter-spacing: 0.03em;
  color: #1d4ed8;
  margin-bottom: 10px;
}

.hero-panel ul {
  margin: 0;
  padding-left: 20px;
}

.hero-panel li {
  margin: 8px 0;
}

.panel-footnote {
  margin-top: 12px;
  color: #475569;
  font-size: 0.93rem;
}

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

.card {
  padding: 22px;
}

.card p {
  color: #475569;
}

.section-intro,
.section-note {
  color: #475569;
  max-width: 64ch;
}

.plans-section {
  padding-top: 0;
}

.plans-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.plan-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(165deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 12px 34px rgba(2, 132, 199, 0.08);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.plan-card-featured {
  border-color: #93c5fd;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.16);
}

.plan-card-head {
  display: grid;
  gap: 10px;
}

.plan-card-head h3 {
  margin: 0;
}

.plan-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
  font-size: 0.82rem;
  font-weight: 700;
}

.plan-badge-coach {
  background: #eff6ff;
  color: #0f766e;
  border-color: #99f6e4;
}

.plan-price {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 800;
  color: #0f172a;
}

.plan-description {
  margin: 0;
  color: #475569;
}

.plan-points {
  margin: 0;
  padding-left: 20px;
  color: #334155;
}

.plan-points li {
  margin: 8px 0;
}

.plan-card .btn {
  margin-top: auto;
}

.plans-note {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #bfdbfe;
  background: rgba(239, 246, 255, 0.9);
  color: #334155;
}

.plans-note a {
  color: #1d4ed8;
  font-weight: 700;
}

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

.roadmap-step {
  padding: 24px;
  position: relative;
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.26);
  color: #1d4ed8;
  font-size: 0.92rem;
  margin-bottom: 14px;
}

.roadmap-step p {
  color: #475569;
}

.testimonials-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.testimonial-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.testimonial-card .quote {
  color: #0f172a;
  margin: 0;
}

.testimonial-card .meta {
  color: #64748b;
  margin: 0;
  font-size: 0.92rem;
}

.testimonial-theme {
  align-self: flex-start;
  font-size: 0.78rem;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  background: #eff6ff;
}

.testimonial-theme.retire-plan {
  color: #9a3412;
  border-color: #fed7aa;
  background: #fff7ed;
}

.faq-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

details {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 10px;
  background: #ffffff;
}

summary {
  cursor: pointer;
  font-weight: 700;
}

summary + p {
  margin-top: 10px;
  color: #475569;
}

.disclaimer {
  padding: 20px;
}

.disclaimer h3 {
  color: #1d4ed8;
}

.disclaimer p {
  color: #1e293b;
  margin-top: 10px;
}

.final-cta .container {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(145deg, #ffffff, #eff6ff);
  border-color: #bfdbfe;
}

.final-cta p {
  color: #475569;
  margin-bottom: 18px;
}

.legal-note {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.legal-note a {
  color: #1d4ed8;
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  padding: 24px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.footer-grid h4 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: #1e293b;
}

.footer-links {
  display: grid;
  gap: 6px;
}

.footer-links a,
.site-footer a {
  color: #1d4ed8;
  text-decoration: none;
}

.footer-links a:hover,
.site-footer a:hover {
  text-decoration: underline;
}

.mobile-sticky-cta {
  display: none;
}

.policy-main {
  padding: 44px 0 70px;
}

.policy-layout {
  width: min(980px, 92vw);
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.policy-header {
  margin-bottom: 6px;
}

.policy-header p {
  color: #475569;
}

.legal-surface {
  padding: 24px;
}

.legal-surface h2 {
  margin-top: 24px;
  font-size: 1.3rem;
  color: #1e293b;
}

.legal-surface h3 {
  margin-top: 18px;
  font-size: 1.05rem;
  color: #334155;
}

.legal-surface ul,
.legal-surface ol {
  padding-left: 20px;
  color: #334155;
}

.legal-surface li {
  margin: 6px 0;
}

.legal-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 6px 12px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.about-card {
  padding: 20px;
}

.about-card strong {
  display: block;
  margin-bottom: 4px;
  color: #1e293b;
}

.contact-list {
  display: grid;
  gap: 8px;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 420ms ease, transform 420ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #1d4ed8;
  outline-offset: 3px;
}

@media (max-width: 1120px) {
  .hero-layout,
  .faq-layout,
  .footer-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .cards-3,
  .plans-grid,
  .roadmap,
  .testimonials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  body {
    padding-bottom: 84px;
  }

  .nav-inner {
    gap: 10px;
  }

  .nav-links {
    width: 100%;
    order: 3;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .nav-dropdown-menu {
    position: static;
    min-width: 220px;
    margin-top: 8px;
    box-shadow: none;
  }

  .cards-3,
  .plans-grid,
  .roadmap,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

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

  .top-nav .cta-link {
    display: none;
  }

  .mobile-sticky-cta {
    display: inline-flex;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 120;
    width: min(92vw, 420px);
    padding: 12px 20px;
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.22);
  }

  .legal-surface {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
