/* Vesper Client website. Palette and button feel follow the in-game menus (Theme.java, MenuTheme.java, VesperButton). */

:root {
  color-scheme: dark;
  --ink: #090c17;
  --navy: #0e1220;
  --navy-2: #121729;
  --slate: #1a2033;
  --slate-2: #232a42;
  --line: #2b3350;
  --text: #e8eaf2;
  --muted: #a3a9c2;
  --dim: #6f7694;
  --lilac: #a78bfa;
  --green: #34d399;
  --red: #f87171;
  /* Theme accents: replaced live by the theme picker (js/themes.js). */
  --a: #8b5cf6;
  --b: #e0559b;
  --c: #f59e0b;
  --glow: #f59e0b;
  --grad: linear-gradient(90deg, var(--a), var(--b) 55%, var(--c));
  --grad-diag: linear-gradient(135deg, var(--a), var(--b) 55%, var(--c));
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 20px 60px -20px rgb(0 0 0 / 0.65);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--c); outline-offset: 3px; border-radius: 6px; }
.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 {
  position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px;
  background: var(--slate); border: 1px solid var(--line); text-decoration: none; transition: top .2s;
}
.skip:focus { top: 12px; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------------------------------------------------------------- buttons (VesperButton on the web) */
.btn {
  --h: 48px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--h); padding: 0 22px; border-radius: 12px;
  background: rgb(26 32 51 / 0.82); border: 1px solid var(--line);
  color: var(--text); font-weight: 600; letter-spacing: 0.01em; text-decoration: none;
  backdrop-filter: blur(8px);
  transition: background .2s, border-color .2s, transform .12s;
  overflow: hidden; isolation: isolate;
}
.btn::after { /* the accent line that grows from the centre on hover */
  content: ""; position: absolute; left: 50%; right: 50%; bottom: 0; height: 2px; background: var(--grad);
  transition: left .25s ease, right .25s ease;
}
.btn:hover { background: rgb(35 42 66 / 0.92); border-color: color-mix(in srgb, var(--a) 55%, var(--line)); }
.btn:hover::after, .btn:focus-visible::after { left: 0; right: 0; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--grad); border-color: transparent; color: #fff; text-shadow: 0 1px 2px rgb(0 0 0 / 0.25); }
.btn--primary::after { background: rgb(255 255 255 / 0.7); }
.btn--primary:hover { background: var(--grad); filter: brightness(1.08) saturate(1.05); border-color: transparent; }
.btn--sm { --h: 38px; padding: 0 14px; border-radius: 10px; font-size: 0.92rem; }
.btn svg { width: 18px; height: 18px; flex: none; }
/* Download: the arrow drops into the tray on hover. */
.btn--download { font-weight: 700; letter-spacing: 0.02em; }
.btn--download svg { overflow: visible; }
.btn--download .dl-arrow { transition: transform .25s ease; }
.btn--download:hover .dl-arrow, .btn--download:focus-visible .dl-arrow { transform: translateY(2px); animation: dl-drop 0.9s ease-in-out .25s infinite; }
@keyframes dl-drop { 50% { transform: translateY(-1px); } }

.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgb(14 18 32 / 0.6); border: 1px solid var(--line); font-size: 0.85rem; color: var(--muted);
  backdrop-filter: blur(6px);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: none; }
.dot--ok { background: var(--green); box-shadow: 0 0 0 0 rgb(52 211 153 / 0.6); animation: ping 2.4s infinite; }
.dot--warn { background: var(--c); }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgb(52 211 153 / 0); } 100% { box-shadow: 0 0 0 0 rgb(52 211 153 / 0); } }

.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--lilac); margin-bottom: 14px;
}
.section { position: relative; padding: clamp(48px, 7vw, 96px) 0; }
.section__head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section__head h2 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
.section__head p { margin-top: 16px; color: var(--muted); font-size: 1.08rem; }
.section__head--center { margin-inline: auto; text-align: center; }

