/* Ravenhold — site stylesheet
   Layout: dark charcoal ground (matches the logo plate), royal-blue plaques with bronze rims for
   anything "official" (status, cards), gold display type for headings, parchment body text. */
:root {
  --bg: #141414;            /* logo background */
  --bg-2: #1b1a17;          /* raised panels */
  --bg-3: #23211c;          /* inputs, table rows */
  --plaque: #182a66;        /* royal blue from the logo plate */
  --plaque-2: #10204f;
  --rim: #8c6a2e;           /* bronze frame */
  --rim-2: #5d4520;
  --gold: #e8b63d;          /* lettering gold */
  --gold-2: #b98a2b;
  --ink: #e9dcc3;           /* parchment text */
  --muted: #a69c87;
  --line: #2e2a23;
  --ok: #6fbf5a;
  --warn: #e0a33a;
  --bad: #d9534f;
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --body: "Alegreya", Georgia, "Times New Roman", serif;
  --ui: "Alegreya Sans", "Gill Sans", "Segoe UI", sans-serif;
  --maxw: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(28, 46, 112, .35), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.47 0 0 0 0 0.33 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-attachment: fixed, scroll;
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10;
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration-color: color-mix(in srgb, var(--gold) 40%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

h1, h2, h3, h4 { font-family: var(--display); color: var(--gold); line-height: 1.15; text-wrap: balance; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: .01em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 .9em; max-width: 72ch; }
.lead { font-size: 1.2rem; color: var(--ink); max-width: 60ch; }
.muted { color: var(--muted); }
.eyebrow { font-family: var(--ui); text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; color: #9b7a35; margin-bottom: .35rem; }
code, kbd, pre { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .92em; }
code { background: var(--bg-3); border: 1px solid var(--line); border-radius: 4px; padding: .1em .4em; }
pre { background: var(--bg-3); border: 1px solid var(--line); border-radius: 6px; padding: .9rem 1rem; overflow-x: auto; margin: 0; }
pre code { background: none; border: 0; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.wrap {
  max-width: var(--maxw); margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- top strip ---------- */
.topstrip { background: #0d0c0b; border-bottom: 1px solid #2a2419; font-family: var(--ui); font-size: .86rem; color: var(--muted); }
.topstrip .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 32px; flex-wrap: wrap; padding-block: .2rem; }
.topstrip-status { font-variant-numeric: tabular-nums; }
.topstrip-status .sep { opacity: .5; margin: 0 .1rem; }
.topstrip-status [data-s="realm"] { color: var(--ink); }
.topstrip-links { display: flex; gap: 1.2rem; }
.topstrip-links a { color: var(--muted); text-decoration: none; }
.topstrip-links a:hover { color: var(--gold); }

/* ---------- masthead ---------- */
.masthead {
  text-align: center;
  padding-block: clamp(1.2rem, 3vw, 2.2rem) clamp(.6rem, 1.5vw, 1.2rem);
  background:
    radial-gradient(ellipse 50% 70% at 50% 60%, rgba(30, 52, 128, .5), transparent 70%),
    radial-gradient(ellipse 30% 30% at 50% 60%, rgba(232, 182, 61, .12), transparent 70%);
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.masthead-logo { display: inline-block; }
.masthead-logo img { width: min(360px, 80vw); height: auto; filter: drop-shadow(0 10px 22px rgba(0,0,0,.65)); transition: transform .2s ease; }
.masthead-logo:hover img { transform: translateY(-1px); }
body[data-page="home"] .masthead-logo img { width: min(680px, 92vw); }
body[data-page="home"] .masthead { padding-top: clamp(1.5rem, 4vw, 3rem); }

/* ---------- carved nav bar ---------- */
.navbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: linear-gradient(180deg, #3a2e1c 0%, #241c11 18%, #1a1510 50%, #211a12 85%, #0f0c08 100%);
  border-top: 1px solid #6b5230; border-bottom: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, .18), inset 0 -2px 0 #3b2d19, 0 6px 18px rgba(0,0,0,.6);
}
.navbar::before, .navbar::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-2) 20%, var(--gold) 50%, var(--gold-2) 80%, transparent); opacity: .7; }
.navbar::before { top: 2px; } .navbar::after { bottom: 2px; opacity: .35; }
.navbar-inner { max-width: var(--maxw); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.nav { display: flex; justify-content: center; align-items: stretch; margin: 0; }
.nav a {
  position: relative; display: flex; align-items: center; padding: .85rem 1.25rem;
  font-family: var(--display); font-weight: 700; font-size: .84rem; letter-spacing: .12em; text-transform: uppercase;
  color: #d9c79a; text-decoration: none; text-shadow: 0 1px 0 #000, 0 0 1px rgba(0,0,0,.6);
}
.nav a + a::before { content: "◆"; position: absolute; left: -.42em; top: 50%; transform: translateY(-50%); font-size: .55rem; color: #6b5230; text-shadow: none; }
.nav a:hover { color: var(--gold); text-shadow: 0 1px 0 #000, 0 0 14px rgba(232, 182, 61, .45); }
.nav a[aria-current="page"] { color: var(--gold); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: 4px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); box-shadow: 0 0 10px rgba(232, 182, 61, .6);
}
.nav .nav-download { color: var(--gold); }
.nav .nav-download::after { content: none; }
.nav .nav-download[aria-current="page"]::after { content: ""; }
.nav .nav-account { display: none; }
.nav-toggle { display: none; width: 100%; background: none; border: 0; color: var(--gold); font-family: var(--display); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: .85rem; cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { display: none; flex-direction: column; align-items: stretch; padding-bottom: .4rem; }
  .nav.open { display: flex; }
  .nav a { justify-content: center; padding: .7rem; }
  .nav a + a::before { content: none; }
  .nav a[aria-current="page"]::after { left: 30%; right: 30%; }
  .nav .nav-account { display: flex; color: var(--muted); font-size: .78rem; }
  .topstrip-links { display: none; }
}
.site-header { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--ui); font-weight: 700; font-size: 1rem; letter-spacing: .02em;
  padding: .65rem 1.2rem; border-radius: 4px; text-decoration: none; cursor: pointer;
  border: 1px solid var(--rim); color: var(--ink); background: var(--bg-3);
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { border-color: var(--gold-2); background: #2a2720; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: linear-gradient(180deg, #f3c859 0%, #d9a537 45%, #b4832a 55%, #d2a03a 100%); color: #241a05; border-color: #5a3f12; text-shadow: 0 1px 0 rgba(255,255,255,.3); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -1px 0 rgba(0,0,0,.3), 0 2px 6px rgba(0,0,0,.5); }
.btn-gold:hover { background: linear-gradient(180deg, #f6cf63, #d39f31); border-color: #8a6420; }
.btn-blue { background: linear-gradient(180deg, #2a4597 0%, #1d337a 45%, #142457 55%, #1a2e6c 100%); border-color: var(--rim-2); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.15), inset 0 -1px 0 rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.5); }
.btn-blue:hover { background: linear-gradient(180deg, #284398, #172a63); }
.btn-sm { padding: .4rem .8rem; font-size: .9rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(1.2rem, 3vw, 2.2rem) clamp(1.5rem, 4vw, 3rem); text-align: center; }
.hero .logo { width: min(720px, 92%); margin: 0 auto 1.2rem; filter: drop-shadow(0 12px 28px rgba(0,0,0,.6)); }
.hero h1 { margin: 0 auto .4rem; }
.hero .lead { margin: 0 auto 1.6rem; }
.hero .cta { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.hero-bg {
  position: relative;
  background: linear-gradient(180deg, rgba(0,0,0,.25), transparent 40%);
}
.hero-bg::after { content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(560px, 80%); height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-2) 30%, var(--gold) 50%, var(--gold-2) 70%, transparent); }
.hero h1 { text-shadow: 0 2px 0 #3b2c12, 0 6px 24px rgba(0,0,0,.7); }

/* ---------- plaque (status / notices) ---------- */
.plaque {
  background: linear-gradient(180deg, var(--plaque), var(--plaque-2));
  border: 2px solid var(--rim);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.55), inset 0 0 0 3px var(--rim-2), inset 0 0 0 4px rgba(0,0,0,.4), inset 0 0 60px rgba(0,0,0,.35), 0 10px 24px rgba(0,0,0,.45);
  border-radius: 4px;
  padding: 1rem 1.4rem;
  position: relative;
}
.plaque::before, .plaque::after { content: ""; position: absolute; top: 50%; width: 12px; height: 12px; transform: translateY(-50%) rotate(45deg); background: linear-gradient(135deg, #f0c552, #8a6420); box-shadow: 0 0 0 2px #2b1f0c; }
.plaque::before { left: -8px; } .plaque::after { right: -8px; }
.status { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem 1.5rem; align-items: center; }
.status .k { font-family: var(--ui); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; color: #c9b887; }
.status .v { font-family: var(--display); font-size: 1.45rem; color: var(--gold); font-variant-numeric: tabular-nums; line-height: 1.2; }
.status .v small { font-family: var(--ui); font-size: .8rem; color: #d7cba9; display: block; font-weight: 400; letter-spacing: 0; }
.dot { display: inline-block; width: .7em; height: .7em; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); vertical-align: -.02em; margin-right: .35em; }
.dot.off { background: var(--bad); box-shadow: 0 0 10px var(--bad); }
.chip { display: inline-block; font-family: var(--ui); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: .15rem .5rem; border-radius: 999px; border: 1px solid var(--rim-2); color: var(--muted); vertical-align: middle; }
.chip.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.chip.gold { color: var(--gold); border-color: var(--gold-2); }
.chip.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, transparent); }

/* ---------- sections ---------- */
.section { padding-block: clamp(2rem, 5vw, 3.5rem); }
.section + .section { border-top: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255,255,255,.03); }
.section-head { margin-bottom: 1.6rem; }
.section-head h2, .page-head h1 { position: relative; padding-bottom: .55rem; }
.section-head h2::after, .page-head h1::after {
  content: ""; display: block; height: 7px; width: min(260px, 100%); margin-top: .5rem;
  background:
    linear-gradient(90deg, var(--gold-2), var(--gold-2)) 0 3px / 100% 1px no-repeat,
    radial-gradient(circle at 50% 50%, var(--gold) 0 2px, transparent 2.5px) 50% 50% / 100% 100% no-repeat;
}
.section-head h2::after { background:
    linear-gradient(90deg, var(--gold-2) 0 42%, transparent 42% 58%, var(--gold-2) 58%) 0 3px / 100% 1px no-repeat,
    conic-gradient(from 45deg, var(--gold) 0 25%, transparent 0 50%, var(--gold) 0 75%, transparent 0) 50% 0 / 7px 7px no-repeat; }
.page-head h1::after { background:
    linear-gradient(90deg, var(--gold-2) 0 42%, transparent 42% 58%, var(--gold-2) 58%) 0 3px / 100% 1px no-repeat,
    conic-gradient(from 45deg, var(--gold) 0 25%, transparent 0 50%, var(--gold) 0 75%, transparent 0) 50% 0 / 7px 7px no-repeat; }
.grid { display: grid; gap: 1.2rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: linear-gradient(180deg, #1e1c18, #171613); border: 1px solid #3a3226; border-radius: 3px; padding: 1.3rem 1.3rem 1.1rem; min-width: 0; position: relative;
  box-shadow: inset 0 0 0 1px #0d0c0a, inset 0 0 0 2px #4a3d28, inset 0 0 40px rgba(0,0,0,.35), 0 6px 18px rgba(0,0,0,.4); }
.card::before, .card::after { content: ""; position: absolute; width: 10px; height: 10px; border: 2px solid var(--gold-2); pointer-events: none; }
.card::before { top: 5px; left: 5px; border-right: 0; border-bottom: 0; }
.card::after { bottom: 5px; right: 5px; border-left: 0; border-top: 0; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card .icon { font-family: var(--display); color: var(--gold-2); font-size: 1.6rem; line-height: 1; margin-bottom: .6rem; }
.feature { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; }
.feature:nth-of-type(even) .feature-media { order: -1; }
.feature-media { min-width: 0; }
@media (max-width: 760px) { .feature { grid-template-columns: 1fr; } .feature:nth-of-type(even) .feature-media { order: 0; } }
.frame {
  background: linear-gradient(180deg, var(--plaque), var(--plaque-2)); border: 2px solid var(--rim);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.55), inset 0 0 0 3px var(--rim-2), inset 0 0 50px rgba(0,0,0,.35), 0 8px 20px rgba(0,0,0,.45); border-radius: 4px; padding: 1rem 1.2rem; font-family: var(--ui); color: #d7cba9;
}
.frame .t { color: var(--gold); font-family: var(--display); font-size: 1rem; margin-bottom: .5rem; }
.frame ul { margin: 0; padding-left: 1.1rem; }
.frame li { margin: .2rem 0; }
.frame .row { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.frame .row:last-child { border-bottom: 0; }
.frame .row b { color: var(--gold); font-weight: 600; }

/* lists */
ul.checks { list-style: none; padding: 0; margin: 0 0 1rem; }
ul.checks li { padding-left: 1.5rem; position: relative; margin: .35rem 0; }
ul.checks li::before { content: "◆"; color: var(--gold-2); position: absolute; left: 0; top: .1em; font-size: .8em; }

/* steps */
.steps { counter-reset: step; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step { background: linear-gradient(180deg, #1e1c18, #171613); border: 1px solid #3a3226; border-radius: 3px; padding: 1.2rem 1.2rem 1.2rem 4.2rem; position: relative; min-width: 0; box-shadow: inset 0 0 0 1px #0d0c0a, inset 0 0 0 2px #4a3d28, 0 6px 18px rgba(0,0,0,.4); }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 1rem; top: 1.1rem; width: 2.3rem; height: 2.3rem; display: grid; place-items: center;
  font-family: var(--display); font-weight: 900; color: #241a05; font-size: 1.1rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f6d26a, #c9962e 55%, #8a6420); box-shadow: 0 0 0 2px #3b2c12, 0 0 0 3px var(--gold-2), 0 3px 8px rgba(0,0,0,.6); }
.step h3 { font-size: 1.1rem; }
.copy { display: flex; gap: .5rem; align-items: stretch; margin-top: .6rem; }
.copy pre { flex: 1; min-width: 0; display: flex; align-items: center; }
.copy button { white-space: nowrap; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
table { width: 100%; border-collapse: collapse; font-family: var(--ui); font-size: .98rem; }
th, td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-2); background: var(--bg-2); }
tbody tr:nth-child(even) { background: color-mix(in srgb, var(--bg-2) 60%, transparent); }
td.num { font-variant-numeric: tabular-nums; text-align: right; }
th.num { text-align: right; }

/* timeline */
.timeline { display: grid; gap: 1.2rem; }
.phase { display: grid; grid-template-columns: 170px 1fr; gap: 1rem; }
.phase .when { font-family: var(--display); color: var(--gold); font-size: 1.1rem; }
.phase .when .chip { display: block; width: max-content; margin-top: .4rem; }
@media (max-width: 640px) { .phase { grid-template-columns: 1fr; } }

/* changelog */
.log { display: grid; gap: 1.2rem; }
.entry { display: grid; grid-template-columns: 130px 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.entry time { font-family: var(--ui); color: var(--muted); font-variant-numeric: tabular-nums; }
.entry h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.entry ul { margin: 0; padding-left: 1.1rem; }
.entry li { margin: .2rem 0; }
@media (max-width: 640px) { .entry { grid-template-columns: 1fr; gap: .2rem; } }
.tag { font-family: var(--ui); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; padding: .1rem .45rem; border-radius: 3px; background: var(--bg-3); border: 1px solid var(--line); color: var(--muted); margin-left: .4rem; vertical-align: middle; }
.tag.new { color: var(--ok); } .tag.fix { color: var(--warn); } .tag.change { color: #8db4ff; }

/* forms */
.form { max-width: 460px; }
.field { display: grid; gap: .3rem; margin-bottom: 1rem; }
.field label { font-family: var(--ui); font-size: .95rem; color: var(--ink); }
.field .hint { font-family: var(--ui); font-size: .85rem; color: var(--muted); }
.field input[type="text"], .field input[type="email"], .field input[type="password"] {
  font: inherit; font-family: var(--ui); font-size: 1rem; color: var(--ink);
  background: var(--bg-3); border: 1px solid var(--rim-2); border-radius: 4px; padding: .6rem .7rem; width: 100%;
}
.field input:focus { border-color: var(--gold-2); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent); }
.field input[aria-invalid="true"] { border-color: var(--bad); }
.field .err { font-family: var(--ui); font-size: .85rem; color: var(--bad); min-height: 1.2em; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-family: var(--ui); font-size: .95rem; margin-bottom: 1.2rem; }
.check input { margin-top: .3rem; accent-color: var(--gold); }
.notice { border: 1px solid var(--rim-2); border-left: 4px solid var(--gold-2); background: var(--bg-2); padding: .8rem 1rem; border-radius: 4px; font-family: var(--ui); margin: 1rem 0; }
.notice.bad { border-left-color: var(--bad); }
.notice.ok { border-left-color: var(--ok); }
.notice:empty { display: none; }

/* auth layout */
.auth { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 820px) { .auth { grid-template-columns: 1fr; gap: 1.5rem; } }

/* account */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.2rem; font-family: var(--ui); }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.chars { display: grid; gap: .6rem; }
.char { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; align-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: .7rem .9rem; font-family: var(--ui); }
.char .name { font-family: var(--display); color: var(--gold); font-size: 1.05rem; }
.char .meta { color: var(--muted); font-size: .9rem; }

/* faq */
details { border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2); margin-bottom: .6rem; }
summary { cursor: pointer; padding: .8rem 1rem; font-family: var(--ui); font-weight: 700; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--gold-2); font-family: var(--display); }
details[open] summary::after { content: "–"; }
details .body { padding: 0 1rem 1rem; }
details .body p:last-child { margin: 0; }

/* overheard */
.overheard { display: grid; gap: .5rem; font-family: var(--ui); }
.overheard .line { display: grid; grid-template-columns: max-content 1fr; gap: .6rem; padding: .4rem .6rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px; font-size: .95rem; }
.overheard .who { color: var(--gold); font-weight: 700; }
.overheard .ch { color: var(--muted); }

/* footer */
.site-footer { border-top: 1px solid var(--rim-2); background: linear-gradient(180deg, #121110, #0e0d0c); margin-top: 3rem; padding-block: 2rem 2.5rem; font-family: var(--ui); color: var(--muted); font-size: .92rem; }
.site-footer .wrap { display: flex; gap: 1rem 2rem; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--gold); }

.page-head { padding-block: clamp(1.5rem, 4vw, 3rem) 0; }
.page-head h1 { margin-bottom: .3rem; }
.demo-note { font-family: var(--ui); font-size: .8rem; color: var(--muted); }
.demo-note:empty { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ====================================================================
   Two-column layout: main column + sidebar of widgets
   ==================================================================== */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.6rem; padding-block: 1.6rem 1rem; align-items: start; }
.main { min-width: 0; display: grid; gap: 1.4rem; align-content: start; }
.sidebar { min-width: 0; display: grid; gap: 1.2rem; }
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; } .sidebar { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }

/* ---------- panel: titled box, the unit of every page ---------- */
.panel { background: linear-gradient(180deg, #1c1a16, #161513); border: 1px solid #3a3226; box-shadow: inset 0 0 0 1px #0c0b09, 0 8px 22px rgba(0,0,0,.45); border-radius: 3px; min-width: 0; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin: 0; padding: .55rem 1rem .5rem 1.1rem;
  font-family: var(--display); font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold);
  background: linear-gradient(180deg, #3a2e1c, #221a10 60%, #1a140c);
  border-bottom: 1px solid #000; box-shadow: inset 0 1px 0 rgba(255, 220, 150, .15), inset 0 -1px 0 #4a3a22;
  text-shadow: 0 1px 0 #000;
}
.panel-head .sub { font-family: var(--ui); text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--muted); font-weight: 400; }
.panel-head .chip { margin-left: auto; }
.panel-body { padding: 1.1rem 1.2rem; }
.panel-body > :last-child { margin-bottom: 0; }
.panel-body h3 { font-size: 1.05rem; margin: 1rem 0 .35rem; color: var(--gold); }
.panel-body h3:first-child { margin-top: 0; }
.panel-body.tight { padding: 0; }
.panel .table-wrap { border: 0; border-radius: 0; }
.panel-foot { padding: .6rem 1.2rem; border-top: 1px solid var(--line); font-family: var(--ui); font-size: .9rem; color: var(--muted); }

/* welcome panel (home) */
.welcome { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(240px, .8fr); gap: 1.4rem; align-items: center; }
.welcome h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: .5rem; text-shadow: 0 2px 0 #3b2c12, 0 6px 20px rgba(0,0,0,.6); }
.welcome .cta { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1rem; }
@media (max-width: 700px) { .welcome { grid-template-columns: 1fr; } }

/* two columns inside a panel */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.cols-wide { grid-template-columns: minmax(0, 1.3fr) minmax(240px, .7fr); }
@media (max-width: 700px) { .cols, .cols-wide { grid-template-columns: 1fr; } }

/* definition-style feature list */
.deflist { margin: 0; display: grid; gap: .8rem; }
.deflist > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: .3rem 1rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.deflist > div:first-child { border-top: 0; padding-top: 0; }
.deflist dt { font-family: var(--display); color: var(--gold); font-size: .92rem; letter-spacing: .03em; }
.deflist dd { margin: 0; }
.deflist dd p { margin: 0 0 .4em; }
@media (max-width: 560px) { .deflist > div { grid-template-columns: 1fr; } }

/* role cards inside a panel: bordered columns, not floating cards */
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.roles > div { padding: 1rem 1.1rem; border-left: 1px solid var(--line); min-width: 0; }
.roles > div:first-child { border-left: 0; }
.roles h3 { margin-top: 0; }
@media (max-width: 760px) { .roles { grid-template-columns: 1fr; } .roles > div { border-left: 0; border-top: 1px solid var(--line); } .roles > div:first-child { border-top: 0; } }

/* sidebar widgets */
.widget { background: linear-gradient(180deg, #1c1a16, #161513); border: 1px solid #3a3226; box-shadow: inset 0 0 0 1px #0c0b09, 0 6px 18px rgba(0,0,0,.4); border-radius: 3px; min-width: 0; }
.widget-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0; padding: .5rem .9rem .45rem; font-family: var(--display); font-size: .88rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold);
  background: linear-gradient(180deg, #3a2e1c, #221a10 60%, #1a140c); border-bottom: 1px solid #000; box-shadow: inset 0 1px 0 rgba(255, 220, 150, .15), inset 0 -1px 0 #4a3a22; text-shadow: 0 1px 0 #000; }
.widget-head .more { font-family: var(--ui); font-size: .8rem; letter-spacing: 0; text-transform: none; color: var(--muted); text-decoration: none; }
.widget-head .more:hover { color: var(--gold); }
.widget-body { padding: .8rem .9rem; font-family: var(--ui); font-size: .95rem; }
.widget-body p { margin: 0 0 .7rem; }
.widget-play { background: linear-gradient(180deg, var(--plaque), var(--plaque-2)); border-color: var(--rim); box-shadow: inset 0 0 0 1px rgba(0,0,0,.5), inset 0 0 0 3px var(--rim-2), inset 0 0 40px rgba(0,0,0,.35), 0 8px 20px rgba(0,0,0,.45); }
.widget-play .widget-head { background: linear-gradient(180deg, #2a4597, #1a2d6c 60%, #142457); box-shadow: inset 0 1px 0 rgba(255,255,255,.15), inset 0 -1px 0 #0d1738; }
.widget-play .widget-body { color: #d7cba9; }
.stat-row { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.stat-row:last-of-type { border-bottom: 0; }
.stat-row span:first-child { color: var(--muted); }
.stat-row b { color: var(--ink); font-weight: 700; }
.stat-row.small { font-size: .82rem; color: var(--muted); padding-top: 0; margin-top: -.3rem; justify-content: flex-end; }
.btn-block { display: flex; width: 100%; margin-bottom: .5rem; }
.btn-block:last-child { margin-bottom: 0; }
.minilist { list-style: none; margin: 0; padding: 0; }
.minilist li { display: grid; grid-template-columns: 3.2rem 1fr; gap: .5rem; padding: .3rem 0; border-bottom: 1px solid var(--line); }
.minilist li:last-child { border-bottom: 0; }
.minilist time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .85rem; }

/* news-style changelog posts */
.post { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 1rem; padding: 1rem 1.2rem; border-top: 1px solid var(--line); }
.post:first-child { border-top: 0; }
.post .date { text-align: center; font-family: var(--display); color: var(--gold); line-height: 1.1; border: 1px solid var(--rim-2); background: #141311; padding: .35rem .2rem; align-self: start; }
.post .date b { display: block; font-size: 1.4rem; }
.post .date small { display: block; font-family: var(--ui); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.post h3 { margin: 0 0 .3rem; font-size: 1.1rem; }
.post ul { margin: 0; padding-left: 1.1rem; }
.post li { margin: .2rem 0; }
@media (max-width: 480px) { .post { grid-template-columns: 1fr; } .post .date { display: inline-flex; gap: .4rem; align-items: baseline; width: max-content; } }

/* big download block */
.dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 2rem; align-items: center; }
.dl dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; font-family: var(--ui); }
.dl dt { color: var(--muted); } .dl dd { margin: 0; }
.dl .btn { font-size: 1.1rem; padding: .9rem 1.6rem; }
@media (max-width: 600px) { .dl { grid-template-columns: 1fr; } }

/* ordered steps as a plain numbered list with medallions */
.steps { display: grid; gap: 0; counter-reset: step; }
.step { padding: .9rem 1rem .9rem 4rem; position: relative; border-top: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-bottom: 0; border-radius: 0; box-shadow: none; }
.step:first-child { border-top: 0; }
.step::before { top: .95rem; }
.step h3 { margin: 0 0 .25rem; }
.step p { margin: 0; }

/* auth pages */
.auth { display: block; }
.auth .form { max-width: 440px; }

/* old-style ornament under h1 lives inside panels now */
.page-head h1::after { content: none; }
.section-head h2::after { content: none; }

/* fixes after review */
.steps { grid-template-columns: 1fr; }
.frame .row { align-items: baseline; }
.frame .row b { white-space: nowrap; text-align: right; }
.frame .row span { min-width: 0; }
.cols-wide .frame { font-size: .92rem; }

/* ====================================================================
   Flat restyle: no blue, no header bars, thin single borders
   ==================================================================== */
:root { --plaque: #1c1a17; --plaque-2: #171613; --edge: #342d22; }

.panel, .widget { background: #171613; border: 1px solid var(--edge); box-shadow: none; border-radius: 2px; }
.panel-head, .widget-head {
  background: none; box-shadow: none; border-bottom: 1px solid var(--edge);
  padding: .7rem 1.1rem .6rem; text-shadow: none; color: var(--gold);
}
.widget-head { padding: .55rem .9rem .5rem; }
.panel-body { padding: 1.1rem 1.1rem; }
.panel-foot { border-top: 1px solid var(--edge); }

.frame { background: #1c1a17; border: 1px solid var(--edge); box-shadow: none; border-radius: 2px; color: var(--ink); }
.frame .t { color: var(--gold); }
.frame .row { border-bottom: 1px solid var(--edge); }
.frame .row b { color: var(--gold); }

.plaque { background: #171613; border: 1px solid var(--edge); box-shadow: none; }
.plaque::before, .plaque::after { content: none; }
.status .k { color: var(--muted); } .status .v small { color: var(--muted); }

.widget-play { background: #171613; border: 1px solid var(--edge); box-shadow: none; }
.widget-play .widget-head { background: none; box-shadow: none; }
.widget-play .widget-body { color: var(--ink); }

.btn-blue { background: #26221b; border-color: #5a4728; color: var(--ink); box-shadow: none; }
.btn-blue:hover { background: #2f2a21; border-color: var(--gold-2); }
.btn { box-shadow: none; }
.btn-gold { box-shadow: none; }

.card, .step { background: #171613; border: 1px solid var(--edge); box-shadow: none; }
.card::before, .card::after { content: none; }
.post .date { background: #1c1a17; border-color: var(--edge); }
.overheard .line { background: #1c1a17; border-color: var(--edge); }
details { background: #171613; border-color: var(--edge); }
.table-wrap { border-color: var(--edge); }
th { background: #1c1a17; }
th, td { border-bottom-color: var(--edge); }
.stat-row, .minilist li, .deflist > div, .roles > div, .post, .entry { border-color: var(--edge); }

.masthead { background: none; }
body { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.47 0 0 0 0 0.33 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); background-attachment: scroll; }
.nav a:hover { text-shadow: 0 1px 0 #000; }
.nav a[aria-current="page"]::after { box-shadow: none; }
.navbar::after { content: none; }
.welcome h1 { text-shadow: none; }
.hero h1 { text-shadow: none; }
.topstrip { background: #0f0e0d; }

/* Discord widget placeholder (mimics the official embed's layout) */
.discord-embed { border: 1px solid var(--edge); border-radius: 2px; padding: .7rem .8rem; background: #141311; }
.discord-top { display: flex; gap: .6rem; align-items: center; margin-bottom: .6rem; }
.discord-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #26221b; border: 1px solid var(--edge); font-family: var(--display); font-weight: 900; color: var(--muted); }
.discord-name { font-weight: 700; color: var(--ink); }
.discord-count { font-size: .85rem; color: var(--muted); }
.discord-members { list-style: none; margin: 0 0 .7rem; padding: 0; font-size: .88rem; color: var(--muted); }
.discord-members li { display: flex; align-items: center; gap: .5rem; padding: .2rem 0; }
.discord-members li span { width: 18px; height: 18px; border-radius: 50%; background: #26221b; border: 1px solid var(--edge); flex: none; }

/* ---------- breathing room ---------- */
.layout { gap: 2.2rem; padding-block: 2.2rem 1.5rem; }
.main { gap: 2rem; }
.sidebar { gap: 1.6rem; }
.panel-body { padding: 1.5rem 1.6rem; }
.panel-head { padding: .8rem 1.6rem .7rem; }
.panel-foot { padding: .8rem 1.6rem; }
.welcome { display: block; }
.welcome h1 { margin-bottom: .6rem; }
.welcome p { max-width: 62ch; }
.deflist { gap: 0; }
.deflist > div { padding: 1rem 0; grid-template-columns: 170px minmax(0, 1fr); }
.deflist > div:last-child { padding-bottom: 0; }
.minilist.wide li { grid-template-columns: 3.6rem 1fr; padding: .55rem 0; font-family: var(--body); font-size: 1rem; }
.minilist.wide time { font-family: var(--ui); }
.widget-body { padding: 1rem 1.1rem; }
.widget-head { padding: .7rem 1.1rem .6rem; }
.stat-row { padding: .4rem 0; }
.roles > div { padding: 1.2rem 1.6rem; }
.post { padding: 1.3rem 1.6rem; }
.site-footer { margin-top: 2rem; }
.panel-head .sub a { color: var(--muted); text-decoration: none; }
.panel-head .sub a:hover { color: var(--gold); }

/* faction colors */
:root { --horde: #b3261e; --alliance: #2b5fd9; }
.factions { padding-top: .6rem; }
.faction-labels { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: .3rem; }
.faction-labels .horde { color: #e06a60; } .faction-labels .alliance { color: #7ea1ff; }
.faction-bar { display: flex; height: 8px; border-radius: 2px; overflow: hidden; border: 1px solid var(--edge); background: #0f0e0d; }
.faction-bar .horde { background: linear-gradient(180deg, #d13a30, #8c1d1d); }
.faction-bar .alliance { background: linear-gradient(180deg, #3f74ea, #1e3a8f); }
.char.horde .name { color: #e06a60; } .char.alliance .name { color: #7ea1ff; }

/* a little more pop on the panel titles */
.panel-head { border-bottom: 1px solid var(--edge); background: linear-gradient(90deg, rgba(232,182,61,.06), transparent 60%); }
.widget-head { background: linear-gradient(90deg, rgba(232,182,61,.06), transparent 70%); }
.btn-gold { box-shadow: 0 0 0 1px #3b2c12, 0 4px 12px rgba(232,182,61,.18); }

/* ====================================================================
   Masthead: painted key art, with small light glows placed on the
   light sources that are in the painting (fire, torches, magic, moon).
   The art is drawn in .art-inner, which copies background-size:cover
   so the glow spots stay pinned to the same pixels at every width.
   ==================================================================== */
.masthead {
  position: relative; overflow: hidden; isolation: isolate;
  background: #141414; border: 0;
  min-height: clamp(260px, 30vw, 440px);
  display: grid; place-items: center;
  padding-block: clamp(1.2rem, 3vw, 2.4rem);
}
body[data-page="home"] .masthead { min-height: clamp(300px, 31.25vw, 500px); }
.masthead::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 36% 70% at 50% 50%, rgba(0,0,0,.55), transparent 70%),
    linear-gradient(180deg, rgba(0,0,0,.35), transparent 25%, transparent 70%, #141414 100%);
}
.masthead::after { content: none; }
.masthead-logo { position: relative; z-index: 1; }
.masthead-logo img { width: min(560px, 78vw); filter: drop-shadow(0 16px 34px rgba(0,0,0,.9)) drop-shadow(0 0 3px rgba(0,0,0,.8)); }
body[data-page="home"] .masthead-logo img { width: min(640px, 82vw); }

.art { position: absolute; inset: 0; z-index: -2; overflow: hidden; container-type: size; pointer-events: none; }
.art-inner {
  position: absolute; left: 50%; top: 35%; transform: translate(-50%, -35%);
  width: 100%; aspect-ratio: 3.2 / 1;
}
.art-img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; max-width: none; }
@supports (width: 1cqh) { .art-wide { width: max(100cqw, 320cqh); } .art-tall { width: max(100cqw, 133.334cqh); } }
.art-tall { display: none; top: 40%; transform: translate(-50%, -40%); aspect-ratio: 4 / 3; }
@media (max-width: 700px) { .art-wide { display: none; } .art-tall { display: block; } .masthead { min-height: 280px; } }

/* one light: a soft round bloom at a point in the painting */
.lt {
  position: absolute; left: var(--x); top: var(--y); width: var(--s, 5%); aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%; mix-blend-mode: screen; pointer-events: none;
}
.lt.fire  { background: radial-gradient(circle, rgba(255, 175, 90, .95) 0%, rgba(255, 110, 40, .55) 22%, rgba(255, 70, 20, .2) 45%, transparent 70%); animation: lt-pulse 5s ease-in-out infinite; }
.lt.magic { background: radial-gradient(circle, rgba(190, 230, 255, 1) 0%, rgba(80, 160, 255, .75) 20%, rgba(40, 110, 255, .3) 42%, transparent 70%); animation: lt-pulse 5.5s ease-in-out infinite; }
.lt.moon  { background: radial-gradient(circle, rgba(225, 235, 255, .7) 0%, rgba(150, 180, 255, .3) 25%, rgba(110, 150, 255, .1) 50%, transparent 72%); animation: lt-pulse 8s ease-in-out infinite; }
.lt.holy  { background: radial-gradient(circle, rgba(255, 248, 210, 1) 0%, rgba(255, 220, 140, .75) 18%, rgba(255, 190, 90, .32) 40%, rgba(255, 170, 80, .1) 55%, transparent 72%); animation: lt-pulse 6s ease-in-out infinite; }
.lt.d1 { animation-delay: -1.2s; } .lt.d2 { animation-delay: -2.4s; } .lt.d3 { animation-delay: -3.6s; } .lt.d4 { animation-delay: -4.6s; }
@keyframes lt-flicker-unused {
  0%, 100% { opacity: .65; transform: translate(-50%, -50%) scale(.95); }
  20% { opacity: .9;  transform: translate(-50%, -52%) scale(1.06); }
  35% { opacity: .6;  transform: translate(-50%, -50%) scale(.98); }
  55% { opacity: 1;   transform: translate(-49%, -51%) scale(1.1); }
  80% { opacity: .7;  transform: translate(-50%, -50%) scale(1); }
}
@keyframes lt-pulse { 0%, 100% { opacity: .5; transform: translate(-50%, -50%) scale(.92); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .lt { animation: none; opacity: .75; } }

/* light positions (percent of the painting), wide art */
.art-wide .l-caster  { --x: 1.5%;  --y: 58.5%; --s: 9.0%; }
.art-wide .l-torch1  { --x: 3.0%;  --y: 28.4%; --s: 5.8%; }
.art-wide .l-torch2  { --x: 5.1%;  --y: 31.7%; --s: 5.8%; }
.art-wide .l-torch3  { --x: 3.8%;  --y: 25.3%; --s: 5.4%; }
.art-wide .l-fire1   { --x: 7.6%;  --y: 38.5%; --s: 5.4%; }
.art-wide .l-fire2   { --x: 11.8%; --y: 26.5%; --s: 5%; }
.art-wide .l-fire3   { --x: 21.8%; --y: 56.0%; --s: 4.6%; }
.art-wide .l-flag    { --x: 25.1%; --y: 44.3%; --s: 8.1%; }
.art-wide .l-ground  { --x: 32.8%; --y: 66.3%; --s: 5.8%; }
.art-wide .l-moon    { --x: 81.1%; --y: 17.2%; --s: 12.6%; }
.art-wide .l-staff   { --x: 72.6%; --y: 50.5%; --s: 9%; }
.art-wide .l-hand    { --x: 79.9%; --y: 66.5%; --s: 11%; }
.art-wide .l-priest  { --x: 99.2%; --y: 43.0%; --s: 10%; }
.art-wide .l-castle  { --x: 81.4%; --y: 47.7%; --s: 4.3%; }
/* tall (phone) art */
.art-tall .l-caster  { --x: 34.7%; --y: 57.0%; --s: 16.2%; }
.art-tall .l-torch1  { --x: 6.2%;  --y: 19.0%; --s: 10.8%; }
.art-tall .l-torch2  { --x: 4.2%;  --y: 23.9%; --s: 10.8%; }
.art-tall .l-moon    { --x: 86.6%; --y: 24.2%; --s: 21.6%; }
.art-tall .l-staff   { --x: 67.1%; --y: 57.2%; --s: 14%; }
.art-tall .l-hand    { --x: 77.0%; --y: 66.0%; --s: 11%; }
.art-tall .l-priest  { --x: 77.7%; --y: 57.8%; --s: 15%; }
.art-tall .l-castle  { --x: 80.0%; --y: 46.4%; --s: 8.1%; }

/* no inline style attributes anywhere (the CSP forbids them) */
.mt-1 { margin-top: 1rem; } .mt-06 { margin-top: .6rem; }
.faction-bar .horde { width: 50%; } .faction-bar .alliance { width: 50%; }

/* ====================================================================
   Horde / Alliance through the lower pages: crimson haze on the left,
   azure on the right, a red-to-blue edge on panels, faction chips.
   ==================================================================== */
:root { --horde-ink: #e0675c; --alliance-ink: #7ea1ff; --split: linear-gradient(90deg, #b3261e 0%, rgba(179, 38, 30, .55) 22%, rgba(140, 106, 46, .35) 50%, rgba(43, 95, 217, .55) 78%, #2b5fd9 100%); }
body {
  background-image:
    radial-gradient(ellipse 30% 75% at 0% 50%, rgba(160, 26, 16, .32), transparent 75%),
    radial-gradient(ellipse 30% 75% at 100% 50%, rgba(32, 70, 185, .34), transparent 75%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.47 0 0 0 0 0.33 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-attachment: fixed, fixed, scroll;
}
.panel, .widget { position: relative; }
.panel::before, .widget::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 2px; background: var(--split); pointer-events: none; }
.site-footer { border-top: 0; position: relative; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--split); }
.chip.horde { color: var(--horde-ink); border-color: rgba(179, 38, 30, .6); background: rgba(179, 38, 30, .1); }
.chip.alliance { color: var(--alliance-ink); border-color: rgba(43, 95, 217, .6); background: rgba(43, 95, 217, .1); }
.faction-labels .horde { color: var(--horde-ink); } .faction-labels .alliance { color: var(--alliance-ink); }

td.dname { min-width: 11rem; }
td.dname small { display: block; margin-top: .2rem; font-size: .82rem; line-height: 1.35; color: var(--muted); }
td .chip { white-space: nowrap; }

/* boxes stay one color; the red/blue lives only in the page background */
.panel::before, .widget::before, .site-footer::before { content: none; }
.site-footer { border-top: 1px solid var(--edge); }
body {
  background-image:
    radial-gradient(ellipse 42% 85% at 0% 50%, rgba(175, 28, 18, .5), rgba(150, 24, 16, .22) 45%, transparent 78%),
    radial-gradient(ellipse 42% 85% at 100% 50%, rgba(36, 78, 205, .52), rgba(30, 64, 170, .24) 45%, transparent 78%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.47 0 0 0 0 0.33 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-attachment: fixed, fixed, scroll;
}

/* 404 page (no inline styles: the CSP blocks them) */
.hero .logo-404 { width: min(420px, 80%); margin: 3rem auto 1rem; }

/* ---------- avatars ---------- */
.avatar { --av: 44px; width: var(--av); height: var(--av); flex: none; border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center; vertical-align: middle;
  background: radial-gradient(circle at 35% 30%, #3a3326, #1b1a17 70%); box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--rim), 0 2px 6px rgba(0, 0, 0, .6); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar .initial { font-family: var(--display); font-weight: 700; color: var(--gold); font-size: calc(var(--av) * .46); line-height: 1; }
.avatar.horde { background: radial-gradient(circle at 35% 30%, #6b1f18, #2a0f0c 70%); box-shadow: 0 0 0 1px #000, 0 0 0 2px #8c2a20, 0 2px 6px rgba(0, 0, 0, .6); }
.avatar.horde .initial { color: var(--horde-ink); }
.avatar.alliance { background: radial-gradient(circle at 35% 30%, #1f3a8a, #0e1838 70%); box-shadow: 0 0 0 1px #000, 0 0 0 2px #2f56b8, 0 2px 6px rgba(0, 0, 0, .6); }
.avatar.alliance .initial { color: var(--alliance-ink); }
.avatar-sm { --av: 22px; box-shadow: 0 0 0 1px var(--rim-2) !important; }
.avatar-lg { --av: 120px; }
.avatar-xl { --av: 132px; }
.avatar.busy { opacity: .55; }

/* ---------- who's logged in, top right ---------- */
.topstrip-links { align-items: center; }
.topstrip-links .me { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink); }
.topstrip-links .me:hover .me-name { color: var(--gold); }
.me-name { max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- profile editor ---------- */
.profile-edit { display: grid; grid-template-columns: 210px 1fr; gap: 1.5rem 2.2rem; align-items: start; }
.profile-pic { display: grid; justify-items: center; gap: .75rem; text-align: center; padding-top: .3rem; }
.profile-pic .hint { font-family: var(--ui); font-size: .82rem; color: var(--muted); max-width: 22ch; }
.profile-pic .err { font-family: var(--ui); font-size: .85rem; color: var(--bad); min-height: 1.2em; }
.profile-pic-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.profile-pic-actions label.btn { cursor: pointer; }
.btn-quiet { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-quiet:hover { color: var(--ink); }
.field textarea { font: inherit; font-family: var(--ui); font-size: 1rem; color: var(--ink); background: var(--bg-3); border: 1px solid var(--rim-2); border-radius: 4px; padding: .6rem .7rem; width: 100%; resize: vertical; min-height: 4.6rem; }
.field textarea:focus { border-color: var(--gold-2); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent); }
.faction-pick { border: 0; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.faction-pick legend { font-family: var(--ui); font-size: .95rem; color: var(--ink); padding: 0; margin-bottom: .4rem; }
.faction-pick .err { flex-basis: 100%; }
.pick { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .85rem; border: 1px solid var(--line); border-radius: 999px; font-family: var(--ui); cursor: pointer; background: var(--bg-3); color: var(--muted); }
.pick input { accent-color: var(--gold); margin: 0; }
.pick:has(input:checked) { border-color: var(--gold-2); color: var(--gold); }
.pick.horde:has(input:checked) { border-color: #8c2a20; color: var(--horde-ink); background: rgba(179, 38, 30, .12); }
.pick.alliance:has(input:checked) { border-color: #2f56b8; color: var(--alliance-ink); background: rgba(47, 86, 184, .14); }
@media (max-width: 720px) { .profile-edit { grid-template-columns: 1fr; } }

/* ---------- public player page ---------- */
.player-card { display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap; }
.player-info { min-width: 0; flex: 1 1 280px; }
.player-info h1 { margin: 0 0 .35rem; overflow-wrap: anywhere; }
.player-info h1.horde { color: var(--horde-ink); }
.player-info h1.alliance { color: var(--alliance-ink); }
.player-meta { font-family: var(--ui); display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.player-bio { white-space: pre-line; max-width: 60ch; margin: .9rem 0 0; overflow-wrap: anywhere; }
.player-bio:empty { display: none; }
