/* Homepage: everything under the hero. Built from the same parts as the hero inventory
   (static/home/inventory.css): dark windows with 2px borders and hard offset shadows, Press Start 2P for
   labels, JetBrains Mono for reading text, pixel art at whole-number scales. A section sets --mc, its
   accent colour as r,g,b, and the window bullet, the highlighted word and the button all follow it. */

/* ---------- shared ---------- */
.section { max-width: 1200px; margin: 0 auto; padding: 96px 40px; position: relative; z-index: 1; --mc: 243,139,168; }
.section-head { max-width: 820px; margin: 0 auto 44px; text-align: center; }
.section-tag { font: 400 clamp(12px, 1.5vw, 17px)/1.7 var(--px); letter-spacing: 2px; color: var(--bright); margin-bottom: 16px; }
.section-tag .hl { color: rgb(var(--mc)); }
.section-desc { font-size: 15px; font-weight: 400; line-height: 1.75; color: var(--sub); }
.sec-note { margin-top: 18px; text-align: center; font-size: 12.5px; line-height: 1.6; color: var(--idim); }
.cta-row { text-align: center; }
.section-cta { display: inline-block; margin-top: 22px; padding: 16px 22px; font: 400 10px/1 var(--px); letter-spacing: 1px; text-decoration: none;
  color: rgb(var(--mc)); border: 2px solid rgb(var(--mc)); box-shadow: 4px 4px 0 rgba(var(--mc), .3);
  transition: transform .08s, box-shadow .08s, background .12s, color .12s; }
.section-cta:hover { background: rgb(var(--mc)); color: var(--void); transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(var(--mc), .3); }
.section-cta:focus-visible, .step-card:focus-visible, .iso-cta:focus-visible, .tier-btn:focus-visible { outline: 2px solid var(--bright); outline-offset: 3px; }
.pxl { image-rendering: pixelated; image-rendering: crisp-edges; }

#isometric, #tilesets, #motion, #resize, #exact-size, #pricing { --mc: 249,226,175; }
#how, #backgrounds, #faq { --mc: 137,180,250; }
#micro { --mc: 180,190,254; }
#rotate8 { --mc: 148,226,213; }
#reskins { --mc: 203,166,247; }
/* Lifted above the page scanlines (z 999) so they do not moire against detailed art. The topbar sits above. */
#backgrounds, #reskins { z-index: 1000; }

/* Scroll reveal. An animation, not a transition, so an element's own hover transition is never delayed by its
   place in the stagger (--d). No fill forwards: once it has played, hover transforms work as normal. */
.reveal { opacity: 0; }
.reveal.visible { opacity: 1; animation: revealIn .5s ease var(--d, 0s) backwards; }
@keyframes revealIn { from { opacity: 0; transform: translateY(24px); } }

/* The window: the hero's inventory panel, reused for every showcase. */
.win { position: relative; padding: 14px 16px 16px; background: var(--win); border: 2px solid var(--border-lit); box-shadow: 8px 8px 0 rgba(0,0,0,.6); }
.win-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; height: 12px; margin-bottom: 14px;
  font: 8px/12px var(--px); letter-spacing: 1px; color: var(--idim); white-space: nowrap; }
.win-head b { font-weight: 400; color: var(--bright); }
.win-head i { display: inline-block; width: 8px; height: 8px; margin-right: 10px; background: rgb(var(--mc)); }
.win-head > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.win-tip { margin-top: 14px; font-size: 13px; line-height: 1.6; color: var(--sub); }
.win-tip b { font-weight: 500; color: rgb(var(--mc)); }
.win-fit { width: -moz-fit-content; width: fit-content; max-width: 100%; margin: 0 auto; }
.win-fit img, .win-fit video { display: block; max-width: 100%; height: auto; }

/* The block arrow from the hero's before and after slots. */
.stage-arrow, .rk-arrow { flex: none; width: 22px; height: 22px; background: rgb(var(--mc));
  clip-path: polygon(0 36%, 55% 36%, 55% 9%, 100% 50%, 55% 91%, 55% 64%, 0 64%); }

/* ---------- modes: a grid of slots, each one opens its mode ---------- */
.steps-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.step-card { position: relative; display: flex; flex-direction: column; min-width: 0; color: inherit; text-decoration: none;
  background: var(--panel); border: 2px solid var(--border); transition: border-color .12s, background .12s; }
a.step-card:hover, a.step-card:focus-visible { border-color: rgba(var(--mc), .6); background: var(--card); }
/* the selection brackets the inventory uses */
a.step-card::after { content: ''; position: absolute; inset: -7px; pointer-events: none; opacity: 0; --c: rgb(var(--mc)); --l: 14px; --t: 3px;
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / var(--l) var(--t), linear-gradient(var(--c), var(--c)) 0 0 / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) 100% 0 / var(--l) var(--t), linear-gradient(var(--c), var(--c)) 100% 0 / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) 0 100% / var(--l) var(--t), linear-gradient(var(--c), var(--c)) 0 100% / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) 100% 100% / var(--l) var(--t), linear-gradient(var(--c), var(--c)) 100% 100% / var(--t) var(--l);
  background-repeat: no-repeat; }
a.step-card:hover::after, a.step-card:focus-visible::after { opacity: 1; }
.step-stage { height: 136px; display: flex; align-items: center; justify-content: center; gap: 14px; overflow: hidden;
  background: #0a0b13 linear-gradient(rgba(198,207,232,.035) 1px, transparent 1px) 0 0 / 100% 16px; border-bottom: 2px solid var(--border); }
.step-stage img { flex: none; display: block; }
.step-stage .stage-before { image-rendering: auto; border: 2px solid var(--border-lit); }
.step-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px 18px 18px; }
.step-card h3 { font: 400 10px/1.7 var(--px); letter-spacing: .5px; color: var(--bright); }
.step-card p { flex: 1; font-size: 13px; line-height: 1.65; color: var(--sub); }
.feat-tag { display: inline-block; padding: 0 8px; font: 500 11px/18px var(--mono); letter-spacing: .3px; white-space: nowrap; color: var(--bright); background: var(--border-lit); transition: background .12s, color .12s; }
.feat-tag.free { color: var(--void); background: var(--green); }
a.step-card:hover .feat-tag, a.step-card:focus-visible .feat-tag { color: var(--void); background: rgb(var(--mc)); }
.feat-new { margin-left: 6px; padding: 3px 6px; font-size: 8px; letter-spacing: 1px; vertical-align: middle; color: var(--void); background: var(--yellow); }

