:root {
  color-scheme: dark;
  --ink: #f8f7ff;
  --muted: #c7c2d8;
  --soft: #9b94b3;
  --surface: #181329;
  --surface-2: #21193a;
  --line: rgba(255, 255, 255, 0.13);
  --purple: #a78bfa;
  --purple-strong: #8b5cf6;
  --pink: #f0abfc;
  --green: #6ee7b7;
  --max: 72rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(124, 58, 237, 0.2), transparent 30rem),
    radial-gradient(circle at 90% 22%, rgba(217, 70, 239, 0.12), transparent 26rem),
    #0c0914;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
}

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

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 0.3rem;
}

.skip-link {
  background: var(--ink);
  color: #130d20;
  left: 1rem;
  padding: 0.55rem 0.8rem;
  position: fixed;
  top: -5rem;
  z-index: 20;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  background: rgba(12, 9, 20, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header__inner,
.page-shell,
.site-footer__inner {
  margin-inline: auto;
  max-width: var(--max);
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.site-header__inner {
  align-items: center;
  display: flex;
  gap: 1.25rem;
  justify-content: space-between;
  min-height: 4.5rem;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-weight: 800;
  gap: 0.5rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand__mark {
  font-size: 1.35rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  font-size: 0.93rem;
  gap: 0.35rem 1rem;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.page-shell {
  padding-bottom: 5rem;
  padding-top: 1.25rem;
}

.breadcrumbs {
  color: var(--soft);
  font-size: 0.88rem;
  margin: 0.5rem 0 1.5rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs li:not(:last-child)::after {
  color: #716985;
  content: "/";
  margin-left: 0.4rem;
}

.breadcrumbs a {
  color: var(--muted);
}

.hero {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1.4fr) minmax(15rem, 0.6fr);
  padding: clamp(2rem, 7vw, 5rem) 0;
}

.eyebrow {
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  margin: 0 0 0.9rem;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.18;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.35rem, 7vw, 5.15rem);
  letter-spacing: -0.055em;
  margin: 0;
}

h2 {
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  letter-spacing: -0.035em;
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.17rem;
  margin: 0 0 0.55rem;
}

.lede {
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  margin: 1.25rem 0 0;
  max-width: 48rem;
}

.hero-note,
.callout {
  align-self: end;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.2), rgba(217, 70, 239, 0.08));
  border: 1px solid rgba(167, 139, 250, 0.36);
  border-radius: 1.15rem;
  padding: 1.25rem;
}

.hero-note p,
.callout p {
  margin: 0;
}

.hero-note strong,
.callout strong {
  color: white;
  display: block;
  margin-bottom: 0.35rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button {
  background: linear-gradient(135deg, var(--purple-strong), #c026d3);
  border: 1px solid transparent;
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-weight: 750;
  padding: 0.65rem 1rem;
  text-decoration: none;
}

.button:hover {
  color: white;
  filter: brightness(1.12);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--muted);
}

.content-section {
  border-bottom: 1px solid var(--line);
  padding: clamp(2.5rem, 7vw, 4.5rem) 0;
}

.content-section > p,
.content-section > ul,
.content-section > ol {
  max-width: 52rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

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

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

.card {
  background: rgba(31, 24, 52, 0.72);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.25rem;
}

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

.card__label {
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin: 0 0 0.55rem;
  text-transform: uppercase;
}

.learning-path {
  counter-reset: path;
  display: grid;
  gap: 1rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.learning-path li {
  background: rgba(255, 255, 255, 0.035);
  border-left: 3px solid var(--purple-strong);
  border-radius: 0 0.8rem 0.8rem 0;
  counter-increment: path;
  padding: 1rem 1rem 1rem 3.5rem;
  position: relative;
}

.learning-path li::before {
  color: var(--pink);
  content: counter(path, decimal-leading-zero);
  font-weight: 850;
  left: 1rem;
  position: absolute;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  margin-top: 1.5rem;
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 42rem;
  width: 100%;
}

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

th {
  background: rgba(124, 58, 237, 0.15);
  color: white;
  font-size: 0.83rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.hanzi {
  color: white;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 1.15em;
  font-weight: 700;
  white-space: nowrap;
}

.pinyin {
  color: var(--pink);
  white-space: nowrap;
}

.checklist {
  list-style: none;
  padding-left: 0;
}

.checklist li {
  margin: 0.5rem 0;
  padding-left: 1.8rem;
  position: relative;
}

.checklist li::before {
  color: var(--green);
  content: "✓";
  font-weight: 900;
  left: 0;
  position: absolute;
}

.faq details {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  margin: 0.75rem 0;
  padding: 0.95rem 1rem;
}

.faq summary {
  color: white;
  cursor: pointer;
  font-weight: 750;
}

.faq details p {
  color: var(--muted);
  margin: 0.75rem 0 0;
}

.next-links {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.next-links a {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  color: var(--ink);
  display: block;
  font-weight: 750;
  padding: 1rem;
  text-decoration: none;
}

.next-links a span {
  color: var(--muted);
  display: block;
  font-size: 0.9rem;
  font-weight: 400;
  margin-top: 0.3rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 0.9rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  padding-bottom: 2rem;
  padding-top: 2rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 48rem) {
  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.45rem;
    padding-bottom: 0.8rem;
    padding-top: 0.8rem;
  }

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

  .hero,
  .grid--2,
  .grid--3,
  .next-links {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2.5rem;
  }

  h1 {
    font-size: clamp(2.35rem, 13vw, 3.7rem);
  }
}

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