/* ---------------------------------------------------------------- nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgb(9 12 23 / 0.78); border-color: rgb(43 51 80 / 0.7); backdrop-filter: blur(14px) saturate(1.2); }
.nav__in { height: 100%; display: flex; align-items: center; gap: 24px; }
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.nav__brand img { height: 30px; width: auto; }
.nav__links { display: flex; gap: 4px; margin: 0 auto; padding: 0; list-style: none; }
.nav__links a {
  display: block; padding: 8px 12px; border-radius: 9px; text-decoration: none; color: var(--muted); font-size: 0.95rem;
  transition: color .2s, background .2s;
}
.nav__links a:hover, .nav__links a[aria-current="true"] { color: var(--text); background: rgb(255 255 255 / 0.05); }
@media (max-width: 1120px) and (min-width: 901px) { .nav__links a { padding: 8px 8px; font-size: 0.9rem; } }
.nav__dl { display: none; }
.nav__menu { display: none; margin-left: auto; width: 42px; height: 42px; border-radius: 10px; background: transparent; border: 1px solid var(--line); }
.nav__menu span, .nav__menu span::before, .nav__menu span::after {
  display: block; width: 18px; height: 2px; background: var(--text); margin: auto; position: relative; transition: transform .25s, background .25s;
}
.nav__menu span::before, .nav__menu span::after { content: ""; position: absolute; left: 0; }
.nav__menu span::before { top: -6px; }
.nav__menu span::after { top: 6px; }
.nav[data-open] .nav__menu span { background: transparent; }
.nav[data-open] .nav__menu span::before { transform: translateY(6px) rotate(45deg); }
.nav[data-open] .nav__menu span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav__menu { display: block; }
  .nav__cta { display: none; }
  .nav__dl { display: block; }
  .nav__dl a { color: var(--text); font-weight: 700; }
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto; flex-direction: column; gap: 0; padding: 12px var(--gutter) 20px;
    background: rgb(9 12 23 / 0.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav__links a { padding: 14px 4px; font-size: 1.05rem; border-bottom: 1px solid rgb(43 51 80 / 0.5); border-radius: 0; }
  .nav[data-open] .nav__links { opacity: 1; transform: none; visibility: visible; }
  .nav[data-open] { background: rgb(9 12 23 / 0.96); }
}

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; min-height: clamp(640px, 100svh, 1080px); display: grid; align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 140px; overflow: hidden; isolation: isolate;
  background: linear-gradient(#090c17, #221e48 45%, #773667 75%, #ec8f4f);
}
.hero__sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero::after { /* blend into the page */
  content: ""; position: absolute; inset: auto 0 0; height: 120px; z-index: -1;
  background: linear-gradient(transparent, var(--navy));
}
.hero__in { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 40px; align-items: center; }
.hero__copy { max-width: 640px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); font-weight: 800; letter-spacing: -0.035em; text-wrap: balance; }
.hero h1 .grad-text { display: inline-block; padding-bottom: 0.08em; }
.hero__lede { margin-top: 22px; font-size: clamp(1.05rem, 1.7vw, 1.22rem); color: #cfd3e6; max-width: 560px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__note { margin-top: 14px; font-size: 0.88rem; color: var(--muted); }
.hero__logo { position: relative; justify-self: center; width: min(420px, 80%); aspect-ratio: 1; }
.hero__logo svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 40px color-mix(in srgb, var(--a) 45%, transparent)); }
.hero__halo {
  position: absolute; inset: 8%; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--a) 40%, transparent), transparent);
  animation: breathe 7s ease-in-out infinite;
}
.logo-float { animation: float 9s ease-in-out infinite; transform-origin: center; }
.logo-star { transform-box: fill-box; transform-origin: center; animation: spin 40s linear infinite; }
.logo-twinkle { transform-box: fill-box; transform-origin: center; animation: twinkle 5.3s ease-in-out infinite; }
.logo-glint { transform-box: fill-box; transform-origin: center; opacity: 0; animation: glint 5.3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-1.4%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%, 82%, 100% { transform: scale(1); } 88% { transform: scale(1.1); } }
@keyframes glint { 0%, 80%, 100% { opacity: 0; transform: scale(.6) rotate(45deg); } 88% { opacity: .9; transform: scale(1.1) rotate(45deg); } }
@keyframes breathe { 50% { transform: scale(1.08); opacity: .8; } }

