/* Ascensions Quest — marketing site.
   Palette is the Tower's: deep dark, gold for the climb, purple for the
   corruption. No web fonts, so the first paint costs one request. */

:root {
  --bg: #0e0b14;
  --bg-2: #141020;
  --panel: #191325;
  --panel-2: #1f1830;
  --line: #2c2340;
  --text: #ddd7e8;
  --head: #f3eefc;
  --muted: #a49bb8;
  --gold: #e8b64a;
  --gold-dim: #b98d2f;
  --rot: #8b5cf6;
  --wrap: 1120px;
  --radius: 14px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold); text-decoration-color: rgba(232, 182, 74, .35); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .1em .4em;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: -9999px;
  background: var(--gold); color: #1a1206; padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip:focus { left: 0; top: 0; }

/* ---------- headings ---------- */

h1, h2, h3, h4 {
  color: var(--head);
  font-family: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.18rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.muted { color: var(--muted); }
.small { font-size: .92rem; }
.lede { font-size: clamp(1.05rem, 2vw, 1.22rem); color: #c7c0d8; }

ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { margin-bottom: .4em; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 11, 20, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 66px; }

.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--head); text-decoration: none;
  font-family: ui-serif, Georgia, serif; font-size: 1.06rem; font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
}
.brand img { border-radius: 6px; }

.topbar nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.topbar nav a {
  color: var(--muted); text-decoration: none;
  padding: 7px 12px; border-radius: 8px; font-size: .95rem;
}
.topbar nav a:hover { color: var(--head); background: var(--panel); }
.topbar nav a[aria-current="page"] { color: var(--gold); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gold); color: #1a1206;
  font-weight: 650; font-size: 1rem;
  padding: 13px 24px; border-radius: 10px;
  border: 1px solid var(--gold);
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { background: #f0c463; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(232, 182, 74, .22); }
.btn-sm { padding: 8px 16px; font-size: .9rem; border-radius: 8px; }
.btn-ghost {
  background: transparent; color: var(--head);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--panel); border-color: #3d3157; box-shadow: none; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 84px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 78% -8%, rgba(139, 92, 246, .16), transparent 62%),
    radial-gradient(760px 380px at 12% 0%, rgba(232, 182, 74, .10), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}
/* faint floor lines, so the hero reads as a tower without needing art */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 78px, rgba(255,255,255,.022) 78px 79px);
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.hero > .wrap { position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(2.3rem, 6.2vw, 4.1rem);
  letter-spacing: .005em;
  margin-bottom: .35em;
  text-wrap: balance;
}
.hero h1 .rule { display: block; color: var(--gold); }
.hero .lede { max-width: 60ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- server address card ---------- */

.address {
  margin-top: 36px;
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 18px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  max-width: 100%;
}
.address-label { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.address-ip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--gold);
  margin: 0;
  word-break: break-all;
}
.address .btn { flex-shrink: 0; }

.status { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.status .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--muted); flex-shrink: 0;
}
.status[data-state="online"] .dot { background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .16); }
.status[data-state="offline"] .dot { background: #f87171; box-shadow: 0 0 0 4px rgba(248, 113, 113, .16); }

/* ---------- stats band ---------- */

.stats-band {
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  padding: 34px 0;
}
.stats {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 20px 16px;
  /* Sized so all six fit on one row at full width; below that they fall to
     three-up and then two-up rather than leaving one stat stranded alone. */
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  text-align: center;
}
.stats li { display: flex; flex-direction: column; gap: 4px; }
.stats strong {
  font-family: ui-serif, Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--gold);
  line-height: 1;
}
.stats span { font-size: .84rem; color: var(--muted); }

/* ---------- sections ---------- */

