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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --mute: #666666;
  --line: #dcdcdc;
  --faint: #f5f5f5;
  --display: 'Bebas Neue', 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --body: 'Source Sans 3', 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

body {
  margin: 0;
  padding-bottom: 96px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.72;
  letter-spacing: 0.01em;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

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

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

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

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  min-height: 70vh;
  padding: 3rem 1.25rem;
  text-align: center;
  border-bottom: 6px solid var(--ink);
  background-image: repeating-linear-gradient(
    to right,
    rgba(0, 0, 0, 0.07) 0 1px,
    transparent 1px 8.3333%
  );
}

.hero .mark {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.hero h1 {
  margin: 0;
  max-width: 20ch;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 8.5vw, 7rem);
  line-height: 1.04;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

/* ---------- 主体网格 ---------- */

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  column-gap: 3rem;
  align-items: start;
  max-width: 78rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.sheet {
  min-width: 0;
  padding-block: 3rem 4rem;
}

.sheet section {
  scroll-margin-top: 1.5rem;
  padding-block: 2.25rem;
  border-top: 1px solid var(--line);
}

.sheet section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.sheet h2 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.14;
}

.sheet h2 + hr {
  margin: 0 0 1.25rem;
  border: 0;
  border-top: 3px solid var(--ink);
  width: 64px;
}

.sheet hr {
  margin: 1.5rem 0;
  border: 0;
  border-top: 3px solid var(--ink);
  width: 64px;
}

.sheet h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1.25rem;
  line-height: 1.35;
}

.sheet p {
  margin: 0 0 1.1rem;
  max-width: 46rem;
}

.sheet ul,
.sheet ol {
  margin: 0 0 1.2rem;
  padding-left: 1.3rem;
  max-width: 44rem;
}

.sheet li { margin-bottom: 0.4rem; }

.sheet blockquote {
  margin: 1.5rem 0;
  padding: 0.5rem 0 0.5rem 1.25rem;
  border-left: 4px solid var(--ink);
  font-size: 1.05rem;
}

.sheet img {
  margin: 1.25rem 0;
  border-radius: 4px;
}

.sheet a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.sheet a:hover {
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.sheet strong { font-weight: 700; }

/* ---------- 右侧栏 ---------- */

.rail {
  position: sticky;
  top: 1.5rem;
  margin-block: 3rem;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 2px solid var(--ink);
  font-size: 1rem;
}

.rail h2 {
  margin: 0 0 0.5rem;
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.rail hr {
  margin: 0 0 0.9rem;
  border: 0;
  border-top: 2px solid var(--ink);
}

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

.rail-list li { counter-increment: rl; }

.rail-list a {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0.45rem 0;
  line-height: 1.35;
  text-decoration: none;
}

.rail-list a::before {
  content: counter(rl, decimal-leading-zero);
  flex: none;
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--mute);
}

.rail-list a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

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

.foot {
  margin-top: 2rem;
  padding: 2.5rem 1.5rem 2rem;
  border-top: 6px solid var(--ink);
  background: var(--paper);
}

.foot-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
  gap: 2rem;
  align-items: start;
  max-width: 78rem;
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-family: var(--display);
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.foot-desc {
  margin: 0.25rem 0 0;
  max-width: 34rem;
  font-size: 1rem;
  color: var(--mute);
}

.sub label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.sub-row { display: flex; gap: 0.5rem; }

.sub input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 0.5rem 0.7rem;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.sub button {
  min-height: 44px;
  padding: 0 1.1rem;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.sub button:hover { background: var(--paper); color: var(--ink); }

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  max-width: 78rem;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.foot-cols dl { margin: 0; }

.foot-cols dt {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.foot-cols dd { margin: 0; }

.foot-cols a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
}

.foot-cols a:hover { text-decoration: underline; text-underline-offset: 0.22em; }

.foot-bar {
  max-width: 78rem;
  margin: 1.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.foot-bar p {
  margin: 0;
  font-size: 1rem;
  color: var(--mute);
}

/* ---------- 底部固定条 ---------- */

.dock {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.4rem 1rem calc(0.4rem + env(safe-area-inset-bottom, 0px));
  background: var(--paper);
  border-top: 2px solid var(--ink);
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.06);
}

.dock-brand .brand { font-size: 1.3rem; }

.dock-nav {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.dock-nav ol {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dock-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 0.55rem;
  border-radius: 4px;
  font-size: 1rem;
  white-space: nowrap;
  text-decoration: none;
}

.dock-nav a:hover { background: var(--ink); color: var(--paper); }

.dock-search { display: flex; gap: 0.35rem; }

.dock-search input {
  width: 8rem;
  min-height: 40px;
  padding: 0.35rem 0.6rem;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.dock-search button {
  min-height: 40px;
  padding: 0 0.7rem;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.dock-search button:hover { background: var(--paper); color: var(--ink); }

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

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

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

  .sheet a,
  .dock-nav a,
  .foot-cols a,
  .sub button {
    transition: background-color 0.18s ease, color 0.18s ease;
  }
}

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

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

@media (max-width: 760px) {
  body { padding-bottom: 148px; }

  .grid {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
    padding-inline: 1.15rem;
  }

  .hero { min-height: 68vh; padding-inline: 1rem; }

  .rail {
    position: static;
    margin: 0 0 2.5rem;
    padding: 1rem 0 0;
    border-left: 0;
    border-top: 2px solid var(--ink);
  }

  .rail-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1rem;
  }

  .foot { padding-inline: 1.15rem; }

  .foot-top { grid-template-columns: minmax(0, 1fr); }

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

  .dock {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand search"
      "nav nav";
    gap: 0.15rem 0.75rem;
  }

  .dock-brand { grid-area: brand; }
  .dock-search { grid-area: search; }
  .dock-nav { grid-area: nav; }
  .dock-search input { width: 7rem; }
}

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