/* Dead MMO website: near-black dark fantasy, matching the game UI (client/ui_theme.gd: gold #edcc85, text #e0dbd1, dim #99948c;
   Cinzel headings, Source Sans 3 body). No inline styles anywhere (the CSP has no 'unsafe-inline'). */

@font-face { font-family: "Cinzel"; src: url("fonts/Cinzel.ttf") format("truetype");
  font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/SourceSans3-Regular.woff2") format("woff2"),
  url("fonts/SourceSans3-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/SourceSans3-Semibold.woff2") format("woff2"),
  url("fonts/SourceSans3-Semibold.ttf") format("truetype"); font-weight: 600 700; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #08080b;            /* near-black page */
  --bg-2: #0e0e12;
  --black: #040406;         /* header and footer */
  --panel: #121216;         /* charcoal panels */
  --panel-2: #18181d;
  --line: #26262d;
  --line-2: #3a3a44;
  --text: #e0dbd1;          /* 14.5:1 on --bg, 12.8:1 on --panel-2 */
  --dim: #a8a196;           /* 7.8:1 on --bg, 6.9:1 on --panel-2 */
  --gold: #edcc85;
  --gold-2: #c9a45c;
  --ember: #e0703a;         /* accents only: 6.2:1 on --bg, 5.5:1 on --panel-2 */
  --blood: #8e2a22;         /* borders and rules only (not text) */
  --focus: #ffd98a;
  --warden: #e2694f;
  --shadeblade: #b39ddb;
  --wildstalker: #85c96e;
  --lightbinder: #ecd596;
  --mage: #8fb0ff;
  --t0: #a8a8a8; --t1: #4fd35a; --t2: #5c9dff; --t3: #c07bff; --t4: #ffc23d;
  --radius: 6px;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  background-image: radial-gradient(ellipse at 50% -10%, rgba(224, 112, 58, 0.06), transparent 55%),
    radial-gradient(ellipse at 100% 40%, rgba(142, 42, 34, 0.07), transparent 50%);
  background-attachment: fixed;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; padding-top: 28px; }
