:root {
  color-scheme: dark;
  --bg: #100e0c;
  --ink: #f6f1e8;
  --muted: #c9bfb2;
  --faint: #8f867b;
  --line: rgba(246, 241, 232, 0.14);
  --accent: #e7a15a;
  --card: #1a1613;
  --max: 72rem;
  --read: 46rem;
}

* { box-sizing: border-box; }

html { scroll-padding-top: 5.5rem; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(880px 420px at 0% -8%, rgba(231, 161, 90, 0.18), transparent 58%),
    radial-gradient(640px 360px at 100% 0%, rgba(231, 161, 90, 0.07), transparent 50%),
    var(--bg);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.8;
  line-break: strict;
}

::selection { background: rgba(231, 161, 90, 0.35); color: var(--ink); }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--bg);
  padding: 0.4rem 0.75rem;
  z-index: 5;
}

.skip:focus { top: 0.75rem; }

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

.bar {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
}

.site-header .bar { min-height: 4.4rem; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  font-family: "Iowan Old Style", Palatino, "Songti SC", serif;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.mark {
  width: 1.7rem;
  height: 1.7rem;
  color: var(--ink);
  flex: none;
}

nav[aria-label="主导航"],
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.05rem;
}

nav[aria-label="主导航"] a,
.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

nav a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -1px 0 var(--accent);
}

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

main {
  width: min(var(--read), calc(100% - 2.5rem));
  margin-inline: auto;
  padding: 3.2rem 0 4.5rem;
}

.home main {
  width: min(var(--max), calc(100% - 2.5rem));
  padding-top: 3.6rem;
}

h1, h2, h3 {
  font-family: "Iowan Old Style", Palatino, "Songti SC", "Noto Serif SC", serif;
  font-weight: 540;
  letter-spacing: -0.035em;
  line-height: 1.18;
}

h1 {
  margin: 0.35rem 0 1.1rem;
  font-size: clamp(2.4rem, 5vw, 4rem);
}