.themes {
  position: absolute; right: var(--gutter); bottom: 120px; z-index: 2;
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-radius: 999px;
  background: rgb(9 12 23 / 0.55); border: 1px solid rgb(255 255 255 / 0.1); backdrop-filter: blur(10px);
}
.themes__label { font-size: 0.8rem; color: var(--muted); }
.themes__list { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.swatch {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; padding: 0;
  background: var(--sw); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.2); transition: transform .15s, border-color .2s;
}
.swatch:hover { transform: scale(1.12); }
.swatch[aria-pressed="true"] { border-color: #fff; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 56px; translate: -50% 0; z-index: 2; width: 26px; height: 42px;
  border: 2px solid rgb(255 255 255 / 0.35); border-radius: 14px;
}
.scroll-cue::after {
  content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px;
  background: #fff; animation: cue 2s ease-in-out infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

@media (max-width: 900px) {
  .hero { padding-bottom: 170px; }
  .hero__in { grid-template-columns: 1fr; }
  .hero__logo { order: -1; width: 150px; justify-self: start; }
  .themes { left: var(--gutter); right: auto; bottom: 96px; }
  .scroll-cue { display: none; }
}

/* ---------------------------------------------------------------- stats ribbon */
.stats { position: relative; z-index: 2; margin-top: -40px; }
.stats__grid {
  display: grid; grid-template-columns: repeat(5, 1fr); border-radius: var(--radius);
  background: rgb(18 23 41 / 0.9); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(10px);
}
.stat { display: flex; flex-direction: column-reverse; padding: 24px 20px; text-align: center; border-left: 1px solid var(--line); }
.stat__n { margin: 0; }
.stat:first-child { border-left: 0; }
.stat__n { font: 800 clamp(1.8rem, 3.6vw, 2.6rem)/1 var(--font-display); letter-spacing: -0.03em; }
.stat__l { margin-top: 6px; color: var(--muted); font-size: 0.9rem; }
@media (max-width: 760px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: 0; border-top: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .stat:last-child { grid-column: span 2; border-left: 0; }
}

/* ---------------------------------------------------------------- pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  --mx: 50%; --my: 50%;
  position: relative; padding: 28px; border-radius: var(--radius); background: var(--navy-2); border: 1px solid var(--line);
  overflow: hidden; isolation: isolate; transition: border-color .25s, transform .25s;
}
.card::before { /* cursor-following glow */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--a) 22%, transparent), transparent 60%);
}
.card:hover { border-color: color-mix(in srgb, var(--a) 45%, var(--line)); }
.card:hover::before { opacity: 1; }
.card__icon {
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; margin-bottom: 20px;
  background: linear-gradient(var(--slate), var(--slate)) padding-box, var(--grad-diag) border-box; border: 1px solid transparent;
}
.card__icon img { width: 30px; height: 30px; image-rendering: auto; }
.card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.card p { color: var(--muted); }
.card ul { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 0.93rem; color: #c9cde0; }
.card li { display: flex; gap: 10px; }
.card li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 0.6em; border-radius: 2px; background: var(--grad); rotate: 45deg; }
@media (max-width: 980px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .pillars { grid-template-columns: 1fr; } .card { padding: 22px; } }

