/* ==========================================================================
   VONIX WIKI — visual successor
   Layout anatomy follows the Minecraft Guides public site (header / hero /
   search / chips / category strip / featured magazine / dense guide pages)
   with original Vonix branding, copy, and local-only assets.
   ========================================================================== */

@font-face {
  font-family: "Vonix Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/wiki/assets/fonts/inter-400.woff2") format("woff2");
}

@font-face {
  font-family: "Vonix Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/wiki/assets/fonts/inter-700.woff2") format("woff2");
}

@font-face {
  font-family: "Vonix Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/wiki/assets/fonts/jetbrains-mono-400.woff2") format("woff2");
}

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg-canvas: #151921;
  --bg-deep: #111520;
  --bg-surface: #1a1f2e;
  --bg-elevated: #232a3b;
  --bg-inset: #0d0f14;
  --bg-header-from: #1a2030;
  --bg-header-to: #10131f;
  --bg-scrim: rgba(7, 9, 13, 0.72);

  --border: #2d3748;
  --border-ink: #07090d;
  --text-primary: #ffffff;
  --text-secondary: #dde3ee;
  --text-muted: #9ca3af;
  --text-link: #5ee08a;

  --accent: #12a148;
  --accent-hover: #1ed45f;
  --accent-ink: #ffffff;
  --accent-deep: #0c632f;
  --accent-soft: rgba(18, 161, 72, 0.16);

  --cyan: #7cc4ff;
  --amber: #ff9d4a;
  --violet: #8a5de8;
  --teal: #4dc4bf;

  --font-sans: "Vonix Sans", "Noto Sans JP", "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-display: "Vonix Sans", ui-monospace, "Cascadia Code", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Vonix Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --shadow-drop: 0 6px #000, 0 16px 32px rgba(0, 0, 0, 0.35);
  --shadow-tile: inset 0 0 0 2px #2d3748, 0 5px 0 #000;
  --bevel: inset 0 2px rgba(255, 255, 255, 0.18);

  --header-h: 70px;
  --container-max: 1200px;
  --measure: 72ch;
  --sidebar-w: 268px;
  --toc-w: 220px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg-canvas: #e8edf4;
  --bg-deep: #d5dce8;
  --bg-surface: #f4f7fb;
  --bg-elevated: #ffffff;
  --bg-inset: #e4eaf3;
  --bg-header-from: #2a3348;
  --bg-header-to: #161b28;
  --bg-scrim: rgba(15, 23, 42, 0.48);
  --border: #c5d0e0;
  --border-ink: #1a2030;
  --text-primary: #101724;
  --text-secondary: #3e4c63;
  --text-muted: #58667d;
  --text-link: #047857;
  --accent: #0c632f;
  --accent-hover: #12a148;
  --accent-ink: #ffffff;
  --accent-deep: #06401e;
  --accent-soft: rgba(12, 99, 47, 0.12);
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-canvas);
  overflow-x: hidden;
}

a {
  color: var(--text-link);
  text-decoration: none;
}

a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 2px;
}

button, input, select { font: inherit; color: inherit; }

code, pre, kbd, .mono { font-family: var(--font-mono); }

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

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.skip-link:focus { top: 12px; text-decoration: none; }

