@font-face {
  font-family: "Source Serif 4";
  src: url("source-serif.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("source-serif-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("plex-mono.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("plex-mono-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Russo One";
  src: url("russo.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #110e0c;
  --bg-2: #1b1512;
  --panel: #241c17;
  --panel-2: #2d231c;
  --ink: #f6efe2;
  --muted: #c4b5a2;
  --dim: #8d7d6c;
  --line: rgba(255, 214, 160, 0.16);
  --cyan: #3ef0dc;
  --cyan-dim: rgba(62, 240, 220, 0.14);
  --gold: #ffc14d;
  --magenta: #ff5ea8;
  --acid: #b6ff3c;
  --rare: #59b6ff;
  --epic: #c792ff;
  --danger: #ff5d4a;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --serif: "Source Serif 4", Georgia, "Iowan Old Style", serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --display: "Russo One", "Arial Narrow", Impact, sans-serif;
  --content: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(62, 240, 220, 0.08), transparent 60%),
    radial-gradient(700px 380px at 100% 0%, rgba(255, 94, 168, 0.07), transparent 55%),
    linear-gradient(180deg, #181310 0%, var(--bg) 280px);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--cyan); text-underline-offset: 0.16em; }
a:hover { color: white; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.hud {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(16, 12, 10, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.hud-top {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0.7rem 1.1rem 0.35rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; flex-direction: column; text-decoration: none; min-width: 12rem; }
.brand-kicker {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.brand-title {
  font-family: var(--display);
  font-size: 1.55rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: 1.1;
}
.rec {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--danger);
  letter-spacing: 0.12em;
}
.rec::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 8px var(--danger);
  animation: blink 1.4s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }

.hud-tools { display: flex; gap: 0.45rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.search-wrap { position: relative; }
.search-wrap label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
#q {
  background: #100d0b;
  border: 1px solid rgba(62, 240, 220, 0.45);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  width: min(42vw, 280px);
  min-width: 0;
  font-family: var(--mono);
  font-size: 0.85rem;
}
#search-results {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  width: min(86vw, 420px);
  background: #1a1411;
  border: 1px solid var(--cyan);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-height: 70vh;
  overflow: auto;
  padding: 0.35rem;
}
#search-results a {
  display: block;
  text-decoration: none;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
}
#search-results a:hover, #search-results a[aria-selected="true"] { background: var(--cyan-dim); }
.search-empty { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); padding: 0.7rem; margin: 0; }
#search-results strong { display: block; color: var(--ink); font-family: var(--display); font-size: 0.95rem; letter-spacing: 0.02em; }
#search-results span { display: block; color: var(--muted); font-size: 0.86rem; line-height: 1.35; }
.ghost, .solid {
  border-radius: 999px;
  padding: 0.42rem 0.75rem;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.ghost { background: transparent; border: 1px solid var(--line); }
.solid { background: var(--cyan); color: #10211f; border: 0; font-weight: 600; }
.ghost:hover { border-color: var(--cyan); }
#nav-toggle { display: none; }

.nav {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0.2rem 1.1rem 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold); }

.wrap { max-width: var(--content); margin: 0 auto; padding: 1.25rem 1.1rem 3rem; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.4rem; align-items: start; }
.layout.solo { grid-template-columns: minmax(0, 1fr); }

.crumb {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--dim);
  letter-spacing: 0.04em;
  margin-bottom: 0.7rem;
}
.crumb a { color: var(--dim); }

.hero {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
  border-radius: 16px;
  border: 1px solid rgba(62, 240, 220, 0.35);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.5), 0 0 32px rgba(62, 240, 220, 0.12);
  background: #1a1410;
  margin-bottom: 1rem;
}
.kicker {
  font-family: var(--mono);
  color: var(--gold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin: 0 0 0.25rem;
}
h1 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.03em;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.05;
  margin: 0 0 0.8rem;
}
.lede {
  font-size: 1.25rem;
  color: #fff8ec;
  margin-top: 0;
}
.prose p { margin: 0 0 0.95rem; }
.prose h2 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.04em;
  font-size: 1.45rem;
  margin: 1.6rem 0 0.55rem;
  color: var(--gold);
}
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.2rem; }
.prose li { margin: 0.25rem 0; }