/* ---------------------------------------------------------------- mod explorer (the in-game Mods page) */
.explorer {
  border-radius: 18px; background: rgb(14 18 32 / 0.92); border: 1px solid var(--line); box-shadow: var(--shadow);
  overflow: hidden;
}
.explorer__bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  padding: 16px; border-bottom: 1px solid var(--line); background: rgb(9 12 23 / 0.5);
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--slate);
  font-size: 0.88rem; color: var(--muted); transition: color .2s, border-color .2s, background .2s;
}
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { color: #fff; border-color: transparent; background: var(--grad); }
.chip__n { opacity: 0.7; margin-left: 4px; font-size: 0.8em; }
.explorer__tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search {
  position: relative; display: flex; align-items: center;
}
.search svg { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--dim); pointer-events: none; }
.search input {
  width: 220px; height: 38px; padding: 0 12px 0 36px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--navy); outline: none; transition: border-color .2s;
}
.search input:focus { border-color: var(--a); }
.toggle-filter { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.toggle-filter button { height: 36px; padding: 0 12px; background: var(--navy); border: 0; color: var(--muted); font-size: 0.86rem; }
.toggle-filter button[aria-pressed="true"] { background: var(--slate-2); color: var(--text); }
.explorer__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 16px;
  max-height: 760px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.explorer__status { padding: 10px 16px; border-top: 1px solid var(--line); color: var(--dim); font-size: 0.85rem; display: flex; justify-content: space-between; gap: 12px; }
.mod {
  display: flex; flex-direction: column; border-radius: 12px; background: var(--slate); border: 1px solid var(--line);
  overflow: hidden; transition: border-color .2s, transform .2s;
  animation: pop .35s both;
}
.mod:hover { border-color: color-mix(in srgb, var(--a) 50%, var(--line)); transform: translateY(-2px); }
.mod__top { display: flex; gap: 14px; padding: 16px 16px 12px; flex: 1; }
.mod__icon { flex: none; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--navy); }
.mod__icon img { width: 30px; height: 30px; }
.mod h3 { font-size: 1rem; letter-spacing: 0; }
.mod__cat { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lilac); }
.mod p { margin-top: 6px; font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.mod__key { display: inline-block; margin-top: 8px; font: 600 0.75rem var(--mono); padding: 2px 7px; border-radius: 6px; background: var(--navy); border: 1px solid var(--line); color: #cfd3e6; }
.mod__bar {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 36px; border: 0; border-top: 1px solid var(--line);
  background: rgb(9 12 23 / 0.5); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red);
  transition: background .2s, color .2s;
}
.mod__bar[aria-pressed="true"] { color: var(--green); background: rgb(52 211 153 / 0.08); }
.mod__bar:hover { background: rgb(255 255 255 / 0.05); }
.mod__bar .dot { background: currentColor; }
.explorer__empty { grid-column: 1 / -1; padding: 48px 16px; text-align: center; color: var(--muted); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@media (max-width: 980px) { .explorer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) {
  .explorer__grid { grid-template-columns: 1fr; max-height: 640px; }
  .search input { width: 100%; }
  .search, .explorer__tools { width: 100%; }
  .search { flex: 1; }
}

/* ---------------------------------------------------------------- wardrobe (cosmetics) */
.wardrobe { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.viewer {
  position: relative; min-height: 520px; border-radius: 18px; border: 1px solid var(--line); overflow: hidden;
  background: radial-gradient(60% 50% at 50% 85%, color-mix(in srgb, var(--b) 28%, transparent), transparent 70%),
    linear-gradient(#0d1124, #1d1838 60%, #2b1d3f);
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.viewer:active { cursor: grabbing; }
.viewer__floor {
  position: absolute; left: 50%; bottom: 12%; width: 280px; height: 56px; translate: -50% 0; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(0 0 0 / 0.55), transparent);
}
.viewer__hint { position: absolute; left: 16px; bottom: 14px; font-size: 0.82rem; color: var(--muted); }
.viewer__name { position: absolute; left: 18px; top: 16px; }
.viewer__name b { display: block; font-size: 1.15rem; }
.viewer__name span { font-size: 0.82rem; color: var(--muted); }
.scene { position: absolute; inset: 0; perspective: 1200px; perspective-origin: 50% 35%; pointer-events: none; }

/* Model space: one unit = --u px, y down, z towards the viewer when --ry is 0. Parts are zero-size pivots placed
   with --px/--py/--pz; boxes are zero-size centres placed with --bx/--by and sized --w/--h/--d. */
.rig {
  --u: 11px; --ry: -28deg;
  position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d;
  transform: translateY(calc(var(--u) * 3)) rotateX(-8deg) rotateY(var(--ry));
}
.part {
  --base: translate3d(calc(var(--px, 0) * var(--u)), calc(var(--py, 0) * var(--u)), calc(var(--pz, 0) * var(--u)));
  position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; transform: var(--base);
}
/* JS builds every box (js/wardrobe.js): faces sized in px and textured with Minecraft's skin UV layout. */
.box3 { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; }
.face { position: absolute; backface-visibility: hidden; background-repeat: no-repeat; image-rendering: pixelated; }
.overlay .face { backface-visibility: visible; }
.cape-seg { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; }

/* Pivots (Minecraft player proportions): hips at y 0, body 8x12x4 above, head 8x8x8, arms and legs 4x12x4. */
.torso { --py: 0; }
.leg-l { --px: 2; --py: 0; }
.leg-r { --px: -2; --py: 0; }
.head { --py: -12; }
.arm-l { --px: 5; --py: -10; }
.arm-r { --px: -5; --py: -10; }
.cape-mount { --py: -12; --pz: -2; }
.wing-mount-l { --px: 1.5; --py: -9.5; --pz: -3.1; --mirror: scaleX(1); }
.wing-mount-r { --px: -1.5; --py: -9.5; --pz: -3.1; --mirror: scaleX(-1); }

.wing {
  position: absolute; left: 0; top: calc(var(--wt) * var(--u) * -1); /* the texture's left edge is the wing root */
  width: calc(var(--ww) * var(--u)); height: calc(var(--wh) * var(--u));
  background: var(--wing-img) 0 0 / 100% 100% no-repeat; image-rendering: pixelated;
}
.wing.is-glow { filter: drop-shadow(0 0 8px color-mix(in srgb, var(--a) 70%, transparent)); opacity: 0.9; }
.wing-mount { transform: var(--base) var(--mirror) rotateY(30deg); animation: flap 2.6s ease-in-out infinite; }
@keyframes flap { 50% { transform: var(--base) var(--mirror) rotateY(62deg); } }

/* Emotes (a few of the ten from EmoteCatalog), posed about the shoulders and hips. */
.rig[data-emote="wave"] .arm-r { animation: e-wave 1.4s ease-in-out infinite; }
.rig[data-emote="cheer"] .arm-r { animation: e-cheer-r .9s ease-in-out infinite; }
.rig[data-emote="cheer"] .arm-l { animation: e-cheer-l .9s ease-in-out infinite; }
.rig[data-emote="cheer"] .torso { animation: e-hop .9s ease-in-out infinite; }
.rig[data-emote="clap"] .arm-r { animation: e-clap-r .5s ease-in-out infinite; }
.rig[data-emote="clap"] .arm-l { animation: e-clap-l .5s ease-in-out infinite; }
.rig[data-emote="groove"] .torso { animation: e-groove .8s ease-in-out infinite; }
.rig[data-emote="groove"] .arm-r { animation: e-swing .8s ease-in-out infinite; }
.rig[data-emote="groove"] .arm-l { animation: e-swing .8s ease-in-out infinite reverse; }
.rig[data-emote="groove"] .head { animation: e-nod .4s ease-in-out infinite; }
.rig[data-emote="salute"] .arm-r { animation: e-salute 2.4s ease-in-out infinite; }
@keyframes e-wave { 0%, 100% { transform: var(--base) rotateZ(155deg); } 50% { transform: var(--base) rotateZ(120deg); } }
@keyframes e-cheer-r { 0%, 100% { transform: var(--base) rotateZ(165deg); } 50% { transform: var(--base) rotateZ(140deg); } }
@keyframes e-cheer-l { 0%, 100% { transform: var(--base) rotateZ(-165deg); } 50% { transform: var(--base) rotateZ(-140deg); } }
@keyframes e-hop { 50% { transform: var(--base) translateY(calc(var(--u) * -0.8)); } }
@keyframes e-clap-r { 0%, 100% { transform: var(--base) rotateY(18deg) rotateX(80deg); } 50% { transform: var(--base) rotateY(6deg) rotateX(80deg); } }
@keyframes e-clap-l { 0%, 100% { transform: var(--base) rotateY(-18deg) rotateX(80deg); } 50% { transform: var(--base) rotateY(-6deg) rotateX(80deg); } }
@keyframes e-groove { 0%, 100% { transform: var(--base) rotateZ(-7deg); } 50% { transform: var(--base) rotateZ(7deg); } }
@keyframes e-swing { 0%, 100% { transform: var(--base) rotateX(-45deg); } 50% { transform: var(--base) rotateX(45deg); } }
@keyframes e-nod { 50% { transform: var(--base) rotateX(-12deg); } }
@keyframes e-salute { 0%, 100% { transform: var(--base) rotateY(40deg) rotateX(145deg); } 50% { transform: var(--base) rotateY(44deg) rotateX(150deg); } }

.skin-form { display: flex; gap: 8px; flex-wrap: wrap; }
.skin-form__name {
  flex: 1 1 160px; min-width: 0; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--navy); outline: none; transition: border-color .2s;
}
.skin-form__name:focus { border-color: var(--a); }
.skin-form__file { cursor: pointer; }
.skin-form__file:focus-within { outline: 2px solid var(--c); outline-offset: 3px; }
.skin-opts { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.skin-opts .switch { gap: 10px; }
.linkish { background: none; border: 0; padding: 0; color: var(--lilac); text-decoration: underline; text-underline-offset: 3px; font-size: 0.92rem; }
.skin-status { min-height: 1.3em; font-size: 0.88rem; color: var(--muted); margin-top: -4px; }
.skin-status.is-bad { color: var(--red); }
.shelf { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tabs { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: var(--navy-2); border: 1px solid var(--line); }
.tabs button { flex: 1; height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; }
.tabs button[aria-selected="true"] { background: var(--slate-2); color: var(--text); box-shadow: inset 0 -2px 0 0 var(--c); }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.item {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 10px; border-radius: 12px;
  background: var(--navy-2); border: 1px solid var(--line); font-size: 0.85rem; text-align: center; transition: border-color .2s, transform .2s;
}
.item:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--a) 50%, var(--line)); }
.item[aria-pressed="true"] { background: linear-gradient(var(--navy-2), var(--navy-2)) padding-box, var(--grad-diag) border-box; border-color: transparent; }
.item__thumb { width: 44px; height: 70px; border-radius: 4px; background-color: var(--slate); background-repeat: no-repeat; image-rendering: pixelated; }
.item__thumb--wing { width: 70px; height: 70px; background-color: transparent; background-size: contain; background-position: center; }
.item__thumb--emote { background-color: transparent; }
.item__thumb--emote { width: 48px; height: 48px; display: grid; place-items: center; font-size: 1.5rem; border-radius: 12px; }
.item__tag { position: absolute; top: 6px; right: 6px; font-size: 0.62rem; padding: 1px 6px; border-radius: 99px; background: var(--grad); color: #fff; font-weight: 700; letter-spacing: 0.04em; }
.more { padding: 16px 18px; border-radius: 12px; background: var(--navy-2); border: 1px dashed var(--line); color: var(--muted); font-size: 0.92rem; }
.more b { color: var(--text); }
@media (max-width: 900px) { .wardrobe { grid-template-columns: 1fr; } .viewer { min-height: 440px; } }

/* ---------------------------------------------------------------- social */
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.split--rev > :first-child { order: 2; }
.shot { position: relative; perspective: 1400px; }
.shot__frame {
  border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow), 0 0 80px -30px var(--a);
  transform: rotateY(-8deg) rotateX(4deg); transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.shot:hover .shot__frame { transform: none; }
.shot__frame img { width: 100%; height: auto; }
.toast {
  position: absolute; right: -12px; top: -18px; display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px;
  background: rgb(18 23 41 / 0.95); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 0.9rem;
  animation: toast 6s ease-in-out infinite;
}
.toast b { color: var(--c); }
@keyframes toast { 0%, 8% { opacity: 0; transform: translateY(-10px); } 14%, 70% { opacity: 1; transform: none; } 78%, 100% { opacity: 0; transform: translateY(-10px); } }
.section__title { font-size: clamp(2rem, 4.6vw, 3.2rem); }
.section__lede { margin-top: 16px; color: var(--muted); font-size: 1.08rem; }
.feature-list { display: grid; gap: 14px; margin: 26px 0 0; padding: 0; list-style: none; }
.feature-list li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; }
.feature-list .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--slate); border: 1px solid var(--line); }
.feature-list .ico svg { width: 18px; height: 18px; color: var(--c); }
.feature-list b { display: block; }
.feature-list span { color: var(--muted); font-size: 0.94rem; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split--rev > :first-child { order: 0; } .toast { right: 8px; } }

