:root {
  color-scheme: light;
  --ink: #161a17;
  --ink-soft: #303832;
  --muted: #69736d;
  --faint: #8c948f;
  --line: #d8d3c7;
  --line-strong: #bdb5a6;
  --paper: #f5f1e8;
  --paper-deep: #ebe3d3;
  --surface: #fffdf8;
  --surface-cool: #eef3f0;
  --teal: #0b6157;
  --teal-deep: #06453f;
  --blue: #244f87;
  --saffron: #b57622;
  --red: #9d3c35;
  --shadow-soft: 0 18px 42px rgba(22, 26, 23, 0.08);
  --shadow-crisp: 0 1px 0 rgba(22, 26, 23, 0.12);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  background:
    linear-gradient(90deg, rgba(22, 26, 23, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(22, 26, 23, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 64px 64px, 64px 64px, auto;
  color: var(--ink);
  font-family: "Aptos", "PingFang SC", "Microsoft YaHei", sans-serif;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 12%, rgba(11, 97, 87, 0.08), transparent 28%),
    radial-gradient(circle at 88% 2%, rgba(181, 118, 34, 0.09), transparent 25%);
  content: "";
}

a {
  color: var(--teal-deep);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

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

:focus-visible {
  outline: 3px solid rgba(11, 97, 87, 0.32);
  outline-offset: 3px;
}

.site-shell {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

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

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--surface);
  color: var(--teal-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  box-shadow: 4px 4px 0 var(--paper-deep);
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav a:hover {
  background: rgba(255, 253, 248, 0.72);
  color: var(--ink);
  transform: translateY(-1px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.78fr);
  gap: clamp(32px, 5vw, 70px);
  align-items: center;
  min-height: min(760px, calc(100vh - 75px));
  padding: clamp(46px, 7vw, 88px) 0 54px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
.display {
  margin: 0;
  max-width: 850px;
  font-family: "Songti SC", "Noto Serif CJK SC", Georgia, serif;
  font-size: clamp(48px, 8vw, 104px);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: 0;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.lead {
  max-width: 660px;
  margin: 26px 0 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.76;
  text-wrap: pretty;
  overflow-wrap: break-word;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 7px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
  box-shadow: var(--shadow-crisp);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  background: var(--surface);
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(22, 26, 23, 0.11);
}

.button.primary {
  border-color: var(--teal-deep);
  background: var(--teal-deep);
  color: #fffdf8;
}

.button.primary:hover {
  background: var(--teal);
  color: #fffdf8;
}

.quiet-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.hero-board {
  position: relative;
  min-height: 420px;
}

.sheet-stack {
  position: absolute;
  inset: 18px 0 auto auto;
  width: min(100%, 420px);
  min-height: 360px;
  padding: 26px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 18px 18px 0 var(--paper-deep), var(--shadow-soft);
}

.sheet-stack::before,
.sheet-stack::after {
  position: absolute;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.86);
  content: "";
}

.sheet-stack::before {
  inset: 18px -18px -18px 18px;
  z-index: -1;
}

.sheet-stack::after {
  inset: 38px -36px -36px 38px;
  z-index: -2;
}

.sheet-topline {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.sheet-title {
  margin: 28px 0 18px;
  font-family: "Songti SC", "Noto Serif CJK SC", Georgia, serif;
  font-size: 34px;
  line-height: 1.1;
}

.check-list,
.status-list,
.link-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li,
.status-list li,
.link-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 50px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

.check-list li:first-child,
.status-list li:first-child,
.link-list li:first-child {
  border-top: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(181, 118, 34, 0.35);
  border-radius: 999px;
  background: rgba(181, 118, 34, 0.08);
  color: #7b511e;
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
}

.tag.ready {
  border-color: rgba(11, 97, 87, 0.28);
  background: rgba(11, 97, 87, 0.08);
  color: var(--teal-deep);
}

.tag.pending {
  border-color: rgba(36, 79, 135, 0.28);
  background: rgba(36, 79, 135, 0.08);
  color: var(--blue);
}

.section {
  padding: 54px 0;
  border-top: 1px solid var(--line);
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section h2,
.doc h2 {
  margin: 0;
  font-family: "Songti SC", "Noto Serif CJK SC", Georgia, serif;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
}

.section p {
  color: var(--muted);
  line-height: 1.72;
  text-wrap: pretty;
}

.course-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.course-tile {
  min-height: 172px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.7);
}

.course-tile strong {
  display: block;
  font-size: 18px;
}

.course-tile p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.content-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: start;
}

.content-grid > * {
  min-width: 0;
}

.toc {
  position: sticky;
  top: 18px;
  margin-top: 34px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.78);
  box-shadow: var(--shadow-crisp);
}

.toc strong {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
}

.toc a {
  display: block;
  min-height: 38px;
  padding: 10px 8px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.toc a:hover {
  background: var(--surface-cool);
  color: var(--ink);
}

.doc {
  width: 100%;
  min-width: 0;
  padding-bottom: 84px;
}

.doc-hero {
  min-height: 430px;
  padding: 58px 0 42px;
}

.doc h1 {
  font-size: clamp(42px, 7vw, 82px);
}

.doc .lead {
  max-width: 760px;
}

.prep-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}

.prep-step {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.76);
}

.prep-step span {
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.prep-step strong {
  display: block;
  margin-top: 10px;
  font-size: 17px;
}

.prep-step p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.62;
}

.doc section:not(.doc-hero) {
  padding: 46px 0;
  border-top: 1px solid var(--line);
}

.doc h3 {
  margin: 34px 0 14px;
  font-size: 21px;
  line-height: 1.28;
}

.doc p {
  color: var(--ink-soft);
  line-height: 1.74;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.doc table {
  display: block;
  width: 100%;
  margin: 16px 0 32px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-spacing: 0;
  background: var(--surface);
  box-shadow: var(--shadow-crisp);
}

.doc tbody,
.doc thead,
.doc tr {
  width: 100%;
}

.doc table table {
  display: table;
}

.doc th,
.doc td {
  min-width: 150px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.doc th {
  background: var(--surface-cool);
  color: var(--teal-deep);
  font-size: 14px;
}

.doc td {
  background: rgba(255, 253, 248, 0.74);
}

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

.doc code {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #eee8dc;
  color: var(--red);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

.callout {
  margin: 26px 0 0;
  padding: 20px;
  border: 1px solid rgba(36, 79, 135, 0.24);
  border-radius: var(--radius);
  background: rgba(36, 79, 135, 0.08);
  color: #1d3f6c;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.resource-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.44fr);
  gap: 18px;
  align-items: stretch;
  margin-top: 20px;
}

.resource-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.75);
}

.resource-panel h3 {
  margin-top: 0;
}

.footer {
  padding: 30px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (max-width: 900px) {
  .hero,
  .content-grid,
  .resource-band {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-board {
    min-height: 390px;
  }

  .sheet-stack {
    position: relative;
    inset: auto;
    width: calc(100% - 28px);
  }

  .course-strip,
  .prep-grid {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(100% - 24px, var(--max));
  }

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

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav a {
    white-space: nowrap;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .quiet-link {
    width: 100%;
  }

  .sheet-stack {
    min-height: 330px;
    padding: 20px;
  }

  .sheet-title {
    font-size: 28px;
  }

  .doc-hero {
    min-height: auto;
    padding-top: 40px;
  }

  .content-grid,
  .doc,
  .doc section,
  .callout,
  .resource-band,
  .resource-panel,
  .prep-step {
    max-width: 100%;
  }

  .doc .lead,
  .doc p,
  .callout,
  .prep-grid,
  .prep-step,
  .resource-band,
  .resource-panel {
    width: min(100%, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
  }

  h1,
  .display,
  .doc h1 {
    font-size: 38px;
    line-height: 1.04;
    text-wrap: pretty;
  }

  .doc th,
  .doc td {
    min-width: 170px;
  }
}
