/* _mg.css */
@font-face { font-family: 'Rajdhani'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/rajdhani-400.woff2') format('woff2'); }
@font-face { font-family: 'Rajdhani'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/rajdhani-500.woff2') format('woff2'); }
@font-face { font-family: 'Rajdhani'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/rajdhani-600.woff2') format('woff2'); }
@font-face { font-family: 'Rajdhani'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/rajdhani-700.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/barlow-400.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/barlow-500.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/barlow-600.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/barlow-700.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/jetbrains-mono-400.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/jetbrains-mono-500.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/jetbrains-mono-600.woff2') format('woff2'); }
@font-face { font-family: 'Press Start 2P'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/press-start-2p.woff2') format('woff2'); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; overflow-x: clip; scroll-padding-top: 80px; }
body { font-family: "Barlow", system-ui, sans-serif; -webkit-font-smoothing: antialiased; padding-top: 64px; overflow-x: hidden; overflow-x: clip; }
em { font-style: italic; }
h1, h2, h3, h4, h5, h6, p, li { text-wrap: pretty; }
.mg-skip-link { position: absolute; top: -100%; left: 16px; z-index: 100; padding: 8px 16px; background: #fff; color: #14161c; font-family: var(--mg-font-body); font-size: 14px; font-weight: 600; border-radius: 9999px; text-decoration: none; opacity: 0; transition: opacity 150ms; }
.mg-skip-link:focus { top: 12px; opacity: 1; outline: 2px solid var(--mg-cosmic-glow); outline-offset: 2px; }
img { display: block; max-width: 100%; }

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #6fb5ff;
  outline-offset: 3px;
  border-radius: 4px;
}

:root {
  --mg-red: #d11a1a;
  --mg-red-bright: #e63232;
  --mg-green: #3a9928;
  --mg-blue: #0c4f8d;
  --mg-blue-bright: #1a6dc4;
  --mg-cosmic-deep: #0a0d2a;
  --mg-cosmic-mid: #1a3680;
  --mg-cosmic-bright: #3a7be8;
  --mg-cosmic-glow: #6fb5ff;
  --mg-canvas-light: #f5f4ef;
  --mg-surface-elevated: #161721;
  --mg-hairline-light: #e6e3d8;
  --mg-ink: #14161c;
  --mg-body-color: #1f2228;
  --mg-mute: #4f5764;
  --mg-stone: #636b78;
  --mg-faint: #c3c5cc;
  --mg-font-display: "Rajdhani", system-ui, sans-serif;
  --mg-font-body: "Barlow", system-ui, sans-serif;
  --mg-font-mono: "JetBrains Mono", monospace;
  --mg-font-pixel: "Press Start 2P", monospace;
}

@keyframes hexFloat {
  from { background-position: 0 0; }
  to   { background-position: 56px 64px; }
}
@keyframes fadeRise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Scroll-reveal animation system ──────────────────────────────────── */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(32px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes revealFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes revealScale {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes revealLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes revealRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

[data-reveal] {
  opacity: 0;
}
[data-reveal].revealed {
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}
[data-reveal="up"].revealed { animation-name: revealUp; }
[data-reveal="fade"].revealed { animation-name: revealFade; }
[data-reveal="scale"].revealed { animation-name: revealScale; }
[data-reveal="left"].revealed { animation-name: revealLeft; }
[data-reveal="right"].revealed { animation-name: revealRight; }

/* Stagger children: parent gets data-stagger, children get data-reveal */
[data-stagger] > [data-reveal] { --stagger-index: 0; }
[data-stagger] > [data-reveal].revealed {
  animation-delay: calc(var(--stagger-index) * 80ms);
}

/* Duration variants */
[data-reveal].revealed { animation-duration: 0.7s; }
[data-reveal-duration="fast"].revealed { animation-duration: 0.4s; }
[data-reveal-duration="slow"].revealed { animation-duration: 1s; }

/* ── Hero entrance choreography ──────────────────────────────────────── */
@keyframes heroEnter {
  from { opacity: 0; transform: translateY(28px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.hero-anim > * {
  opacity: 0;
  animation: heroEnter 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-anim > *:nth-child(1) { animation-delay: 0.1s; }
.hero-anim > *:nth-child(2) { animation-delay: 0.25s; }
.hero-anim > *:nth-child(3) { animation-delay: 0.4s; }
.hero-anim > *:nth-child(4) { animation-delay: 0.55s; }
.hero-anim > *:nth-child(5) { animation-delay: 0.7s; }
.hero-anim > *:nth-child(6) { animation-delay: 0.85s; }

/* ── Hover micro-interactions ────────────────────────────────────────── */
.mg-lift {
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease;
}
.mg-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
}
.mg-lift:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.mg-glow {
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.mg-glow:hover {
  box-shadow: 0 0 0 3px rgba(111,181,255,0.15), 0 8px 24px rgba(0,0,0,0.06);
  border-color: var(--mg-cosmic-glow);
}

.mg-pulse:hover {
  animation: subtlePulse 1.5s ease infinite;
}
@keyframes subtlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.mg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 22px;
  border-radius: 9999px;
  border: var(--btn-border, none);
  background: var(--btn-bg, #fff);
  color: var(--btn-fg, #000);
  font-family: var(--mg-font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.2px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 200ms cubic-bezier(.2,.8,.2,1), transform 200ms cubic-bezier(.34,1.56,.64,1), box-shadow 200ms ease;
}
.mg-btn--sm {
  height: 38px;
  font-size: 13px;
  padding: 0 16px;
}
.mg-btn:hover {
  background: var(--btn-hover-bg, var(--btn-bg, #fff));
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.mg-btn:active {
  transform: scale(0.96);
}
.mg-btn--primary { --btn-bg: #fff; --btn-fg: #000; --btn-border: none; --btn-hover-bg: #e8e8e8; }
.mg-btn--dark { --btn-bg: #14161c; --btn-fg: #fff; --btn-border: none; --btn-hover-bg: #2a2d36; }
.mg-btn--blue { --btn-bg: #0c4f8d; --btn-fg: #fff; --btn-border: none; --btn-hover-bg: #1a6bb5; }
.mg-btn--green { --btn-bg: #3a9928; --btn-fg: #fff; --btn-border: none; --btn-hover-bg: #4ab835; }
.mg-btn--red { --btn-bg: #d11a1a; --btn-fg: #fff; --btn-border: none; --btn-hover-bg: #e83333; }
.mg-btn--outline-dark { --btn-bg: transparent; --btn-fg: #fff; --btn-border: 1px solid rgba(255,255,255,0.35); --btn-hover-bg: rgba(255,255,255,0.1); }
.mg-btn--outline-light { --btn-bg: transparent; --btn-fg: #14161c; --btn-border: 1px solid #c3c5cc; --btn-hover-bg: rgba(0,0,0,0.04); }

/* Button hover enhancements */
.mg-btn-pop {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}
.mg-btn-pop:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.mg-btn-pop:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Card accent line animation */
.mg-accent-slide {
  position: relative;
  overflow: hidden;
}
.mg-accent-slide::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--mg-cosmic-glow);
  transform: translateX(-101%);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mg-accent-slide:hover::after {
  transform: translateX(0);
}

/* Link underline reveal */
.mg-link-reveal {
  position: relative;
  text-decoration: none;
}
.mg-link-reveal::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mg-link-reveal:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; animation: none !important; }
  .hero-anim > * { opacity: 1; animation: none !important; }
  .mg-lift:hover { transform: none; }
  .mg-btn:hover { transform: none; }
  .mg-btn-pop:hover { transform: none; }
  .mg-pulse:hover { animation: none; }
}

/* Prose styles for article pages */
.prose { font-family: var(--mg-font-body); font-size: 19px; line-height: 1.65; color: var(--mg-body-color); text-align: justify; }
.prose p { margin: 0 0 24px; }
.prose p.lede { font-size: 19px; line-height: 1.65; color: var(--mg-ink); font-style: italic; position: relative; background: #fff; border: 1px solid var(--mg-hairline-light); border-radius: 16px; padding: 24px 28px; margin-bottom: 32px; }
.prose p.lede::before { content: ''; position: absolute; left: -10px; top: 32px; width: 18px; height: 18px; background: #fff; border-left: 1px solid var(--mg-hairline-light); border-bottom: 1px solid var(--mg-hairline-light); transform: rotate(45deg); }
.prose h2 { font-family: var(--mg-font-display); font-weight: 600; font-size: 32px; line-height: 1.15; letter-spacing: -0.4px; margin: 40px 0 16px; color: var(--mg-ink); }
.prose blockquote { margin: 32px 0; padding: 20px 24px; border-left: 4px solid var(--mg-red); background: #fff; font-style: italic; color: var(--mg-ink); font-size: 20px; line-height: 1.5; }
.prose a { color: var(--mg-blue); text-decoration: underline; text-decoration-color: rgba(12,79,141,0.3); text-underline-offset: 3px; transition: text-decoration-color 150ms; }
.prose a:hover { text-decoration-color: var(--mg-blue); }
.prose ul, .prose ol { padding-left: 24px; margin: 0 0 28px; text-align: left; text-wrap: balance; }
.prose ul { list-style: none; }
.prose ul li { position: relative; padding-left: 18px; margin: 0 0 12px; }
.prose ul li::before { content: ''; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; border-radius: 1px; background: var(--mg-red); transform: rotate(45deg); }
.prose ol { list-style: none; counter-reset: prose-ol; }
.prose ol li { position: relative; padding-left: 32px; margin: 0 0 12px; counter-increment: prose-ol; }
.prose ol li::before { content: counter(prose-ol); position: absolute; left: 0; top: 5px; font-family: var(--mg-font-mono); font-size: 13px; font-weight: 600; color: var(--mg-blue); background: rgba(12,79,141,0.08); width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.prose li strong { color: var(--mg-ink); }
.prose-callout { margin: 32px 0; padding: 20px 24px; border-left: 4px solid var(--mg-blue); background: rgba(12,79,141,0.04); border-radius: 0 8px 8px 0; font-size: 17px; line-height: 1.6; color: var(--mg-ink); }
.prose-callout strong { display: block; font-family: var(--mg-font-display); font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--mg-blue); margin-bottom: 6px; }
.prose figure { margin: 36px 0; }
.prose figure img { width: 100%; border-radius: 8px; }
.prose figcaption { font-family: var(--mg-font-mono); font-size: 13px; color: var(--mg-mute); margin-top: 10px; text-align: center; }

/* ── Layout ──────────────────────────────────────────────────────────── */
.mg-container { max-width: 1200px; margin: 0 auto; }
.mg-container--narrow { max-width: 900px; margin: 0 auto; }
.mg-container--text { max-width: 720px; margin: 0 auto; }
.mg-container--mid { max-width: 840px; margin: 0 auto; }
.mg-section { padding: 120px 32px; }
.mg-section--tight { padding: 80px 32px; }
.mg-section--flush-top { padding-top: 0; }
.mg-section--flush-bot { padding-bottom: 0; }
.mg-section--light { background: var(--mg-canvas-light); }
.mg-section--white { background: #fff; }
.mg-section--dark { background: #000; color: #fff; }
.mg-section--border-top { border-top: 1px solid var(--mg-hairline-light); }

/* ── Stats row (dark bg) ─────────────────────────────────────────────── */
.stats-row { display: flex; gap: 0; align-items: center; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.12); }
.stats-row__divider { width: 1px; height: 24px; background: rgba(255,255,255,0.12); margin: 0 20px; }
.stats-row__item { display: flex; flex-direction: column; align-items: center; text-align: center; }
.stats-row__label { font-family: var(--mg-font-body); font-size: 10px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1px; }
.stats-row__value { font-family: var(--mg-font-mono); font-weight: 600; font-size: 16px; color: #fff; margin-top: 4px; }

/* ── Rules sections ──────────────────────────────────────────────────── */
.rules-section { padding-bottom: 48px; margin-bottom: 48px; border-bottom: 1px solid var(--mg-hairline-light); }
.rules-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.rules-section__num { font-family: var(--mg-font-mono); font-size: 12px; color: var(--mg-stone); letter-spacing: 0.5px; margin-bottom: 10px; }
.rules-section__num--green { color: var(--mg-green); }
.rules-section__num--blue { color: var(--mg-blue); }
.rules-section__num--red { color: var(--mg-red); }
.rules-section__title { font-family: var(--mg-font-display); font-weight: 600; font-size: 40px; line-height: 1.15; letter-spacing: -0.5px; color: var(--mg-ink); margin: 0 0 16px; }
.rules-section__body { font-family: var(--mg-font-body); font-size: 17px; line-height: 1.6; color: #3a3d44; margin: 0; max-width: 640px; }

/* ── Related mods grid ───────────────────────────────────────────────── */
.related-heading { font-family: var(--mg-font-display); font-weight: 600; font-size: 40px; line-height: 1.15; letter-spacing: -0.5px; color: var(--mg-ink); margin: 0 0 32px; }

/* ── Game page hero ──────────────────────────────────────────────────── */
.game-hero { position: relative; color: #fff; overflow: hidden; isolation: isolate; background: #000; min-height: 580px; }
.game-hero__gradient { position: absolute; inset: 0; }
.game-hero__bloom { position: absolute; left: 50%; bottom: -100px; transform: translateX(-50%); width: 1200px; height: 500px; pointer-events: none; filter: blur(30px); }
.game-hero__bloom--green { background: radial-gradient(ellipse, rgba(58,153,40,0.4) 0%, transparent 65%); }
.game-hero__bloom--blue { background: radial-gradient(ellipse, rgba(12,79,141,0.4) 0%, transparent 65%); }
.game-hero__bloom--red { background: radial-gradient(ellipse, rgba(209,26,26,0.4) 0%, transparent 65%); }
.game-hero__hex { position: absolute; inset: 0; background-size: 56px 64px; animation: hexFloat 30s linear infinite; }
.game-hero__fade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 50%, rgba(0,0,0,0.5) 100%); pointer-events: none; }
.game-hero__inner { position: relative; padding: 100px 32px 120px; max-width: 1200px; margin: 0 auto; box-sizing: border-box; display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
.game-hero__text { display: flex; flex-direction: column; }
@media (max-width: 768px) { .game-hero__inner { grid-template-columns: 1fr; } .game-hero__logo { justify-self: center; order: -1; } }
.game-hero__back { font-family: var(--mg-font-mono); font-size: 12px; color: rgba(255,255,255,0.7); text-decoration: none; }
.game-hero__tags { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; align-items: center; }
.game-hero__tag { font-family: var(--mg-font-body); font-weight: 600; font-size: 11px; color: #fff; padding: 4px 10px; border-radius: 9999px; }
.game-hero__tag--outline { font-family: var(--mg-font-mono); font-size: 11px; color: rgba(255,255,255,0.7); padding: 4px 10px; border: 1px solid rgba(255,255,255,0.2); border-radius: 9999px; background: none; font-weight: 400; }
.game-hero__version { font-family: var(--mg-font-pixel); font-size: 9px; padding: 5px 10px; letter-spacing: 1px; }
.game-hero__logo { width: clamp(180px, 22vw, 300px); height: auto; object-fit: contain; filter: drop-shadow(0 16px 40px rgba(0,0,0,0.6)); animation: floatBadge 5s ease-in-out infinite; display: block; position: relative; z-index: 1; justify-self: end; align-self: center; }
.game-hero__title { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(56px, 8vw, 128px); line-height: 0.92; letter-spacing: -0.03em; margin: 24px 0; text-shadow: 0 4px 30px rgba(0,0,0,0.6); }
.game-hero__lede { font-family: var(--mg-font-body); font-size: 19px; line-height: 1.55; color: rgba(255,255,255,0.86); max-width: 640px; margin: 0 0 36px; text-shadow: 0 2px 16px rgba(0,0,0,0.7); text-wrap: balance; }
.game-hero__btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Stats bar (game pages) ──────────────────────────────────────────── */
.stats-bar { background: #000; color: #fff; padding: 0 32px 56px; }
.stats-bar__inner { max-width: 1200px; margin: 0 auto; display: flex; gap: 0; align-items: center; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.10); }

/* ── Section headings ────────────────────────────────────────────────── */
.mg-eyebrow { font-family: var(--mg-font-pixel); font-size: 11px; letter-spacing: 1.5px; margin-bottom: 22px; line-height: 1; display: inline-flex; align-items: center; gap: 8px; }
.mg-container .mg-eyebrow + .mg-heading-lg { margin-bottom: 32px; }
.mg-container .mg-eyebrow:not(:first-child) { margin-top: 72px; padding-top: 48px; border-top: 1px solid var(--mg-hairline-light); }
.mg-eyebrow::before { content: ''; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 7px solid currentColor; flex-shrink: 0; }
.mg-eyebrow--green { color: var(--mg-green); }
.mg-eyebrow--blue { color: var(--mg-blue); }
.mg-eyebrow--red { color: var(--mg-red); }
.mg-eyebrow--purple { color: #8b5cf6; }
.mg-eyebrow--glow { color: var(--mg-cosmic-glow); text-shadow: 0 0 12px rgba(111,181,255,0.5); }
.mg-heading-xl { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(36px, 4.5vw, 56px); line-height: 1.05; letter-spacing: -0.025em; color: var(--mg-ink); margin: 0 0 48px; text-wrap: balance; }
.mg-heading-xl--light { color: #fff; }
.mg-heading-lg { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(32px, 4vw, 48px); line-height: 1.05; letter-spacing: -0.025em; color: var(--mg-ink); margin: 0 0 12px; text-wrap: balance; }
.mg-heading-md { font-family: var(--mg-font-display); font-weight: 600; font-size: 32px; line-height: 1.15; letter-spacing: -0.4px; color: var(--mg-ink); margin: 0 0 16px; text-wrap: balance; }
.mg-body-sub { font-family: var(--mg-font-body); font-size: 16px; line-height: 1.55; color: var(--mg-mute); margin: 0 0 32px; max-width: 720px; text-wrap: balance; }
.mg-body-sub--light { color: rgba(255,255,255,0.78); }
.mg-text-center { text-align: center; margin-left: auto; margin-right: auto; }
.mg-eyebrow.mg-text-center { display: flex; justify-content: center; }

/* ── Cards (generic) ─────────────────────────────────────────────────── */
.mg-card { background: #fff; border: 1px solid var(--mg-hairline-light); border-radius: 16px; padding: 24px; }
.mg-card--light { background: #fff; }
.mg-section--white .mg-card--light { background: var(--mg-canvas-light); }
.mg-section--white .mg-card { background: var(--mg-canvas-light); }
.mg-card--featured { background: var(--mg-ink); border-color: var(--mg-ink); }
.mg-card--featured .mg-card__title { color: #fff; }
.mg-card--featured .mg-card__body { color: rgba(255,255,255,0.7); }
.mg-card--featured .mg-card__link { color: #6fb5ff; }
.mg-card--row { display: flex; gap: 16px; align-items: flex-start; border-radius: 14px; }
.mg-card__eyebrow { font-family: var(--mg-font-pixel); font-size: 9px; letter-spacing: 1.5px; margin-bottom: 14px; }
.mg-card__title { font-family: var(--mg-font-display); font-weight: 600; font-size: 22px; line-height: 1.2; letter-spacing: -0.25px; color: var(--mg-ink); margin: 0 0 10px; }
.mg-card__body { font-family: var(--mg-font-body); font-size: 14px; line-height: 1.55; color: #3a3d44; margin: 0; text-wrap: balance; }
.mg-card__icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; flex: none; }
.mg-card--note { background: var(--mg-canvas-light); border: none; border-left: 3px solid var(--mg-cosmic-glow); border-radius: 0 12px 12px 0; }
.mg-card--note .mg-card__title { font-size: 18px; margin-bottom: 8px; }
.mg-card--note .mg-card__body { font-size: 15px; line-height: 1.65; text-wrap: pretty; }
.mg-grid-notes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.mg-card__mono-title { font-family: var(--mg-font-mono); font-weight: 600; font-size: 14px; }
.mg-card__desc { font-family: var(--mg-font-body); font-size: 13px; color: #3a3d44; line-height: 1.5; margin-top: 6px; }
.mg-card__link { font-family: var(--mg-font-mono); font-size: 12px; color: var(--mg-blue); margin-top: 12px; display: inline-block; text-decoration: none; }

/* Dungeon Chess section */
.dc-header { display: flex; gap: 48px; align-items: center; margin-bottom: 48px; }
.dc-logo-img { width: clamp(160px, 20vw, 260px); height: auto; flex: none; filter: drop-shadow(0 8px 24px rgba(58,153,40,0.3)); animation: floatBadge 5s ease-in-out infinite; }
@media (max-width: 768px) { .dc-header { flex-direction: column; align-items: center; text-align: center; } }

/* ── Game index cards ────────────────────────────────────────────────── */
.game-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--mg-hairline-light); border-radius: 20px; overflow: hidden; text-decoration: none; color: inherit; transition: border-color 180ms, transform 180ms; }
.game-card:hover { transform: translateY(-3px); }
.game-card__bar { height: 4px; }
.game-card__thumb { width: 100%; height: 160px; position: relative; overflow: hidden; }
.game-card__thumb-hex { position: absolute; inset: 0; background-size: 28px 32px; }
.game-card__logo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 24px; z-index: 1; }
.game-card__body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.game-card__status { font-family: var(--mg-font-mono); font-size: 11px; letter-spacing: 0.5px; }
.game-card__title { font-family: var(--mg-font-display); font-weight: 600; font-size: 24px; line-height: 1.2; letter-spacing: -0.3px; color: var(--mg-ink); margin: 0; }
.game-card__desc { font-family: var(--mg-font-body); font-size: 14px; line-height: 1.55; color: var(--mg-mute); margin: 0; flex: 1; text-wrap: balance; }
.game-card__stats { font-family: var(--mg-font-mono); font-size: 12px; color: var(--mg-stone); padding-top: 12px; border-top: 1px solid var(--mg-hairline-light); }

/* ── Submit CTA card (reusable across pages) ──────────── */
.mods-submit-cta { display: flex; align-items: center; justify-content: center; text-decoration: none; color: var(--mg-ink); background: var(--mg-canvas-light); border: 2px dashed var(--mg-hairline-light); border-radius: 16px; padding: 40px 32px; text-align: center; transition: border-color 200ms, background 200ms; min-height: 200px; }
.mods-submit-cta:hover { border-color: var(--mg-green); background: rgba(58,153,40,0.04); }
.mods-submit-cta__inner { max-width: 400px; }
.mods-submit-cta__title { font-family: var(--mg-font-display); font-weight: 600; font-size: 22px; margin: 12px 0 8px; color: var(--mg-ink); }
.mods-submit-cta__body { font-family: var(--mg-font-body); font-size: 15px; line-height: 1.5; color: var(--mg-mute); margin: 0 0 20px; text-wrap: balance; }
.mods-submit-cta__btn { display: inline-flex; align-items: center; height: 40px; padding: 0 20px; background: var(--mg-green); color: #fff; border-radius: 9999px; font-family: var(--mg-font-body); font-weight: 600; font-size: 14px; }

/* ── Source / license footer ─────────────────────────────────────────── */
.mod-source { display: flex; gap: 32px; flex-wrap: wrap; }
.mod-source__group { }
.mod-source__label { font-family: var(--mg-font-body); font-size: 11px; color: rgba(20,22,28,0.5); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.mod-source__value { font-family: var(--mg-font-mono); font-size: 14px; color: var(--mg-ink); }

/* ── Simple rules list (community mods) ──────────────────────────────── */
.rules-list { display: flex; flex-direction: column; gap: 40px; }
.rules-list__item { padding-bottom: 32px; border-bottom: 1px solid var(--mg-hairline-light); }
.rules-list__item:last-child { border-bottom: none; padding-bottom: 0; }
.rules-list__num { font-family: var(--mg-font-pixel); font-size: 9px; letter-spacing: 1.5px; margin-bottom: 12px; }
.rules-list__title { font-family: var(--mg-font-display); font-weight: 600; font-size: 24px; line-height: 1.2; letter-spacing: -0.3px; color: var(--mg-ink); margin: 0 0 10px; }
.rules-list__body { font-family: var(--mg-font-body); font-size: 16px; line-height: 1.6; color: #3a3d44; margin: 0; }

/* ── Compact hero (community mods) ───────────────────────────────────── */
.compact-hero { position: relative; color: #fff; overflow: hidden; isolation: isolate; background: #000; min-height: 420px; }
.compact-hero__gradient { position: absolute; inset: 0; background: linear-gradient(180deg, #0a0d2a 0%, #1a3680 45%, #000 100%); }
.compact-hero__hex { position: absolute; inset: 0; background-size: 56px 64px; animation: hexFloat 30s linear infinite; }
.compact-hero__fade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 50%, rgba(0,0,0,0.6) 100%); pointer-events: none; }
.compact-hero__inner { position: relative; padding: 64px 32px 80px; max-width: 900px; margin: 0 auto; box-sizing: border-box; }
.compact-hero__title { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(40px, 6vw, 72px); line-height: 0.95; letter-spacing: -0.03em; margin: 20px 0 16px; }
.compact-hero__lede { font-family: var(--mg-font-body); font-size: 18px; line-height: 1.55; color: rgba(255,255,255,0.82); max-width: 600px; margin: 0 0 28px; }
.compact-hero__stats { display: flex; gap: 24px; flex-wrap: wrap; font-family: var(--mg-font-mono); font-size: 13px; color: rgba(255,255,255,0.7); }

/* ── Dark text section (engine, centered) ────────────────────────────── */
.mg-dark-center { background: #000; color: #fff; padding: 120px 32px; position: relative; overflow: hidden; text-align: center; }
.mg-dark-center__bloom { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 800px; height: 400px; pointer-events: none; filter: blur(24px); }
.mg-dark-center__inner { position: relative; }
.mg-dark-center__heading { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(36px, 5vw, 64px); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 18px; }
.mg-dark-center__body { font-family: var(--mg-font-body); font-size: 17px; line-height: 1.6; color: rgba(255,255,255,0.78); margin: 0 auto 32px; max-width: 540px; text-wrap: balance; }
.mg-dark-center__pills { display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.mg-dark-center__pill { font-family: var(--mg-font-mono); font-size: 12px; color: rgba(255,255,255,0.7); padding: 6px 14px; border: 1px solid rgba(255,255,255,0.2); border-radius: 9999px; }
.mg-dark-center__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Community header (title + submit link) ──────────────────────────── */
.community-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 32px; }
.community-header__link { font-family: var(--mg-font-body); font-weight: 600; font-size: 14px; color: var(--mg-blue); text-decoration: none; }

/* ── TOC list (sticky sidebar) ────────────────────────────────────────── */
.toc-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.toc-list__link { display: flex; gap: 10px; align-items: baseline; font-family: var(--mg-font-body); font-size: 14px; color: var(--mg-ink); text-decoration: none; padding: 4px 0; }
.toc-list__num { font-family: var(--mg-font-mono); font-size: 11px; color: var(--mg-stone); min-width: 18px; }

/* ── Component list (Talisman etc.) ──────────────────────────────────── */
.component-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.component-list__item { display: flex; gap: 12px; align-items: flex-start; font-family: var(--mg-font-body); font-size: 14px; color: var(--mg-ink); line-height: 1.5; }
.component-list__bullet { width: 7px; height: 7px; margin-top: 7px; border-radius: 2px; flex: none; border: 2px solid var(--mg-blue); }
.mg-card:has(.mg-eyebrow--red) .component-list__bullet { border-color: #d11a1a; }
.mg-card:has(.mg-eyebrow--green) .component-list__bullet { border-color: #3a9928; }
.mg-card:has(.mg-eyebrow--blue) .component-list__bullet { border-color: #0c4f8d; }

/* ── Utility ─────────────────────────────────────────────────────────── */
.mg-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.mg-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mg-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.mg-grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }

/* ── Homepage hero content ────────────────────────────────────────────── */
.home-hero__title { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(52px, 8.5vw, 120px); line-height: 1.0; letter-spacing: -0.025em; color: #fff; margin: 0 auto 32px; max-width: 1000px; text-shadow: 0 4px 40px rgba(0,0,0,0.6); text-wrap: balance; overflow-wrap: break-word; }
.home-hero__lede { font-family: var(--mg-font-body); font-size: 18px; line-height: 1.65; color: rgba(255,255,255,0.86); max-width: 560px; margin: 0 auto 40px; text-shadow: 0 2px 16px rgba(0,0,0,0.7); text-wrap: balance; }
.home-hero__btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ── Homepage sections ────────────────────────────────────────────────── */
.home-gallery { background: var(--mg-canvas-light); padding: 140px 24px; }
.home-gallery__header { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 24px; margin-bottom: 40px; }
.home-gallery__heading { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(36px, 5vw, 60px); line-height: 1.05; letter-spacing: -0.025em; color: var(--mg-ink); }
.home-gallery__filters { display: flex; gap: 8px; flex-wrap: wrap; }
.home-gallery__cta { text-align: center; margin-top: 48px; }
.home-gallery__cta a { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 22px; border-radius: 9999px; border: 1px solid #3a3d44; background: transparent; color: var(--mg-ink); font-family: var(--mg-font-body); font-weight: 600; font-size: 15px; text-decoration: none; }

.filter-btn { font-family: var(--mg-font-body); font-weight: 600; font-size: 13px; height: 36px; padding: 0 14px; border-radius: 9999px; border: 1px solid var(--mg-faint); background: transparent; color: var(--mg-ink); cursor: pointer; transition: all 150ms; }
.filter-btn--active { border: none; background: #000; color: #fff; }

.home-nuke { background: #000; color: #fff; padding: 140px 24px 220px; position: relative; overflow: hidden; text-align: center; }
.home-nuke__bloom { position: absolute; left: 50%; top: 55%; transform: translateX(-50%); width: 1100px; height: 420px; background: radial-gradient(ellipse, rgba(209,26,26,0.38) 0%, transparent 65%); pointer-events: none; filter: blur(24px); }
.home-nuke__inner { position: relative; max-width: 1200px; margin: 0 auto; }
.home-nuke__heading { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(44px, 7vw, 96px); line-height: 0.95; letter-spacing: -0.025em; margin: 0 auto 32px; max-width: 900px; text-shadow: 0 4px 30px rgba(0,0,0,0.6); text-wrap: balance; }
.home-nuke__heading em { color: #e63232; }
.home-nuke__body { font-family: var(--mg-font-body); font-size: 18px; line-height: 1.65; color: rgba(255,255,255,0.82); max-width: 540px; margin: 0 auto 40px; }
.home-nuke__btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.home-nuke__cube { margin: 0 auto 40px; display: flex; align-items: center; justify-content: center; }
.home-nuke__img { width: clamp(320px, 40vw, 480px); height: auto; margin: 0 auto 56px; border-radius: 20px; filter: drop-shadow(0 24px 48px rgba(209,26,26,0.5)); position: relative; z-index: 1; }
.home-nuke__smoke { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.home-nuke__smoke-wisp { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(220,80,20,0.5) 0%, rgba(160,40,10,0.25) 35%, transparent 70%); filter: blur(14px); animation: smokeRise var(--dur) var(--delay) ease-out infinite; opacity: 0; }
@keyframes smokeRise {
  0% { opacity: 0; transform: translate(var(--x), 0) scale(0.5); }
  10% { opacity: var(--o); }
  60% { opacity: calc(var(--o) * 0.7); }
  100% { opacity: 0; transform: translate(calc(var(--x) + var(--drift)), -150px) scale(1.5); }
}

.home-featured { background: #000; color: #fff; padding: 140px 24px; overflow: hidden; isolation: isolate; position: relative; }
.home-featured__glow { position: absolute; right: -120px; top: 50%; transform: translateY(-50%); width: 600px; height: 600px; background: radial-gradient(circle, rgba(58,123,232,0.22) 0%, transparent 60%); pointer-events: none; }
.home-featured__inner { max-width: 1200px; margin: 0 auto; position: relative; display: grid; grid-template-columns: 1fr auto; gap: 64px; align-items: center; }
.home-featured__heading { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(36px, 5.5vw, 72px); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 24px; }
.home-featured__body { font-family: var(--mg-font-body); font-size: 18px; line-height: 1.65; color: rgba(255,255,255,0.78); max-width: 560px; margin: 0 0 32px; }
.home-featured__btns { display: flex; gap: 12px; margin-bottom: 36px; }
.home-featured__cube { filter: drop-shadow(0 8px 50px rgba(58,123,232,0.4)); }
.home-featured__logo { width: clamp(240px, 30vw, 380px); height: auto; filter: drop-shadow(0 8px 40px rgba(58,123,232,0.4)); animation: floatBadge 4s ease-in-out infinite; }
@keyframes floatBadge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ── Fancy section divider (glowing HR) ──────────────────────────────── */
.mg-divider-glow { position: relative; height: 48px; display: flex; align-items: center; justify-content: center; background: #000; overflow: hidden; }
.mg-divider-glow::before { content: ''; position: absolute; left: 10%; right: 10%; height: 1px; background: linear-gradient(90deg, transparent, rgba(111,181,255,0.6), rgba(58,123,232,0.9), rgba(111,181,255,0.6), transparent); }
.mg-divider-glow::after { content: ''; position: absolute; left: 20%; right: 20%; height: 12px; top: 50%; transform: translateY(-50%); background: radial-gradient(ellipse 50% 100% at 50% 50%, rgba(111,181,255,0.2) 0%, transparent 100%); filter: blur(4px); }

.home-hex { background: var(--mg-canvas-light); padding: 100px 24px; }
.home-hex__inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.home-hex__heading { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.025em; color: var(--mg-ink); margin: 0 0 20px; }
.home-hex__heading em { color: var(--mg-blue); font-style: italic; }
.home-hex__body { font-family: var(--mg-font-body); font-size: 17px; line-height: 1.65; color: #3a3d44; margin: 0 0 28px; }
.home-hex__pills { display: flex; gap: 10px; flex-wrap: wrap; }
.home-hex__pill { font-family: var(--mg-font-mono); font-size: 13px; color: var(--mg-ink); padding: 6px 14px; border: 1px solid var(--mg-hairline-light); border-radius: 9999px; background: #fff; }
.home-hex__diagram { display: flex; align-items: center; justify-content: center; }

.home-engine { background: #000; color: #fff; padding: 100px 24px; position: relative; overflow: hidden; }
.home-engine__bloom { position: absolute; left: 50%; top: 60%; transform: translate(-50%, -50%); width: 1000px; height: 500px; background: radial-gradient(ellipse, rgba(111,181,255,0.18) 0%, transparent 65%); pointer-events: none; filter: blur(40px); }
.home-engine__inner { position: relative; max-width: 1200px; margin: 0 auto; }
.home-engine__heading { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(36px, 5.5vw, 64px); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 20px; }
.home-engine__heading em { color: var(--mg-cosmic-glow); font-style: italic; }
.home-engine__body { font-family: var(--mg-font-body); font-size: 18px; line-height: 1.65; color: rgba(255,255,255,0.82); max-width: 600px; margin: 0 0 40px; }
.home-engine__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; max-width: 800px; }
.home-engine__card { padding: 20px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; }
.home-engine__card-title { font-family: var(--mg-font-display); font-weight: 600; font-size: 15px; color: #fff; margin-bottom: 6px; }
.home-engine__card-body { font-family: var(--mg-font-body); font-size: 13px; line-height: 1.5; color: rgba(255,255,255,0.65); }
.home-engine__pills { margin-top: 40px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.home-engine__pill { font-family: var(--mg-font-mono); font-size: 12px; color: rgba(255,255,255,0.6); padding: 6px 14px; border: 1px solid rgba(255,255,255,0.15); border-radius: 9999px; }

.home-bots { background: var(--mg-canvas-light); padding: 100px 24px; }
.home-bots__inner { max-width: 1200px; margin: 0 auto; }
.home-bots__heading { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.025em; color: var(--mg-ink); margin: 0 0 20px; }
.home-bots__heading em { color: var(--mg-blue); font-style: italic; }
.home-bots__body { font-family: var(--mg-font-body); font-size: 17px; line-height: 1.65; color: #3a3d44; max-width: 640px; margin: 0 0 32px; }
.home-bots__btns { display: flex; gap: 12px; flex-wrap: wrap; }

.home-news { background: var(--mg-canvas-light); padding: 140px 24px; border-top: 1px solid var(--mg-hairline-light); }
.home-news__inner { max-width: 1200px; margin: 0 auto; }
.home-news__header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 32px; }
.home-news__heading { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(30px, 4vw, 48px); line-height: 1.1; letter-spacing: -0.4px; color: var(--mg-ink); }
.home-news__link { font-family: var(--mg-font-body); font-weight: 600; font-size: 14px; color: var(--mg-blue); text-decoration: none; }

.news-card { display: flex; flex-direction: column; gap: 14px; padding: 24px; background: #fff; border: 1px solid var(--mg-hairline-light); border-radius: 20px; text-decoration: none; color: inherit; transition: border-color 180ms; }
.news-card:hover { border-color: var(--mg-ink); }
.news-card__header { display: flex; justify-content: space-between; align-items: center; }
.news-card__tag { font-family: var(--mg-font-body); font-weight: 600; font-size: 11px; background: var(--mg-ink); color: #fff; padding: 3px 10px; border-radius: 9999px; }
.news-card__date { font-family: var(--mg-font-mono); font-size: 12px; color: var(--mg-stone); }
.news-card__title { font-family: var(--mg-font-display); font-weight: 600; font-size: 21px; line-height: 1.25; letter-spacing: -0.25px; color: var(--mg-ink); }
.news-card__body { font-family: var(--mg-font-body); font-size: 14px; line-height: 1.55; color: var(--mg-mute); margin: 0; text-wrap: balance; }
.news-card__more { font-family: var(--mg-font-body); font-weight: 600; font-size: 13px; color: var(--mg-blue); margin-top: auto; }

.home-community { position: relative; min-height: 520px; background: #000; color: #fff; overflow: hidden; isolation: isolate; }
.home-community__gradient { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, #1a3680 50%, #0a0d2a 100%); }
.home-community__glow { display: none; }
.home-community__hex { position: absolute; inset: 0; background-size: 56px 64px; opacity: 0.5; }
.home-community__fade { position: absolute; inset: 0; background: linear-gradient(180deg, #000 0%, transparent 20%, transparent 80%, #000 100%); pointer-events: none; }
.home-community__inner { position: relative; z-index: 2; padding: 120px 24px; max-width: 760px; margin: 0 auto; text-align: center; }
.home-community__heading { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(36px, 5.5vw, 72px); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 24px; text-shadow: 0 4px 24px rgba(0,0,0,0.6); }
.home-community__body { font-family: var(--mg-font-body); font-size: 18px; line-height: 1.65; color: rgba(255,255,255,0.86); margin: 0 0 36px; text-shadow: 0 2px 14px rgba(0,0,0,0.6); text-wrap: balance; }
.home-community__btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Global Search ──────────────────────────────────────────────────── */
.mg-search-trigger {
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 180ms ease, background 180ms ease;
}
.mg-search-trigger:hover {
  border-color: var(--mg-cosmic-glow);
  background: rgba(111,181,255,0.08);
}
.mg-search-trigger svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mg-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  opacity: 0;
  transition: opacity 200ms ease;
}
.mg-search-overlay--visible {
  display: flex;
  opacity: 1;
}

.mg-search-panel {
  width: 100%;
  max-width: 620px;
  margin: 0 24px;
  background: #14161c;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  overflow: hidden;
  transform: translateY(-8px);
  transition: transform 200ms cubic-bezier(0.2,0.8,0.2,1);
}
.mg-search-overlay--visible .mg-search-panel {
  transform: translateY(0);
}

.mg-search-panel__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mg-search-panel__icon {
  width: 18px;
  height: 18px;
  stroke: var(--mg-cosmic-glow);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.mg-search-panel__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--mg-font-body);
  font-size: 16px;
  color: #fff;
  caret-color: var(--mg-cosmic-glow);
  padding: 8px 12px;
}
.mg-search-panel__input::placeholder {
  color: rgba(255,255,255,0.4);
}
.mg-search-panel__kbd {
  font-family: var(--mg-font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  padding: 3px 8px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  flex-shrink: 0;
}

.mg-search-panel__results {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
}
.mg-search-panel__results::-webkit-scrollbar {
  width: 6px;
}
.mg-search-panel__results::-webkit-scrollbar-track {
  background: transparent;
}
.mg-search-panel__results::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
}

.mg-search-result {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  transition: background 120ms ease;
}
.mg-search-result:hover,
.mg-search-result--active {
  background: rgba(111,181,255,0.08);
}
.mg-search-result__type {
  font-family: var(--mg-font-mono);
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}
.mg-search-result__type--mod {
  border-color: var(--mg-green);
  color: var(--mg-green);
}
.mg-search-result__type--game {
  border-color: var(--mg-cosmic-glow);
  color: var(--mg-cosmic-glow);
}
.mg-search-result__type--news {
  border-color: var(--mg-red-bright);
  color: var(--mg-red-bright);
}
.mg-search-result__type--tool {
  border-color: var(--mg-blue-bright);
  color: var(--mg-blue-bright);
}
.mg-search-result__type--rule {
  border-color: var(--mg-red);
  color: var(--mg-red);
}
.mg-search-result__content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.mg-search-result__title {
  font-family: var(--mg-font-body);
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mg-search-result__desc {
  font-family: var(--mg-font-body);
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mg-search-panel__empty {
  padding: 40px 20px;
  text-align: center;
}
.mg-search-panel__empty-title {
  font-family: var(--mg-font-body);
  font-weight: 600;
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 6px;
}
.mg-search-panel__empty-hint {
  font-family: var(--mg-font-body);
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

.mg-search-panel__footer {
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mg-search-panel__footer-hint {
  font-family: var(--mg-font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  display: flex;
  gap: 16px;
}
.mg-search-panel__footer-hint kbd {
  padding: 2px 6px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  margin-right: 4px;
}

@media (max-width: 540px) {
  .mg-search-overlay { padding-top: 72px; }
  .mg-search-panel { margin: 0 12px; border-radius: 16px; }
  .mg-search-panel__results { max-height: 320px; }
  .mg-search-panel__footer { display: none; }
}

/* Responsive helpers */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .mg-grid-3 { grid-template-columns: 1fr !important; }
  .mg-grid-2 { grid-template-columns: 1fr !important; }
  .mg-grid-notes { grid-template-columns: 1fr !important; }
  .mg-grid-4 { grid-template-columns: 1fr 1fr !important; }
  .rules-layout { grid-template-columns: 1fr !important; gap: 32px !important; }
  .rules-sidebar { position: static !important; }
  .home-featured__inner { grid-template-columns: 1fr !important; text-align: center; }
  .home-featured__body { margin-left: auto; margin-right: auto; }
  .home-featured__btns { justify-content: center; }
  .home-featured__cube, .home-featured__logo { display: none; }
  .home-hex__inner { grid-template-columns: 1fr !important; gap: 40px !important; }
  .home-hex__diagram { order: -1; }
  .home-featured { padding: 80px 20px; }
  .home-hex { padding: 64px 20px; }
  .home-engine { padding: 64px 20px; }
  .mg-section { padding: 80px 20px; }
  .stats-row { justify-content: center; gap: 16px 24px; }
  .stats-row__divider { display: none; }
  .stats-bar__inner { justify-content: center; gap: 16px 24px; }
  .stats-bar__inner .stats-row__divider { display: none; }

  /* Mobile centering: cards, tags, pills */
  .mod-card__inner { text-align: center; align-items: center; }
  .mod-card__meta { justify-content: center; }
  .mod-card__stats { align-items: center; text-align: center; }
  .mod-card__link { align-self: center; }
  .game-card__body { text-align: center; align-items: center; }
  .game-card__stats { text-align: center; }
  .news-card { text-align: center; }
  .news-card__header { justify-content: center; gap: 12px; }
  .news-card__more { align-self: center; }
  .mg-card { text-align: center; }
  .mg-card--row { flex-direction: column; align-items: center; }
  .mg-card__link { align-self: center; }

  /* Flex pill/tag containers */
  .game-hero__tags { justify-content: center; }
  .game-hero__btns { justify-content: center; }
  .home-hex__pills { justify-content: center; }
  .home-engine__pills { justify-content: center; }
  .home-gallery__filters { justify-content: center; }
  .home-nuke__btns { justify-content: center; }
  .home-community__btns { justify-content: center; }
  .compact-hero__stats { justify-content: center; }
  .post-share-btns { justify-content: center; }

  /* Body sub / lede centering */
  .mg-body-sub { margin-left: auto; margin-right: auto; text-align: center; }
  .mg-heading-xl { text-align: center; }
  .mg-heading-lg { text-align: center; }
  .mg-heading-md { text-align: center; }

  /* Eyebrows center */
  .mg-eyebrow { display: flex; justify-content: center; }

  /* Game/mod hero mobile centering */
  .game-hero__inner { grid-template-columns: 1fr; text-align: center; padding: 64px 20px 80px; }
  .game-hero__text { align-items: center; }
  .game-hero__lede { margin-left: auto; margin-right: auto; }
  .game-hero__tags { justify-content: center; }
  .game-hero__btns { justify-content: center; }
  .game-hero__logo { justify-self: center; }

  /* Compact hero (community mods) */
  .compact-hero__inner { text-align: center; padding: 48px 20px 64px; }
  .compact-hero__lede { margin-left: auto; margin-right: auto; }
  .compact-hero__stats { justify-content: center; }

  /* Stats bar */
  .stats-bar__inner { justify-content: center; flex-wrap: wrap; }

  /* Related heading */
  .related-heading { text-align: center; }
  .community-header { flex-direction: column; align-items: center; text-align: center; }
  .community-header__link { align-self: center; }

  /* Rules layout */
  .rules-layout { grid-template-columns: 1fr !important; gap: 32px !important; }
  .rules-sidebar { display: none !important; }

  /* Rules sections */
  .rules-section__num { text-align: center; }
  .rules-section__title { text-align: center; }
  .rules-section__body { margin-left: auto; margin-right: auto; text-align: center; }

  /* Rules list (community mods) */
  .rules-list__item { text-align: center; }
  .rules-list__num { text-align: center; }
  .rules-list__title { text-align: center; }
  .rules-list__body { text-align: center; }

  /* Source/license footer */
  .mod-source { justify-content: center; text-align: center; }

  /* Section padding */
  .mg-section--tight { padding: 56px 20px; }
}
@media (max-width: 540px) {
  .mg-grid-4 { grid-template-columns: 1fr !important; }
  section, .section-pad { padding-left: 16px !important; padding-right: 16px !important; }
  .prose blockquote { margin-left: 0; margin-right: 0; padding: 16px 18px; border-radius: 0 12px 12px 0; }
  .prose-callout { margin-left: 0; margin-right: 0; padding: 16px 18px; border-radius: 0 12px 12px 0; }
  .prose p.lede { padding: 20px 20px; border-radius: 12px; }
  .prose p.lede::before { display: none; }
}

/* navbar.css */
.mg-navbar {
  position: sticky;
  top: 0;
  z-index: 50;
}

.mg-navbar__header {
  height: 64px;
  background: #000;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 24px;
  box-sizing: border-box;
}

.mg-navbar__logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.mg-navbar__logo-img {
  height: 32px;
  width: auto;
}

.mg-navbar__nav {
  display: flex;
  gap: 24px;
  margin-left: 12px;
}

.mg-navbar__item {
  position: relative;
}

.mg-navbar__link {
  font-family: var(--mg-font-body);
  font-weight: 500;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 4px;
}

.mg-navbar__link--active {
  color: #fff;
}

.mg-navbar__active-bar {
  position: absolute;
  bottom: -22px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--mg-cosmic-glow);
}

/* Dropdown */
.mg-navbar__dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding-top: 12px;
  display: none;
  z-index: 100;
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms cubic-bezier(.2,.8,.2,1);
}

.mg-navbar__dropdown--visible {
  display: block;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.mg-navbar__dropdown-menu {
  background: #14161c;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 10px 0;
  min-width: 200px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6), 0 0 0 1px rgba(111,181,255,0.06);
  backdrop-filter: blur(12px);
}

.mg-navbar__dropdown-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font-family: var(--mg-font-body);
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: all 150ms cubic-bezier(.2,.8,.2,1);
  border-left: 2px solid transparent;
  margin: 0 6px;
  border-radius: 6px;
}

.mg-navbar__dropdown-link:hover {
  background: color-mix(in srgb, var(--nav-accent, var(--mg-cosmic-glow)) 8%, transparent);
  border-left-color: var(--nav-accent, var(--mg-cosmic-glow));
  color: #fff;
  padding-left: 20px;
}
.mg-navbar__dropdown-link--active {
  color: #fff;
  font-weight: 600;
  border-left-color: var(--nav-accent, var(--mg-cosmic-glow));
  background: color-mix(in srgb, var(--nav-accent, var(--mg-cosmic-glow)) 6%, transparent);
}

/* Right section */
.mg-navbar__right {
  margin-left: auto;
  display: flex;
  gap: 12px;
  align-items: center;
}

.mg-navbar__discord {
  font-family: var(--mg-font-pixel);
  font-size: 8px;
  color: var(--mg-cosmic-glow);
  letter-spacing: 1.5px;
  text-decoration: none;
}

/* Hamburger */
.mg-navbar__hamburger {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 9999px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* Mobile drawer */
.mg-navbar__drawer {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  z-index: 49;
  padding: 32px 24px;
  overflow-y: auto;
  display: none;
}

.mg-navbar__drawer--open {
  display: block;
}

.mg-navbar__drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mg-navbar__drawer-link {
  font-family: var(--mg-font-body);
  font-weight: 600;
  font-size: 20px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  padding: 12px 0;
  display: block;
}

.mg-navbar__drawer-link--active {
  color: #fff;
}

.mg-navbar__drawer-sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 8px 16px;
  border-left: 1px solid rgba(255,255,255,0.1);
  margin-left: 8px;
}

.mg-navbar__drawer-sub-link {
  font-family: var(--mg-font-body);
  font-weight: 400;
  font-size: 15px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  padding: 8px 0;
  display: block;
}

.mg-navbar__drawer-sub-link:hover {
  color: #fff;
}

/* Responsive */
@media (max-width: 900px) {
  .mg-navbar__nav,
  .mg-navbar__right {
    display: none !important;
  }
  .mg-navbar__hamburger {
    display: flex !important;
  }
}

@media (min-width: 901px) {
  .mg-navbar__drawer {
    display: none !important;
  }
}

/* footer.css */
.mg-footer {
  background: #000;
  color: #fff;
  padding: 80px 24px 40px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.mg-footer__hex {
  position: absolute;
  inset: 0;
  background-size: 56px 64px;
  opacity: 0.04;
  pointer-events: none;
}

.mg-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.mg-footer__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 32px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

@media (max-width: 900px) {
  .mg-footer__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 24px;
  }
}

@media (max-width: 768px) {
  .mg-footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .mg-footer__grid > * {
    text-align: center !important;
  }
  .mg-footer__grid > * .mg-footer__col-list {
    align-items: center !important;
  }
  .mg-footer__grid > :first-child .mg-footer__tagline {
    margin-left: auto;
    margin-right: auto;
  }
  .mg-footer__grid > :first-child .mg-footer__logo-wrap {
    justify-content: center;
  }
  .mg-footer__bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.mg-footer__logo-wrap {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}

.mg-footer__logo {
  height: 28px;
  width: auto;
}

.mg-footer__tagline {
  font-family: var(--mg-font-body);
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.4);
  max-width: 280px;
  margin: 0;
}

.mg-footer__col-title {
  font-family: var(--mg-font-body);
  font-weight: 600;
  font-size: 12px;
  color: #fff;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.mg-footer__col-title-link {
  color: inherit;
  text-decoration: none;
}
.mg-footer__col-title-link:hover {
  color: rgba(255,255,255,0.8);
  text-decoration: underline;
}

.mg-footer__col-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mg-footer__col-link {
  font-family: var(--mg-font-body);
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color 150ms;
}
.mg-footer__col-link:hover {
  color: #fff;
}

.mg-footer__grid > :not(:first-child):not(:last-child) { text-align: center; }
.mg-footer__grid > :not(:first-child):not(:last-child) .mg-footer__col-list { align-items: center; }
.mg-footer__grid > :last-child { text-align: right; }
.mg-footer__grid > :last-child .mg-footer__col-list { align-items: flex-end; }

.mg-footer__bottom {
  padding-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mg-font-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  line-height: 1.6;
}

/* hero.css */
/* ── Hero System — Tier 1 & Tier 2 ──────────────────────────────────── */

/* Shared hero container */
.mg-hero {
  position: relative;
  background: #000;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.mg-hero--tier1 {
  min-height: 580px;
}
.mg-hero--tier2 {
  min-height: 400px;
}

/* Gradient background layer */
.mg-hero__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--hero-deep, #0a0d2a) 0%, var(--hero-mid, #1a3680) 45%, #000 100%);
}

/* Hexland landscape (tier 1 only) */
.mg-hero__land {
  position: absolute;
  inset: 0;
  background: url('../img/hex-land.jpg') center 70% / cover no-repeat;
  opacity: 0.18;
  mix-blend-mode: screen;
  mask-image: linear-gradient(180deg, transparent 0%, black 30%, black 60%, transparent 90%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 30%, black 60%, transparent 90%);
  will-change: transform;
  transform-origin: center bottom;
}

/* Hex grid overlay — parallax target */
.mg-hero__hex {
  position: absolute;
  inset: -20% 0;
  background-size: 56px 64px;
  animation: hexFloat 30s linear infinite;
  pointer-events: none;
  will-change: transform;
}

/* Tinted hex overlays */
.mg-hero__hex--blue { background-image: url('../img/hex-grid-blue.svg'); }
.mg-hero__hex--green { background-image: url('../img/hex-grid-green.svg'); }
.mg-hero__hex--red { background-image: url('../img/hex-grid-red.svg'); }
.mg-hero__hex--white { background-image: url('../img/hex-grid-white.svg'); }
.mg-hero__hex--purple { background-image: url('../img/hex-grid-purple.svg'); }
.mg-hero__hex--cyan { background-image: url('../img/hex-grid-cyan.svg'); }
.mg-hero__hex--magenta { background-image: url('../img/hex-grid-magenta.svg'); }
.mg-hero__hex--amber { background-image: url('../img/hex-grid-amber.svg'); }

/* Fade overlays */
.mg-hero__fade-top {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,10,30,0.5) 0%, transparent 40%);
  z-index: 2;
  pointer-events: none;
}
.mg-hero__fade-bottom {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.6) 85%, #000 100%);
  z-index: 2;
  pointer-events: none;
}

/* Accent glow — positioned center-bottom for tier 1 */
.mg-hero__glow {
  position: absolute;
  left: 50%;
  bottom: -80px;
  transform: translateX(-50%);
  width: 900px;
  height: 400px;
  pointer-events: none;
  filter: blur(30px);
  background: radial-gradient(ellipse, var(--hero-glow, rgba(111,181,255,0.3)) 0%, transparent 65%);
  will-change: transform, opacity;
  transform-origin: center center;
}

/* Content layer */
.mg-hero__content {
  position: relative;
  z-index: 5;
  padding: 140px 32px 120px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  box-sizing: border-box;
  will-change: transform, opacity;
}
.mg-hero--tier2 .mg-hero__content {
  padding: 88px 32px 80px;
}

.mg-hero__eyebrow {
  font-family: var(--mg-font-pixel);
  font-size: 10px;
  letter-spacing: 1.5px;
  margin-bottom: 18px;
  color: var(--hero-accent, var(--mg-cosmic-glow));
  text-shadow: 0 0 12px var(--hero-accent-alpha, rgba(111,181,255,0.55));
}
.mg-hero__title {
  font-family: var(--mg-font-display);
  font-weight: 600;
  font-size: clamp(48px, 7vw, 100px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
  text-shadow: 0 4px 40px rgba(0,0,0,0.6);
  text-wrap: balance;
}
.mg-hero--tier2 .mg-hero__title {
  font-size: clamp(40px, 5.5vw, 72px);
}
.mg-hero__title em {
  color: var(--hero-accent, var(--mg-cosmic-glow));
  font-style: normal;
}
.mg-hero__lede {
  font-family: var(--mg-font-body);
  font-size: 19px;
  line-height: 1.65;
  color: rgba(255,255,255,0.86);
  max-width: 800px;
  margin: 0 auto;
  text-shadow: 0 2px 16px rgba(0,0,0,0.7);
  text-wrap: balance;
}
.mg-hero--tier2 .mg-hero__lede {
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto;
}
.mg-hero__btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

/* ── Feature element layout (hero with side graphic) ────────────────── */
.mg-hero--has-feature .mg-hero__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 64px;
  text-align: left;
}
.mg-hero__text {
  flex: 1;
  min-width: 0;
}
.mg-hero__feature {
  flex: none;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mg-hero--has-feature .mg-hero__lede {
  margin: 0;
}
@media (max-width: 768px) {
  .mg-hero--has-feature .mg-hero__content {
    flex-direction: column;
    text-align: center;
  }
  .mg-hero__feature {
    width: 140px;
    height: 140px;
    order: -1;
  }
  .mg-hero--has-feature .mg-hero__lede {
    margin: 0 auto;
  }
}

/* ── Floating SVG elements layer ────────────────────────────────────── */
.mg-hero__floats {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}
.mg-hero__float {
  position: absolute;
  opacity: 0;
  animation: heroFloat var(--float-dur, 18s) var(--float-delay, 0s) ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes heroFloat {
  0% {
    opacity: 0;
    transform: translate(var(--fx, 0px), var(--fy, 0px)) rotate(var(--fr, 0deg)) scale(0.8);
  }
  8% { opacity: var(--fo, 0.18); }
  50% {
    transform: translate(calc(var(--fx, 0px) + var(--fdx, 20px)), calc(var(--fy, 0px) + var(--fdy, -40px))) rotate(calc(var(--fr, 0deg) + var(--frot, 15deg))) scale(1);
  }
  92% { opacity: var(--fo, 0.18); }
  100% {
    opacity: 0;
    transform: translate(calc(var(--fx, 0px) + var(--fdx2, -10px)), calc(var(--fy, 0px) + var(--fdy2, -60px))) rotate(calc(var(--fr, 0deg) + var(--frot2, 30deg))) scale(0.85);
  }
}

/* Slower orbit variant for engines cog */
@keyframes heroOrbit {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes heroPulse {
  0%, 100% { opacity: var(--fo, 0.15); transform: scale(1); }
  50% { opacity: calc(var(--fo, 0.15) * 1.4); transform: scale(1.06); }
}

/* ── Section-specific accent vars ───────────────────────────────────── */
.mg-hero--mods {
  --hero-accent: #e63232;
  --hero-accent-alpha: rgba(230,50,50,0.55);
  --hero-glow: rgba(209,26,26,0.35);
  --hero-mid: #5c1010;
}
.mg-hero--games {
  --hero-accent: #e8a91a;
  --hero-accent-alpha: rgba(232,169,26,0.55);
  --hero-glow: rgba(232,169,26,0.35);
  --hero-mid: #5c4310;
}
.mg-hero--tools {
  --hero-accent: #3a9928;
  --hero-accent-alpha: rgba(58,153,40,0.55);
  --hero-glow: rgba(58,153,40,0.35);
  --hero-mid: #1a5e10;
}
.mg-hero--news {
  --hero-accent: #e11d89;
  --hero-accent-alpha: rgba(225,29,137,0.55);
  --hero-glow: rgba(225,29,137,0.3);
  --hero-mid: #5c0f3a;
}
.mg-hero--engines {
  --hero-accent: #06b6d4;
  --hero-accent-alpha: rgba(6,182,212,0.55);
  --hero-glow: rgba(6,182,212,0.35);
  --hero-mid: #0e4f5c;
}
.mg-hero--developers {
  --hero-accent: #8b5cf6;
  --hero-accent-alpha: rgba(139,92,246,0.55);
  --hero-glow: rgba(139,92,246,0.35);
  --hero-mid: #3b1a80;
}
.mg-hero--about {
  --hero-accent: #6fb5ff;
  --hero-accent-alpha: rgba(111,181,255,0.55);
  --hero-glow: rgba(111,181,255,0.25);
}

/* Sub-page tints */
.mg-hero--submit {
  --hero-accent: #e63232;
  --hero-accent-alpha: rgba(230,50,50,0.55);
  --hero-glow: rgba(209,26,26,0.25);
  --hero-mid: #5c1010;
}
.mg-hero--team {
  --hero-accent: #6fb5ff;
  --hero-accent-alpha: rgba(111,181,255,0.55);
  --hero-glow: rgba(111,181,255,0.2);
}
.mg-hero--roadmap {
  --hero-accent: #6fb5ff;
  --hero-accent-alpha: rgba(111,181,255,0.55);
  --hero-glow: rgba(111,181,255,0.2);
}
.mg-hero--community {
  --hero-accent: #6fb5ff;
  --hero-accent-alpha: rgba(111,181,255,0.55);
  --hero-glow: rgba(111,181,255,0.25);
}
.mg-hero--press {
  --hero-accent: #6fb5ff;
  --hero-accent-alpha: rgba(111,181,255,0.55);
  --hero-glow: rgba(111,181,255,0.2);
}

/* Tool sub-page tints — inherit green from Tools parent */
.mg-hero--tool-ti {
  --hero-accent: #3a9928;
  --hero-accent-alpha: rgba(58,153,40,0.55);
  --hero-glow: rgba(58,153,40,0.25);
  --hero-mid: #1a5e10;
}
.mg-hero--tool-talisman {
  --hero-accent: #3a9928;
  --hero-accent-alpha: rgba(58,153,40,0.55);
  --hero-glow: rgba(58,153,40,0.25);
  --hero-mid: #1a5e10;
}
.mg-hero--tool-nukes {
  --hero-accent: #3a9928;
  --hero-accent-alpha: rgba(58,153,40,0.55);
  --hero-glow: rgba(58,153,40,0.25);
  --hero-mid: #1a5e10;
}
.mg-hero--tool-dice {
  --hero-accent: #3a9928;
  --hero-accent-alpha: rgba(58,153,40,0.55);
  --hero-glow: rgba(58,153,40,0.25);
  --hero-mid: #1a5e10;
}
.mg-hero--tool-decks {
  --hero-accent: #3a9928;
  --hero-accent-alpha: rgba(58,153,40,0.55);
  --hero-glow: rgba(58,153,40,0.25);
  --hero-mid: #1a5e10;
}
.mg-hero--tool-chess {
  --hero-accent: #3a9928;
  --hero-accent-alpha: rgba(58,153,40,0.55);
  --hero-glow: rgba(58,153,40,0.25);
  --hero-mid: #1a5e10;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .mg-hero--tier1 { min-height: 480px; }
  .mg-hero--tier2 { min-height: 340px; }
  .mg-hero__content { padding: 100px 20px 88px; }
  .mg-hero--tier2 .mg-hero__content { padding: 64px 20px 56px; }
  .mg-hero__float { display: none; }
}

/* ── Reduced motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .mg-hero__hex { animation: none; }
  .mg-hero__float { animation: none; opacity: var(--fo, 0.12) !important; }
}

/* hero-features.css */
/* ── Hero Feature Objects — 3D spinning cubes per section ────────────── */

.hero-obj {
  width: 120px;
  height: 120px;
  position: relative;
  transform-style: preserve-3d;
  animation: heroSpin 8s linear infinite;
  margin: 0 auto;
}
@keyframes heroSpin {
  0% { transform: rotateX(15deg) rotateY(0deg); }
  100% { transform: rotateX(15deg) rotateY(360deg); }
}

.hero-obj__face {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 14px;
  background: #14161c;
  border: 2px solid var(--obj-stroke, rgba(255,255,255,0.2));
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-obj__face--front  { transform: translateZ(60px); }
.hero-obj__face--back   { transform: rotateY(180deg) translateZ(60px); }
.hero-obj__face--left   { transform: rotateY(-90deg) translateZ(60px); }
.hero-obj__face--right  { transform: rotateY(90deg) translateZ(60px); }
.hero-obj__face--top    { transform: rotateX(90deg) translateZ(60px); }
.hero-obj__face--bottom { transform: rotateX(-90deg) translateZ(60px); }

/* ── MODS: Cube with rulebook pages on faces ────────────────────────── */
.hero-obj--mods { --obj-stroke: rgba(230,50,50,0.35); }
.mods-face-icon {
  width: 60px;
  height: 60px;
  stroke: var(--mg-red-bright);
  fill: none;
  stroke-width: 1.5;
  opacity: 0.8;
  animation: modsDocSpin 8s linear infinite;
}
@keyframes modsDocSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

/* ── MODS: CSS clip-path shape morph ────────────────────────────────── */
.mods-anim-wrap {
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mods-morph {
  width: 220px;
  height: 220px;
  position: relative;
  animation: modMorphFloat 8s ease-in-out infinite;
}
@keyframes modMorphFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(4deg); }
}
.mods-morph__glow {
  position: absolute;
  inset: -50px;
  background: radial-gradient(circle, rgba(230,50,50,0.35) 0%, transparent 60%);
  animation: morphGlowPulse 10s ease-in-out infinite;
}
@keyframes morphGlowPulse {
  0%, 20% { opacity: 0.4; transform: scale(1); }
  30% { opacity: 1; transform: scale(1.15); }
  40%, 55% { opacity: 0.4; transform: scale(1); }
  63% { opacity: 1; transform: scale(1.15); }
  73%, 100% { opacity: 0.4; transform: scale(1); }
}
.mods-morph__ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(230,50,50,0.5);
  animation: clipMorph 10s ease-in-out infinite;
}
.mods-morph__ring--1 {
  inset: -6px;
  border-color: rgba(230,50,50,0.4);
  animation-delay: -0.3s;
}
.mods-morph__ring--2 {
  inset: -16px;
  border-color: rgba(230,50,50,0.25);
  animation-delay: -0.7s;
}
.mods-morph__ring--3 {
  inset: -28px;
  border-color: rgba(230,50,50,0.12);
  animation-delay: -1.1s;
}
.mods-morph__shape {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(230,50,50,0.4) 0%, rgba(180,20,20,0.15) 100%);
  box-shadow: inset 0 0 0 3px rgba(230,50,50,0.9);
  animation: clipMorph 10s ease-in-out infinite;
}

/* 12-point polygon — same vertex count in every keyframe.
   Square → Circle → Hexagon (flat-top) → back to square */
@keyframes clipMorph {
  0%, 8% {
    clip-path: polygon(
      12% 12%, 50% 12%, 88% 12%, 88% 12%,
      88% 50%, 88% 88%, 88% 88%,
      50% 88%, 12% 88%, 12% 88%,
      12% 50%, 12% 12%
    );
  }
  33%, 42% {
    clip-path: polygon(
      50% 0%, 75% 7%, 93% 25%, 100% 50%,
      93% 75%, 75% 93%, 50% 100%,
      25% 93%, 7% 75%, 0% 50%,
      7% 25%, 25% 7%
    );
  }
  66%, 75% {
    clip-path: polygon(
      50% 0%, 50% 0%, 93% 25%, 93% 25%,
      93% 75%, 93% 75%, 50% 100%,
      50% 100%, 7% 75%, 7% 75%,
      7% 25%, 7% 25%
    );
  }
  93%, 100% {
    clip-path: polygon(
      12% 12%, 50% 12%, 88% 12%, 88% 12%,
      88% 50%, 88% 88%, 88% 88%,
      50% 88%, 12% 88%, 12% 88%,
      12% 50%, 12% 12%
    );
  }
}

/* ── GAMES: Cube with d20 numbers on faces ──────────────────────────── */
.hero-obj--games { --obj-stroke: rgba(232,169,26,0.4); }
.games-face-num {
  font-family: var(--mg-font-display);
  font-weight: 700;
  font-size: 42px;
  color: #e8a91a;
  opacity: 0.85;
  text-shadow: 0 0 12px rgba(232,169,26,0.4);
}

/* ── ENGINES: Cube with gear on faces, slower spin ──────────────────── */
.hero-obj--engines {
  --obj-stroke: rgba(6,182,212,0.35);
  animation-duration: 12s;
}
.engines-face-icon {
  width: 70px;
  height: 70px;
  color: #06b6d4;
  opacity: 0.8;
  animation: gearCounterSpin 12s linear infinite;
}
@keyframes gearCounterSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

/* ── ABOUT: Tri-colour cube (R/G/B gradient faces) ──────────────────── */
.hero-obj--about { --obj-stroke: transparent; }
.hero-obj--about .hero-obj__face {
  border: none;
  background: transparent;
}
.cube-face-fill {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  opacity: 0.85;
}
.cube-face-fill--red { background: linear-gradient(135deg, #14161c, #d11a1a); border: 2px solid rgba(209,26,26,0.4); }
.cube-face-fill--green { background: linear-gradient(135deg, #14161c, #3a9928); border: 2px solid rgba(58,153,40,0.4); }
.cube-face-fill--blue { background: linear-gradient(135deg, #14161c, #0c4f8d); border: 2px solid rgba(12,79,141,0.4); }

/* ── GAMES: Animated SVG (hex board with pieces) ────────────────────── */
.games-anim-wrap {
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.games-anim-svg {
  width: 260px;
  height: 260px;
}
.games-anim-svg .hex-cell {
  fill: none;
  stroke: #e8a91a;
  stroke-width: 0.8;
  opacity: 0.3;
}
.games-anim-svg .hex-cell--lit {
  fill: rgba(232,169,26,0.08);
  opacity: 0.7;
  animation: hexPulse 4s ease-in-out infinite;
}
.games-anim-svg .hex-cell--lit:nth-child(2) { animation-delay: 0.8s; }
.games-anim-svg .hex-cell--lit:nth-child(3) { animation-delay: 1.6s; }
.games-anim-svg .hex-cell--lit:nth-child(4) { animation-delay: 2.4s; }
@keyframes hexPulse {
  0%, 100% { fill: rgba(232,169,26,0.06); opacity: 0.5; }
  50% { fill: rgba(232,169,26,0.18); opacity: 0.9; }
}
.games-anim-svg .piece {
  fill: #e8a91a;
  opacity: 0;
  animation: pieceDrop 5s ease-out infinite;
}
.games-anim-svg .piece:nth-child(1) { animation-delay: 0s; }
.games-anim-svg .piece:nth-child(2) { animation-delay: 1.2s; }
.games-anim-svg .piece:nth-child(3) { animation-delay: 2.5s; }
@keyframes pieceDrop {
  0% { opacity: 0; transform: translateY(-8px) scale(0.6); }
  12% { opacity: 0.9; transform: translateY(0) scale(1); }
  70% { opacity: 0.9; transform: translateY(0) scale(1); }
  85% { opacity: 0; transform: translateY(3px) scale(0.8); }
  100% { opacity: 0; }
}
.games-anim-svg .move-path {
  stroke: #e8a91a;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  fill: none;
  opacity: 0.6;
  animation: moveDraw 5s ease-in-out infinite;
  animation-delay: 1.5s;
}
@keyframes moveDraw {
  0%, 10% { stroke-dashoffset: 30; opacity: 0; }
  20% { opacity: 0.6; }
  50% { stroke-dashoffset: 0; opacity: 0.6; }
  70% { opacity: 0; stroke-dashoffset: 0; }
  100% { opacity: 0; stroke-dashoffset: 0; }
}
.games-anim-svg .board-group {
  animation: boardFloat 7s ease-in-out infinite;
}
@keyframes boardFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(1deg); }
}

/* ── NEWS: Animated SVG (not a cube) ────────────────────────────────── */
.news-anim-wrap {
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-anim-svg {
  width: 240px;
  height: 240px;
}
.news-anim-svg .doc-body {
  fill: none;
  stroke: #e11d89;
  stroke-width: 1.2;
  opacity: 0.7;
}
.news-anim-svg .doc-fold {
  fill: rgba(225,29,137,0.15);
  stroke: #e11d89;
  stroke-width: 1.2;
}
.news-anim-svg .doc-line {
  stroke: #e11d89;
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0;
  animation: newsLineIn 3s ease-out infinite;
}
.news-anim-svg .doc-line:nth-child(1) { animation-delay: 0s; }
.news-anim-svg .doc-line:nth-child(2) { animation-delay: 0.3s; }
.news-anim-svg .doc-line:nth-child(3) { animation-delay: 0.6s; }
.news-anim-svg .doc-line:nth-child(4) { animation-delay: 0.9s; }
.news-anim-svg .doc-line:nth-child(5) { animation-delay: 1.2s; }
.news-anim-svg .doc-headline {
  stroke: #e11d89;
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0;
  animation: newsLineIn 3s ease-out infinite;
  animation-delay: 0s;
}
@keyframes newsLineIn {
  0% { opacity: 0; stroke-dashoffset: 40; }
  15% { opacity: 0.8; stroke-dashoffset: 0; }
  70% { opacity: 0.8; }
  100% { opacity: 0; }
}
.news-anim-svg .doc-cursor {
  fill: #e11d89;
  opacity: 0;
  animation: newsCursorBlink 1s step-end infinite;
}
@keyframes newsCursorBlink {
  0%, 50% { opacity: 0.9; }
  51%, 100% { opacity: 0; }
}
.news-anim-svg .doc-float {
  animation: newsFloat 6s ease-in-out infinite;
}
@keyframes newsFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(1.5deg); }
}

/* ── Shared perspective container ───────────────────────────────────── */
.hero-obj-wrap {
  perspective: 600px;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Developers SVG ────────────────────────────────────────────────── */
.dev-anim-wrap {
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dev-anim-svg {
  width: 240px;
  height: 240px;
}
.dev-anim-svg .doc-body {
  fill: none;
  stroke: #8b5cf6;
  stroke-width: 1.2;
  opacity: 0.7;
}
.dev-anim-svg .doc-line {
  stroke: #8b5cf6;
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0;
  animation: newsLineIn 3s ease-out infinite;
}
.dev-anim-svg .doc-line:nth-child(2) { animation-delay: 0.2s; }
.dev-anim-svg .doc-line:nth-child(3) { animation-delay: 0.4s; }
.dev-anim-svg .doc-line:nth-child(4) { animation-delay: 0.6s; }
.dev-anim-svg .doc-line:nth-child(5) { animation-delay: 0.8s; }
.dev-anim-svg .dev-bracket {
  fill: #8b5cf6;
  font-family: var(--mg-font-mono);
  font-weight: 700;
  opacity: 0.9;
}
.dev-anim-svg .doc-cursor {
  fill: #8b5cf6;
  animation: newsCursorBlink 1s step-end infinite;
}
.dev-anim-svg .doc-float {
  animation: newsFloat 6s ease-in-out infinite;
}

/* ── Reduced motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-obj { animation: none; transform: rotateX(15deg) rotateY(-25deg); }
  .gear-svg { animation: none; }
}

/* developers.css */
/* Developers page */

/* ── Landing grid ── */
.dev-landing__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.dev-dest-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--mg-hairline-light);
  border-radius: 12px;
  padding: 32px 28px;
  text-decoration: none;
  color: var(--mg-ink);
  transition: border-color 0.2s, transform 0.2s;
}
.dev-dest-card:hover {
  transform: translateY(-3px);
  text-decoration: none;
}
.dev-dest-card--blue:hover { border-color: var(--mg-blue); }
.dev-dest-card--green:hover { border-color: var(--mg-green); }
.dev-dest-card--red:hover { border-color: var(--mg-red); }
.dev-dest-card--amber:hover { border-color: #e8a91a; }
.dev-dest-card__stat {
  font-family: var(--mg-font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.dev-dest-card--blue .dev-dest-card__stat { color: var(--mg-blue); }
.dev-dest-card--green .dev-dest-card__stat { color: var(--mg-green); }
.dev-dest-card--red .dev-dest-card__stat { color: var(--mg-red); }
.dev-dest-card--amber .dev-dest-card__stat { color: #e8a91a; }
.dev-dest-card__title {
  font-family: var(--mg-font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--mg-ink);
}
.dev-dest-card__body {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--mg-ink);
  opacity: 0.7;
  flex: 1;
}
.dev-dest-card__arrow {
  margin-top: 16px;
  font-size: 1.2rem;
  font-weight: 700;
  opacity: 0.3;
  transition: opacity 0.2s;
}
.dev-dest-card:hover .dev-dest-card__arrow { opacity: 1; }
.dev-dest-card--blue:hover .dev-dest-card__arrow { color: var(--mg-blue); }
.dev-dest-card--green:hover .dev-dest-card__arrow { color: var(--mg-green); }
.dev-dest-card--red:hover .dev-dest-card__arrow { color: var(--mg-red); }

/* ── CTA callout card ── */
.dev-cta-card {
  text-align: center;
  background: #000;
  color: #fff;
  border-radius: 20px;
  padding: 56px 40px;
  margin-top: 56px;
}
.dev-cta-card__heading {
  font-family: var(--mg-font-display);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: #fff;
  margin: 0 0 20px;
}
.dev-cta-card__body {
  font-family: var(--mg-font-body);
  font-size: 17px;
  line-height: 1.65;
  color: rgba(255,255,255,0.78);
  max-width: 560px;
  margin: 0 auto 36px;
  text-wrap: balance;
}
.dev-cta-card__btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .dev-cta-card { padding: 40px 24px; border-radius: 16px; }
}

/* ── Connect section (light) ── */
.dev-connect {
  padding: 100px 32px 80px;
  background: var(--mg-canvas-light);
}
.dev-connect .mg-container {
  max-width: 1060px;
}
.dev-connect__heading {
  font-family: var(--mg-font-display);
  font-size: 2rem;
  font-weight: 700;
  margin: 12px 0 32px;
  color: var(--mg-ink);
}
.dev-connect__block {
  position: relative;
  background: #1a1a2e;
  border-left: 3px solid #8b5cf6;
  border-radius: 0 12px 12px 0;
  padding: 20px 70px 20px 24px;
  margin-bottom: 20px;
  overflow-x: auto;
}
.dev-connect__block pre {
  margin: 0;
  font-family: var(--mg-font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: #e0e0e0;
}
.dev-connect__block code {
  white-space: pre-wrap;
  word-break: break-all;
}
.dev-connect__copy {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  background: #8b5cf6;
  color: #fff;
  border: none;
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}
.dev-connect__block:hover .dev-connect__copy {
  opacity: 1;
}
.dev-connect__alt {
  color: var(--mg-ink);
  opacity: 0.7;
  font-size: 0.875rem;
  margin-bottom: 12px;
}
.dev-connect__alt code {
  background: #e6e3d8;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--mg-font-mono);
  font-size: 0.8rem;
}

/* ── Tools grid (dark) ── */
.dev-tools {
  padding: 100px 0;
  background: #0a0d2a;
  position: relative;
  overflow: hidden;
}
.dev-tools::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../img/hex-grid-purple.svg');
  background-size: 56px 64px;
  opacity: 0.03;
  pointer-events: none;
}
.dev-tools .mg-container { position: relative; }
.dev-tools__heading {
  font-family: var(--mg-font-display);
  font-size: 2rem;
  font-weight: 700;
  margin: 12px 0 40px;
  color: #fff;
}
.dev-tools__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.dev-tool-card {
  background: #0f1235;
  border: 1px solid #1a3680;
  border-left: 3px solid #1a3680;
  border-radius: 0 10px 10px 0;
  padding: 18px 20px;
  transition: border-color 0.2s, transform 0.2s;
}
.dev-tool-card:hover {
  border-color: #8b5cf6;
  border-left-color: #8b5cf6;
  transform: translateY(-2px);
}
.dev-tool-card__name {
  font-family: var(--mg-font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: #8b5cf6;
  margin-bottom: 8px;
}
.dev-tool-card__name.green {
  color: var(--mg-green);
}
.dev-tool-card__name.red {
  color: var(--mg-red);
}
.dev-tool-card__desc {
  font-size: 0.84rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.65);
  margin-bottom: 10px;
}
.dev-tool-card__example {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  font-style: italic;
}
.dev-tools__cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 40px;
}


/* ── Build ideas (dark default, light variant) ── */
.dev-build {
  padding: 100px 0;
  background: #0a0d2a;
  position: relative;
  overflow: hidden;
}
.dev-build::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../img/hex-grid-purple.svg');
  background-size: 56px 64px;
  opacity: 0.03;
  pointer-events: none;
}
.dev-build .mg-container { position: relative; }
.dev-build--light {
  background: var(--mg-canvas-light);
}
.dev-build--light::before { display: none; }
.dev-build--light .dev-build__heading { color: var(--mg-ink); }
.dev-build--light .dev-build-card {
  background: #fff;
  border-color: var(--mg-hairline-light);
}
.dev-build--light .dev-build-card:hover { border-color: #8b5cf6; }
.dev-build--light .dev-build-card__icon { background: rgba(139,92,246,0.06); }
.dev-build--light .dev-build-card__title { color: var(--mg-ink); }
.dev-build--light .dev-build-card__body { color: var(--mg-ink); opacity: 0.7; }
.dev-build--light .dev-build-card__tools { color: #8b5cf6; }
.dev-build__heading {
  font-family: var(--mg-font-display);
  font-size: 2rem;
  font-weight: 700;
  margin: 12px 0 40px;
  color: #fff;
}
.dev-build__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.dev-build-card {
  background: #0f1235;
  border: 1px solid #1a3680;
  border-radius: 12px;
  padding: 28px 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.dev-build-card:hover {
  border-color: rgba(139,92,246,0.4);
  transform: translateY(-2px);
}
.dev-build-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(139,92,246,0.08);
  border-radius: 12px;
  margin-bottom: 16px;
}
.dev-build-card__title {
  font-family: var(--mg-font-display);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}
.dev-build-card__body {
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.6);
  margin-bottom: 14px;
}
.dev-build-card__tools {
  font-family: var(--mg-font-mono);
  font-size: 0.68rem;
  color: #8b5cf6;
  opacity: 0.7;
}


/* ── Mobile ── */
@media (max-width: 768px) {
  .dev-landing__grid {
    grid-template-columns: 1fr;
  }
  .dev-dest-card {
    text-align: center;
  }
  .dev-connect,
  .dev-tools,
  .dev-build {
    padding: 56px 0;
  }
  .dev-connect__heading,
  .dev-tools__heading,
  .dev-build__heading {
    font-size: 1.5rem;
    text-align: center;
  }
  .dev-tools__grid,
  .dev-build__grid {
    grid-template-columns: 1fr;
  }
  .dev-connect__copy {
    opacity: 1;
  }
  .dev-build-card {
    text-align: center;
  }
  .dev-build-card__icon {
    margin-left: auto;
    margin-right: auto;
  }
  .dev-connect__block code {
    word-break: break-all;
  }
}

/* ── Live integrations section ── */
.dev-live {
  padding: 100px 32px 80px;
  background: var(--mg-canvas-light);
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--mg-hairline-light);
}
.dev-live .mg-container {
  position: relative;
}
.dev-live__header {
  margin-bottom: 48px;
}
.dev-live__heading {
  font-family: var(--mg-font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--mg-ink);
  margin: 12px 0 16px;
  letter-spacing: -0.02em;
}
.dev-live__lede {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--mg-ink);
  opacity: 0.6;
  max-width: 520px;
}
.dev-live__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* ── Live card ── */
.dev-live-card {
  background: #0f1235;
  border: 1px solid rgba(139,92,246,0.15);
  border-radius: 16px;
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.2s;
  transition-delay: var(--delay, 0ms);
}
.dev-live-card.dev-revealed {
  opacity: 1;
  transform: translateY(0);
}
.dev-live-card:hover {
  border-color: rgba(139,92,246,0.4);
}
.dev-live-card--blue:hover { border-color: rgba(12,79,141,0.6); }
.dev-live-card--green:hover { border-color: rgba(58,153,40,0.6); }
.dev-live-card--red:hover { border-color: rgba(209,26,26,0.5); }
.dev-live-card--purple:hover { border-color: rgba(139,92,246,0.5); }

.dev-live-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dev-live-card__status {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dev-live-card__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3a9928;
  animation: devPulse 2.5s ease-in-out infinite;
}
@keyframes devPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.dev-live-card__status-text {
  font-family: var(--mg-font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: #3a9928;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dev-live-card__subtitle {
  font-family: var(--mg-font-mono);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
}
.dev-live-card__title {
  font-family: var(--mg-font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
}
.dev-live-card__desc {
  font-size: 0.84rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.55);
  margin: 0;
}
.dev-live-card__stats {
  display: flex;
  gap: 24px;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: auto;
}
.dev-live-card__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dev-live-card__stat-value {
  font-family: var(--mg-font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}
.dev-live-card--blue .dev-live-card__stat-value { color: #6fb5ff; }
.dev-live-card--green .dev-live-card__stat-value { color: #6ddb5a; }
.dev-live-card--red .dev-live-card__stat-value { color: #ff6b6b; }
.dev-live-card--purple .dev-live-card__stat-value { color: #b794f6; }
.dev-live-card__stat-label {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.dev-live-card__links {
  display: flex;
  gap: 16px;
}
.dev-live-card__link {
  font-family: var(--mg-font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
.dev-live-card__link:hover { color: #fff; text-decoration: none; }
.dev-live-card--blue .dev-live-card__link:hover { color: #6fb5ff; }
.dev-live-card--green .dev-live-card__link:hover { color: #6ddb5a; }
.dev-live-card--red .dev-live-card__link:hover { color: #ff6b6b; }
.dev-live-card--purple .dev-live-card__link:hover { color: #b794f6; }
.dev-live-card__link-arrow {
  font-size: 0.9rem;
  transition: transform 0.2s;
}
.dev-live-card__link:hover .dev-live-card__link-arrow {
  transform: translateX(2px);
}

/* ── Build section enhancements ── */
.dev-build__lede {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--mg-ink);
  opacity: 0.6;
  margin: -28px 0 40px;
  max-width: 480px;
}
.dev-build__grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.dev-build-card {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.2s;
  transition-delay: var(--delay, 0ms);
  padding: 22px 20px;
}
.dev-build-card.dev-revealed {
  opacity: 1;
  transform: translateY(0);
}
.dev-build--light .dev-build-card--blue:hover { border-color: var(--mg-blue); }
.dev-build--light .dev-build-card--green:hover { border-color: var(--mg-green); }
.dev-build--light .dev-build-card--red:hover { border-color: var(--mg-red); }
.dev-build--light .dev-build-card--blue .dev-build-card__tools { color: var(--mg-blue); }
.dev-build--light .dev-build-card--green .dev-build-card__tools { color: var(--mg-green); }
.dev-build--light .dev-build-card--red .dev-build-card__tools { color: var(--mg-red); }
.dev-build-card__title {
  font-size: 0.92rem;
  margin-bottom: 6px;
}
.dev-build-card__body {
  font-size: 0.8rem;
  line-height: 1.5;
  margin-bottom: 12px;
}
.dev-build-card__tools {
  font-size: 0.65rem;
  line-height: 1.4;
}

/* ── CTA connect block variant ── */
.dev-connect__block--cta {
  max-width: 680px;
  margin: 0 auto 28px;
  text-align: left;
}

/* ── Mobile: examples page ── */
@media (max-width: 1024px) {
  .dev-live__grid {
    grid-template-columns: 1fr;
  }
  .dev-build__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .dev-live {
    padding: 56px 20px;
  }
  .dev-build {
    padding-left: 20px;
    padding-right: 20px;
  }
  .dev-live__heading {
    text-align: center;
  }
  .dev-live__lede {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
  .dev-live-card {
    padding: 24px 20px;
    text-align: center;
  }
  .dev-live-card__header {
    justify-content: center;
    gap: 12px;
  }
  .dev-live-card__subtitle {
    display: none;
  }
  .dev-live-card__stats {
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
  }
  .dev-live-card__links {
    flex-wrap: wrap;
    justify-content: center;
  }
  .dev-build__grid {
    grid-template-columns: 1fr;
  }
  .dev-build__lede {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
  .dev-build-card {
    text-align: center;
  }
  .dev-connect__block--cta {
    padding-right: 24px;
  }
  .dev-connect__block--cta .dev-connect__copy {
    position: static;
    transform: none;
    margin-top: 12px;
    opacity: 1;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   API Explorer
   ═══════════════════════════════════════════════════════════════════════════ */

.api-explorer {
  background: #f5f4ef;
  padding: 48px 32px 64px;
}
.api-explorer__chrome {
  max-width: 1060px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  background: #1a1d2e;
  border: 1px solid rgba(0,0,0,0.15);
}
.api-explorer__notice {
  font-family: var(--mg-font-mono);
  font-size: 11px;
  color: #f59e0b;
  background: rgba(245,158,11,0.08);
  padding: 8px 16px;
  border-bottom: 1px solid rgba(245,158,11,0.15);
  text-align: center;
}
.api-explorer__tab-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #2a2d3a;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.api-explorer__dots {
  display: flex;
  gap: 7px;
  margin-right: 8px;
}
.api-explorer__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.api-explorer__dot--red { background: #ec6a5e; }
.api-explorer__dot--yellow { background: #f4bf4f; }
.api-explorer__dot--green { background: #61c554; }
.api-explorer__tab {
  font-family: var(--mg-font-mono);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  padding: 4px 12px;
  border-radius: 5px;
  background: rgba(255,255,255,0.08);
}
.api-explorer__tab--active {
  background: rgba(139,92,246,0.2);
  color: #c4b5fd;
}
.api-explorer__endpoint {
  font-family: var(--mg-font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  margin-left: auto;
}
.api-explorer__body {
  display: grid;
  grid-template-columns: 200px 1fr 280px;
  min-height: 520px;
}

/* ── Sidebar ── */
.api-explorer__sidebar {
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 600px;
}
.api-explorer__sidebar-loading {
  font-family: var(--mg-font-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  padding: 20px 16px;
}
.api-sidebar__group {
  margin-bottom: 0;
  flex: none;
}
.api-sidebar__group:has(.api-sidebar__list:not(.api-sidebar__list--collapsed)) {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.api-sidebar__ns {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.75);
  font-family: var(--mg-font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
  transition: color 0.15s;
}
.api-sidebar__ns:hover { color: #fff; }
.api-sidebar__ns-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.api-sidebar__ns-count {
  margin-left: auto;
  font-size: 10px;
  opacity: 0.5;
}
.api-sidebar__ns--collapsed + .api-sidebar__list,
.api-sidebar__list--collapsed {
  display: none;
}
.api-sidebar__list {
  padding: 2px 0 6px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.api-sidebar__tool {
  display: block;
  width: 100%;
  padding: 5px 16px 5px 34px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.65);
  font-family: var(--mg-font-mono);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.12s;
  border-left: 2px solid transparent;
}
.api-sidebar__tool:hover {
  color: #fff;
  background: rgba(139,92,246,0.06);
}
.api-sidebar__tool--active {
  color: #8b5cf6;
  background: rgba(139,92,246,0.08);
  border-left-color: #8b5cf6;
}

/* ── Args panel (right) ── */
.api-explorer__args {
  border-left: 1px solid rgba(255,255,255,0.06);
  padding: 16px;
  overflow-y: auto;
  max-height: 600px;
}
.api-explorer__args:empty {
  display: none;
}
.api-explorer__args-title {
  font-family: var(--mg-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(139,92,246,0.7);
  margin-bottom: 12px;
}

/* ── Main panel (center) ── */
.api-explorer__main {
  padding: 24px 28px;
  overflow-y: auto;
  max-height: 600px;
}
.api-explorer__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 300px;
  text-align: center;
  color: rgba(255,255,255,0.25);
}
.api-explorer__empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}
.api-explorer__empty p {
  font-family: var(--mg-font-body);
  font-size: 14px;
  max-width: 320px;
  line-height: 1.6;
}

/* ── Detail panel ── */
.api-detail__header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.api-detail__badge {
  display: inline-block;
  font-family: var(--mg-font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fff;
  padding: 3px 10px;
  border-radius: 9999px;
  margin-bottom: 10px;
}
.api-detail__name {
  font-family: var(--mg-font-mono);
  font-size: 20px;
  font-weight: 700;
  color: #f5f4ef;
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}
.api-detail__desc {
  font-family: var(--mg-font-body);
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin: 0;
  line-height: 1.5;
}

.api-detail__section {
  margin-bottom: 20px;
}
.api-detail__section-label {
  font-family: var(--mg-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(139,92,246,0.7);
  margin-bottom: 10px;
}

/* ── Form fields ── */
.api-detail__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.api-detail__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 8px;
}
.api-detail__field-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.api-detail__field-label {
  font-family: var(--mg-font-mono);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}
.api-detail__required {
  font-size: 10px;
  font-weight: 400;
  color: #f87171;
  margin-left: 4px;
}
.api-detail__type-badge {
  font-family: var(--mg-font-mono);
  font-size: 10px;
  font-weight: 600;
  color: rgba(139,92,246,0.8);
  background: rgba(139,92,246,0.1);
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: auto;
}
.api-detail__field-desc {
  font-family: var(--mg-font-body);
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  line-height: 1.45;
}
.api-detail__no-args {
  font-family: var(--mg-font-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  font-style: italic;
}
.api-detail__input,
.api-detail__select {
  height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  font-family: var(--mg-font-mono);
  font-size: 13px;
  color: #f5f4ef;
  outline: none;
  transition: border-color 0.15s;
}
.api-detail__input:focus,
.api-detail__select:focus {
  border-color: rgba(139,92,246,0.5);
}
.api-detail__input::placeholder {
  color: rgba(255,255,255,0.2);
}
.api-detail__select {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.api-detail__checkbox {
  width: 18px;
  height: 18px;
  accent-color: #8b5cf6;
  cursor: pointer;
}

/* ── Run button ── */
.api-detail__actions {
  margin-bottom: 20px;
}
.api-detail__run {
  font-family: var(--mg-font-mono);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 28px;
  border-radius: 6px;
  border: none;
  background: #8b5cf6;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.3px;
}
.api-detail__run:hover {
  background: #7c3aed;
  transform: translateY(-1px);
}
.api-detail__run:active {
  transform: translateY(0);
}

/* ── Code blocks ── */
.api-detail__code {
  font-family: var(--mg-font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 14px 16px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
}
.api-detail__code--response {
  max-height: 300px;
  overflow-y: auto;
}
.api-detail__code--success {
  border-color: rgba(34,197,94,0.2);
}
.api-detail__code--error {
  border-color: rgba(239,68,68,0.3);
  color: rgba(239,68,68,0.8);
}

/* ── Explorer intro ── */
.api-explorer-intro {
  background: #f5f4ef;
  padding: 56px 32px 32px;
  text-align: center;
}
.api-explorer-intro .mg-container {
  max-width: 1060px;
}
.api-explorer-intro__heading {
  font-family: var(--mg-font-display);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--mg-ink);
  margin: 0 0 12px;
  letter-spacing: -0.3px;
}
.api-explorer-intro__lede {
  font-family: var(--mg-font-body);
  font-size: 16px;
  color: var(--mg-mute);
  margin: 0 auto;
  max-width: 520px;
  line-height: 1.55;
}

/* ── Quick links ── */
.dev-links {
  background: #f5f4ef;
  padding: 48px 32px 72px;
}
.dev-links__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 1060px;
  margin: 0 auto;
}
.dev-links__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 22px;
  background: #fff;
  border: 1px solid var(--mg-hairline-light);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
  border-top: 3px solid #8b5cf6;
}
.dev-links__item:hover {
  border-color: #8b5cf6;
  border-top-color: #8b5cf6;
  transform: translateY(-2px);
}
.dev-links__label {
  font-family: var(--mg-font-body);
  font-weight: 700;
  font-size: 15px;
  color: var(--mg-ink);
}
.dev-links__url {
  font-family: var(--mg-font-mono);
  font-size: 12px;
  color: #8b5cf6;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .api-explorer { padding: 0 16px 48px; }
  .api-explorer__body { grid-template-columns: 1fr; }
  .api-explorer__sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    max-height: 200px;
  }
  .api-explorer__args {
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.06);
    max-height: none;
  }
  .api-explorer__main { max-height: none; }
  .dev-links__grid { grid-template-columns: repeat(2, 1fr); }
}

/* cards.css */
/* ── Mod card (JS-generated) ─────────────────────────────────────────── */
.mod-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--mg-hairline-light);
  display: flex;
  flex-direction: column;
  transition: border-color 180ms cubic-bezier(.2,.8,.2,1), transform 250ms cubic-bezier(.2,.8,.2,1), box-shadow 250ms ease;
  cursor: pointer;
}

.mg-section--white .mod-card { background: var(--mg-canvas-light); }
.mod-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.mod-card__accent {
  height: 4px;
}

.mod-card__inner {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.mod-card__thumb {
  width: 100%;
  aspect-ratio: 1.6;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.mod-card__thumb-hex {
  position: absolute;
  inset: 0;
  background-size: 28px 32px;
}

.mod-card__thumb-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: auto;
  max-width: none;
  z-index: 1;
}

.mod-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mod-card__category {
  font-family: var(--mg-font-body);
  font-weight: 600;
  font-size: 11px;
  color: #fff;
  padding: 4px 10px;
  border-radius: 9999px;
  letter-spacing: 0.2px;
}

.mod-card__base-game {
  font-family: var(--mg-font-mono);
  font-size: 11px;
  color: var(--mg-stone);
}

.mod-card__title {
  font-family: var(--mg-font-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.25px;
  color: var(--mg-ink);
  margin: 0;
}

.mod-card__body {
  font-family: var(--mg-font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--mg-mute);
  margin: 0;
  flex: 1;
}

.mod-card__stats {
  font-family: var(--mg-font-mono);
  font-size: 12px;
  color: var(--mg-mute);
  padding-top: 12px;
  border-top: 1px solid var(--mg-hairline-light);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mod-card__source {
  font-size: 11px;
  color: var(--mg-stone);
}

.mod-card__link {
  font-family: var(--mg-font-body);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ── Page hero (JS-generated) ───────────────────────────────────────── */
.page-hero {
  position: relative;
  background: #000;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.page-hero__bg {
  position: absolute;
  inset: 0;
}

.page-hero__hex-land {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  mix-blend-mode: screen;
}

.page-hero__hex-layer {
  position: absolute;
  inset: 0;
  background-size: 56px 64px;
  opacity: 0.6;
}

.page-hero__fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,10,30,0.5) 0%, transparent 60%);
  pointer-events: none;
}

.page-hero__fade-bottom {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, #000 100%);
  pointer-events: none;
}

.page-hero__glow {
  position: absolute;
  right: -150px;
  top: 30%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(58,123,232,0.22) 0%, transparent 65%);
  pointer-events: none;
}

.page-hero__content {
  position: relative;
  z-index: 2;
  padding: 72px 32px 96px;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  text-align: center;
}

.page-hero__eyebrow {
  font-family: var(--mg-font-pixel);
  font-size: 10px;
  letter-spacing: 1.5px;
  margin-bottom: 18px;
}

.page-hero__title {
  font-family: var(--mg-font-display);
  font-weight: 600;
  font-size: clamp(48px, 6.5vw, 88px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
}

.page-hero__lede {
  font-family: var(--mg-font-body);
  font-style: italic;
  font-size: 20px;
  line-height: 1.5;
  color: rgba(255,255,255,0.82);
  margin: 0 auto;
  max-width: 680px;
}

/* ── Icon cards (informational, no link) ── */
.icon-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}
.icon-card {
  background: #fff;
  border: 1px solid var(--mg-hairline-light);
  border-left: 3px solid var(--mg-hairline-light);
  border-radius: 0 12px 12px 0;
  padding: 24px 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.icon-card:hover {
  transform: translateY(-3px);
}
.icon-card--blue { border-left-color: var(--mg-blue); }
.icon-card--green { border-left-color: var(--mg-green); }
.icon-card--red { border-left-color: var(--mg-red); }
.icon-card--amber { border-left-color: #e8a91a; }
.icon-card--purple { border-left-color: #8b5cf6; }
.icon-card--cyan { border-left-color: #06b6d4; }
.icon-card--blue:hover { border-color: var(--mg-blue); border-left-color: var(--mg-blue); }
.icon-card--green:hover { border-color: var(--mg-green); border-left-color: var(--mg-green); }
.icon-card--red:hover { border-color: var(--mg-red); border-left-color: var(--mg-red); }
.icon-card--amber:hover { border-color: #e8a91a; border-left-color: #e8a91a; }
.icon-card--purple:hover { border-color: #8b5cf6; border-left-color: #8b5cf6; }
.icon-card--cyan:hover { border-color: #06b6d4; border-left-color: #06b6d4; }
.icon-card__stat {
  font-family: var(--mg-font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--mg-blue);
  margin-bottom: 10px;
}
.icon-card__title {
  font-family: var(--mg-font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--mg-ink);
  margin: 0 0 8px;
}
.icon-card__body {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--mg-ink);
  opacity: 0.7;
  margin: 0;
}
@media (max-width: 768px) {
  .icon-cards {
    grid-template-columns: 1fr;
  }
  .icon-card {
    text-align: center;
  }
}

/* community.css */
body { background: #f5f4ef; }
.community-section { padding: 72px 32px 96px; }
.community-section__inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 72px; }
.community-main .community-cta { margin-top: 72px; }

/* Stats row */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 56px; }
.stat-card { background: #fff; border: 1px solid var(--mg-hairline-light); border-radius: 16px; padding: 28px 20px; text-align: center; border-top: 3px solid var(--mg-hairline-light); }
.stat-card:nth-child(1) { border-top-color: var(--mg-blue); }
.stat-card:nth-child(2) { border-top-color: var(--mg-green); }
.stat-card:nth-child(3) { border-top-color: var(--mg-red); }
.stat-card:nth-child(4) { border-top-color: var(--mg-cosmic-glow); }
.stat-card__number { font-family: var(--mg-font-display); font-weight: 600; font-size: 40px; line-height: 1; color: var(--mg-ink); letter-spacing: -1px; }
.stat-card__label { font-family: var(--mg-font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; margin-top: 8px; }
.stat-card__label--1 { color: var(--mg-blue); }
.stat-card__label--2 { color: var(--mg-green); }
.stat-card__label--3 { color: var(--mg-red); }
.stat-card__label--4 { color: var(--mg-cosmic-glow); }

/* Channel cards — 2-column grid */
.channels-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.channel-card { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; background: #fff; border: 1px solid var(--mg-hairline-light); border-radius: 14px; border-left: 4px solid var(--mg-hairline-light); transition: border-color 150ms; }
.channel-card--boardgames { border-left-color: var(--mg-green); }
.channel-card--community { border-left-color: var(--mg-blue); }
.channel-card--events { border-left-color: var(--mg-red); }
.channel-card:hover { border-color: var(--mg-blue); border-left-color: var(--mg-blue); }
.channel-card__icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-family: var(--mg-font-mono); font-size: 16px; font-weight: 700; color: #fff; flex-shrink: 0; }
.channel-card__icon--boardgames { background: var(--mg-green); }
.channel-card__icon--community { background: var(--mg-blue); }
.channel-card__icon--events { background: var(--mg-red); }
.channel-card__text { flex: 1; min-width: 0; }
.channel-card__name { font-family: var(--mg-font-mono); font-weight: 600; font-size: 14px; color: var(--mg-ink); }
.channel-card__desc { font-family: var(--mg-font-body); font-size: 13px; color: var(--mg-mute); margin-top: 3px; line-height: 1.4; }
.channel-card__category { font-family: var(--mg-font-mono); font-size: 10px; color: var(--mg-stone); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 6px; }

/* Featured resources — video/link cards */
.featured-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.featured-card { background: #fff; border: 1px solid var(--mg-hairline-light); border-radius: 14px; overflow: hidden; transition: border-color 150ms; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.featured-card:hover { border-color: var(--mg-blue); }
.featured-card__thumb { width: 100%; aspect-ratio: 16/9; background: var(--mg-cosmic-deep); display: flex; align-items: center; justify-content: center; position: relative; cursor: pointer; }
.featured-card__play { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.9); display: flex; align-items: center; justify-content: center; }
.featured-card__play::after { content: ''; width: 0; height: 0; border-style: solid; border-width: 8px 0 8px 14px; border-color: transparent transparent transparent var(--mg-ink); margin-left: 3px; }
.featured-card__body { padding: 14px 16px; }
.featured-card__source { font-family: var(--mg-font-mono); font-size: 11px; color: var(--mg-stone); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.featured-card__title { font-family: var(--mg-font-display); font-weight: 600; font-size: 15px; line-height: 1.3; color: var(--mg-ink); }
.featured-card__user { font-family: var(--mg-font-mono); font-size: 11px; color: var(--mg-mute); margin-top: 6px; }

/* Activity feed — 2-col chat bubbles */
.activity-feed { margin-top: 24px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.activity-item { display: flex; gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid var(--mg-hairline-light); border-radius: 12px; transition: border-color 150ms; }
.activity-item:hover { border-color: var(--mg-blue); }
.activity-item__avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.activity-item__content { flex: 1; min-width: 0; }
.activity-item__header { display: flex; align-items: baseline; gap: 6px; margin-bottom: 3px; }
.activity-item__user { font-family: var(--mg-font-display); font-weight: 600; font-size: 13px; color: var(--mg-ink); }
.activity-item__channel { font-family: var(--mg-font-mono); font-size: 10px; color: var(--mg-blue); background: rgba(12,79,141,0.08); padding: 1px 5px; border-radius: 3px; }
.activity-item__date { font-family: var(--mg-font-mono); font-size: 10px; color: var(--mg-stone); margin-left: auto; }
.activity-item__body { font-family: var(--mg-font-body); font-size: 13px; color: var(--mg-body-color); line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Members grid — 4 columns, large cards */
.members-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.member-card { display: flex; flex-direction: column; align-items: center; padding: 28px 20px; background: #fff; border: 1px solid var(--mg-hairline-light); border-radius: 16px; text-align: center; transition: border-color 150ms; }
.member-card:hover { border-color: var(--mg-blue); }
.member-card__avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-bottom: 16px; }
.member-card__info { width: 100%; }
.member-card__name { font-family: var(--mg-font-display); font-weight: 600; font-size: 18px; color: var(--mg-ink); }
.member-card__meta { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 6px; flex-wrap: wrap; }
.member-card__role { font-family: var(--mg-font-mono); font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }
.member-card__role--management { color: #e74c3c; background: rgba(231,76,60,0.08); }
.member-card__role--member { color: var(--mg-stone); background: rgba(99,107,120,0.08); }
.member-card__stat { font-family: var(--mg-font-mono); font-size: 11px; color: var(--mg-mute); }
.member-card__msg { font-family: var(--mg-font-body); font-size: 13px; font-style: italic; color: var(--mg-mute); margin-top: 12px; line-height: 1.45; }

/* Mod Jams */
.jams-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.jam-card { background: #fff; border: 1px solid var(--mg-hairline-light); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; border-top: 3px solid var(--mg-hairline-light); transition: border-color 150ms; }
.jam-card:hover { border-color: var(--mg-blue); }
.jam-card--complete { opacity: 1; }
.jam-card--upcoming { border-top-style: dashed; border-top-color: var(--mg-cosmic-glow); }
.jam-card__number { font-family: var(--mg-font-pixel); font-size: 9px; letter-spacing: 1px; margin-bottom: 10px; }
.jam-card__title { font-family: var(--mg-font-display); font-weight: 600; font-size: 22px; line-height: 1.2; color: var(--mg-ink); margin: 0 0 8px; }
.jam-card__meta { font-family: var(--mg-font-mono); font-size: 11px; color: var(--mg-stone); margin-bottom: 12px; }
.jam-card__result { font-family: var(--mg-font-body); font-size: 13px; color: var(--mg-body-color); line-height: 1.45; margin-top: auto; }
.jam-card__result a { color: var(--mg-blue); text-decoration: underline; text-decoration-color: rgba(12,79,141,0.3); text-underline-offset: 2px; }
.jam-card__result a:hover { text-decoration-color: var(--mg-blue); }
.jam-card__upcoming-msg { font-family: var(--mg-font-body); font-size: 13px; font-style: italic; color: var(--mg-mute); margin-top: auto; }

/* The House section */
.house-intro { font-family: var(--mg-font-body); font-size: 16px; line-height: 1.6; color: var(--mg-body-color); margin-top: 12px; }
.house-intro code { font-family: var(--mg-font-mono); font-size: 14px; background: rgba(12,79,141,0.06); padding: 2px 6px; border-radius: 4px; }
.house-commands { margin-top: 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.house-commands__group { background: #fff; border: 1px solid var(--mg-hairline-light); border-radius: 14px; padding: 20px 22px; border-top: 3px solid var(--mg-cosmic-glow); }
.house-commands__group--chess { border-top-color: var(--mg-blue); }
.house-commands__group--hex { border-top-color: var(--mg-green); }
.house-commands__group--ti4 { border-top-color: var(--mg-blue); }
.house-commands__group--jam { border-top-color: var(--mg-red); }
.house-commands__group--rules { border-top-color: var(--mg-red); }
.house-commands__group--game { border-top-color: var(--mg-green); }
.house-commands__heading { font-family: var(--mg-font-display); font-weight: 600; font-size: 15px; color: var(--mg-ink); margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--mg-hairline-light); }
.house-cmd { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 7px 0; }
.house-cmd code { font-family: var(--mg-font-mono); font-size: 12px; font-weight: 600; color: var(--mg-blue); white-space: nowrap; }
.house-cmd span { font-family: var(--mg-font-body); font-size: 13px; color: var(--mg-mute); }
.house-footer-note { font-family: var(--mg-font-body); font-size: 13px; color: var(--mg-mute); margin-top: 24px; }
.house-footer-note a { color: var(--mg-blue); text-decoration: underline; text-decoration-color: rgba(12,79,141,0.3); text-underline-offset: 2px; }
.house-footer-note a:hover { text-decoration-color: var(--mg-blue); }

@media (max-width: 900px) {
  .house-commands { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .house-commands { grid-template-columns: 1fr; }
}

/* CTA band */
.community-cta { background: #000; color: #fff; border-radius: 20px; padding: 56px 40px; text-align: center; position: relative; overflow: hidden; }
.community-cta__hex { position: absolute; inset: 0; background-image: url('../img/hex-grid-blue.svg'); background-size: 56px 64px; animation: hexFloat 30s linear infinite; opacity: 0.5; }
.community-cta__inner { position: relative; }
.community-cta__heading { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(32px, 4vw, 48px); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 16px; }
.community-cta__body { font-family: var(--mg-font-body); font-size: 17px; line-height: 1.6; color: rgba(255,255,255,0.78); max-width: 600px; margin: 0 auto 28px; text-wrap: balance; }
.community-cta__btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 900px) {
  .channels-grid { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: 1fr 1fr; }
  .activity-feed { grid-template-columns: 1fr; }
  .members-grid { grid-template-columns: repeat(2, 1fr); }
  .jams-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .community-section { padding: 48px 20px 64px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-grid { grid-template-columns: 1fr; }
  .community-cta { padding: 36px 24px; }
  .jam-card { text-align: center; }
  .jam-card__number { text-align: center; }
  .channel-card { text-align: center; flex-direction: column; align-items: center; }
  .member-card { text-align: center; }
}