/* ---------------------------------------------------------------- menus, accounts, performance mini grid */
.mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.mini .card { padding: 22px; }
.mini h3 { font-size: 1.05rem; }
.mini p { font-size: 0.92rem; }
.kbd { font: 600 0.8em var(--mono); padding: 1px 6px; border-radius: 6px; background: var(--slate-2); border: 1px solid var(--line); color: var(--text); white-space: nowrap; }
@media (max-width: 980px) { .mini { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .mini { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- get started */
.start {
  position: relative; border-radius: 22px; padding: clamp(28px, 5vw, 56px); overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, #171b30, #221e48 50%, #3f285c); border: 1px solid var(--line);
}
.start::before {
  content: ""; position: absolute; inset: auto -10% -60% 30%; height: 120%; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 35%, transparent), transparent);
}
.start__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.start h2 { font-size: clamp(2rem, 4.4vw, 3rem); }
.start p { color: #cfd3e6; margin-top: 14px; }
.steps { counter-reset: step; display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.steps li {
  counter-increment: step; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start;
  padding: 16px; border-radius: 12px; background: rgb(9 12 23 / 0.45); border: 1px solid rgb(255 255 255 / 0.08);
}
.steps li::before {
  content: counter(step); width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 800;
  background: var(--grad-diag); color: #fff;
}
.steps b { display: block; }
.steps span { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 900px) { .start__grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- FAQ */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 10px; }
.faq details { border-radius: 12px; background: var(--navy-2); border: 1px solid var(--line); transition: border-color .2s; }
.faq details[open] { border-color: color-mix(in srgb, var(--a) 45%, var(--line)); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 52px 18px 20px; font-weight: 600; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); rotate: 45deg; transition: rotate .25s, margin .25s;
}
.faq details[open] summary::after { rotate: 225deg; margin-top: -2px; }
.faq .ans { padding: 0 20px 20px; color: var(--muted); }
.faq .ans p + p { margin-top: 10px; }

/* ---------------------------------------------------------------- community + footer */
.community { text-align: center; }
.community .card { max-width: 760px; margin: 0 auto; padding: clamp(28px, 5vw, 48px); }
.community .card h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.community .card p { margin: 14px auto 0; max-width: 520px; }
.community .btn { margin-top: 24px; }
.btn[aria-disabled="true"] { opacity: .65; cursor: not-allowed; }
.footer { border-top: 1px solid var(--line); padding: 48px 0 40px; color: var(--dim); font-size: 0.9rem; background: var(--ink); }
.footer__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-start; }
.footer img { height: 34px; width: auto; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer nav a { text-decoration: none; color: var(--muted); }
.footer nav a:hover { color: var(--text); }
.footer__legal { margin-top: 28px; font-size: 0.82rem; max-width: 760px; }

/* ---------------------------------------------------------------- scroll reveals */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- guide page (/play/) */
.page-hero { padding: calc(var(--nav-h) + 72px) 0 56px; background: linear-gradient(#090c17, #171b30); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.2rem, 5.6vw, 3.8rem); }
.page-hero p { margin-top: 16px; color: var(--muted); max-width: 680px; font-size: 1.1rem; }
.guide-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding: 56px 0 96px; }
.toc { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; display: grid; gap: 4px; font-size: 0.92rem; }
.toc a { text-decoration: none; color: var(--muted); padding: 6px 10px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--text); border-color: var(--a); }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.7rem; margin: 48px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.15rem; margin: 26px 0 10px; }
.prose p, .prose li { color: #c9cde0; }
.prose p + p { margin-top: 12px; }
.prose ol, .prose ul { padding-left: 22px; display: grid; gap: 8px; }
.prose a { color: var(--lilac); }
.prose code { font: 0.9em var(--mono); padding: 1px 6px; border-radius: 6px; background: var(--slate); border: 1px solid var(--line); }
/* setup guide: version picker and downloads */
.download { margin: 20px 0; padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--navy-2); }
.download__label { margin: 0 0 10px; font-weight: 600; color: var(--text); }
.download__versions .chip { min-height: 40px; }
.download__hint { margin: 12px 0 0; font-size: 0.92rem; }
.download__panel { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.download__panel[hidden], .download [hidden] { display: none; }
.download__release { margin: 0 0 12px; color: var(--text); font-weight: 600; }
.download__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.prose .download__actions .btn { color: var(--text); text-decoration: none; }
.prose .download__actions .btn--primary { color: #fff; }
.download__size { opacity: 0.75; font-weight: 400; font-size: 0.88em; }
.download__notes { margin: 12px 0 0; font-size: 0.92rem; }
@media (max-width: 520px) { .download__actions .btn { width: 100%; justify-content: center; } }
.callout[hidden] { display: none; }
.callout { margin: 20px 0; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--navy-2); }
.callout--warn { border-color: color-mix(in srgb, var(--c) 55%, var(--line)); }
.callout b { color: var(--text); }
.table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 0.94rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }
@media (max-width: 860px) { .guide-body { grid-template-columns: 1fr; } .toc { position: static; display: none; } }

/* ---------------------------------------------------------------- changelog (/changelog/) */
.toc__note {
  margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: #fff; background: var(--grad);
}
.changelog__body { display: grid; gap: 28px; min-width: 0; }
.changelog__filters[hidden], .changelog__empty[hidden], .release[hidden], .release__group[hidden], .release li[hidden] { display: none; }
.changelog__filters {
  display: flex; flex-wrap: wrap; gap: 14px 28px; padding: 16px 18px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--navy-2);
}
.changelog__filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.changelog__filter-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }
.changelog__empty { color: var(--muted); text-align: center; padding: 24px; }