.banner, .stub-banner {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.45;
  border: 1px dashed rgba(255, 193, 77, 0.55);
  background: rgba(255, 193, 77, 0.06);
  color: #ffe3ad;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  margin: 0 0 1rem;
}
.stub-banner { border-color: rgba(255, 93, 74, 0.7); color: #ffd0c8; background: rgba(255, 93, 74, 0.08); }

.spoiler {
  margin: 0 0 0.9rem;
  border: 1px solid rgba(255, 94, 168, 0.45);
  border-radius: 12px;
  background: #1a1218;
  overflow: hidden;
}
.spoiler summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  padding: 0.65rem 0.85rem;
  color: var(--magenta);
  list-style: none;
}
.spoiler summary::-webkit-details-marker { display: none; }
.spoiler summary::before { content: "▸ "; }
.spoiler[open] summary::before { content: "▾ "; }
.spoiler-body { padding: 0 0.95rem 0.8rem; color: var(--ink); }
.spoiler-body p:last-child { margin-bottom: 0; }

.infobox {
  background: linear-gradient(180deg, #2c241c, #1a1512);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: sticky;
  top: 7.2rem;
}
.infobox header {
  padding: 0.75rem 0.9rem;
  font-family: var(--display);
  letter-spacing: 0.06em;
  background: var(--rarity, var(--gold));
  color: #1a1208;
}
.infobox dl { margin: 0; padding: 0.4rem 0; }
.infobox dt, .infobox dd {
  padding: 0.38rem 0.9rem;
  margin: 0;
}
.infobox dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  padding-bottom: 0;
}
.infobox dd {
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-top: 0.1rem;
}
.infobox dd:last-child { border-bottom: 0; }
.rarity-common { --rarity: #d9d3c7; }
.rarity-uncommon { --rarity: var(--acid); }
.rarity-rare { --rarity: var(--rare); }
.rarity-epic { --rarity: var(--epic); }
.rarity-legendary { --rarity: var(--gold); }
.rarity-celestial { --rarity: #fff1b8; }
.rarity-boss { --rarity: var(--danger); color: white; }

.see-also, .pager {
  margin-top: 1.5rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}
.see-also h2, .index-block h2 { font-family: var(--display); font-weight: 400; color: var(--gold); letter-spacing: 0.04em; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; list-style: none; }
.chips a, .pager a {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-decoration: none;
  border: 1px solid rgba(62, 240, 220, 0.35);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  background: rgba(62, 240, 220, 0.05);
}
.pager { display: flex; justify-content: space-between; gap: 0.6rem; }

.index-list { list-style: none; padding: 0; margin: 0; }
.index-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.index-list a.title {
  font-family: var(--display);
  letter-spacing: 0.03em;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--ink);
}
.index-list a.title:hover { color: var(--cyan); }
.index-list p { margin: 0.25rem 0 0; color: var(--muted); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1rem 0 1.4rem;
}
.feature {
  display: block;
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  color: var(--ink);
}
.feature img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.feature span { display: block; padding: 0.65rem 0.8rem 0.8rem; }
.feature strong { font-family: var(--display); letter-spacing: 0.03em; display: block; }
.feature em { font-style: normal; color: var(--muted); font-size: 0.95rem; }
.feature:hover { border-color: var(--cyan); }

.sys {
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.5;
  background: #0e1c1a;
  border-left: 4px solid var(--cyan);
  padding: 0.8rem 0.95rem;
  border-radius: 0 12px 12px 0;
  color: #d9fff8;
  margin: 0 0 1rem;
}
.stat-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 0.86rem; margin: 0 0 1rem; }
.stat-table th, .stat-table td { text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--line); }
.stat-table th { color: var(--gold); font-weight: 600; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.2rem 1.1rem 2rem;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.5;
  max-width: var(--content);
  margin: 0 auto;
}
.site-footer .footer-links {
  margin: 0 0 0.75rem;
}
.site-footer .footer-links a {
  color: #4ea2ff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  font-size: 0.85rem;
}
.site-footer .footer-links a:hover { color: #b9dcff; }

.contact-form {
  display: grid;
  gap: 0.85rem;
  margin: 1.2rem 0 1.5rem;
  max-width: 36rem;
}
.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.05rem;
  text-transform: none;
  letter-spacing: 0;
}
.contact-form textarea { resize: vertical; min-height: 10rem; }
.contact-form button.solid {
  justify-self: start;
  margin-top: 0.2rem;
  padding: 0.65rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--cyan);
  color: #071512;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.contact-form button.solid:disabled { opacity: 0.55; cursor: wait; }
.contact-form button.solid:hover:not(:disabled) { filter: brightness(1.08); }
.contact-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-status {
  margin: 0.35rem 0 0;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}
