/* =========================================================
   LevelZ Mod — "Iron Ledger" design system
   Brand: leather #745138 · iron #919191 · ink #171818
   ========================================================= */

:root {
  --leather: #745138;
  --leather-deep: #4e3524;
  --leather-light: #a57a58;
  --leather-tint: #efe5dc;
  --iron: #919191;
  --iron-light: #c9c9c7;
  --iron-dark: #5d5d5c;
  --ink: #171818;
  --ink-2: #242626;
  --stone: #e7e5e0;
  --stone-2: #dcd9d2;
  --paper: #f5f3ef;
  --text: #171818;
  --muted: #55524d;
  --gold: #d9b37a;
  --ok: #4f7a4a;
  --no: #8a3b2e;
  --rail: 0px;
  --radius: 4px;
  --shadow-block: 6px 6px 0 var(--ink);
  --f-head: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --f-body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-pixel: "Silkscreen", "Courier New", ui-monospace, monospace;
  --ease: cubic-bezier(.2,.8,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--stone);
  background-image:
    linear-gradient(rgba(23,24,24,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,24,24,.035) 1px, transparent 1px);
  background-size: 48px 48px;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--leather-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--leather); }
:focus-visible { outline: 3px solid var(--leather); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--f-head); line-height: 1.02; margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-weight: 900; }
h2 { font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2rem); text-transform: uppercase; overflow-wrap: break-word; hyphens: auto; }
h1, h3 { overflow-wrap: break-word; }
h3 { font-weight: 800; font-size: clamp(1.125rem, 1.6vw, 1.35rem); }
p { margin: 0 0 1.1em; }
code, kbd, pre { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .9em; }
code { background: rgba(116,81,56,.12); padding: .1em .4em; border-radius: 3px; overflow-wrap: anywhere; }
kbd { background: var(--ink); color: #fff; padding: .15em .55em; border-radius: 3px; box-shadow: 0 3px 0 var(--iron-dark); }
.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: absolute; left: -999px; top: 8px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; }
.skip:focus { left: 8px; }

