@import url('https://fonts.googleapis.com/css2?family=Lexend+Mega:wght@100..900&family=Public+Sans:wght@100..900&display=swap');

:root {
  --red: #FF3B2F;
  --ink: #111111;
  --paper: #F5F1E8;
  --white: #FFFFFF;
  --head: 'Lexend Mega', 'Public Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --body: 'Public Sans', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

* { box-sizing: border-box; }

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

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

a { color: inherit; }

img { max-width: 100%; }

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

.shell { display: block; }

/* ---------- 左侧竖排导航 ---------- */

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 252px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 26px 18px 22px;
  background: var(--paper);
  border-right: 3px solid var(--ink);
  overflow-y: auto;
  z-index: 30;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  max-width: 100%;
  padding: 10px 14px;
  background: var(--red);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 4px;
  text-decoration: none;
  font-family: var(--head);
  font-weight: 800;
  font-size: 1.12rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
  transition: background 0.15s ease, transform 0.15s ease;
}

.brand:hover { background: var(--white); transform: rotate(-1.2deg); }

.brand .logo { display: block; width: 34px; height: 34px; object-fit: contain; }

.brand-txt { word-break: break-all; }

.rail-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rail-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 10px 11px;
  border: 2px solid transparent;
  border-radius: 4px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.35;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  background: var(--red);
  border-color: var(--ink);
  transform: translateX(4px);
}

.dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  background: var(--red);
  border: 2px solid var(--ink);
  transition: background 0.15s ease;
}

.rail-nav a:hover .dot { background: var(--ink); }

.rail-top {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.rail-top:hover { background: var(--ink); color: var(--paper); }

/* ---------- 主区域 ---------- */

.stage {
  margin-left: 252px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.ticker {
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 3px solid var(--ink);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 22px;
  width: max-content;
  padding: 9px 0;
  white-space: nowrap;
  font-family: var(--head);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  animation: slide 34s linear infinite;
}

.ticker .sep { color: var(--red); }

@keyframes slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  align-items: start;
}

.doc {
  min-width: 0;
  max-width: 940px;
  padding: 0 40px 76px;
}

/* ---------- 头图 ---------- */

.hero {
  position: relative;
  margin: 0 -40px 40px;
  padding: 52px 40px 64px;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
  gap: 20px;
  border-bottom: 0;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28px;
  background: var(--red);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.hero h1 {
  margin: 0;
  font-family: var(--head);
  font-weight: 800;
  font-size: clamp(2.1rem, 5.4vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 16ch;
}

.hero .lead {
  margin: 0;
  max-width: 38ch;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  border-right: 5px solid var(--ink);
  padding-right: 16px;
}

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

.doc > div {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 28px;
  padding: 30px 30px 22px;
  margin: 0 0 30px;
  scroll-margin-top: 26px;
}

.doc div h2 {
  font-family: var(--head);
  font-weight: 800;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

.doc div h3 {
  font-family: var(--head);
  font-size: 1.12rem;
  line-height: 1.35;
  margin: 28px 0 8px;
}

.doc div p {
  margin: 0 0 15px;
  max-width: 66ch;
}

.doc hr {
  border: 0;
  border-top: 3px solid var(--ink);
  margin: 12px 0 20px;
}

.doc div a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.doc div a:hover { color: var(--red); }

.doc div ul,
.doc div ol { padding-left: 1.25em; margin: 0 0 15px; }

.doc div li { margin-bottom: 7px; }

.doc div strong { font-weight: 800; }

.doc div blockquote {
  margin: 0 0 16px;
  padding: 4px 0 4px 18px;
  border-left: 6px solid var(--red);
  font-weight: 700;
}

.doc div figure { margin: 0 0 18px; }

.doc div figure img { border: 3px solid var(--ink); border-radius: 20px; }

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

.side {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  padding: 40px 24px 48px;
  border-left: 3px solid var(--ink);
}

.side h2 {
  margin: 0;
  font-family: var(--head);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.side hr {
  border: 0;
  border-top: 3px solid var(--ink);
  margin: 12px 0 16px;
}

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

.jump li { counter-increment: jump; }

.jump a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 40px;
  padding: 9px 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.4;
  border-bottom: 1px solid rgba(17, 17, 17, 0.28);
  transition: color 0.15s ease, padding-left 0.15s ease;
}

.jump a::before {
  content: counter(jump, decimal-leading-zero);
  font-family: var(--head);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--red);
}

.jump a:hover { color: var(--red); padding-left: 6px; }

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

.foot {
  margin-top: auto;
  background: var(--ink);
  color: var(--paper);
  border-top: 8px solid var(--red);
  padding: 38px 36px 22px;
}

.foot-top {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--paper);
  padding-bottom: 26px;
}

.foot-brand {
  margin: 0;
  font-family: var(--head);
  font-weight: 800;
  font-size: 1.55rem;
  line-height: 1.1;
}

.sub { display: flex; flex-wrap: wrap; }

.sub input {
  min-height: 44px;
  min-width: 176px;
  padding: 10px 14px;
  border: 3px solid var(--paper);
  border-right: 0;
  border-radius: 4px 0 0 4px;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 1rem;
}

.sub input::placeholder { color: rgba(245, 241, 232, 0.72); }

.sub button {
  min-height: 44px;
  padding: 10px 20px;
  border: 3px solid var(--paper);
  border-radius: 0 4px 4px 0;
  background: var(--red);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

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

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 26px 0;
}

.foot-cols dt {
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--red);
  margin-bottom: 8px;
}

.foot-cols dd { margin: 0; }

.foot-cols a,
.foot-cols .host {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--paper);
  text-decoration: none;
  font-size: 1rem;
  word-break: break-all;
}

