/* =========================================================
   A&S RTX Patcher — GitHub Pages site
   Layout follows bedrock.graphics; components, colours and buttons
   are taken from the patcher app itself (src/styles.css).
   ========================================================= */

:root {
  /* Patcher core tokens */
  --bg-gradient: linear-gradient(180deg, #1e1e1e 0%, #181818 100%);
  --sidebar-bg: #141414;
  --sidebar-border: #262626;
  --panel-bg: #161616;
  --panel-border: #2a2a2a;
  --panel-glow: 0 8px 24px 0 rgba(0, 0, 0, 0.4);
  --subtle-bg: rgba(255, 255, 255, 0.02);
  --subtle-border: rgba(255, 255, 255, 0.06);

  --primary-gradient: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
  --primary-color: #22c55e;
  --primary-light: #4ade80;
  --accent-color: #15803d;

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --color-warning: #f59e0b;
  --color-danger: #f87171;
  --color-info: #93c5fd;

  /* Minecraft bevel colours used by the patcher's buttons */
  --mc-outline: #1e1e1f;
  --mc-green: #1d4d13;
  --mc-green-hover: #245d19;
  --mc-green-hi: #316823;
  --mc-green-lo: #3c8527;
  --mc-grey: #c0c1c4;
  --mc-grey-hover: #c9cbcd;
  --mc-grey-hi: #edeeef;
  --mc-grey-lo: #6a6c70;
  --mc-grey-text: #313233;
  --mc-gold: #c2941c;
  --mc-gold-hover: #d2a222;
  --mc-gold-hi: #dfb234;
  --mc-gold-lo: #7d5c0e;
  --mc-slot: #8b8b8b;

  --font-sans: "Segoe UI", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  --font-mono: Consolas, "JetBrains Mono", ui-monospace, monospace;
  --container: 72rem;
  --nav-h: 4.5rem;
  --radius: 10px;
}

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

/* Components set their own display, so make the hidden attribute always win. */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  background: #181818;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg-gradient);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  border-top: 4px solid var(--primary-color);
  -webkit-font-smoothing: antialiased;
}

/* Patcher scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #141414; }
::-webkit-scrollbar-thumb { background: #2e2e2e; border-radius: 5px; border: 2px solid #141414; }
::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }

img, video { max-width: 100%; display: block; }
a { color: var(--primary-light); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #86efac; }
strong { color: #fff; font-weight: 600; }
h1, h2, h3 { margin: 0; line-height: 1.2; color: #fff; }

code {
  font-family: var(--font-mono);
  font-size: .85em;
  padding: 1px 5px;
  border-radius: 3px;
  background: #252525;
  color: #a5d6a7;
  white-space: nowrap;
}

/* Inline "button name" references, drawn as tiny patcher buttons */
kbd {
  display: inline-block;
  font: 700 .72rem/1.2 var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .02em;
  padding: 2px 7px 4px;
  border: 2px solid var(--mc-outline);
  border-radius: 3px;
  background: var(--mc-grey);
  color: var(--mc-grey-text);
  box-shadow: inset 2px 2px 0 var(--mc-grey-hi), inset -2px -3px 0 var(--mc-grey-lo);
  white-space: nowrap;
  vertical-align: 1px;
}

:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }

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

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--mc-green); color: #fff; padding: .5rem 1rem; border-radius: 4px;
}
.skip-link:focus { top: 1rem; }

.container { width: min(var(--container), 100% - 2rem); margin-inline: auto; }
.container--narrow { --container: 52rem; }

/* =========================================================
   Buttons — ported from the patcher
   ========================================================= */
.btn {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: .85rem;
  line-height: 1.2;
  padding: 8px 16px 12px;
  border-radius: 4px;
  border: 2.5px solid var(--mc-outline);
  cursor: pointer;
  transition: background-color .1s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  position: relative;
  white-space: nowrap;
}
.btn:active {
  box-shadow: inset 2.5px 2.5px 0 var(--mc-outline), 0 1px 0 rgba(0, 0, 0, .2) !important;
  padding-top: 10px;
  padding-bottom: 10px;
}

