/* ==========================================================================
   /assets/site.css
   奔驰宝马电玩城 · 共享外壳与基础组件
   材质体系：墨夜深空外壳 + 暖纸资料卡 + 霓虹描边
   ========================================================================== */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, figcaption,
blockquote, dl, dd { margin: 0; }

ul, ol { padding: 0; list-style: none; }

img, svg, video, canvas { display: block; max-width: 100%; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

table { border-collapse: collapse; width: 100%; }

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

/* ---------- 2. Design tokens ---------- */
:root {
  --ink-900: #0B0A12;
  --ink-800: #12101D;
  --ink-700: #171526;
  --ink-600: #221F35;
  --paper-050: #F4EEE2;
  --paper-200: #DED3BE;
  --neon-blue: #2EE6FF;
  --electric-purple: #8A4DFF;
  --amber-gold: #FFC24B;
  --signal-red: #FF4D5E;
  --mint-green: #3BE08A;
  --slate: #6B6C86;
  --slate-soft: #9A9BB5;

  --text: var(--paper-050);
  --text-dim: var(--slate-soft);
  --line: rgba(244, 238, 226, 0.14);
  --line-strong: rgba(244, 238, 226, 0.3);

  --font-display: "Archivo Black", "Noto Sans SC", "Source Han Sans SC",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Roboto Mono", Menlo, Consolas, monospace;

  --r-pill: 999px;
  --r-soft: 26px;
  --r-card: 18px;
  --shell: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 78px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --glow-blue: 0 0 18px rgba(46, 230, 255, 0.35);
}

/* ---------- 3. Base typography & page surface ---------- */
html { background-color: var(--ink-900); }

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--ink-900);
  background-image:
    radial-gradient(circle at center, rgba(244, 238, 226, 0.055) 1px, transparent 1.6px),
    repeating-linear-gradient(0deg, rgba(46, 230, 255, 0.03) 0 1px, transparent 1px 4px),
    radial-gradient(1150px 640px at 82% -10%, rgba(138, 77, 255, 0.22), transparent 62%),
    radial-gradient(820px 560px at 2% 6%, rgba(46, 230, 255, 0.12), transparent 60%),
    radial-gradient(720px 520px at 94% 96%, rgba(255, 194, 75, 0.08), transparent 66%);
  background-size: 24px 24px, 100% 4px, 100% 100%, 100% 100%, 100% 100%;
  background-repeat: repeat, repeat, no-repeat, no-repeat, no-repeat;
  background-attachment: scroll, scroll, fixed, fixed, fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (min-width: 960px) {
  body { font-size: 17px; }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.18;
  text-wrap: balance;
}

p { text-wrap: pretty; }

strong { color: var(--paper-050); }

::selection {
  background: rgba(46, 230, 255, 0.3);
  color: var(--paper-050);
}

#main-content {
  display: block;
  padding-top: var(--header-h);
}

#main-content:focus-visible {
  outline: 2px solid var(--neon-blue);
  outline-offset: 4px;
}

html.is-nav-open { overflow: hidden; }