/* ---------- Header (70px gradient bar, logo + pixel-nav + search) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: var(--header-h);
  background: linear-gradient(180deg, var(--bg-header-from) 0%, var(--bg-header-to) 100%);
  box-shadow: 0 2px #2d3748, 0 9px 22px rgba(0, 0, 0, 0.55);
}

.header-inner {
  width: 100%;
  max-width: 1440px;
  min-height: var(--header-h);
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: #fff;
  text-decoration: none;
}

.brand:hover { text-decoration: none; color: #fff; }

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: var(--accent-deep);
  border: 3px solid #000;
  box-shadow: var(--bevel), 0 3px #000;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.04em;
  text-shadow: 1px 1px 0 #000;
}

.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #000;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 7px;
  color: #aab6c9;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-shadow: 1px 1px 0 #000;
  position: relative;
  white-space: nowrap;
}

.nav-link:hover { color: #e8eefb; text-decoration: none; }
.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 4px;
  height: 3px;
  background: rgba(30, 212, 95, 0.55);
}

.nav-ico {
  width: 18px;
  height: 18px;
  display: inline-block;
  border-radius: 2px;
  image-rendering: pixelated;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.nav-ico--packs { background: linear-gradient(135deg, #12a148, #1ed45f); }
.nav-ico--guides { background: linear-gradient(135deg, #378f8b, #4dc4bf); }
.nav-ico--mods { background: linear-gradient(135deg, #e37221, #ff9d4a); }
.nav-ico--start { background: linear-gradient(135deg, #643ebb, #8a5de8); }
.nav-ico--rules { background: linear-gradient(135deg, #2d3748, #6b778c); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 12px;
  min-width: 240px;
  background: #1a1f2e;
  border: 2px solid rgba(0, 0, 0, 0.55);
  border-radius: 7px;
  box-shadow: inset 0 0 0 2px #2d3748, 0 3px rgba(0, 0, 0, 0.4);
  color: #6b778c;
  cursor: pointer;
}

.search-trigger svg { width: 17px; height: 17px; flex-shrink: 0; }
.search-trigger-text { font-size: 0.875rem; }
.search-trigger:hover { color: #dde3ee; }

.theme-toggle,
.nav-toggle,
.mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 12px;
  background: #12a148;
  border: 2px solid #0c632f;
  border-radius: 6px;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 1px 1px 0 #000;
  box-shadow: var(--bevel), 0 3px #0c632f;
  cursor: pointer;
}

.theme-toggle:hover,
.nav-toggle:hover,
.mobile-menu-btn:hover { filter: brightness(1.1); }

.mobile-menu-btn,
.nav-toggle { display: none; }

.mobile-nav-panel {
  display: none;
  padding: 8px 16px 14px;
  background: var(--bg-header-to);
  border-top: 1px solid #2d3748;
}

.mobile-nav-panel .main-nav {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
}

@media (max-width: 980px) {
  .main-nav { display: none; }
  .header-inner .main-nav { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .mobile-nav-panel:not([hidden]) { display: block; }
  .search-trigger { min-width: 0; width: 38px; padding: 0; justify-content: center; }
  .search-trigger-text { display: none; }
}

@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }
  body.is-home .nav-toggle { display: none; }
}

/* ---------- Home hero ---------- */
.home-hero {
  position: relative;
  isolation: isolate;
  padding: 72px 24px 88px;
  text-align: center;
  background:
    radial-gradient(ellipse 62% 58% at 50% 46%, rgba(8, 14, 30, 0.5), rgba(8, 14, 30, 0) 100%),
    linear-gradient(180deg, rgba(10, 18, 36, 0.35) 0%, rgba(17, 21, 32, 0.55) 70%, #111520 100%),
    repeating-linear-gradient(90deg, rgba(46, 84, 48, 0.28) 0 16px, rgba(28, 42, 30, 0.18) 16px 32px),
    repeating-linear-gradient(0deg, rgba(70, 110, 72, 0.22) 0 12px, rgba(22, 36, 28, 0.35) 12px 24px),
    #111520;
  box-shadow: inset 0 0 0 2000px rgba(10, 18, 36, 0.26), inset 0 -90px 70px -30px #111520;
  border-bottom: 3px solid #07090d;
  overflow: hidden;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(17, 21, 32, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 21, 32, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.35;
  pointer-events: none;
}

.home-hero-inner {
  max-width: 980px;
  margin: 0 auto;
}

.home-hero-title {
  margin: 0 auto 16px;
  max-width: 980px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 3px 3px 0 #000;
  text-wrap: balance;
}

.home-hero-sub {
  margin: 0 auto 22px;
  max-width: 720px;
  color: #dde3ee;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  font-size: 17px;
  line-height: 1.55;
}

.hero-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 780px;
  margin: 0 auto 18px;
  background: #1a1f2e;
  border: 3px solid rgba(0, 0, 0, 0.55);
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px #2d3748, 0 4px rgba(0, 0, 0, 0.4), 0 10px 24px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.hero-search:focus-within {
  box-shadow: inset 0 0 0 2px #12a148, 0 4px rgba(0, 0, 0, 0.4), 0 0 0 4px rgba(18, 161, 72, 0.25), 0 10px 24px rgba(0, 0, 0, 0.25);
}

.hero-search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  flex-shrink: 0;
  color: #6b778c;
}