.btn-primary {
  background-color: var(--mc-green);
  box-shadow: inset 3px 3px 0 var(--mc-green-hi), inset -3px -5px 0 var(--mc-green-lo), 0 2.5px 0 rgba(0, 0, 0, .45);
  color: #fff;
  text-shadow: 1.5px 1.5px 0 #091705;
}
.btn-primary:hover { background-color: var(--mc-green-hover); color: #fff; }

.btn-secondary {
  background-color: var(--mc-grey);
  box-shadow: inset 3px 3px 0 var(--mc-grey-hi), inset -3px -5px 0 var(--mc-grey-lo), 0 2.5px 0 rgba(0, 0, 0, .35);
  color: var(--mc-grey-text);
}
.btn-secondary:hover { background-color: var(--mc-grey-hover); color: var(--mc-grey-text); }

.btn-gold-3d {
  background-color: var(--mc-gold);
  box-shadow: inset 3px 3px 0 var(--mc-gold-hi), inset -3px -5px 0 var(--mc-gold-lo), 0 2.5px 0 rgba(0, 0, 0, .45);
  color: #fff;
  letter-spacing: .5px;
  text-shadow: 1.5px 1.5px 0 #1e1503;
  padding: 10px 20px 14px;
}
.btn-gold-3d:hover { background-color: var(--mc-gold-hover); color: #fff; }
.btn-gold-3d:active { background-color: #ab8215; padding-top: 12px; padding-bottom: 12px; }

.btn-kofi {
  background-color: #1c4f9c;
  box-shadow: inset 3px 3px 0 #3a73c9, inset -3px -5px 0 #2a62b3, 0 2.5px 0 rgba(0, 0, 0, .45);
  color: #fff;
  text-shadow: 1.5px 1.5px 0 #07162e;
}
.btn-kofi:hover { background-color: #2259ad; color: #fff; }

.btn--block { width: 100%; }
.btn--lg { font-size: 1rem; padding: 13px 20px 17px; }
.btn--lg:active { padding-top: 15px; padding-bottom: 15px; }

/* Icon-only square buttons (the patcher's folder-picker style) */
.btn-square { padding: 8px 10px 10px; line-height: 0; flex: 0 0 auto; }
.btn-square:active { padding-top: 10px; padding-bottom: 8px; }
.nav-btn-icon { width: 16px; height: 16px; fill: currentColor; display: block; }

.pixel-icon { display: block; shape-rendering: crispEdges; image-rendering: pixelated; flex-shrink: 0; }

/* =========================================================
   Badges, switches, checkboxes, alerts — ported from the patcher
   ========================================================= */
.logo-badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.version-badge {
  background: rgba(34, 197, 94, .12);
  border: 1px solid rgba(34, 197, 94, .3);
  color: var(--primary-light);
  font-size: .75rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  width: fit-content;
  white-space: nowrap;
}

.update-badge {
  font-size: .7rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}
.update-badge.state-checking { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .15); color: var(--text-muted); }
.update-badge.state-uptodate { background: rgba(34, 197, 94, .08); border-color: rgba(34, 197, 94, .2); color: var(--primary-light); }
.update-badge.state-available { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .3); color: #fbbf24; }
.update-badge.state-error { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .25); color: var(--color-danger); }

.field-label { margin: 0 0 6px; font-size: .9rem; font-weight: 600; color: var(--text-muted); }
.status-hint { margin: 8px 0 0; font-size: .8rem; color: var(--text-muted); font-family: var(--font-mono); min-height: 1.3em; }

.text-switch-container { display: flex; gap: 10px; width: 100%; }
.switch-option {
  flex: 1;
  background-color: var(--mc-grey);
  border: 2.5px solid var(--mc-outline);
  border-radius: 4px;
  color: var(--mc-grey-text);
  padding: 10px 12px 14px;
  box-shadow: inset 3px 3px 0 var(--mc-grey-hi), inset -3px -5px 0 var(--mc-grey-lo), 0 2.5px 0 rgba(0, 0, 0, .35);
  cursor: pointer;
  font: 700 .85rem/1.2 var(--font-sans);
  text-align: center;
  text-transform: uppercase;
  transition: background-color .1s ease;
}
.switch-option:hover { background-color: var(--mc-grey-hover); }
.switch-option:active { box-shadow: inset 2.5px 2.5px 0 var(--mc-outline), 0 1px 0 rgba(0, 0, 0, .2); padding-top: 12px; padding-bottom: 12px; }
.switch-option.active {
  background-color: var(--mc-green);
  box-shadow: inset 3px 3px 0 var(--mc-green-hi), inset -3px -5px 0 var(--mc-green-lo), 0 2.5px 0 rgba(0, 0, 0, .45);
  color: #fff;
  text-shadow: 1.5px 1.5px 0 #091705;
}
.switch-option.active:hover { background-color: var(--mc-green-hover); }
.switch-option:disabled { opacity: .4; cursor: not-allowed; background: #1a1a1a; border-color: var(--sidebar-border); box-shadow: none; color: var(--text-muted); padding: 12px; }

.mc-checkbox-box {
  position: relative;
  flex-shrink: 0;
  width: 20px; height: 20px;
  background-color: var(--mc-slot);
  border: 2px solid var(--mc-outline);
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .5);
}
.mc-checkbox-box.is-checked { background-color: var(--mc-green-lo); }
.mc-checkbox-box.is-checked::after {
  content: "\2714";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; line-height: 1; color: #fff;
}

.disclaimer-box {
  display: flex; align-items: center; gap: 10px;
  background: rgba(239, 68, 68, .08);
  border: 1px solid rgba(239, 68, 68, .35);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--color-danger);
  font-size: .8rem; line-height: 1.4;
}
.disclaimer-box--warn { background: rgba(251, 191, 36, .1); border-color: rgba(251, 191, 36, .3); color: #fbbf24; }
.disclaimer-icon { font-size: 1.1rem; flex-shrink: 0; }

/* Cards */
.card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--panel-glow);
  padding: 24px;
}
.util-card {
  background: var(--subtle-bg);
  border: 1px solid var(--subtle-border);
  border-radius: var(--radius);
  padding: 16px;
}

/* =========================================================
   Navigation — the patcher sidebar, laid out as a top bar
   ========================================================= */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 20, 20, .94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1.5px solid var(--sidebar-border);
}
.nav__inner {
  width: min(80rem, 100% - 2rem);
  margin-inline: auto;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 12px;
}
.nav__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.nav__logo img { width: 40px; height: 40px; image-rendering: pixelated; transition: transform .3s ease, filter .3s ease; }
.nav__logo:hover img { transform: rotate(-6deg) scale(1.05); filter: drop-shadow(0 0 10px rgba(34, 197, 94, .6)); }

