/* ===============================
   Section 1 — Theme tokens
   =============================== */
:root {
  --bg: #0d0f0e;
  --surface: #151918;
  --surface2: #1c2220;
  --border: #2a3330;
  --text: #e8ede9;
  --muted: #88978f;
  --green: #4ade80;
  --link: #6eb0f0;
  --grid-col: rgba(255,255,255,0.03);
  --accent-colour: #4ade80;
  --accent-base: #59db8d;
  --accent-fabric: #b47cf8;
  --accent-forge: #556c89;
  --accent-neoforge: #e68c37;
}
[data-theme="light"] {
  --bg: #f4f7f5;
  --surface: #ffffff;
  --surface2: #edf2ef;
  --border: #d3ddd7;
  --text: #1a2420;
  --muted: #627870;
  --green: #4ade80;
  --link: #0066cc;
  --grid-col: rgba(0,0,0,0.04);
  --accent-base: #59db8d;
  --accent-fabric: #b47cf8;
  --accent-forge: #556c89;
  --accent-neoforge: #e68c37;
}

/* ===============================
   Section 2 — Reset and base
   =============================== */
* { box-sizing: border-box; }
html {
  background: var(--bg);
  color: var(--text);
}
body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  margin: 0;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  margin: 0 0 0.5em;
}
code, pre, .meta {
  font-family: 'Space Mono', monospace;
}

/* ===============================
   Section 3 — Background grid texture
   =============================== */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(
    to right, var(--grid-col) 1px, transparent 1px
  ), linear-gradient(
    to bottom, var(--grid-col) 1px, transparent 1px
  );
  background-size: 32px 32px;
}

/* ===============================
   Section 4 — Layout utilities
   =============================== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ===============================
   Section 5 — Sticky nav
   =============================== */
.site-nav-new {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(21,25,24,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
@supports not (backdrop-filter: blur(12px)) {
  .site-nav-new {
    background: var(--surface);
  }
}
[data-theme="light"] .site-nav-new {
  background: rgba(244,247,245,0.85);
}
.site-nav-new .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-logo {
  font-family: 'Space Mono', monospace;
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0;
}
.nav-logo-img {
  height: 48px;
  width: auto;
}
.nav-logo .accent {
  color: var(--green);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.875rem;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover {
  color: var(--text);
  background: var(--surface2);
}
.nav-link.active {
  color: var(--text);
  background: var(--surface2);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ===============================
   Section 5.5 — Mods dropdown
   =============================== */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: none;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav-dropdown-trigger:hover {
  color: var(--text);
  background: var(--surface2);
}
.nav-dropdown-trigger[aria-expanded="true"] {
  color: var(--text);
  background: var(--surface2);
}
.dropdown-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}
.nav-dropdown-trigger[aria-expanded="true"] .dropdown-arrow {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 280px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 1000;
}
.nav-dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.dropdown-mods-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dropdown-mod-item {
  position: relative;
}
.dropdown-mod-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1rem;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, color 0.2s;
}
.dropdown-mod-toggle:hover {
  background: var(--surface2);
  color: var(--green);
}
.mod-toggle-arrow {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.dropdown-mod-toggle[aria-expanded="true"] .mod-toggle-arrow {
  transform: rotate(90deg);
}
.dropdown-submenu {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s;
}
.dropdown-submenu.open {
  max-height: 1000px;
  overflow: visible;
}
.dropdown-submenu a {
  display: block;
  padding: 0.5rem 1rem 0.5rem 2rem;
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.dropdown-submenu a:hover {
  color: var(--text);
  background: var(--surface2);
}

/* ===============================
   Section 6 — Theme toggle button
   =============================== */
.theme-toggle-btn {
  width: 40px;
  height: 24px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}
.theme-toggle-btn:hover {
  border-color: var(--green);
}
.theme-toggle-btn svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.theme-toggle-btn:hover svg {
  color: var(--text);
}
[data-theme="light"] .theme-toggle-btn svg {
  color: var(--text);
}
.theme-toggle-btn .moon-icon {
  stroke: none;
}
[data-theme="light"] .theme-toggle-btn .moon-icon {
  color: #2d473c;
}
[data-theme="dark"] .theme-toggle-btn .sun-icon {
  color: #ffd76a;
  stroke-width: 2.25;
}
[data-theme="light"] .moon-icon { display: inline; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: inline; }

/* ===============================
   Section 7 — Discord badge
   =============================== */
.discord-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  border-radius: 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-family: 'Space Mono', monospace;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s;
  min-width: auto;
  justify-content: center;
}
.discord-badge:hover {
  border-color: var(--green);
}
.discord-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}
#discord-count {
  font-size: 1.2em;
}
.discord-online-label {
  display: none;
}
@media (min-width: 768px) {
  .discord-badge {
    min-width: 6.75rem;
    padding: 0.375rem 0.75rem;
  }
  .discord-online-label {
    display: inline;
  }
}

/* ===============================
   Section 8 — Social pills
   =============================== */
.social-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.25rem 0;
}
.social-pill {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1.5px solid var(--pill-color);
  background: transparent;
  color: var(--pill-color);
  font-size: 0.75rem;
  font-family: 'Space Mono', monospace;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: all 0.2s;
}
.social-pill:hover {
  filter: brightness(1.2);
  transform: translateY(-2px);
}
.social-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  vertical-align: middle;
}