/* ---------- 4. Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(34px, 6vw, 68px); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--neon-blue);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  flex: none;
  background: linear-gradient(90deg, var(--neon-blue), transparent);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-size: 14px;
  font-weight: 700;
  color: var(--neon-blue);
}

.link-arrow::after {
  content: "→";
  transition: transform 0.2s var(--ease);
}

.link-arrow:hover::after { transform: translateX(4px); }

.status-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--mint-green);
  box-shadow: 0 0 10px rgba(59, 224, 138, 0.9);
  animation: dot-breathe 3.2s ease-in-out infinite;
}

@keyframes dot-breathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* ---------- 5. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: var(--gutter);
  z-index: 120;
  padding: 0.62em 1.05em;
  border-radius: 10px;
  background: var(--paper-050);
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: auto;
  transform: translateY(-180%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--neon-blue);
  outline-offset: 2px;
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.62em 1.15em;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
    background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn--amber {
  background: linear-gradient(160deg, #FFD782, var(--amber-gold));
  color: #20160A;
  box-shadow: 0 0 0 1px rgba(255, 194, 75, 0.55),
    0 12px 28px -14px rgba(255, 194, 75, 0.85);
}

.btn--amber:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255, 194, 75, 0.8),
    0 16px 32px -12px rgba(255, 194, 75, 0.95);
}

.btn--ghost {
  background: rgba(244, 238, 226, 0.05);
  border-color: var(--line-strong);
  color: var(--paper-050);
}

.btn--ghost:hover {
  border-color: rgba(46, 230, 255, 0.7);
  color: var(--neon-blue);
}

.btn--neon {
  border-color: rgba(46, 230, 255, 0.55);
  color: var(--neon-blue);
  background: rgba(46, 230, 255, 0.07);
  box-shadow: inset 0 0 18px rgba(46, 230, 255, 0.16);
}

.btn--neon:hover {
  color: var(--ink-900);
  background: var(--neon-blue);
  box-shadow: 0 0 22px rgba(46, 230, 255, 0.6);
}

/* ---------- 7. Header / floating capsule ---------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 80;
  padding: clamp(8px, 2vw, 14px) var(--gutter) 0;
  pointer-events: none;
}

.site-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 90;
  background: rgba(244, 238, 226, 0.06);
  pointer-events: none;
}

.site-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--neon-blue), var(--electric-purple), var(--amber-gold));
  box-shadow: 0 0 12px rgba(46, 230, 255, 0.7);
  transition: width 0.12s linear;
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.6vw, 22px);
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: linear-gradient(120deg, rgba(23, 21, 38, 0.94), rgba(11, 10, 18, 0.88));
  box-shadow: 0 18px 42px -28px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(46, 230, 255, 0.18);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  pointer-events: auto;
  transition: padding 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.site-header.is-compact .site-header__inner {
  padding-block: 6px;
  box-shadow: 0 12px 30px -22px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(46, 230, 255, 0.28);
}

/* brand */
.header-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.header-brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 14px 8px 14px 14px;
  background: linear-gradient(150deg, var(--electric-purple), #4a1fa8);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.02em;
  box-shadow: 0 0 0 1px rgba(46, 230, 255, 0.45), 0 0 22px rgba(138, 77, 255, 0.55);
}

.header-brand__text { display: grid; min-width: 0; }

.header-brand__name {
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--paper-050);
  text-shadow: 0 0 14px rgba(46, 230, 255, 0.28);
  white-space: nowrap;
}