/* A release: a notched card (the in-game Observatory shape) with the theme's gradient along its top edge. */
.release {
  position: relative; padding: clamp(20px, 3vw, 32px); background: var(--navy-2); border: 1px solid var(--line);
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
  scroll-margin-top: calc(var(--nav-h) + 20px);
}
.release::before { content: ""; position: absolute; left: 18px; right: 0; top: 0; height: 2px; background: var(--grad); opacity: .55; }
.release--next { background: linear-gradient(160deg, color-mix(in srgb, var(--a) 14%, var(--navy-2)), var(--navy-2) 55%); }
.release--next::before { opacity: 1; }
.release__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.release__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; min-width: 0; }
.release__title h2 { flex-basis: 100%; font-size: clamp(1.5rem, 3.2vw, 2rem); }
.release__version {
  font: 700 0.95rem var(--mono); padding: 3px 10px; border-radius: 8px; color: var(--text);
  background: linear-gradient(var(--slate), var(--slate)) padding-box, var(--grad-diag) border-box; border: 1px solid transparent;
}
.release__badge {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 3px 9px;
  border-radius: 999px; color: var(--muted); border: 1px solid var(--line);
}
.release--next .release__badge { color: #fff; border-color: transparent; background: var(--grad); }
.release__badge--latest { color: var(--green); border-color: color-mix(in srgb, var(--green) 45%, var(--line)); }
.release__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; color: var(--muted); font-size: 0.92rem; }
.release__mc { display: inline-flex; gap: 6px; }
.release__callout { margin: 16px 0 0; max-width: 760px; }
.release__callout a { color: var(--lilac); }
.release__lede { margin-top: 18px; color: #c9cde0; font-size: 1.04rem; max-width: 760px; }
.release__group { margin-top: 22px; }
.release__group h3 { margin-bottom: 10px; }
.release__group ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.release__group li { position: relative; padding-left: 20px; color: #c9cde0; }
.release__group li::before { /* a small four-pointed star */
  content: ""; position: absolute; left: 2px; top: 0.5em; width: 9px; height: 9px; background: var(--grad-diag);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}
.release__group b { color: var(--text); }
.release__group a { color: var(--lilac); }
.release__group code { font: 0.88em var(--mono); padding: 1px 6px; border-radius: 6px; background: var(--slate); border: 1px solid var(--line); }
.kind {
  display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; padding: 4px 11px 4px 10px; border-radius: 8px; border: 1px solid;
}
.kind::before { content: ""; width: 7px; height: 7px; rotate: 45deg; background: currentColor; }
.kind--added { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); background: color-mix(in srgb, var(--green) 10%, transparent); }
.kind--fixed { color: #7dd3fc; border-color: color-mix(in srgb, #7dd3fc 40%, transparent); background: color-mix(in srgb, #7dd3fc 10%, transparent); }
.kind--removed { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); background: color-mix(in srgb, var(--red) 10%, transparent); }
.mcs { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: 1px; }
.mc {
  font: 600 0.72rem var(--mono); padding: 1px 6px; border-radius: 5px; color: var(--muted);
  background: var(--slate); border: 1px solid var(--line); white-space: nowrap;
}

/* The author: a breathing bust of their Minecraft skin (js/changelog.js builds the boxes). */
.author { display: inline-flex; align-items: center; gap: 10px; }
.author__text { display: grid; line-height: 1.2; }
.author__name { color: var(--text); font-weight: 700; }
.author__role { font-size: 0.8rem; color: var(--dim); }
.bust {
  --s: 52px;
  position: relative; flex: none; width: var(--s); height: var(--s); overflow: hidden; border-radius: 14px;
  background:
    radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--a) 38%, transparent), transparent 68%) padding-box,
    linear-gradient(#1a1f38, #0b0e1a) padding-box,
    var(--grad-diag) border-box;
  border: 1.5px solid transparent;
  perspective: 420px;
}
.bust__rig {
  position: absolute; left: 50%; top: calc(var(--u) * 10.2); width: 0; height: 0; transform-style: preserve-3d;
  transform: rotateX(-12deg) rotateY(-26deg);
  animation: bust-sway 10s ease-in-out infinite var(--phase, 0s) paused;
}
.bust__part { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; transform: var(--at); }
.bust__torso { animation: bust-chest 4s ease-in-out infinite var(--phase, 0s) paused; }
.bust__head { animation: bust-head 4s ease-in-out infinite calc(var(--phase, 0s) - 0.25s) paused; }
.bust__arm--r { animation: bust-arm-r 4s ease-in-out infinite var(--phase, 0s) paused; }
.bust__arm--l { animation: bust-arm-l 4s ease-in-out infinite var(--phase, 0s) paused; }
.bust.is-live .bust__rig, .bust.is-live .bust__part { animation-play-state: running; }
@keyframes bust-sway { 0%, 100% { transform: rotateX(-12deg) rotateY(-30deg); } 50% { transform: rotateX(-9deg) rotateY(-16deg); } }
@keyframes bust-chest { 50% { transform: var(--at) translateY(calc(var(--u) * -0.16)) scale3d(1.035, 1, 1.07); } }
@keyframes bust-head { 50% { transform: var(--at) translateY(calc(var(--u) * -0.34)) rotateX(-3deg); } }
@keyframes bust-arm-r { 50% { transform: var(--at) translateY(calc(var(--u) * -0.26)) rotateZ(2.5deg); } }
@keyframes bust-arm-l { 50% { transform: var(--at) translateY(calc(var(--u) * -0.26)) rotateZ(-2.5deg); } }
@media (max-width: 560px) { .release__meta { width: 100%; } .bust { --s: 46px; } }

