:root {
  color-scheme: light;
  --ink: #000000;
  --bg: #ffffff;
  --panel: #f5f5f3;
  --line: #ddddda;
  --max: 1200px;
  --body-size: 1.05rem;
  --subtitle-size: 1.3rem;
  --title-size: 1.7rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-size: var(--body-size);
  line-height: 1.7;
}

a { color: var(--ink); }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
h1, h2, h3, p { text-wrap: pretty; }

/* Exactly three content levels: title, subtitle, body. */
.section-title,
.hero-title {
  margin: 0;
  color: var(--ink);
  font-size: var(--title-size);
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.section-key,
.card-title {
  margin: 0;
  color: var(--ink);
  font-size: var(--subtitle-size);
  font-weight: 800;
  line-height: 1.4;
}

.section-description,
.card-description,
li,
blockquote,
nav a,
.button,
footer {
  color: var(--ink);
  font-size: var(--body-size);
  font-weight: 400;
}

.site-header,
main,
footer {
  width: min(calc(100% - 3rem), var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-wordmark {
  display: inline-flex;
  align-items: baseline;
  font-size: 1.4rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0.015em;
}

.brand-x {
  display: inline-block;
  margin: 0 0.01em;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18em;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
}

nav { display: flex; align-items: center; justify-content: flex-end; gap: 1.2rem; }
nav a { font-weight: 700; text-decoration: none; white-space: nowrap; }
nav a:hover { text-decoration: underline; text-underline-offset: 0.3rem; }
.language-link { padding: 0.2rem 0.65rem; border: 1px solid var(--line); border-radius: 999px; }

.hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(22rem, 0.85fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
  padding: 6rem 0;
}
.hero-copy { display: grid; gap: 1.1rem; }
.hero .section-key { max-width: 34ch; }
.hero .section-description { max-width: 58ch; margin: 0; }

.hero-actions, .link-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.5rem; }
.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--ink);
  border-radius: 0.4rem;
  background: var(--bg);
  font-weight: 750;
  text-decoration: none;
}
.button:hover { background: var(--panel); }

.core-map {
  display: grid;
  gap: 1px;
  padding: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}
.core-step {
  padding: 1.4rem;
  background: var(--bg);
  text-align: center;
}
.core-step .card-title { margin-bottom: 0.3rem; }
.core-step .card-description { margin: 0; }

.content-section {
  padding: 6rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 5rem;
}
.section-header {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}
.section-header .section-key { max-width: 52ch; }
.section-header .section-description { max-width: 72ch; margin: 0; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}
.card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; border: 0; background: transparent; }
.card-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; border: 0; background: transparent; }
.card {
  padding: 1.7rem;
  border: 1px solid var(--line);
  background: var(--panel);
}
.card-grid:not(.two):not(.three) .card { border: 0; }
.card-title { margin-bottom: 0.55rem; }
.card-description { margin: 0; }
.card ul { margin: 0.8rem 0 0; padding-left: 1.2rem; }
.card li + li { margin-top: 0.35rem; }

.feature {
  display: grid;
  grid-template-columns: minmax(16rem, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4rem);
  margin-top: 1.25rem;
  padding: clamp(1.8rem, 4vw, 3rem);
  border: 1px solid var(--line);
  background: var(--panel);
}
.feature-copy { display: grid; align-content: start; gap: 0.7rem; }
.feature-copy .section-description { margin: 0; }
.feature blockquote { margin: 0; font-weight: 750; }
.feature-list { display: grid; gap: 0.55rem; }
.feature-list p { margin: 0; }
.feature + .card-grid { margin-top: 1.25rem; }

.question-list {
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  list-style: none;
}
.question-list li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.8rem;
  padding: 1rem 1.3rem;
}
.question-list li + li { border-top: 1px solid var(--line); }
.question-list span { font-weight: 800; }

.closing { margin: 1rem 0 5rem; padding: clamp(2rem, 5vw, 4rem); border: 1px solid var(--line); background: var(--panel); }
.closing .section-header { margin-bottom: 1.5rem; }
footer { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); }

@media (max-width: 1000px) {
  .site-header { align-items: flex-start; padding: 1rem 0; }
  nav { flex-wrap: wrap; }
  .hero { min-height: 0; grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid.three { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .site-header { position: static; display: block; width: 100%; padding: 1rem; overflow: hidden; }
  main, footer { width: calc(100% - 2rem); }
  nav { width: 100%; justify-content: flex-start; flex-wrap: nowrap; gap: 1rem; margin-top: 0.9rem; overflow-x: auto; }
  .hero { gap: 3rem; padding: 4rem 0; }
  .hero-actions .button { width: 100%; }
  .content-section { padding: 4.5rem 0; }
  .card-grid, .card-grid.two, .feature { grid-template-columns: 1fr; }
  .feature { gap: 1.5rem; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; }
}

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