.hero-search-icon svg { width: 20px; height: 20px; }

.hero-search-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: #fff;
  font-size: 17px;
  padding: 18px 16px;
}

.hero-search-input::placeholder { color: #6b778c; }

.hero-search-btn {
  align-self: stretch;
  border: 0;
  border-left: 2px solid #0c632f;
  background: #12a148;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  text-shadow: 1px 1px 0 #000;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 14px;
  padding: 0 24px;
  cursor: pointer;
  box-shadow: inset 0 2px rgba(255, 255, 255, 0.2);
}

.hero-search-btn:hover { filter: brightness(1.1); }
.hero-search-btn:active { filter: brightness(0.95); }

.hero-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  background: #1a1f2e;
  border: 3px solid #000;
  border-radius: 8px;
  box-shadow: var(--shadow-tile);
  max-height: 360px;
  overflow-y: auto;
  text-align: left;
}

.hero-search-results[hidden] { display: none; }

.home-chips {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: #dde3ee;
  font-size: 13px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.home-chips-label { margin-right: 4px; }

.home-chips a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 6px;
  background: #232a3b;
  border: 2px solid #07090d;
  box-shadow: inset 0 2px #2f3850, 0 3px #07090d;
  color: #e6eaf2 !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background-color 0.12s ease, transform 0.12s ease;
}

.home-chips a:hover {
  background: #2f3850;
  transform: translateY(-2px);
}

/* ---------- Category strip ---------- */
.home-strip {
  position: relative;
  z-index: 3;
  margin: -42px auto 28px;
  width: calc(100% - 48px);
  max-width: var(--container-max);
}

.home-strip-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #1a1f2e;
  border: 3px solid #000;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 2px #2d3748, 0 6px #000, 0 16px 32px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.home-strip-col {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 16px;
  row-gap: 4px;
  padding: 18px 20px;
  --strip-accent: #1ed45f;
  --strip-tint: #0c632f;
}