/* ---------------------------------------------------------------- mods documentation (/mods/) */
.docs { display: grid; gap: 40px; min-width: 0; }
.docs__tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.docs__count { color: var(--dim); font-size: 0.9rem; }
.docs__cat[hidden], .doc[hidden], .docs__empty[hidden] { display: none; }
.docs__cat h2 { font-size: 1.5rem; margin-bottom: 6px; scroll-margin-top: calc(var(--nav-h) + 24px); }
.docs__cat > p { color: var(--muted); margin-bottom: 16px; }
.docs__list { display: grid; gap: 12px; }
.doc {
  display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; padding: 18px; border-radius: 14px;
  background: var(--navy-2); border: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 24px);
}
.doc:target { border-color: var(--a); }
.doc .mod__icon { width: 52px; height: 52px; }
.doc h3 { font-size: 1.1rem; letter-spacing: 0; }
.doc h3 a { color: inherit; text-decoration: none; }
.doc h3 a:hover { color: var(--lilac); }
.doc p { margin-top: 6px; color: #c9cde0; line-height: 1.6; }
.doc__facts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; padding: 0; font-size: 0.86rem; }
.doc__facts div { display: flex; gap: 6px; align-items: center; }
.doc__facts dt { color: var(--dim); }
.doc__facts dd { margin: 0; color: var(--text); }
.doc__on { color: var(--green) !important; }
.doc__off { color: var(--muted) !important; }
.docs__empty { color: var(--muted); text-align: center; padding: 24px; }
@media (max-width: 520px) { .doc { grid-template-columns: 1fr; } .docs__tools .search, .docs__tools .search input { width: 100%; } }

/* ---------------------------------------------------------------- 404 */
.lost { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 24px; background: linear-gradient(#090c17, #221e48 60%, #773667); }
.lost h1 { font-size: clamp(3rem, 12vw, 7rem); }
.lost p { color: #cfd3e6; margin: 12px 0 28px; }

/* ---------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .shot__frame { transform: none; }
  .toast { animation: none; }
}
.lost__mark { margin: 0 auto 8px; animation: float 9s ease-in-out infinite; }
