/* MU TMT — theme.
   Palette taken from the hero art: night-navy shadows, gold light, ember sky.
   Bootstrap gives the grid and form behavior; this file gives the look. */

:root {
  --abyss: #0a0f1a;      /* page background */
  --vault: #121a2b;      /* panels */
  --vault-raised: #18223a;
  --rule: #2a3550;       /* quiet borders */
  --gilt: #d9a441;       /* gold accent */
  --gilt-bright: #f2c86e;
  --ember: #b8321f;      /* primary action, live state */
  --ember-bright: #d8462f;
  --vellum: #ede3cc;     /* main text */
  --ash: #9aa3b5;        /* secondary text */
  --online: #5fc98a;

  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Alegreya Sans", "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.6rem;
  --step-3: 2.1rem;
  --step-4: clamp(2.4rem, 5.2vw, 4.2rem);

  --radius: 3px;
  --bs-body-bg: var(--abyss);
  --bs-body-color: var(--vellum);
  --bs-border-color: var(--rule);
  --bs-link-color-rgb: 242, 200, 110;
  --bs-link-hover-color-rgb: 255, 224, 160;
}

html { font-size: 100%; }

body {
  background: var(--abyss);
  color: var(--vellum);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

h1, h2, h3, .display {
  overflow-wrap: break-word;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--vellum);
  letter-spacing: 0.02em;
  line-height: 1.15;
}

h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }

p { max-width: 68ch; }

a { color: var(--gilt-bright); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #ffe0a0; }

:focus-visible {
  outline: 2px solid var(--gilt-bright);
  outline-offset: 3px;
}

.muted { color: var(--ash); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 15, 26, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}

.site-header .inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--vellum);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  white-space: nowrap;
}

.brand img {
  width: 40px;
  height: 40px;
  mix-blend-mode: screen; /* the emblem art has a pure black background */
}

.brand:hover { color: var(--gilt-bright); }

.main-nav { display: flex; flex: 1 1 auto; gap: 0.25rem; flex-wrap: wrap; }

.main-nav a {
  color: var(--ash);
  text-decoration: none;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
}

.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--vellum); background: var(--vault); }

.header-tools { margin-left: auto; display: flex; align-items: center; gap: 1rem; }

.server-clock { color: var(--ash); font-size: var(--step--1); line-height: 1.2; text-align: right; }
.server-clock strong { color: var(--vellum); font-weight: 500; }

.language-switch { display: flex; align-items: center; gap: 0.35rem; color: var(--ash); font-size: var(--step--1); white-space: nowrap; }
.language-switch a { color: var(--ash); padding: 0.25rem 0.15rem; text-decoration: none; }
.language-switch a:hover, .language-switch a[aria-current] { color: var(--vellum); }
.language-switch a[aria-current] { font-weight: 700; }

/* ---------- Buttons ---------- */

.btn-ember, .btn-gilt, .btn-ghost {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--step-0);
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-ember { background: var(--ember); color: #fff6e8; }
.btn-ember:hover { background: var(--ember-bright); color: #fff; }

.btn-gilt { background: var(--gilt); color: #1c1306; }
.btn-gilt:hover { background: var(--gilt-bright); color: #1c1306; }

.btn-ghost { border-color: var(--rule); color: var(--vellum); background: transparent; }
.btn-ghost:hover { border-color: var(--gilt); color: var(--gilt-bright); }

.btn-sm-tight { padding: 0.35rem 0.8rem; font-size: var(--step--1); white-space: nowrap; }

/* Bootstrap buttons used by older pages keep the theme. */
.btn-primary { --bs-btn-bg: var(--ember); --bs-btn-border-color: var(--ember); --bs-btn-hover-bg: var(--ember-bright); --bs-btn-hover-border-color: var(--ember-bright); --bs-btn-active-bg: var(--ember); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: min(78vh, 720px);
  display: flex;
  align-items: flex-end;
  background: var(--abyss) url("/img/hero.jpg") center 30% / cover no-repeat;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 15, 26, 0.92) 0%, rgba(10, 15, 26, 0.55) 45%, rgba(10, 15, 26, 0) 75%),
    linear-gradient(0deg, var(--abyss) 0%, rgba(10, 15, 26, 0) 40%);
}

.hero .inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: end;
  padding-bottom: 3rem;
  width: 100%;
}

.hero h1 {
  font-size: var(--step-4);
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}

.hero .lede { font-size: var(--step-1); color: var(--vellum); max-width: 36ch; }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin: 1.5rem 0;
}