.contact-status[data-kind="ok"] { color: var(--acid); }
.contact-status[data-kind="error"] { color: var(--danger); }
.contact-status[data-kind="pending"] { color: var(--cyan); }
.ladder { list-style: none; padding: 0; margin: 0; }
.ladder li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 0.8rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.ladder .num { font-family: var(--display); color: var(--gold); font-size: 1.3rem; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .infobox { position: static; }
  .hud-top { flex-direction: column; align-items: stretch; }
  .hud-tools {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    width: 100%;
  }
  .search-wrap { grid-column: 1 / -1; }
  #q { width: 100%; min-width: 0; }
  .stat-table { display: block; overflow-x: auto; }
  .feature-grid { grid-template-columns: 1fr; }
  #nav-toggle { display: inline-flex; }
  .nav { display: none; padding-bottom: 0.8rem; }
  .nav.open { display: flex; flex-direction: column; }
  .hud-top { align-items: flex-start; }
  #q { width: 46vw; }
  h1 { font-size: 2.05rem; }
  .lede { font-size: 1.12rem; }
  .hud-tools .ghost, .hud-tools .solid { padding: 0.38rem 0.55rem; }
}

/* In-text links stay visible on the dark page. Nav, chips, spoilers, and the footer are unchanged. */
.prose a:not(.feature),
.lede a,
.infobox dd a {
  color: #4ea2ff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}
.prose a:not(.feature):hover,
.lede a:hover,
.infobox dd a:hover { color: #b9dcff; }

.index-list.pressable li {
  border: 1px solid transparent;
  border-bottom: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 0.75rem;
}
.index-list.pressable li:hover {
  border-color: rgba(78, 162, 255, 0.55);
  background: rgba(78, 162, 255, 0.07);
}
.index-list.pressable a.title {
  color: #4ea2ff;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}
.index-list.pressable a.title::after {
  content: " →";
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.9rem;
}
.index-list.pressable a.title:hover { color: #b9dcff; }

.dcc-thread, .dcc-forum {
  margin-top: 1.6rem;
  padding-top: 0.4rem;
}
.dcc-thread h2, .dcc-forum h2 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--gold);
  margin: 0 0 0.35rem;
}
.dcc-note {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
  margin: 0 0 0.8rem;
}
.dcc-gate {
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 0.85rem;
}
.dcc-gate.dcc-rule {
  background: rgba(255, 193, 77, 0.1);
  border: 1px solid rgba(255, 193, 77, 0.45);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
}
.dcc-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffe3ad;
  border: 1px solid rgba(255, 193, 77, 0.55);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  margin-right: 0.4rem;
}
.dcc-card, .dcc-comment, .dcc-topic {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  margin: 0.55rem 0;
}
.dcc-replies { margin-left: 1.1rem; }
.dcc-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--dim);
  margin-bottom: 0.3rem;
}
.dcc-body { margin: 0.2rem 0 0.45rem; }
.dcc-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
#dcc-google-slot:empty { display: none; }
#dcc-google-slot:not(:empty) { margin: 0 0 0.85rem; }
.dcc-actions button, .dcc-compose button, .dcc-replyform button, .dcc-signin {
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.2;
  background: transparent;
  border: 1px solid rgba(78, 162, 255, 0.55);
  color: #4ea2ff;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
}
.dcc-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  background: #140e0c;
}
.dcc-actions button:disabled,
.dcc-compose button:disabled,
.dcc-replyform button:disabled {
  opacity: 1;
  cursor: not-allowed;
  color: var(--dim);
  border-color: rgba(141, 125, 108, 0.45);
  background: transparent;
}
.dcc-compose.is-locked textarea,
.dcc-compose.is-locked input,
.dcc-replyform textarea:disabled {
  cursor: not-allowed;
  color: var(--dim);
  background: #161210;
  border-color: rgba(141, 125, 108, 0.4);
  resize: none;
}
.dcc-compose.is-locked textarea::placeholder,
.dcc-compose.is-locked input::placeholder {
  color: var(--dim);
  opacity: 1;
}
.dcc-compose, .dcc-replyform {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  width: 100%;
  max-width: 100%;
  margin: 0.7rem 0 0;
}
.dcc-compose > label {
  display: block;
  margin: 0;
}
.dcc-compose textarea,
.dcc-compose input,
.dcc-replybox textarea,
.dcc-replyform textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 4.5rem;
  margin: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #140e0c;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
  box-sizing: border-box;
}
.dcc-compose input { min-height: 2.4rem; }
.dcc-compose > button, .dcc-replyform > button { align-self: flex-start; }
.dcc-topic > a, .dcc-topic h3 a {
  color: #4ea2ff;
  text-decoration: underline;
}
.dcc-error { color: #ffb4a8; font-family: var(--mono); font-size: 0.8rem; }