/* ===============================
   Section 9 — Mod cards
   =============================== */
.mod-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.mod-card:hover {
  border-color: var(--accent-colour);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}
.mod-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  overflow: hidden;
  padding: 6px;
}
.mod-card-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 6px;
}
.mod-card-body {
  flex: 1;
  min-width: 0;
}
.mod-card-name {
  font-family: 'Space Mono', monospace;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  margin: 0 0 0.25rem;
}
.mod-card-desc {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mod-card-arrow {
  color: var(--muted);
  font-size: 1.25rem;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.mod-card:hover .mod-card-arrow {
  transform: translateX(4px);
  color: var(--accent-colour);
}

/* ===============================
   Section 10 — Update feed cards
   =============================== */
.update-card {
  display: grid;
  grid-template-columns: 7rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}
.update-card:hover {
  border-color: var(--border);
  transform: translateX(4px);
  background: var(--surface2);
}
.update-card-date {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
}
.update-card-mod {
  font-size: 0.75rem;
  color: var(--green);
  font-family: 'Space Mono', monospace;
  margin-bottom: 0.15rem;
}
.update-card-title {
  font-size: 0.9375rem;
  color: var(--text);
  font-weight: 400;
  font-family: 'Inter', sans-serif;
  word-break: keep-all;
  white-space: normal;
}
.update-card-arrow {
  color: var(--muted);
  font-size: 1rem;
}

/* ===============================
   Section 11 — Hero
   =============================== */
.hero {
  padding: 5rem 0 3rem;
  text-align: center;
}
@media (min-width: 768px) {
  .hero {
    text-align: center;
  }
}
.hero-title {
  font-family: 'Space Mono', monospace;
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.1;
  color: var(--text);
  margin: 0 0 0.75rem;
}
.hero-subtitle {
  font-size: 1.125rem;
  color: var(--muted);
  margin: 0 0 2rem;
  font-weight: 300;
}
.hero-socials {
  display: flex;
  justify-content: center;
}
.minecraft-mod-header:has(.mod-icon) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0 0 1.5rem;
}
.minecraft-mod-header .mod-icon {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 4px;
  transform: translateY(-16px);
}
.minecraft-mod-header .mod-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

/* ===============================
   Section 11.5 — About image
   =============================== */
.image-wrapper {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.about-image {
  display: block;
  max-width: 500px;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 10px;
  object-fit: contain;
}

@media (max-width: 767px) {
  .image-wrapper {
    padding: 1.5rem 0;
  }

  .about-image {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .image-wrapper {
    padding: 1rem 0;
  }
}

/* ===============================
   Section 11.6 — About intro paragraph & container (Phase 3)
   =============================== */
.about-intro {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.6;
  margin: 0 0 2rem 0;
}

.about-image-container {
  background: var(--surface);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}

.about-image-container:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

@media (max-width: 767px) {
  .about-image-container {
    padding: 1rem;
  }
}

/* ===============================
   Section 12 — Section headings & Footer
   =============================== */
.section-heading {
  font-family: 'Space Mono', monospace;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.site-footer-new {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.post-content img {
  max-width: 100%;
  height: auto;
  margin: 0.5rem 0.5rem 0.5rem 0;
}
.post-content iframe,
.post-content video {
  max-width: 100%;
}
.post-content pre {
  overflow-x: auto;
}
.post-content a {
  color: var(--link);
  text-decoration: underline;
  transition: color 0.2s;
}
.post-content a:hover {
  color: var(--green);
  text-decoration: underline;
}
.wiki-version-selector {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
  font-family: 'Space Mono', monospace;
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.wiki-version-selector:hover {
  border-color: var(--green);
  background: var(--surface2);
  box-shadow: 0 2px 8px rgba(78, 172, 128, 0.15);
}
.wiki-version-selector:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.2);
}
.wiki-version-selector:active {
  background: var(--surface2);
}
.wiki-content-wrap {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}
.mod-changelog-post {
  max-width: 62rem;
  margin: 0 auto;
}
.mod-changelog-post .post-meta a,
.mod-changelog-post .post-meta .p-category,
.mod-changelog-post .post-meta a:visited,
.mod-changelog-post .post-meta .p-category:visited {
  color: var(--link);
  opacity: 1;
  text-decoration: underline;
  transition: color 0.2s, opacity 0.2s;
}
.mod-changelog-post .post-meta a:hover,
.mod-changelog-post .post-meta .p-category:hover,
.mod-changelog-post .post-meta a:focus-visible,
.mod-changelog-post .post-meta .p-category:focus-visible {
  color: var(--green);
  opacity: 1;
}
.post-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.625rem;
  align-items: center;
}
.post-meta-chips__versions,
.post-meta-chips__loaders {
  display: contents;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-family: 'Space Mono', monospace;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid currentColor;
  transition: filter 0.2s, transform 0.2s;
  white-space: nowrap;
}
.meta-chip--version {
  color: var(--muted);
  border-color: var(--border);
}
.meta-chip--version:hover {
  color: var(--text);
  border-color: var(--muted);
  filter: brightness(1.15);
  transform: translateY(-1px);
}
.meta-chip--fabric {
  color: var(--accent-fabric);
}
.meta-chip--neoforge {
  color: var(--accent-neoforge);
}
.meta-chip--forge {
  color: var(--accent-forge);
}
.meta-chip--loader:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}
@media (max-width: 600px) {
  .meta-chip {
    padding: 0.2rem 0.5rem;
    font-size: 0.6875rem;
  }
}
.post-content table {
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  display: table;
  max-width: 100%;
}
.post-content th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-family: 'Space Mono', monospace;
  font-weight: 800;
  font-size: 0.8125rem;
  color: var(--text);
  background: var(--surface2);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.post-content td {
  padding: 0.6875rem 1rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.post-content tbody tr:last-child td {
  border-bottom: none;
}
.post-content tbody tr:hover {
  background: var(--surface2);
  transition: background 0.2s;
}
.quick-links {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid var(--border);
  max-width: 280px;
}
.quick-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.quick-links li {
  margin: 0.5rem 0;
}
.quick-links h3 {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
}
.quick-links a {
  color: var(--link);
  text-decoration: underline;
  transition: color 0.2s;
}
.quick-links a:hover {
  color: var(--green);
}

/* Roadmap page variant: modern panel + title-case mod pills */
.roadmap-links {
  margin: 1.5rem 0;
}
.roadmap-pills {
  gap: 0.5rem;
  justify-content: flex-start;
}
.roadmap-links .roadmap-pill {
  font-family: 'Inter', sans-serif;
  text-transform: none;
  letter-spacing: 0;
  border-radius: 4px;
  border-width: 1px;
  padding: 0.45rem 0.9rem;
  background: transparent;
  border-color: var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.2;
}
.roadmap-links .roadmap-pill:visited {
  color: var(--text);
}
.roadmap-links .roadmap-pill:hover {
  background: color-mix(in srgb, var(--pill-color) 18%, var(--surface2));
  border-color: var(--pill-color);
  color: color-mix(in srgb, var(--pill-color) 86%, var(--text));
  text-decoration: none;
}
.roadmap-links .roadmap-pill:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .roadmap-pills {
    justify-content: flex-start;
  }
  .roadmap-pill {
    font-size: 0.9375rem;
    padding: 0.4rem 0.75rem;
  }
}

@media (max-width: 480px) {
  .roadmap-pill {
    width: 100%;
    justify-content: center;
  }
}

.mod-changelog-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.mod-changelog-entry {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.mod-changelog-entry:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.mod-changelog-title {
  margin: 0.25rem 0 0.75rem;
  font-size: 1.125rem;
}
.mod-changelog-title a {
  color: var(--text);
  text-decoration: none;
}
.mod-changelog-title a:hover {
  color: var(--green);
}
.footer-text {
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
  font-family: 'Space Mono', monospace;
}
.footer-link {
  color: var(--green);
  text-decoration: none;
  font-weight: 500;
}
.footer-link:hover {
  text-decoration: underline;
}

/* ===============================
   Section 12.5 — Recipe wiki UI
   =============================== */
.tag-info {
  color: var(--green);
}

.recipe-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  background: var(--surface);
  transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  width: 100%;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.recipe-card:hover {
  background: var(--surface2);
  border-color: var(--green);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.recipe-card-title {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.recipe-name {
  font-family: 'Space Mono', monospace;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  text-transform: capitalize;
}

.recipe-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  font-size: 0.875rem;
}

.recipe-card-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.recipe-card-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(107, 124, 114, 0.16);
  border-radius: 10px;
  padding: 1rem;
  min-width: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

[data-theme="light"] .recipe-card-panel {
  background: linear-gradient(180deg, rgba(237, 242, 239, 0.9), rgba(255, 255, 255, 0.92));
  border-color: rgba(98, 120, 112, 0.18);
  box-shadow: none;
}

.recipe-meta-panel {
  display: block !important;
}

.recipe-meta .recipe-info {
  padding: 0;
  margin: 0;
}

.recipe-meta .recipe-info p {
  color: var(--text);
  margin: 0 0 0.5rem;
}

.recipe-meta .recipe-info p strong {
  color: var(--muted);
  font-weight: 700;
  display: block;
  margin-bottom: 0.2rem;
}

.recipe-ingredients-section,
.recipe-pattern,
.recipe-output-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.recipe-ingredients-panel {
  gap: 0.75rem;
}

.recipe-pattern-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 0.25rem;
}

.recipe-ingredients-section h4,
.recipe-pattern h4,
.recipe-output-section h4 {
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.recipe-ingredients {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.recipe-ingredients li {
  font-size: 0.875rem;
  color: var(--text);
  padding-left: 1rem;
  position: relative;
}

.recipe-ingredients li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.recipe-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.recipe-pattern {
  align-items: center;
}

.recipe-output {
  width: 100%;
}

.recipe-output-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.recipe-output-list li {
  font-size: 0.875rem;
  color: var(--text);
}

.recipe-output-entry {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.recipe-components {
  width: 100%;
  margin-top: 0.125rem;
}

.recipe-components-title {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.recipe-component-group {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
  overflow: hidden;
}

.recipe-component-group + .recipe-component-group {
  margin-top: 0.45rem;
}

.recipe-component-group summary {
  cursor: pointer;
  padding: 0.45rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.recipe-component-group[open] summary {
  border-bottom: 1px solid var(--border);
}

.recipe-component-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0.65rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.recipe-component-list li {
  font-size: 0.8125rem;
  color: var(--muted);
}

.recipe-component-list strong {
  color: var(--text);
}

.recipe-output-section {
  justify-content: flex-start !important;
  align-items: flex-start !important;
}

.crafting-grid {
  background-image: url('/assets/img/crafting_grid.png');
  background-size: cover;
  width: 140px;
  height: 140px;
  padding: 6px;
  flex-shrink: 0;
}

.crafting-grid .grid-row {
  height: 46px;
  line-height: 42px;
  letter-spacing: 11px;
  padding-left: 23px;
  margin-top: 4px;
  margin-bottom: -12px;
}

.crafting-grid .grid-row .crafting-grid-slot {
  font-size: 16px;
  color: #000;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
  white-space: pre;
  display: inline-block;
  width: 21px;
  text-align: center;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
}

.crafting-grid .grid-row .crafting-grid-slot-empty {
  opacity: 0;
}

.toolbar {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px 12px 0 0;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.search-wrap {
  flex: 1;
  position: relative;
  min-width: 0;
}

.search-wrap > svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

#recipe-search {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9375rem;
  padding: 0.875rem 2.85rem 0.875rem 2.85rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 3rem;
}

#recipe-search:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.12);
}

#recipe-search::placeholder {
  color: var(--muted);
}

.clear-search-btn {
  display: none;
  position: absolute;
  right: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0.2rem;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.15s;
  border-radius: 4px;
  line-height: 0;
}

.clear-search-btn:hover {
  color: var(--text);
}

#search-count {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  font-family: 'Space Mono', monospace;
  font-weight: 600;
}

.toolbar-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
}

.btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-height: 3rem;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
}

.btn:hover {
  background: var(--surface2);
  transform: translateY(-1px);
}

.btn.primary {
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.28);
  color: var(--green);
}

.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  padding: 0.875rem 1.25rem 0;
  margin-bottom: 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.filter-group-row {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr);
  align-items: start;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}

.filter-scroll {
  min-width: 0;
  overflow: visible;
  padding-top: 0.2rem;
  padding-bottom: 0.125rem;
}

.filter-scroll::-webkit-scrollbar {
  height: 6px;
}

.filter-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.filter-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}

.filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

.group-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  padding-top: 0.625rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: 20px;
  border: 1px solid rgba(107, 124, 114, 0.28);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  background: rgba(28, 34, 32, 0.82);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  appearance: none;
}

[data-theme="light"] .chip {
  background: rgba(237, 242, 239, 0.92);
  box-shadow: none;
}

.chip:hover {
  color: var(--text);
  border-color: rgba(107, 124, 114, 0.48);
  transform: translateY(-1px);
}

.chip.active-base {
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.3);
  color: var(--accent-base);
}

.chip.active-fabric {
  background: rgba(180, 124, 248, 0.12);
  border-color: rgba(180, 124, 248, 0.32);
  color: var(--accent-fabric);
}

.chip.active-forge {
  background: rgba(248, 162, 74, 0.12);
  border-color: rgba(248, 162, 74, 0.32);
  color: var(--accent-neoforge);
}

.chip[aria-pressed='false'] {
  background: rgba(21, 25, 24, 0.88);
  color: var(--muted);
  border-color: rgba(107, 124, 114, 0.2);
  box-shadow: none;
}

[data-theme="light"] .chip[aria-pressed='false'] {
  background: rgba(255, 255, 255, 0.92);
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
  flex-shrink: 0;
}

.chip:focus-visible,
.filter-scroll:focus-visible,
.btn:focus-visible {
  outline: 2px solid rgba(74, 222, 128, 0.42);
  outline-offset: 2px;
}