.hero-facts div { display: flex; flex-direction: column; }
.hero-facts dt { color: var(--ash); font-weight: 400; font-size: var(--step--1); }
.hero-facts dd { font-family: var(--font-display); font-size: var(--step-2); margin: 0; color: var(--gilt-bright); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* The memorable element: a gilded plaque that counts down to the next real event. */
.event-plaque {
  justify-self: end;
  width: min(100%, 360px);
  padding: 1.25rem 1.5rem 1.4rem;
  background: linear-gradient(180deg, rgba(24, 34, 58, 0.94), rgba(14, 20, 34, 0.96));
  border: 1px solid var(--gilt);
  outline: 1px solid rgba(217, 164, 65, 0.35);
  outline-offset: 4px;
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.event-plaque .label { color: var(--ash); font-size: var(--step--1); margin: 0; }
.event-plaque .name { font-family: var(--font-display); font-size: var(--step-2); margin: 0.15rem 0 0.6rem; color: var(--vellum); }

.countdown {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 2.9rem);
  font-variant-numeric: tabular-nums;
  color: var(--gilt-bright);
  letter-spacing: 0.04em;
  line-height: 1;
}

.countdown.live { color: var(--ember-bright); }

.event-plaque .when { color: var(--ash); font-size: var(--step--1); margin: 0.6rem 0 0; }

/* ---------- Status bar ---------- */

.status-bar { background: var(--vault); border-block: 1px solid var(--rule); }

.status-bar .inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.5rem;
  padding-block: 0.85rem;
  align-items: center;
}

.status-bar .item { color: var(--ash); }
.status-bar .item strong { color: var(--vellum); font-weight: 700; }

.dot { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; margin-right: 0.45rem; vertical-align: 0.1em; }
.dot.on { background: var(--online); box-shadow: 0 0 0 3px rgba(95, 201, 138, 0.18); }
.dot.off { background: #6b7385; }

/* ---------- Sections ---------- */

.section { padding-block: 3.5rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2.5rem; }

/* News */
.news-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  background: var(--vault);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.news-featured img { width: 100%; height: 100%; object-fit: cover; min-height: 240px; }
.news-featured .body { padding: 1.5rem 1.75rem; display: flex; flex-direction: column; }
.news-featured h3 { font-size: var(--step-2); margin: 0.4rem 0 0.75rem; }

.news-list { display: grid; gap: 1rem; }

.news-row {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.news-row:last-child { border-bottom: 0; }
.news-row img { width: 148px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); }
.news-row h3 { font-size: var(--step-1); margin: 0.25rem 0 0.35rem; }
.news-row h3 a, .news-featured h3 a { color: var(--vellum); text-decoration: none; }
.news-row h3 a:hover, .news-featured h3 a:hover { color: var(--gilt-bright); }
.news-row p { margin: 0; color: var(--ash); }

.news-meta { display: flex; gap: 0.75rem; align-items: center; font-size: var(--step--1); color: var(--ash); }

.tag { display: inline-block; padding: 0.05rem 0.5rem; border-radius: var(--radius); font-size: var(--step--1); font-weight: 700; border: 1px solid currentColor; }
.tag-update { color: var(--gilt-bright); }
.tag-event { color: #ff8a6b; }
.tag-maintenance { color: #8fb3e0; }

/* Side panels */
.panel { background: var(--vault); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.25rem 1.35rem; margin-bottom: 1.5rem; }
.panel h2 { font-size: var(--step-1); margin: 0 0 0.9rem; }

.schedule { list-style: none; padding: 0; margin: 0; }
.schedule li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--rule); }
.schedule li:last-child { border-bottom: 0; }
.schedule .ev { color: var(--vellum); }
.schedule .in { color: var(--gilt-bright); font-variant-numeric: tabular-nums; white-space: nowrap; }
.schedule .in.live { color: var(--ember-bright); font-weight: 700; }

.top-list { list-style: none; padding: 0; margin: 0; counter-reset: rank; }
.top-list li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; gap: 0.6rem; padding: 0.45rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.top-list li:last-child { border-bottom: 0; }
.top-list .pos { color: var(--ash); font-variant-numeric: tabular-nums; }
.top-list li:nth-child(1) .pos { color: var(--gilt-bright); font-weight: 700; }
.top-list .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-list .who small { display: block; color: var(--ash); }
.top-list .score { color: var(--vellum); font-variant-numeric: tabular-nums; }

/* Classes band */
.classes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }

.class-card { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--rule); background: var(--vault); }
.class-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.class-card .cap { position: absolute; inset: auto 0 0 0; padding: 2.5rem 0.9rem 0.8rem; background: linear-gradient(0deg, rgba(10, 15, 26, 0.95), rgba(10, 15, 26, 0)); }
.class-card h3 { font-size: var(--step-0); margin: 0; }
.class-card p { margin: 0.15rem 0 0; color: var(--ash); font-size: var(--step--1); }

/* Call to action band */
.cta-band { background: linear-gradient(90deg, rgba(184, 50, 31, 0.18), rgba(217, 164, 65, 0.1)), var(--vault); border-block: 1px solid var(--rule); }
.cta-band .inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 2.5rem; }
.cta-band h2 { margin: 0 0 0.35rem; }
.cta-band p { margin: 0; color: var(--ash); }

/* ---------- Page header for inner pages ---------- */

