@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --blue: #2B59FF;
  --coral: #FF6B4A;
  --yellow: #FFD02F;
  --ink: #12162B;
  --paper: #FFFFFF;
  --mist: #EFF3FF;
  --line: #DCE3FF;
  --rail: 212px;
  --r: 28px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.66;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

img { max-width: 100%; }
a { color: var(--blue); }
a:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }

.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 99;
  padding: 10px 16px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 160ms ease;
}
.skip:focus { transform: none; }

.tick {
  margin-left: var(--rail);
  background: var(--ink);
  color: #fff;
}
.tick p {
  margin: 0;
  padding: 7px clamp(16px, 3vw, 40px);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 20;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 14px;
  background: var(--paper);
  border-right: 2px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  text-decoration: none;
}
.brand-mark { display: block; border-radius: 13px; }

.rail-nav { min-height: 0; overflow-y: auto; }
.rail-nav ul {
  list-style: none;
  margin: 0;
  padding: 0 2px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 15px;
  border: 2px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.rail-nav a:hover { background: var(--mist); border-color: var(--blue); color: var(--blue); }
.rail-nav li:first-child a { background: var(--blue); border-color: var(--blue); color: #fff; }
.rail-nav li:first-child a:hover { background: var(--coral); border-color: var(--coral); color: #fff; }

.stage { margin-left: var(--rail); }

main [id],
.prose > section { scroll-margin-top: 24px; }

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 30px;
  align-items: center;
  min-height: 45vh;
  padding: 28px clamp(16px, 3vw, 40px) 46px;
  margin-bottom: 28px;
  background: var(--yellow);
  background-image: radial-gradient(rgba(18, 22, 43, 0.16) 1.6px, transparent 1.7px);
  background-size: 18px 18px;
  border-radius: 0 0 46px 46px;
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4.5vw, 52px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.025em;
  max-width: 20ch;
}
.lede {
  margin: 0 0 22px;
  max-width: 44ch;
  font-size: 17px;
  line-height: 1.6;
}
.cta {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transition: background 160ms ease;
}
.cta:hover { background: var(--coral); }

.hero-art { margin: 0; min-width: 0; }
.hero-art .hero-img,
.hero-art img {
  display: block;
  width: 100%;
  height: auto;
  border: 3px solid var(--ink);
  border-radius: 24px;
}
.hero-art:empty {
  min-height: 170px;
  border: 3px solid var(--ink);
  border-radius: 24px;
  background: var(--blue);
  background-image: radial-gradient(rgba(255, 255, 255, 0.4) 2px, transparent 2.1px);
  background-size: 16px 16px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 282px;
  gap: 26px;
  align-items: start;
  padding: 0 clamp(16px, 3vw, 40px) 46px;
}

.prose { min-width: 0; counter-reset: sec; }
.prose > section {
  counter-increment: sec;
  margin: 0 0 18px;
  padding: clamp(20px, 3vw, 30px);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 10px 26px rgba(18, 22, 43, 0.06);
}
.prose > section:nth-child(even) { background: var(--mist); }
.prose > section:last-child { margin-bottom: 0; }

.prose small {
  display: block;
  margin-bottom: 5px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--blue);
}

.prose h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 12px;
  font-size: clamp(21px, 2.4vw, 27px);
  line-height: 1.28;
  font-weight: 800;
  letter-spacing: -0.015em;
}
.prose h2::before {
  content: counter(sec, decimal-leading-zero);
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font-size: 13.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.prose > section:nth-child(even) h2::before { background: var(--coral); }

.prose h3 {
  margin: 22px 0 10px;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 800;
}
.prose p { margin: 0 0 14px; }
.prose p:last-child { margin-bottom: 0; }
.prose ul,
.prose ol { margin: 0 0 14px; padding-left: 1.25em; }
.prose li { margin-bottom: 6px; }
.prose strong { font-weight: 800; }
.prose a { text-underline-offset: 3px; }
.prose blockquote {
  margin: 0 0 14px;
  padding: 12px 16px;
  background: #FFF8DF;
  border-left: 5px solid var(--yellow);
  border-radius: 14px;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose img { border-radius: 18px; height: auto; }
.prose figure { margin: 0 0 14px; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
}
.prose th,
.prose td {
  padding: 9px 11px;
  border: 1px solid var(--line);
  text-align: left;
}
.prose th { background: var(--mist); font-weight: 800; }
.prose code {
  font-size: 15px;
  padding: 1px 6px;
  border-radius: 7px;
  background: var(--mist);
}

.side {
  position: sticky;
  top: 20px;
  padding: 20px 18px;
  background: var(--mist);
  border: 2px solid var(--line);
  border-radius: var(--r);
}
.side-eyebrow {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--coral);
}
.side-title {
  margin: 6px 0 12px;
  font-size: 19px;
  line-height: 1.3;
  font-weight: 800;
}
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li + li { border-top: 1px solid #D3DCFF; }
.side-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease;
}
.side-list a:hover { color: var(--blue); }

.foot {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 22px 28px;
  padding: 46px clamp(16px, 3vw, 40px) 26px;
  background: var(--ink);
  color: #fff;
}
.foot-brand {
  grid-column: 1 / -1;
  margin: 0;
  font-size: clamp(34px, 7vw, 64px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--yellow);
}
.foot-desc { margin: 0; font-size: 15px; line-height: 1.6; color: #C4CBE8; }
.foot-jump {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 2px 16px;
  font-size: 15px;
}
.foot-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.foot-jump a:hover { color: var(--yellow); }
.foot-copy { margin: 0; font-size: 15px; }
.foot-copy a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--coral);
  font-weight: 700;
  text-decoration: none;
}
.foot small {
  grid-column: 1 / -1;
  padding-top: 16px;
  border-top: 1px solid #2A3054;
  text-align: center;
  font-size: 13.5px;
  color: #9AA4D2;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 460ms ease, transform 460ms ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  :root { --rail: 0px; }

  .rail {
    right: 0;
    bottom: auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 2px solid var(--line);
  }
  .brand { width: 44px; height: 44px; }
  .rail-nav { flex: 1 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden; }
  .rail-nav ul { flex-direction: row; gap: 8px; padding: 0 2px 2px; }
  .rail-nav a { white-space: nowrap; min-height: 44px; font-size: 14.5px; }

  .tick { margin-left: 0; margin-top: 62px; }
  .stage { margin-left: 0; }

  main [id],
  .prose > section { scroll-margin-top: 76px; }

  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
    min-height: 0;
    padding: 20px 16px 34px;
    margin-bottom: 20px;
    border-radius: 0 0 28px 28px;
  }
  .hero h1 { max-width: none; }
  .hero-art img { max-height: 210px; object-fit: cover; }
  .hero-art:empty { min-height: 120px; }

  .split {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 16px 34px;
  }
  .side { position: static; order: 2; }

  .foot { grid-template-columns: 1fr 1fr; padding: 34px 16px 22px; }
  .foot-desc { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .foot { grid-template-columns: 1fr; }
  .foot-jump { gap: 0 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .rail-nav a,
  .cta,
  .side-list a,
  .skip { transition: none; }
}

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