/* =====================================================================
   Divine X - Guide Render Stylesheet
   ---------------------------------------------------------------------
   The component library every Guide Studio block renders into.
   Loaded by BOTH the public guide page and the editor's live preview,
   so what staff see while building is exactly what players get.

   Everything is scoped under .gx-guide and driven by CSS variables, so a
   guide can change its whole look by swapping one data-gx-theme value.
   ===================================================================== */

/* ---------- Themes ------------------------------------------------- */
.gx-guide {
  /* default = divine (site teal + bronze, dark) */
  --gx-bg:      #0a1214;
  --gx-surface: #0f1a1c;
  --gx-raised:  #132225;
  --gx-ink:     #ffffff;
  --gx-muted:   #8ba5a5;
  --gx-line:    #1e3a3a;
  --gx-accent:  #1a9e9e;
  --gx-accent2: #cd7f32;
  --gx-shadow:  0 1px 2px rgba(0,0,0,.35), 0 12px 32px rgba(0,0,0,.32);
  --gx-inset:   inset 0 1px 0 rgba(255,255,255,.04);
  --gx-radius:  14px;
  --gx-hero-ink: #ffffff;

  --gx-good: #2ecc71;
  --gx-warn: #f1b54b;
  --gx-bad:  #ef4444;
  --gx-info: #38bdf8;
}

.gx-guide[data-gx-theme="ember"] {
  --gx-bg:#121316; --gx-surface:#1A1C21; --gx-raised:#22252B; --gx-ink:#EDE9E1;
  --gx-muted:#9C9488; --gx-line:#2D3037; --gx-accent:#EF2B26; --gx-accent2:#C9A24B;
  --gx-radius:4px; --gx-hero-ink:#F4EFE4;
}
.gx-guide[data-gx-theme="parchment"] {
  --gx-bg:#EDEAE3; --gx-surface:#F8F6F1; --gx-raised:#FFFFFF; --gx-ink:#191612;
  --gx-muted:#6A6155; --gx-line:#D8D1C4; --gx-accent:#C11119; --gx-accent2:#8E6E27;
  --gx-shadow:0 1px 1px rgba(25,22,18,.05), 0 10px 26px rgba(25,22,18,.09);
  --gx-inset: inset 0 1px 0 rgba(255,255,255,.6);
  --gx-radius:4px; --gx-hero-ink:#F2EEE6;
}
.gx-guide[data-gx-theme="tide"] {
  --gx-bg:#071A22; --gx-surface:#0E2731; --gx-raised:#123540; --gx-ink:#EAF3F2;
  --gx-muted:#9BB4BC; --gx-line:#1E3E49; --gx-accent:#35C5DE; --gx-accent2:#F1B54B;
  --gx-radius:12px; --gx-hero-ink:#EAF3F2;
}
.gx-guide[data-gx-theme="sandbar"] {
  --gx-bg:#F6EEDC; --gx-surface:#FFFDF7; --gx-raised:#FFFFFF; --gx-ink:#0C2A38;
  --gx-muted:#4E6572; --gx-line:#E4D9BE; --gx-accent:#0E93AE; --gx-accent2:#E0952B;
  --gx-shadow:0 1px 2px rgba(12,42,56,.06), 0 8px 24px rgba(12,42,56,.08);
  --gx-inset: inset 0 1px 0 rgba(255,255,255,.7);
  --gx-radius:12px; --gx-hero-ink:#FFFDF7;
}
.gx-guide[data-gx-theme="void"] {
  --gx-bg:#0B0A14; --gx-surface:#14121F; --gx-raised:#1B1830; --gx-ink:#EDEAF6;
  --gx-muted:#9A93B8; --gx-line:#272243; --gx-accent:#A78BFA; --gx-accent2:#F0ABFC;
  --gx-radius:16px; --gx-hero-ink:#EDEAF6;
}
.gx-guide[data-gx-theme="verdant"] {
  --gx-bg:#08140E; --gx-surface:#0E1F16; --gx-raised:#14291D; --gx-ink:#E6F2EA;
  --gx-muted:#8FB3A0; --gx-line:#1C3A2A; --gx-accent:#34D399; --gx-accent2:#FBBF24;
  --gx-radius:14px; --gx-hero-ink:#E6F2EA;
}
.gx-guide[data-gx-theme="crimson"] {
  --gx-bg:#140A0B; --gx-surface:#1F1213; --gx-raised:#291819; --gx-ink:#F5E9E9;
  --gx-muted:#B79A9A; --gx-line:#3A2223; --gx-accent:#F43F5E; --gx-accent2:#FBBF24;
  --gx-radius:10px; --gx-hero-ink:#F5E9E9;
}
.gx-guide[data-gx-theme="frost"] {
  --gx-bg:#080D16; --gx-surface:#101827; --gx-raised:#172033; --gx-ink:#E8EEF8;
  --gx-muted:#93A4BE; --gx-line:#22304a; --gx-accent:#60A5FA; --gx-accent2:#A5F3FC;
  --gx-radius:14px; --gx-hero-ink:#E8EEF8;
}