.logo-text {
  display: flex; flex-direction: column; gap: 1px;
  font-weight: 800; font-size: .82rem; letter-spacing: 1.5px; line-height: 1.15;
  color: #fff;
}
.logo-text .accent-text {
  font-size: 1.22em;
  background: var(--primary-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.nav__menu { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.nav-tab {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: .92rem; font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: all .2s ease;
  white-space: nowrap;
}
.nav-tab:hover { color: var(--text-main); background: rgba(255, 255, 255, .04); }
.nav-tab.active { color: var(--text-main); background: rgba(34, 197, 94, .08); border-color: rgba(34, 197, 94, .25); }
.tab-icon { font-size: 1rem; line-height: 1; }

.nav__actions {
  display: flex; align-items: center; gap: 8px;
  margin-left: 8px; padding-left: 14px;
  border-left: 1px solid var(--sidebar-border);
}
.nav__download { padding: 7px 14px 11px; }
.nav__download:active { padding-top: 9px; padding-bottom: 9px; }

.nav__toggle { display: none; margin-left: auto; }

@media (max-width: 1100px) {
  .nav-tab .tab-icon { display: none; }
}
@media (max-width: 920px) {
  .nav__toggle { display: inline-flex; }
  .nav__menu {
    position: absolute; left: 0; right: 0; top: var(--nav-h);
    flex-direction: column; align-items: stretch; gap: 8px;
    background: var(--sidebar-bg);
    border-bottom: 1.5px solid var(--sidebar-border);
    padding: 16px 20px 20px;
    box-shadow: 0 16px 30px rgba(0, 0, 0, .5);
    display: none;
  }
  .nav__menu.is-open { display: flex; animation: fadeIn .25s ease; }
  .nav-tab { padding: 10px 14px; font-size: .95rem; }
  .nav-tab .tab-icon { display: inline; }
  .nav__actions {
    margin: 8px 0 0; padding: 16px 0 0;
    border-left: 0; border-top: 1px solid var(--sidebar-border);
  }
  .nav__download { flex: 1; }
}
@media (max-width: 380px) {
  .nav__version { display: none; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3.5rem, 8vw, 6rem);
  container-type: inline-size;
  border-bottom: 1px solid var(--panel-border);
}
.hero__backdrop {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(20, 20, 20, .55) 0%, rgba(24, 24, 24, .85) 60%, #1b1b1b 100%),
    radial-gradient(60rem 30rem at 12% 25%, rgba(34, 197, 94, .18), transparent 70%),
    radial-gradient(40rem 26rem at 88% 20%, rgba(194, 148, 28, .12), transparent 70%),
    url("assets/showcase/showcase_image_2.jpg") center / cover no-repeat;
}
.hero__backdrop::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, .025) 3px 4px),
    repeating-linear-gradient(90deg, transparent 0 3px, rgba(255, 255, 255, .025) 3px 4px);
}

.announcement {
  display: flex; align-items: center; gap: 10px;
  width: fit-content; max-width: calc(100% - 2rem);
  margin: 0 auto clamp(2rem, 5vw, 3.5rem);
  padding: 6px 14px 6px 8px;
  background: rgba(22, 22, 22, .85);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  color: var(--text-main); text-decoration: none; font-size: .88rem;
  animation: rise .6s ease both;
}
.announcement:hover { color: #fff; border-color: rgba(34, 197, 94, .45); }
.announcement .update-badge { text-transform: uppercase; letter-spacing: .05em; }
.announcement__arrow { color: var(--primary-color); transition: transform .2s; }
.announcement:hover .announcement__arrow { transform: translateX(3px); }

.hero-stage {
  width: min(var(--container), 100% - 2rem);
  margin-inline: auto;
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(2.25rem, 6cqi, 3.5rem);
}
.hero-heading {
  text-align: center; text-wrap: balance;
  display: flex; flex-direction: column; gap: clamp(1rem, 2cqi, 1.5rem);
  max-width: 40rem;
}
.hero-heading__title {
  display: flex; flex-direction: column;
  font-size: clamp(2.4rem, 5.5cqi + .8rem, 4.4rem);
  font-weight: 800; line-height: 1.02; letter-spacing: -.02em;
  text-shadow: 0 .125rem 1.5rem rgba(0, 0, 0, .55);
  animation: rise .7s .05s ease both;
}
.hero-heading__line--accent {
  background-image: linear-gradient(100deg, #86efac, var(--primary-color) 35%, #15803d 60%, #86efac);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 .125rem 1.25rem rgba(0, 0, 0, .55));
  animation: shimmer 9s ease-in-out infinite;
  padding-bottom: .08em;
}
.hero-heading__lead {
  margin: 0; color: #e5e7eb;
  font-size: clamp(1rem, .6cqi + .92rem, 1.2rem); line-height: 1.6;
  text-shadow: 0 1px .75rem rgba(0, 0, 0, .5); text-wrap: pretty;
  animation: rise .7s .2s ease both;
}
.hero-heading__chips {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  animation: rise .7s .3s ease both;
}
.hero-heading__chips li {
  font-size: .78rem; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
  background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .28); color: var(--primary-light);
  backdrop-filter: blur(6px);
}

@media (min-width: 960px) {
  .hero-stage { flex-direction: row; align-items: center; justify-content: space-between; }
  .hero-heading { text-align: left; }
  .hero-heading__title { align-items: flex-start; }
  .hero-heading__chips { justify-content: flex-start; }
  .installer { flex: 0 0 27rem; }
}

/* Installer card */
.installer {
  width: 100%; max-width: 30rem;
  display: flex; flex-direction: column; gap: 16px;
  background: rgba(22, 22, 22, .92);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .75);
  animation: rise .7s .35s ease both;
}
.installer__head { display: flex; align-items: center; gap: 14px; }
.installer__head img { image-rendering: pixelated; }
.installer__title { font-size: 1.25rem; font-weight: 600; margin-bottom: 6px; }
.installer__row { display: flex; gap: 10px; flex-wrap: wrap; }
.installer__row .btn { flex: 1 1 10rem; }
.installer__checklist { border-top: 1px solid var(--panel-border); padding-top: 14px; }
.installer__checklist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .88rem; color: #e5e7eb; }
.installer__checklist li { display: flex; align-items: center; gap: 8px; }

/* =========================================================
   Sections
   ========================================================= */
.section { padding-block: clamp(3.5rem, 8vw, 5.5rem); }
.section--alt { background: rgba(20, 20, 20, .7); border-block: 1px solid var(--sidebar-border); }
.section__head { margin-bottom: 2rem; }
.eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  font: 600 .72rem/1 var(--font-sans);
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--primary-light);
  background: rgba(34, 197, 94, .08);
  border: 1px solid rgba(34, 197, 94, .25);
  padding: 5px 10px; border-radius: 6px;
}
.section__title { font-size: clamp(1.7rem, 3vw + .5rem, 2.3rem); font-weight: 800; letter-spacing: -.01em; }
.section__lead { margin: .75rem 0 0; color: var(--text-muted); max-width: 42rem; }
.section__note { margin: 1.25rem 0 0; font-size: .88rem; color: var(--text-muted); }