.page-head { padding: 2.75rem 0 1.5rem; border-bottom: 1px solid var(--rule); margin-bottom: 2rem; background: linear-gradient(180deg, var(--vault), var(--abyss)); }
.page-head h1 { margin: 0 0 0.4rem; }
.page-head p { margin: 0; color: var(--ash); }

/* Article */
.article { max-width: 46rem; }
.article img.cover { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; border-radius: var(--radius); margin-bottom: 1.5rem; }
.article p { font-size: 1.125rem; line-height: 1.65; }

/* Tabs (rankings, news filter) */
.tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1.25rem; }
.tabs a { padding: 0.4rem 0.9rem; border: 1px solid var(--rule); border-radius: var(--radius); color: var(--ash); text-decoration: none; }
.tabs a:hover { color: var(--vellum); border-color: var(--gilt); }
.tabs a[aria-current="page"] { color: #1c1306; background: var(--gilt); border-color: var(--gilt); font-weight: 700; }

/* Tables */
.table-mu { width: 100%; border-collapse: collapse; }
.table-mu th { color: var(--ash); font-weight: 500; text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--gilt); font-size: var(--step--1); }
.table-mu td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--rule); }
.table-mu tbody tr:hover { background: var(--vault); }
.table-mu .r { text-align: right; font-variant-numeric: tabular-nums; }
.table-mu tr.podium-1 td:first-child { color: var(--gilt-bright); font-weight: 700; }
.table-scroll { overflow-x: auto; }