.filter-panel-note {
  margin-top: 0.25rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8125rem;
}

.recipe-section {
  margin-bottom: 1.5rem;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.section-header h2 {
  margin: 0;
}

.section-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.tag-base {
  background: rgba(74, 222, 128, 0.12);
  color: var(--accent-base);
  border: 1px solid rgba(74, 222, 128, 0.25);
}

.tag-fabric {
  background: rgba(180, 124, 248, 0.12);
  color: var(--accent-fabric);
  border: 1px solid rgba(180, 124, 248, 0.25);
}

.tag-forge {
  background: rgba(248, 162, 74, 0.12);
  color: var(--accent-neoforge);
  border: 1px solid rgba(248, 162, 74, 0.25);
}

.recipe-count-badge {
  margin-left: auto;
  font-size: 0.6875rem;
  color: var(--muted);
  font-weight: 600;
  font-family: 'Space Mono', monospace;
}

.recipe-section.hidden {
  display: none;
}

.recipe-card.search-match {
  border-color: rgba(74, 222, 128, 0.28);
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.12);
}

.recipe-card.search-hidden {
  display: none;
}

.no-results {
  display: none;
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--muted);
}

.no-results.visible {
  display: block;
}

.no-results h3 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.375rem;
}

/* ===============================
   Section 13 — Responsive
   =============================== */
