:root {
  --ink: #000000;
  --bg: #ffffff;
  --line: #e6e6e6;
  --mute: #6b6b6b;
  --card: #ffffff;
  --shadow: 0 2px 20px rgba(0, 0, 0, 0.07);
  --r: 18px;
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Raleway', Helvetica, Arial, 'Helvetica Neue', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1.1em; }
[hidden] { display: none !important; }
::selection { background: #000; color: #fff; }

h1, h2, h3, h4 {
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.005em;
  margin: 0 0 0.55em;
}

.side-a:focus-visible,
.brand:focus-visible,
.cta:focus-visible,
.rail-l a:focus-visible,
.rail-top:focus-visible,
.foot-dl a:focus-visible,
.foot-mark:focus-visible,
.foot-top:focus-visible,
.srch-i:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

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

.side {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 20;
  width: 272px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 20px;
  background: #fff;
  border-right: 1px solid var(--ink);
}

.side-top {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.srch { position: relative; }

.srch-i {
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  -webkit-appearance: none;
  appearance: none;
}

.srch-i::placeholder { color: #8a8a8a; }

.side-nav {
  flex: 1 1 auto;
  overflow-y: auto;
  margin: 0 -20px;
  padding: 0 20px 8px;
}

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

.side-a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 11px 4px;
  font-size: 16px;
  border-bottom: 1px solid #efefef;
}

.side-k {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border: 1px solid var(--ink);
  transition: background 0.2s ease;
}

.side-a:hover .side-k,
.side-a.is-on .side-k { background: var(--ink); }
.side-a.is-on { font-weight: 700; }

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

.main { margin-left: 272px; }

.hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: center;
  min-height: 100vh;
  padding: 64px 40px;
  border-bottom: 1px solid var(--ink);
}

.hero-media {
  grid-column: 1 / span 5;
  align-self: stretch;
  display: flex;
  align-items: center;
  min-width: 0;
}

.hero-txt {
  grid-column: 7 / span 6;
  text-align: center;
  min-width: 0;
}

.hero-h1 {
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.5em;
}

.hero-lede {
  color: var(--mute);
  font-size: 1.02rem;
  max-width: 34em;
  margin: 0 auto 1.6em;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.cta:hover { background: var(--ink); color: #fff; }

.hero-img {
  width: 100%;
  max-height: 72vh;
  object-fit: cover;
  border-radius: var(--r);
}

.panel {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 72vh;
  background: #000;
  color: #fff;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.rot {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.rot > span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(1.3rem, 2.3vw, 2rem);
  letter-spacing: 0.12em;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.rot > span.on { opacity: 1; }

.panel-rule {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  height: 1px;
  background: #fff;
  opacity: 0.45;
}

/* ---------- 正文网格 ---------- */

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 40px 0;
}

.stage {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0 32px;
  align-items: start;
}

.prose {
  grid-column: 1 / span 8;
  min-width: 0;
  counter-reset: sec;
  word-break: break-word;
}

.prose > div {
  scroll-margin-top: 20px;
  background: var(--card);
  border: 1px solid #efefef;
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 32px 34px 14px;
  margin: 0 0 24px;
  animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.prose > div::before {
  counter-increment: sec;
  content: counter(sec, decimal-leading-zero);
  display: block;
  margin-bottom: 12px;
  font-family: 'Raleway', Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--mute);
}

.prose > div:nth-child(2) { animation-delay: 0.05s; }
.prose > div:nth-child(3) { animation-delay: 0.1s; }
.prose > div:nth-child(4) { animation-delay: 0.15s; }
.prose > div:nth-child(5) { animation-delay: 0.2s; }
.prose > div:nth-child(6) { animation-delay: 0.25s; }
.prose > div:nth-child(7) { animation-delay: 0.3s; }

.prose > div:last-child { margin-bottom: 0; }

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

.prose h2 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  margin-bottom: 0.7em;
}

.prose h2 > span,
.prose h3 > span {
  display: inline-block;
  border-bottom: 3px solid var(--ink);
  padding-bottom: 2px;
}

.prose h3 { font-size: 1.16rem; }

.prose p { max-width: 68ch; }

.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.prose li { margin: 0.45em 0; }

.prose a { border-bottom: 1px solid var(--ink); }

.prose strong, .prose b { font-weight: 700; }

.prose blockquote {
  margin: 0 0 1.3em;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--ink);
  font-family: 'Lora', Georgia, serif;
  font-size: 1.05rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.3em;
  font-size: 1rem;
}

.prose th, .prose td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.prose th { font-weight: 700; background: #fafafa; }

.prose img { border-radius: var(--r); margin: 0 0 1.3em; height: auto; }

.prose time, .prose .date {
  display: inline-block;
  color: var(--mute);
  font-size: 0.95em;
  letter-spacing: 0.02em;
}

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

/* ---------- 右侧目录 ---------- */

.rail {
  grid-column: 10 / span 3;
  position: sticky;
  top: 28px;
  min-width: 0;
  border-top: 2px solid var(--ink);
  padding-top: 14px;
}

.rail-h {
  font-family: 'Raleway', Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin: 0 0 12px;
}

.rail-h > span {
  display: inline-block;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
}

.rail-l {
  list-style: none;
  counter-reset: r;
  margin: 0 0 18px;
  padding: 0;
}

.rail-l li {
  counter-increment: r;
  border-bottom: 1px solid var(--line);
}

.rail-l a {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-height: 42px;
  padding: 10px 0;
  font-size: 16px;
  line-height: 1.4;
}

.rail-l a::before {
  content: counter(r, decimal-leading-zero);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--mute);
}

.rail-l a:hover { text-decoration: underline; text-underline-offset: 4px; }

.rail-top {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 0;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--ink);
}

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

.foot {
  margin-left: 272px;
  margin-top: 72px;
  padding: 56px 40px 32px;
  border-top: 1px solid var(--ink);
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
  justify-content: space-between;
}

.foot-a { flex: 1 1 100%; }

.foot-mark {
  display: inline-block;
  font-family: 'Raleway', Helvetica, sans-serif;
  font-weight: 700;
  font-size: clamp(2.3rem, 7vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  word-break: break-word;
}

.foot-nav { flex: 1 1 380px; min-width: 0; }

.foot-dl {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 0 22px;
  margin: 0;
}

.foot-dl dt { border-bottom: 1px solid var(--line); }

.foot-dl dd {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--mute);
}

.foot-dl a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
}

