:root {
  color-scheme: light;
  --ink: #142033;
  --muted: #657089;
  --line: #e7eaf2;
  --surface: #ffffff;
  --surface-soft: #f7f9fd;
  --mint: #65d2bd;
  --coral: #ff7784;
  --blue: #4e90f1;
  --violet: #6848f4;
  --gold: #ffb84d;
  --shadow: 0 24px 70px rgba(27, 38, 69, 0.12);
  font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(101, 210, 189, 0.25), transparent 34rem),
    radial-gradient(circle at 80% 12%, rgba(255, 119, 132, 0.22), transparent 30rem),
    linear-gradient(180deg, #ffffff 0%, #f7f9fd 52%, #ffffff 100%);
  line-height: 1.75;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

code {
  border-radius: 6px;
  background: #f1f4fb;
  color: #4b38d6;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.92em;
  padding: 0.1rem 0.35rem;
}

/* ── Hero ── */
.hero {
  min-height: 92vh;
  padding: 24px clamp(18px, 4vw, 64px) 56px;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  position: relative;
  z-index: 2;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  font-size: 1.18rem;
  font-weight: 800;
}

.brand img {
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(20, 32, 51, 0.14);
  height: 54px;
  object-fit: cover;
  width: 54px;
}

.navlinks {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.navlinks a {
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  color: #41506a;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 8px 14px;
}

.hero-grid {
  align-items: center;
  display: grid;
  gap: clamp(28px, 5vw, 64px);
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  margin: 64px auto 0;
  max-width: 1180px;
}

.hero-copy h1 {
  font-size: clamp(2.35rem, 5vw, 5rem);
  letter-spacing: 0;
  line-height: 1.08;
  margin: 10px 0 20px;
}

.eyebrow {
  color: var(--coral);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.lead {
  color: #41506a;
  font-size: 1.15rem;
  margin: 0;
  max-width: 46rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 24px;
}

.button {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
}

.button.primary {
  background: linear-gradient(135deg, var(--violet), #2f7bf2);
  box-shadow: 0 18px 38px rgba(76, 67, 232, 0.28);
  color: white;
}

.button.secondary {
  background: white;
  border: 1px solid var(--line);
  color: #34415a;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-row span {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #4d5971;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 7px 12px;
}

.hero-media { margin: 0; }

.hero-media img {
  border-radius: 28px;
  box-shadow: var(--shadow);
  width: 100%;
}

/* ── Sections ── */
.section {
  margin: 0 auto;
  max-width: 1180px;
  padding: 72px clamp(18px, 4vw, 64px);
}

.section-heading {
  margin: 0 auto 34px;
  max-width: 760px;
  text-align: center;
}

.section h2 {
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  line-height: 1.14;
  margin: 0 0 12px;
}

.section-heading p:last-child,
.section > p {
  color: var(--muted);
  margin: 0;
}

/* ── Cards / Panels ── */
.steps-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.step-card,
.feature-panel,
.split-cards article,
.nav-map article,
.article-block,
.table-wrap,
.faq-list details {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(226, 230, 240, 0.85);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(33, 45, 78, 0.07);
}

.step-card { padding: 22px; }

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

.step-card h3,
.split-cards h3,
.feature-panel h3,
.article-block h3,
.nav-map h3 {
  font-size: 1.2rem;
  line-height: 1.35;
  margin: 0 0 8px;
}

.step-card p,
.split-cards p,
.feature-panel p,
.article-block p,
.nav-map p,
figcaption {
  color: var(--muted);
  margin: 0;
}

/* ── Layouts ── */
.two-column,
.content-with-image {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
}

.content-with-image.reverse {
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
}

.content-with-image.reverse .article-block { order: 2; }
.content-with-image.reverse .paired-shots  { order: 1; }

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

.split-cards article { padding: 20px; }
.split-cards.compact { margin: 18px 0; }
.split-cards h4 { font-size: 1rem; margin: 0 0 8px; }

.feature-panel,
.article-block { padding: 28px; }

.check-list,
.ordered-list {
  color: #46536d;
  margin: 14px 0 0;
  padding-left: 1.25rem;
}

.check-list li,
.ordered-list li { margin: 8px 0; }

.note {
  background: #fff8e8;
  border: 1px solid #ffe1a8;
  border-radius: 8px;
  color: #805815;
  font-weight: 700;
  margin-top: 18px;
  padding: 12px 14px;
}

.note.center {
  margin-left: auto;
  margin-right: auto;
  max-width: 680px;
  text-align: center;
}

.article-block h2 { margin-top: 0; }
.article-block h3 + p,
.article-block p + h3,
.article-block .table-wrap + .note { margin-top: 16px; }

/* ── Phone shots ── */
.phone-shot { margin: 0; overflow: hidden; }

.phone-shot img {
  background: #08090d;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: block;
  margin: 0 auto;
  max-height: 760px;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.phone-shot.tall img { max-height: 980px; }

.phone-shot figcaption {
  font-size: 0.92rem;
  margin: 12px auto 0;
  max-width: 360px;
  text-align: center;
}

/* ── CTA Banner ── */
.cta-banner {
  background: linear-gradient(135deg, var(--violet), #2f7bf2);
  border-radius: 28px;
  color: white;
  margin: 0 auto;
  max-width: 1180px;
  padding: 56px clamp(24px, 5vw, 80px);
  text-align: center;
}

.cta-banner h2 {
  color: white;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.2;
  margin: 0 0 12px;
}

.cta-banner p {
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
  margin: 0 0 32px;
}

.cta-banner .button.white {
  background: white;
  color: var(--violet);
  font-size: 1.05rem;
  padding: 14px 32px;
}

.cta-banner .button.white:hover { background: #f0f0ff; }

/* ── Tables ── */
.table-wrap {
  margin-top: 28px;
  overflow-x: auto;
}

.table-wrap.small {
  box-shadow: none;
  margin-top: 20px;
}

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

th, td {
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f4f7fc;
  color: #34415a;
  font-size: 0.94rem;
}

td { color: #526078; }
tbody tr:last-child td { border-bottom: 0; }

/* ── Nav map ── */
.nav-map {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 34px;
}

.nav-map article { padding: 18px; }

.nav-map span {
  color: var(--violet);
  display: block;
  font-size: 0.86rem;
  font-weight: 900;
  margin-bottom: 10px;
}

.image-grid,
.paired-shots {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 32px 0;
}

.paired-shots { margin: 0; }

/* ── Settle section ── */
.settle-section {
  background: linear-gradient(135deg, rgba(104, 72, 244, 0.09), rgba(101, 210, 189, 0.12));
  border-radius: 28px;
}

/* ── FAQ ── */
.faq-list {
  display: grid;
  gap: 12px;
  margin: 0 auto;
  max-width: 860px;
}

.faq-list details { padding: 18px 22px; }

.faq-list summary {
  cursor: pointer;
  font-size: 1.08rem;
  font-weight: 900;
}

.faq-list p { color: var(--muted); margin: 12px 0 0; }

/* ── Footer ── */
.footer {
  align-items: center;
  background: #111827;
  color: white;
  display: flex;
  gap: 18px;
  justify-content: center;
  padding: 30px clamp(18px, 4vw, 64px);
}

.footer img {
  border-radius: 16px;
  height: 58px;
  object-fit: cover;
  width: 58px;
}

.footer p { color: #c6cfdd; margin: 2px 0 0; }

.footer a {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  font-weight: 800;
  margin-left: 20px;
  padding: 8px 14px;
}

/* ── Responsive ── */

/* 防止任何內容造成橫向捲軸 */
html, body { overflow-x: hidden; }

/* article-block 裡多個 h3 之間補上間距 */
.article-block h3 ~ h3 { margin-top: 28px; }

@media (max-width: 980px) {
  .hero { min-height: auto; }

  /* minmax(0,1fr) 才能讓 grid 子元素被壓縮到容器寬度 */
  .hero-grid,
  .two-column,
  .content-with-image,
  .content-with-image.reverse {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 所有 grid 直接子元素加 min-width:0，防止 min-content 撐開 */
  .hero-grid > *,
  .two-column > *,
  .content-with-image > * {
    min-width: 0;
    overflow: hidden;
  }

  .content-with-image.reverse .article-block,
  .content-with-image.reverse .paired-shots { order: initial; }

  .steps-grid,
  .steps-grid.three,
  .nav-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .hero-media img { border-radius: 18px; }

  .settle-section { border-radius: 16px; }
}

@media (max-width: 680px) {
  .hero { padding: 14px 16px 40px; }

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

  .navlinks { justify-content: flex-start; }
  .navlinks a { font-size: 0.85rem; padding: 6px 10px; }

  .hero-grid { margin-top: 28px; }
  .hero-copy h1 { font-size: 2rem; line-height: 1.15; }
  .lead { font-size: 0.97rem; }

  .meta-row span { font-size: 0.82rem; padding: 5px 10px; }

  .section {
    padding: 44px 16px;
  }

  .section h2 { font-size: 1.75rem; }
  .section-heading { margin-bottom: 24px; }

  .steps-grid,
  .steps-grid.three,
  .nav-map,
  .split-cards { grid-template-columns: 1fr; }

  /* paired-shots / image-grid 改用 flex，比 grid 更好處理圖片縮放 */
  .paired-shots,
  .image-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .paired-shots .phone-shot,
  .image-grid .phone-shot {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .feature-panel,
  .article-block { padding: 20px; }
  .step-card { padding: 18px 20px; }

  .article-block h3 { font-size: 1.1rem; }
  .article-block h3 ~ h3 { margin-top: 24px; }

  th, td { padding: 12px 14px; }
  .faq-list details { padding: 14px 16px; }
  .note { font-size: 0.9rem; padding: 10px 12px; }

  .phone-shot {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .phone-shot img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
  }

  .cta-banner { border-radius: 16px; padding: 40px 20px; }
  .cta-banner p { margin-bottom: 24px; }

  .settle-section { border-radius: 12px; }

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

  .footer a { margin-left: 0; }
}

/* 超窄螢幕（375px 以下）額外收緊 */
@media (max-width: 375px) {
  .hero-copy h1 { font-size: 1.75rem; }
  .section h2 { font-size: 1.55rem; }
  .navlinks a { font-size: 0.8rem; padding: 5px 9px; }
  .section { padding: 36px 14px; }
  .feature-panel,
  .article-block,
  .step-card { padding: 16px; }
}