.home-strip-col + .home-strip-col { border-left: 2px solid #2d3748; }
.home-strip-col--guides { --strip-accent: #4dc4bf; --strip-tint: #1f5f5c; }
.home-strip-col--mods { --strip-accent: #ff9d4a; --strip-tint: #8a430b; }

.strip-icon {
  grid-row: 1 / span 2;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--strip-tint);
  border: 3px solid #000;
  border-radius: 4px;
  box-shadow: var(--bevel), 0 3px #000;
}

.strip-icon .nav-ico { width: 42px; height: 42px; box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45); }

.strip-title {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  color: #fff;
  text-shadow: 3px 3px 0 #000;
  text-transform: uppercase;
}

.strip-title a { color: #fff; }
.strip-title a:hover { color: var(--strip-accent); text-decoration: none; }

.strip-tag {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  color: #9ca3af;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.strip-links {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.strip-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  color: #e6eaf2;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.strip-links a::after {
  content: "→";
  color: var(--strip-accent);
  font-weight: 700;
}

.strip-links a:hover { color: #fff; }

/* ---------- Featured drop (lead + tiles) ---------- */
.home-drop {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto 8px;
  padding: 8px 24px 28px;
}

.home-drop-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.6fr);
  gap: 16px;
}

.drop-lead,
.drop-tile,
.feat-lead,
.feat-tile,
.pack-dest {
  position: relative;
  overflow: hidden;
  display: flex;
  color: #fff !important;
  background: #111520;
  border: 3px solid #000;
  border-radius: 8px;
  box-shadow: var(--shadow-tile);
  text-decoration: none !important;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.drop-lead:hover,
.drop-tile:hover,
.feat-lead:hover,
.feat-tile:hover,
.pack-dest:hover {
  transform: translateY(-3px);
}

.drop-lead {
  min-height: 360px;
  align-items: flex-end;
  box-shadow: inset 0 0 0 2px #2d4a6b, 0 5px 0 #000;
}

.drop-art,
.feat-lead-art,
.feat-tile-art,
.pack-dest-mark {
  display: block;
  background-size: 24px 24px;
}

.card-icon {
  display: block;
  width: 84px;
  height: 84px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: 6px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.55);
}

.drop-lead .card-icon {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 1;
}

.drop-tile-art .card-icon,
.feat-tile-art .card-icon,
.pack-dest-mark .card-icon {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  opacity: 0.92;
}


.drop-lead .drop-art {
  position: absolute;
  inset: 0;
}

.drop-lead::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(9, 11, 17, 0.96) 0%, rgba(9, 11, 17, 0.65) 45%, rgba(9, 11, 17, 0) 75%);
}

.drop-lead-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 22px;
}

.drop-kicker {
  align-self: flex-start;
  padding: 2px 9px;
  background: #12a148;
  border: 2px solid #000;
  border-radius: 4px;
  font: 700 11px/1.4 var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.drop-title,
.feat-lead-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.05;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 #000;
}