/* Arena tiers (rankings, wiki). One jewel colour per tier, lowest first. The diamond is the jewel mark. */
.tier { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.05rem 0.55rem; border: 1px solid currentColor; border-radius: var(--radius); font-size: var(--step--1); font-weight: 700; white-space: nowrap; background: color-mix(in srgb, currentColor 12%, transparent); }
.tier::before { content: ""; width: 0.5rem; height: 0.5rem; background: currentColor; transform: rotate(45deg); flex: none; }
.tier-0 { color: #b3a58a; } /* Zen */
.tier-1 { color: #9fb0c4; } /* Chaos */
.tier-2 { color: #8cc4f0; } /* Bless */
.tier-3 { color: #e8cf62; } /* Soul */
.tier-4 { color: #6fd49a; } /* Life */
.tier-5 { color: #ff9f66; } /* Creation */
.tier-6 { color: #c59cff; } /* Guardian */
.tier-7 { color: #1c1306; background: linear-gradient(90deg, var(--gilt-bright), #ff9ccf); border-color: var(--gilt-bright); } /* Harmony */

/* Store */
.store-hero { border-radius: var(--radius); overflow: hidden; position: relative; margin-bottom: 2rem; border: 1px solid var(--rule); }
.store-hero img { width: 100%; height: 260px; object-fit: cover; display: block; }
.store-hero .cap { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 2rem; background: linear-gradient(90deg, rgba(10, 15, 26, 0.92), rgba(10, 15, 26, 0.2)); }
.store-hero h1 { margin: 0 0 0.5rem; }

.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.pack { background: var(--vault); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.5rem 1.25rem; display: flex; flex-direction: column; gap: 0.35rem; text-align: center; }
.pack.best { border-color: var(--gilt); }
.pack .amount { font-family: var(--font-display); font-size: var(--step-3); color: var(--gilt-bright); line-height: 1; }
.pack .bonus { color: var(--online); font-weight: 700; min-height: 1.5em; }
.pack .price { font-size: var(--step-1); margin: 0.5rem 0 1rem; }
.pack form { margin-top: auto; }
.pack button { width: 100%; }

.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.rules h3 { font-size: var(--step-0); margin-bottom: 0.3rem; }
.rules p { color: var(--ash); margin: 0; }

/* Forms (login, register) */
.auth { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); gap: 0; max-width: 920px; margin-inline: auto; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.auth-art img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 420px; }
.auth .form-card { border: 0; border-radius: 0; padding: 2.25rem; }
@media (max-width: 720px) { .auth { grid-template-columns: minmax(0, 1fr); } .auth-art { display: none; } }
.form-card { background: var(--vault); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.75rem; }
.form-control, .form-select {
  background-color: var(--abyss);
  border-color: var(--rule);
  color: var(--vellum);
}
.form-control:focus, .form-select:focus { background-color: var(--abyss); color: var(--vellum); border-color: var(--gilt); box-shadow: 0 0 0 0.2rem rgba(217, 164, 65, 0.2); }
.form-label { color: var(--ash); }
.text-danger { color: #ff8a77 !important; }
.alert-success { background: rgba(95, 201, 138, 0.12); color: #bdeccf; border-color: rgba(95, 201, 138, 0.35); }
.alert-danger { background: rgba(216, 70, 47, 0.12); color: #ffc2b6; border-color: rgba(216, 70, 47, 0.35); }
.alert-secondary { background: var(--vault); color: var(--ash); border-color: var(--rule); }
.card { background: var(--vault); border-color: var(--rule); color: var(--vellum); }
.table { --bs-table-bg: transparent; --bs-table-color: var(--vellum); --bs-table-border-color: var(--rule); --bs-table-striped-bg: rgba(255, 255, 255, 0.02); --bs-table-hover-bg: var(--vault); }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--rule); padding: 2.5rem 0 2rem; margin-top: 3rem; color: var(--ash); font-size: var(--step--1); }
.site-footer .inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer a { color: var(--ash); }
.site-footer a:hover { color: var(--vellum); }
.site-footer p { margin: 0.35rem 0 0; }

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .classes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero .inner { grid-template-columns: minmax(0, 1fr); }
  .event-plaque { justify-self: start; }
  .server-clock { display: none; }
}

@media (max-width: 720px) {
  .site-header .inner { flex-wrap: wrap; gap: 0.5rem 1rem; padding-block: 0.5rem; }
  .main-nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .news-featured { grid-template-columns: minmax(0, 1fr); }
  .news-row { grid-template-columns: 96px minmax(0, 1fr); }
  .news-row img { width: 96px; }
  .classes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rules { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: min(86vh, 620px); background-position: 70% 30%; }
  .hero h1 { font-size: 2.3rem; }
  .status-bar .inner { gap: 0.4rem 1.25rem; }
  .table-mu .hide-sm { display: none; }
  .table-mu.arena th, .table-mu.arena td { padding-inline: 0.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Purchase receipt (Shop/Success). One centered card; the emblem is the only decoration. */
.receipt { max-width: 34rem; margin-inline: auto; text-align: center; background: var(--vault); border: 1px solid var(--rule); border-radius: var(--radius); padding: 2.25rem 1.5rem 2rem; }
/* The emblem has an opaque black background. "lighten" lets the card color show through it. */
.receipt-emblem { display: block; margin: 0 auto 1rem; mix-blend-mode: lighten; }
.receipt h1 { margin: 0 0 0.6rem; }
.receipt-kicker { color: var(--gilt); margin: 0 0 0.25rem; }
.receipt-lede { color: var(--vellum); margin: 0 auto 1.25rem; max-width: 30ch; }
.receipt-big { font-family: var(--font-display); font-size: var(--step-3); color: var(--gilt-bright); margin: 0 0 1.25rem; }
.receipt-items { list-style: none; padding: 0; margin: 0 auto 1.5rem; display: inline-block; text-align: left; }
.receipt-items li { padding: 0.3rem 0; border-bottom: 1px solid var(--rule); }
.receipt-items li:last-child { border-bottom: 0; }
.receipt-items .num { color: var(--gilt-bright); display: inline-block; min-width: 2.5rem; }
.receipt-steps { text-align: left; border-top: 1px solid var(--rule); padding-top: 1.25rem; margin-bottom: 1.5rem; }
.receipt-steps h2 { font-size: var(--step-1); margin: 0 0 0.5rem; }
.receipt-steps ol { margin: 0; padding-left: 1.25rem; }
.receipt-steps p { margin: 0; color: var(--ash); }
.receipt-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* Purchase history in the player panel. */
.order-state { font-size: var(--step--1); }
.order-state.done { color: var(--gilt-bright); }
.order-state.wait { color: var(--ash); }

/* Character cards in the player panel. */
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.char-card { background: var(--vault); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.char-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.char-card h3 { margin: 0; font-size: var(--step-1); }
.char-card dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.35rem 1rem; margin: 0; }
.char-card dt { color: var(--ash); font-weight: 400; font-size: var(--step--1); }
.char-card dd { margin: 0; }
.char-hint { margin: 0; color: var(--ash); font-size: var(--step--1); }
.char-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: auto; }
.char-actions form { margin: 0; }
.char-actions button[disabled] { opacity: 0.45; cursor: not-allowed; }

/* Rules page: a quiet table of contents, then short sections. */
.rules-toc { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; padding-bottom: 1rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--rule); }
.rules-page h2 { margin-top: 2rem; scroll-margin-top: 5rem; }
.rules-page h3 { font-size: var(--step-0); margin: 1.25rem 0 0.5rem; color: var(--gilt-bright); }
.rules-page .table-mu { max-width: 26rem; margin-bottom: 1rem; }

/* Events page: running events first, then the next 24 hours, then the daily table. */
.events-page h2 { font-size: var(--step-1); margin: 0 0 1rem; }
.section-tight { margin-top: 2.75rem; }

.now-board { background: var(--vault); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.5rem 1.5rem 1.25rem; }
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; margin-bottom: 1.1rem; }
.live-card { background: var(--vault-raised); border: 1px solid var(--ember); border-left-width: 4px; border-radius: var(--radius); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.live-card h3 { font-size: var(--step-2); margin: 0; }
.live-card p { margin: 0; }
.live-card .summary { color: var(--vellum); }
.live-card .where { color: var(--ash); font-size: var(--step--1); }
.live-tag { color: var(--ember-bright); font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }
.pulse { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--ember-bright); box-shadow: 0 0 0 0 rgba(216, 70, 47, 0.6); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 0.6rem rgba(216, 70, 47, 0); } }
.live-times { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; margin: 0.5rem 0 0; }
.live-times dt { color: var(--ash); font-weight: 400; font-size: var(--step--1); }
.live-times dd { margin: 0; font-size: var(--step-1); color: var(--gilt-bright); }
.quiet-now { color: var(--ash); margin: 0 0 0.75rem; }
.next-line { margin: 0; }
.next-line strong { color: var(--gilt-bright); }

.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.timeline li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--rule); }
.timeline .when { display: flex; align-items: baseline; gap: 0.5rem; }
.timeline .day { color: var(--ash); font-size: var(--step--1); min-width: 3.6rem; }
.timeline .time { font-size: var(--step-1); color: var(--vellum); }
.timeline .what { display: flex; flex-direction: column; min-width: 0; }
.timeline .len { color: var(--ash); font-size: var(--step--1); }
.timeline .in { color: var(--gilt-bright); white-space: nowrap; }
.timeline li.is-live { background: rgba(184, 50, 31, 0.14); box-shadow: inset 4px 0 0 var(--ember); }
.timeline li.is-live .in { color: var(--ember-bright); font-weight: 700; }
.timeline li.is-done { opacity: 0.45; }

.table-mu.daily .name { display: block; }
.table-mu.daily .summary { display: block; color: var(--ash); }
.table-mu.daily .times { line-height: 1.7; }
.table-mu.daily td:last-child { white-space: nowrap; }

@media (max-width: 720px) {
  .now-board { padding: 1.1rem; }
  .timeline li { grid-template-columns: 5.5rem minmax(0, 1fr); padding-inline: 0.5rem; }
  .timeline .when { flex-direction: column; gap: 0; }
  .timeline .in { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .pulse { animation: none; }
}

/* ---------- Download page ---------- */

.dl-hero {
  position: relative;
  isolation: isolate;
  padding: 4rem 0 3.5rem;
  border-bottom: 1px solid var(--rule);
  background: var(--abyss) url("/img/download-hero.jpg") center 35% / cover no-repeat;
  overflow: hidden;
}

.dl-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 15, 26, 0.95) 0%, rgba(10, 15, 26, 0.78) 45%, rgba(10, 15, 26, 0.45) 100%),
    linear-gradient(0deg, var(--abyss) 0%, rgba(10, 15, 26, 0) 35%);
}

.dl-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 3rem;
  align-items: center;
}

