@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Cormorant+Garamond:wght@400;500;600;700&display=swap");

:root {
  --bg: #0b0909;
  --bg-soft: #111111;
  --paper: #151515;
  --paper-strong: #1d1d1d;
  --ink: #f2f2f2;
  --muted: #9c9c9c;
  --accent: #b0241a;
  --accent-soft: #8b8b8b;
  --sidebar: #040404;
  --sidebar-2: #0a0a0a;
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.45);
  --font-body: "Cormorant Garamond", Garamond, Baskerville, Georgia, serif;
  --font-display: "Cinzel", "Cormorant Garamond", Georgia, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
}

.landing-body {
  background:
    radial-gradient(circle at 50% 8%, rgba(176, 36, 26, 0.16), transparent 22%),
    radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.04), transparent 20%),
    linear-gradient(180deg, #010101 0%, var(--bg) 46%, #070707 100%);
}

.landing-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 24px 72px;
}

.hero {
  text-align: center;
  padding: 84px 24px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 28px;
  color: var(--ink);
  background:
    radial-gradient(circle at top, rgba(176, 36, 26, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #010101 0%, #080808 36%, #141414 60%, #050505 100%);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.04) 50%, transparent 100%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 22px;
  pointer-events: none;
}

.hero-runes {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(176, 36, 26, 0.16), transparent 22%),
    repeating-linear-gradient(
      90deg,
      transparent 0 74px,
      rgba(255, 255, 255, 0.015) 74px 75px
    );
  opacity: 0.8;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 8px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--accent-soft);
  font-weight: 700;
}

.hero-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.hero-logo {
  width: min(780px, 94%);
  height: auto;
  display: block;
  filter:
    drop-shadow(0 18px 26px rgba(0, 0, 0, 0.42))
    drop-shadow(0 0 22px rgba(176, 36, 26, 0.08));
}

.hero-copy {
  max-width: 760px;
  margin: 16px auto 0;
  color: rgba(242, 242, 242, 0.7);
  font-size: 1.12rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

.primary-link,
.admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
}

.primary-link {
  background: var(--accent);
  color: #fff8f2;
  box-shadow: 0 10px 22px rgba(147, 31, 20, 0.28);
}

.admin-link {
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.landing-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.landing-admin-link-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.stealth-admin-link {
  color: rgba(255, 255, 255, 0.42);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.stealth-admin-link:hover {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
}

.landing-panel {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(16, 16, 16, 0.96), rgba(7, 7, 7, 0.96));
  box-shadow: var(--shadow);
  position: relative;
}

.landing-panel::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(147, 31, 20, 0.5), transparent);
}

.landing-panel h2 {
  margin-top: 0;
  color: var(--ink);
}

.landing-panel p {
  color: var(--muted);
}

.wiki-body {
  background:
    radial-gradient(circle at top right, rgba(176, 36, 26, 0.12), transparent 20%),
    linear-gradient(180deg, #010101 0%, #080808 100%);
}

.wiki-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
}

.wiki-sidebar {
  padding: 22px 18px;
  color: var(--ink);
  background:
    radial-gradient(circle at top, rgba(176, 36, 26, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-brand {
  display: block;
  color: inherit;
  text-decoration: none;
  margin-bottom: 18px;
}

.sidebar-header-logo {
  width: 100%;
  max-width: 220px;
  height: auto;
  display: block;
  margin-bottom: 8px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}

.sidebar-subtitle {
  margin: 0;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--muted);
}

.sidebar-search input,
.page-tree button {
  width: 100%;
}

.sidebar-search input {
  padding: 12px 13px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
}

.sidebar-search input::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

.sidebar-section {
  margin-top: 18px;
}

.sidebar-section-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-display);
  font-size: 0.9rem;
}

.page-tree {
  display: grid;
  gap: 2px;
}

.tree-branch {
  display: grid;
  gap: 2px;
}

.tree-item {
  border: 0;
  border-radius: 10px;
  padding: 10px 10px 10px calc(10px + (var(--depth, 0) * 18px));
  background: transparent;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.tree-item:hover,
.tree-item.active {
  background: rgba(255, 255, 255, 0.04);
}

.tree-item-status {
  color: rgba(255, 255, 255, 0.36);
  font-size: 0.82rem;
}

.wiki-main {
  padding: 22px;
}

.wiki-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  margin: 0 auto 18px;
  max-width: 1100px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(15, 15, 15, 0.96), rgba(8, 8, 8, 0.96));
  box-shadow: var(--shadow);
}

.wiki-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.discord-link {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.discord-link svg {
  width: 22px;
  height: 22px;
}

.discord-link:hover {
  background: rgba(88, 101, 242, 0.14);
  border-color: rgba(88, 101, 242, 0.28);
}

.wiki-breadcrumbs,
.wiki-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
}

.wiki-breadcrumbs a {
  color: #d3b07a;
  text-decoration: none;
}

.wiki-tab {
  font-family: var(--font-display);
  border-radius: 10px 10px 0 0;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.article-card {
  max-width: 1100px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(14, 14, 14, 0.98), rgba(6, 6, 6, 0.98));
  box-shadow: var(--shadow);
  position: relative;
}

.article-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  pointer-events: none;
}

