:root {
  color-scheme: light dark;
  --background: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #eef2f7;
  --text: #172033;
  --muted: #5d6778;
  --border: #d8dee9;
  --accent: #246bfd;
  --accent-strong: #1553d4;
  --focus: #ffb000;
  --max-width: 760px;
  --radius: 18px;
  --shadow: 0 12px 32px rgba(23, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang TC", "Noto Sans TC", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-strong);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  z-index: 1000;
  border-radius: 10px;
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow);
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
}

.site-header__inner,
.site-footer__inner,
.page {
  width: min(calc(100% - 32px), var(--max-width));
  margin-inline: auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
}

.brand {
  color: var(--text);
  font-size: 1.03rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

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

.site-nav a {
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}

.page {
  padding-block: 42px 64px;
}

.hero,
.document,
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  padding: clamp(28px, 6vw, 48px);
  text-align: left;
}

.hero h1,
.document h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.hero p {
  max-width: 38rem;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

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

.card {
  display: block;
  padding: 22px;
  color: var(--text);
  text-decoration: none;
}

.card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.card h2 {
  margin: 0;
  font-size: 1.12rem;
}

.card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.document {
  padding: clamp(24px, 5vw, 44px);
}

.document__meta {
  margin: 12px 0 30px;
  color: var(--muted);
  font-size: 0.92rem;
}

.document h2 {
  margin: 2.2em 0 0.55em;
  font-size: 1.35rem;
  line-height: 1.35;
}

.document h3 {
  margin: 1.6em 0 0.45em;
  font-size: 1.08rem;
}

.document p,
.document ul,
.document ol {
  margin-block: 0.7em;
}

.document ul,
.document ol {
  padding-left: 1.4em;
}

.document li + li {
  margin-top: 0.42em;
}

.notice {
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 5px solid var(--accent);
  border-radius: 12px;
  background: var(--surface-soft);
}

.notice p:first-child {
  margin-top: 0;
}

.notice p:last-child {
  margin-bottom: 0;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 750;
  text-decoration: none;
}

.button-link:hover {
  background: var(--accent-strong);
  color: #ffffff;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.site-footer__inner {
  padding-block: 24px 36px;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 8px;
}

.footer-links a {
  font-weight: 650;
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 14px;
  }

  .site-nav {
    justify-content: flex-start;
  }

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

  .page {
    padding-block: 26px 48px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0f1420;
    --surface: #171e2b;
    --surface-soft: #202a3a;
    --text: #edf2fa;
    --muted: #aab5c6;
    --border: #303b4e;
    --accent: #76a7ff;
    --accent-strong: #9abdff;
    --shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  }
}

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