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

:root {
  --paper: #ffffff;
  --tint: #f5f5f5;
  --ink: #1f1f1f;
  --rule: #1f1f1f;
  --muted: rgba(31, 31, 31, .62);
  --display: 'Barlow Condensed', 'Barlow', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --body: 'Barlow', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --r: 28px;
  --wrap: 1120px;
  --pad: clamp(16px, 3vw, 28px);
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--tint);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); }
p { margin: 0 0 1em; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- 顶部导航 ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px var(--pad);
  background: rgba(255, 255, 255, .95);
  border-bottom: 1.5px solid var(--rule);
  backdrop-filter: blur(8px);
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1.5px solid var(--rule);
  border-radius: 14px;
  background: var(--paper);
  text-decoration: none;
  overflow: hidden;
}

.mark img { width: 24px; height: 24px; object-fit: contain; }

.mark-text {
  font-family: var(--display);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .06em;
  line-height: 1.1;
  max-width: 4em;
  text-align: center;
}

.nav { flex: 1 1 auto; min-width: 0; }

.nav p {
  display: flex;
  gap: 2px;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav p::-webkit-scrollbar { display: none; }

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 11px;
  border-radius: 11px;
  font-size: .95rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}

.nav a::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--ink);
  transform: skewX(-18deg);
  transition: background .18s ease;
}

.nav a:hover,
.nav a:focus-visible {
  background: var(--ink);
  color: var(--paper);
  outline: none;
}

.nav a:hover::before,
.nav a:focus-visible::before { background: var(--paper); }

.find { margin-left: auto; flex: 0 0 auto; }

.find input {
  height: 44px;
  width: 132px;
  padding: 0 16px;
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: .94rem;
  transition: width .25s ease, box-shadow .25s ease;
  -webkit-appearance: none;
  appearance: none;
}

.find input::-webkit-search-cancel-button { -webkit-appearance: none; }

.find input:focus {
  outline: none;
  width: 196px;
  box-shadow: inset 0 0 0 3px rgba(31, 31, 31, .12);
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  min-height: 70vh;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(36px, 7vw, 78px) var(--pad) clamp(56px, 9vw, 96px);
  overflow: hidden;
}

.hero h1 {
  margin: 0;
  max-width: 18ch;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.15rem, 6.5vw, 5.4rem);
  line-height: .97;
  letter-spacing: -.015em;
}

.hero-desc {
  max-width: 54ch;
  margin: 0;
  font-size: 1.03rem;
  color: var(--muted);
}

.slash {
  position: absolute;
  z-index: -1;
  right: -8%;
  bottom: 15%;
  width: 52%;
  height: 22px;
  background: var(--ink);
  transform: skewY(-9deg);
}

.slash-b {
  bottom: 8%;
  right: 4%;
  width: 26%;
  height: 10px;
  background: rgba(31, 31, 31, .32);
  transform: skewY(-9deg);
}

/* ---------- 侧栏 + 卡片 ---------- */

.lead {
  display: grid;
  grid-template-columns: 252px 1fr;
  gap: 20px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad) clamp(18px, 3vw, 26px);
}

.rail {
  padding: 22px 20px;
  background: var(--paper);
  border: 1.5px solid var(--rule);
  border-radius: var(--r);
  align-self: start;
  position: sticky;
  top: 84px;
}

.rail h2 {
  margin: 4px 0 12px;
  font-size: 1.28rem;
}

.rail-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 6px;
  font-size: .94rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(31, 31, 31, .14);
  transition: background .16s ease;
}

.rail-list a::after {
  content: '';
  width: 11px;
  height: 2px;
  background: currentColor;
  opacity: .35;
  transition: opacity .16s ease, transform .16s ease;
}

.rail-list li:last-child a { border-bottom: 0; }
.rail-list a:hover { background: var(--tint); }
.rail-list a:hover::after { opacity: 1; transform: translateX(3px); }

.board {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  min-height: 232px;
  margin: 0;
  padding: clamp(22px, 3.4vw, 40px);
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  border: 1.5px solid var(--rule);
  border-radius: var(--r);
  transition: transform .3s cubic-bezier(.2, .7, .3, 1);
}

.board:hover { transform: scale(1.01); }

.board-brand {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 5.4vw, 3.7rem);
  line-height: .92;
  letter-spacing: -.01em;
}

.board figcaption {
  padding-left: 12px;
  border-left: 3px solid var(--paper);
  font-size: .92rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, .74);
}

