@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Work+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --dash: rgba(0, 0, 0, 0.16);
  --line: #000000;
  --max: 1200px;
  --hh: 110px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Work Sans', -apple-system, 'Segoe UI', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

h1,
h2,
h3 {
  font-family: 'Outfit', 'Work Sans', system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
}

small {
  display: block;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: 0.22em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

img {
  max-width: 100%;
}

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

/* ---------- 顶部外壳 ---------- */

.top-shell {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.top-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.4rem 0.8rem;
  max-width: var(--max);
  margin: 0 auto;
  min-height: 60px;
  padding: 0.35rem 1rem;
}

.brand {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.16em;
  border-bottom: 2px solid var(--ink);
}

.menu-btn {
  grid-column: 2;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.95rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.menu-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.top-nav {
  display: none;
}

/* 二级粘性锚点条 */

.anchor-bar {
  border-top: 1px solid var(--dash);
  background: var(--paper);
}

.anchor-track {
  display: flex;
  gap: 0.1rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 0.55rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.anchor-track::-webkit-scrollbar {
  display: none;
}

.anchor-track a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.6rem;
  font-size: 16px;
  border-bottom: 2px solid transparent;
}

.anchor-track a:hover,
.anchor-track a:focus-visible {
  border-bottom-color: var(--ink);
}

/* ---------- 全屏遮罩菜单 ---------- */

.menu-panel {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.1rem 2rem;
  background: var(--ink);
  color: var(--paper);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-1.5%);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.menu-panel[data-open] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.menu-title {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.16em;
}

.menu-close {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--paper);
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

.menu-close:hover {
  background: var(--paper);
  color: var(--ink);
}

.menu-nav {
  display: grid;
  margin-top: 1rem;
  overflow-y: auto;
}

.menu-nav a {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 0.1rem 0.2rem;
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(1.35rem, 5vw, 2.1rem);
  letter-spacing: -0.01em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.menu-nav a:hover,
.menu-nav a:focus-visible {
  background: var(--paper);
  color: var(--ink);
  padding-left: 0.7rem;
}

/* ---------- 主体 ---------- */

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.1rem;
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 2rem;
  align-content: center;
  padding: 2.5rem 0 3rem;
  min-height: calc(100vh - var(--hh));
  min-height: calc(100svh - var(--hh));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(var(--ink) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.14;
}

.hero-copy {
  text-align: center;
}

.hero-copy h1 {
  font-size: clamp(2.1rem, 9vw, 4.3rem);
  word-break: break-word;
}

.hero-lead {
  margin: 1.15rem auto 0;
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.75;
}

.hero-media {
  margin: 0;
  border: 1px solid var(--ink);
  border-bottom-width: 8px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--paper);
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 380px;
  object-fit: cover;
}

.hero-aside {
  padding: 1.1rem 1.15rem 1.3rem;
  border: 1px solid var(--ink);
  border-bottom-width: 8px;
  border-radius: 18px;
  background: var(--paper);
}

.hero-aside small {
  letter-spacing: 0.32em;
}

.hero-aside h2 {
  margin-top: 0.2rem;
  font-size: 1.35rem;
}

.toc {
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.toc li + li {
  border-top: 1px solid var(--dash);
}

.toc a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  font-size: 16px;
}

.toc a::before {
  counter-increment: toc;
  content: counter(toc, decimal-leading-zero);
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 16px;
  opacity: 0.55;
}

.toc a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 正文区块 ---------- */

main > .wrap > section[id] {
  padding: 3rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--hh) + 10px);
}

main > .wrap > section[id] h2 {
  font-size: clamp(1.55rem, 3.4vw, 2.25rem);
  margin-bottom: 0.7rem;
}

main > .wrap > section[id] small {
  margin-bottom: 0.4rem;
  opacity: 0.7;
}

main > .wrap > section[id] h3 {
  font-size: 1.3rem;
  margin: 1.7rem 0 0.4rem;
}

main > .wrap > section[id] p {
  max-width: 66ch;
  margin: 0.9rem 0;
}