/* ---------- Display face options ----------------------------------- */
.gx-guide { --gx-display: 'Cinzel', Georgia, serif; --gx-display-weight: 700;
            --gx-display-transform: none; --gx-display-spacing: 0; }
.gx-guide[data-gx-font="black"] {
  --gx-display: "Arial Black","Franklin Gothic Heavy","Segoe UI Black",Impact,sans-serif;
  --gx-display-weight: 900; --gx-display-transform: uppercase; --gx-display-spacing: -.02em;
}
.gx-guide[data-gx-font="sans"] {
  --gx-display: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --gx-display-weight: 800; --gx-display-transform: none; --gx-display-spacing: -.01em;
}
.gx-guide[data-gx-font="mono"] {
  --gx-display: ui-monospace, 'Cascadia Code', Consolas, monospace;
  --gx-display-weight: 700; --gx-display-transform: uppercase; --gx-display-spacing: .04em;
}

/* ---------- Base --------------------------------------------------- */
.gx-guide {
  color: var(--gx-ink);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.65;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
}
.gx-guide *, .gx-guide *::before, .gx-guide *::after { box-sizing: border-box; }
.gx-guide a { color: var(--gx-accent); text-decoration: none; }
.gx-guide a:hover { text-decoration: underline; }
.gx-guide strong, .gx-guide b { color: var(--gx-ink); font-weight: 700; }
.gx-guide em { font-style: italic; }
.gx-guide mark { background: color-mix(in srgb, var(--gx-accent2) 35%, transparent); color: inherit; padding: 0 4px; border-radius: 3px; }
.gx-guide p { margin: 0 0 14px; color: var(--gx-muted); }
.gx-guide p:last-child { margin-bottom: 0; }
.gx-guide .gx-mono {
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums; font-size: .92em;
}
.gx-guide .gx-display {
  font-family: var(--gx-display); font-weight: var(--gx-display-weight);
  text-transform: var(--gx-display-transform); letter-spacing: var(--gx-display-spacing);
  -webkit-font-smoothing: auto;
}

/* every block sits in the flow with consistent rhythm */
.gx-block { margin: 0 0 26px; }
.gx-block:last-child { margin-bottom: 0; }

/* ---------- Inline command / item chips ---------------------------- */
.gx-guide code, .gx-cmd {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  background: color-mix(in srgb, var(--gx-accent) 16%, transparent);
  color: var(--gx-accent);
  padding: 2px 8px; border-radius: 5px; font-size: .88em; font-weight: 600;
}
.gx-item-chip {
  display: inline-flex; align-items: center; gap: 6px; vertical-align: middle;
  background: var(--gx-raised); border: 1px solid var(--gx-line);
  border-radius: 999px; padding: 2px 10px 2px 4px; font-size: .88em; font-weight: 600;
  color: var(--gx-ink);
}
.gx-item-chip img { width: 20px; height: 20px; object-fit: contain; }

/* ---------- HERO ---------------------------------------------------- */
.gx-hero {
  position: relative; overflow: hidden;
  padding: clamp(44px, 8vw, 76px) 28px clamp(38px, 6vw, 62px);
  color: var(--gx-hero-ink); text-align: center;
  border-radius: var(--gx-radius);
  background:
    radial-gradient(680px 300px at 50% -10%, color-mix(in srgb, var(--gx-accent) 34%, transparent), transparent 68%),
    linear-gradient(184deg, color-mix(in srgb, var(--gx-bg) 55%, #000) 0%, color-mix(in srgb, var(--gx-bg) 85%, #000) 100%);
  border-bottom: 3px solid var(--gx-accent);
}
.gx-hero[data-align="left"] { text-align: left; }
.gx-hero[data-bg="grid"]::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(0deg,  rgba(255,255,255,.035) 0 1px, transparent 1px 46px);
  -webkit-mask: radial-gradient(560px 300px at 50% 40%, #000, transparent 78%);
          mask: radial-gradient(560px 300px at 50% 40%, #000, transparent 78%);
}
.gx-hero[data-bg="rays"]::before {
  content: ""; position: absolute; inset: -40% -10% auto -10%; height: 160%;
  background: conic-gradient(from 180deg at 50% 0%,
     transparent 0deg, color-mix(in srgb, var(--gx-accent) 18%, transparent) 12deg,
     transparent 24deg, color-mix(in srgb, var(--gx-accent2) 14%, transparent) 36deg, transparent 48deg);
  opacity: .55;
}
.gx-hero[data-bg="glow"]::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px 220px at 20% 100%, color-mix(in srgb, var(--gx-accent2) 26%, transparent), transparent 70%);
}
.gx-hero > * { position: relative; z-index: 2; }
.gx-hero .gx-hero-img {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center; opacity: .3;
}
.gx-hero .gx-bill {
  font-size: 12px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--gx-accent); font-weight: 800; margin: 0 0 16px;
}
.gx-hero h1 {
  margin: 0; font-size: clamp(34px, 8vw, 76px); line-height: .92;
  font-family: var(--gx-display); font-weight: var(--gx-display-weight);
  text-transform: var(--gx-display-transform); letter-spacing: var(--gx-display-spacing);
  text-wrap: balance; -webkit-font-smoothing: auto;
}
.gx-hero .gx-hero-sub {
  display: block; margin-top: 16px; font-size: clamp(13px, 2vw, 17px);
  letter-spacing: .22em; text-transform: uppercase; color: var(--gx-muted);
  font-weight: 700;
}
.gx-hero .gx-hero-chips {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 10px 16px; margin: 28px auto 0; max-width: 680px;
  color: var(--gx-muted); font-size: 12.5px; letter-spacing: .14em;
  text-transform: uppercase; font-weight: 700;
}
.gx-hero[data-align="left"] .gx-hero-chips { justify-content: flex-start; }
.gx-hero .gx-hero-chips span {
  padding: 6px 14px; border: 1px solid color-mix(in srgb, var(--gx-hero-ink) 22%, transparent);
  border-radius: 999px; background: rgba(0,0,0,.22);
}