.drop-status { color: #8cc8ff; font: 400 12px/1.3 var(--font-mono); }
.drop-tagline { color: #d6dcea; font-size: 14.5px; line-height: 1.55; }
.drop-cta { color: #5ee08a; font: 700 13px/1 var(--font-mono); margin-top: 4px; }

.drop-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 12px;
}

.drop-tile { flex-direction: column; }

.drop-tile-art {
  display: block;
  aspect-ratio: 16 / 9;
  border-bottom: 3px solid #000;
}

.drop-tile-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px 12px;
}

.drop-hub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9ca3af;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.drop-name { font-weight: 700; font-size: 15px; line-height: 1.25; }
.drop-facts { color: #9ca3af; font-size: 12px; }

.drop-art--ice {
  background:
    radial-gradient(circle at 30% 30%, rgba(124, 196, 255, 0.35), transparent 55%),
    repeating-linear-gradient(135deg, #1a3048 0 12px, #0e1a28 12px 24px);
}
.drop-art--ember {
  background:
    radial-gradient(circle at 70% 20%, rgba(255, 157, 74, 0.4), transparent 50%),
    repeating-linear-gradient(45deg, #3a1c10 0 12px, #1a0c08 12px 24px);
}
.drop-art--stone {
  background:
    radial-gradient(circle at 40% 70%, rgba(148, 163, 184, 0.28), transparent 55%),
    repeating-linear-gradient(90deg, #2a303c 0 14px, #161920 14px 28px);
}
.drop-art--myth {
  background:
    radial-gradient(circle at 60% 40%, rgba(138, 93, 232, 0.4), transparent 55%),
    repeating-linear-gradient(120deg, #241436 0 12px, #12091c 12px 24px);
}
.drop-art--grove {
  background:
    radial-gradient(circle at 50% 30%, rgba(30, 212, 95, 0.28), transparent 55%),
    repeating-linear-gradient(0deg, #16301c 0 12px, #0b180f 12px 24px);
}

/* ---------- Featured magazine band ---------- */
.home-band { padding: 36px 24px 48px; }

.home-band--slate {
  background:
    repeating-linear-gradient(90deg, #151921 0 24px, transparent 24px 48px) top / 100% 12px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 24px, #151921 24px 48px) bottom / 100% 12px no-repeat,
    #1e2535;
}

.home-band--grass {
  background:
    repeating-linear-gradient(90deg, #4f8f2e 0 20px, #151921 20px 34px, #4f8f2e 34px 48px, #151921 48px 64px) top / 100% 14px no-repeat,
    linear-gradient(#4f8f2e, #4f8f2e) 0 14px / 100% 10px no-repeat,
    linear-gradient(#2f5f1c, #2f5f1c) 0 24px / 100% 4px no-repeat,
    #13240f;
}

.home-band-inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

.feat-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.feat-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 #000;
}

.feat-intro { margin: 6px 0 0; color: #c3cbda; font-size: 15px; }

.feat-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a5b4fc;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.feat-all:hover { color: #c7d2fe; }

.feat-mag {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 20px;
}

.feat-lead { min-height: 440px; align-items: flex-end; }

.feat-lead-art,
.feat-tile-art {
  position: absolute;
  inset: 0;
}

.feat-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 20px 22px 22px;
  background: rgba(8, 10, 15, 0.88);
  border-top: 3px solid #000;
}

.feat-panel--small { gap: 6px; padding: 10px 12px 12px; }

.feat-badges { display: flex; gap: 6px; }

.feat-lead-title {
  font-size: 28px;
  line-height: 1.15;
}

.feat-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 560px;
  color: #c3cbda;
  font-size: 16px;
  line-height: 1.45;
}

.feat-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.feat-tile { min-height: 210px; align-items: flex-end; }

.feat-tile-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #000;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px 2px;
  border: 2px solid rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  background: #2d3748;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-shadow: 1px 1px 0 #000;
  white-space: nowrap;
}

.badge--accent,
.badge--kind { background: #12a148; border-color: #000; }
.badge--pick { background: #2d3748; }
.badge--cyan { background: #174542; }
.badge--amber { background: #8a430b; }

.pack-dest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.pack-dest {
  min-height: 148px;
  align-items: stretch;
}

.pack-dest-mark {
  flex: 0 0 88px;
  border-right: 3px solid #000;
}

.pack-dest-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  min-width: 0;
}

.pack-dest-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #000;
}

.pack-dest-summary {
  color: #c3cbda;
  font-size: 0.84rem;
  line-height: 1.4;
}

.pack-dest-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #9ca3af;
}

.pack-dest-foot span:last-child { color: #5ee08a; font-weight: 700; }

/* ---------- Guide shell ---------- */
.wiki-shell {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 20px 24px 56px;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  flex: 1;
}

.wiki-shell--with-toc {
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
}

.wiki-shell--solo {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1080px;
}

.wiki-shell--solo.wiki-shell--with-toc {
  grid-template-columns: minmax(0, 1fr) var(--toc-w);
}

.article-body {
  min-width: 0;
  padding: 8px 0 40px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--accent-hover); }

.article-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.article-head { margin-bottom: 18px; }

.article-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.article-icon {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  object-fit: cover;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  image-rendering: auto;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
}

@media (max-width: 560px) {
  .article-icon { width: 48px; height: 48px; flex-basis: 48px; }
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.12;
  margin: 0 0 12px;
  text-shadow: 2px 2px 0 #000;
}

.lead {
  font-size: 1.03125rem;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: var(--measure);
  margin: 0 0 16px;
}

.prose {
  font-size: 0.96875rem;
  line-height: 1.68;
}

.prose > p,
.prose > ul,
.prose > ol,
.prose > dl { max-width: var(--measure); }

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 36px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.prose h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 22px 0 8px;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 7px; }

.prose code {
  font-size: 0.85em;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.prose pre {
  max-width: var(--measure);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-inset);
  border: 1px solid var(--border);
  overflow-x: auto;
  font-size: 0.84375rem;
  line-height: 1.5;
  margin: 14px 0 18px;
}

.prose pre code { padding: 0; border: 0; background: transparent; }

.prose blockquote,
.prose .callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 18px 0;
}

.prose .callout > p:last-child,
.prose .callout > ul:last-child { margin-bottom: 0; }

.prose .callout--tip { border-left-color: var(--teal); }
.prose .callout--warning,
.prose .callout--danger { border-left-color: var(--amber); }
.prose .callout--info { border-left-color: var(--cyan); }

.prose .wiki-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 16px 0 22px;
}

.prose .wiki-cards ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: contents;
}

.prose .wiki-cards li {
  margin: 0;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 3px solid #000;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-tile);
}

.prose .wiki-cards a { font-weight: 700; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 12px 0 22px;
}

.prose th,
.prose td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--bg-elevated);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.prose tbody tr:hover { background: var(--bg-elevated); }

.hub-sections { margin-top: 28px; }
.hub-sections h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-shadow: 2px 2px 0 #000;
}

.hub-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hub-group {
  background: var(--bg-surface);
  border: 3px solid #000;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-tile);
  padding: 16px 18px;
}

.hub-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
  font-family: var(--font-display);
  text-transform: uppercase;
}

.hub-group-list { margin: 0; padding-left: 18px; }
.hub-group-more { color: var(--text-muted); font-size: 0.84rem; list-style: none; margin-left: -18px; }

.related-pages {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  max-width: var(--measure);
}

.related-pages h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 10px;
  text-shadow: 1px 1px 0 #000;
}

.related-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.related-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.related-kind {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.index-note { color: var(--text-secondary); max-width: var(--measure); }
.index-list { display: flex; flex-direction: column; gap: 4px; }
.index-pack-head {
  margin: 22px 0 6px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-shadow: 1px 1px 0 #000;
}
.index-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  border: 1px solid transparent;
}
.index-row:hover {
  background: var(--bg-elevated);
  border-color: var(--border);
  text-decoration: none;
}
.index-row-title { font-weight: 700; min-width: 0; }
.index-row-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  flex-shrink: 0;
}

.sidebar-filter { display: block; margin: 8px 0 10px; }
.sidebar-filter input {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}
.nav-group.is-filtered-out,
.nav-sublink.is-filtered-out { display: none; }

/* ---------- Sidebar ---------- */
.pack-sidebar {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  padding: 18px 16px 18px 0;
  overflow: hidden;
}

body.is-guide {
  overflow-x: hidden;
}

.pack-sidebar-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.pack-title-link {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pack-title-link:hover { color: var(--accent-hover); text-decoration: none; }

.pack-sidebar-meta,
.sidebar-filter-status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 4px 12px 0;
  scrollbar-width: thin;
}

.nav-group { margin-bottom: 6px; }

.nav-group-summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 700;
  user-select: none;
}