/* UI Kit: the wide slot at the end of the grid, with its own demo */
.steps-row > .step-card.is-uikit { grid-column: span 2; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 22px; align-items: center; padding: 20px 22px; border-color: rgba(var(--mc), .45); }
.step-card.is-uikit:hover { border-color: rgb(var(--mc)); }
.uk-text { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.uk-text p a { color: rgb(var(--mc)); }
.uk-ea { margin-left: 6px; padding: 3px 5px; font-size: 6px; letter-spacing: 1px; vertical-align: middle; color: rgb(var(--mc)); background: rgba(var(--mc), .14); border: 1px solid rgb(var(--mc)); }
.feat-tag.uk-tag { color: var(--void); background: rgb(var(--mc)); }
.uk-try { margin-top: 4px; font: 400 8px/1.6 var(--px); letter-spacing: 1px; color: rgb(var(--mc)); text-decoration: none; }
.uk-try:hover { color: var(--bright); }
.uk-wrap { position: relative; width: 100%; aspect-ratio: 560 / 320; overflow: hidden; }
.uk-stage { position: absolute; left: 0; top: 0; width: 560px; height: 320px; transform-origin: 0 0; }
.uk-concept { position: absolute; left: 40px; top: 0; width: 480px; height: 320px; overflow: hidden; border: 2px solid var(--border-lit); box-shadow: 4px 4px 0 rgba(0,0,0,.6); transition: all .9s cubic-bezier(.6,0,.2,1); }
.uk-concept img { display: block; width: 100%; height: 100%; image-rendering: auto; transition: filter .6s; }
.uk-concept.small { left: 0; width: 330px; height: 220px; }
.uk-concept.dim img { filter: brightness(.38) saturate(.6); }
.uk-scan { position: absolute; left: 0; right: 0; top: -10%; height: 10%; opacity: 0; background: linear-gradient(transparent, rgba(180,190,254,.45), transparent); }
.uk-scan.go { animation: ukScan 1.1s linear forwards; }
@keyframes ukScan { 0% { top: -10%; opacity: 1; } 100% { top: 100%; opacity: 1; } }
.uk-box { position: absolute; opacity: 0; transform: scale(1.25); border: 2px dashed #b4befe; background: rgba(180,190,254,.1); transition: opacity .25s, transform .25s; }
.uk-box.on { opacity: 1; transform: scale(1); }
.uk-box.off { opacity: 0; transition: opacity .3s; }
.uk-p { position: absolute; z-index: 3; opacity: 0; image-rendering: auto; filter: drop-shadow(2px 3px 0 rgba(0,0,0,.55));
  transition: left .8s cubic-bezier(.5,0,.15,1), top .8s cubic-bezier(.5,0,.15,1), width .8s cubic-bezier(.5,0,.15,1), height .8s cubic-bezier(.5,0,.15,1), opacity .25s; }
.uk-p.on { opacity: 1; }
.uk-foot { position: absolute; left: 0; right: 0; top: 240px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; opacity: 0; transform: translateY(8px); transition: all .5s; }
.uk-foot.on { opacity: 1; transform: none; }
.uk-cnt { margin-right: 8px; font: 11px var(--px); color: var(--text); }
.uk-cnt b { font-weight: 400; font-size: 18px; color: #b4befe; }
.uk-chip { padding: 6px 7px; font: 7px var(--px); letter-spacing: 1px; color: #b4befe; border: 1px solid rgba(180,190,254,.5); }
.uk-chip.t { color: #94e2d5; border-color: #94e2d5; }
.uk-state { position: absolute; left: 350px; top: 54px; opacity: 0; font: 7px var(--px); letter-spacing: 1px; color: var(--dim); transition: opacity .3s; }
.uk-state.on { opacity: 1; }
.uk-state b { font-weight: 400; color: #b4befe; }

/* ---------- isometric ---------- */
.iso-new { display: inline-block; margin-right: 10px; padding: 5px 8px; font: 8px var(--px); letter-spacing: 1px; vertical-align: middle; color: var(--void); background: var(--yellow); }
.iso-win { max-width: 1020px; margin: 0 auto; }
.iso-stage { position: relative; overflow: hidden; line-height: 0; background: radial-gradient(ellipse at 50% 60%, #141628 0%, #0a0b14 70%); border: 2px solid var(--border); }
.iso-stage canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.iso-cap { position: absolute; left: 12px; bottom: 12px; padding: 10px 14px; line-height: 1.5; background: rgba(5,5,13,.86); border: 2px solid var(--border-lit); transition: opacity .25s, transform .25s; }
.iso-cap.out { opacity: 0; transform: translateY(8px); }
.iso-cap .t { margin-bottom: 6px; font: 10px var(--px); letter-spacing: 1px; color: var(--yellow); }
.iso-cap .c { font-size: 12px; color: var(--text); }
.iso-dots { position: absolute; right: 12px; bottom: 16px; display: flex; gap: 8px; }
.iso-dot { position: relative; width: 34px; height: 6px; padding: 0; overflow: hidden; border: none; cursor: pointer; background: var(--muted); }
.iso-dot::before { content: ''; position: absolute; inset: -12px 0; }
.iso-dot i { position: absolute; inset: 0; background: var(--yellow); transform-origin: left; transform: scaleX(0); }
.iso-dot.done i { transform: scaleX(1); background: #6e6346; }
.iso-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-top: 30px; }
.iso-cta { display: flex; align-items: center; gap: 14px; min-width: 300px; padding: 14px 18px; text-decoration: none; color: rgb(var(--mc)); background: var(--win);
  border: 2px solid rgb(var(--mc)); box-shadow: 4px 4px 0 rgba(var(--mc), .3); transition: transform .08s, box-shadow .08s, background .12s; }
.iso-cta:hover { background: rgba(var(--mc), .1); transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(var(--mc), .3); }
.iso-cta.sp { --mc: 243,139,168; }
.iso-cta.ts { --mc: 249,226,175; }
.iso-cta canvas { flex: none; width: 44px; height: 44px; image-rendering: pixelated; }
.iso-cta b { display: block; margin-bottom: 6px; font: 400 10px var(--px); letter-spacing: 1px; }
.iso-cta .sub { font-size: 12px; color: var(--sub); }
.iso-cta .ar { margin-left: auto; font: 12px var(--px); }

/* ---------- why ---------- */
.why-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.why-card { padding: 26px 22px 24px; background: var(--panel); border: 2px solid var(--border); }
.why-num { display: flex; align-items: flex-end; height: 44px; margin-bottom: 10px; font: 36px/1 var(--px); color: rgb(var(--mc)); }
.why-unit { display: block; margin-bottom: 20px; font: 9px/1.4 var(--px); letter-spacing: 2px; color: var(--idim); }
.why-card h3 { margin-bottom: 10px; font: 400 10px/1.7 var(--px); letter-spacing: .5px; color: var(--bright); }
.why-card p { font-size: 13px; line-height: 1.65; color: var(--sub); }
.why-card.w1 { --mc: 249,226,175; } .why-card.w2 { --mc: 243,139,168; } .why-card.w3 { --mc: 137,180,250; } .why-card.w4 { --mc: 166,227,161; }

/* ---------- micro meadow ---------- */
.mm-win { max-width: 1020px; margin: 0 auto; }
.mm-scene { position: relative; overflow: hidden; border: 2px solid var(--border); }
.mm-sky { height: 220px; background: linear-gradient(180deg, #171728, #1d2030 70%, #232840); }
.mm-line { position: absolute; left: 0; right: 0; bottom: 46px; display: flex; align-items: flex-end; justify-content: space-evenly; }
.mm-row { display: contents; }
.mm-sp { text-align: center; line-height: 0; }
.mm-sp img { --k: 3; display: inline-block; width: calc(var(--w) * var(--k) * 1px); height: calc(var(--h) * var(--k) * 1px); }
.mm-cap { display: block; margin-bottom: 12px; font-size: 11px; font-weight: 500; line-height: 1.3; color: #cdd6f4; text-shadow: 1px 1px 0 rgba(10,12,18,.9), 0 0 6px rgba(10,12,18,.8); }
.mm-ground { height: 52px; background: url('/static/showcase/micro-meadow-grass.png') repeat-x bottom; image-rendering: pixelated; }
@media (prefers-reduced-motion: no-preference) {
  .mm-sp { animation: mmBob 3.2s steps(2) infinite; }
  @keyframes mmBob { 50% { transform: translateY(-3px); } }
}

/* ---------- backgrounds ---------- */
.bg-hero { position: relative; overflow: hidden; line-height: 0; border: 2px solid var(--border); }
.bg-hero img { --k: 5; display: block; width: calc(204px * var(--k)); height: calc(112px * var(--k)); }
.bg-cap { position: absolute; left: 10px; bottom: 10px; padding: 8px 10px; font: 8px/1.4 var(--px); letter-spacing: 1px; color: rgb(var(--mc)); background: rgba(5,5,13,.86); border: 2px solid var(--border-lit); }
.bg-strip { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 12px; }
.bg-thumb { position: relative; flex: none; width: var(--tw, 192px); height: var(--th, 108px); overflow: hidden; line-height: 0; border: 2px solid var(--border); transition: border-color .12s; }
.bg-thumb:hover { border-color: rgba(var(--mc), .6); }
/* 1:1 crops. The three larger scenes are drawn at twice the size, so they show at exactly half. */
.bg-thumb img { display: block; max-width: none; width: var(--tw, 192px); height: var(--th, 108px); object-fit: none; }
.bg-thumb img.x2 { width: calc(var(--tw, 192px) * 2); height: calc(var(--th, 108px) * 2); transform: scale(.5); transform-origin: 0 0; }
.bg-thumb figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 6px 6px; font-size: 10.5px; line-height: 1.2; text-align: center; color: var(--bright); background: linear-gradient(transparent, rgba(5,5,13,.92)); }

/* ---------- tilesets ---------- */
.ts-gen { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; margin-bottom: 22px; }
.ts-prompt { padding: 11px 16px; font-size: 14px; color: var(--bright); background: var(--win); border: 2px solid var(--border-lit); }
.ts-prompt .ts-caret { margin-right: 8px; color: rgb(var(--mc)); }
.ts-atlas { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ts-atlas canvas { width: 96px; height: 96px; image-rendering: pixelated; border: 2px solid var(--border-lit); }
.ts-atlas span, .ts-genlabel { font: 8px var(--px); letter-spacing: 1px; color: var(--idim); }
.ts-genlabel { color: rgb(var(--mc)); }
.ts-imm { position: relative; line-height: 0; border: 2px solid var(--border); }
.ts-imm canvas { display: block; max-width: 100%; height: auto; image-rendering: pixelated; cursor: crosshair; touch-action: pan-y; background: #0a0b14; }
.ts-ov { position: absolute; left: 16px; top: 16px; max-width: 70%; pointer-events: none; line-height: 1.5; }
.ts-ov h3 { margin: 0 0 8px; font: 400 clamp(12px, 2vw, 18px)/1.4 var(--px); color: #fff; text-shadow: 3px 3px 0 rgba(0,0,0,.55); }
.ts-ov p { font-size: 13px; color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,.7); }
.ts-tools { position: absolute; left: 14px; bottom: 14px; display: flex; align-items: center; gap: 10px; line-height: 1; }
.ts-sw { width: 28px; height: 28px; padding: 0; cursor: pointer; border: 2px solid rgba(255,255,255,.4); box-shadow: 2px 2px 0 rgba(0,0,0,.5); }
.ts-sw.on { border-color: #fff; }
.ts-reset { padding: 8px 12px; font: 700 11px var(--mono); color: #fff; cursor: pointer; background: rgba(5,5,13,.7); border: 2px solid rgba(255,255,255,.4); }
.ts-reset:hover { border-color: #fff; }

/* ---------- reskin ---------- */
.rk-showcase { max-width: 940px; margin: 0 auto; }
.rk-cols { display: flex; align-items: center; justify-content: center; gap: 22px; }
.rk-left { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rk-orig, .rk-anim, .rk-chairs { overflow: hidden; line-height: 0; border: 2px solid var(--border-lit); box-shadow: 6px 6px 0 rgba(0,0,0,.6); }
/* These three are finished cards, shown at half size so their pixels stay even. */
.rk-orig img { display: block; width: 190px; height: 164px; }
.rk-anim video { display: block; width: 258px; height: 163px; }
.rk-chairs { flex: none; width: 501px; }
.rk-chairs img { display: block; width: 100%; height: auto; }
.rk-arrow { transform: rotate(90deg); }

/* ---------- motion: animate and rotate ---------- */
.mu-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; }
.mu-block { display: flex; flex-direction: column; }
.mu-block.is-rotate { --mc: 137,180,250; }
.mu-stage { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 290px; padding: 20px;
  background: #0a0b13 linear-gradient(rgba(198,207,232,.035) 1px, transparent 1px) 0 0 / 100% 16px; border: 2px solid var(--border); }
.mu-pair { display: flex; align-items: center; justify-content: center; gap: 26px; }
.mu-side { text-align: center; line-height: 0; }
.mu-side img { width: 164px; height: 130px; }
.mu-side-label { margin-top: 14px; font: 8px/1 var(--px); letter-spacing: 1.5px; color: var(--idim); }
.mu-side.is-after .mu-side-label { color: rgb(var(--mc)); }
.mu-rot { position: relative; display: flex; align-items: center; justify-content: center; padding: 24px 34px; }
.mu-rot img { display: block; width: 168px; height: 248px; }
.mu-cmp { position: absolute; font: 8px/1 var(--px); letter-spacing: 1.5px; color: rgb(var(--mc)); }
.mu-cmp-n { top: 0; left: 50%; transform: translateX(-50%); }
.mu-cmp-s { bottom: 0; left: 50%; transform: translateX(-50%); }
.mu-cmp-e { right: 0; top: 50%; transform: translateY(-50%); }
.mu-cmp-w { left: 0; top: 50%; transform: translateY(-50%); }
.mu-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.mu-meta { padding: 0 8px; font: 500 11px/18px var(--mono); letter-spacing: .3px; color: var(--void); background: rgb(var(--mc)); }

/* ---------- resize ---------- */
.resize-win { max-width: 760px; margin: 0 auto; }
.resize-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 34px; padding: 34px 16px 26px;
  background: #0a0b13 linear-gradient(rgba(198,207,232,.035) 1px, transparent 1px) 0 0 / 100% 16px; border: 2px solid var(--border); }
.resize-item { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.resize-item img { display: block; }
.resize-label { font: 9px/1 var(--px); letter-spacing: 1px; color: rgb(var(--mc)); }

/* ---------- rotation and sprite packs ---------- */
.rot-win img { width: 600px; outline: 2px solid var(--border); }
.pack-win img { width: 540px; }
@media (max-width: 640px) { .pack-win img { width: 360px; } }

/* ---------- exact size: the size picker ---------- */
#exact-size img.px { image-rendering: pixelated; image-rendering: crisp-edges; }
.x-panel { position: relative; max-width: 940px; margin: 0 auto; background: var(--win); border: 2px solid var(--border-lit); box-shadow: 8px 8px 0 rgba(0,0,0,.6); }
.x-foot { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 30px; font-size: 13px; color: var(--sub); text-align: center; }
.x-pill { font-family: var(--px); font-size: 8px; letter-spacing: 1.4px; padding: 6px 9px; background: var(--green); color: var(--void); flex-shrink: 0; }
.x-cta { text-align: center; }
.x-k { font-family: var(--px); font-size: 8px; letter-spacing: 1.5px; color: var(--idim); margin: 0 0 10px; }
.x-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.x-chip {
  font-family: var(--mono); font-size: 11px; color: var(--text); background: rgba(255,255,255,0.018);
  border: 1px solid var(--border-lit); padding: 7px 9px; cursor: pointer; white-space: nowrap;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.x-chip b { color: var(--yellow); font-weight: 600; margin-right: 6px; }
.x-chip:hover { border-color: var(--pink); background: rgba(243,139,168,0.06); }
.x-chip.on { border-color: var(--yellow); background: rgba(249,226,175,0.08); }
.x-chip:focus-visible, .x-tog button:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

.xa { display: grid; grid-template-columns: minmax(0, 290px) minmax(0, 1fr); gap: 32px; align-items: center; padding: 32px 28px 26px; }
.xa-dims { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.xa-field { display: flex; align-items: center; border: 2px solid var(--border-lit); background: var(--void); transition: border-color 0.15s; }
.xa-field:focus-within { border-color: var(--yellow); }
.xa-field span { font-family: var(--px); font-size: 8px; color: var(--dim); padding-left: 11px; }
.xa-field input {
  width: 74px; background: transparent; border: 0; outline: none; color: var(--yellow);
  font-family: var(--px); font-size: 16px; padding: 14px 8px 12px 9px; -moz-appearance: textfield; appearance: textfield;
}
.xa-field input::-webkit-inner-spin-button, .xa-field input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.xa-x { font-family: var(--px); font-size: 11px; color: var(--dim); }
.xa-unit { font-family: var(--px); font-size: 8px; color: var(--dim); }
.xa-ratio { margin-top: 24px; }
.xa-ratio-head { display: flex; justify-content: space-between; font-family: var(--px); font-size: 8px; letter-spacing: 1px; color: var(--dim); margin-bottom: 9px; }
.xa-ratio-head b { color: var(--yellow); font-weight: 400; }
.xa-bar { height: 10px; background: var(--void); border: 1px solid var(--border-lit); position: relative; }
.xa-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--green); transition: width 0.35s ease, background 0.2s; }
.xa-bar u { position: absolute; top: -4px; bottom: -4px; right: -1px; width: 2px; background: var(--dim); }
.xa-bar-scale { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-top: 6px; }
.xa-note { font-size: 12px; color: var(--sub); line-height: 1.7; margin-top: 10px; min-height: 3.4em; }
.xa-note button { font-family: var(--mono); font-size: 11px; color: var(--yellow); background: none; border: 1px solid var(--yellow); padding: 2px 7px; cursor: pointer; margin-left: 2px; }
.xa.bad .xa-bar i { background: var(--pink); }
.xa.bad .xa-ratio-head b, .xa.bad .xa-note { color: var(--pink); }

.xa-stage-wrap { min-width: 0; display: flex; flex-direction: column; align-items: center; }
.xa-stage { position: relative; padding: 48px 30px 0 66px; }
.xa-canvas {
  position: relative; width: calc(var(--s) * 128px); height: calc(var(--s) * 128px);
  background-image: linear-gradient(rgba(45,46,69,0.45) 1px, transparent 1px), linear-gradient(90deg, rgba(45,46,69,0.45) 1px, transparent 1px);
  background-size: calc(var(--s) * 16px) calc(var(--s) * 16px); background-position: 0 100%;
  border-left: 1px solid var(--border-lit); border-bottom: 1px solid var(--border-lit);
}
.xa-canvas::after { content: '128'; position: absolute; right: 0; top: 4px; font-family: var(--px); font-size: 7px; color: var(--muted); padding-right: 4px; }
.xa-frame {
  position: absolute; left: 0; bottom: 0;
  width: calc(var(--w) * var(--s) * 1px); height: calc(var(--h) * var(--s) * 1px);
  background: repeating-conic-gradient(#191a29 0 25%, #11121c 0 50%) 0 100% / calc(var(--s) * 8px) calc(var(--s) * 8px);
  box-shadow: 0 0 0 2px var(--yellow), 0 0 28px rgba(249,226,175,0.12);
  transition: width 0.45s cubic-bezier(.2,.9,.25,1.12), height 0.45s cubic-bezier(.2,.9,.25,1.12), box-shadow 0.2s;
}
.xa.dragging .xa-frame { transition: box-shadow 0.2s; }
.xa-frame.bad {
  background: repeating-linear-gradient(135deg, rgba(243,139,168,0.16) 0 6px, transparent 6px 12px);
  box-shadow: 0 0 0 2px var(--pink), 0 0 28px rgba(243,139,168,0.2);
}
.xa-rt, .xa-rl { position: absolute; overflow: hidden; }
.xa-rt { left: 0; bottom: calc(100% + 6px); width: 100%; height: 12px; }
.xa-rl { right: calc(100% + 6px); bottom: 0; height: 100%; width: 12px; }
.xa-rt i, .xa-rl i { position: absolute; display: block; }
.xa-rt i {
  left: 0; bottom: 0; height: 12px; width: calc(var(--s) * 128px + 1px);
  background:
    linear-gradient(90deg, var(--dim) 1px, transparent 1px) 0 100% / calc(var(--s) * 16px) 12px repeat-x,
    linear-gradient(90deg, var(--muted) 1px, transparent 1px) 0 100% / calc(var(--s) * 4px) 6px repeat-x;
}
.xa-rl i {
  right: 0; bottom: 0; width: 12px; height: calc(var(--s) * 128px + 1px);
  background:
    linear-gradient(0deg, var(--dim) 1px, transparent 1px) 100% 100% / 12px calc(var(--s) * 16px) repeat-y,
    linear-gradient(0deg, var(--muted) 1px, transparent 1px) 100% 100% / 6px calc(var(--s) * 4px) repeat-y;
}
.xa-rt::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 2px; background: var(--yellow); z-index: 1; }
.xa-rl::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--yellow); z-index: 1; }
.xa-frame.bad .xa-rt::after, .xa-frame.bad .xa-rl::after { background: var(--pink); }
.xa-pw, .xa-ph {
  position: absolute; font-family: var(--px); font-size: 10px; line-height: 1; color: var(--void); background: var(--yellow);
  padding: 6px 7px 5px; white-space: nowrap; transition: background 0.2s;
}
.xa-pw { right: 0; bottom: calc(100% + 26px); transform: translateX(50%); }
.xa-ph { right: calc(100% + 24px); top: 0; transform: translateY(-50%); }
.xa-frame.bad .xa-pw, .xa-frame.bad .xa-ph { background: var(--pink); }
.xa-sprite { position: absolute; left: 0; bottom: 0; opacity: 0; transform-origin: 50% 100%; pointer-events: none; }
.xa-sprite.pop { animation: xaPop 0.42s cubic-bezier(.2,.9,.3,1.3) both; }
@keyframes xaPop { 0% { opacity: 0; transform: translateY(6px) scale(0.7); } 55% { opacity: 1; } 100% { opacity: 1; transform: none; } }
.xa-ghost {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--px); font-size: 7px; line-height: 1.8; color: var(--dim); opacity: 0; transition: opacity 0.2s; pointer-events: none; padding: 4px;
}
.xa-ghost.on { opacity: 1; }
.xa-handle {
  position: absolute; right: -9px; top: -9px; width: 18px; height: 18px; padding: 0; z-index: 3;
  background: var(--yellow); border: 4px solid var(--void); box-shadow: 0 0 0 1px var(--yellow);
  cursor: nesw-resize; touch-action: none;
}
.xa-handle::before { content: ''; position: absolute; inset: -14px; }
.xa-handle:focus-visible { outline: 2px solid var(--pink); outline-offset: 4px; }
.xa-frame.bad .xa-handle { background: var(--pink); box-shadow: 0 0 0 1px var(--pink); }
.xa:not(.touched) .xa-handle { animation: xaNudge 1.6s ease-in-out infinite; }
@keyframes xaNudge { 0%, 60%, 100% { transform: none; } 75% { transform: translate(3px, -3px); } }
.xa-cap { margin-top: 18px; font-size: 12px; color: var(--idim); text-align: center; line-height: 1.7; }
.xa-cap b { color: var(--text); font-weight: 500; }

#exact-size .x-links { margin-top: 14px; font-size: 12.5px; color: var(--idim); text-align: center; }
#exact-size .x-links a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
#exact-size .x-links a:hover { color: var(--yellow); }
@media (max-width: 900px) {
  .xa { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .xa-stage-wrap { order: -1; }
}
@media (max-width: 640px) {
  .x-foot { flex-direction: column; gap: 8px; font-size: 12.5px; }
  .xa { padding: 22px 10px 20px; }
  .xa-controls { padding: 0 6px; }
  .xa-stage { padding: 44px 22px 0 50px; }
  .xa-pw, .xa-ph { font-size: 8px; }
  .xa-ph { right: calc(100% + 22px); }
  .xa-field input { width: 64px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .xa-frame, .xa-bar i { transition: none !important; }
  .xa-sprite.pop { animation: none; opacity: 1; }
  .xa:not(.touched) .xa-handle { animation: none; }
}

/* ---------- pricing: character select ---------- */
.pricing-section {
  position: relative;
  z-index: 1;
  padding: 96px 40px;
  background: radial-gradient(ellipse 90% 60% at 50% 50%, rgba(249,226,175,0.03) 0%, transparent 70%);
}

.pricing-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  max-width: 1320px;
  margin: 0 auto;
}

.tier {
  background: var(--panel);
  border: 2px solid var(--border);
  padding: 30px 20px 24px;
  position: relative;
  z-index: 0; /* stacking context: .tier-fx-clip at z:-1 paints above the
                 card bg but under every child (incl. absolute badge) */
  transition: transform .2s cubic-bezier(.16,1,.3,1), box-shadow .2s, border-color .2s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Pixel scanline accent at top of tier */
.tier::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

/* Animated bg pattern */
.tier::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(30,31,48,0.3) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(30,31,48,0.3) 1px, transparent 1px);
  background-size: 8px 8px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.tier:hover::after { opacity: 0.6; }

.tier:hover { transform: translateY(-6px); z-index: 2; }

/* ── Squire, stone ── */
.tier.t-squire { border-color: #4a4a5e; }
.tier.t-squire::before { background: linear-gradient(90deg, #4a4a5e, #6a6a80, #4a4a5e); }
.tier.t-squire:hover { border-color: #7a7a96; box-shadow: 0 20px 50px rgba(100,100,130,0.2); }
.tier.t-squire .tier-name { color: #9090b0; }
.tier.t-squire .tier-list li::before { color: #7a7a96; }
.tier.t-squire .tier-btn { border-color: #6a6a80; color: #b4b8d0; }
.tier.t-squire .tier-btn:hover { border-color: #9a9ab6; color: var(--bright); background: rgba(74,74,94,0.25); }

/* ── Ranger, green ── */
.tier.t-ranger { border-color: var(--green); }
.tier.t-ranger::before { background: linear-gradient(90deg, var(--green), #c8f0c5, var(--green)); }
.tier.t-ranger:hover { box-shadow: 0 20px 50px rgba(166,227,161,0.15); }
.tier.t-ranger .tier-name { color: var(--green); }
.tier.t-ranger .tier-list li::before { color: var(--green); }
.tier.t-ranger .tier-btn { border-color: var(--green); color: var(--green); }
.tier.t-ranger .tier-btn:hover { background: var(--green); color: var(--void); }
.tier.t-ranger .tier-btn { --bs: rgba(166,227,161,.3); }

/* ── Knight, pink ── */
.tier.t-knight {
  border-color: var(--pink);
  box-shadow: 0 0 30px rgba(243,139,168,0.06);
}
.tier.t-knight::before { background: linear-gradient(90deg, var(--pink), #ffb3c6, var(--pink)); }
.tier.t-knight:hover { box-shadow: 0 20px 60px rgba(243,139,168,0.22); }
.tier.t-knight .tier-name { color: var(--pink); }
.tier.t-knight .tier-list li::before { color: var(--pink); }
.tier.t-knight .tier-btn { border-color: var(--pink); color: var(--pink); }
.tier.t-knight .tier-btn:hover { background: var(--pink); color: var(--void); }
.tier.t-knight .tier-btn { --bs: rgba(243,139,168,.3); }

/* ── Paladin, blue (featured, best value) ── */
.tier.t-paladin {
  border-color: var(--blue);
  box-shadow: 0 0 40px rgba(137,180,250,0.10), inset 0 0 30px rgba(137,180,250,0.03);
  overflow: visible; /* the BEST VALUE badge floats above the card edge ,
                        .tier's overflow:hidden had been clipping it to a
                        3px sliver (longstanding, previously on Knight) */
}
.tier.t-paladin::before { background: linear-gradient(90deg, var(--blue), #b0d4ff, var(--blue)); }
.tier.t-paladin:hover { box-shadow: 0 20px 60px rgba(137,180,250,0.18); }
.tier.t-paladin .tier-name { color: var(--blue); }
.tier.t-paladin .tier-list li::before { color: var(--blue); }
.tier.t-paladin .tier-btn { background: var(--blue); color: var(--void); border-color: var(--blue); font-family: 'Press Start 2P', cursive; }
.tier.t-paladin .tier-btn { --bs: #5a7aaa; }
.tier.t-paladin .tier-btn:hover { background: #a3c7ff; }

/* Dragonlord, top of the ladder, ember + gold */
.tier.t-dragonlord {
  border-color: #f9e2af;
  box-shadow: 0 0 44px rgba(249,226,175,0.10), inset 0 0 30px rgba(249,226,175,0.04);
  overflow: visible; /* floating badge, same clip gotcha as Paladin */
}
.tier.t-dragonlord .tier-badge { background: #f9e2af; }
.tier.t-dragonlord .tier-badge::after { background: #b3823f; }
.tier.t-dragonlord::before { background: linear-gradient(90deg, #f9e2af, #fab387, #f9e2af); }
.tier.t-dragonlord:hover { box-shadow: 0 20px 60px rgba(250,179,135,0.2); }
.tier.t-dragonlord .tier-name { color: #f9e2af; }
.tier.t-dragonlord .tier-list li::before { color: #fab387; }
.tier.t-dragonlord .tier-btn { border-color: #f9e2af; color: #f9e2af; }
.tier.t-dragonlord .tier-btn:hover { background: #f9e2af; color: var(--void); }
.tier.t-dragonlord .tier-btn { --bs: rgba(249,226,175,.3); }

.tier-badge {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  font-family: 'Press Start 2P', cursive;
  font-size: 7px;
  background: var(--blue);
  color: var(--void);
  padding: 5px 14px;
  letter-spacing: 1px;
  white-space: nowrap;
  z-index: 5;
}

/* Pixel shadow on badge */
.tier-badge::after {
  content: '';
  position: absolute;
  bottom: -3px; right: -3px;
  width: 100%; height: 100%;
  background: #5a7aaa;
  z-index: -1;
}

.tier-name {
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 20px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.tier-price {
  font-family: 'Press Start 2P', cursive;
  font-size: 34px;
  color: var(--text);
  margin-bottom: 4px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.tier-price small {
  font-size: 12px;
  color: var(--idim);
  font-family: 'JetBrains Mono', monospace;
}

.tier-period {
  font-size: 11px;
  color: var(--idim);
  margin-bottom: 24px;
  text-align: center;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}

.tier-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.tier-list {
  list-style: none;
  margin-bottom: 24px;
  flex: 1;
  position: relative;
  z-index: 1;
}

.tier-list li {
  font-size: 12px;
  color: var(--text);
  padding: 8px 0;
  border-bottom: 1px solid rgba(30,31,48,0.8);
  line-height: 1.5;
}

.tier-list li::before {
  content: '> ';
  font-family: 'Press Start 2P', cursive;
  font-size: 8px;
  font-weight: bold;
}

.tier-btn {
  display: block;
  width: 100%;
  font-family: 'Press Start 2P', cursive;
  font-size: 8px;
  padding: 14px;
  text-align: center;
  text-decoration: none;
  background: var(--card);
  color: var(--text);
  border: 2px solid var(--border);
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform .08s, box-shadow .08s, background .12s, color .12s, border-color .12s;
  position: relative;
  z-index: 1;
  /* a hard offset shadow, like the hero buttons (the old pseudo-element shadow painted over the button face) */
  box-shadow: 4px 4px 0 var(--bs, rgba(0,0,0,.55));
}

.tier-btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--bs, rgba(0,0,0,.55)); }

/* Credit cost bar */
.credit-bar {
  max-width: 1080px;
  margin: 32px auto 0;
  background: var(--win);
  border: 2px solid var(--border-lit);
  padding: 16px 24px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.credit-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--sub);
}

.credit-item .cr-badge {
  padding: 0 8px;
  font: 500 11px/18px var(--mono);
  letter-spacing: .3px;
  white-space: nowrap;
  color: var(--bright);
  background: var(--border-lit);
}

.hp-int-toggle { display: inline-flex; gap: 12px; }
.hp-int-toggle button {
  font-family: 'Press Start 2P', cursive;
  font-size: 9px;
  letter-spacing: 1.5px;
  padding: 11px 18px 10px;
  background: transparent;
  border: 2px solid var(--border-lit);
  color: var(--sub);
  cursor: pointer;
  line-height: 1.4;
}
.hp-int-toggle button:hover { border-color: var(--pink); color: var(--pink); }
.hp-int-toggle button.active {
  background: var(--pink);
  border-color: var(--pink);
  color: #14141f;
  box-shadow: 4px 4px 0 rgba(243,139,168,0.25);
}
.hp-int-toggle .hp-int-save { color: var(--green, #a6e3a1); font-size: 8px; margin-left: 6px; }
.hp-int-toggle button.active .hp-int-save { color: rgba(20,20,31,0.75); }
.hp-year-link {
  display: block;
  font-size: 11px;
  color: var(--green, #a6e3a1);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  margin-top: 6px;
}
.hp-year-link:hover { color: #c6f0c2; }
/* V1 mascots, generated with the product (static/showcase/tier-*.png) */
.tier-mascot {
  height: 148px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  margin: 4px 0 14px;
}
.tier-mascot img {
  height: auto;
  max-height: 128px;
  width: auto;
  image-rendering: pixelated;
  position: relative;
  z-index: 2;
}
.tier-mascot::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%;
  transform: translateX(-50%);
  width: 132px; height: 18px;
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--tier-acc, var(--pink)) 0%, transparent 72%);
  opacity: 0.32;
}
.tier.t-squire  { --tier-acc: #9aa0b5; }
.tier.t-ranger  { --tier-acc: var(--green); }
.tier.t-knight  { --tier-acc: var(--pink); }
.tier.t-paladin { --tier-acc: var(--blue); }
@media (prefers-reduced-motion: no-preference) {
  .tier:hover .tier-mascot img { animation: mascotBob 1s steps(2) infinite; }
  @keyframes mascotBob { 50% { transform: translateY(-4px); } }
}
/* Ambient card FX, pixel motes rising inside each card, density and
   speed scale with tier (squire faintest -> paladin most alive). Pure
   CSS box-shadow particles, wrapped at +560px for a seamless loop. */
.tier-fx-clip {
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
  display: block;
}
.tier-fx { position: absolute; bottom: -10px; left: 0; width: 3px; height: 3px; background: transparent; display: block; }
.tier.t-squire .tier-fx {
  opacity: .14;
  box-shadow: 40px -60px #9aa0b5, 170px -220px #9aa0b5, 250px -420px #9aa0b5,
              40px 500px #9aa0b5, 170px 340px #9aa0b5, 250px 140px #9aa0b5;
}
.tier.t-ranger .tier-fx {
  opacity: .2;
  box-shadow: 30px -40px #a6e3a1, 120px -180px #a6e3a1, 210px -90px #86c982, 260px -330px #a6e3a1, 80px -470px #86c982,
              30px 520px #a6e3a1, 120px 380px #a6e3a1, 210px 470px #86c982, 260px 230px #a6e3a1, 80px 90px #86c982;
}
.tier.t-knight .tier-fx {
  opacity: .24;
  box-shadow: 25px -30px #f38ba8, 90px -150px #f38ba8, 150px -70px #e07a97, 220px -260px #f38ba8, 265px -110px #ffb3c6, 60px -390px #f38ba8, 190px -480px #ffb3c6,
              25px 530px #f38ba8, 90px 410px #f38ba8, 150px 490px #e07a97, 220px 300px #f38ba8, 265px 450px #ffb3c6, 60px 170px #f38ba8, 190px 80px #ffb3c6;
}
.tier.t-paladin .tier-fx {
  opacity: .3;
  box-shadow: 20px -20px #89b4fa, 70px -120px #b0d4ff, 120px -50px #89b4fa, 170px -200px #eaf2ff, 220px -90px #89b4fa, 260px -300px #b0d4ff, 45px -350px #89b4fa, 145px -430px #eaf2ff, 240px -490px #89b4fa, 95px -260px #b0d4ff,
              20px 540px #89b4fa, 70px 440px #b0d4ff, 120px 510px #89b4fa, 170px 360px #eaf2ff, 220px 470px #89b4fa, 260px 260px #b0d4ff, 45px 210px #89b4fa, 145px 130px #eaf2ff, 240px 70px #89b4fa, 95px 300px #b0d4ff;
}
/* Dragonlord FX: no floating motes, just firelight. The torchlight
   aura (on .tier-fx-clip::after) + the mascot's own ember glow carry
   the card. */
.tier.t-dragonlord .tier-mascot img {
  filter: drop-shadow(0 0 12px rgba(255,143,94,0.35)) drop-shadow(0 0 30px rgba(249,226,175,0.16));
}
.tier.t-dragonlord { --tier-acc: #f9e2af; }

/* STORMFIRE (S3, from the FX lab): storm clouds along the card top,
   dragonfire sweeps, true pixel-art fork bolts striking from the cloud
   line with a whole-card flash + screen shake, falling ash-sparks.
   Everything animated lives in the reduced-motion block below; at rest
   only the static cloud layer + ground glow show. */
.dl-clouds { position: absolute; top: -20px; left: -10%; right: -10%; height: 110px;
  background:
    radial-gradient(ellipse 60% 100% at 25% 0%, rgba(30,22,38,0.85), transparent 70%),
    radial-gradient(ellipse 55% 90% at 70% 0%, rgba(38,26,30,0.8), transparent 70%),
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(20,16,28,0.9), transparent 75%); }
.dl-cloudglow { position: absolute; top: -10px; left: 0; right: 0; height: 80px; opacity: 0;
  background: radial-gradient(ellipse 45% 80% at 55% 0%, rgba(255,220,150,0.5), transparent 70%); }
.dl-sweep { position: absolute; inset: -40% -60%; transform: translateX(-45%);
  background: linear-gradient(115deg, transparent 42%, rgba(255,143,94,0.14) 48%, rgba(249,226,175,0.24) 50%, rgba(255,143,94,0.14) 52%, transparent 58%); }
.dl-bolt-main, .dl-bolt-small, .dl-bolt-arc { position: absolute; width: 4px; height: 4px; opacity: 0;
  filter: drop-shadow(0 0 5px rgba(255,246,216,0.95)) drop-shadow(0 0 16px rgba(250,179,135,0.6)); }
.dl-bolt-main  { left: 58%; top: 8px;  box-shadow: 0px 0px #fffbe9, 0px 4px #fffbe9, -4px 8px #f9e2af, -4px 12px #fffbe9, 0px 16px #fffbe9, 4px 20px #f9e2af, 4px 24px #fffbe9, 0px 28px #fffbe9, 0px 32px #f9e2af, -4px 36px #fffbe9, -4px 40px #fffbe9, -8px 44px #f9e2af, -8px 48px #fffbe9, -4px 52px #fffbe9, -4px 56px #f9e2af, -8px 60px #fffbe9, 8px 24px #fffbe9, 12px 28px #f9e2af, 16px 34px #fffbe9, 16px 40px #fffbe9, 20px 46px #f9e2af; }
.dl-bolt-small { left: 22%; top: 30px; box-shadow: 0px 0px #fffbe9, -4px 4px #fffbe9, -4px 8px #f9e2af, 0px 12px #fffbe9, 0px 16px #fffbe9, -4px 20px #f9e2af, -8px 24px #fffbe9, -8px 28px #fffbe9, -4px 32px #f9e2af; }
.dl-bolt-arc   { left: 30%; top: 14px; box-shadow: 0px 0px #fffbe9, 4px -2px #fffbe9, 8px 0px #f9e2af, 12px 2px #fffbe9, 16px 0px #fffbe9, 20px -2px #f9e2af, 24px -2px #fffbe9, 28px 0px #fffbe9, 32px 2px #f9e2af;
  filter: drop-shadow(0 0 4px rgba(255,246,216,0.9)); }
.dl-flash { position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(circle at 55% 12%, rgba(255,236,200,0.4), rgba(255,90,60,0.14) 45%, transparent 75%); }
.dl-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; opacity: .75;
  background: linear-gradient(0deg, rgba(255,143,94,0.18), rgba(255,143,94,0.05) 55%, transparent); }
.dl-ash { position: absolute; top: -8px; left: 0; width: 2px; height: 2px; opacity: .5;
  box-shadow: 40px 0 #fab387, 110px -30px #f9e2af, 180px -10px #ff8f5e, 250px -40px #fab387, 75px -60px #f9e2af, 215px -70px #ff8f5e, 145px -50px #ffd9a0,
              40px -430px #fab387, 110px -460px #f9e2af, 180px -440px #ff8f5e, 250px -470px #fab387, 75px -490px #f9e2af, 215px -500px #ff8f5e, 145px -480px #ffd9a0; }
@media (prefers-reduced-motion: no-preference) {
  .tier.t-squire  .tier-fx { animation: fxRise 16s linear infinite; }
  .tier.t-ranger  .tier-fx { animation: fxRise 12s linear infinite; }
  .tier.t-knight  .tier-fx { animation: fxRise 9s linear infinite; }
  .tier.t-paladin .tier-fx { animation: fxRise 7s linear infinite; }
  /* Dragonlord: FIRELIGHT, not a smooth breath, irregular multi-stop
     flicker like a torch, warm and centred low where the orb sits */
  .tier.t-dragonlord .tier-fx-clip::after {
    content: '';
    position: absolute; inset: -10%;
    background: radial-gradient(circle at 50% 30%, rgba(255,143,94,0.17), rgba(249,226,175,0.05) 40%, transparent 58%);
    animation: dlFlame 4.2s linear infinite;
  }
  @keyframes dlFlame {
    0%   { opacity: .55; }
    9%   { opacity: .9;  }
    17%  { opacity: .62; }
    28%  { opacity: 1;   }
    37%  { opacity: .7;  }
    46%  { opacity: .95; }
    58%  { opacity: .58; }
    66%  { opacity: .85; }
    78%  { opacity: .65; }
    87%  { opacity: 1;   }
    100% { opacity: .55; }
  }
  /* the mascot's glow pulses with the same firelight */
  .tier.t-dragonlord .tier-mascot img { animation: dlMascotGlow 4.2s linear infinite; }
  /* STORMFIRE clocks (S3): clouds drift, sweeps roll, double strikes
     with flash + shake, ash falls. Shake scoped to .visible so it never
     fights the scroll-reveal entrance transform. */
  .dl-clouds { animation: dlClouds 9s ease-in-out infinite alternate; }
  .dl-sweep  { animation: dlSweep 4.8s linear infinite; }
  .dl-ash    { animation: dlAsh 7s linear infinite; }
  /* The strike (cloud glow, bolts, flash and the shake) runs on one clock that starts when the card is
     revealed, so the shake lands with the lightning. It waits a second so the reveal finishes first. */
  .t-dragonlord.visible .dl-cloudglow  { animation: dlCloudGlow 5.2s linear 1s infinite; }
  .t-dragonlord.visible .dl-bolt-main  { animation: dlMain 5.2s linear 1s infinite; }
  .t-dragonlord.visible .dl-bolt-small { animation: dlSmall 5.2s linear 1s infinite; }
  .t-dragonlord.visible .dl-bolt-arc   { animation: dlArc 5.2s linear 1s infinite; }
  .t-dragonlord.visible .dl-flash  { animation: dlFlash 5.2s linear 1s infinite; }
  .tier.t-dragonlord.visible { animation: revealIn .5s ease var(--d, 0s) backwards, dlShake 5.2s linear 1s infinite; }
  @keyframes dlClouds { from { transform: translateX(-14px); } to { transform: translateX(14px); } }
  @keyframes dlSweep  { 0%, 42% { transform: translateX(-45%); } 75%, 100% { transform: translateX(45%); } }
  @keyframes dlCloudGlow { 0%, 36%, 44%, 68%, 76%, 100% { opacity: 0; } 38% { opacity: .9; } 41% { opacity: .3; } 70% { opacity: .7; } }
  @keyframes dlSmall { 0%, 38%, 41%, 100% { opacity: 0; } 39% { opacity: 1; } 40% { opacity: .25; } }
  @keyframes dlArc   { 0%, 70%, 73.5%, 100% { opacity: 0; } 71% { opacity: 1; } 72% { opacity: .2; } 73% { opacity: .8; } }
  @keyframes dlMain  { 0%, 42%, 42.4%, 54%, 54.4% { opacity: 0; } 42.6% { opacity: 1; } 43.6% { opacity: .2; } 44.4% { opacity: 1; } 46.5% { opacity: 0; } 54.6% { opacity: .9; } 55.8%, 100% { opacity: 0; } }
  @keyframes dlFlash { 0%, 42%, 42.4%, 54%, 54.4% { opacity: 0; } 42.8% { opacity: 1; } 44% { opacity: .35; } 44.6% { opacity: .9; } 49% { opacity: 0; } 54.8% { opacity: .7; } 57%, 100% { opacity: 0; } }
  @keyframes dlAsh   { to { transform: translateY(430px); } }
  @keyframes dlShake {
    0%, 42.4%, 46.5%, 54.4%, 56.5%, 100% { transform: none; }
    43%   { transform: translate(-2px, 2px); }
    43.6% { transform: translate(3px, -1px); }
    44.2% { transform: translate(-2px, 0); }
    45%   { transform: translate(2px, 1px); }
    45.8% { transform: translate(-1px, -1px); }
    55%   { transform: translate(-2px, 1px); }
    55.8% { transform: translate(2px, -1px); }
  }
  @keyframes dlMascotGlow {
    0%, 17%, 58%, 100% { filter: drop-shadow(0 0 10px rgba(255,143,94,0.3)) drop-shadow(0 0 26px rgba(249,226,175,0.12)); }
    28%, 46%, 87% { filter: drop-shadow(0 0 15px rgba(255,143,94,0.5)) drop-shadow(0 0 36px rgba(249,226,175,0.22)); }
  }
  @keyframes fxRise { to { transform: translateY(-560px); } }
  /* Paladin only: a slow ambient aura breathing behind the mascot */
  .tier.t-paladin .tier-fx-clip::after {
    content: '';
    position: absolute; inset: -10%;
    background: radial-gradient(circle at 50% 26%, rgba(137,180,250,0.12), transparent 58%);
    animation: palAura 4.5s ease-in-out infinite;
  }
  @keyframes palAura { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
}

/* Dragonlord's headline perk: new modes land here FIRST. Solid amber,
   letters riding a slow subtle wave (split into spans on load). */
.feat-ea {
  font-weight: bold;
  letter-spacing: 0.5px;
  color: #f9e2af;
  text-shadow: 0 0 12px rgba(249,226,175,0.3);
}
@media (prefers-reduced-motion: no-preference) {
  .feat-ea span {
    display: inline-block;
    animation: eaWave 2.6s ease-in-out infinite;
    animation-delay: calc(var(--ci) * 90ms);
  }
  @keyframes eaWave {
    0%, 100% { transform: none; }
    50% { transform: translateY(-1.5px); }
  }
}

/* Subscriber-mode highlight in the feature list */
.feat-hot {
  color: var(--green) !important;
  text-shadow: 0 0 10px rgba(166,227,161,0.55);
}
@media (prefers-reduced-motion: no-preference) {
  .feat-hot { animation: featGlow 2.2s ease-in-out infinite; }
  @keyframes featGlow {
    0%, 100% { text-shadow: 0 0 6px rgba(166,227,161,0.35); }
    50% { text-shadow: 0 0 14px rgba(166,227,161,0.75); }
  }
}
.pricing-section .hp-y { display: none; }
.pricing-section.is-yearly .hp-m { display: none; }
.pricing-section.is-yearly .hp-y { display: block; }
.pricing-section.is-yearly .hp-promo { display: none; }
/* API + MCP line on the pricing cards (Sept 2026): plan credits over the
   API at +50% Knight / +25% Paladin / 1:1 Dragonlord (credits.API_PLAN_RATE_Q) */
.tier-list li.api-li b { color: var(--blue); font-weight: 700; }
.tier-list li.api-off { color: #9399b2; }
.api-rate { color: #a6e3a1; font-weight: 700; }
.api-best { color: #f9e2af; text-shadow: 0 0 10px rgba(249,226,175,0.5); }
.api-save { display: block; width: fit-content; margin: 5px 0 1px; padding: 2px 6px; border: 1px solid #a6e3a1; color: #a6e3a1; font-size: 10px; letter-spacing: 0.3px; }
.api-save-dl { border-color: #f9e2af; color: #f9e2af; box-shadow: 0 0 10px rgba(249,226,175,0.25); }
.api-tip { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; margin-left: 6px; border: 1px solid #7f849c; color: #9399b2; font: 700 9px 'JetBrains Mono', monospace; cursor: help; vertical-align: 1px; }
.api-tip:hover, .api-tip:focus { color: var(--text); border-color: var(--text); outline: none; }
#apiTipBox { position: fixed; display: none; width: 250px; max-width: calc(100vw - 16px); padding: 10px 12px; background: #11121c; border: 2px solid var(--blue); color: var(--text); font: 400 11px/1.55 'JetBrains Mono', monospace; z-index: 10000; box-shadow: 4px 4px 0 rgba(0,0,0,0.5); pointer-events: none; }

/* Plan cards line up row by row (art, name, price, rule, list, button) whatever each one holds. */
@supports (grid-template-rows: subgrid) {
  .tier { display: grid; grid-template-rows: subgrid; grid-row: span 6; row-gap: 0; }
  /* Prices sit on one line across the row. The free card has no yearly link under it, so it keeps that line empty. */
  .tier-pr, .hp-m, .hp-y { align-self: end; }
  .tier-pr { padding-bottom: 23px; }
  .pricing-section.is-yearly .tier-pr { padding-bottom: 0; }
  .tier .tier-btn { align-self: end; }
}

/* ---------- sprite marquee ---------- */
.marquee-wrap { position: relative; z-index: 1; overflow: hidden; padding: 36px 0; border-top: 2px solid var(--border); border-bottom: 2px solid var(--border); }
.marquee-wrap::before, .marquee-wrap::after { content: ''; position: absolute; top: 0; bottom: 0; z-index: 5; width: 120px; pointer-events: none; }
.marquee-wrap::before { left: 0; background: linear-gradient(90deg, var(--void), transparent); }
.marquee-wrap::after { right: 0; background: linear-gradient(-90deg, var(--void), transparent); }
/* Each sprite carries its own gap, so the two halves are identical and the loop has no seam. */
.marquee-inner { display: flex; align-items: center; width: max-content; animation: marqueeScroll 36s linear infinite; }
.marquee-wrap:hover .marquee-inner { animation-play-state: paused; }
.marquee-inner img { flex: none; display: block; margin-right: 56px; opacity: .7; transition: opacity .2s; }
.marquee-inner img:hover { opacity: 1; }
@keyframes marqueeScroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-inner { animation: none; } }

/* ---------- FAQ ---------- */
.hp-faq { position: relative; z-index: 1; max-width: 920px; margin: 0 auto; padding: 96px 40px 48px; }
.hp-faq-list { background: var(--win); border: 2px solid var(--border-lit); box-shadow: 8px 8px 0 rgba(0,0,0,.6); }
.hp-faq-item + .hp-faq-item { border-top: 2px solid var(--border); }
.hp-faq-item summary { position: relative; padding: 18px 54px 18px 20px; list-style: none; cursor: pointer; font-size: 15px; font-weight: 500; line-height: 1.5; color: var(--bright); transition: background .12s; }
.hp-faq-item summary::-webkit-details-marker { display: none; }
.hp-faq-item summary:hover { background: var(--panel); }
.hp-faq-item summary:focus-visible { outline: 2px solid rgb(var(--mc)); outline-offset: -2px; }
.hp-faq-item summary::after { content: '+'; position: absolute; right: 20px; top: 50%; margin-top: -6px; font: 12px/1 var(--px); color: rgb(var(--mc)); }
.hp-faq-item[open] summary::after { content: '-'; }
.hp-faq-item p { max-width: 76ch; padding: 0 20px 20px; font-size: 14px; line-height: 1.75; color: var(--sub); }
.hp-faq-item p a { color: var(--blue); }
.hp-faq-links { margin-top: 34px; text-align: center; font-size: 13px; line-height: 2.2; color: var(--idim); }
.hp-faq-links a { margin: 0 8px; white-space: nowrap; text-decoration: none; color: var(--blue); }
.hp-faq-links a:hover { text-decoration: underline; }

/* ---------- free tools band ---------- */
.tools-band { position: relative; z-index: 1; background: var(--deep); border-top: 2px solid var(--border-lit); }
.tools-band a { color: inherit; text-decoration: none; }
.tools-band a:focus-visible { outline: 2px solid var(--green); outline-offset: 5px; }
.tools-band .tools-band-inner { padding-top: 48px; padding-bottom: 52px; }
.tools-band-top { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 26px; }
.tools-band-heading { font: 400 clamp(12px, 1.4vw, 16px)/1.8 var(--px); letter-spacing: .5px; color: var(--bright); }
.tools-band-copy { margin-top: 4px; font-size: 14px; line-height: 1.7; color: var(--sub); }
.tools-band .tools-band-browse { flex: none; padding-bottom: 3px; font-size: 13px; color: var(--green); border-bottom: 2px solid var(--border-lit); }
.tools-band .tools-band-browse:hover { border-color: var(--green); }
.tools-band-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; padding-top: 28px; border-top: 2px solid var(--border); }
.tools-band-col h3 { margin-bottom: 12px; font: 400 9px/1.8 var(--px); color: var(--green); }
.tools-band-col .footer-link { display: block; padding: 4px 0; font-size: 13px; line-height: 1.7; letter-spacing: 0; color: var(--sub); }
.tools-band-col .footer-link:hover { color: var(--bright); }

/* ---------- footer ---------- */
.footer { position: relative; z-index: 1; padding: 44px 24px 48px; text-align: center; border-top: 2px solid var(--border); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; margin-bottom: 22px; }
.footer-link { font-size: 12px; letter-spacing: 1px; text-decoration: none; color: var(--idim); transition: color .15s; }
.footer-link:hover { color: var(--pink); }
.footer-copy { font: 8px/2 var(--px); letter-spacing: 2px; color: var(--dim); }

/* ---------- smaller screens ---------- */
@media (max-width: 1200px) {
  .pricing-row { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 680px; gap: 30px 14px; }
}
@media (max-width: 1139px) {
  .bg-hero img { --k: 4; }
  .bg-strip { --tw: 152px; --th: 86px; }
  .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .steps-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mu-grid { grid-template-columns: minmax(0, 1fr); }
  .tools-band-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 935px) {
  .bg-hero img { --k: 3; }
  .bg-strip { --tw: 112px; --th: 63px; gap: 8px; }
  .bg-thumb figcaption { font-size: 9.5px; padding: 14px 2px 4px; }
  .rk-cols { flex-direction: column; }
  .rk-chairs { width: 100%; max-width: 501px; }
}
@media (max-width: 760px) {
  .section { padding: 64px 16px; }
  .section-head { margin-bottom: 30px; }
  .section-desc { font-size: 14px; line-height: 1.7; }
  .win { padding: 12px; box-shadow: 5px 5px 0 rgba(0,0,0,.6); }
  .win-head { margin-bottom: 12px; }
  .section-cta { padding: 15px 18px; }
  .steps-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .steps-row > .step-card.is-uikit { grid-column: auto; grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .step-stage { height: 128px; }
  .step-body { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 14px 16px 16px; }
  .step-card p { flex: none; width: 100%; order: 3; }
  .iso-cta { min-width: 0; width: 100%; }
  .iso-cap { left: 8px; top: 8px; bottom: auto; padding: 7px 9px; }
  .iso-cap .c { display: none; }
  .iso-dots { right: 8px; bottom: 10px; }
  .iso-dot { width: 18px; }
  .why-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .why-card { padding: 22px 18px 20px; }
  /* Meadow: two rows of three at 2x, so every sprite keeps its true size next to the others. */
  .mm-sky, .mm-ground { display: none; }
  .mm-line { position: static; display: block; }
  .mm-row { display: flex; align-items: flex-end; justify-content: space-evenly; padding: 22px 2px 46px;
    background: url('/static/showcase/micro-meadow-grass.png') repeat-x bottom, linear-gradient(180deg, #171728, #1d2030 70%, #232840); image-rendering: pixelated; }
  .mm-sp img { --k: 2; }
  .mm-cap { margin-bottom: 8px; font-size: 10px; }
  .mm-cap b { display: block; }
  .mu-stage { min-height: 0; padding: 26px 12px; }
  .hp-faq { padding: 64px 16px 36px; }
  .hp-faq-list { box-shadow: 5px 5px 0 rgba(0,0,0,.6); }
  .hp-faq-item summary { padding: 16px 46px 16px 14px; font-size: 14px; }
  .hp-faq-item summary::after { right: 14px; }
  .hp-faq-item p { padding: 0 14px 16px; font-size: 13.5px; }
  .hp-faq-links a { margin: 0 6px; }
  .pricing-section { padding: 64px 16px; }
  .pricing-row { grid-template-columns: minmax(0, 1fr); max-width: 420px; gap: 30px; }
  .tier-pr { padding-bottom: 0; }
  .credit-bar { gap: 10px 18px; padding: 14px 12px; }
  .tools-band-top { flex-direction: column; align-items: flex-start; gap: 14px; }
  .tools-band-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; }
  .marquee-wrap { padding: 26px 0; }
  .marquee-wrap::before, .marquee-wrap::after { width: 48px; }
  .marquee-inner img { margin-right: 40px; }
}
@media (max-width: 731px) {
  .bg-hero img { --k: 2; }
  .bg-strip { --tw: 128px; --th: 72px; justify-content: center; }
}
@media (max-width: 520px) {
  .mu-side img { width: 82px; height: 65px; }
  .mu-pair { gap: 18px; }
  .resize-row { gap: 18px; padding: 26px 8px 20px; }
  .ts-gen .ts-a2 { display: none; }
}
@media (max-width: 472px) {
  /* still 2x, cropped at the sides to the width of the screen */
  .bg-win { width: auto; }
  .bg-hero img { width: 100%; height: 224px; object-fit: cover; }
  .bg-strip { --tw: 144px; --th: 81px; }
}
@media (max-width: 374px) {
  .bg-strip { --tw: 128px; --th: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; }
  .reveal.visible { animation: none; }
}