.foot-cols a:hover { color: var(--red); text-decoration: underline; }

.foot-base {
  border-top: 3px solid var(--paper);
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.foot-base p { margin: 0; font-size: 1rem; }

/* ---------- 滚动揭示 ---------- */

.anim .doc > div {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.anim .doc > div.in { opacity: 1; transform: none; }

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

@media (max-width: 1180px) {
  main { grid-template-columns: minmax(0, 1fr) 250px; }
  .doc { padding: 0 30px 64px; }
  .hero { margin: 0 -30px 34px; padding: 44px 30px 56px; }
}

@media (max-width: 900px) {
  .rail {
    position: sticky;
    inset: 0 0 auto 0;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 14px 8px;
    border-right: 0;
    border-bottom: 3px solid var(--ink);
    overflow: visible;
  }

  .rail-nav { flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; }

  .rail-nav ul { flex-direction: row; gap: 8px; }

  .rail-nav a {
    white-space: nowrap;
    min-height: 42px;
    padding: 8px 11px;
    border-color: var(--ink);
  }

  .rail-nav a:hover,
  .rail-nav a:focus-visible { transform: none; }

  .rail-top { margin-top: 0; align-self: center; flex: 0 0 auto; min-height: 42px; }

  .stage { margin-left: 0; }

  main { grid-template-columns: minmax(0, 1fr); }

  .doc { padding: 0 18px 52px; max-width: none; }

  .hero {
    margin: 0 -18px 28px;
    padding: 32px 18px 42px;
    min-height: 54vh;
  }

  .hero .lead { border-right-width: 4px; padding-right: 12px; }

  .doc > div {
    scroll-margin-top: 100px;
    border-radius: 22px;
    padding: 22px 18px 14px;
    margin-bottom: 24px;
  }

  .side {
    position: static;
    min-height: 0;
    border-left: 0;
    border-top: 3px solid var(--ink);
    padding: 26px 18px 34px;
  }

  .foot { padding: 30px 18px 18px; }

  .foot-cols { grid-template-columns: minmax(0, 1fr); gap: 14px; }

  .sub { width: 100%; }

  .sub input { flex: 1 1 140px; min-width: 0; }
}

@media (max-width: 420px) {
  body { font-size: 16.5px; }
  .hero h1 { max-width: none; }
  .rail-nav a { font-size: 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; }
  .anim .doc > div { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; }
}

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