/* ---------- SECTION HEADER ------------------------------------------ */
.gx-section { margin-top: 42px; }
.gx-eyebrow {
  display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .2em;
  text-transform: uppercase; color: var(--gx-accent); margin: 0 0 10px;
}
.gx-section h2 {
  font-family: var(--gx-display); font-weight: var(--gx-display-weight);
  text-transform: var(--gx-display-transform); letter-spacing: var(--gx-display-spacing);
  font-size: clamp(25px, 4.6vw, 40px); line-height: 1.08; margin: 0 0 12px;
  color: var(--gx-ink); -webkit-font-smoothing: auto;
}
.gx-section .gx-lede { color: var(--gx-muted); max-width: 66ch; font-size: 16px; }

/* ---------- HEADING ------------------------------------------------- */
.gx-h { margin: 30px 0 12px; display: flex; align-items: center; gap: 10px; color: var(--gx-accent); }
.gx-h.gx-h2 { font-size: 26px; }
.gx-h.gx-h3 { font-size: 20px; }
.gx-h.gx-h4 { font-size: 16.5px; color: var(--gx-accent2); }
.gx-h.gx-styled {
  font-family: var(--gx-display); font-weight: var(--gx-display-weight);
  text-transform: var(--gx-display-transform); letter-spacing: var(--gx-display-spacing);
  -webkit-font-smoothing: auto;
}

/* ---------- TEXT ---------------------------------------------------- */
.gx-text { color: var(--gx-muted); font-size: 15.5px; }
.gx-text.gx-lead { font-size: 17.5px; color: var(--gx-ink); }
.gx-text.gx-small { font-size: 13.5px; }
.gx-text ul, .gx-text ol { margin: 10px 0 14px; padding-left: 22px; }
.gx-text li { margin: 5px 0; }

/* ---------- CALLOUT -------------------------------------------------- */
.gx-callout {
  --c: var(--gx-accent);
  display: flex; gap: 15px; align-items: flex-start;
  background: color-mix(in srgb, var(--c) 9%, var(--gx-surface));
  border: 1px solid color-mix(in srgb, var(--c) 34%, var(--gx-line));
  border-left: 4px solid var(--c);
  border-radius: var(--gx-radius); padding: 17px 19px; box-shadow: var(--gx-shadow);
}
.gx-callout[data-variant="tip"]     { --c: var(--gx-good); }
.gx-callout[data-variant="warn"]    { --c: var(--gx-warn); }
.gx-callout[data-variant="danger"]  { --c: var(--gx-bad); }
.gx-callout[data-variant="info"]    { --c: var(--gx-info); }
.gx-callout[data-variant="loot"]    { --c: var(--gx-accent2); }
.gx-callout[data-variant="accent"]  { --c: var(--gx-accent); }
.gx-callout .gx-ic { font-size: 22px; line-height: 1.15; flex-shrink: 0; }
.gx-callout .gx-callout-body { flex: 1; min-width: 0; }
.gx-callout .gx-callout-title { display: block; font-weight: 800; color: var(--c); margin-bottom: 4px; }
.gx-callout .gx-callout-body p { color: var(--gx-muted); }
.gx-callout strong { color: var(--c); }

/* ---------- LISTS ---------------------------------------------------- */
.gx-list { margin: 0; padding-left: 20px; color: var(--gx-muted); }
.gx-list li { margin: 6px 0; }
.gx-list strong { color: var(--gx-ink); }
.gx-list[data-style="check"], .gx-list[data-style="arrow"], .gx-list[data-style="x"] {
  list-style: none; padding-left: 0;
}
.gx-list[data-style="check"] li,
.gx-list[data-style="arrow"] li,
.gx-list[data-style="x"] li {
  position: relative; padding-left: 30px;
}
.gx-list[data-style="check"] li::before {
  content: "\2713"; position: absolute; left: 4px; top: 0;
  color: var(--gx-good); font-weight: 900;
}
.gx-list[data-style="x"] li::before {
  content: "\2715"; position: absolute; left: 4px; top: 0;
  color: var(--gx-bad); font-weight: 900;
}
.gx-list[data-style="arrow"] li::before {
  content: "\279C"; position: absolute; left: 2px; top: 0;
  color: var(--gx-accent); font-weight: 900;
}