@media (max-width: 600px) {
  .update-card {
    grid-template-columns: 1fr;
  }
  .update-card-date {
    display: none;
  }
  .update-card-mod, .update-card-title {
    margin-bottom: 0.25rem;
  }
  .recipe-meta {
    grid-template-columns: 1fr;
  }
  .recipe-bottom-row {
    grid-template-columns: 1fr;
  }
  .recipe-card {
    padding: 1rem;
    margin: 0.9rem 0;
  }
  .recipe-card-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.875rem;
    padding: 1rem;
  }
  #search-count {
    order: 3;
    align-self: flex-start;
  }
  .toolbar-actions {
    gap: 0.5rem;
    margin-left: 0;
    width: 100%;
  }
  .btn {
    flex: 1;
    min-height: 2.75rem;
    padding: 0.75rem 0.875rem;
  }
  .filter-panel {
    padding: 0.875rem 1rem 0;
  }
  .filter-group-row {
    grid-template-columns: 1fr;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
  }
  .group-label {
    font-size: 0.625rem;
    padding-top: 0;
  }
  .filter-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
  }
  .filter-group {
    display: inline-flex;
    flex-wrap: nowrap;
    min-width: max-content;
  }
  .chip {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    min-height: 32px;
    flex-shrink: 0;
  }
  .filter-panel-note {
    font-size: 0.75rem;
  }
  .section-header {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0;
  }
  .section-header h2 {
    font-size: 1rem;
    flex: 0 1 auto;
    max-width: 70%;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  .section-tag {
    font-size: 0.5625rem;
    padding: 0.0625rem 0.375rem;
  }
  .recipe-count-badge {
    font-size: 0.625rem;
  }
  .recipe-card {
    padding: 0.875rem;
    gap: 0.75rem;
  }
  .recipe-card-title {
    margin-bottom: 0.25rem;
  }
  .recipe-card-title h3 {
    font-size: 0.95rem;
    line-height: 1.3;
  }
  .recipe-card-panel {
    padding: 0.875rem;
  }
  .recipe-meta {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .recipe-ingredients-section,
  .recipe-bottom-row {
    gap: 0.5rem;
  }
  .recipe-ingredients-section h4,
  .recipe-bottom-row h4 {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
  }
  .no-results {
    padding: 2rem 1rem;
  }
}

@media (max-width: 400px) {
  .toolbar {
    gap: 0.75rem;
    padding: 0.875rem;
  }
  #recipe-search {
    padding: 0.8125rem 0.875rem 0.8125rem 2.65rem;
  }
  .toolbar-actions {
    gap: 0.25rem;
  }
  .btn {
    min-height: 2.5rem;
    padding: 0.625rem 0.75rem;
    font-size: 0.6875rem;
  }
  .filter-panel {
    padding: 0.75rem 0.875rem 0;
  }
  .filter-group-row {
    margin-bottom: 0.625rem;
  }
  .group-label {
    font-size: 0.5625rem;
    line-height: 1;
  }
  .chip {
    padding: 0.4375rem 0.6875rem;
    font-size: 0.6875rem;
    min-height: 28px;
    gap: 0.25rem;
  }
  .crafting-grid {
    width: 126px;
    height: 126px;
    padding: 5px;
  }
  .crafting-grid .grid-row {
    height: 41px;
    line-height: 38px;
    letter-spacing: 10px;
    padding-left: 21px;
    margin-top: 3px;
    margin-bottom: -10px;
  }
  .crafting-grid .grid-row .crafting-grid-slot {
    width: 19px;
    font-size: 14px;
  }
}

