:root {
  --bg: #f8fbff;
  --paper: #ffffff;
  --ink: #102033;
  --muted: #607084;
  --line: #d7e2ec;
  --line-strong: #b7cadb;
  --navy: #061724;
  --blue: #2767c5;
  --cyan: #19a0d8;
  --green: #168a70;
  --gold: #c78314;
  --violet: #6b5cc9;
  --red: #d8545d;
  --shadow: 0 22px 70px rgba(16, 32, 51, 0.12);
  --soft-shadow: 0 12px 36px rgba(16, 32, 51, 0.08);
  --radius: 8px;
  --max: 1240px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: fixed;
  left: 18px;
  top: 12px;
  z-index: 1000;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

.scroll-progress {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 100;
  height: 3px;
  background: transparent;
}

.scroll-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--cyan);
}

.site-header {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
  padding: 0 36px;
  border-bottom: 1px solid rgba(215, 226, 236, 0.82);
  background: rgba(248, 251, 255, 0.88);
  backdrop-filter: blur(18px);
}

.brand,
.top-nav,
.header-action {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  min-width: 210px;
  font-size: 17px;
  font-weight: 760;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--navy);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.top-nav {
  gap: 30px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 640;
}

.top-nav a {
  padding: 8px 0;
}

.top-nav a:hover,
.top-nav a:focus-visible,
.story-rail a.active {
  color: var(--ink);
}

.header-action,
.primary-action,
.secondary-action {
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 760;
}

.header-action {
  padding: 0 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: 780px;
  padding: 144px 56px 56px;
  overflow: hidden;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--line);
}

.hero-visual {
  position: absolute;
  inset: 82px 0 0 0;
  z-index: -1;
  opacity: 0.22;
  pointer-events: none;
}

.hero-shot {
  position: absolute;
  width: 760px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--soft-shadow);
}

.hero-shot-a {
  right: -70px;
  top: 30px;
}

.hero-shot-b {
  right: 210px;
  top: 305px;
  width: 620px;
}

.hero-shot-c {
  right: 620px;
  top: 470px;
  width: 560px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 890px;
  padding-top: 42px;
}

.hero h1 {
  margin: 0;
  max-width: 820px;
  color: var(--ink);
  font-size: 72px;
  line-height: 1.04;
  font-weight: 820;
}

.hero p {
  max-width: 760px;
  margin: 28px 0 0;
  color: #405063;
  font-size: 22px;
  line-height: 1.75;
  font-weight: 560;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  gap: 10px;
  padding: 0 18px;
}

.primary-action {
  background: var(--navy);
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(6, 23, 36, 0.2);
}