/* ---------- STEPS (numbered chain) ----------------------------------- */
.gx-steps { display: grid; gap: 10px; margin: 0; padding: 0; counter-reset: gxs; }
.gx-steps li {
  list-style: none; display: grid; grid-template-columns: 34px 1fr; gap: 14px;
  align-items: baseline; padding: 14px 16px;
  background: var(--gx-raised); border: 1px solid var(--gx-line);
  border-radius: var(--gx-radius);
}
.gx-steps li::before {
  counter-increment: gxs; content: counter(gxs);
  font-family: var(--gx-display); font-weight: 900; font-size: 20px;
  color: var(--gx-accent); text-align: center; -webkit-font-smoothing: auto;
}
.gx-steps .gx-step-title { display: block; font-weight: 750; color: var(--gx-ink); margin-bottom: 3px; }
.gx-steps .gx-step-body { color: var(--gx-muted); font-size: 14.5px; }
.gx-steps[data-variant="timeline"] li { border-left: 3px solid var(--gx-accent); }

/* ---------- TIMELINE -------------------------------------------------- */
.gx-timeline { position: relative; margin: 0; padding: 0 0 0 30px; list-style: none; }
.gx-timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(180deg, var(--gx-accent), color-mix(in srgb, var(--gx-accent) 15%, transparent));
}
.gx-timeline li { position: relative; margin-bottom: 20px; }
.gx-timeline li::before {
  content: ""; position: absolute; left: -28px; top: 7px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--gx-bg); border: 3px solid var(--gx-accent);
}
.gx-timeline .gx-tl-time {
  display: inline-block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 800; color: var(--gx-accent2); margin-bottom: 2px;
}
.gx-timeline .gx-tl-title { display: block; font-weight: 750; color: var(--gx-ink); }
.gx-timeline .gx-tl-body { color: var(--gx-muted); font-size: 14.5px; }

/* ---------- STAT SLAB ------------------------------------------------- */
.gx-slab {
  display: grid; gap: 0; border: 1px solid var(--gx-line);
  border-radius: var(--gx-radius); overflow: hidden;
  background: var(--gx-surface); box-shadow: var(--gx-shadow);
}
.gx-slab > div { padding: 16px 18px; border-right: 1px solid var(--gx-line); }
.gx-slab > div:last-child { border-right: none; }
.gx-slab .gx-k {
  font-size: 10.5px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--gx-muted); font-weight: 800;
}
.gx-slab .gx-v { font-size: 20px; font-weight: 780; margin-top: 4px; color: var(--gx-ink); }
.gx-slab .gx-v small { font-size: 12px; color: var(--gx-muted); font-weight: 600; display: block; margin-top: 2px; }

/* ---------- TABLES ---------------------------------------------------- */
.gx-tablewrap {
  overflow-x: auto; border: 1px solid var(--gx-line); border-radius: var(--gx-radius);
  background: var(--gx-surface); box-shadow: var(--gx-shadow);
}
.gx-tablewrap table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 14.5px; }
.gx-tablewrap th, .gx-tablewrap td {
  text-align: left; padding: 11px 15px; border-bottom: 1px solid var(--gx-line); color: var(--gx-muted);
}
.gx-tablewrap th {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .13em;
  color: var(--gx-accent); font-weight: 800;
  background: color-mix(in srgb, var(--gx-accent) 10%, var(--gx-surface));
}
.gx-tablewrap tr:last-child td { border-bottom: none; }
.gx-tablewrap tbody tr:hover td { background: color-mix(in srgb, var(--gx-accent) 5%, transparent); }
.gx-tablewrap td:first-child, .gx-tablewrap.gx-boldfirst td:first-child { color: var(--gx-ink); font-weight: 650; }
.gx-tablewrap.gx-compact th, .gx-tablewrap.gx-compact td { padding: 7px 12px; font-size: 13.5px; }
.gx-table-caption { color: var(--gx-muted); font-size: 12.5px; font-style: italic; margin-top: 8px; text-align: center; }

