:root {
  /* These pages are static HTML under public/ and never load app/globals.css,
     so the app-wide scrollbar system does not reach them — this one line is
     their whole share of it. Without it the UA assumes a light page and paints
     a near-white scrollbar down a #07080e background, which was the most
     glaring native bar on the site. `dark` is the honest declaration for this
     surface and it themes the bar, the form controls and the selection
     together. Deliberately NOT the app's square `::-webkit-scrollbar` block:
     this stylesheet is a separate visual system whose own geometry is rounded
     (eight border-radius rules, up to 999px), so a hard-edged thumb would be
     inconsistent inside its own page rather than consistent with the app. */
  color-scheme: dark;

  --bg: #07080e;
  --bg-2: #0d0d16;
  --panel: rgba(16, 16, 28, 0.82);
  --panel-2: rgba(22, 17, 34, 0.88);
  --ink: #f4f6ff;
  --muted: #aeb5d7;
  --faint: #747b9f;
  --cyan: #22e0ff;
  --pink: #ff2fb9;
  --line: rgba(124, 134, 196, 0.22);
  --line-strong: rgba(34, 224, 255, 0.38);
  --warn: #ffd166;
  --danger: #ff5a9e;
  --success: #56f0b4;
  --font-display: "Orbitron", "Audiowide", "Eurostile", "Inter", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-zh: -apple-system, BlinkMacSystemFont, "PingFang HK", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", "Fira Code", Consolas, monospace;
  --glow-cyan: 0 0 18px rgba(34, 224, 255, 0.48);
  --glow-pink: 0 0 18px rgba(255, 47, 185, 0.46);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(circle at 82% 0%, rgba(255, 47, 185, 0.26), transparent 34%),
    radial-gradient(circle at 4% 20%, rgba(34, 224, 255, 0.18), transparent 28%),
    linear-gradient(180deg, #080911 0%, #0a0a13 48%, #05060a 100%);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

html[lang^="zh"] body {
  font-family: var(--font-zh);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: linear-gradient(rgba(34, 224, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 47, 185, 0.048) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 86% 72% at 50% 4%, #000 28%, transparent 86%);
  -webkit-mask-image: radial-gradient(ellipse 86% 72% at 50% 4%, #000 28%, transparent 86%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0, 0, 0, 0.18) 2px 4px);
  opacity: 0.32;
}

a {
  color: inherit;
}

.mia-back {
  position: sticky;
  top: 18px;
  z-index: 20;
  width: min(1120px, calc(100% - 36px));
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 16px;
  border: 1px solid rgba(255, 47, 185, 0.42);
  border-radius: 10px;
  background: rgba(8, 9, 17, 0.76);
  box-shadow: var(--glow-pink);
  backdrop-filter: blur(14px);
}

.mia-back::before {
  content: "MIA_";
  color: #fff;
  text-shadow: var(--glow-cyan);
}

.page-wrap {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 96px;
}

.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: clamp(34px, 6vw, 72px);
  margin: 24px 0 42px;
  background: linear-gradient(160deg, rgba(255, 47, 185, 0.13), rgba(34, 224, 255, 0.08) 52%, rgba(8, 9, 17, 0.94));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), inset 0 0 70px rgba(34, 224, 255, 0.08);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
}

.hero-label,
.toc-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
}

.hero-label {
  margin-bottom: 18px;
}

.hero h1 {
  max-width: 880px;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: 0.01em;
  text-shadow: 0 0 38px rgba(34, 224, 255, 0.28);
}

html[lang^="zh"] .hero h1 {
  max-width: 820px;
  font-family: var(--font-zh);
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.14;
  font-weight: 800;
}

.hero-sub {
  max-width: 760px;
  margin: 22px 0 28px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.hero-meta span {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.9rem;
  border: 1px solid rgba(34, 224, 255, 0.2);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(34, 224, 255, 0.05);
}

.hero-meta b {
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.context-banner,
.toc,
.section {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(16, 16, 28, 0.82), rgba(7, 8, 14, 0.88));
  box-shadow: inset 0 0 42px rgba(34, 224, 255, 0.04);
}

.context-banner {
  padding: 22px 24px;
  margin-bottom: 32px;
}

.context-banner h3 {
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.context-banner p,
.section p,
.section li {
  color: var(--muted);
}

.context-banner p + p {
  margin-top: 8px;
}

.toc {
  padding: 24px;
  margin-bottom: 36px;
}

.toc-label {
  margin-bottom: 16px;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.toc-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: baseline;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(124, 134, 196, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.toc-num {
  color: var(--pink);
  font-family: var(--font-mono);
  font-weight: 800;
  text-shadow: var(--glow-pink);
}

.toc-item a {
  color: var(--ink);
  text-decoration: none;
}

.toc-item:hover {
  border-color: rgba(34, 224, 255, 0.42);
}

.section {
  position: relative;
  padding: clamp(26px, 4vw, 42px);
  margin-bottom: 24px;
  scroll-margin-top: 96px;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, var(--pink), transparent 30%, var(--cyan));
  opacity: 0.72;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.section-num {
  flex: 0 0 auto;
  color: var(--bg);
  background: var(--cyan);
  border-radius: 8px;
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: var(--glow-cyan);
}

.section h2 {
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  font-weight: 900;
  line-height: 1.15;
}

.section h3 {
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.35;
  margin: 28px 0 10px;
}

.section h4 {
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 0.92rem;
  margin: 20px 0 8px;
}

.section p {
  margin-bottom: 14px;
}

.section ul,
.section ol {
  padding-left: 22px;
  margin: 12px 0 16px;
}

.section li {
  margin-bottom: 7px;
}

blockquote {
  margin: 22px 0;
  padding: 16px 20px;
  color: #dfe5ff;
  border-left: 3px solid var(--cyan);
  background: rgba(34, 224, 255, 0.06);
  border-radius: 0 10px 10px 0;
  font-style: italic;
}

blockquote cite {
  display: block;
  margin-top: 8px;
  color: var(--faint);
  font-size: 0.82rem;
  font-style: normal;
}

.dim {
  color: var(--faint);
}

hr.sep {
  height: 1px;
  margin: 42px 0;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(34, 224, 255, 0.5), transparent);
}

.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 42px;
  padding-top: 24px;
  color: var(--faint);
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
}

@media (max-width: 760px) {
  .mia-back,
  .page-wrap {
    width: min(100% - 28px, 1120px);
  }

  .mia-back {
    top: 10px;
    margin-top: 10px;
    font-size: 0.7rem;
  }

  .hero {
    border-radius: 14px;
    margin-top: 16px;
  }

  .hero h1 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  html[lang^="zh"] .hero h1 {
    font-size: clamp(2rem, 8.2vw, 2.55rem);
    line-height: 1.18;
  }

  .hero-meta span {
    width: 100%;
  }

  .toc-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 22px 18px;
  }

  .section-header {
    align-items: flex-start;
  }
}