/* =========================================================
   Showcase
   ========================================================= */
.player {
  background: #000; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--panel-border);
  box-shadow: var(--panel-glow);
}
.player video { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; }

.video-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }

/* Thumbnails reuse the patcher's mode-card frame: outline, bevel, green when selected */
.video-picker__item, .gallery__item {
  position: relative; padding: 0;
  border: 2.5px solid var(--mc-outline); border-radius: 4px;
  overflow: hidden; cursor: pointer; background: #000;
  box-shadow: 0 2.5px 0 rgba(0, 0, 0, .45);
}
.video-picker__item::after, .gallery__item::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, .18), inset -3px -4px 0 rgba(0, 0, 0, .35);
  transition: box-shadow .1s;
}
.video-picker__item.is-active::after { box-shadow: inset 3px 3px 0 var(--mc-green-hi), inset -3px -5px 0 var(--mc-green-lo), inset 0 0 0 5px rgba(60, 133, 39, .6); }
.video-picker__item:active, .gallery__item:active { transform: translateY(2px); box-shadow: none; }
.video-picker__item img, .gallery__item img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  transition: transform .4s ease, filter .3s;
  filter: grayscale(.4) brightness(.75);
}
.video-picker__item:hover img, .gallery__item:hover img { transform: scale(1.04); filter: none; }
.video-picker__item.is-active img { filter: none; }
.video-picker__play {
  position: absolute; inset: 0; margin: auto; z-index: 1;
  width: 44px; height: 32px;
  background: var(--mc-grey);
  border: 2.5px solid var(--mc-outline); border-radius: 4px;
  box-shadow: inset 2px 2px 0 var(--mc-grey-hi), inset -2px -4px 0 var(--mc-grey-lo);
}
.video-picker__play::after {
  content: ""; position: absolute; left: 50%; top: 45%; transform: translate(-35%, -50%);
  border-style: solid; border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent var(--mc-grey-text);
}
.video-picker__item:hover .video-picker__play,
.video-picker__item.is-active .video-picker__play {
  background: var(--mc-green);
  box-shadow: inset 2px 2px 0 var(--mc-green-hi), inset -2px -4px 0 var(--mc-green-lo);
}
.video-picker__item:hover .video-picker__play::after,
.video-picker__item.is-active .video-picker__play::after { border-left-color: #fff; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 2rem; }
@media (max-width: 640px) {
  .video-picker { gap: 8px; }
  .video-picker__play { width: 34px; height: 26px; }
  .gallery { grid-template-columns: 1fr; }
}

/* Lightbox mirrors the patcher's modal */
.lightbox {
  padding: 0; border: 1px solid var(--panel-border); border-radius: var(--radius);
  background: #000; max-width: min(96vw, 1400px); max-height: 92vh;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.lightbox[open] { animation: modalFadeIn .15s ease-out; }
.lightbox::backdrop { background: rgba(0, 0, 0, .75); backdrop-filter: blur(4px); }
.lightbox img { max-height: 92vh; width: auto; }
.lightbox__close { position: absolute; right: 10px; top: 10px; z-index: 1; }

/* =========================================================
   Setup steps
   ========================================================= */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.step {
  position: relative;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--panel-glow);
  padding: 22px 24px 22px 76px;
}
.step__title { font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; }
.step__num {
  position: absolute; left: 20px; top: 20px;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  font: 800 1rem/1 var(--font-sans);
  color: #fff; text-shadow: 1.5px 1.5px 0 #091705;
  background: var(--mc-green);
  border: 2.5px solid var(--mc-outline); border-radius: 4px;
  box-shadow: inset 3px 3px 0 var(--mc-green-hi), inset -3px -4px 0 var(--mc-green-lo);
}
.step p { margin: 0 0 12px; color: var(--text-muted); font-size: .95rem; }
.step p:last-child { margin-bottom: 0; }
.step__banner {
  display: block; max-width: 24rem; margin-top: 4px;
  border: 2.5px solid var(--mc-outline); border-radius: 4px; overflow: hidden;
  box-shadow: 0 2.5px 0 rgba(0, 0, 0, .45);
  transition: transform .15s, filter .15s;
}
.step__banner:hover { transform: translateY(-2px); filter: brightness(1.08); }
@media (max-width: 560px) {
  .step { padding: 70px 18px 18px; }
  .step__num { left: 18px; top: 18px; }
}

/* Info alert — patcher .info-alert */
.callout {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 4px;
  font-size: .88rem;
}
.callout p { margin: 0 !important; }
.callout p + p { margin-top: 4px !important; }
.callout__title { font-weight: 700; }
.callout--info { background: rgba(96, 165, 250, .08); border-left: 3px solid var(--primary-color); }
.callout--info p { color: var(--color-info) !important; }
.callout--info strong { color: #dbeafe; }
.callout--warn {
  margin-top: 16px;
  background: rgba(251, 191, 36, .1);
  border: 1px solid rgba(251, 191, 36, .3);
  border-radius: 8px;
  padding: 14px 16px;
}
.callout--warn .callout__title { color: #fbbf24; font-size: 1rem; }
.callout--warn p:not(.callout__title) { color: #e2e8f0; }

/* Resource pack order — styled like the patcher's cleaner results list */
.pack-order {
  list-style: none; margin: 4px 0 0; padding: 6px;
  counter-reset: pack;
  background: #0f0f0f;
  border: 1px solid #262626; border-radius: 8px;
  display: grid; gap: 6px;
}
.pack-order li {
  counter-increment: pack;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 12px;
  background: var(--subtle-bg);
  border: 1px solid var(--subtle-border);
  border-radius: 6px;
}
.pack-order li::before {
  content: counter(pack);
  width: 24px; height: 24px; display: grid; place-items: center; flex-shrink: 0;
  font: 700 .8rem var(--font-sans); color: #fff;
  background: var(--mc-slot);
  border: 2px solid var(--mc-outline);
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .5);
}
.pack-order li:first-child { background: rgba(34, 197, 94, .08); border-color: rgba(34, 197, 94, .25); }
.pack-order li:first-child::before { background: var(--mc-green-lo); }
.pack-order span { font-weight: 600; color: #fff; font-size: .92rem; }
.pack-order em { margin-left: auto; font-style: normal; font-size: .8rem; color: var(--text-muted); }
.pack-order__muted span { color: var(--text-muted); }
.pack-order__muted em { color: #fbbf24; }

/* =========================================================
   Features — patcher utility grid
   ========================================================= */
.utils-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: 16px; }
.feature { padding: 20px; transition: background-color .2s, border-color .2s, transform .2s; }
.feature:hover { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .12); transform: translateY(-2px); }
.feature h3 { font-size: 1.05rem; font-weight: 600; margin: 14px 0 6px; }
.feature p { margin: 0; color: var(--text-muted); font-size: .9rem; line-height: 1.5; }
.feature__icon {
  width: 44px; height: 44px; display: grid; place-items: center; font-size: 1.3rem;
  border: 2.5px solid var(--mc-outline); border-radius: 4px;
}
.feature__icon--green { background: var(--mc-green); box-shadow: inset 3px 3px 0 var(--mc-green-hi), inset -3px -4px 0 var(--mc-green-lo); }
.feature__icon--gold { background: var(--mc-gold); box-shadow: inset 3px 3px 0 var(--mc-gold-hi), inset -3px -4px 0 var(--mc-gold-lo); }
.feature__icon--blue { background: #1c4f9c; box-shadow: inset 3px 3px 0 #3a73c9, inset -3px -4px 0 #2a62b3; }
.feature__icon--teal { background: #146356; box-shadow: inset 3px 3px 0 #2a8f7e, inset -3px -4px 0 #1f7a6b; }

/* =========================================================
   How it works
   ========================================================= */
.pipeline {
  display: flex; align-items: stretch; gap: 14px;
  padding: 20px; margin-bottom: 20px;
  background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: var(--radius);
  box-shadow: var(--panel-glow);
}
/* Nodes use the patcher's "Select Patch Mode" radio cards */
.pipeline__node {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  padding: 14px 10px 18px;
  background-color: var(--mc-grey);
  border: 2.5px solid var(--mc-outline); border-radius: 4px;
  box-shadow: inset 3px 3px 0 var(--mc-grey-hi), inset -3px -5px 0 var(--mc-grey-lo), 0 2.5px 0 rgba(0, 0, 0, .35);
  color: var(--mc-grey-text);
}
.pipeline__node--accent {
  background-color: var(--mc-green);
  box-shadow: inset 3px 3px 0 var(--mc-green-hi), inset -3px -5px 0 var(--mc-green-lo), 0 2.5px 0 rgba(0, 0, 0, .45);
  color: #fff; text-shadow: 1.5px 1.5px 0 #091705;
}
.pipeline__icon { font-size: 1.5rem; text-shadow: none; }
.pipeline__label { font-weight: 600; font-size: .9rem; }
.pipeline__node code { background: rgba(0, 0, 0, .12); color: inherit; text-shadow: none; }
.pipeline__node--accent code { background: rgba(0, 0, 0, .3); color: #b2dbac; }
.pipeline__arrow {
  flex: 0 0 2.5rem; align-self: center; height: 4px; position: relative;
  background: repeating-linear-gradient(90deg, var(--primary-color) 0 6px, transparent 6px 10px);
  background-size: 20px 4px;
  animation: flow 1s linear infinite;
}
.pipeline__arrow::after {
  content: ""; position: absolute; right: -4px; top: -6px;
  border-style: solid; border-width: 8px 0 8px 9px;
  border-color: transparent transparent transparent var(--primary-color);
}
@media (max-width: 700px) {
  .pipeline { flex-direction: column; }
  .pipeline__arrow {
    flex: 0 0 1.5rem; width: 4px; height: 1.5rem;
    background: repeating-linear-gradient(180deg, var(--primary-color) 0 6px, transparent 6px 10px);
    animation: none;
  }
  .pipeline__arrow::after { right: auto; left: -6px; top: auto; bottom: -6px; border-width: 9px 8px 0 8px; border-color: var(--primary-color) transparent transparent transparent; }
}

/* Phases — patcher step checklist */
.phases {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 12px;
  counter-reset: phase;
}
.phases li {
  counter-increment: phase;
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px;
  background: var(--subtle-bg); border: 1px solid var(--subtle-border);
  border-left: 3px solid var(--primary-color);
  border-radius: 6px;
}
.phases li strong { font-size: .95rem; }
.phases li strong::before { content: "0" counter(phase); font-family: var(--font-mono); color: var(--primary-color); margin-right: 8px; }
.phases li span { color: var(--text-muted); font-size: .88rem; }

/* =========================================================
   Ecosystem & credits
   ========================================================= */
.repos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 16px; }
.repo {
  display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 4px; align-content: start;
  padding: 18px;
  text-decoration: none; color: inherit;
  transition: background-color .2s, border-color .2s, transform .2s;
}
.repo:hover { color: inherit; background: rgba(34, 197, 94, .06); border-color: rgba(34, 197, 94, .25); transform: translateY(-2px); }
.repo__icon { grid-row: span 2; font-size: 1.4rem; line-height: 1.2; }
.repo__name { font-weight: 600; color: #fff; }
.repo__name::after { content: " \2192"; color: var(--primary-color); opacity: 0; transition: opacity .2s; }
.repo:hover .repo__name::after { opacity: 1; }
.repo__desc { color: var(--text-muted); font-size: .88rem; line-height: 1.45; }

.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 16px; }
.person { padding: 18px; display: flex; flex-direction: column; }
.person h3 { font-size: 1.05rem; font-weight: 600; }
.person p { margin: 4px 0 0; font-size: .88rem; }
.person__role { color: #d1d5db; }
.person__contact { color: var(--text-muted); }
.person--highlight { background: rgba(96, 165, 250, .06); border-color: rgba(96, 165, 250, .25); }
.person .btn-kofi { margin-top: auto; align-self: flex-start; }
.person__badge { margin-top: 10px; align-self: flex-start; line-height: 0; }
.person--highlight .person__role { margin-bottom: 14px; }

/* =========================================================
   Footer
   ========================================================= */
.footer {
  position: relative;
  border-top: 4px solid var(--primary-color);
  background: var(--sidebar-bg);
  color: #d1d5db;
  display: grid;
  grid-template-columns: 1fr min(80rem, 100% - 2rem) 1fr;
}
.footer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, .02) 3px 4px),
    repeating-linear-gradient(90deg, transparent 0 3px, rgba(255, 255, 255, .02) 3px 4px);
}
.footer__links-section { position: relative; grid-column: 2; padding: 2.5rem 1rem; }
.footer__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 2rem; }
.footer__column { display: flex; flex-direction: column; gap: 12px; }
.footer__heading {
  position: relative; padding-bottom: 10px;
  font-size: .75rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
  color: #fff;
}
.footer__heading::after { content: ""; position: absolute; left: 0; bottom: 0; width: 24px; height: 2px; background: var(--primary-color); }
.footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.footer-link {
  display: inline-flex; align-items: center; min-height: 2.4rem;
  color: #d1d5db; font-size: .9rem; font-weight: 600; text-decoration: none;
  transition: color .2s;
}
.footer-link:hover { color: var(--primary-light); }
.footer-link--muted { color: var(--text-muted); }
.footer__credits-section {
  position: relative; grid-column: 1 / -1;
  display: grid; grid-template-columns: 1fr min(80rem, 100% - 2rem) 1fr;
  padding-block: 2rem;
  background: #101010; border-top: 1px solid var(--sidebar-border);
}
.footer__credits-section > * { grid-column: 2; padding-inline: 1rem; }
.footer__disclaimer { margin: 0; font: 600 .85rem var(--font-mono); color: #e5e7eb; }
.footer__body { margin: 8px 0 0; font-size: .8rem; line-height: 1.7; color: var(--text-muted); }
.footer__body .footer-link, .footer__credits .footer-link { display: inline; min-height: 0; font-size: inherit; color: var(--primary-light); text-decoration: underline; }
.footer__credits { margin: 12px 0 0; font-size: .8rem; color: #6b7280; }

@media (min-width: 960px) {
  .footer { grid-template-columns: 1fr min(40rem, 50% - 1rem) min(40rem, 50% - 1rem) 1fr; }
  .footer__links-section { padding-block: 3rem; }
  .footer__credits-section {
    grid-column: 3 / -1; grid-template-columns: minmax(0, 40rem) 1fr;
    border-top: 0; border-left: 1px solid var(--sidebar-border);
    padding: 3rem 0 3rem 2.5rem;
  }
  .footer__credits-section > * { grid-column: 1; padding-inline: 0 1rem; }
}

/* =========================================================
   Motion
   ========================================================= */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes modalFadeIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes shimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes flow { to { background-position: 20px 0; } }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Wiki subpage (wiki.html)
   ========================================================= */
.wiki-hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: 1.5rem 2.75rem;
  border-bottom: 1px solid var(--panel-border);
}
.wiki-hero .hero__backdrop {
  background:
    linear-gradient(180deg, rgba(20, 20, 20, .8) 0%, rgba(24, 24, 24, .94) 70%, #1b1b1b 100%),
    radial-gradient(50rem 22rem at 10% 40%, rgba(34, 197, 94, .18), transparent 70%),
    url("assets/showcase/showcase_image_4.png") center 35% / cover no-repeat;
}
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: .85rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-light); }
.breadcrumb [aria-current] { color: var(--text-main); font-weight: 600; }
.wiki-hero__inner { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem; }
.wiki-hero__title { font-size: clamp(2.1rem, 4vw + .8rem, 3.2rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.wiki-hero__lead { margin: .75rem 0 1rem; max-width: 42rem; color: #d1d5db; font-size: 1.05rem; }
.wiki-hero__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.wiki-layout {
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start;
  padding-block: 2rem 4rem;
}

/* Sidebar = the patcher's own sidebar */
.wiki-sidebar {
  position: sticky; top: calc(var(--nav-h) + 16px);
  max-height: calc(100vh - var(--nav-h) - 32px);
  display: flex; flex-direction: column; gap: 16px;
  background: var(--sidebar-bg);
  border: 1.5px solid var(--sidebar-border);
  border-radius: var(--radius);
  padding: 18px 14px;
}
.wiki-toc { min-height: 0; overflow-y: auto; }
.wiki-toc__summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  font-size: .72rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted);
  padding: 0 6px 12px;
}
.wiki-toc__summary::-webkit-details-marker { display: none; }
.dropdown-arrow { font-size: .65rem; color: var(--text-muted); transition: transform .3s cubic-bezier(.4, 0, .2, 1); }
details[open] > summary .dropdown-arrow { transform: rotate(180deg); }
.wiki-toc__nav { display: flex; flex-direction: column; gap: 4px; }
.wiki-toc__nav .nav-tab { font-size: .9rem; padding: 9px 12px; white-space: normal; }
.nav-dropdown-items {
  display: flex; flex-direction: column; gap: 2px;
  margin: 2px 0 4px 20px; padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, .06);
}
.nav-subtab {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid transparent; border-radius: 6px;
  color: var(--text-muted); font-size: .84rem; font-weight: 600;
  padding: 6px 10px; text-decoration: none;
  transition: all .2s ease;
}
.nav-subtab:hover { color: var(--text-main); background: rgba(255, 255, 255, .04); }
.nav-subtab.active { color: var(--text-main); background: rgba(34, 197, 94, .08); border-color: rgba(34, 197, 94, .25); }
.subtab-dot { color: var(--primary-color); font-size: 1.1rem; line-height: 1; display: inline-block; transition: transform .2s; }
.nav-subtab:hover .subtab-dot { transform: scale(1.3); }
.wiki-sidebar__footer { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--sidebar-border); }
.wiki-sidebar__footer .btn { font-size: .78rem; }

@media (max-width: 960px) {
  .wiki-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 1.25rem; }
  .wiki-sidebar { position: static; max-height: none; padding: 12px; }
  .wiki-toc__summary { padding: 4px 6px; font-size: .8rem; color: var(--text-main); }
  .wiki-toc[open] .wiki-toc__summary { padding-bottom: 12px; }
  .wiki-sidebar__footer { display: none; }
}