/* ===============================
   Section 7.5 — Mobile Navigation
   =============================== */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  min-width: 24px;
  min-height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  margin-right: 1rem;
  flex-shrink: 0;
  color: var(--text);
}
.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-hamburger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}
.mobile-menu {
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0;
  list-style: none;
  margin: 0;
}
.mobile-menu.open {
  display: block;
}
.mobile-menu-section {
  border-bottom: 1px solid var(--border);
}
.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-size: 1rem;
  text-align: left;
  transition: background 0.2s;
}
.mobile-menu-toggle:hover {
  background: var(--surface2);
  color: var(--green);
}
.mobile-menu-arrow {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  transition: transform 0.2s;
}
.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-arrow {
  transform: rotate(180deg);
}
.mobile-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface2);
}
.mobile-mod-item {
  border-bottom: 1px solid var(--border);
}
.mobile-mod-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-size: 0.975rem;
  text-align: left;
  transition: background 0.2s;
}
.mobile-mod-toggle:hover {
  background: var(--surface3);
  color: var(--green);
}
.mobile-mod-arrow {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  transition: transform 0.2s;
  margin-left: 0.5rem;
}
.mobile-mod-toggle[aria-expanded="true"] .mobile-mod-arrow {
  transform: rotate(180deg);
}
.mobile-mod-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface3);
}
.mobile-mod-submenu li a {
  display: block;
  padding: 0.5rem 2rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: background 0.2s, color 0.2s;
}
.mobile-mod-submenu li a:hover {
  background: var(--surface2);
  color: var(--green);
}
.mobile-menu-link {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  transition: background 0.2s, color 0.2s;
  border-bottom: 1px solid var(--border);
}
.mobile-menu-link:last-child {
  border-bottom: none;
}
.mobile-menu-link:hover {
  background: var(--surface2);
  color: var(--green);
}