.header-brand__sub {
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: var(--slate-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 519px) {
  .header-brand__sub { display: none; }
}

@media (min-width: 1080px) and (max-width: 1279px) {
  .header-brand__sub { display: none; }
}

/* actions */
.header-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.header-cta { display: none; }

@media (min-width: 1080px) {
  .header-cta { display: inline-flex; }
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5em 0.85em;
  border: 1px solid rgba(46, 230, 255, 0.45);
  border-radius: var(--r-pill);
  background: rgba(46, 230, 255, 0.08);
  color: var(--neon-blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.icon-btn:hover {
  background: var(--neon-blue);
  color: var(--ink-900);
}

@media (min-width: 1080px) {
  .icon-btn { display: none; }
}

/* nav toggle */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.5em 0.85em 0.5em 0.75em;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: rgba(11, 10, 18, 0.5);
  color: var(--paper-050);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-toggle:hover {
  border-color: rgba(46, 230, 255, 0.65);
  color: var(--neon-blue);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
  flex: none;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.26s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-4px) rotate(-45deg);
}

.nav-toggle__label { line-height: 1; }

@media (min-width: 1080px) {
  .nav-toggle { display: none; }
}

/* nav — shared bits */
.site-nav { display: none; }

.site-nav__foot { display: none; }

.site-nav__note {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--slate);
}

/* nav — desktop */
@media (min-width: 1080px) {
  .site-nav {
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
  }

  .site-nav__list {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
  }

  .site-nav__link {
    display: inline-flex;
    align-items: center;
    padding: 0.48em 0.72em;
    border-radius: var(--r-pill);
    font-size: 14px;
    color: var(--paper-200);
    white-space: nowrap;
    transition: color 0.2s var(--ease), background 0.2s var(--ease),
      box-shadow 0.2s var(--ease);
  }

  .site-nav__link:hover {
    color: var(--paper-050);
    background: rgba(244, 238, 226, 0.08);
  }

  .site-nav__link[aria-current="page"] {
    color: var(--neon-blue);
    background: rgba(46, 230, 255, 0.1);
    box-shadow: inset 0 0 0 1px rgba(46, 230, 255, 0.42),
      0 0 18px -6px rgba(46, 230, 255, 0.6);
  }
}

/* nav — mobile full-screen panel */
@media (max-width: 1079px) {
  .site-header__inner {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: linear-gradient(120deg, rgba(23, 21, 38, 0.97), rgba(11, 10, 18, 0.95));
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    padding: calc(var(--header-h) + 18px) var(--gutter)
      calc(30px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    pointer-events: auto;
    background-image:
      radial-gradient(760px 420px at 88% -6%, rgba(138, 77, 255, 0.3), transparent 62%),
      radial-gradient(560px 400px at 2% 104%, rgba(46, 230, 255, 0.16), transparent 66%),
      repeating-linear-gradient(0deg, rgba(244, 238, 226, 0.03) 0 1px, transparent 1px 5px);
    background-color: var(--ink-900);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.28s var(--ease), transform 0.28s var(--ease),
      visibility 0.28s var(--ease);
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-nav__list {
    counter-reset: navitem;
    border-top: 1px solid var(--line);
  }

  .site-nav__list li {
    counter-increment: navitem;
    border-bottom: 1px solid var(--line);
  }

  .site-nav__link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 4px;
    font-family: var(--font-display);
    font-size: clamp(20px, 6vw, 24px);
    letter-spacing: 0.01em;
    color: var(--paper-050);
    transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
  }

  .site-nav__link::before {
    content: counter(navitem, decimal-leading-zero);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.14em;
    color: var(--electric-purple);
    min-width: 2.2em;
  }

  .site-nav__link:hover,
  .site-nav__link:focus-visible {
    color: var(--neon-blue);
    padding-left: 10px;
  }

  .site-nav__link[aria-current="page"] {
    color: var(--neon-blue);
    text-shadow: 0 0 18px rgba(46, 230, 255, 0.45);
  }

  .site-nav__link[aria-current="page"]::before {
    color: var(--amber-gold);
  }

  .site-nav__foot {
    display: grid;
    gap: 12px;
    justify-items: start;
    margin-top: auto;
    padding-top: 26px;
  }
}

/* ---------- 8. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(50px, 9vw, 104px);
  padding-top: clamp(36px, 6vw, 68px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(23, 21, 38, 0.92), rgba(11, 10, 18, 1) 48%);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(46, 230, 255, 0.55),
    rgba(138, 77, 255, 0.55), transparent);
}

.site-footer::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 320px;
  height: 320px;
  border-radius: 46% 54% 62% 38%;
  background: radial-gradient(circle, rgba(138, 77, 255, 0.2), transparent 68%);
  pointer-events: none;
}

.footer-top {
  display: grid;
  gap: clamp(28px, 4vw, 48px);
  padding-bottom: clamp(26px, 4vw, 42px);
}

@media (min-width: 900px) {
  .footer-top {
    grid-template-columns: minmax(220px, 1fr) 2.5fr;
    align-items: start;
  }
}

.footer-brand__name {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 26px);
  letter-spacing: 0.01em;
  color: var(--paper-050);
  text-shadow: 0 0 22px rgba(46, 230, 255, 0.3);
}

.footer-brand__line {
  margin-top: 0.55em;
  max-width: 34ch;
  font-size: 14px;
  color: var(--paper-200);
}

.footer-brand__status {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  margin-top: 0.95em;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--mint-green);
}

.footer-grid {
  display: grid;
  gap: clamp(22px, 3vw, 32px);
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.footer-col__title {
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 0.9em;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--neon-blue);
}

.footer-col__title::before {
  content: "";
  width: 14px;
  height: 1px;
  flex: none;
  background: var(--neon-blue);
  box-shadow: 0 0 8px rgba(46, 230, 255, 0.9);
}

.footer-list li + li { margin-top: 6px; }

.footer-link {
  display: inline-block;
  padding-block: 2px;
  font-size: 14px;
  color: var(--paper-200);
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.footer-link:hover {
  color: var(--neon-blue);
  transform: translateX(3px);
}

.footer-contact { display: grid; gap: 10px; }

.footer-contact li {
  display: grid;
  gap: 1px;
}

.footer-contact__label {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--slate);
}

.footer-contact__value {
  font-size: 14px;
  color: var(--paper-200);
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  padding-block: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--slate);
}

.footer-copy { margin-right: auto; }

.footer-legal {
  font-size: 13px;
  color: var(--slate);
  font-variant-numeric: tabular-nums;
}

.footer-legal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 1.2em;
  font-size: 13px;
}

.footer-legal__links a {
  color: var(--slate);
  transition: color 0.2s var(--ease);
}

.footer-legal__links a:hover { color: var(--neon-blue); }

.footer-note {
  padding-bottom: clamp(22px, 4vw, 34px);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--slate);
}

/* back to top */
.to-top {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 70;
  padding: 0.62em 1em;
  border: 1px solid rgba(46, 230, 255, 0.45);
  border-radius: var(--r-pill);
  background: rgba(23, 21, 38, 0.94);
  color: var(--paper-050);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: 0 12px 30px -16px rgba(0, 0, 0, 0.95),
    inset 0 0 18px rgba(46, 230, 255, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease),
    visibility 0.25s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  color: var(--neon-blue);
  border-color: var(--neon-blue);
}

/* ---------- 9. Layout & content primitives ---------- */
.grid {
  display: grid;
  gap: clamp(14px, 2.2vw, 24px);
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

.grid--waterfall {
  column-width: 260px;
  column-gap: clamp(14px, 2.2vw, 24px);
}

.grid--waterfall > * {
  break-inside: avoid;
  margin-bottom: clamp(14px, 2.2vw, 24px);
}

.layout-split { display: grid; gap: clamp(20px, 3vw, 40px); }

@media (min-width: 960px) {
  .layout-split {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    align-items: start;
  }
}

.card {
  position: relative;
  padding: clamp(18px, 2.6vw, 26px);
  border: 1px solid var(--line);
  border-radius: 26px 14px 24px 16px;
  background: linear-gradient(165deg, rgba(23, 21, 38, 0.94), rgba(11, 10, 18, 0.9));
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.card:hover {
  border-color: rgba(46, 230, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(46, 230, 255, 0.18),
    0 26px 48px -32px rgba(46, 230, 255, 0.6);
  transform: translateY(-3px);
}

.paper-card {
  position: relative;
  padding: clamp(18px, 3vw, 30px);
  border-radius: 24px 14px 28px 16px;
  background: var(--paper-050);
  color: #191627;
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.9),
    inset 0 0 0 1px rgba(222, 211, 190, 0.9);
}

.paper-card h2,
.paper-card h3 { color: #100E1B; }

.paper-card a {
  color: #4A1FB8;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(138, 77, 255, 0.55);
}

.paper-card .data-table th,
.paper-card .data-table td { border-bottom-color: rgba(23, 21, 38, 0.14); }

.paper-card .data-table thead th { color: #5A2ED0; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.22em 0.7em;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.badge--amber { background: var(--amber-gold); color: #2A1B00; }
.badge--blue { background: var(--neon-blue); color: #041318; }
.badge--mint { background: var(--mint-green); color: #04190E; }
.badge--purple { background: var(--electric-purple); color: #FFFFFF; }
.badge--red { background: var(--signal-red); color: #FFFFFF; }

.badge--ghost {
  border-color: var(--line-strong);
  background: rgba(244, 238, 226, 0.05);
  color: var(--paper-200);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.42em 0.95em;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: rgba(244, 238, 226, 0.04);
  color: var(--paper-200);
  font-size: 13px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
    background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.chip:hover {
  border-color: rgba(46, 230, 255, 0.6);
  color: var(--paper-050);
}

.chip[aria-pressed="true"],
.chip.is-active {
  background: var(--neon-blue);
  border-color: var(--neon-blue);
  color: #04131A;
  box-shadow: 0 0 18px rgba(46, 230, 255, 0.45);
}

.data-table {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.data-table caption {
  padding-bottom: 10px;
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--slate);
}

.data-table th,
.data-table td {
  padding: 0.7em 0.8em;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.data-table thead th {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--neon-blue);
  border-bottom-color: var(--line-strong);
}

.data-table tbody tr { transition: background 0.2s var(--ease); }

.data-table tbody tr:hover { background: rgba(46, 230, 255, 0.06); }

.breadcrumb { margin-block: clamp(10px, 2vw, 18px); }

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
  font-size: 13px;
  color: var(--slate);
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  color: rgba(107, 108, 134, 0.7);
}

.breadcrumb__link {
  color: var(--slate);
  transition: color 0.2s var(--ease);
}

.breadcrumb__link:hover { color: var(--neon-blue); }

.breadcrumb__item[aria-current="page"] .breadcrumb__link,
.breadcrumb__item[aria-current="page"] { color: var(--paper-200); }

.prose {
  max-width: 68ch;
  color: var(--paper-200);
}

.prose > * + * { margin-top: 1em; }

.prose h2,
.prose h3 {
  margin-top: 1.6em;
  color: var(--paper-050);
  line-height: 1.25;
}

.prose h2 { font-size: clamp(20px, 2.6vw, 26px); }
.prose h3 { font-size: clamp(17px, 2.2vw, 20px); }

.prose a {
  color: var(--neon-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose ul li {
  position: relative;
  padding-left: 1em;
}

.prose ul li + li { margin-top: 0.4em; }

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--electric-purple);
}

.prose ol {
  padding-left: 1.3em;
  list-style: decimal;
}

.prose code {
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: rgba(46, 230, 255, 0.12);
  color: var(--neon-blue);
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.chapter {
  position: relative;
  padding-block: clamp(26px, 5vw, 52px);
  isolation: isolate;
}

.chapter__num {
  position: absolute;
  left: -0.06em;
  top: -0.24em;
  z-index: -1;
  font-family: var(--font-display);
  font-size: clamp(76px, 16vw, 160px);
  line-height: 0.82;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(138, 77, 255, 0.45);
  text-shadow: 0 0 42px rgba(138, 77, 255, 0.35);
  user-select: none;
  pointer-events: none;
}

.chapter__title {
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.2;
}

.chapter__lede {
  max-width: 56ch;
  margin-top: 0.6em;
  color: var(--slate-soft);
}

.vert-note {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 12px;
  letter-spacing: 0.34em;
  color: var(--slate);
}

/* image containers for page stage */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 22px 12px 26px 14px;
  background-image:
    radial-gradient(120% 100% at 18% 0%, rgba(138, 77, 255, 0.38), transparent 62%),
    radial-gradient(90% 90% at 92% 100%, rgba(46, 230, 255, 0.2), transparent 66%),
    linear-gradient(140deg, #1B1930, #0D0C16);
}

.media-frame__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(11, 10, 18, 0.28) 0 1px,
    transparent 1px 4px
  );
  opacity: 0.5;
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--tall { aspect-ratio: 3 / 4; }

.figure { display: grid; gap: 10px; }

.figure__caption {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--slate);
}

/* ---------- 10. Motion hooks ---------- */
html.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

html.js-reveal [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 11. Focus & reduced motion ---------- */
:focus-visible {
  outline: 2px solid var(--neon-blue);
  outline-offset: 3px;
  border-radius: 4px;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  html.js-reveal [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .card:hover,
  .footer-link:hover {
    transform: none;
  }

  .to-top {
    transform: none;
  }
}