.foot-dl a:hover { text-decoration: underline; text-underline-offset: 4px; }

.foot-c {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.copy { margin: 0; font-size: 15px; color: var(--mute); }

.foot-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--ink);
}

/* ---------- 窄屏 ---------- */

@media (max-width: 900px) {
  .side {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
    padding: 14px 16px;
    gap: 12px;
  }

  .side-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .brand { flex: 1 1 auto; }
  .srch { flex: 0 1 148px; }

  .side-nav {
    flex: 0 0 auto;
    overflow: visible;
    margin: 0 -16px;
    padding: 0 16px 4px;
  }

  .side-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .side-a {
    white-space: nowrap;
    border: 1px solid #dedede;
    border-radius: 999px;
    padding: 10px 15px;
    min-height: 44px;
  }

  .main, .foot { margin-left: 0; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 32px 20px 40px;
    gap: 24px;
  }

  .hero-txt { order: 1; grid-column: auto; }
  .hero-media { order: 2; grid-column: auto; }

  .hero-h1 { font-size: clamp(1.85rem, 7.5vw, 2.5rem); }

  .panel {
    aspect-ratio: 16 / 10;
    max-height: none;
  }

  .wrap { padding: 32px 20px 0; }

  .stage { display: block; gap: 0; }

  .prose { grid-column: auto; }
  .prose > div { padding: 24px 20px 8px; margin-bottom: 16px; }

  .rail {
    position: static;
    grid-column: auto;
    margin: 32px 0 0;
  }

  .foot { margin-top: 48px; padding: 40px 20px 28px; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .prose > div { animation: none; }
  .rot > span { transition: none; }
  .cta, .side-k { transition: none; }
}

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