@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=Crimson+Pro:wght@400;500;600;700&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --u: 8px;
  --bar: 76px;
  --sans: 'Atkinson Hyperlegible', 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --serif: 'Crimson Pro', Georgia, 'Songti SC', 'SimSun', serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 0 calc(var(--bar) + 40px);
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, .055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 0, 0, .055) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
}

h1, h2, h3, h4, nav, address, small, .chip, .cta, .brand, .colophon {
  font-family: var(--sans);
}

img { max-width: 100%; }
a { color: var(--ink); }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* 底部固定条 */
.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: var(--ink);
  color: var(--paper);
  border-top: 2px solid var(--ink);
}

.bar-in {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 8px 16px;
  min-height: var(--bar);
}

.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 12px 4px;
  min-height: 44px;
  color: var(--paper);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-logo { height: 24px; width: auto; display: block; }

.dock {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.dock::-webkit-scrollbar { display: none; }

.dock p {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  white-space: nowrap;
}

.dock a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 13px 10px;
  min-height: 44px;
  color: var(--paper);
  font-size: 16px;
  line-height: 1.3;
  font-weight: 400;
  text-decoration: none;
  border-radius: 2px;
  animation: rise .45s ease both;
}

.dock a:nth-child(1) { animation-delay: .02s; }
.dock a:nth-child(2) { animation-delay: .06s; }
.dock a:nth-child(3) { animation-delay: .10s; }
.dock a:nth-child(4) { animation-delay: .14s; }
.dock a:nth-child(5) { animation-delay: .18s; }
.dock a:nth-child(6) { animation-delay: .22s; }
.dock a:nth-child(7) { animation-delay: .26s; }

.dock a::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  background: var(--paper);
}

.dock a:hover { background: #1c1c1c; }
.dock a[aria-current="true"] {
  text-decoration: underline;
  text-underline-offset: 7px;
  text-decoration-thickness: 2px;
}

.cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 13px 14px;
  min-height: 44px;
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--paper);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
}
.cta:hover { background: var(--ink); color: var(--paper); }

/* Hero */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
  min-height: 68vh;
  max-width: 1440px;
  margin: 0 auto;
  padding: calc(var(--u) * 14) calc(var(--u) * 3) calc(var(--u) * 8);
}

.hero h1 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2.15rem, 10.5vw, 6rem);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.035em;
  animation: rise .6s ease both;
}

.chip {
  position: absolute;
  top: calc(var(--u) * 9);
  right: calc(var(--u) * 3);
  margin: 0;
  padding: 9px 18px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 16px;
  line-height: 1.5;
  will-change: transform;
  animation: rise .5s ease both;
  animation-delay: .1s;
}

.sub {
  margin: 26px 0 0;
  max-width: 40ch;
  font-size: 17px;
  line-height: 1.6;
  opacity: .85;
}

/* 主栅格 */
.layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
  align-items: start;
}

.rail {
  grid-column: 1 / 4;
  position: sticky;
  top: 24px;
  padding-top: 8px;
  border-top: 2px solid var(--ink);
}

.rail small {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .22em;
  line-height: 1.5;
  opacity: .6;
  padding: 12px 0 0;
}

.rail h2 {
  margin: 6px 0 14px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.5;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.rail-list a {
  display: block;
  padding: 11px 2px;
  min-height: 44px;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, .16);
}
.rail-list a:hover { background: var(--ink); color: var(--paper); padding-left: 10px; }

/* 正文 */
.prose {
  grid-column: 4 / 13;
  font-size: 17px;
  min-width: 0;
}

.prose > article {
  margin: 0 0 24px;
  padding: clamp(20px, 4vw, 46px);
  background: rgba(255, 255, 255, .62);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  backdrop-filter: blur(16px) saturate(130%);
  border: 1px solid rgba(0, 0, 0, .85);
  border-radius: 28px;
  animation: rise .5s ease both;
}

.prose > article:nth-of-type(2) { animation-delay: .07s; }
.prose > article:nth-of-type(3) { animation-delay: .14s; }
.prose > article:nth-of-type(4) { animation-delay: .21s; }
.prose > article:nth-of-type(5) { animation-delay: .28s; }
.prose > article:nth-of-type(6) { animation-delay: .35s; }
.prose > article:nth-of-type(7) { animation-delay: .42s; }

article[id] { scroll-margin-top: 32px; }

.prose h2 {
  margin: 0 0 16px;
  font-size: clamp(22px, 3.6vw, 30px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.prose h3 {
  margin: 28px 0 12px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -.01em;
}

.prose small {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .2em;
  line-height: 1.5;
  opacity: .6;
  margin-bottom: 6px;
}

.prose p { margin: 0 0 1.05em; }
.prose p:last-child { margin-bottom: 0; }

.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.35em; }
.prose li { margin: .38em 0; line-height: 1.6; }

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

.prose blockquote {
  margin: 1.3em 0;
  padding: 6px 0 6px 20px;
  border-left: 4px solid var(--ink);
  font-size: 19px;
  line-height: 1.55;
}

.prose img {
  display: block;
  height: auto;
  margin: 1.3em 0;
  border-radius: 18px;
}

.prose hr { border: 0; border-top: 1px solid var(--ink); margin: 2em 0; }

.prose code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: .92em;
  background: rgba(0, 0, 0, .06);
  padding: .1em .35em;
  border-radius: 4px;
}

/* 页脚 */
.foot {
  max-width: 1440px;
  margin: 56px auto 0;
  padding: 28px 16px 0;
  border-top: 2px solid var(--ink);
}

.foot-in {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.foot address {
  font-style: normal;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
}

.foot .brand-logo { height: 26px; }

.foot-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
  justify-content: flex-end;
}

.foot-links a {
  display: inline-block;
  padding: 11px 0;
  min-height: 44px;
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
}
.foot-links a:hover { text-decoration: underline; text-underline-offset: 4px; }

.colophon {
  margin: 24px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid rgba(0, 0, 0, .22);
  text-align: center;
  font-size: 16px;
  line-height: 1.5;
}

/* 窄屏 */
@media (max-width: 860px) {
  .bar-in { gap: 8px; padding: 8px 12px; }
  .brand { padding: 12px 2px; }
  .cta { padding: 13px 11px; }

  .hero { padding: calc(var(--u) * 12) 16px calc(var(--u) * 7); min-height: 64vh; }
  .hero h1 { max-width: 12ch; }
  .chip { right: 16px; top: calc(var(--u) * 6); padding: 8px 14px; }
  .sub { margin-top: 20px; max-width: 30ch; }

  .layout { grid-template-columns: 1fr; padding: 0 16px; gap: 20px; }
  .rail, .prose { grid-column: 1 / -1; }
  .rail { position: static; }
  .rail h2 { border-bottom: none; margin-bottom: 12px; }
  .rail-list { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .rail-list a {
    border: 1px solid rgba(0, 0, 0, .28);
    border-radius: 999px;
    padding: 10px 14px;
  }
  .rail-list a:hover { padding-left: 14px; }
  .rail-list li { margin: 0; }

  .prose > article { border-radius: 24px; }

  .foot-in { grid-template-columns: 1fr; gap: 8px; }
  .foot-links { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
  }
  .chip { transform: none !important; }
}

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