/* _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; }
}

/* article.css */
/* news-post.css — shared styles for all news article pages */

/* Per-article accent custom properties — blue is the default theme */
:root {
  --post-bloom: radial-gradient(ellipse, rgba(12,79,141,0.4) 0%, transparent 65%);
  --post-cat-bg: #0c4f8d;
  --post-title-em: #6fb5ff;
  --post-avatar-gradient: linear-gradient(135deg, #0c4f8d, #3a9928);
  --post-toc-active: #0c4f8d;
  --post-mod-eyebrow: #6fb5ff;
}

body[data-theme="red"] {
  --post-bloom: radial-gradient(ellipse, rgba(209,26,26,0.4) 0%, transparent 65%);
  --post-cat-bg: #d11a1a;
  --post-title-em: #e63232;
  --post-avatar-gradient: linear-gradient(135deg, #d11a1a, #0c4f8d);
  --post-toc-active: #d11a1a;
  --post-mod-eyebrow: #e63232;
}

body[data-theme="green"] {
  --post-bloom: radial-gradient(ellipse, rgba(58,153,40,0.4) 0%, transparent 65%);
  --post-cat-bg: #3a9928;
  --post-title-em: #5abf47;
  --post-avatar-gradient: linear-gradient(135deg, #3a9928, #0c4f8d);
  --post-toc-active: #3a9928;
  --post-mod-eyebrow: #5abf47;
}

body { background: #f5f4ef; }

/* Post header */
.post-header { position: relative; color: #fff; overflow: hidden; background: #000; min-height: 680px; display: flex; align-items: center; justify-content: center; }
.post-header__wash { position: absolute; inset: 0; background: #f5f4ef; opacity: 0; z-index: 3; pointer-events: none; }
.post-header__img { position: absolute; inset: -5% 0; width: 100%; height: 110%; object-fit: cover; object-position: center center; opacity: 0.5; pointer-events: none; transform: scale(1.05); transform-origin: center center; will-change: transform, opacity; }
.post-header__inner { transition: transform 0.1s linear, opacity 0.1s linear; will-change: transform, opacity; }
.post-header__bloom { position: absolute; left: 50%; bottom: -200px; transform: translateX(-50%); width: 1100px; height: 500px; background: var(--post-bloom); pointer-events: none; filter: blur(20px); }
.post-header__inner { position: relative; z-index: 4; padding: 48px 32px 72px; max-width: 875px; width: 100%; text-align: center; box-sizing: border-box; }
.post-header__back { font-family: var(--mg-font-mono); font-size: 12px; color: rgba(255,255,255,0.7); text-decoration: none; }
.post-header__tags { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.post-header__cat { font-family: var(--mg-font-body); font-weight: 600; font-size: 11px; background: var(--post-cat-bg); color: #fff; padding: 4px 10px; border-radius: 9999px; }
.post-header__meta { 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.18); border-radius: 9999px; }
.post-header__title { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(48px, 7vw, 96px); line-height: 0.95; letter-spacing: -0.025em; margin: 24px 0; text-shadow: 0 4px 30px rgba(0,0,0,0.6); text-wrap: balance; }
.post-header__title em { color: var(--post-title-em); }
.post-header__lede { font-family: var(--mg-font-body); font-style: italic; font-size: 18px; color: rgba(255,255,255,0.78); margin: 0; }

/* Post body section */
.post-body { background: #f5f4ef; padding: 72px 32px 96px; }
.post-layout { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 170px 1fr 220px; gap: 56px; align-items: start; }
.post-rail { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; }
.post-rail__eyebrow { font-family: var(--mg-font-pixel); font-size: 9px; color: #0c4f8d; letter-spacing: 1.5px; margin-bottom: 14px; }
.post-rail__eyebrow--green { color: #3a9928; margin-top: 32px; margin-bottom: 12px; }

/* Author card with breakout photo */
.post-author-card { background: #fff; border: 1px solid #e6e3d8; border-radius: 16px; overflow: visible; margin-bottom: 28px; padding-bottom: 16px; margin-top: 80px; }
.post-author-card__avatar { display: block; position: relative; width: 100%; height: 80px; border-radius: 16px 16px 0 0; overflow: visible; }
.post-author-card__avatar::after { content: ""; position: absolute; bottom: 4px; left: 10%; right: 10%; height: 8px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.08) 40%, transparent 70%); z-index: 2; }
.post-author-card__img { position: absolute; z-index: 1; bottom: calc(-200px * 0.35 + 4px); left: 50%; transform: translateX(-50%); width: 160px; max-width: none; height: auto; clip-path: inset(0 0 35% 0); }
.post-author-card__info { position: relative; z-index: 3; text-align: center; padding: 16px 12px 0; }
.post-author-card__name { font-family: var(--mg-font-display); font-weight: 600; font-size: 14px; color: #14161c; letter-spacing: -0.2px; }
.post-author-card__role { font-family: var(--mg-font-mono); font-size: 10px; color: #636b78; margin-top: 4px; }
.post-author-card__link { display: block; font-family: var(--mg-font-body); font-size: 12px; font-weight: 600; color: #0c4f8d; text-decoration: none; text-align: center; margin-top: 10px; padding: 0 12px; }
.post-author-card__link:hover { text-decoration: underline; }

.post-share-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.post-share-btn { display: inline-flex; align-items: center; justify-content: center; font-family: var(--mg-font-mono); font-size: 11px; font-weight: 600; width: 38px; height: 38px; border-radius: 9999px; background: #fff; color: #14161c; border: 1px solid #e6e3d8; cursor: pointer; text-decoration: none; transition: border-color 150ms; }
.post-share-btn:hover { border-color: #14161c; }

/* TOC */
.post-toc { list-style: none; padding: 0; margin: 0 0 32px; display: flex; flex-direction: column; gap: 8px; border-left: 1px solid #e6e3d8; }
.post-toc__item { padding-left: 14px; margin-left: -1px; }
.post-toc__item--active { border-left: 2px solid var(--post-toc-active); }
.post-toc__link { font-family: var(--mg-font-body); font-size: 13px; text-decoration: none; }
.post-toc__link--active { color: #14161c; font-weight: 600; }
.post-toc__link--inactive { color: #4f5764; font-weight: 400; }

/* Mod card in sidebar */
.post-mod-card { background: #000; color: #fff; padding: 20px; border-radius: 16px; margin-top: 28px; margin-bottom: 32px; overflow: hidden; }
.post-mod-card__eyebrow { font-family: var(--mg-font-pixel); font-size: 9px; color: var(--post-mod-eyebrow); letter-spacing: 1.5px; margin-bottom: 10px; }
.post-mod-card__title { font-family: var(--mg-font-display); font-weight: 600; font-size: 18px; line-height: 1.2; margin-bottom: 6px; }
.post-mod-card__version { font-family: var(--mg-font-mono); font-size: 11px; color: rgba(255,255,255,0.6); margin-bottom: 14px; }
.post-mod-card__dl { height: 38px; font-size: 13px; width: 100%; }

/* More posts section */
.post-more { background: #fff; border-top: 1px solid #e6e3d8; padding: 80px 32px; }
.post-more__inner { max-width: 1200px; margin: 0 auto; }
.post-more__heading { font-family: var(--mg-font-display); font-weight: 600; font-size: 40px; line-height: 1.1; letter-spacing: -0.5px; color: #14161c; margin: 0 0 32px; }
.post-more__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-more-card { display: flex; flex-direction: column; gap: 14px; padding: 20px; background: #f5f4ef; border-radius: 16px; text-decoration: none; color: inherit; }
.post-more-card__cover { aspect-ratio: 3/2; border-radius: 12px; overflow: hidden; position: relative; }
.post-more-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-more-card__meta { font-family: var(--mg-font-mono); font-size: 11px; color: #636b78; letter-spacing: 0.3px; }
.post-more-card__title { font-family: var(--mg-font-display); font-weight: 600; font-size: 20px; line-height: 1.2; letter-spacing: -0.2px; color: #14161c; margin: 0; }

/* Compact figure — centred, constrained width */
.figure-compact { margin: 24px auto; text-align: center; }
.figure-compact img { max-width: 280px; display: block; margin: 0 auto; border-radius: 8px; }

/* Video embeds */
.video-embed { margin: 32px 0; }
.video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 12px; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* Mobile author + share (hidden on desktop, shown ≤900px) */
.post-mobile-author { display: none; }

@media (max-width: 900px) {
  .post-layout { grid-template-columns: 1fr !important; }
  .post-rail { display: none !important; }
  .post-more__heading { text-align: center; }
  .post-more__grid { grid-template-columns: 1fr; }

  .post-mobile-author { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 1px solid #e6e3d8; border-radius: 12px; padding: 12px 16px; margin: 24px 0; }
  .post-mobile-author__row { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
  .post-mobile-author__avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0; position: relative; }
  .post-mobile-author__img { width: 100%; height: 100%; object-fit: cover; }
  .post-mobile-author__info { display: flex; flex-direction: column; min-width: 0; }
  .post-mobile-author__name { font-family: var(--mg-font-display); font-weight: 600; font-size: 14px; color: #14161c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .post-mobile-author__role { font-family: var(--mg-font-mono); font-size: 10px; color: #636b78; }
  .post-mobile-author__share { display: flex; gap: 6px; flex-shrink: 0; }
}

/* Topic tags in sidebar */
.post-rail__topics { margin-top: 28px; }
.post-rail__tags { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.post-rail__tag { display: flex; align-items: center; padding: 6px 12px; background: #fff; border: 1px solid #e6e3d8; border-radius: 8px; font-family: var(--mg-font-body); font-size: 13px; color: #14161c; text-decoration: none; transition: border-color 150ms; }
.post-rail__tag:hover { border-color: #14161c; }

/* 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;
  }
}