.lead { font-size: 1.15rem; max-width: 60em; }
img { max-width: 100%; height: auto; }
a { color: var(--gold); text-decoration-color: rgba(237, 204, 133, 0.4); text-underline-offset: 3px; }
a:hover { color: #fff1cc; text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

h1, h2, h3, h4 { font-family: "Cinzel", Georgia, serif; color: var(--gold); line-height: 1.2; font-weight: 700;
  letter-spacing: 0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 0.4em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 2em 0 0.6em; }
h3 { font-size: 1.2rem; margin: 1.6em 0 0.5em; }
p { margin: 0 0 1em; }
.dim { color: var(--dim); }
.small { font-size: 0.9rem; }

.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: #000; padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* header / nav */
.site-header { border-bottom: 1px solid var(--line); background: rgba(4, 4, 6, 0.94); position: sticky; top: 0; z-index: 5;
  backdrop-filter: blur(6px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px;
  flex-wrap: wrap; }
.brand { font-family: "Cinzel", serif; font-weight: 800; font-size: 1.25rem; color: var(--gold); text-decoration: none;
  letter-spacing: 0.08em; display: flex; align-items: center; gap: 10px; }
.brand img { width: 28px; height: 28px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.nav a { display: block; padding: 8px 12px; color: var(--text); text-decoration: none; font-family: "Cinzel", serif;
  font-weight: 600; font-size: 0.95rem; border-radius: var(--radius); }
.nav a:hover { background: var(--panel-2); color: var(--gold); }
.nav a[aria-current="page"] { color: var(--gold); box-shadow: inset 0 -2px 0 var(--ember); }

.site-footer { border-top: 1px solid var(--line); background: var(--black); margin-top: 64px; padding: 24px 0 32px; color: var(--dim); font-size: 0.9rem; }
.site-footer p { margin: 0.3em 0; }

/* hero */
.hero { padding: 28px 0 40px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; align-items: center; }
.hero .tag { font-family: "Cinzel", serif; color: var(--ember); letter-spacing: 0.25em; text-transform: uppercase;
  font-size: 0.85rem; font-weight: 700; }
.hero p.lead { font-size: 1.2rem; color: var(--text); max-width: 38em; }
.hero-art { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; align-items: center; }
.hero-art .portrait:nth-child(odd) { transform: translateY(-18px); }

/* A class render in a frame: the tier sheets have plain, slightly different backdrops, so each sits in a portrait
   frame with a dark inner vignette and the class colour underneath. */
.portrait { display: block; position: relative; border: 1px solid var(--line-2); border-bottom: 3px solid var(--cls, var(--gold-2));
  border-radius: var(--radius); overflow: hidden; background: #0a0a0d; aspect-ratio: 3 / 4;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55); }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.portrait::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(4, 4, 6, 0.8) 100%),
    linear-gradient(180deg, transparent 70%, rgba(4, 4, 6, 0.6)); }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.facts li { background: var(--panel); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; font-size: 0.95rem; }
.facts b { color: var(--gold); }

.callout { border: 1px solid var(--line-2); border-left: 4px solid var(--blood); background: var(--panel);
  padding: 16px 20px; border-radius: var(--radius); margin: 24px 0; }
.callout h2, .callout h3 { margin-top: 0; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-5 { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

.card { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; position: relative; }
a.card { display: block; color: var(--text); text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
a.card:hover { border-color: var(--gold-2); transform: translateY(-2px); }
.card h3 { margin: 0 0 0.3em; }
.card p:last-child { margin-bottom: 0; }

.class-card { border-top: 3px solid var(--cls, var(--gold)); text-align: center; padding-top: 12px; }
.class-card .portrait { margin: 0 auto 10px; max-width: 200px; }
.class-card h3 { color: var(--cls); }
.class-card .role { color: var(--dim); font-size: 0.95rem; }

.cls-warden { --cls: var(--warden); }
.cls-shadeblade { --cls: var(--shadeblade); }
.cls-wildstalker { --cls: var(--wildstalker); }
.cls-lightbinder { --cls: var(--lightbinder); }
.cls-mage { --cls: var(--mage); }
.cls-name { color: var(--cls); font-weight: 600; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  margin: 0 0 1.5em; }
table { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
caption { text-align: left; padding: 10px 14px; color: var(--dim); font-size: 0.9rem; caption-side: bottom; }
th, td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { font-family: "Cinzel", serif; color: var(--gold); font-weight: 700; font-size: 0.9rem; background: var(--panel-2);
  white-space: nowrap; position: sticky; top: 0; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody tr:hover { background: rgba(237, 204, 133, 0.04); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.nowrap { white-space: nowrap; }
.kv th { width: 34%; color: var(--dim); font-weight: 600; font-family: inherit; }

/* skills */
.skill { display: flex; gap: 10px; align-items: flex-start; min-width: 180px; }
.skill img, .icon { width: 40px; height: 40px; border-radius: 4px; border: 1px solid var(--line-2); flex: none;
  background: #000; }
.skill b { color: var(--text); display: block; }
.badge { display: inline-block; font-size: 0.75rem; line-height: 1; padding: 3px 6px; border-radius: 3px; margin: 3px 4px 0 0;
  border: 1px solid var(--line-2); color: var(--dim); white-space: nowrap; font-weight: 600; }
.badge.ult { color: #1a1206; background: var(--gold); border-color: var(--gold); }
.badge.off { color: var(--wildstalker); border-color: rgba(133, 201, 110, 0.5); }
.badge.free { color: var(--mage); border-color: rgba(143, 176, 255, 0.5); }
.scaling { color: var(--dim); font-size: 0.88rem; display: block; margin-top: 4px; }
.lvl { font-family: "Cinzel", serif; font-weight: 700; color: var(--gold); font-size: 1.1rem; }

/* talents */
.tree { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.branch { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.branch h3 { margin: 0 0 10px; text-align: center; color: var(--cls, var(--gold)); }
.tier { border-top: 1px dashed var(--line); padding: 8px 0 4px; }
.tier-label { font-size: 0.78rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 6px; }
.node { display: flex; gap: 10px; margin-bottom: 8px; }
.node b { display: block; }
.node .ranks { color: var(--gold-2); font-size: 0.85rem; }
.node p { margin: 0; font-size: 0.93rem; color: var(--dim); }

/* class page */
.class-head { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; margin-top: 8px; }
.class-head figure { margin: 0; background: radial-gradient(ellipse at 50% 70%, rgba(255, 255, 255, 0.07), transparent 65%),
  var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--cls); border-radius: var(--radius); padding: 12px;
  text-align: center; }
.class-head figure .portrait { max-width: 300px; margin: 0 auto; }
.class-head h1 { color: var(--cls); margin-bottom: 0.1em; }
.subtitle { font-family: "Cinzel", serif; color: var(--dim); font-size: 1.1rem; margin-bottom: 1em; }
figcaption { color: var(--dim); font-size: 0.85rem; margin-top: 6px; }
.gallery { margin: 0; }
.gallery img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; margin: 16px 0; }
.toc a { display: inline-block; padding: 4px 12px; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none;
  font-size: 0.92rem; }
.breadcrumb { font-size: 0.9rem; color: var(--dim); margin: 0 0 8px; }
.breadcrumb a { color: var(--dim); }

.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px;
  border: 1px solid rgba(255, 255, 255, 0.25); }
.t0 { color: var(--t0); } .t1 { color: var(--t1); } .t2 { color: var(--t2); } .t3 { color: var(--t3); } .t4 { color: var(--t4); }
.bg-t0 { background: var(--t0); } .bg-t1 { background: var(--t1); } .bg-t2 { background: var(--t2); } .bg-t3 { background: var(--t3); }
.bg-t4 { background: var(--t4); }
.g0 { color: #a0a0a0; } .g1 { color: var(--text); } .g2 { color: #f2f2f2; } .g3 { color: #e8a33d; } .g4 { color: #ffd24a; }
.q-weak { color: #9a9a9a; } .q-solid { color: #d8d2c4; } .q-strong { color: var(--t2); } .q-perfect { color: #ffd24a; }

/* leaderboard */
.board-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.board-head h1, .board-head h2 { margin-bottom: 0.2em; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.tab { font: 600 0.95rem "Cinzel", serif; color: var(--text); background: var(--panel); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 7px 14px 7px 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; }
.tab img { width: 24px; height: 24px; border-radius: 50%; }
.tab[data-class=""] { padding-left: 14px; }
.tab:hover { border-color: var(--cls, var(--gold)); }
.tab[aria-selected="true"] { background: var(--panel-2); border-color: var(--cls, var(--gold)); color: var(--cls, var(--gold));
  box-shadow: inset 0 0 0 1px var(--cls, var(--gold)); }
.board td, .board th { vertical-align: middle; }
.board .rank { width: 64px; text-align: center; font-family: "Cinzel", serif; font-weight: 700; color: var(--dim); }
.board .who { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.board .who img { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--cls); }
.board .level { font-family: "Cinzel", serif; font-weight: 800; font-size: 1.15rem; color: var(--gold); text-align: right; }
.board tr.top1 .rank { color: #ffd24a; } .board tr.top2 .rank { color: #d6dbe3; } .board tr.top3 .rank { color: #d7955b; }
.board tr.top1 .rank::before, .board tr.top2 .rank::before, .board tr.top3 .rank::before { content: "\2726  "; }
.board .zone { color: var(--dim); }
.board-state { padding: 28px 16px; text-align: center; color: var(--dim); }
.board-state b { color: var(--text); display: block; font-family: "Cinzel", serif; font-size: 1.1rem; margin-bottom: 4px; }
.status-line { color: var(--dim); font-size: 0.88rem; min-height: 1.4em; }
.status-line .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #5a5a5a; margin-right: 6px; }
.status-line.live .dot { background: #4fd35a; }
.status-line.offline .dot { background: var(--ember); }
.btn { font: 600 0.95rem "Source Sans 3", sans-serif; color: #1a1206; background: var(--gold); border: 0; border-radius: var(--radius);
  padding: 8px 16px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { background: #fff1cc; color: #1a1206; }
.btn.ghost { background: transparent; color: var(--gold); border: 1px solid var(--line-2); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hide-sm { }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 36px; }
  .hero-art { min-height: 0; }
  .class-head { grid-template-columns: 1fr; }
  .class-head figure .portrait { max-width: 240px; }
  .tree { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hide-sm { display: none; }
  .nav a { padding: 6px 8px; font-size: 0.9rem; }
  th, td { padding: 8px 8px; }
  .board .who img { width: 26px; height: 26px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