.dl-kicker {
  margin: 0 0 0.6rem;
  color: var(--gilt-bright);
  font-weight: 700;
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dl-hero h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 700;
  margin: 0 0 1rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.65);
}

.dl-hero .lede { font-size: var(--step-1); max-width: 34ch; color: var(--vellum); margin-bottom: 1.75rem; }

.dl-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem; margin-bottom: 1.75rem; }

.dl-button {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: 0.85rem 1.6rem;
  background: linear-gradient(180deg, var(--gilt-bright), var(--gilt) 55%, #b9832b);
  border: 1px solid #f7d993;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 10px 30px -8px rgba(217, 164, 65, 0.55);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.dl-button:hover {
  background: linear-gradient(180deg, #ffe0a0, var(--gilt-bright) 55%, var(--gilt));
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 14px 36px -8px rgba(242, 200, 110, 0.7);
}

.dl-button-label { font-family: var(--font-display); font-size: var(--step-1); letter-spacing: 0.04em; }
.dl-button-meta { font-size: var(--step--1); font-weight: 600; opacity: 0.8; }

.dl-unavailable { padding: 1rem 1.2rem; border: 1px solid var(--ember); border-radius: var(--radius); background: rgba(184, 50, 31, 0.12); }

.dl-facts { display: flex; flex-wrap: wrap; gap: 0.5rem 2.25rem; margin: 0; }
.dl-facts div { display: flex; flex-direction: column; }
.dl-facts dt { color: var(--ash); font-weight: 400; font-size: var(--step--1); }
.dl-facts dd { margin: 0; font-family: var(--font-display); font-size: var(--step-1); color: var(--gilt-bright); }

.dl-shot { margin: 0; }

.dl-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid rgba(242, 200, 110, 0.55);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.7),
    0 30px 60px -20px rgba(0, 0, 0, 0.85),
    0 0 60px -10px rgba(217, 164, 65, 0.35);
}

.dl-shot figcaption { margin-top: 0.7rem; text-align: right; color: var(--ash); font-size: var(--step--1); }

.dl-body { padding-top: 3rem; padding-bottom: 3rem; }

.dl-section { margin-bottom: 3.5rem; }