.nav-group-summary::-webkit-details-marker { display: none; }
.nav-group-summary:hover { background: var(--bg-elevated); }

.nav-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.nav-group[open] > .nav-group-summary .nav-chevron { transform: rotate(90deg); }

.nav-group-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  background: var(--bg-inset);
  border: 1px solid var(--border);
}

.nav-group-list {
  list-style: none;
  margin: 2px 0 6px 14px;
  padding: 0 0 0 10px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-sublink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.nav-sublink:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  text-decoration: none;
}

.nav-sublink.is-hub { font-weight: 700; color: var(--text-primary); }

.nav-sublink[aria-current="page"],
.nav-sublink.is-active {
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-weight: 700;
}

.nav-subtag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--text-muted);
  flex-shrink: 0;
}

.pack-nav-other { margin-top: 16px; }
.pack-nav-other-head {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
}
.pack-nav-other ul { list-style: none; margin: 0; padding: 0; }
.pack-nav-other a { color: var(--text-secondary); font-size: 0.84rem; }

.page-toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding-left: 16px;
  border-left: 1px solid var(--border);
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
}

.page-toc-title {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.page-toc-list { list-style: none; margin: 0; padding: 0; }
.page-toc-list a {
  display: block;
  padding: 4px 8px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.page-toc-list a:hover { color: var(--text-primary); text-decoration: none; }
.toc-l3 a { padding-left: 16px; font-size: 0.78rem; }

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: var(--bg-scrim);
  display: none;
}

.drawer-backdrop.is-open { display: block; }

/* ---------- Search dialog ---------- */
.cmd-dialog {
  width: min(640px, calc(100vw - 24px));
  padding: 0;
  border: 3px solid #000;
  border-radius: var(--radius-md);
  background: #1a1f2e;
  color: #fff;
  box-shadow: var(--shadow-drop);
}

.cmd-dialog::backdrop {
  background: var(--bg-scrim);
}

.cmd-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  margin: 0;
}

