@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600&family=Cormorant+Garamond:ital,wght@0,300;0,500;0,700;1,300;1,500&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap');

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

:root {
  --ink: #000000;
  --neon: #00ff80;
  --blue: #0000ff;
  --paper: #f4f2e7;
  --edge: 3px;
}

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

body {
  margin: 0;
  padding: 0 0 268px;
  font-family: 'Crimson Pro', Georgia, 'Songti SC', 'Noto Serif SC', serif;
  font-size: 18px;
  line-height: 1.68;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .07) 0 1px, rgba(0, 0, 0, 0) 1px 34px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .07) 0 1px, rgba(0, 0, 0, 0) 1px 34px);
  overflow-x: hidden;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; }

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

:focus-visible {
  outline: var(--edge) solid var(--blue);
  outline-offset: 3px;
}

h1, h2, h3, .toc-title {
  font-family: 'Cinzel', 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.05;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

/* ---------- 底部固定胶囊条 ---------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--ink);
  border-top: 5px solid var(--blue);
  box-shadow: 0 -8px 0 rgba(0, 255, 128, .55);
}

.dock > * { min-width: 0; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 12px;
  border: var(--edge) solid var(--neon);
  color: var(--neon);
  text-decoration: none;
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.1;
  flex: 0 1 auto;
  max-width: 100%;
}

.brand .mark {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  background: var(--neon);
  color: var(--ink);
  font-weight: 700;
}

.dock-nav {
  order: 5;
  flex: 1 1 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding-bottom: 2px;
}

.dock-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border: var(--edge) solid var(--ink);
  background: var(--neon);
  color: var(--ink);
  font-weight: 700;
  font-size: 16px;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 4px 4px 0 var(--blue);
}

.pill:hover, .pill:focus {
  background: var(--blue);
  color: var(--neon);
  box-shadow: 4px 4px 0 var(--neon);
}

.pill--ghost {
  background: var(--ink);
  color: var(--neon);
  border-color: var(--neon);
  box-shadow: none;
  flex: 0 0 auto;
  padding: 8px 12px;
}

.pill--ghost:hover, .pill--ghost:focus {
  background: var(--neon);
  color: var(--ink);
  border-color: var(--ink);
}

/* ---------- 版心 ---------- */
.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 16px 0;
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  min-height: 45vh;
  margin: 8px 0 34px;
  padding: 30px 20px 22px;
  background: var(--neon);
  border: var(--edge) solid var(--ink);
  border-radius: 18px;
  box-shadow: 10px 10px 0 var(--ink);
  scroll-margin-top: 12px;
  max-width: 100%;
}

.hero > * { min-width: 0; }

.hero-copy { text-align: right; }

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.9rem, 5.6vw, 3.9rem);
  letter-spacing: -.02em;
}

.lede {
  margin: 0;
  padding-top: 12px;
  border-top: var(--edge) solid var(--ink);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  font-style: italic;
  line-height: 1.55;
}

.hero-art {
  order: -1;
  display: grid;
  place-items: center;
  align-self: start;
  max-width: 240px;
  width: 100%;
}

.hero-img {
  display: block;
  width: 100%;
  border: var(--edge) solid var(--ink);
  background: #fff;
  box-shadow: 7px 7px 0 var(--blue);
}

.hero-mark {
  display: grid;
  place-items: center;
  width: 120px;
  height: 120px;
  border: var(--edge) solid var(--ink);
  background: #fff;
  box-shadow: 7px 7px 0 var(--blue);
  font-family: 'Cinzel', Georgia, serif;
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
}

.stamp {
  position: absolute;
  top: -15px;
  left: 16px;
  transform: rotate(-6deg);
  padding: 4px 12px;
  background: var(--blue);
  color: #fff;
  border: var(--edge) solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .14em;
}

/* ---------- 目录 ---------- */
.toc-title {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
}

div hr {
  border: 0;
  border-top: 4px solid var(--ink);
  margin: 0 0 18px;
}

.toc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 0 0 36px;
  padding: 0;
  list-style: none;
}

.toc > li { min-width: 0; }

.toc-link {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 12px;
  border: var(--edge) solid var(--ink);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  overflow-wrap: anywhere;
  box-shadow: 5px 5px 0 var(--neon);
}

.toc-link:hover, .toc-link:focus {
  background: var(--blue);
  color: var(--neon);
  box-shadow: 5px 5px 0 var(--ink);
}

/* ---------- 正文 ---------- */
div { max-width: 100%; }