.dl-title {
  font-size: var(--step-2);
  margin: 0 0 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.dl-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(217, 164, 65, 0.6), rgba(217, 164, 65, 0));
}

.dl-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  counter-reset: none;
}

.dl-steps li {
  position: relative;
  background: linear-gradient(180deg, var(--vault-raised), var(--vault));
  border: 1px solid var(--rule);
  border-top: 2px solid var(--gilt);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem 1.4rem;
}

.dl-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 0.8rem;
  border-radius: 50%;
  border: 1px solid var(--gilt);
  color: var(--gilt-bright);
  font-family: var(--font-display);
  font-size: var(--step-1);
  background: rgba(217, 164, 65, 0.08);
}

.dl-steps h3, .dl-features h3 { font-size: var(--step-1); margin: 0 0 0.5rem; }
.dl-steps p, .dl-features p { color: var(--ash); margin: 0 0 0.6rem; }
.dl-steps a { font-weight: 700; }

.dl-features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }

.dl-features article {
  padding: 1.3rem 1.3rem 1.1rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--vault);
  border-left: 3px solid var(--ember);
}

.dl-split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 2rem; align-items: start; }

.dl-reqs dl { margin: 0; display: grid; gap: 0.9rem; }
.dl-reqs dt { color: var(--ash); font-weight: 400; font-size: var(--step--1); }
.dl-reqs dd { margin: 0; }

.dl-faq details {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--vault);
  margin-bottom: 0.6rem;
  transition: border-color 0.15s ease;
}

.dl-faq details[open] { border-color: rgba(217, 164, 65, 0.55); background: var(--vault-raised); }

.dl-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 0.95rem 3rem 0.95rem 1.15rem;
  font-weight: 700;
  position: relative;
}

.dl-faq summary::-webkit-details-marker { display: none; }

.dl-faq summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gilt-bright);
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1;
}

.dl-faq details[open] summary::after { content: "−"; }
.dl-faq summary:hover { color: var(--gilt-bright); }
.dl-faq summary:focus-visible { outline: 2px solid var(--gilt); outline-offset: 2px; }
.dl-faq details p { margin: 0; padding: 0 1.15rem 1.05rem; color: var(--ash); }

.dl-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.6rem 1.8rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(184, 50, 31, 0.16), var(--vault) 60%);
}

.dl-help:empty { display: none; }
.dl-help .dl-title { margin-bottom: 0.4rem; }
.dl-help .dl-title::after { display: none; }
.dl-help p { margin: 0; color: var(--ash); }

.dl-verify { color: var(--ash); font-size: var(--step--1); }
.dl-verify summary { cursor: pointer; }
.dl-verify pre { margin: 0.5rem 0; }
.dl-hash { word-break: break-all; }