/* Content cards */
.wiki-content { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.wiki-section { padding: clamp(18px, 3vw, 28px); }
.wiki-section > p, .tool__body > p, .mode-panel p, .create-patch > p { margin: 0 0 14px; color: #d1d5db; font-size: .95rem; }
.wiki-h2 {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  font-size: clamp(1.35rem, 1.5vw + .9rem, 1.65rem); font-weight: 700;
  padding-bottom: 14px; margin-bottom: 18px;
  border-bottom: 1px solid var(--panel-border);
}
.wiki-h2__icon {
  width: 42px; height: 42px; display: grid; place-items: center; font-size: 1.25rem; flex-shrink: 0;
  background: var(--mc-green);
  border: 2.5px solid var(--mc-outline); border-radius: 4px;
  box-shadow: inset 3px 3px 0 var(--mc-green-hi), inset -3px -4px 0 var(--mc-green-lo);
}
.wiki-h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.wiki-h4 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 1rem; font-weight: 600; margin: 0 0 8px; color: #fff; }
.wiki-page [id] { scroll-margin-top: calc(var(--nav-h) + 16px); }
.wiki-section > p.wiki-note { font-size: .88rem; color: var(--text-muted); margin-bottom: 0; }

.pipeline--compact { box-shadow: none; background: #121212; padding: 16px; margin: 4px 0 18px; }

/* encrypted / decrypted cards — patcher release-action-card */
.diff-files { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 12px; margin-bottom: 14px; }
.release-action-card {
  background: #1c1c1c; border: 1px solid var(--panel-border); border-radius: var(--radius);
  padding: 14px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
}
.release-action-info { display: flex; flex-direction: column; gap: 4px; }
.release-action-info strong { font-size: .95rem; }
.release-action-info span { font-size: .85rem; color: var(--text-muted); line-height: 1.5; }
.mode-chip {
  margin-top: auto;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding: 3px 9px 5px; border: 2px solid var(--mc-outline); border-radius: 3px;
  background: var(--mc-grey); color: var(--mc-grey-text);
  box-shadow: inset 2px 2px 0 var(--mc-grey-hi), inset -2px -3px 0 var(--mc-grey-lo);
}
.mode-chip--green { background: var(--mc-green); color: #fff; text-shadow: 1px 1px 0 #091705; box-shadow: inset 2px 2px 0 var(--mc-green-hi), inset -2px -3px 0 var(--mc-green-lo); }

/* Patch mode picker — patcher radio cards */
.mode-toggle-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.radio-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  font-family: var(--font-sans);
  background-color: var(--mc-grey);
  border: 2.5px solid var(--mc-outline); border-radius: 4px;
  padding: 14px 10px 18px;
  box-shadow: inset 3px 3px 0 var(--mc-grey-hi), inset -3px -5px 0 var(--mc-grey-lo), 0 2.5px 0 rgba(0, 0, 0, .35);
  color: var(--mc-grey-text);
  cursor: pointer;
  transition: background-color .1s ease;
}
.radio-card:hover { background-color: var(--mc-grey-hover); }
.radio-card:active { box-shadow: inset 2.5px 2.5px 0 var(--mc-outline), 0 1px 0 rgba(0, 0, 0, .2); padding-top: 16px; padding-bottom: 16px; }
.radio-card.is-selected {
  background-color: var(--mc-green);
  box-shadow: inset 3px 3px 0 var(--mc-green-hi), inset -3px -5px 0 var(--mc-green-lo), 0 2.5px 0 rgba(0, 0, 0, .45);
  color: #fff; text-shadow: 1.5px 1.5px 0 #091705;
}
.radio-card.is-selected:hover { background-color: var(--mc-green-hover); }
.mode-icon { font-size: 1.5rem; margin-bottom: 6px; text-shadow: none; }
.mode-title { font-weight: 700; font-size: .92rem; margin-bottom: 2px; }
.mode-desc { font-size: .75rem; line-height: 1.3; color: #55585b; }
.radio-card.is-selected .mode-desc { color: #b2dbac; text-shadow: none; }
@media (max-width: 600px) {
  .mode-toggle-group { grid-template-columns: 1fr; }
  .radio-card { flex-direction: row; flex-wrap: wrap; column-gap: 10px; text-align: left; padding: 10px 14px 14px; }
  .radio-card:active { padding-top: 12px; padding-bottom: 12px; }
  .mode-icon { margin: 0; font-size: 1.3rem; }
  .mode-desc { flex-basis: 100%; }
}
.mode-panel {
  background: #121212; border: 1px solid var(--panel-border); border-radius: 8px;
  padding: 16px 18px; margin-bottom: 14px;
  animation: fadeIn .3s ease;
}
.mode-panel p:last-child { margin-bottom: 0; }

.wiki-steps { margin: 0; padding: 0; list-style: none; counter-reset: ws; display: grid; gap: 8px; }
.wiki-steps li { counter-increment: ws; position: relative; padding-left: 34px; color: #d1d5db; font-size: .93rem; line-height: 1.9; }
.wiki-steps li::before {
  content: counter(ws); position: absolute; left: 0; top: 3px;
  width: 22px; height: 22px; display: grid; place-items: center;
  font: 700 .75rem/1 var(--font-sans); color: #fff;
  background: var(--mc-slot); border: 2px solid var(--mc-outline); box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .5);
}
kbd.kbd-gold { background: var(--mc-gold); color: #fff; text-shadow: 1px 1px 0 #1e1503; box-shadow: inset 2px 2px 0 var(--mc-gold-hi), inset -2px -3px 0 var(--mc-gold-lo); }
kbd.kbd-green { background: var(--mc-green); color: #fff; text-shadow: 1px 1px 0 #091705; box-shadow: inset 2px 2px 0 var(--mc-green-hi), inset -2px -3px 0 var(--mc-green-lo); }

.fact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 12px; margin-bottom: 14px; }
.fact-grid .util-card p, .utils-grid--wiki .util-card p { margin: 0; color: var(--text-muted); font-size: .88rem; line-height: 1.55; }
.fact-title { display: flex; align-items: center; gap: 6px; font-size: .95rem; font-weight: 600; margin: 0 0 6px; color: #fff; }

/* Tools */
.tool { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 20px 0; border-top: 1px solid var(--panel-border); }
.tool:last-child { padding-bottom: 0; }
.tool__body > p:last-child { margin-bottom: 0; }
@media (max-width: 560px) {
  .tool { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
.utils-grid--wiki { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 12px; margin-bottom: 16px; }

.create-patch { background: #121212; border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 18px; }
.input-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.input-list li {
  display: flex; align-items: center; gap: 12px;
  background: var(--subtle-bg); border: 1px solid var(--subtle-border); border-radius: 8px; padding: 10px 12px;
}
.input-list li div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.input-list li strong { font-size: .92rem; }
.input-list li div span { font-size: .85rem; color: var(--text-muted); line-height: 1.45; }
.input-list__num {
  width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center;
  font: 800 .85rem/1 var(--font-sans); color: var(--mc-grey-text);
  background: var(--mc-grey); border: 2.5px solid var(--mc-outline); border-radius: 4px;
  box-shadow: inset 2px 2px 0 var(--mc-grey-hi), inset -2px -3px 0 var(--mc-grey-lo);
}

/* Toggle row — patcher option-field + Minecraft toggle */
.option-field {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--subtle-bg); border: 1px solid var(--subtle-border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 14px;
}
.option-field > div { display: flex; flex-direction: column; gap: 4px; }
.option-name { font-weight: 600; font-size: .92rem; color: #fff; }
.option-desc { font-size: .85rem; color: var(--text-muted); line-height: 1.5; }
.mc-toggle { position: relative; display: inline-block; width: 48px; height: 24px; flex-shrink: 0; }
.mc-slider { position: absolute; inset: 0; background: var(--mc-slot); border: 2px solid var(--mc-outline); box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .5); }
.mc-slider::before {
  content: ""; position: absolute; left: 0; bottom: 0; height: 20px; width: 22px; z-index: 2;
  background: var(--mc-grey); box-shadow: inset 2px 2px 0 var(--mc-grey-hi), inset -2px -2px 0 var(--mc-grey-lo);
}
.mc-slider::after { content: "O"; position: absolute; right: 6px; top: 0; font: 700 13px/20px var(--font-sans); color: var(--mc-grey-text); }
.mc-slider.is-on { background: var(--mc-green-lo); }
.mc-slider.is-on::before { transform: translateX(22px); }
.mc-slider.is-on::after { content: "I"; left: 8px; right: auto; color: #fff; }

.check-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 8px 16px; }
.check-list li { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: #e5e7eb; }

/* App settings — patcher settings groups */
.settings-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 12px; }
.settings-group { background: var(--subtle-bg); border: 1px solid var(--subtle-border); border-radius: var(--radius); padding: 14px 16px; }
.settings-group__title {
  display: flex; align-items: center; gap: 8px;
  font-size: .72rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--primary-light);
  padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--panel-border);
}
.settings-group__title::before { content: ""; width: 8px; height: 8px; background: var(--primary-color); box-shadow: inset -2px -2px 0 var(--accent-color); }
.settings-group dl { margin: 0; }
.settings-group dl > div { padding: 9px 0; border-bottom: 1px dashed rgba(255, 255, 255, .06); }
.settings-group dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.settings-group dt { font-weight: 600; font-size: .9rem; color: #fff; }
.settings-group dd { margin: 3px 0 0; font-size: .85rem; color: var(--text-muted); line-height: 1.5; }

/* Troubleshooting — accordion in the patcher's dropdown style */
.faq { display: grid; gap: 8px; margin-bottom: 18px; }
.faq__item { background: var(--subtle-bg); border: 1px solid var(--subtle-border); border-radius: 8px; transition: border-color .2s, background-color .2s; }
.faq__item[open] { background: rgba(34, 197, 94, .05); border-color: rgba(34, 197, 94, .25); }
.faq__item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; font-weight: 600; font-size: .95rem; color: #fff;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--primary-light); }
.faq__item p { margin: 0; padding: 0 16px 14px; color: #d1d5db; font-size: .9rem; }
.faq__item img { display: block; width: calc(100% - 32px); max-width: 480px; margin: 0 16px 14px; border-radius: 8px; border: 1px solid var(--subtle-border); }

.stuck {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  background: rgba(96, 165, 250, .06); border: 1px solid rgba(96, 165, 250, .25); border-radius: var(--radius);
  padding: 16px 18px;
}
.stuck .wiki-h3 { margin: 0 0 2px; }
.stuck p { margin: 0; color: var(--text-muted); font-size: .9rem; }
.stuck__actions { display: flex; gap: 10px; flex-wrap: wrap; }