.pixel { font-family: var(--f-pixel); font-weight: 400; letter-spacing: .04em; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
.wrap-narrow { max-width: 860px; }

/* ---------------- Top header (desktop) ---------------- */
.rail {
  position: sticky; top: 0; z-index: 90; height: 76px;
  background: var(--ink); color: #fff;
  display: flex; flex-direction: row; align-items: center; gap: 28px;
  padding: 0 clamp(16px, 3vw, 40px); border-bottom: 4px solid var(--leather);
}
.rail-logo { display: flex; align-items: center; gap: 12px; flex: none; text-decoration: none; transition: transform .3s var(--ease); }
.rail-logo img { width: 48px; height: 48px; image-rendering: pixelated; border: 3px solid var(--iron); box-shadow: 4px 4px 0 var(--leather); transition: transform .3s var(--ease); }
.rail-logo:hover img { transform: rotate(-6deg) scale(1.06); }
.rail-logo b { font-family: var(--f-head); font-weight: 900; font-size: 1.7rem; letter-spacing: .05em; text-transform: uppercase; color: #fff; line-height: 1; }
.rail-logo b small { display: block; font-family: var(--f-pixel); font-weight: 400; font-size: .52rem; letter-spacing: .04em; color: var(--iron); margin-top: 4px; }
.rail-nav { flex: 1; display: flex; justify-content: center; height: 100%; }
.rail-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; gap: 4px; height: 100%; }
.rail-nav li { display: flex; }
.rail-nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 0 16px; color: #cfcfcd; text-decoration: none;
  font-family: var(--f-head); font-weight: 700; font-size: 1.08rem; letter-spacing: .14em; text-transform: uppercase;
  border-bottom: 4px solid transparent; margin-bottom: -4px; transition: color .2s, border-color .2s, background .2s;
}
.rail-nav a span { font-family: var(--f-pixel); font-size: .6rem; color: var(--iron); letter-spacing: 0; }
.rail-nav a:hover, .rail-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--gold); background: rgba(255,255,255,.04); }
.rail-dl {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; text-decoration: none;
  background: var(--leather); color: #fff; border: 3px solid #fff; box-shadow: 4px 4px 0 var(--iron-dark);
  font-family: var(--f-head); font-weight: 800; font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase;
  transition: transform .2s var(--ease), box-shadow .2s;
}
.rail-dl:hover { color: #fff; transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--iron-dark); }
.rail-dl svg { width: 20px; height: 20px; }
html { scroll-padding-top: 84px; }
@media (max-width: 1240px) {
  .rail { gap: 14px; }
  .rail-nav ul { gap: 0; }
  .rail-nav a { padding: 0 9px; letter-spacing: .07em; font-size: 1rem; }
  .rail-nav a span { display: none; }
  .rail-logo b { font-size: 1.45rem; }
  .rail-logo b small { display: none; }
}

/* ---------------- Mobile top bar ---------------- */
.topbar { display: none; }
.menu-overlay { display: none; }

.site { min-width: 0; }

@media (max-width: 1023px) {
  .rail { display: none; }
  html { scroll-padding-top: 72px; }
  .topbar {
    display: flex; position: sticky; top: 0; z-index: 95; height: 64px;
    align-items: center; justify-content: space-between; gap: 12px;
    padding: 0 16px; background: var(--ink); color: #fff; border-bottom: 4px solid var(--leather);
  }
  .topbar-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--f-head); font-weight: 900; font-size: 1.5rem; letter-spacing: .04em; text-transform: uppercase; }
  .topbar-brand img { width: 38px; height: 38px; border: 2px solid var(--iron); image-rendering: pixelated; }
  .menu-btn {
    display: inline-flex; align-items: center; gap: 10px; background: transparent; color: #fff;
    border: 2px solid var(--iron); padding: 8px 12px; font-family: var(--f-pixel); font-size: .72rem; cursor: pointer;
  }
  .menu-btn .bars { width: 18px; height: 12px; position: relative; }
  .menu-btn .bars::before, .menu-btn .bars::after, .menu-btn .bars span { content: ""; position: absolute; left: 0; width: 100%; height: 2px; background: #fff; transition: transform .25s, opacity .2s; }
  .menu-btn .bars::before { top: 0; } .menu-btn .bars span { top: 5px; } .menu-btn .bars::after { top: 10px; }
  .menu-btn[aria-expanded="true"] .bars::before { transform: translateY(5px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .bars::after { transform: translateY(-5px) rotate(-45deg); }
  .menu-btn[aria-expanded="true"] .bars span { opacity: 0; }
  .menu-overlay {
    display: block; position: fixed; inset: 64px 0 0 0; z-index: 94; background: var(--ink); color: #fff;
    padding: 28px 20px 40px; overflow-y: auto;
    transform: translateY(-110%); visibility: hidden; transition: transform .35s var(--ease), visibility .35s;
  }
  .menu-overlay.open { transform: none; visibility: visible; }
  .menu-overlay ol { list-style: none; margin: 0 0 28px; padding: 0; counter-reset: m; }
  .menu-overlay li { counter-increment: m; border-bottom: 1px solid rgba(255,255,255,.12); }
  .menu-overlay li a { display: flex; align-items: baseline; gap: 14px; padding: 14px 0; color: #fff; text-decoration: none; font-family: var(--f-head); font-weight: 800; font-size: 2.2rem; text-transform: uppercase; }
  .menu-overlay li a::before { content: none; font-family: var(--f-pixel); font-size: .7rem; color: var(--iron); font-weight: 400; }
  .menu-overlay li a[aria-current="page"] { color: var(--gold); }
  body.menu-open { overflow: hidden; }
}

/* ---------------- Buttons ---------------- */
.btn {
  --bg: var(--leather); --fg: #fff; --edge: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; min-height: 52px; background: var(--bg); color: var(--fg);
  border: 3px solid var(--edge); box-shadow: 5px 5px 0 var(--edge);
  font-family: var(--f-head); font-weight: 800; font-size: 1.2rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .2s;
}
.btn:hover { color: var(--fg); transform: translate(-2px,-2px); box-shadow: 7px 7px 0 var(--edge); }
.btn:active { transform: translate(3px,3px); box-shadow: 2px 2px 0 var(--edge); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-light { --bg: #fff; --fg: var(--ink); }
.btn-ghost { --bg: transparent; --fg: #fff; --edge: #fff; box-shadow: none; }
.btn-ghost:hover { box-shadow: 4px 4px 0 #fff; }
.btn-ink { --bg: var(--ink); --fg: #fff; --edge: var(--leather); }
.btn-big { font-size: 1.45rem; padding: 18px 28px; min-height: 64px; }

/* ---------------- Section chapter heading ---------------- */
.sec { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.sec-tight { padding: clamp(56px, 7vw, 88px) 0; }
.chapter { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; color: var(--leather-deep); }
.chapter .pixel { font-size: .78rem; white-space: nowrap; }
.chapter::after { content: ""; flex: 1; height: 3px; background: repeating-linear-gradient(90deg, var(--ink) 0 12px, transparent 12px 18px); opacity: .55; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 64ch; }
.sec-head { max-width: 860px; margin-bottom: clamp(36px, 5vw, 60px); }

/* =========================================================
   HERO — 3D forge stage
   ========================================================= */
.hero {
  position: relative; overflow: hidden; color: #fff; isolation: isolate;
  background:
    radial-gradient(ellipse 48% 38% at 50% 48%, rgba(193, 150, 79, .18), transparent 75%),
    radial-gradient(ellipse 50% 60% at 5% 35%, rgba(39, 109, 87, .22), transparent 75%),
    radial-gradient(ellipse 45% 55% at 95% 65%, rgba(45, 83, 105, .2), transparent 75%),
    linear-gradient(150deg, #101c1b 0%, #101416 48%, #080d10 100%);
  padding: clamp(36px, 6vw, 64px) 0 0;
}
.hero::before { /* quiet block grid behind the skill forge */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35; pointer-events: none;
  background-image:
    linear-gradient(rgba(179, 207, 191, .13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(179, 207, 191, .13) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; inset: 38% 0 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(106, 157, 123, .1), rgba(6, 14, 15, .6));
  border-bottom: 1px solid rgba(217, 179, 122, .25);
  clip-path: polygon(0 36%, 8% 36%, 8% 24%, 17% 24%, 17% 43%, 25% 43%, 25% 60%, 34% 60%, 34% 72%, 66% 72%, 66% 56%, 75% 56%, 75% 39%, 84% 39%, 84% 20%, 93% 20%, 93% 32%, 100% 32%, 100% 100%, 0 100%);
}
.hero-ghost {
  position: absolute; left: 50%; top: 38%; transform: translate(-50%,-50%); z-index: -1;
  font-family: var(--f-head); font-weight: 900; font-size: clamp(7rem, 27vw, 26rem); line-height: .8; letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 1px rgba(217,179,122,.12); white-space: nowrap; pointer-events: none; user-select: none;
}
.hero-top { text-align: center; position: relative; z-index: 3; }
.hero-badge { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; align-items: center; padding: 7px 14px; background: rgba(23,24,24,.55); border: 2px solid rgba(255,255,255,.25); font-size: .7rem; margin-bottom: 20px; }
.hero-badge i { width: 8px; height: 8px; background: var(--gold); display: inline-block; box-shadow: 0 0 0 3px rgba(217,179,122,.25); animation: blink 2s steps(2) infinite; }
.hero h1 { max-width: 900px; margin: 0 auto 20px; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.12; text-transform: none; text-wrap: balance; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.hero h1 small { display: block; font-size: .3em; letter-spacing: .12em; font-weight: 700; color: var(--iron-light); margin-top: .35em; text-shadow: none; }
.hero-intro { max-width: 640px; margin: 0 auto; color: #f1e8e0; font-size: clamp(1rem, 1.5vw, 1.15rem); }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 22px; }

/* the 3D stage */
.stage { position: relative; height: clamp(340px, 40vw, 440px); margin-top: 24px; margin-bottom: 32px; perspective: 1100px; perspective-origin: 50% 30%; z-index: 2; }
.scene { position: absolute; left: 50%; top: max(66%, 300px); width: 0; height: 0; transform-style: preserve-3d; transform: rotateX(-22deg) rotateY(var(--ry, -30deg)); transition: transform .5s var(--ease); }
.spin { position: absolute; transform-style: preserve-3d; animation: spinY 26s linear infinite; }
.cube { position: absolute; width: var(--s); height: var(--s); transform-style: preserve-3d; }
.cube .f { position: absolute; inset: 0; border: 1px solid rgba(0,0,0,.25); }
.cube .f.t { background: linear-gradient(135deg, #a5a5a4, #8a8a89); transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); box-shadow: inset 0 0 0 4px rgba(255,255,255,.08); }
.cube .f.fr { background: #6f6f6e; transform: translateZ(calc(var(--s) / 2)); }
.cube .f.bk { background: #5c5c5b; transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.cube .f.l { background: #646463; transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.cube .f.r { background: #575756; transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.cube .f.bt { background: #3d3d3c; transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }
.cube.dirt .f.t { background: linear-gradient(135deg, #8b6447, #745138); }
.cube.dirt .f.fr, .cube.dirt .f.l { background: #5b3f2b; }
.cube.dirt .f.r, .cube.dirt .f.bk { background: #4e3524; }
.cube.ink .f.t { background: #2d2f2f; } .cube.ink .f.fr, .cube.ink .f.l { background: #1f2020; } .cube.ink .f.r, .cube.ink .f.bk { background: #171818; }

.sword3d { position: absolute; width: 210px; height: 210px; left: -105px; top: -300px; transform-style: preserve-3d; animation: hover 4.5s ease-in-out infinite; }
.sword3d img { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; backface-visibility: visible; }
.sword-shadow { position: absolute; width: 150px; height: 150px; left: -75px; top: -75px; border-radius: 50%; background: radial-gradient(rgba(0,0,0,.45), transparent 65%); transform: rotateX(90deg) translateZ(-29px); animation: shadowPulse 4.5s ease-in-out infinite; }
.orbit { position: absolute; transform-style: preserve-3d; top: -170px; animation: spinY 7s linear infinite reverse; }
.orb { position: absolute; width: 14px; height: 14px; margin: -7px; background: var(--gold); box-shadow: 0 0 14px 4px rgba(217,179,122,.65), inset -3px -3px 0 rgba(0,0,0,.2); }
.orb:nth-child(1) { transform: rotateY(0deg) translateZ(150px); }
.orb:nth-child(2) { transform: rotateY(120deg) translateZ(150px) translateY(40px); }
.orb:nth-child(3) { transform: rotateY(240deg) translateZ(150px) translateY(-30px); }
.float-tag { position: absolute; z-index: 4; padding: 6px 10px; background: var(--ink); color: #fff; font-size: .62rem; border: 2px solid var(--gold); box-shadow: 3px 3px 0 rgba(0,0,0,.35); animation: bob 5s ease-in-out infinite; white-space: nowrap; }
.float-tag.a { left: 8%; top: 18%; } .float-tag.b { right: 9%; top: 34%; animation-delay: -2s; } .float-tag.c { left: 14%; bottom: 14%; animation-delay: -3.5s; border-color: var(--iron); }

/* forge console */
.forge { position: relative; z-index: 3; margin-top: -8px; background: rgba(23,24,24,.86); border-top: 4px solid var(--ink); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.forge-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 1.5fr); gap: clamp(18px, 3vw, 40px); padding-top: 26px; padding-bottom: 30px; align-items: start; }
.forge-label { font-size: .66rem; color: var(--iron-light); margin-bottom: 10px; display: block; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.skill-chips legend { padding: 0; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; background: #2b2d2d; border: 2px solid #3d3f3f; color: #e8e8e6; font-family: var(--f-head); font-weight: 700; font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: background .2s, border-color .2s, transform .15s; }
.chip input:hover + span { border-color: var(--iron); }
.chip input:checked + span { background: var(--leather); border-color: #fff; transform: translateY(-2px); box-shadow: 0 3px 0 #000; }
.chip input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.level-read { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.level-num { font-family: var(--f-head); font-weight: 900; font-size: 3.4rem; line-height: 1; color: #fff; min-width: 2ch; }
.level-of { color: var(--iron); font-size: .7rem; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; background: transparent; cursor: pointer; margin: 6px 0 4px; }
.range::-webkit-slider-runnable-track { height: 14px; background: linear-gradient(90deg, var(--gold) var(--p, 0%), #3a3c3c var(--p, 0%)); border: 2px solid #000; }
.range::-moz-range-track { height: 10px; background: #3a3c3c; border: 2px solid #000; }
.range::-moz-range-progress { height: 10px; background: var(--gold); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 26px; margin-top: -8px; background: #fff; border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--leather); }
.range::-moz-range-thumb { width: 18px; height: 22px; background: #fff; border: 3px solid var(--ink); border-radius: 0; }
.range-ticks { display: flex; justify-content: space-between; font-size: .58rem; color: var(--iron); }
.forge-status { margin-top: 10px; font-size: .9rem; color: #e1d6cc; min-height: 3em; }
.forge-status strong { color: var(--gold); }
.slots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.slot { perspective: 500px; aspect-ratio: 1 / 1.28; min-width: 0; }
.slot-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .6s var(--ease); }
.slot.on .slot-in { transform: rotateY(180deg); }
.slot-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px 4px; text-align: center; border: 3px solid; border-color: #1b1b1b #5a5a5a #5a5a5a #1b1b1b; background: #8b8b8b; color: var(--ink); }
.slot-face.lock { background: #393b3b; border-color: #111 #4b4d4d #4b4d4d #111; color: #bcbcba; }
.slot-face.lock svg { width: 46%; opacity: .85; }
.slot-face.item { transform: rotateY(180deg); background: #9c9c9b; }
.slot-face.item svg { width: 62%; image-rendering: pixelated; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.3)); }
.slot-face .nm { font-size: .72rem; font-weight: 700; line-height: 1.1; overflow-wrap: anywhere; }
.slot-face .rq { font-family: var(--f-pixel); font-size: .56rem; }
.slot.pop .slot-face.item { animation: pop .5s var(--ease); }
.forge-note { font-size: .74rem; color: var(--iron); margin: 10px 0 0; }

/* stat ticker under hero */
.ticker { background: var(--ink); color: #fff; overflow: hidden; border-top: 2px solid #000; border-bottom: 4px solid var(--leather); }
.ticker-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.ticker-track span { padding: 13px 26px; font-family: var(--f-head); font-weight: 700; font-size: 1.15rem; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; display: inline-flex; align-items: center; gap: 26px; }
.ticker-track span::after { content: ""; width: 10px; height: 10px; background: var(--leather-light); transform: rotate(45deg); }

/* =========================================================
   ABOUT — magazine columns + stat strip
   ========================================================= */
.mag { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.mag-aside { border-top: 6px solid var(--ink); padding-top: 18px; }
.mag-aside .big-q { font-family: var(--f-head); font-weight: 800; font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.05; text-transform: uppercase; margin: 0 0 18px; }
.mag-aside .big-q em { font-style: normal; color: var(--leather); }
.mag-cols { column-count: 2; column-gap: 40px; column-rule: 1px solid rgba(23,24,24,.18); }
.mag-cols p { break-inside: avoid-column; }
.mag-cols p:first-child::first-letter { float: left; font-family: var(--f-head); font-weight: 900; font-size: 5.2rem; line-height: .78; padding: 6px 10px 0 0; color: var(--leather); }
.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(40px, 6vw, 70px); border: 3px solid var(--ink); background: var(--paper); box-shadow: var(--shadow-block); }
.stat { padding: 22px 20px; border-right: 3px solid var(--ink); min-width: 0; }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-family: var(--f-head); font-weight: 900; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1; color: var(--leather); }
.stat span { font-size: .85rem; color: var(--muted); }

/* =========================================================
   FEATURES — the ONLY card section (3D tilt)
   ========================================================= */
.sec-features { background: var(--ink); color: #fff; }
.sec-features .chapter { color: var(--gold); }
.sec-features .chapter::after { background: repeating-linear-gradient(90deg, #fff 0 12px, transparent 12px 18px); opacity: .3; }
.sec-features .lede { color: #c9c4be; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card {
  position: relative; padding: 28px 24px 26px; background: linear-gradient(160deg, #2a2c2c, #1d1e1e);
  border: 2px solid #3a3c3c; transform-style: preserve-3d; transition: transform .25s var(--ease), border-color .25s;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}
.card:hover { border-color: var(--leather-light); }
.card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(217,179,122,.16), transparent 55%); opacity: 0; transition: opacity .3s; }
.card:hover::after { opacity: 1; }
.card-ico { width: 58px; height: 58px; display: grid; place-items: center; background: var(--leather); border: 3px solid #fff; box-shadow: 4px 4px 0 #000; margin-bottom: 20px; transform: translateZ(22px); }
.card-ico svg { width: 30px; height: 30px; }
.card h3 { color: #fff; transform: translateZ(14px); }
.card p { color: #c6c1bb; margin: 0; font-size: .98rem; transform: translateZ(6px); }
.card .tag { position: absolute; top: 16px; right: 16px; font-size: .58rem; color: var(--gold); }

/* =========================================================
   HOW IT WORKS — 3D exploded stack
   ========================================================= */
.how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(30px, 5vw, 70px); align-items: center; }
.stack-wrap { height: 540px; perspective: 1400px; display: grid; place-items: end center; padding-bottom: 60px; }
.stack { position: relative; width: 250px; height: 250px; transform-style: preserve-3d; transform: rotateX(58deg) rotateZ(-42deg); }
.plate { position: absolute; inset: 0; display: grid; place-items: center; transform-style: preserve-3d; transition: transform 1s var(--ease), box-shadow .3s; border: 3px solid var(--ink); }
.plate b { position: absolute; right: 12px; bottom: 8px; font-family: var(--f-head); font-weight: 900; font-size: 2.6rem; line-height: 1; color: rgba(255,255,255,.92); transform: rotateZ(42deg); }
.plate::before, .plate::after { content: ""; position: absolute; background: inherit; filter: brightness(.65); }
.plate::before { left: 0; right: 0; top: 100%; height: 18px; transform-origin: top; transform: rotateX(-90deg); }
.plate::after { top: 0; bottom: 0; left: 100%; width: 18px; transform-origin: left; transform: rotateY(90deg); filter: brightness(.5); }
.plate.p1 { background: #5d5d5c; transform: translateZ(0); }
.plate.p2 { background: var(--iron); transform: translateZ(22px); }
.plate.p3 { background: var(--leather-light); transform: translateZ(44px); }
.plate.p4 { background: var(--leather); transform: translateZ(66px); }
.stack.open .plate.p2 { transform: translateZ(95px); }
.stack.open .plate.p3 { transform: translateZ(190px); }
.stack.open .plate.p4 { transform: translateZ(285px); }
.plate.hot { box-shadow: 0 0 0 4px var(--gold), 0 0 40px rgba(217,179,122,.6); }
.flow { list-style: none; margin: 0; padding: 0; counter-reset: f; }
.flow li { counter-increment: f; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 18px; padding: 20px 0; border-bottom: 2px solid rgba(23,24,24,.15); cursor: default; transition: background .2s; }
.flow li:first-child { border-top: 2px solid rgba(23,24,24,.15); }
.flow li::before { content: "0" counter(f); font-family: var(--f-head); font-weight: 900; font-size: 2.6rem; line-height: 1; color: transparent; -webkit-text-stroke: 2px var(--ink); transition: color .2s; }
.flow li:hover::before, .flow li.hot::before { color: var(--leather); -webkit-text-stroke-color: var(--leather); }
.flow h3 { margin-bottom: .25em; }
.flow p { margin: 0; color: var(--muted); }

/* =========================================================
   VERSIONS TABLE
   ========================================================= */
.table-scroll { overflow-x: auto; border: 3px solid var(--ink); background: var(--paper); box-shadow: var(--shadow-block); }
.vtable { width: 100%; border-collapse: collapse; min-width: 640px; }
.vtable caption { text-align: left; padding: 14px 18px; font-size: .9rem; color: var(--muted); caption-side: bottom; border-top: 2px solid var(--ink); }
.vtable th, .vtable td { padding: 15px 18px; text-align: left; border-bottom: 1px solid rgba(23,24,24,.14); vertical-align: top; }
.vtable thead th { background: var(--ink); color: #fff; font-family: var(--f-head); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 1.05rem; }
.vtable tbody th { font-family: var(--f-head); font-weight: 800; font-size: 1.25rem; }
.vtable tbody tr { transition: background .15s; }
.vtable tbody tr:hover { background: var(--leather-tint); }
.vtable tr.no { background: repeating-linear-gradient(-45deg, rgba(138,59,46,.05) 0 10px, transparent 10px 20px); }
.st { display: inline-block; padding: 3px 9px; font-family: var(--f-pixel); font-size: .62rem; border: 2px solid currentColor; white-space: nowrap; }
.st.ok { color: var(--ok); } .st.old { color: var(--iron-dark); } .st.no { color: var(--no); }

/* =========================================================
   DOWNLOAD BANNER
   ========================================================= */
.dl-band { background: var(--leather); color: #fff; position: relative; overflow: hidden; border-top: 4px solid var(--ink); border-bottom: 4px solid var(--ink); }
.dl-band::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(0,0,0,.08) 0 2px, transparent 2px 22px); }
.dl-grid { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(22px, 4vw, 54px); align-items: center; padding: clamp(48px, 7vw, 84px) 0; }
.dl-block { width: 150px; height: 150px; perspective: 600px; }
.dl-block .cube { --s: 110px; left: 20px; top: 20px; animation: tumble 9s linear infinite; }
.dl-block .cube .f { display: grid; place-items: center; background: var(--leather-deep); border: 3px solid #000; }
.dl-block .cube .f.t { background: var(--leather-light); }
.cta-final .btn { --edge: #fff; }
.dl-block .cube .f img { width: 80%; image-rendering: pixelated; }
.dl-band h2 { color: #fff; margin-bottom: .2em; }
.dl-band .chapter { color: #f3e2d3; }
.dl-grid > * { min-width: 0; } .dl-band .chapter::after { background: repeating-linear-gradient(90deg, #fff 0 12px, transparent 12px 18px); opacity: .4; }
.file-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 14px 0 0; padding: 0; list-style: none; font-size: .95rem; color: #f3e6da; }
.file-meta li b { color: #fff; }
.dl-cta { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.dl-cta small { color: #f0dccb; font-size: .8rem; text-align: center; }

/* =========================================================
   INSTALL — descending staircase
   ========================================================= */
.stairs { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.stairs li { counter-increment: s; position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 18px; align-items: start; margin-left: calc(var(--i) * 46px); padding: 22px 26px 22px 0; border-top: 3px solid var(--ink); max-width: 760px; }
.stairs li::before { content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; background: var(--paper); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--leather); font-family: var(--f-head); font-weight: 900; font-size: 1.7rem; color: var(--ink); }
.stairs li:last-child::before { background: var(--leather); color: #fff; box-shadow: 3px 3px 0 var(--ink); }
.stairs h3 { margin: 4px 0 .3em; }
.stairs p { margin: 0; color: var(--muted); }
.server-note { margin-top: 36px; padding: 18px 22px; border-left: 8px solid var(--leather); background: var(--paper); max-width: 860px; }

/* =========================================================
   REQUIREMENTS — ledger rows with leaders
   ========================================================= */
.ledger { border-top: 4px solid var(--ink); }
.led-row { display: grid; grid-template-columns: minmax(0, 1.1fr) 104px minmax(0, 1.6fr) 128px; gap: 18px; align-items: center; padding: 18px 4px; border-bottom: 1px dashed rgba(23,24,24,.35); transition: background .15s, padding .2s; }
.led-row:hover { background: rgba(116,81,56,.07); padding-left: 12px; }
.led-name { font-family: var(--f-head); font-weight: 800; font-size: 1.45rem; text-transform: uppercase; display: flex; align-items: center; gap: 12px; }
.led-name::after { content: ""; flex: 1; border-bottom: 3px dotted rgba(23,24,24,.4); min-width: 20px; }
.led-row p { margin: 0; color: var(--muted); font-size: .95rem; }
.led-row a.lk { justify-self: end; font-family: var(--f-pixel); font-size: .66rem; text-decoration: none; white-space: nowrap; padding: 6px 10px; border: 2px solid var(--ink); color: var(--ink); background: var(--paper); }
.led-row a.lk:hover { background: var(--ink); color: #fff; }

/* =========================================================
   USE CASES — index list
   ========================================================= */
.sec-uses { background: var(--paper); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.uses { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(30px, 5vw, 70px); }
.uses li { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 18px; padding: 24px 0; border-bottom: 2px solid var(--ink); }
.uses li:nth-child(-n+2) { border-top: 2px solid var(--ink); }
.uses .ux { width: 54px; height: 54px; display: grid; place-items: center; border: 3px solid var(--ink); background: var(--stone); transition: transform .3s var(--ease), background .3s; }
.uses li:hover .ux { transform: rotate(-8deg) scale(1.08); background: var(--leather); }
.uses li:hover .ux svg { color: #fff; }
.uses .ux svg { width: 26px; height: 26px; color: var(--leather-deep); }
.uses h3 { font-size: 1.25rem; margin-bottom: .2em; }
.uses p { margin: 0; color: var(--muted); font-size: .96rem; }

/* =========================================================
   COMPARISON — versus rows
   ========================================================= */
.vs-head, .vs-row { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr) 56px minmax(0, 1.2fr); gap: 0; align-items: stretch; }
.vs-head > div { padding: 12px 18px; font-family: var(--f-head); font-weight: 800; font-size: 1.2rem; letter-spacing: .08em; text-transform: uppercase; }
.vs-head .c-van { background: var(--iron); color: var(--ink); }
.vs-head .c-lz { background: var(--leather); color: #fff; }
.vs-row { border-bottom: 2px solid rgba(23,24,24,.16); }
.vs-row > div { padding: 18px; }
.vs-row .k { font-family: var(--f-head); font-weight: 800; font-size: 1.2rem; text-transform: uppercase; align-self: center; }
.vs-row .van { color: var(--muted); background: rgba(145,145,145,.12); }
.vs-row .lz { background: rgba(116,81,56,.1); font-weight: 500; }
.vs-row .vs { display: grid; place-items: center; padding: 0; }
.vs-row .vs span { width: 38px; height: 38px; display: grid; place-items: center; background: var(--ink); color: #fff; font-family: var(--f-pixel); font-size: .6rem; transform: rotate(45deg); transition: transform .4s var(--ease); }
.vs-row .vs span i { transform: rotate(-45deg); font-style: normal; }
.vs-row:hover .vs span { transform: rotate(225deg); background: var(--leather); }

/* =========================================================
   SAFETY — seal + checklist
   ========================================================= */
.sec-safety { background: var(--ink); color: #fff; overflow: hidden; }
.sec-safety .chapter { color: var(--gold); }
.sec-safety .chapter::after { background: repeating-linear-gradient(90deg, #fff 0 12px, transparent 12px 18px); opacity: .3; }
.sec-safety .lede { color: #c9c4be; }
.safe { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: clamp(30px, 6vw, 80px); align-items: center; }
.seal { position: relative; width: min(320px, 100%); aspect-ratio: 1; margin: 0 auto; perspective: 800px; }
.seal-spin { position: absolute; inset: 0; transform-style: preserve-3d; animation: coin 8s ease-in-out infinite; }
.seal-face { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--leather-light), var(--leather) 60%); border: 6px solid #fff; box-shadow: inset 0 0 0 10px rgba(0,0,0,.18); }
.seal-face.back { transform: rotateY(180deg); background: var(--iron-dark); }
.seal-face div { font-family: var(--f-head); font-weight: 900; text-transform: uppercase; font-size: 2.2rem; line-height: .95; padding: 20px; }
.seal-face small { display: block; font-family: var(--f-pixel); font-weight: 400; font-size: .6rem; margin-top: 10px; color: #f3e2d3; }
.seal-face img { width: 46%; margin: 0 auto 8px; image-rendering: pixelated; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.checks li::before { content: ""; width: 30px; height: 30px; margin-top: 2px; background: var(--leather) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' shape-rendering='crispEdges'%3E%3Cpath fill='%23fff' d='M6 1h1v1H6zM5 2h1v1H5zM4 3h1v1H4zM1 3h1v1H1zM2 4h1v1H2zM3 4h1v1H3zM3 5h1v1H3z'/%3E%3C/svg%3E") center / 70% no-repeat; border: 2px solid #fff; }
.checks b { color: #fff; }
.checks span { color: #c9c4be; }

/* =========================================================
   TESTIMONIALS — 3D rotating prism
   ========================================================= */
.prism-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(30px, 5vw, 70px); align-items: center; }
.prism-stage { perspective: 1400px; height: 330px; position: relative; }
.prism { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 1s var(--ease); transform: translateZ(calc(var(--d) * -1)) rotateY(var(--rot, 0deg)); --d: 170px; }
.face { position: absolute; inset: 0; padding: 30px 32px; background: var(--paper); border: 3px solid var(--ink); display: flex; flex-direction: column; justify-content: space-between; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face:nth-child(1) { transform: rotateY(0deg) translateZ(var(--d)); }
.face:nth-child(2) { transform: rotateY(120deg) translateZ(var(--d)); }
.face:nth-child(3) { transform: rotateY(240deg) translateZ(var(--d)); }
.face blockquote { margin: 0; font-family: var(--f-head); font-weight: 700; font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.15; }
.face blockquote::before { content: "“"; display: block; font-size: 4rem; line-height: .6; color: var(--leather); margin-bottom: 8px; }
.face figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.face figcaption .pixel { font-size: .58rem; padding: 4px 8px; border: 2px dashed var(--iron-dark); color: var(--iron-dark); }
.prism-ctrl { display: flex; gap: 10px; margin-top: 26px; align-items: center; }
.prism-ctrl button { width: 48px; height: 48px; border: 3px solid var(--ink); background: var(--paper); cursor: pointer; display: grid; place-items: center; box-shadow: 3px 3px 0 var(--ink); transition: transform .15s; }
.prism-ctrl button:hover { transform: translate(-1px,-1px); background: var(--leather); color: #fff; }
.prism-ctrl button svg { width: 20px; height: 20px; }
.prism-dots { display: flex; gap: 6px; margin-left: 8px; }
.prism-dots i { width: 12px; height: 12px; border: 2px solid var(--ink); }
.prism-dots i.on { background: var(--leather); }
.proof { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0; border-top: 3px solid var(--ink); }
.proof li { padding: 14px 10px 14px 0; border-bottom: 1px solid rgba(23,24,24,.18); }
.proof b { font-family: var(--f-head); font-weight: 900; font-size: 2rem; display: block; line-height: 1; color: var(--leather); }
.proof span { font-size: .85rem; color: var(--muted); }

/* =========================================================
   FAQ — accordion
   ========================================================= */
.faq-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.faq-tabs[hidden], .faq-panel[hidden] { display: none; }
.faq-tab { flex: 1 1 140px; padding: 14px 18px; border: 2px solid var(--ink); background: transparent; color: var(--ink); font-family: var(--f-body); font-weight: 700; cursor: pointer; }
.faq-tab:hover, .faq-tab[aria-selected="true"] { background: var(--ink); color: #fff; }
.faq-tab:focus-visible { outline: 3px solid var(--leather); outline-offset: 3px; }
.faq { border-top: 4px solid var(--ink); }
.faq details { border-bottom: 2px solid var(--ink); }
.faq summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 54px minmax(0, 1fr) 40px; gap: 14px; align-items: center; padding: 22px 0; font-family: var(--f-head); font-weight: 800; font-size: clamp(1.125rem, 1.7vw, 1.35rem); line-height: 1.15; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .n { font-family: var(--f-pixel); font-weight: 400; font-size: .7rem; color: var(--leather); }
.faq summary .pm { width: 36px; height: 36px; border: 3px solid var(--ink); position: relative; transition: background .2s, transform .3s var(--ease); }
.faq summary .pm::before, .faq summary .pm::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 3px; background: var(--ink); transform: translate(-50%,-50%); transition: transform .3s; }
.faq summary .pm::after { transform: translate(-50%,-50%) rotate(90deg); }
.faq details[open] summary .pm { background: var(--leather); transform: rotate(180deg); }
.faq details[open] summary .pm::before, .faq details[open] summary .pm::after { background: #fff; }
.faq details[open] summary .pm::after { transform: translate(-50%,-50%) rotate(0deg); }
.faq summary:hover { color: var(--leather-deep); }
.faq .ans { padding: 0 54px 24px 68px; color: var(--muted); }
.faq .ans p:last-child { margin-bottom: 0; }

/* =========================================================
   FINAL CTA — voxel field
   ========================================================= */
.cta-final { position: relative; overflow: hidden; background: var(--ink); color: #fff; text-align: center; padding: clamp(80px, 12vw, 150px) 0; isolation: isolate; }
.voxels { position: absolute; inset: 0; z-index: -1; perspective: 700px; overflow: hidden; }
.vx { position: absolute; width: 40px; height: 40px; background: var(--leather); border: 3px solid #000; opacity: .55; animation: drift linear infinite; }
.vx:nth-child(3n) { background: var(--iron-dark); } .vx:nth-child(4n) { background: var(--leather-light); }
.cta-final h2 { font-size: clamp(2.6rem, 7vw, 5.6rem); margin-bottom: .25em; }
.cta-final p { color: #d1ccc6; max-width: 600px; margin: 0 auto 30px; }
.cta-final .sword-mini { width: 96px; height: 96px; margin: 0 auto 22px; image-rendering: pixelated; animation: hover 4s ease-in-out infinite; filter: drop-shadow(0 12px 14px rgba(0,0,0,.6)); }
.cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* =========================================================
   FOOTER — wordmark base
   ========================================================= */
.foot { background: #0f1010; color: #cfcbc6; position: relative; overflow: hidden; border-top: 6px solid var(--leather); }
.foot-top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 34px; padding: 60px 0 30px; }
.foot-brand { display: flex; gap: 14px; align-items: flex-start; }
.foot-brand img { width: 64px; height: 64px; border: 3px solid var(--iron); image-rendering: pixelated; flex: none; }
.foot-brand p { margin: 0; font-size: .92rem; }
.foot h2 { font-size: 1.05rem; letter-spacing: .14em; color: #fff; margin-bottom: 14px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: 8px; }
.foot a { color: #cfcbc6; text-decoration: none; }
.foot a:hover { color: var(--gold); }
.foot-word { font-family: var(--f-head); font-weight: 900; font-size: clamp(5rem, 21vw, 19rem); line-height: .78; letter-spacing: -.01em; text-transform: uppercase; color: transparent; -webkit-text-stroke: 2px #343636; white-space: nowrap; text-align: center; user-select: none; margin-bottom: -.06em; overflow: hidden; }
.foot-legal { border-top: 1px solid #2a2c2c; padding: 18px 0 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: .84rem; }
.foot-legal strong { color: #fff; font-weight: 600; }

/* back to top */
.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 80; width: 52px; height: 52px; display: grid; place-items: center; background: var(--leather); color: #fff; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .25s, transform .25s var(--ease), visibility .25s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translateY(-3px); }
.to-top svg { width: 22px; height: 22px; }

/* =========================================================
   INNER PAGES
   ========================================================= */
.page-hero { position: relative; overflow: hidden; background: var(--leather); color: #fff; padding: clamp(40px, 6vw, 70px) 0 clamp(46px, 7vw, 80px); border-bottom: 4px solid var(--ink); isolation: isolate; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(0,0,0,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,.18) 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(90deg, transparent, #000 70%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%); }
.page-hero h1 { font-size: clamp(1.75rem, 3vw, 2.5rem); text-transform: uppercase; margin-bottom: .15em; text-shadow: 0 5px 0 rgba(0,0,0,.3); }
.page-hero p { color: #f1e6dc; max-width: 680px; font-size: 1.08rem; margin: 0; }
.page-hero .ph-sword { position: absolute; right: clamp(-40px, 4vw, 80px); top: 50%; width: clamp(140px, 20vw, 260px); transform: translateY(-50%) rotate(-12deg); opacity: .9; z-index: -1; image-rendering: pixelated; filter: drop-shadow(10px 14px 0 rgba(0,0,0,.25)); animation: hover2 6s ease-in-out infinite; }
.crumbs { margin-bottom: 18px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: .66rem; }
.crumbs li { display: flex; align-items: center; gap: 6px; }
.crumbs li + li::before { content: ">"; color: var(--gold); }
.crumbs a { color: #fff; text-decoration: none; border-bottom: 2px solid rgba(255,255,255,.4); }
.crumbs a:hover { color: var(--gold); }
.crumbs [aria-current] { color: #f1d9c3; }

.chapters { position: sticky; top: 76px; z-index: 30; background: var(--ink); border-bottom: 3px solid var(--leather); }
@media (max-width: 1023px) { .chapters { top: 64px; } }
.chapters ul { list-style: none; margin: 0; padding: 0; display: flex; overflow-x: auto; scrollbar-width: none; }
.chapters ul::-webkit-scrollbar { display: none; }
.chapters a { display: block; padding: 13px 16px; color: #d9d5d0; text-decoration: none; white-space: nowrap; font-family: var(--f-head); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .98rem; border-bottom: 3px solid transparent; margin-bottom: -3px; }
.chapters a:hover, .chapters a.on { color: #fff; border-bottom-color: var(--gold); }

.prose { max-width: 820px; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 1.4em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--leather); font-weight: 700; }

.kw-block { padding: clamp(46px, 6vw, 72px) 0; border-bottom: 3px solid var(--ink); scroll-margin-top: 52px; }
.kw-block:nth-of-type(even) { background: var(--paper); }
.kw-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(26px, 4vw, 56px); align-items: start; }
.kw-label { display: inline-block; margin-bottom: 12px; padding: 4px 10px; font-size: .62rem; border: 2px solid currentColor; }
.kw-label.ok { color: var(--ok); } .kw-label.no { color: var(--no); } .kw-label.info { color: var(--leather-deep); }
.notice { padding: 18px 20px; border: 3px solid var(--ink); background: var(--paper); box-shadow: 5px 5px 0 var(--no); }
.notice.good { box-shadow: 5px 5px 0 var(--ok); }
.notice p:last-child { margin-bottom: 0; }
.notice h3 { font-size: 1.3rem; }

.dl-panel { border: 3px solid var(--ink); background: var(--paper); box-shadow: var(--shadow-block); }
.dl-panel-top { display: flex; gap: 18px; align-items: center; padding: 22px; border-bottom: 3px solid var(--ink); background: var(--ink); color: #fff; }
.dl-panel-top img { width: 72px; height: 72px; border: 3px solid var(--iron); image-rendering: pixelated; flex: none; }
.dl-panel-top b { display: block; font-family: var(--f-head); font-size: 1.6rem; line-height: 1.05; overflow-wrap: anywhere; }
.dl-panel-top span { font-size: .85rem; color: var(--iron-light); }
.dl-panel dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); }
.dl-panel dt, .dl-panel dd { margin: 0; padding: 11px 22px; border-bottom: 1px solid rgba(23,24,24,.14); }
.dl-panel dt { font-family: var(--f-pixel); font-size: .64rem; color: var(--muted); padding-right: 8px; align-self: center; }
.dl-panel dd { font-weight: 600; overflow-wrap: anywhere; }
.dl-panel .btn { margin: 22px; width: calc(100% - 44px); }

.cmd-table { width: 100%; border-collapse: collapse; border: 3px solid var(--ink); background: var(--paper); }
.cmd-table th, .cmd-table td { padding: 13px 16px; border-bottom: 1px solid rgba(23,24,24,.14); text-align: left; vertical-align: top; }
.cmd-table thead th { background: var(--ink); color: #fff; font-family: var(--f-head); letter-spacing: .1em; text-transform: uppercase; }
.cmd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cmd code { background: var(--ink); color: #f1e6dc; padding: 6px 10px; }
.copy { font-family: var(--f-pixel); font-size: .58rem; padding: 6px 8px; background: var(--paper); border: 2px solid var(--ink); cursor: pointer; }
.copy:hover { background: var(--leather); color: #fff; }

pre.code { background: var(--ink); color: #e9e2da; padding: 20px; overflow-x: auto; border-left: 6px solid var(--leather); margin: 0 0 1.2em; line-height: 1.5; font-size: .86rem; max-width: 100%; }
.tree { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; background: var(--paper); border: 3px solid var(--ink); padding: 18px; white-space: pre; overflow-x: auto; margin: 0 0 1.2em; }

.trouble { border-top: 4px solid var(--ink); }
.trouble .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 24px; padding: 18px 0; border-bottom: 2px solid rgba(23,24,24,.16); }
.trouble .sym { font-family: var(--f-head); font-weight: 800; font-size: 1.25rem; text-transform: uppercase; }
.trouble .sym::before { content: "!"; display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 10px; background: var(--no); color: #fff; font-family: var(--f-pixel); font-size: .7rem; vertical-align: 3px; }
.trouble .fix { margin: 0; color: var(--muted); }

/* about page timeline-free "principles" */
.principles { counter-reset: p; list-style: none; padding: 0; margin: 0; border-top: 4px solid var(--ink); }
.principles li { counter-increment: p; display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 20px; padding: 26px 0; border-bottom: 2px solid rgba(23,24,24,.16); }
.principles li::before { content: counter(p, upper-roman); font-family: var(--f-head); font-weight: 900; font-size: 2.6rem; color: var(--leather); line-height: 1; }
.principles h3 { margin-bottom: .2em; }
.principles p { margin: 0; color: var(--muted); }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(30px, 5vw, 64px); align-items: start; }
.form { border: 3px solid var(--ink); background: var(--paper); padding: clamp(20px, 3vw, 34px); box-shadow: var(--shadow-block); }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--f-pixel); font-size: .66rem; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 13px 14px; font: inherit; font-size: 1rem; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 0; transition: box-shadow .2s, border-color .2s; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: 4px 4px 0 var(--leather); }
.field .err { display: none; color: var(--no); font-size: .85rem; margin-top: 4px; }
.field.bad input, .field.bad textarea, .field.bad select { border-color: var(--no); }
.field.bad .err { display: block; }
.form-ok { display: none; padding: 22px; background: var(--ink); color: #fff; border-left: 8px solid var(--gold); }
.form-ok.show { display: block; animation: pop .5s var(--ease); }
.form-ok h2 { font-size: 1.8rem; color: #fff; }
.hp { position: absolute; left: -5000px; }
.side-info { border-top: 6px solid var(--ink); padding-top: 18px; }
.side-info .mail { font-family: var(--f-head); font-weight: 800; font-size: clamp(1.4rem, 2.6vw, 2rem); word-break: break-all; }

/* 404 */
.nf { min-height: calc(100vh - 0px); display: grid; place-items: center; text-align: center; padding: 60px 0; background: radial-gradient(ellipse at 50% 40%, #8d6547, var(--leather) 45%, #3c281b); color: #fff; }
.nf h1 { font-size: clamp(5rem, 20vw, 13rem); line-height: .85; margin: 0; text-shadow: 0 8px 0 rgba(0,0,0,.35); }
.nf .lockslot { width: 120px; height: 150px; margin: 10px auto 26px; perspective: 600px; }
.nf .lockslot .slot-in { animation: wobble 3s ease-in-out infinite; }
.nf p { max-width: 520px; margin: 0 auto 26px; color: #f1e6dc; }

/* =========================================================
   Reveal + keyframes
   ========================================================= */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }
.no-js .reveal { opacity: 1; transform: none; }

@keyframes spinY { to { transform: rotateY(360deg); } }
@keyframes hover { 0%,100% { transform: translateY(0) rotateY(0deg); } 50% { transform: translateY(-16px) rotateY(16deg); } }
@keyframes hover2 { 0%,100% { transform: translateY(-50%) rotate(-12deg); } 50% { transform: translateY(-56%) rotate(-8deg); } }
@keyframes shadowPulse { 0%,100% { opacity: .9; } 50% { opacity: .5; } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes blink { 50% { opacity: .2; } }
@keyframes pop { 0% { transform: rotateY(180deg) scale(.8); } 60% { transform: rotateY(180deg) scale(1.08); } 100% { transform: rotateY(180deg) scale(1); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes tumble { to { transform: rotateX(360deg) rotateY(720deg); } }
@keyframes coin { 0%,40% { transform: rotateY(0); } 50%,90% { transform: rotateY(180deg); } 100% { transform: rotateY(360deg); } }
@keyframes drift { from { transform: translate3d(0, 110vh, -200px) rotateX(0) rotateY(0); } to { transform: translate3d(0, -20vh, 200px) rotateX(360deg) rotateY(540deg); } }
@keyframes wobble { 0%,100% { transform: rotateY(-18deg) rotateX(6deg); } 50% { transform: rotateY(18deg) rotateX(-6deg); } }
.form-ok.show { animation-name: fadeUp; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .forge-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .forge-slots { grid-column: 1 / -1; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl-grid { grid-template-columns: minmax(0, 1fr) auto; }
  .dl-block { display: none; }
}
@media (max-width: 860px) {
  body { font-size: 16px; }
  .mag { grid-template-columns: minmax(0, 1fr); }
  .mag-cols { column-count: 1; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 3px solid var(--ink); }
  .how, .safe, .prism-wrap, .kw-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .stack-wrap { height: 470px; order: -1; padding-bottom: 50px; }
  .uses { grid-template-columns: minmax(0, 1fr); }
  .uses li:nth-child(2) { border-top: 0; }
  .led-row { grid-template-columns: minmax(0, 1fr) auto; }
  .led-row p { grid-column: 1 / -1; }
  .led-row a.lk { grid-row: 1; grid-column: 2; }
  .led-row .st { justify-self: start; }
  .vs-head { display: none; }
  .vs-row { grid-template-columns: minmax(0, 1fr); padding: 6px 0 14px; }
  .vs-row .k { padding: 14px 0 8px; }
  .vs-row .van, .vs-row .lz { padding: 12px 14px; }
  .vs-row .van::before { content: "Vanilla"; }
  .vs-row .lz::before { content: "LevelZ mod"; }
  .vs-row .van::before, .vs-row .lz::before { display: block; font-family: var(--f-pixel); font-size: .6rem; margin-bottom: 4px; color: var(--leather-deep); }
  .vs-row .vs { display: none; }
  .foot-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
  .trouble .row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .stairs li { margin-left: 0; }
  .float-tag.a { left: 3%; } .float-tag.b { right: 3%; }
}
@media (max-width: 600px) {
  .forge-inner { grid-template-columns: minmax(0, 1fr); }
  .slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .slot { aspect-ratio: 1 / 1.05; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .dl-grid { grid-template-columns: minmax(0, 1fr); }
  .stairs li { grid-template-columns: 38px minmax(0, 1fr); gap: 14px; padding-right: 0; }
  .stairs li::before { width: 38px; height: 38px; font-size: 1.5rem; }
  .flow li { grid-template-columns: 50px minmax(0, 1fr); }
  .faq summary { grid-template-columns: 34px minmax(0, 1fr) 36px; gap: 10px; }
  .faq .ans { padding: 0 0 22px 44px; }
  .proof { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .prism-stage { height: 360px; }
  .prism { --d: 130px; }
  .face { padding: 22px; }
  .float-tag { display: none; }
  .stage { height: 330px; margin-top: 24px; }
  .sword3d { width: 130px; height: 130px; left: -65px; top: -215px; }
  .scene { top: 66%; }
  .principles li { grid-template-columns: 56px minmax(0,1fr); }
  .principles li::before { font-size: 1.9rem; }
  .stack { width: 190px; height: 190px; }
  .stack.open .plate.p2 { transform: translateZ(75px); }
  .stack.open .plate.p3 { transform: translateZ(150px); }
  .stack.open .plate.p4 { transform: translateZ(225px); }
  .stack-wrap { height: 420px; }
  .plate b { font-size: 2rem; }
  .dl-panel dl { grid-template-columns: minmax(0, 1fr); }
  .dl-panel dt { padding-bottom: 0; border-bottom: 0; }
  .cmd-table thead { display: none; }
  .cmd-table, .cmd-table tbody, .cmd-table tr, .cmd-table td { display: block; width: 100%; }
  .cmd-table tr { border-bottom: 2px solid var(--ink); }
  .cmd-table td { border-bottom: 0; padding: 8px 14px; }
  .page-hero .ph-sword { opacity: .25; }
  .btn-big { font-size: 1.2rem; padding: 16px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .ticker-track { animation: none; }
  .vx { display: none; }
}


/* Legal pages and compact footer */
.legal-page-hero { text-align: center; }
.legal-page-hero h1 { margin: 0; }
.legal-content { padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(48px, 6vw, 80px); overflow-wrap: anywhere; }
.legal-content > p { color: var(--text); }
.legal-content h2 { margin-top: 2.1em; margin-bottom: .65em; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.legal-content h3 { margin-top: 1.4em; margin-bottom: .65em; font-size: clamp(1.125rem, 1.6vw, 1.35rem); }
.legal-content h4 { margin-top: 1.3em; margin-bottom: .65em; font-size: 1.2rem; line-height: 1.25; }
.legal-footer { background: #050505; border-top: 1px solid #252525; padding: 64px 0 22px; text-align: center; }
.legal-footer .legal-footer-links { display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; gap: clamp(12px, 2.4vw, 36px); list-style: none; margin: 0; padding: 0; }
.legal-footer .legal-footer-links li { margin: 0; flex: 0 0 auto; }
.legal-footer .legal-footer-links a { color: #f5f5f5; font-family: var(--f-body); font-size: clamp(.75rem, 1.15vw, .92rem); font-weight: 600; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
.legal-footer .legal-footer-links a:hover, .legal-footer .legal-footer-links a[aria-current="page"] { color: var(--gold); }
.legal-footer a:focus-visible { outline-color: var(--gold); }
.legal-footer-copyright { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 0 7px; margin: 40px 0 0; color: #989898; font-size: .9rem; }
.legal-footer-copyright a { color: #cfcfcf; }
.legal-footer-affiliation { margin: 8px 0 0; color: #989898; font-size: .8rem; line-height: 1.5; }
@media (max-width: 767px) {
  .legal-footer { padding: 40px 0 24px; }
  .legal-footer .legal-footer-links { flex-direction: column; gap: 16px; }
  .legal-footer .legal-footer-links a { font-size: .88rem; }
  .legal-footer-copyright { margin-top: 30px; font-size: .8rem; }
}


/* LevelZ blog listing and articles */
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.blog-card { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 0; min-width: 0; background: var(--paper); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.blog-card-link { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 0; color: var(--text); text-decoration: none; }
.blog-card-link:hover { color: var(--leather-deep); }
.blog-card img { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: contain; background: var(--ink); border-bottom: 2px solid var(--ink); }
.blog-card-content { display: grid; grid-template-rows: subgrid; grid-row: span 2; row-gap: 12px; padding: 22px; }
.blog-card h2 { font-size: 1.7rem; line-height: 1.15; text-transform: none; hyphens: none; margin: 0; }
.blog-card p { font-size: .95rem; color: var(--muted); margin: 0; }
.blog-featured { margin: 0 auto 36px; max-width: 738px; }
.blog-featured img { width: 100%; height: auto; object-fit: contain; border: 2px solid var(--ink); }
.blog-featured figcaption { margin-top: 10px; color: var(--muted); font-size: .85rem; line-height: 1.5; }
.blog-article ul { padding-left: 24px; margin: 0 0 24px; }
.blog-article li { margin-bottom: 8px; }
.blog-table-scroll { overflow-x: auto; margin: 24px 0; }
.blog-table-scroll table { width: 100%; border-collapse: collapse; background: var(--paper); }
.blog-table-scroll th, .blog-table-scroll td { border: 1px solid var(--iron); padding: 12px 14px; text-align: left; vertical-align: top; min-width: 130px; }
.blog-table-scroll th { background: var(--ink); color: #fff; font-weight: 600; }
@media (max-width: 999px) { .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) {
  .blog-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .blog-card-content { padding: 18px; }
  .blog-card h2 { font-size: 1.55rem; }
}