/* ---------- DROP TABLE ------------------------------------------------ */
.gx-drops .gx-rarity {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .06em;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.gx-r-always    { background: color-mix(in srgb, #94a3b8 22%, transparent); color: #cbd5e1; }
.gx-r-common    { background: color-mix(in srgb, var(--gx-good) 20%, transparent); color: var(--gx-good); }
.gx-r-uncommon  { background: color-mix(in srgb, var(--gx-info) 20%, transparent); color: var(--gx-info); }
.gx-r-rare      { background: color-mix(in srgb, var(--gx-accent2) 24%, transparent); color: var(--gx-accent2); }
.gx-r-veryrare  { background: color-mix(in srgb, var(--gx-bad) 22%, transparent); color: var(--gx-bad); }
.gx-drops .gx-drop-item { display: flex; align-items: center; gap: 10px; }
.gx-drops .gx-drop-item img { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }
.gx-drops td.gx-qty { font-family: ui-monospace, Consolas, monospace; }

/* ---------- CARD GRID -------------------------------------------------- */
.gx-cards { display: grid; gap: 14px; }
.gx-card {
  --c: var(--gx-accent);
  background: var(--gx-raised); border: 1px solid var(--gx-line);
  border-top: 3px solid var(--c);
  border-radius: var(--gx-radius); padding: 20px; box-shadow: var(--gx-inset);
  transition: transform .18s ease, border-color .18s ease;
}
.gx-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 55%, var(--gx-line)); }
.gx-card .gx-card-ic { font-size: 26px; line-height: 1; margin-bottom: 12px; color: var(--c); display: block; }
.gx-card h4 { margin: 0 0 8px; font-size: 17px; font-weight: 750; color: var(--gx-ink); }
.gx-card .gx-card-body { color: var(--gx-muted); font-size: 14.5px; }
.gx-card .gx-card-tag {
  display: inline-block; margin-top: 12px; font-size: 10.5px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; color: var(--c);
}

/* ---------- TIER LADDER -------------------------------------------------- */
.gx-ladder { display: grid; gap: 14px; }
.gx-rung {
  --c: var(--gx-accent2);
  position: relative; display: grid; grid-template-columns: 92px 1fr; gap: 20px;
  background: var(--gx-surface); border: 1px solid var(--gx-line);
  border-left: 4px solid var(--c);
  border-radius: var(--gx-radius); padding: 20px 22px; box-shadow: var(--gx-shadow);
}
.gx-rung .gx-plate { text-align: center; }
.gx-rung .gx-numeral {
  font-family: var(--gx-display); font-weight: 900; font-size: 44px; line-height: .95;
  color: var(--c); letter-spacing: -.02em; -webkit-font-smoothing: auto;
}
.gx-rung .gx-gate {
  display: block; margin-top: 6px; font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; font-weight: 800; color: var(--gx-muted);
}
.gx-rung h3 {
  font-size: 22px; margin: 0 0 4px; letter-spacing: .04em; color: var(--c);
  font-family: var(--gx-display); font-weight: var(--gx-display-weight);
  text-transform: var(--gx-display-transform); -webkit-font-smoothing: auto;
}
.gx-rung .gx-rung-body { color: var(--gx-muted); font-size: 14.5px; margin: 0; }
.gx-rung[data-locked="1"] {
  background: linear-gradient(180deg, color-mix(in srgb, var(--gx-bad) 9%, var(--gx-surface)), var(--gx-surface));
  border-left-color: var(--gx-bad);
}
.gx-rung[data-locked="1"] h3, .gx-rung[data-locked="1"] .gx-numeral { color: var(--gx-bad); }

/* ---------- BOSS / NPC CARD ------------------------------------------------ */
.gx-boss {
  border: 1px solid var(--gx-line); border-radius: var(--gx-radius); overflow: hidden;
  background: var(--gx-surface); box-shadow: var(--gx-shadow);
}
.gx-boss .gx-boss-head {
  display: flex; align-items: center; gap: 18px; padding: 20px 22px;
  background: radial-gradient(420px 180px at 12% 0%, color-mix(in srgb, var(--gx-accent) 26%, transparent), transparent 70%),
              linear-gradient(180deg, color-mix(in srgb, var(--gx-bg) 60%, #000), var(--gx-surface));
  border-bottom: 2px solid var(--gx-accent);
}
.gx-boss .gx-boss-portrait {
  width: 84px; height: 84px; flex-shrink: 0; border-radius: var(--gx-radius);
  object-fit: cover; border: 1px solid var(--gx-line); background: var(--gx-raised);
}
.gx-boss .gx-boss-name {
  margin: 0; font-size: clamp(21px, 3.4vw, 30px);
  font-family: var(--gx-display); font-weight: var(--gx-display-weight);
  text-transform: var(--gx-display-transform); letter-spacing: var(--gx-display-spacing);
  color: var(--gx-ink); -webkit-font-smoothing: auto;
}
.gx-boss .gx-boss-meta { font-size: 12.5px; color: var(--gx-muted); margin-top: 4px; }
.gx-boss .gx-boss-meta .gx-mono { color: var(--gx-accent2); }
.gx-boss .gx-boss-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  border-top: 1px solid var(--gx-line);
}
.gx-boss .gx-boss-stats > div {
  padding: 13px 16px; border-right: 1px solid var(--gx-line); border-bottom: 1px solid var(--gx-line);
}
.gx-boss .gx-boss-stats .gx-k {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--gx-muted); font-weight: 800;
}
.gx-boss .gx-boss-stats .gx-v { font-size: 16px; font-weight: 700; margin-top: 3px; color: var(--gx-ink); }
.gx-boss .gx-boss-notes { padding: 18px 22px; color: var(--gx-muted); font-size: 14.5px; }

/* combat style badges */
.gx-badge {
  display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--gx-accent) 18%, transparent); color: var(--gx-accent);
}
.gx-badge.gx-melee { background: color-mix(in srgb, #ef4444 20%, transparent); color: #f87171; }
.gx-badge.gx-range { background: color-mix(in srgb, #22c55e 20%, transparent); color: #4ade80; }
.gx-badge.gx-mage  { background: color-mix(in srgb, #3b82f6 22%, transparent); color: #60a5fa; }
.gx-badge.gx-pray  { background: color-mix(in srgb, #a855f7 22%, transparent); color: #c084fc; }
.gx-badge.gx-gold  { background: color-mix(in srgb, var(--gx-accent2) 22%, transparent); color: var(--gx-accent2); }
.gx-badge.gx-neutral { background: color-mix(in srgb, var(--gx-muted) 20%, transparent); color: var(--gx-muted); }
.gx-badges { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- GEAR LOADOUT ---------------------------------------------------- */
.gx-gear {
  background: var(--gx-surface); border: 1px solid var(--gx-line);
  border-radius: var(--gx-radius); padding: 22px; box-shadow: var(--gx-shadow);
}
.gx-gear .gx-gear-title {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 800; color: var(--gx-accent); margin: 0 0 16px; text-align: center;
}
.gx-gear-grid {
  display: grid; grid-template-columns: repeat(3, 62px); grid-auto-rows: 62px;
  gap: 8px; justify-content: center;
}
.gx-slot {
  position: relative; border: 1px solid var(--gx-line); border-radius: 8px;
  background: var(--gx-raised); display: flex; align-items: center; justify-content: center;
  padding: 4px; text-align: center;
}
.gx-slot[data-empty="1"] { opacity: .35; }
.gx-slot img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gx-slot .gx-slot-label {
  font-size: 8.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--gx-muted); line-height: 1.15; font-weight: 700;
}
.gx-slot .gx-slot-name {
  font-size: 9.5px; line-height: 1.15; color: var(--gx-ink); font-weight: 600; word-break: break-word;
}
.gx-slot:hover::after {
  content: attr(data-name); position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%); white-space: nowrap; z-index: 5;
  background: var(--gx-bg); color: var(--gx-ink); border: 1px solid var(--gx-line);
  padding: 4px 9px; border-radius: 6px; font-size: 11px; box-shadow: var(--gx-shadow);
}
.gx-slot[data-name=""]:hover::after { display: none; }
/* grid placement mirrors the OSRS equipment interface */
.gx-slot[data-slot="head"]   { grid-column: 2; grid-row: 1; }
.gx-slot[data-slot="cape"]   { grid-column: 1; grid-row: 2; }
.gx-slot[data-slot="neck"]   { grid-column: 2; grid-row: 2; }
.gx-slot[data-slot="ammo"]   { grid-column: 3; grid-row: 2; }
.gx-slot[data-slot="weapon"] { grid-column: 1; grid-row: 3; }
.gx-slot[data-slot="body"]   { grid-column: 2; grid-row: 3; }
.gx-slot[data-slot="shield"] { grid-column: 3; grid-row: 3; }
.gx-slot[data-slot="legs"]   { grid-column: 2; grid-row: 4; }
.gx-slot[data-slot="hands"]  { grid-column: 1; grid-row: 5; }
.gx-slot[data-slot="feet"]   { grid-column: 2; grid-row: 5; }
.gx-slot[data-slot="ring"]   { grid-column: 3; grid-row: 5; }
.gx-gear .gx-gear-note { margin-top: 16px; color: var(--gx-muted); font-size: 14px; text-align: center; }
.gx-gear-list { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 6px 18px; }
.gx-gear-list div { font-size: 13px; color: var(--gx-muted); display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--gx-line); padding: 4px 0; }
.gx-gear-list div span:last-child { color: var(--gx-ink); font-weight: 600; text-align: right; }

/* ---------- INVENTORY ------------------------------------------------------- */
.gx-inv {
  background: var(--gx-surface); border: 1px solid var(--gx-line);
  border-radius: var(--gx-radius); padding: 20px; box-shadow: var(--gx-shadow);
}
.gx-inv .gx-gear-title { text-align: center; }
.gx-inv-grid {
  display: grid; grid-template-columns: repeat(4, 60px); gap: 6px; justify-content: center;
}
.gx-inv-slot {
  position: relative; height: 56px; border: 1px solid var(--gx-line); border-radius: 6px;
  background: var(--gx-raised); display: flex; align-items: center; justify-content: center;
  padding: 3px; text-align: center; font-size: 9.5px; color: var(--gx-ink); line-height: 1.15;
  word-break: break-word; font-weight: 600;
}
.gx-inv-slot[data-empty="1"] { opacity: .25; }
.gx-inv-slot img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gx-inv-slot .gx-qty-badge {
  position: absolute; top: 2px; left: 3px; font-size: 9px; font-weight: 800;
  color: var(--gx-accent2); text-shadow: 0 1px 2px #000;
}

/* ---------- REQUIREMENTS ------------------------------------------------------ */
.gx-reqs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.gx-req {
  display: flex; align-items: center; gap: 12px; padding: 12px 15px;
  background: var(--gx-raised); border: 1px solid var(--gx-line); border-radius: var(--gx-radius);
}
.gx-req .gx-req-ic { font-size: 20px; flex-shrink: 0; }
.gx-req .gx-req-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--gx-muted); font-weight: 800; display: block; }
.gx-req .gx-req-value { font-size: 16px; font-weight: 750; color: var(--gx-ink); }
.gx-req[data-hard="1"] { border-color: color-mix(in srgb, var(--gx-bad) 45%, var(--gx-line)); }
.gx-req[data-hard="1"] .gx-req-value { color: var(--gx-bad); }

/* ---------- COMMANDS ---------------------------------------------------------- */
.gx-commands { display: grid; gap: 8px; }
.gx-command {
  display: flex; align-items: baseline; gap: 14px; padding: 11px 15px;
  background: var(--gx-raised); border: 1px solid var(--gx-line);
  border-left: 3px solid var(--gx-accent); border-radius: var(--gx-radius);
}
.gx-command .gx-cmd-key {
  font-family: ui-monospace, Consolas, monospace; font-weight: 700; color: var(--gx-accent);
  white-space: nowrap; font-size: 14px;
}
.gx-command .gx-cmd-desc { color: var(--gx-muted); font-size: 14px; }

/* ---------- RECIPE ------------------------------------------------------------- */
.gx-recipe {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  background: var(--gx-surface); border: 1px solid var(--gx-line);
  border-radius: var(--gx-radius); padding: 18px 20px; box-shadow: var(--gx-shadow);
}
.gx-recipe .gx-mats { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 200px; }
.gx-recipe .gx-mat {
  background: var(--gx-raised); border: 1px solid var(--gx-line); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--gx-ink);
}
.gx-recipe .gx-arrow { font-size: 22px; color: var(--gx-accent); font-weight: 900; }
.gx-recipe .gx-result {
  background: color-mix(in srgb, var(--gx-accent2) 16%, var(--gx-raised));
  border: 1px solid color-mix(in srgb, var(--gx-accent2) 40%, var(--gx-line));
  border-radius: 999px; padding: 7px 16px; font-size: 14px; font-weight: 750; color: var(--gx-accent2);
}

/* ---------- IMAGES ------------------------------------------------------------- */
.gx-figure { margin: 0; text-align: center; }
.gx-figure img {
  max-width: 100%; height: auto; border-radius: var(--gx-radius); display: inline-block;
}
.gx-figure[data-border="1"] img { border: 1px solid var(--gx-line); }
.gx-figure[data-shadow="1"] img { box-shadow: var(--gx-shadow); }
.gx-figure figcaption { color: var(--gx-muted); font-size: 13px; font-style: italic; margin-top: 10px; }
.gx-figure[data-align="left"]  { text-align: left; }
.gx-figure[data-align="right"] { text-align: right; }

.gx-gallery { display: grid; gap: 12px; }
.gx-gallery figure { margin: 0; }
.gx-gallery img {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  border-radius: var(--gx-radius); border: 1px solid var(--gx-line);
}
.gx-gallery figcaption { color: var(--gx-muted); font-size: 12.5px; margin-top: 6px; text-align: center; }

.gx-video {
  position: relative; width: 100%; aspect-ratio: 16/9;
  border-radius: var(--gx-radius); overflow: hidden; border: 1px solid var(--gx-line);
  background: #000; box-shadow: var(--gx-shadow);
}
.gx-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- CODE ---------------------------------------------------------------- */
.gx-code {
  background: color-mix(in srgb, #000 30%, var(--gx-surface));
  border: 1px solid var(--gx-line); border-radius: var(--gx-radius);
  overflow: hidden; box-shadow: var(--gx-shadow);
}
.gx-code .gx-code-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; border-bottom: 1px solid var(--gx-line);
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gx-muted); font-weight: 800;
  background: color-mix(in srgb, var(--gx-accent) 8%, transparent);
}
.gx-code pre {
  margin: 0; padding: 16px 18px; overflow-x: auto;
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 13px; line-height: 1.65; color: var(--gx-ink);
}
.gx-code pre code { background: none; color: inherit; padding: 0; font-size: inherit; }

/* ---------- QUOTE ----------------------------------------------------------------- */
.gx-quote {
  margin: 0; padding: 20px 24px; border-left: 3px solid var(--gx-accent);
  background: color-mix(in srgb, var(--gx-accent) 7%, transparent);
  border-radius: 0 var(--gx-radius) var(--gx-radius) 0;
  font-style: italic; font-size: 16.5px; color: var(--gx-ink);
}
.gx-quote cite {
  display: block; margin-top: 10px; font-style: normal; font-size: 12.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--gx-muted); font-weight: 700;
}

/* ---------- TABS ------------------------------------------------------------------ */
.gx-tabs { border: 1px solid var(--gx-line); border-radius: var(--gx-radius); overflow: hidden; background: var(--gx-surface); }
.gx-tabs .gx-tabbar { display: flex; flex-wrap: wrap; gap: 2px; background: color-mix(in srgb, #000 18%, var(--gx-surface)); padding: 6px; }
.gx-tabs .gx-tabbtn {
  border: 0; background: transparent; color: var(--gx-muted); cursor: pointer;
  padding: 9px 16px; border-radius: 8px; font-size: 13.5px; font-weight: 700;
  font-family: inherit; transition: all .15s;
}
.gx-tabs .gx-tabbtn:hover { color: var(--gx-ink); }
.gx-tabs .gx-tabbtn[aria-selected="true"] {
  background: color-mix(in srgb, var(--gx-accent) 20%, transparent); color: var(--gx-accent);
}
.gx-tabs .gx-tabpanel { padding: 20px 22px; color: var(--gx-muted); }
.gx-tabs .gx-tabpanel[hidden] { display: none; }

/* ---------- ACCORDION -------------------------------------------------------------- */
.gx-accordion { display: grid; gap: 8px; }
.gx-accordion details {
  background: var(--gx-raised); border: 1px solid var(--gx-line);
  border-radius: var(--gx-radius); overflow: hidden;
}
.gx-accordion summary {
  cursor: pointer; padding: 14px 18px; font-weight: 700; color: var(--gx-ink);
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.gx-accordion summary::-webkit-details-marker { display: none; }
.gx-accordion summary::after {
  content: "+"; color: var(--gx-accent); font-size: 20px; font-weight: 800; line-height: 1;
}
.gx-accordion details[open] summary::after { content: "\2212"; }
.gx-accordion details[open] summary { border-bottom: 1px solid var(--gx-line); color: var(--gx-accent); }
.gx-accordion .gx-acc-body { padding: 16px 18px; color: var(--gx-muted); font-size: 14.5px; }

/* ---------- COLUMNS ----------------------------------------------------------------- */
.gx-columns { display: grid; gap: 20px; }
.gx-columns .gx-col h4 {
  margin: 0 0 10px; font-size: 15px; color: var(--gx-accent); font-weight: 750;
}
.gx-columns .gx-col-body { color: var(--gx-muted); font-size: 14.5px; }

/* ---------- CTA / BUTTON --------------------------------------------------------------- */
.gx-cta-wrap { text-align: center; }
.gx-cta-wrap[data-align="left"] { text-align: left; }
.gx-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 999px; font-weight: 750; font-size: 15px;
  text-decoration: none !important; transition: transform .15s, box-shadow .15s;
  background: linear-gradient(135deg, var(--gx-accent), color-mix(in srgb, var(--gx-accent) 55%, #000));
  color: #fff; box-shadow: 0 8px 24px color-mix(in srgb, var(--gx-accent) 30%, transparent);
}
.gx-cta:hover { transform: translateY(-2px); }
.gx-cta[data-style="outline"] {
  background: transparent; color: var(--gx-accent);
  border: 1px solid color-mix(in srgb, var(--gx-accent) 50%, var(--gx-line)); box-shadow: none;
}
.gx-cta[data-style="gold"] {
  background: linear-gradient(135deg, var(--gx-accent2), color-mix(in srgb, var(--gx-accent2) 50%, #000));
  box-shadow: 0 8px 24px color-mix(in srgb, var(--gx-accent2) 30%, transparent);
}

/* ---------- DIVIDER ---------------------------------------------------------------------- */
.gx-divider { border: 0; height: 1px; background: var(--gx-line); margin: 34px 0; }
.gx-divider[data-style="ornament"] {
  height: auto; background: none; text-align: center; overflow: visible;
}
.gx-divider[data-style="ornament"]::before {
  content: "\2756"; color: var(--gx-accent); font-size: 15px; letter-spacing: 14px;
}
.gx-divider[data-style="fade"] {
  background: linear-gradient(90deg, transparent, var(--gx-accent), transparent);
}
.gx-divider[data-style="space"] { background: none; }

/* ---------- TABLE OF CONTENTS ------------------------------------------------------------- */
.gx-toc {
  background: var(--gx-surface); border: 1px solid var(--gx-line);
  border-left: 3px solid var(--gx-accent);
  border-radius: var(--gx-radius); padding: 20px 24px; box-shadow: var(--gx-shadow);
}
.gx-toc .gx-toc-title {
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gx-accent); font-weight: 800; margin: 0 0 12px;
}
.gx-toc ol { margin: 0; padding-left: 20px; }
.gx-toc li { margin: 6px 0; color: var(--gx-muted); }
.gx-toc a { color: var(--gx-muted); }
.gx-toc a:hover { color: var(--gx-accent); }

/* ---------- PROGRESS BAR (reading) ---------------------------------------------------------- */
.gx-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--gx-accent), var(--gx-accent2));
  z-index: 3000; transition: width .1s linear;
}

/* ---------- SPACER ---------------------------------------------------------------------------- */
.gx-spacer { display: block; }

/* ---------- Responsive --------------------------------------------------------------------------- */
@media (max-width: 780px) {
  .gx-slab { grid-template-columns: 1fr !important; }
  .gx-slab > div { border-right: none; border-bottom: 1px solid var(--gx-line); }
  .gx-slab > div:last-child { border-bottom: none; }
  .gx-cards, .gx-columns, .gx-gallery { grid-template-columns: 1fr !important; }
  .gx-rung { grid-template-columns: 62px 1fr; gap: 14px; padding: 16px; }
  .gx-rung .gx-numeral { font-size: 34px; }
  .gx-boss .gx-boss-head { flex-direction: column; text-align: center; }
  .gx-hero { padding-left: 18px; padding-right: 18px; }
}

/* ---------- Print ------------------------------------------------------------------------------- */
@media print {
  .gx-progress, .gx-toc { display: none; }
  .gx-guide { color: #000; }
}