main > .wrap > section[id] a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

main > .wrap > section[id] ul,
main > .wrap > section[id] ol {
  max-width: 66ch;
  padding-left: 1.3rem;
}

main > .wrap > section[id] li {
  margin: 0.4rem 0;
}

main > .wrap > section[id] img {
  height: auto;
  border-radius: 18px;
}

main > .wrap > section[id] blockquote {
  margin: 1.5rem 0;
  padding: 0.2rem 0 0.2rem 1.1rem;
  border-left: 3px solid var(--ink);
  font-size: 17px;
}

main > .wrap > section[id] table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

main > .wrap > section[id] th,
main > .wrap > section[id] td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--dash);
  text-align: left;
}

/* ---------- 页脚 ---------- */

.foot {
  display: grid;
  gap: 2rem 1.6rem;
  margin-top: 4rem;
  padding: 2.6rem max(1.1rem, calc((100% - 1200px) / 2)) 1.6rem;
  background: var(--ink);
  color: var(--paper);
}

.foot > section {
  min-width: 0;
}

.f-logo {
  display: inline-block;
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(2.1rem, 9vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  border-bottom: 3px solid var(--paper);
}

.f-index dl {
  margin: 0;
}

.f-index dt {
  padding-bottom: 0.4rem;
  font-size: 16px;
  letter-spacing: 0.3em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}

.f-index dd {
  margin: 0;
}

.f-index a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.f-index a:hover,
.f-index a:focus-visible {
  background: var(--paper);
  color: var(--ink);
  padding-left: 0.55rem;
}

.f-act small {
  letter-spacing: 0.3em;
}

.f-act h3 {
  margin: 0.25rem 0 0.85rem;
  font-size: 1.3rem;
}

.foot-menu {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.1rem;
  border: 1px solid var(--paper);
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 16px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.foot-menu:hover {
  background: var(--paper);
  color: var(--ink);
}

.f-meta .copy {
  margin: 0 0 0.7rem;
  font-size: 16px;
  letter-spacing: 0.09em;
}

.to-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  border-bottom: 1px solid var(--paper);
}

/* ---------- 动效 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .menu-panel,
  a,
  .menu-btn,
  .foot-menu {
    transition: none;
  }
}

/* ---------- 断点 ---------- */

@media (min-width: 620px) {
  .foot {
    grid-template-columns: 1fr 1fr;
  }

  .f-brand {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  :root {
    --hh: 132px;
  }

  .top-bar {
    grid-template-columns: 1fr auto 1fr auto;
    gap: 0.6rem 1.4rem;
    min-height: 76px;
    padding: 0.4rem 2rem;
  }

  .brand {
    grid-column: 2;
    justify-self: center;
    font-size: 22px;
  }

  .top-nav {
    display: flex;
    align-items: center;
    gap: 0.15rem;
  }

  .top-nav--left {
    grid-column: 1;
    justify-self: start;
  }

  .top-nav--right {
    grid-column: 3;
    justify-self: end;
  }

  .top-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.7rem;
    font-size: 16px;
    border-bottom: 2px solid transparent;
  }

  .top-nav a:hover,
  .top-nav a:focus-visible {
    border-bottom-color: var(--ink);
  }

  .menu-btn {
    grid-column: 4;
  }

  .anchor-track {
    justify-content: center;
  }

  .hero {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.85fr);
    grid-template-rows: auto auto;
    align-items: center;
    gap: 1.6rem 2.6rem;
    padding: 3rem 0 4rem;
  }

  .hero-copy {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .hero-media {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
  }

  .hero-media img {
    max-height: 300px;
  }

  .hero-aside {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }

  .foot {
    grid-template-columns: 1.5fr 1fr 0.85fr 0.85fr;
  }

  .f-brand {
    grid-column: auto;
  }

  main > .wrap > section[id] {
    padding: 4rem 0;
  }
}

@media (min-width: 1200px) {
  .wrap {
    padding: 0 2rem;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