.article-header {
  padding: 26px 28px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background:
    linear-gradient(180deg, rgba(18, 18, 18, 0.98), rgba(8, 8, 8, 0.96));
}

.landing-article-header {
  text-align: center;
}

.page-status {
  margin: 0 0 10px;
  font-family: var(--font-display);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
}

.article-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: 0.04em;
  font-weight: 600;
}

.landing-article-header h2 {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  font-size: clamp(2.3rem, 5.6vw, 4.5rem);
  letter-spacing: 0.08em;
  line-height: 0.95;
  text-transform: uppercase;
}

.page-summary {
  margin: 12px 0 0;
  max-width: 72ch;
  line-height: 1.65;
  color: var(--muted);
}

.landing-article-header .page-summary {
  max-width: 58ch;
  margin-left: auto;
  margin-right: auto;
}

.landing-article-header .article-meta,
.landing-article-header .section-links,
.landing-article-header .subpage-links {
  justify-content: center;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.section-links,
.subpage-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.link-row-label {
  align-self: center;
  margin-right: 6px;
  color: var(--muted);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
}

.chip-link {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}

.chip-link.active,
.chip-link:hover {
  background: rgba(176, 36, 26, 0.16);
  border-color: rgba(176, 36, 26, 0.32);
}

.page-view {
  min-height: 66vh;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(16, 16, 16, 0.94), rgba(7, 7, 7, 0.99));
  line-height: 1.72;
  background-image:
    linear-gradient(180deg, rgba(16, 16, 16, 0.94), rgba(7, 7, 7, 0.99)),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.015) 0 1px,
      transparent 1px 30px
    );
}

.page-view h1,
.page-view h2,
.page-view h3 {
  margin-top: 0;
}

.page-view h2 {
  color: #d13125;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1.5rem;
  margin-top: 2.1rem;
}

.page-view h3 {
  color: var(--ink);
  font-size: 1.12rem;
  margin-top: 1.25rem;
}

.page-view p,
.page-view li {
  font-size: 1.18rem;
  letter-spacing: 0.01em;
}

.rule-line {
  margin: 1.3rem 0 0.45rem;
}

.rule-title {
  display: inline-block;
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(209, 49, 37, 0.7);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
 }

.page-view h1,
.page-view h2,
.page-view h3,
.article-header h2,
.landing-panel h2 {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}

.main-panel h2,
.main-panel h3 {
  color: #d13125;
}

.page-view a,
.wiki-link {
  color: #d3b07a;
  text-decoration: none;
}

.page-view a:hover,
.wiki-link:hover {
  text-decoration: underline;
}

.page-view blockquote {
  margin: 1.2rem 0;
  padding: 0.95rem 1rem;
  border-left: 4px solid var(--accent-soft);
  background: rgba(163, 122, 70, 0.08);
  color: #c8baa7;
}

.wiki-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  background: rgba(255, 255, 255, 0.025);
}

.wiki-table th,
.wiki-table td {
  border: 1px solid rgba(239, 227, 207, 0.08);
  padding: 0.55rem 0.7rem;
  vertical-align: top;
  text-align: left;
}

.wiki-table th {
  background: rgba(176, 36, 26, 0.16);
}

.infobox {
  float: right;
  width: min(320px, 100%);
  margin: 0 0 1rem 1.2rem;
  border: 1px solid rgba(239, 227, 207, 0.08);
  background:
    linear-gradient(180deg, #1a1515, #120f0f);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.infobox h3 {
  margin: 0;
  padding: 0.85rem 1rem;
  background: rgba(176, 36, 26, 0.16);
  border-bottom: 1px solid rgba(239, 227, 207, 0.08);
}

.infobox .wiki-table {
  margin: 0;
}

.media-image {
  max-width: 100%;
  display: block;
  margin: 1.1rem auto;
  border-radius: 12px;
  border: 1px solid rgba(239, 227, 207, 0.08);
  box-shadow: var(--shadow);
}

.media-youtube,
.media-card {
  margin: 1.25rem 0;
}

.media-youtube iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.media-card a {
  display: block;
  padding: 14px 16px;
  border: 1px solid rgba(239, 227, 207, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.main-page-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}

.main-panel {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 14px;
  padding: 18px 20px;
}

.main-panel h2,
.main-panel h3 {
  margin-top: 0;
}

.main-kicker {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: #d13125;
  text-align: center;
}

.hero-panel {
  grid-column: 1 / -1;
}

.quote-panel {
  grid-column: 1 / -1;
  border-style: dashed;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.quote-panel p {
  margin: 0;
  max-width: 34ch;
  color: #d13125;
  font-style: italic;
  font-size: 1.18rem;
  line-height: 1.65;
}

.empty-state {
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 1080px) {
  .wiki-layout {
    grid-template-columns: 1fr;
  }

  .main-page-grid,
  .landing-panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .landing-shell,
  .wiki-main,
  .wiki-sidebar {
    padding: 18px;
  }

  .wiki-topbar,
  .article-header,
  .page-view {
    padding: 18px;
  }

  .wiki-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .landing-article-header h2 {
    letter-spacing: 0.04em;
    line-height: 1;
  }

  .wiki-topbar-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .infobox {
    float: none;
    width: 100%;
    margin: 0 0 1rem;
  }
}