@media (max-width: 991px) {
  .dl-hero-inner { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
  .dl-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl-split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .dl-hero { padding: 2.5rem 0; }
  .dl-steps, .dl-features { grid-template-columns: minmax(0, 1fr); }
  .dl-cta { flex-direction: column; align-items: stretch; }
  .dl-button { align-items: center; text-align: center; }
  .dl-cta .btn-ghost { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .dl-button { transition: none; }
  .dl-button:hover { transform: none; }
}

/* ---------- Quests page ---------- */

.qs-hero { background-image: url("/img/news-event.jpg"); background-position: center 40%; }
.qs-hero .lede { max-width: 40ch; }

.qs-body { padding-top: 3rem; }
.qs-section { margin-bottom: 3.5rem; }
.qs-section h2 { font-size: var(--step-2); margin: 0 0 1.4rem; }
.qs-note { margin: 1rem 0 0; }

.qs-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; counter-reset: qs-step; }
.qs-steps li { counter-increment: qs-step; background: var(--vault); border: 1px solid var(--rule); border-top: 2px solid var(--gilt); border-radius: var(--radius); padding: 1.1rem 1.15rem; }
.qs-steps li::before { content: counter(qs-step, decimal-leading-zero); display: block; font-family: var(--font-display); font-size: var(--step-2); color: var(--gilt-bright); line-height: 1; margin-bottom: 0.6rem; }
.qs-steps h3 { font-size: var(--step-1); margin: 0 0 0.35rem; }
.qs-steps p { margin: 0; color: var(--ash); }

.qs-chain { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.qs-quest { position: relative; display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); gap: 1.1rem; background: var(--vault); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.qs-quest:not(:last-child)::after { content: ""; position: absolute; left: calc(1.25rem + 1.625rem - 1px); bottom: -0.95rem; height: 0.95rem; border-left: 2px dashed var(--rule); }
.qs-num { width: 3.25rem; height: 3.25rem; display: grid; place-items: center; border: 1px solid var(--gilt); border-radius: 50%; font-family: var(--font-display); font-size: var(--step-2); color: var(--gilt-bright); background: radial-gradient(circle, rgba(217, 164, 65, 0.18), transparent 70%); }
.qs-quest h3 { font-size: var(--step-1); margin: 0 0 0.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.qs-route { margin: 0 0 0.5rem; color: var(--ash); font-size: var(--step--1); }
.qs-route span:first-child, .qs-route span:last-child { color: var(--vellum); }
.qs-goal { margin: 0 0 0.75rem; }
.qs-rewards { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.qs-rewards li { padding: 0.15rem 0.6rem; border: 1px solid rgba(217, 164, 65, 0.45); border-radius: var(--radius); background: rgba(217, 164, 65, 0.08); color: var(--gilt-bright); font-size: var(--step--1); font-weight: 700; font-variant-numeric: tabular-nums; }

.qs-dungeons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.qs-dungeon { background: linear-gradient(180deg, var(--vault-raised), var(--vault)); border: 1px solid var(--rule); border-left: 4px solid var(--ember); border-radius: var(--radius); padding: 1.25rem 1.35rem; }
.qs-dungeon h3 { font-size: var(--step-2); margin: 0 0 0.9rem; }
.qs-dungeon dl { display: grid; gap: 0.45rem; margin: 0; }
.qs-dungeon dl div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.75rem; }
.qs-dungeon dt { color: var(--ash); font-weight: 400; font-size: var(--step--1); padding-top: 0.15rem; }
.qs-dungeon dd { margin: 0; }

@media (max-width: 991px) {
  .qs-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qs-dungeons { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .qs-steps { grid-template-columns: minmax(0, 1fr); }
  .qs-quest { grid-template-columns: 2.5rem minmax(0, 1fr); gap: 0.85rem; padding: 1rem; }
  .qs-num { width: 2.5rem; height: 2.5rem; font-size: var(--step-1); }
  .qs-quest:not(:last-child)::after { left: calc(1rem + 1.25rem - 1px); }
}

/* ---------- Economy exchange (/Panel/Economia) ---------- */

.xchg { display: grid; grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr); gap: 1rem; padding-block: 1rem 2rem; }
.xchg-list { background: var(--vault); border: 1px solid var(--rule); border-radius: var(--radius); max-height: calc(100vh - 7rem); overflow-y: auto; position: sticky; top: 5.5rem; align-self: start; }
.xchg-list-head { position: sticky; top: 0; z-index: 1; background: var(--vault); padding: 0.75rem; border-bottom: 1px solid var(--rule); }
.xchg-search { width: 100%; background: var(--abyss); color: var(--vellum); border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.45rem 0.6rem; font-size: var(--step--1); }
.xchg-search:focus { border-color: var(--gilt); outline: none; }
.xchg-kinds { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; }
.xchg-kinds button, .xchg-ranges button { background: transparent; color: var(--ash); border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.15rem 0.5rem; font-size: 0.8rem; }
.xchg-kinds button:hover, .xchg-ranges button:hover { color: var(--gilt-bright); border-color: var(--gilt); }
.xchg-kinds button[aria-pressed="true"], .xchg-ranges button[aria-pressed="true"] { color: #1c1306; background: var(--gilt); border-color: var(--gilt); font-weight: 700; }
.xchg-table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.xchg-table th { position: sticky; top: 0; background: var(--vault-raised); font-weight: 400; padding: 0; }
.xchg-table th button { width: 100%; background: none; border: 0; color: var(--ash); padding: 0.35rem 0.6rem; text-align: inherit; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.xchg-table th[aria-sort="descending"] button::after { content: " ▾"; color: var(--gilt); }
.xchg-table th[aria-sort="ascending"] button::after { content: " ▴"; color: var(--gilt); }
.xchg-table td { padding: 0.4rem 0.6rem; border-top: 1px solid rgba(42, 53, 80, 0.6); vertical-align: top; }
.xchg-table tbody tr { cursor: pointer; }
.xchg-table tbody tr:hover { background: var(--vault-raised); }
.xchg-table tbody tr[aria-selected="true"] { background: var(--vault-raised); box-shadow: inset 3px 0 0 var(--gilt); }
.xchg-name { display: block; color: var(--vellum); }
.xchg-cat { display: block; color: var(--ash); font-size: 0.72rem; margin: 0; text-transform: uppercase; letter-spacing: 0.06em; }
.xchg-pct { display: block; font-size: 0.72rem; opacity: 0.85; }
.xchg-table .up, .xchg-stats .up { color: var(--online); }
.xchg-table .down { color: var(--ember-bright); }
.xchg-empty { padding: 0.75rem; }
.xchg-main { background: var(--vault); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.25rem; min-width: 0; }
.xchg-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: flex-end; }
.xchg-head h1 { font-size: var(--step-2); margin: 0; }
.xchg-stats { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; }
.xchg-stats dt { color: var(--ash); font-size: 0.72rem; font-weight: 400; text-transform: uppercase; letter-spacing: 0.06em; }
.xchg-stats dd { margin: 0; font-size: var(--step-1); color: var(--vellum); }
.xchg-stats dd small { color: var(--ash); font-size: 0.75rem; }
.xchg-ranges { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: 1rem 0 0.5rem; }
.xchg-chart-wrap { position: relative; height: 460px; }
.xchg-chart { height: 100%; }
.xchg-chart[aria-busy="true"] { opacity: 0.55; }
.xchg-message { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; max-width: none; text-align: center; border: 1px dashed var(--rule); border-radius: var(--radius); }
.xchg-message[hidden] { display: none; }
.xchg-menu { position: absolute; z-index: 5; display: grid; min-width: 11rem; background: var(--vault-raised); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); padding: 0.25rem; }
.xchg-menu[hidden] { display: none; }
.xchg-menu button { background: none; border: 0; color: var(--vellum); text-align: left; padding: 0.4rem 0.6rem; font-size: var(--step--1); border-radius: var(--radius); }
.xchg-menu button:hover, .xchg-menu button:focus-visible { background: var(--vault); color: var(--gilt-bright); }
.xchg-ranges .xchg-center { margin-left: auto; }
.xchg-readout { min-height: 1.5em; font-size: 0.8rem; color: var(--ash); margin: 0.25rem 0 0.75rem; }
.xchg-sources { margin: 0.5rem 0 1rem; max-width: 40rem; }
.xchg-sources h2 { font-family: var(--font-body); font-size: var(--step--1); font-weight: 700; color: var(--ash); text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 0.35rem; }
.xchg-sources th { position: static; padding: 0.3rem 0.6rem; color: var(--ash); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; text-align: left; }
.xchg-sources th.text-end { text-align: right; }
.xchg-sources tbody tr { cursor: default; }
.xchg-note { max-width: none; }

@media (max-width: 860px) {
  .xchg { grid-template-columns: minmax(0, 1fr); }
  .xchg-list { position: static; max-height: 45vh; }
  .xchg-main { order: -1; }
}

/* The refund policy checkbox of each buy form. */
.refund-accept { display: flex; gap: 0.5rem; align-items: flex-start; text-align: left; font-size: 0.85rem; color: var(--ash); margin: 0 0 0.75rem; }
.refund-accept input { margin-top: 0.2rem; flex: none; }

/* The wiki: a menu on the left and one article on the right. */
.wiki-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2.5rem; align-items: start; padding-bottom: 3rem; }
.wiki-nav { position: sticky; top: 5.5rem; background: var(--vault); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.1rem; }
.wiki-nav h2 { font-size: var(--step--1); color: var(--ash); margin: 1rem 0 0.35rem; }
.wiki-nav ul { list-style: none; margin: 0; padding: 0; }
.wiki-nav li { margin: 0.25rem 0; }
.wiki-nav a { color: var(--vellum); text-decoration: none; }
.wiki-nav a:hover, .wiki-nav a[aria-current="page"] { color: var(--gilt-bright); }
.wiki-nav-home { font-weight: 700; }
.wiki-crumb { font-size: var(--step--1); margin-bottom: 0.4rem !important; }
.wiki-main { min-width: 0; }
.wiki-section { margin-bottom: 3rem; scroll-margin-top: 6.5rem; }
.wiki-section h2 { font-size: var(--step-2); margin: 0 0 1rem; }
.wiki-section h3 { font-size: var(--step-1); margin: 2rem 0 0.8rem; display: flex; align-items: center; gap: 0.6rem; }
.wiki-article p { line-height: 1.6; }
.wiki-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; }
.wiki-card { display: block; background: var(--vault); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.15rem; color: var(--vellum); text-decoration: none; }
.wiki-card:hover { border-color: var(--gilt); }
.wiki-card h3 { display: block; font-size: var(--step-0); margin: 0 0 0.35rem; color: var(--gilt-bright); }
.wiki-card p { margin: 0; color: var(--ash); }
.wiki-step { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem; border: 1px solid var(--gilt); border-radius: 50%; color: var(--gilt-bright); font-size: var(--step-0); }
.wiki-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.75rem 1.25rem; background: var(--vault); border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.9rem 1.1rem; margin: 0 0 1rem; }
.wiki-facts dt { color: var(--ash); font-size: var(--step--1); font-weight: 500; }
.wiki-facts dd { margin: 0; }
.wiki-table { overflow-x: auto; margin-bottom: 1.25rem; }
.wiki-table .table-mu { min-width: 34rem; }
.wiki-callout { border-left: 3px solid var(--gilt); background: var(--vault); padding: 0.75rem 1rem; }
.wiki-rules li { margin-bottom: 0.5rem; }
.wiki-figure { margin: 0 0 1.25rem; }
.wiki-figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--rule); border-radius: var(--radius); }
.wiki-figure figcaption { color: var(--ash); font-size: var(--step--1); margin-top: 0.4rem; }
@media (max-width: 860px) {
  .wiki-layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .wiki-nav { position: static; }
  .wiki-section { scroll-margin-top: 12rem; }
}