.cmd-input {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 0.96875rem;
  color: #fff;
  outline: none;
}

.cmd-close {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
}

.cmd-results { max-height: 380px; overflow-y: auto; padding: 8px; }

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: #fff;
  border: 1px solid transparent;
}

.cmd-item:hover,
.cmd-item.is-selected {
  background: var(--bg-elevated);
  border-color: var(--accent);
  text-decoration: none;
}

.cmd-item-title { font-weight: 700; font-size: 0.875rem; }
.cmd-item-sub { font-size: 0.78125rem; color: var(--text-muted); }

.cmd-foot {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.71875rem;
  color: var(--text-muted);
  margin: 0;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
  padding: 22px 24px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .wiki-shell--with-toc { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .page-toc { display: none; }
}

@media (max-width: 1024px) {
  .wiki-shell,
  .wiki-shell--with-toc,
  .wiki-shell--solo {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: 16px;
    gap: 0;
  }
  .pack-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    width: min(320px, 88vw);
    z-index: 120;
    background: var(--bg-surface);
    padding: 16px;
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-drop);
    transform: translateX(-110%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.2s ease, visibility 0.2s ease;
  }
  .pack-sidebar.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }
}

@media (max-width: 980px) {
  .home-strip-inner { grid-template-columns: 1fr; }
  .home-strip-col + .home-strip-col { border-left: 0; border-top: 2px solid #2d3748; }
  .home-drop-inner { grid-template-columns: 1fr; }
  .drop-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat-mag { grid-template-columns: 1fr; }
  .feat-lead { min-height: 280px; }
  .pack-dest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-group-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .home-hero { padding: 40px 16px 64px; }
  .home-hero-title { font-size: 26px; line-height: 1.2; text-shadow: 2px 2px 0 #000; }
  .home-hero-sub { font-size: 15px; }
  .hero-search-input { font-size: 15px; padding: 15px 12px; }
  .hero-search-btn { padding: 0 16px; }
  .home-chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .home-chips::-webkit-scrollbar { display: none; }
  .home-chips a { flex-shrink: 0; }
  .home-strip { width: calc(100% - 24px); margin-top: -28px; }
  .drop-tiles,
  .feat-tiles,
  .pack-dest-grid { grid-template-columns: 1fr; }
  .header-inner { padding: 0 10px; gap: 6px; }
  .header-actions { gap: 6px; flex-shrink: 0; }
  .brand-word { font-size: 0.78rem; letter-spacing: 0.04em; }
  .brand-mark { width: 30px; height: 30px; font-size: 1rem; }
  .theme-toggle,
  .nav-toggle,
  .mobile-menu-btn { height: 32px; padding: 0 8px; font-size: 0.62rem; }
  .search-trigger { width: 32px; height: 32px; }
  .prose table { display: block; overflow-x: auto; }
  .pack-sidebar { width: min(300px, 86vw); }
}

@media (max-width: 390px) {
  html, body { overflow-x: hidden; max-width: 100%; }
  .home-hero-title { font-size: 22px; }
  .strip-title { font-size: 22px; }
  .wiki-shell { padding-inline: 12px; }
}