.secondary-action {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.hero-facts {
  position: absolute;
  left: 56px;
  right: 56px;
  bottom: 56px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 980px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
  box-shadow: var(--soft-shadow);
}

.hero-facts div {
  padding: 22px 24px;
  background: rgba(255, 255, 255, 0.9);
}

.hero-facts dt {
  margin: 0;
  color: var(--blue);
  font-size: 15px;
  font-weight: 820;
}

.hero-facts dd {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 720;
}

.story-rail {
  position: sticky;
  top: 86px;
  z-index: 20;
  display: flex;
  gap: 12px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 20px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.story-rail::-webkit-scrollbar {
  display: none;
}

.story-rail a {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
  box-shadow: 0 8px 24px rgba(16, 32, 51, 0.05);
}

.story-rail span {
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.opening,
.closing {
  width: min(var(--max), calc(100% - 64px));
  margin: 70px auto 42px;
}

.opening {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 50px;
  align-items: start;
}

.opening h2,
.closing h2 {
  margin: 0;
  color: var(--ink);
  font-size: 42px;
  line-height: 1.18;
  font-weight: 820;
}

.opening p,
.closing p {
  max-width: 830px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.9;
  font-weight: 560;
}

.opening-points {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.opening-points li {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.opening-points strong {
  color: var(--ink);
  font-size: 19px;
}

.opening-points span {
  color: var(--muted);
  font-size: 17px;
  font-weight: 560;
}

.chapter {
  width: min(var(--max), calc(100% - 64px));
  margin: 72px auto;
  scroll-margin-top: 110px;
  display: grid;
  grid-template-columns: minmax(260px, 0.32fr) minmax(0, 0.68fr);
  gap: 38px;
  align-items: center;
}

.chapter:nth-of-type(odd) {
  grid-template-columns: minmax(0, 0.68fr) minmax(260px, 0.32fr);
}

.chapter:nth-of-type(odd) .chapter-copy {
  order: 2;
}

.chapter.wide {
  grid-template-columns: 1fr;
  gap: 26px;
}

.chapter.wide .chapter-copy {
  max-width: 880px;
}

.chapter-copy {
  position: relative;
}

.chapter-index {
  display: inline-block;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 18px;
  font-weight: 820;
}

.chapter h2 {
  margin: 14px 0 0;
  color: var(--ink);
  font-size: 36px;
  line-height: 1.24;
  font-weight: 820;
}

.chapter p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
  font-weight: 560;
}

.chapter ul {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.chapter li {
  position: relative;
  padding: 13px 0 13px 26px;
  border-bottom: 1px solid var(--line);
  color: #33475d;
  font-size: 16px;
  line-height: 1.7;
}

.chapter li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 25px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.diagram-panel {
  position: relative;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.diagram-panel img {
  width: 100%;
  height: auto;
  background: var(--paper);
}

.diagram-panel figcaption {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fbfdff;
  font-size: 13px;
  font-weight: 720;
}

.zoom-button {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(183, 202, 219, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(16, 32, 51, 0.12);
}

.zoom-button:hover,
.zoom-button:focus-visible,
.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--accent, var(--blue));
  color: var(--accent, var(--blue));
}

[data-accent="blue"] {
  --accent: var(--blue);
}

[data-accent="cyan"] {
  --accent: var(--cyan);
}

[data-accent="green"] {
  --accent: var(--green);
}

[data-accent="gold"] {
  --accent: var(--gold);
}

[data-accent="violet"] {
  --accent: var(--violet);
}

.closing {
  margin-top: 92px;
  margin-bottom: 88px;
  padding-top: 46px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.closing p {
  margin-left: auto;
  margin-right: auto;
}

.closing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 26px;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 23, 36, 0.72);
  backdrop-filter: blur(12px);
}

.lightbox-shell {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: min(96vw, 1500px);
  max-height: 92vh;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.36);
  overflow: hidden;
}

.lightbox-bar,
.lightbox-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.lightbox-bar h2 {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-image {
  width: 100%;
  max-height: calc(92vh - 126px);
  object-fit: contain;
  background: #f3f7fb;
}

.lightbox-controls {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.download-link {
  min-height: 38px;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
}

body.lightbox-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .chapter {
    animation: fade-in linear both;
    animation-timeline: view();
    animation-range: entry 4% cover 22%;
  }

  @keyframes fade-in {
    from {
      opacity: 0.28;
      transform: translateY(24px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (max-width: 1120px) {
  .site-header {
    padding: 0 22px;
  }

  .top-nav {
    gap: 18px;
  }

  .hero {
    min-height: 720px;
    padding: 118px 28px 42px;
  }

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

  .hero p {
    font-size: 20px;
  }

  .hero-shot-a {
    right: -260px;
  }

  .hero-shot-b {
    right: 70px;
  }

  .hero-shot-c {
    display: none;
  }

  .hero-facts {
    left: 28px;
    right: 28px;
    bottom: 42px;
  }

  .opening,
  .chapter,
  .closing {
    width: min(100% - 40px, var(--max));
  }

  .opening,
  .chapter,
  .chapter:nth-of-type(odd) {
    grid-template-columns: 1fr;
  }

  .chapter:nth-of-type(odd) .chapter-copy {
    order: 0;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  .site-header {
    height: 62px;
    padding: 0 14px;
  }

  .brand {
    min-width: 0;
    font-size: 15px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .top-nav {
    display: none;
  }

  .header-action {
    min-height: 36px;
    padding: 0 10px;
    font-size: 13px;
  }

  .hero {
    min-height: 820px;
    padding: 96px 18px 26px;
  }

  .hero-visual {
    top: 130px;
    opacity: 0.18;
  }

  .hero-shot {
    width: 600px;
  }

  .hero-shot-a {
    right: -330px;
    top: 220px;
  }

  .hero-shot-b {
    right: -220px;
    top: 470px;
  }

  .hero-content {
    padding-top: 8px;
  }

  .hero h1 {
    font-size: 44px;
    line-height: 1.08;
  }

  .hero p {
    font-size: 17px;
    line-height: 1.8;
  }

  .hero-actions {
    gap: 10px;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
    min-height: 44px;
  }

  .hero-facts {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    grid-template-columns: 1fr;
    margin-top: 34px;
  }

  .hero-facts div {
    padding: 16px 18px;
  }

  .story-rail {
    position: static;
    top: auto;
    padding: 12px 14px 8px;
  }

  .story-rail a {
    min-height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }

  .opening,
  .chapter,
  .closing {
    width: calc(100% - 28px);
    margin-top: 46px;
    margin-bottom: 46px;
  }

  .opening h2,
  .closing h2 {
    font-size: 30px;
  }

  .opening p,
  .closing p {
    font-size: 16px;
  }

  .opening-points li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .chapter {
    gap: 22px;
    scroll-margin-top: 96px;
  }

  .chapter h2 {
    font-size: 29px;
  }

  .chapter p {
    font-size: 16px;
  }

  .diagram-panel figcaption {
    padding: 10px 12px;
  }

  .zoom-button {
    width: 38px;
    height: 38px;
    right: 10px;
    top: 10px;
  }

  .lightbox {
    padding: 10px;
  }

  .lightbox-shell {
    width: 100%;
    max-height: 94vh;
  }

  .lightbox-image {
    max-height: calc(94vh - 126px);
  }
}
