:root {
  --ink: #1f1f1f;
  --ink2: #565656;
  --ink3: #8d8d8d;
  --line: #e8e8e8;
  --paper: #ffffff;
  --wash: #f5f5f5;
  --r: 28px;
  --rail: 252px;
  --sh: 0 4px 6px rgba(0, 0, 0, .05), 0 16px 36px rgba(0, 0, 0, .045);
}

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

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

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: var(--ink);
}

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

/* ---------- shell + rail ---------- */

.shell {
  padding-left: var(--rail);
  min-height: 100vh;
}

.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 18px 28px;
  background: var(--paper);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.rail-brand {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .16);
  transition: transform .25s ease, box-shadow .25s ease;
}

.rail-brand:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .2);
}

.rail-brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
}

.navbox {
  flex: 1 1 auto;
  min-height: 0;
}

.navbox > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--wash);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink2);
  user-select: none;
}

.navbox > summary::-webkit-details-marker {
  display: none;
}

.navbox-bars {
  position: relative;
  flex: 0 0 auto;
  width: 15px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: background .2s ease;
}

.navbox-bars::before,
.navbox-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 15px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .22s ease, top .22s ease;
}

.navbox-bars::before {
  top: -5px;
}

.navbox-bars::after {
  top: 5px;
}

.navbox[open] > summary .navbox-bars {
  background: transparent;
}

.navbox[open] > summary .navbox-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.navbox[open] > summary .navbox-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink2);
  font-size: 16px;
  font-weight: 500;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  background: var(--wash);
  color: var(--ink);
  transform: translateX(3px);
}

.rail-ico {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: #cfcfcf;
  transition: background .18s ease, transform .18s ease;
}

.nav-list a:hover .rail-ico {
  background: var(--ink);
  transform: scale(1.35);
}

.rail-cta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .22s ease, box-shadow .22s ease;
}

.rail-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .22);
}

/* ---------- stage ---------- */

.stage {
  max-width: 1240px;
  padding: 26px clamp(16px, 3vw, 44px) 0;
}

.hero {
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  gap: 26px;
  align-items: stretch;
  min-height: 70vh;
  padding: clamp(24px, 3vw, 54px);
  border-radius: var(--r);
  background: var(--paper);
  box-shadow: var(--sh);
  overflow: hidden;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  min-width: 0;
}

.hero h1 {
  margin: 0;
  font-size: clamp(30px, 4.4vw, 56px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -.025em;
}

.hero-lead {
  margin: 0;
  max-width: 44ch;
  color: var(--ink2);
  font-size: 16px;
  line-height: 1.85;
}

.hero-art {
  position: relative;
  margin: 0;
  display: grid;
  min-height: 250px;
  border-radius: 24px;
  background: var(--wash);
  overflow: hidden;
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(31, 31, 31, .17) 1.4px, transparent 1.4px);
  background-size: 18px 18px;
  opacity: .9;
}

.hero-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
  will-change: transform;
}

/* ---------- split ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
  align-items: start;
  margin-top: 26px;
}

.prose {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.prose > section {
  min-width: 0;
  padding: clamp(22px, 2.6vw, 42px);
  border-radius: var(--r);
  background: var(--paper);
  box-shadow: var(--sh);
  scroll-margin-top: 96px;
  transition: box-shadow .3s ease;
}

.prose > section:hover {
  box-shadow: 0 8px 14px rgba(0, 0, 0, .06), 0 26px 54px rgba(0, 0, 0, .07);
}

.prose h2 {
  margin: 0 0 6px;
  font-size: clamp(21px, 2.4vw, 28px);
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -.012em;
}

.prose h3 {
  margin: 26px 0 8px;
  font-size: 19px;
  line-height: 1.45;
  font-weight: 700;
}

.prose p {
  margin: 0 0 16px;
}

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

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

.prose li {
  margin: 7px 0;
}

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

.prose img {
  display: block;
  margin: 18px 0;
  max-width: 100%;
  height: auto;
  border-radius: 20px;
}

.prose blockquote {
  margin: 0 0 18px;
  padding: 16px 20px;
  border-radius: 20px;
  background: var(--wash);
  color: var(--ink2);
}

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

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
  font-size: 16px;
}

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

.prose strong {
  font-weight: 700;
}

hr {
  height: 1px;
  margin: 14px 0 18px;
  border: 0;
  background: var(--line);
}

/* ---------- aside ---------- */

.side {
  position: sticky;
  top: 24px;
  min-width: 0;
}

.toc {
  padding: 22px 20px;
  border-radius: var(--r);
  background: var(--paper);
  box-shadow: var(--sh);
}

.toc h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .06em;
}

.toc hr {
  margin: 12px 0 14px;
}

.toc ol {
  list-style: none;
  counter-reset: toc;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc li {
  counter-increment: toc;
}

.toc a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink2);
  font-size: 16px;
  line-height: 1.4;
  transition: background .18s ease, color .18s ease;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--ink3);
}

.toc a:hover,
.toc a:focus-visible {
  background: var(--wash);
  color: var(--ink);
}

/* ---------- footer ---------- */

.foot {
  max-width: 1240px;
  margin-top: 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 28px;
  padding: 26px clamp(16px, 3vw, 44px) 44px;
}

.foot-brand {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.01em;
}

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

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  color: var(--ink2);
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foot small {
  grid-column: 1 / -1;
  display: block;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 16px;
  color: var(--ink3);
}

/* ---------- motion ---------- */

.rise {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}

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

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

  .rise {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-img {
    transform: none !important;
  }
}

/* ---------- responsive ---------- */

@media (min-width: 981px) {
  .navbox > summary {
    display: none;
  }

  .nav-list {
    padding-top: 0;
  }

  .prose > section {
    scroll-margin-top: 24px;
  }
}

@media (max-width: 1180px) {
  .split {
    grid-template-columns: 1fr;
  }

  .side {
    position: static;
  }
}

@media (max-width: 980px) {
  .shell {
    padding-left: 0;
  }

  .rail {
    position: sticky;
    top: 0;
    left: auto;
    bottom: auto;
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .rail-brand {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 18px;
  }

  .rail-brand img {
    border-radius: 14px;
  }

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

  .navbox > summary {
    min-width: 92px;
    justify-content: center;
    padding: 0 12px;
  }

  .nav-list {
    flex-basis: 100%;
    width: 100%;
    padding-bottom: 4px;
  }

  .rail-cta {
    min-height: 42px;
    padding: 0 16px;
    font-size: 15px;
  }

  .stage {
    padding-top: 14px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 20px;
  }

  .hero-art {
    min-height: 190px;
    max-height: 240px;
  }

  .foot {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .foot-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .foot-links {
    gap: 0 14px;
  }
}

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