.section { padding: clamp(56px, 8vw, 92px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-alt { background: var(--bg-2); }

.section-head { max-width: 68ch; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.prose { max-width: 70ch; }
.prose h2 { margin-top: 2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.9em; color: var(--gold); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--gold-dim); }

/* ---------- cards ---------- */

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.card h3 { margin-bottom: .5em; color: var(--head); }
.card p:last-child { margin-bottom: 0; }
.card .muted { font-size: .95rem; }

.card-link { text-decoration: none; color: inherit; display: block; transition: border-color .15s ease, transform .15s ease; }
.card-link:hover { border-color: var(--gold-dim); transform: translateY(-2px); }

.tag {
  display: inline-block;
  font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 650;
  color: var(--gold); background: rgba(232, 182, 74, .1);
  border: 1px solid rgba(232, 182, 74, .28);
  border-radius: 999px; padding: 3px 10px;
  margin-bottom: 14px;
}
.tag-rot { color: #c4a5fb; background: rgba(139, 92, 246, .12); border-color: rgba(139, 92, 246, .3); }
.tag-soon { color: var(--muted); background: transparent; border-color: var(--line); }

/* ---------- floor list ---------- */

.floors { display: grid; gap: 14px; }
.floor {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 22px;
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-dim);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 24px;
}
.floor.pending { border-left-color: var(--line); }
.floor-num {
  font-family: ui-serif, Georgia, serif;
  font-size: 2rem; line-height: 1; color: var(--gold);
  padding-top: 2px;
}
.floor.pending .floor-num { color: var(--muted); }
.floor h3 { margin-bottom: .3em; }
.floor p { margin-bottom: 0; color: var(--muted); }

/* A hero with no call to action underneath does not need the full drop. */
.hero-short { padding-bottom: 12px; }

/* Hero with a background screenshot. --hero-image is set inline per page. */
.hero-image {
  background:
    linear-gradient(180deg, rgba(14, 11, 20, .90) 0%, rgba(14, 11, 20, .78) 45%, rgba(14, 11, 20, .94) 100%),
    var(--hero-image, none) center 30% / cover no-repeat,
    radial-gradient(900px 420px at 78% -8%, rgba(139, 92, 246, .16), transparent 62%),
    radial-gradient(760px 380px at 12% 0%, rgba(232, 182, 74, .10), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}
.hero-image::after { opacity: .35; }

/* Early-access invitation, distinct from the purple "broken things" notice. */
.notice-invite {
  background: linear-gradient(180deg, rgba(232, 182, 74, .10), rgba(232, 182, 74, .04));
  border: 1px solid rgba(232, 182, 74, .28);
}
.notice-invite h3 { color: var(--gold); }

/* Floor rows with a thumbnail column. data-floor-img is set inline until per-floor
   shots land; then swap each placeholder for the real file. */
.floor-thumb {
  grid-template-columns: 120px 74px 1fr;
}
.floor-thumb::before {
  content: "";
  grid-row: 1 / span 2;
  align-self: stretch;
  border-radius: 8px;
  background: var(--panel-2) center / cover no-repeat;
  background-image: var(--floor-img, none);
  border: 1px solid var(--line);
  image-rendering: pixelated;
  min-height: 72px;
}
.floor-thumb[data-floor-img]::before {
  background-image: var(--floor-img);
}

/* Video embed slot on the homepage or features page. Leave data-video empty
   until a trailer is ready; site.js fills the iframe when the attribute is set. */
.video-slot {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 32px 0 0;
}
.video-slot iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Scroll reveal. Content is visible by default; site.js adds .is-hidden only
   to blocks below the fold, so nothing depends on JavaScript to appear. */
.reveal {
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.is-hidden {
  opacity: 0;
  transform: translateY(18px);
}

/* Wiki index cards: shorter image crop than the homepage feature cards. */
.card-shot-sm img {
  aspect-ratio: 16 / 9;
}
.card-link-plain { background: var(--panel); }
.card-body-fill { min-height: 140px; }

/* Card hover polish beyond card-link's existing transform. */
.card:hover,
.card-shot:hover {
  border-color: rgba(232, 182, 74, .35);
}
.card-shot img {
  transition: transform .25s ease;
}
.card-shot:hover img {
  transform: scale(1.02);
}

/* ---------- screenshots ----------
   Minecraft art is pixel art. Letting the browser smooth it on resize turns
   crisp tooltips into mush, so scaling stays nearest-neighbour. */

figure.shot { margin: 0 0 8px; }
figure.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  image-rendering: pixelated;
}
figure.shot figcaption {
  margin-top: 12px;
  font-size: .86rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Text one side, screenshot the other, alternating down the page. */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 88px;
}
.split:last-child { margin-bottom: 0; }
.split.flip > figure { order: -1; }
.split h2 { margin-top: 0; }
.split p { max-width: 52ch; }

.split-narrow { grid-template-columns: 1.15fr .85fr; }

/* A screenshot given the full column width, for the wide landscape shots. */
.showcase { margin: 0 0 72px; }
.showcase figcaption { max-width: 70ch; }

@media (max-width: 860px) {
  .split, .split-narrow { grid-template-columns: 1fr; gap: 28px; margin-bottom: 56px; }
  .split.flip > figure { order: 0; }
}

/* Discord's own blurple, so the button is recognisable at a glance rather than
   reading as just another ghost button. */
.btn-discord {
  background: #5865f2;
  border-color: #5865f2;
  color: #fff;
}
.btn-discord:hover { background: #4752c4; border-color: #4752c4; color: #fff; }

.cta-sub {
  margin: 28px auto 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: .96rem;
}

/* A card that leads with a screenshot. The image sits flush to the card edges,
   so the card's own padding has to move onto the body instead. */
.card-shot { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center top;
  border-bottom: 1px solid var(--line);
  image-rendering: pixelated;
  background: #0b0810;
}
.card-shot .card-body { padding: 22px 24px 26px; }
.card-shot h3 { margin: 0 0 8px; }
.card-shot p { margin: 0; }

/* ---------- reference tables ----------
   The wiki is mostly tables, and on a phone they must scroll sideways rather
   than crushing a five-column stat block into unreadable slivers. */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0 0 28px;
  -webkit-overflow-scrolling: touch;
}
table.ref {
  width: 100%;
  border-collapse: collapse;
  font-size: .94rem;
  min-width: 520px;
}
table.ref caption {
  text-align: left;
  padding: 16px 20px 12px;
  color: var(--head);
  font-family: ui-serif, Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
table.ref th, table.ref td { padding: 11px 16px; text-align: left; vertical-align: top; }
table.ref thead th {
  background: var(--panel-2);
  color: var(--muted);
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 650;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
table.ref tbody tr + tr { border-top: 1px solid rgba(44, 35, 64, .7); }
table.ref tbody tr:hover { background: rgba(255,255,255,.02); }
table.ref td:first-child { color: var(--head); font-weight: 600; white-space: nowrap; }
table.ref .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
table.ref .desc { color: var(--muted); min-width: 240px; }

.ok { color: #6ee7a0; }
.no { color: #f79a9a; }

/* ---------- wiki chrome ---------- */

.subnav {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 0 0 8px;
  margin-bottom: 8px;
}
.subnav a {
  font-size: .88rem; text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px;
  background: var(--panel);
}
.subnav a:hover { color: var(--head); border-color: #3d3157; }
.subnav a[aria-current="page"] { color: var(--gold); border-color: rgba(232,182,74,.4); background: rgba(232,182,74,.08); }

.crumbs { font-size: .85rem; color: var(--muted); margin: 0 0 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--gold); }
.crumbs span { margin: 0 8px; opacity: .5; }

.toc {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-dim);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin-bottom: 40px;
}
.toc p { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.toc ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.toc li { margin-bottom: 6px; break-inside: avoid; }
.toc a { font-size: .94rem; }

.callout {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--rot);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 0 0 26px;
  font-size: .94rem;
  color: var(--muted);
}
.callout strong { color: var(--head); }

.wide { max-width: 100%; }
.wide h2 { margin-top: 2.4em; }
.wide h2:first-child { margin-top: 0; }
.wide h3 { margin-top: 1.8em; color: var(--gold); }
.wide > p, .wide > ul { max-width: 74ch; }
.wide ul { padding-left: 1.2em; }
.wide li { margin-bottom: .5em; }
.wide li::marker { color: var(--gold-dim); }

@media (max-width: 700px) {
  .toc ul { columns: 1; }
}

/* ---------- notice ---------- */

.notice {
  background: linear-gradient(180deg, rgba(139, 92, 246, .1), rgba(139, 92, 246, .04));
  border: 1px solid rgba(139, 92, 246, .28);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.notice h3 { color: #c9b0fd; margin-bottom: .5em; }
.notice p:last-child { margin-bottom: 0; }

/* ---------- steps ---------- */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 40px 1fr; gap: 18px; align-items: start;
}
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--gold); font-weight: 700; font-size: .95rem;
}
.steps h3 { margin-bottom: .25em; font-size: 1.05rem; }
.steps p { margin-bottom: 0; color: var(--muted); }

/* ---------- faq ---------- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 18px 34px 18px 0; position: relative;
  color: var(--head); font-weight: 600;
  font-family: ui-serif, Georgia, serif; font-size: 1.06rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  color: var(--gold); font-size: 1.4rem; font-family: ui-sans-serif, system-ui, sans-serif;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > p { padding: 0 34px 20px 0; color: var(--muted); max-width: 78ch; }

/* ---------- cta ---------- */

.cta {
  text-align: center;
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(232, 182, 74, .1), transparent 65%),
    var(--bg-2);
}
.cta .lede { margin-left: auto; margin-right: auto; max-width: 56ch; }
.cta .address { margin-left: auto; margin-right: auto; text-align: left; }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 52px 0 44px; }
.footer-inner { display: grid; gap: 32px; grid-template-columns: 2fr 1fr 1fr; }
.footer-brand { font-family: ui-serif, Georgia, serif; color: var(--head); font-size: 1.1rem; margin: 0 0 .4em; }
.footer-head { color: var(--head); font-size: .8rem; letter-spacing: .13em; text-transform: uppercase; margin: 0 0 .9em; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--gold); }

@media (max-width: 760px) {
  .topbar-inner { height: auto; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; gap: 12px; }
  .topbar nav { width: 100%; margin-left: 0; order: 3; }
  .footer-inner { grid-template-columns: 1fr; }
  .floor { grid-template-columns: 52px 1fr; gap: 16px; padding: 18px; }
  .floor-thumb { grid-template-columns: 52px 1fr; }
  .floor-thumb::before { display: none; }
  .floor-num { font-size: 1.6rem; }
  .address { display: block; }
  .address .btn { margin-top: 14px; }
  .status { margin-top: 12px; }
}

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

/* ── /b/ shared builds ─────────────────────────────────────────────────────
   Rendered by build-viewer.js from a snapshot JSON. Colours inside item
   names and lore come from the game's own colour codes, so only the frame
   is styled here. */
.build-h2 { font-size: 1.35rem; margin: 0 0 16px; }

/* summary band */
.build-head { margin-bottom: 40px; }
.build-head-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.build-head h1 { margin-bottom: 6px; }
.build-head-class { margin: 0 0 10px; }
.build-exp { height: 6px; width: min(360px, 100%); background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.build-exp-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold)); }
.build-actions { display: flex; gap: 10px; align-items: center; padding-top: 8px; }
.build-primaries { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.build-primary {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px; text-align: center;
  display: flex; flex-direction: column; gap: 2px;
}
.build-primary-value { font-size: 1.45rem; font-weight: 700; color: var(--head); font-variant-numeric: tabular-nums; }
.build-primary-label { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.build-figures { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 18px; padding: 14px 18px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; }
.build-figure { display: flex; flex-direction: column; min-width: 90px; }
.build-figure-value { font-size: 1.15rem; font-weight: 600; color: var(--head); font-variant-numeric: tabular-nums; }
.build-figure-label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.build-figure.is-hp .build-figure-value { color: #ff7b7b; }
.build-figure.is-mana .build-figure-value { color: #8fa3ff; }
.build-figure.is-armor .build-figure-value { color: #c8cede; }
.build-figure.is-crit .build-figure-value { color: var(--gold); }
.build-head-meta { margin: 14px 0 0; }
.build-notice:empty { display: none; }

/* gear, in the shape of the menu */
.build-gear-layout { display: grid; gap: 20px; grid-template-columns: minmax(220px, 1fr) minmax(0, 2.2fr); align-items: start; }
.build-gear-left, .build-gear-right { display: grid; gap: 20px; }
.build-group { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.build-group h3 {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-size: .82rem; margin: 0 0 12px; color: var(--gold); letter-spacing: .1em; text-transform: uppercase;
}
.build-group-note { font-size: .72rem; letter-spacing: .04em; text-transform: none; color: var(--muted); }
.build-slots { display: grid; gap: 10px; }
.build-slots.is-column { grid-template-columns: 1fr; }
.build-slots.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.build-slots.is-row { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.build-slot {
  position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 11px; min-height: 66px; display: flex; flex-direction: column; gap: 3px; outline: none; cursor: default;
}
.build-slot:hover, .build-slot:focus, .build-slot.is-open { border-color: var(--gold-dim); }
.build-slot.is-empty, .build-slot.is-locked { border-style: dashed; }
.build-slot-label { font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.build-slot-empty { color: var(--muted); font-size: .86rem; }
.build-slot.is-locked .build-slot-empty { color: #6b6280; }
.build-item-name { font-weight: 600; line-height: 1.3; color: var(--head); font-size: .95rem; }
.build-item-skill { line-height: 1.3; font-size: .8rem; }
.build-slot[data-tier="uncommon"] { box-shadow: inset 3px 0 0 #55FF55; }
.build-slot[data-tier="rare"] { box-shadow: inset 3px 0 0 #FFFF55; }
.build-slot[data-tier="epic"] { box-shadow: inset 3px 0 0 #AA00AA; }
.build-slot[data-tier="mythic"] { box-shadow: inset 3px 0 0 #FF55FF; }
.build-slot[data-tier="legendary"] { box-shadow: inset 3px 0 0 #FF5555; }
.build-tip {
  display: none; position: absolute; z-index: 5; left: 0; top: calc(100% + 6px); min-width: 250px; max-width: 340px;
  background: #100817; border: 2px solid #2b1a4d; border-radius: 6px; padding: 10px 12px;
  font-size: .84rem; line-height: 1.45; box-shadow: 0 12px 28px rgba(0,0,0,.55); white-space: pre-wrap; text-align: left;
}
.build-tip.is-left { left: auto; right: 0; }
.build-tip.is-up { top: auto; bottom: calc(100% + 6px); }
.build-slot:hover .build-tip, .build-slot:focus .build-tip, .build-slot.is-open .build-tip { display: block; }
.build-tip-name { font-weight: 700; margin-bottom: 4px; }
.build-tip-line { color: #AAAAAA; }
.build-tip-line:empty { height: .6em; }

/* stats */
.build-stats { margin-top: 44px; }
.build-stats-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.build-zero-toggle { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.build-zero-toggle input { accent-color: var(--gold); }
.build-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.build-tab {
  background: var(--panel); color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 16px; font: inherit; font-size: .92rem; cursor: pointer;
}
.build-tab:hover { color: var(--head); border-color: #3d3157; }
.build-tab.is-active { color: var(--gold); border-color: rgba(232,182,74,.4); background: rgba(232,182,74,.08); }
.build-pane { display: none; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.build-pane.is-active { display: grid; }
.build-col { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 18px 12px; }
.build-sub { padding: 12px 0 6px; border-top: 1px solid rgba(44, 35, 64, .7); }
.build-sub:first-child { border-top: 0; }
.build-sub-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 6px;
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
}
.build-sub-caps { font-size: .66rem; color: var(--muted); letter-spacing: .06em; text-transform: none; }
.build-stat { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 5px 0; }
.build-stat + .build-stat { border-top: 1px solid rgba(44, 35, 64, .45); }
.build-stat-label { color: var(--text); }
.build-stat-values { display: flex; gap: 8px; color: var(--head); font-variant-numeric: tabular-nums; white-space: nowrap; }
.build-stat-value.is-secondary { color: var(--muted); font-size: .9em; }
.build-stat.is-zero .build-stat-label, .build-stat.is-zero .build-stat-values { color: #6b6280; }
.build-breakdown { flex-basis: 100%; font-size: .76rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.build-breakdown-cap { color: #6b6280; }
.build-breakdown-sep { color: #4b4260; }
.build-tag { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px; font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-dim); border: 1px solid rgba(185,141,47,.4); vertical-align: middle; }
.build-stats.hide-zero .build-stat.is-zero, .build-stats.hide-zero .build-sub.is-zero { display: none; }
.build-raw { margin-top: 20px; }
.build-raw summary { cursor: pointer; color: var(--muted); }
.build-table { margin-top: 12px; width: 100%; }

/* skills and points */
.build-skills, .build-extra { margin-top: 44px; }
.build-skills-layout { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.build-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.build-chip {
  display: inline-flex; align-items: center; gap: 8px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 6px 5px 12px; font-size: .88rem; color: var(--head);
}
.build-chip-type { color: var(--muted); font-size: .72rem; letter-spacing: .04em; }
.build-chip-level {
  min-width: 26px; text-align: center; padding: 2px 7px; border-radius: 999px; font-size: .78rem; font-weight: 700;
  background: rgba(232,182,74,.12); color: var(--gold); border: 1px solid rgba(232,182,74,.3); font-variant-numeric: tabular-nums;
}
.build-points { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 18px; }
.build-point { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid rgba(44, 35, 64, .45); font-size: .92rem; }
.build-point.is-primary .build-point-label { color: var(--head); font-weight: 600; }
.build-point-label { color: var(--text); }
.build-point-value { color: var(--gold); font-variant-numeric: tabular-nums; }
.build-unspent { margin: 12px 0 0; }
.build-json { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: .9rem; }
.build-json dt { color: var(--muted); }
.build-json dd { margin: 0; }
.build-foot { margin-top: 32px; }

@media (max-width: 900px) {
  .build-gear-layout { grid-template-columns: 1fr; }
  .build-primaries { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .build-slots.is-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .build-tip { min-width: 220px; max-width: calc(100vw - 48px); }
}