/* ===============================
   Section 13 — Responsive
   =============================== */
@media (max-width: 767px) {
  .nav-links {
    display: none;
  }
  .nav-hamburger {
    display: flex;
    margin-right: 0.25rem;
  }
  .nav-actions {
    gap: 0.375rem;
  }
  .nav-actions .language-switcher {
    display: none;
  }
  .nav-actions .discord-badge {
    min-width: 0;
    padding: 0.25rem 0.45rem;
    font-size: 0.6875rem;
    gap: 0.35rem;
  }
  .nav-actions .discord-pulse {
    width: 6px;
    height: 6px;
  }
  .nav-actions #discord-count {
    font-size: 1em;
  }
  .mobile-menu {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
}

@media (max-width: 600px) {
  .update-card {
    grid-template-columns: 1fr;
  }
  .update-card-date {
    display: none;
  }
  .update-card-mod, .update-card-title {
    margin-bottom: 0.25rem;
  }
}
@media (max-width: 480px) {
  .nav-hamburger {
    display: flex;
  }
  .nav-dropdown-menu {
    min-width: 250px;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
  }
  .nav-dropdown-menu.open {
    transform: translateX(-50%) translateY(0);
  }
}

/* Translation fallback notice */
.translation-notice {
  background: var(--surface2, #2a2a2a);
  border-left: 4px solid var(--accent, #f59e0b);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