.home h1 {
  max-width: 8.6em;
  font-size: clamp(3rem, 6.6vw, 5.35rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

h2 {
  margin: 2.8rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: clamp(1.55rem, 3vw, 2.15rem);
}

h3 { margin: 1.5rem 0 0.35rem; font-size: 1.25rem; }

.kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18.5rem;
  gap: 3.5rem;
  align-items: start;
}

.answer {
  position: relative;
  margin: 1.4rem 0 1rem;
  padding: 1.15rem 1.2rem 1.2rem;
  max-width: 40rem;
  background: rgba(246, 241, 232, 0.035);
  border: 1px solid var(--line);
  font-size: 1.12rem;
  line-height: 1.75;
}

.answer::before,
.answer::after {
  content: "";
  position: absolute;
  width: 0.85rem;
  height: 0.85rem;
  border-color: var(--accent);
  border-style: solid;
}

.answer::before { top: -1px; left: -1px; border-width: 1.5px 0 0 1.5px; }
.answer::after { right: -1px; bottom: -1px; border-width: 0 1.5px 1.5px 0; }

.facts {
  position: sticky;
  top: 5.6rem;
  padding: 1.15rem 1.15rem 0.35rem;
  background:
    linear-gradient(var(--accent), var(--accent)) 0 0 / 100% 3px no-repeat,
    var(--card);
  border: 1px solid var(--line);
}

.facts h2 {
  margin: 0 0 0.9rem;
  padding: 0;
  border: 0;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.facts dl { margin: 0; }
.facts dt {
  color: var(--faint);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.facts dd { margin: 0.15rem 0 0.95rem; }

.doc ol,
.doc ul { padding-left: 1.15rem; }

li + li { margin-top: 0.4rem; }

.rail {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  counter-reset: frame;
}

.rail li {
  position: relative;
  margin: 0;
  padding: 0.95rem 0 0.95rem 3.4rem;
  border-top: 1px solid var(--line);
  counter-increment: frame;
}

.rail li::before {
  content: counter(frame, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.85rem;
  color: var(--accent);
  font-family: "Iowan Old Style", Palatino, "Songti SC", serif;
  font-size: 1.25rem;
}

.audience,
.steps,
.cards {
  padding: 0;
  list-style: none;
}

.audience,
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  counter-reset: frame;
}

.audience li,
.steps li,
.cards a {
  background: var(--card);
  border: 1px solid var(--line);
}

.audience li,
.steps li {
  counter-increment: frame;
  padding: 1rem 1rem 1.15rem;
}

.audience li::before,
.steps li::before {
  content: counter(frame, decimal-leading-zero);
  display: block;
  margin-bottom: 0.7rem;
  color: var(--accent);
  font-family: "Iowan Old Style", Palatino, "Songti SC", serif;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  counter-reset: frame;
}

.cards li { counter-increment: frame; }

.cards a {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  height: 100%;
  min-height: 11rem;
  padding: 1.05rem 1rem 1.15rem;
  color: inherit;
  text-decoration: none;
}

.cards a::before {
  content: counter(frame, decimal-leading-zero);
  color: var(--accent);
  font-family: "Iowan Old Style", Palatino, serif;
  font-size: 1.2rem;
}

.cards a:hover {
  border-color: var(--accent);
  color: inherit;
}

.cards strong { font-size: 1.15rem; letter-spacing: -0.02em; }
.cards span { color: var(--muted); }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--card);
}

table { width: 100%; border-collapse: collapse; }
caption {
  padding: 0.85rem 1rem 0;
  color: var(--faint);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-align: left;
  caption-side: top;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}
th { color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

.updated { color: var(--faint); font-size: 0.92rem; }

blockquote {
  margin: 1.2rem 0;
  padding: 1rem 1.1rem;
  background: var(--card);
  border-left: 2px solid var(--accent);
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.6rem;
  color: var(--muted);
}

.site-footer .bar {
  display: grid;
  justify-content: stretch;
  gap: 0.9rem;
}

.site-footer p { margin: 0; max-width: 40rem; }

@media (max-width: 860px) {
  .layout, .audience, .steps, .cards { grid-template-columns: 1fr; }
  .facts { position: static; }
  .site-header .bar,
  .bar { align-items: flex-start; flex-direction: column; padding: 0.85rem 0; }
  .home h1 { max-width: none; }
  .cards a { min-height: 0; }
}

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

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
  pointer-events: none;
}

.topbar a,
.topbar button { pointer-events: auto; }

.topbar__actions {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.lang {
  display: inline-block;
  height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px) saturate(180%);
  color: #fff;
  text-decoration: none;
  font: 500 16px/48px "Helvetica Neue", Helvetica, Arial, "PingFang SC", sans-serif;
}

.lang:hover { color: #fff; }

.topbar__logo {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid #fff;
  background: rgba(35, 35, 35, 0.4);
  backdrop-filter: blur(10px) saturate(180%);
  color: #fff;
  text-decoration: none;
  font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.menu { position: relative; }

.menu__button {
  position: relative;
  height: 48px;
  padding: 0 42px 0 17px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px) saturate(180%);
  font: 500 16px/48px "Helvetica Neue", Helvetica, Arial, "PingFang SC", sans-serif;
  cursor: pointer;
}

.menu__icon {
  position: absolute;
  right: 17px;
  top: 50%;
  width: 12px;
  height: 8px;
  transform: translateY(-50%);
}

.menu__icon span {
  position: absolute;
  left: 0;
  width: 12px;
  height: 1px;
  background: #9e9e9e;
}

.menu__icon span:nth-child(1) { top: 0; }
.menu__icon span:nth-child(2) { top: 4px; }
.menu__icon span:nth-child(3) { top: 8px; }

.menu.is-open .menu__icon span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.menu.is-open .menu__icon span:nth-child(2) { opacity: 0; }
.menu.is-open .menu__icon span:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }

.menu__dropdown {
  display: none;
  position: absolute;
  top: 56px;
  right: 0;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu.is-open .menu__dropdown { display: flex; }

.menu__dropdown a {
  display: block;
  min-width: 196px;
  height: 52px;
  padding: 0 17px;
  border-radius: 16px;
  background: #2c2e2b;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  line-height: 52px;
  white-space: nowrap;
}

.menu__dropdown a[aria-current="page"] { color: #e7a15a; }

.doc main { padding-top: 7rem; }