.tape {
  position: absolute;
  top: -18px;
  right: -30px;
  width: 62%;
  height: 13px;
  background: var(--paper);
  transform: rotate(-14deg);
  opacity: .85;
}

/* ---------- 正文 ---------- */

main > article[id] {
  max-width: var(--wrap);
  margin: 20px auto;
  padding: clamp(22px, 4vw, 46px);
  background: var(--paper);
  border: 1.5px solid var(--rule);
  border-radius: var(--r);
  scroll-margin-top: 108px;
}

main > article[id] h2,
main > article[id] h3,
main > article[id] p,
main > article[id] li,
main > article[id] blockquote { max-width: 70ch; }

main > article[id] h2,
main > article[id] h3 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.01em;
}

main > article[id] h2 { font-size: clamp(1.55rem, 3.2vw, 2.15rem); }
main > article[id] h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }

main > article[id] ul,
main > article[id] ol { padding-left: 1.35em; }

main > article[id] li { margin-bottom: .45em; }

main > article[id] blockquote {
  margin: 0 0 1.2em;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--ink);
  color: var(--muted);
}

main > article[id] img {
  border: 1.5px solid var(--rule);
  border-radius: 18px;
}

main > article[id] a {
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

main > article[id] ::selection { background: var(--ink); color: var(--paper); }

small {
  display: inline-block;
  font-family: var(--display);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .17em;
  line-height: 1.4;
  color: var(--muted);
  text-transform: uppercase;
}

small + h2,
small + h3 { margin-top: 2px; }

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

.foot {
  display: grid;
  grid-template-columns: 1fr minmax(0, 420px);
  align-items: end;
  gap: 16px 28px;
  max-width: var(--wrap);
  margin: clamp(32px, 6vw, 64px) auto 0;
  padding: clamp(26px, 5vw, 46px) var(--pad) 34px;
  border-top: 1.5px solid var(--rule);
}

.foot-brand {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 9vw, 5rem);
  line-height: .88;
  letter-spacing: -.02em;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px 16px;
  margin: 0;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 2px;
  font-size: .9rem;
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  transition: border-color .16s ease;
}

.foot-links a:hover { border-color: var(--ink); }

.foot small {
  grid-column: 1 / -1;
  margin-top: 6px;
  text-align: center;
  letter-spacing: .12em;
  color: rgba(31, 31, 31, .55);
}

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

html.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease, transform .55s cubic-bezier(.2, .7, .3, 1);
}

html.reveal-ready [data-reveal].in {
  opacity: 1;
  transform: none;
}

html.reveal-ready main > article[id] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .3, 1);
}

html.reveal-ready main > article[id].in {
  opacity: 1;
  transform: none;
}

html.reveal-ready .rail-list li {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity .4s ease, transform .4s ease;
}

html.reveal-ready .rail.in .rail-list li {
  opacity: 1;
  transform: none;
}

.rail-list li:nth-child(1) { transition-delay: .04s; }
.rail-list li:nth-child(2) { transition-delay: .08s; }
.rail-list li:nth-child(3) { transition-delay: .12s; }
.rail-list li:nth-child(4) { transition-delay: .16s; }
.rail-list li:nth-child(5) { transition-delay: .2s; }
.rail-list li:nth-child(6) { transition-delay: .24s; }
.rail-list li:nth-child(7) { transition-delay: .28s; }

/* ---------- 响应式 ---------- */

@media (max-width: 880px) {
  .lead { grid-template-columns: 1fr; }
  .rail { position: static; }
  .board { min-height: 190px; order: 2; }
  .hero { min-height: auto; padding-top: clamp(30px, 8vw, 52px); }
  .slash { bottom: 8%; width: 62%; height: 16px; }
  .slash-b { bottom: 3%; width: 32%; height: 8px; }
  .find { margin-left: 0; flex: 1 1 120px; }
  .find input,
  .find input:focus { width: 100%; }
  .nav { order: 3; flex: 1 1 100%; }
  .foot { grid-template-columns: 1fr; }
  .foot-links { justify-content: flex-start; }
  main > article[id] { scroll-margin-top: 132px; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .nav a { padding: 10px 9px; font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
  html.reveal-ready [data-reveal],
  html.reveal-ready main > article[id],
  html.reveal-ready .rail-list li {
    opacity: 1;
    transform: none;
  }
}

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