div > section {
  position: relative;
  margin: 0 0 30px;
  padding: 24px 18px;
  background: rgba(255, 255, 255, .58);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  border: var(--edge) solid var(--ink);
  border-radius: 18px;
  box-shadow: 7px 7px 0 rgba(0, 0, 255, .85);
  scroll-margin-top: 14px;
  scroll-margin-bottom: 220px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

div > section:nth-of-type(even) {
  box-shadow: -7px 7px 0 rgba(0, 255, 128, .95);
}

div > section:last-child { margin-bottom: 8px; }

div > section > h2,
div > section > h3 {
  margin: 0 0 12px;
  font-size: clamp(1.3rem, 3.2vw, 2.05rem);
}

div > section > h3 { font-size: clamp(1.15rem, 2.4vw, 1.5rem); }

div > section > hr {
  margin: 0 0 16px;
  border-top: 4px solid var(--blue);
}

div p { margin: 0 0 1em; }

div ul, div ol { margin: 0 0 1em; padding-left: 1.35em; }

div li { margin: 0 0 .45em; }

div li::marker { color: var(--blue); font-weight: 700; }

div a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

div a:hover { background: var(--neon); color: var(--ink); }

div blockquote {
  margin: 0 0 1em;
  padding: 6px 0 6px 16px;
  border-left: 6px solid var(--neon);
  font-style: italic;
}

div img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 0 1em;
  border: var(--edge) solid var(--ink);
  background: #fff;
}

div pre,
div table,
div iframe,
div video {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

div code {
  overflow-wrap: anywhere;
}

div > section > h2:first-child + hr { border-top-color: var(--ink); }

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 44px;
  padding: 0 0 26px;
  background: var(--ink);
  color: var(--neon);
  border-top: 6px solid var(--blue);
}

.foot-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding-top: 26px;
  padding-bottom: 22px;
}

.foot-in > * { min-width: 0; }

.foot-addr {
  font-style: normal;
  padding-left: 12px;
  border-left: 6px solid var(--neon);
}

.foot-brand {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.25;
}

.foot-links {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--neon);
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
  border-bottom: 2px solid rgba(0, 255, 128, .45);
}

.foot-link:hover, .foot-link:focus {
  color: var(--ink);
  background: var(--neon);
}

.sub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: start;
  max-width: 100%;
}

.sub label {
  width: 100%;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .12em;
}

.sub input {
  flex: 1 1 120px;
  min-width: 0;
  max-width: 100%;
  min-height: 46px;
  padding: 8px 10px;
  border: var(--edge) solid var(--neon);
  background: var(--ink);
  color: var(--neon);
  font-family: inherit;
  font-size: 16px;
}

.sub input::placeholder { color: rgba(0, 255, 128, .6); }

.sub button {
  min-height: 46px;
  padding: 8px 18px;
  border: var(--edge) solid var(--neon);
  background: var(--neon);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.sub button:hover, .sub button:focus {
  background: var(--blue);
  color: var(--neon);
  border-color: var(--blue);
}

.copy {
  margin: 0;
  padding-top: 14px;
  border-top: 2px solid rgba(0, 255, 128, .35);
  font-size: 16px;
  color: var(--neon);
  overflow-wrap: anywhere;
}

/* ---------- 动效 ---------- */
.js .reveal { opacity: 0; }

.js .reveal.in {
  animation: drop-in .28s steps(3, end) both;
}

@keyframes drop-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.toc li, .dock-nav li { animation: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; }
  .js .reveal.in { animation: none; }
}

/* ---------- 断点 ---------- */
@media (min-width: 760px) {
  body { padding-bottom: 132px; }

  .dock {
    flex-wrap: nowrap;
    padding: 12px 18px;
  }

  .dock-nav {
    order: 0;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    padding-bottom: 0;
  }

  .dock-nav ul { flex-wrap: nowrap; }

  .wrap { padding: 30px 24px 0; }

  .hero {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: 28px;
    padding: 38px 30px 30px;
    box-shadow: 12px 12px 0 var(--ink);
  }

  .hero-art { max-width: 300px; justify-self: start; }

  .foot-in {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.2fr);
    padding-top: 34px;
    padding-bottom: 26px;
  }

  div > section {
    padding: 26px 24px;
    box-shadow: 9px 9px 0 rgba(0, 0, 255, .85);
    scroll-margin-bottom: 170px;
  }

  div > section:nth-of-type(even) {
    box-shadow: -9px 9px 0 rgba(0, 255, 128, .95);
  }
}

@media (min-width: 1080px) {
  .lede { font-size: 1.14rem; }
  div > section { padding: 30px 28px; }
}

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