:root {
  --void: #030307;
  --ink: #080711;
  --obsidian: #0f0d19;
  --violet: #3f1a72;
  --violet-2: #6f37bf;
  --lilac: #c6a8ff;
  --gold: #d8b66b;
  --gold-soft: #f0d796;
  --ice: #eef3ff;
  --mist: rgba(238, 243, 255, 0.72);
  --muted: rgba(238, 243, 255, 0.54);
  --glass: rgba(12, 10, 22, 0.66);
  --glass-2: rgba(20, 15, 35, 0.74);
  --line: rgba(198, 168, 255, 0.22);
  --line-gold: rgba(216, 182, 107, 0.34);
  --danger: #ff6e88;
  --success: #8ef0c2;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  --radius: 8px;
  --header: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ice);
  background:
    linear-gradient(180deg, rgba(3, 3, 7, 0.22), rgba(3, 3, 7, 0.96) 62%),
    #030307;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

main,
.view,
.hero,
.page-shell,
.content-band {
  max-width: 100%;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -4;
  content: "";
  background:
    linear-gradient(120deg, rgba(111, 55, 191, 0.18), transparent 26%, rgba(216, 182, 107, 0.08) 50%, transparent 70%),
    url("assets/abyss-hero.png") center / cover no-repeat;
  filter: saturate(1.05) contrast(1.06);
  transform: scale(1.03);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.027) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, transparent, black 18%, black 70%, transparent);
  opacity: 0.35;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

#abyss-particles {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.cursor-aura {
  position: fixed;
  z-index: 50;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(198, 168, 255, 0.75);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 160ms ease, height 160ms ease, border-color 160ms ease, opacity 200ms ease;
  mix-blend-mode: screen;
  opacity: 0;
}

.cursor-aura.active {
  opacity: 1;
}

.cursor-aura.is-hovering {
  width: 42px;
  height: 42px;
  border-color: rgba(216, 182, 107, 0.9);
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  gap: 18px;
  background:
    linear-gradient(180deg, rgba(3, 3, 7, 0.94), rgba(10, 7, 18, 0.98)),
    #030307;
  transition: opacity 720ms ease, visibility 720ms ease;
}

.loading-screen.done {
  opacity: 0;
  visibility: hidden;
}

.loading-screen p {
  margin: 98px 0 0;
  color: var(--gold-soft);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1rem, 2vw, 1.4rem);
  letter-spacing: 0.18em;
}

.loading-sigil {
  position: absolute;
  width: 112px;
  height: 112px;
  animation: sigilPulse 2.2s ease-in-out infinite;
}

.loading-sigil span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(198, 168, 255, 0.44);
  transform: rotate(45deg);
}

.loading-sigil span:nth-child(2) {
  inset: 17px;
  border-color: rgba(216, 182, 107, 0.58);
  transform: rotate(0deg);
}

.loading-sigil span:nth-child(3) {
  inset: 34px;
  border-color: rgba(238, 243, 255, 0.5);
  animation: spin 1.8s linear infinite;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: var(--header);
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(3, 3, 7, 0.54);
  border-bottom: 1px solid rgba(198, 168, 255, 0.13);
  backdrop-filter: blur(22px);
  transition: background 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.site-header.is-scrolled {
  background: rgba(3, 3, 7, 0.82);
  border-color: rgba(216, 182, 107, 0.2);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.35);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 208px;
}

.brand strong {
  display: block;
  color: var(--ice);
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.02rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  border: 1px solid rgba(216, 182, 107, 0.56);
  background: linear-gradient(135deg, rgba(198, 168, 255, 0.12), rgba(216, 182, 107, 0.08));
  box-shadow: 0 0 26px rgba(111, 55, 191, 0.38);
  transform: rotate(45deg);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  content: "";
}

.brand-mark::before {
  inset: 9px;
  border: 1px solid rgba(198, 168, 255, 0.68);
}

.brand-mark::after {
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(238, 243, 255, 0.8);
  transform: translate(-50%, -50%);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  padding: 0 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

html,
body,
.article-modal,
.article-toc {
  scrollbar-color: rgba(216, 182, 107, 0.45) rgba(7, 6, 13, 0.82);
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(7, 6, 13, 0.82);
}

*::-webkit-scrollbar-thumb {
  border: 2px solid rgba(7, 6, 13, 0.82);
  border-radius: 999px;
  background: rgba(216, 182, 107, 0.5);
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(216, 182, 107, 0.72);
}

.main-nav a {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-height: 36px;
  padding: 0 7px;
  color: rgba(238, 243, 255, 0.7);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 180ms ease, background 180ms ease;
}

.mobile-only {
  display: none !important;
}

.main-nav a::after {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transform: scaleX(0.3);
  transition: opacity 180ms ease, transform 180ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--ice);
  background: rgba(198, 168, 255, 0.06);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn,
.ghost-btn,
.primary-btn,
.secondary-btn,
.danger-btn,
.small-btn {
  border: 1px solid rgba(198, 168, 255, 0.22);
  border-radius: 6px;
  background: rgba(12, 10, 22, 0.58);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.icon-btn {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--lilac);
}

.ghost-btn {
  min-height: 38px;
  padding: 0 14px;
  color: var(--ice);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.primary-btn,
.secondary-btn,
.danger-btn,
.small-btn {
  min-height: 42px;
  padding: 0 16px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.primary-btn {
  color: #100b14;
  border-color: rgba(240, 215, 150, 0.7);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  box-shadow: 0 12px 34px rgba(216, 182, 107, 0.18);
}

.secondary-btn {
  color: var(--ice);
  background: linear-gradient(135deg, rgba(111, 55, 191, 0.5), rgba(12, 10, 22, 0.64));
}

.danger-btn {
  color: var(--ice);
  border-color: rgba(255, 110, 136, 0.44);
  background: rgba(255, 110, 136, 0.1);
}

.small-btn {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.68rem;
}

.icon-btn:hover,
.ghost-btn:hover,
.primary-btn:hover,
.secondary-btn:hover,
.danger-btn:hover,
.small-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(216, 182, 107, 0.66);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32), 0 0 22px rgba(111, 55, 191, 0.2);
}

.nav-toggle {
  display: none;
}

main {
  position: relative;
  min-height: 100vh;
}

.view {
  display: none;
  min-height: 100vh;
  padding-top: var(--header);
}

.view.active {
  display: block;
  animation: viewIn 480ms ease both;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 382px);
  align-items: end;
  width: 100%;
  min-height: 92vh;
  padding: calc(var(--header) + 32px) clamp(20px, 6vw, 86px) 72px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(3, 3, 7, 0.96), rgba(3, 3, 7, 0.32) 44%, rgba(3, 3, 7, 0.82)),
    linear-gradient(180deg, rgba(3, 3, 7, 0.08), rgba(3, 3, 7, 0.96) 86%),
    url("assets/abyss-hero.png") center / cover no-repeat;
  animation: heroDrift 18s ease-in-out infinite alternate;
}

.scanlines {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0, transparent 8px, rgba(238, 243, 255, 0.026) 9px);
  opacity: 0.42;
  mix-blend-mode: screen;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold-soft);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  line-height: 1.04;
  letter-spacing: 0;
}

h1 {
  max-width: 900px;
  overflow-wrap: anywhere;
  font-size: clamp(4.1rem, 10.4vw, 10.6rem);
  color: var(--ice);
  text-shadow: 0 0 32px rgba(111, 55, 191, 0.42), 0 18px 68px rgba(0, 0, 0, 0.68);
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 4.1rem);
}

h3 {
  font-size: clamp(1.1rem, 1.8vw, 1.42rem);
}

.hero-copy {
  max-width: 700px;
  margin: 18px 0 0;
  color: rgba(238, 243, 255, 0.78);
  font-size: clamp(1rem, 1.65vw, 1.26rem);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.hero-copy strong {
  color: var(--gold-soft);
}

.hero-quote {
  width: min(100%, 620px);
  margin-top: 26px;
  padding: 14px 16px;
  color: rgba(238, 243, 255, 0.78);
  border-left: 2px solid rgba(216, 182, 107, 0.74);
  background: linear-gradient(90deg, rgba(216, 182, 107, 0.08), rgba(111, 55, 191, 0.07), transparent);
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-console {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  min-width: 0;
  width: 100%;
  padding: 18px;
  border: 1px solid rgba(198, 168, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(7, 6, 13, 0.66);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
}

.hero-console::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(216, 182, 107, 0.18), transparent 30%, rgba(198, 168, 255, 0.12));
  mask: linear-gradient(#000, transparent 72%);
}

.console-line {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid rgba(238, 243, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.console-line span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.console-line strong {
  color: var(--ice);
  font-size: 1.2rem;
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.status-glow {
  color: var(--success) !important;
  text-shadow: 0 0 18px rgba(142, 240, 194, 0.4);
}

.content-band {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading.compact {
  display: block;
  margin-bottom: 18px;
}

.section-heading p:last-child {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.article-strip,
.article-grid,
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.category-tile {
  display: grid;
  min-height: 210px;
  padding: 18px;
  text-align: left;
  align-content: end;
  overflow: hidden;
}

.category-tile::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(135deg, rgba(216, 182, 107, 0.12), transparent 34%),
    radial-gradient(circle at 80% 20%, rgba(198, 168, 255, 0.16), transparent 34%);
  opacity: 0.82;
  transition: transform 420ms ease, opacity 220ms ease;
}

.category-tile:hover::before {
  opacity: 1;
  transform: scale(1.08);
}

.category-tile span,
.category-tile strong,
.category-tile p {
  position: relative;
  z-index: 1;
}

.category-tile span {
  color: var(--gold-soft);
  font-family: "Cinzel", Georgia, serif;
  font-size: 2.3rem;
  font-weight: 800;
}

.category-tile strong {
  display: block;
  margin-top: 12px;
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.2rem;
}

.category-tile p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.archive-card,
.article-card,
.stat-card,
.role-card,
.user-row,
.comment-row,
.tool-card,
.build-card,
.event-card {
  position: relative;
  border: 1px solid rgba(198, 168, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(12, 10, 22, 0.66);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.article-card {
  display: flex;
  min-height: 315px;
  padding: 16px;
  overflow: hidden;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
  user-select: none;
}

.article-card:focus-visible {
  outline: 2px solid rgba(216, 182, 107, 0.78);
  outline-offset: 3px;
}

.article-card::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background:
    linear-gradient(180deg, rgba(3, 3, 7, 0.04), rgba(3, 3, 7, 0.9)),
    var(--cover, linear-gradient(135deg, rgba(111, 55, 191, 0.5), rgba(216, 182, 107, 0.18)));
  background-size: cover;
  background-position: center;
  transition: transform 540ms ease, filter 540ms ease;
}

.article-card-cover {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.96;
  transition: transform 540ms ease, filter 540ms ease;
}

.article-card::after {
  position: absolute;
  inset: 0;
  z-index: 3;
  content: "";
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(216, 182, 107, 0.5), transparent 28%, rgba(198, 168, 255, 0.35)) border-box;
  mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 240ms ease;
}

.article-card:hover::before {
  filter: saturate(1.18) brightness(1.1);
  transform: scale(1.05);
}

.article-card:hover .article-card-cover {
  filter: saturate(1.18) brightness(1.08);
  transform: scale(1.05);
}

.article-card:hover::after {
  opacity: 1;
}

.article-card-body {
  position: relative;
  z-index: 4;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.pill,
.tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(198, 168, 255, 0.23);
  border-radius: 999px;
  color: rgba(238, 243, 255, 0.76);
  background: rgba(3, 3, 7, 0.42);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pill.gold,
.status-pill.published {
  color: #160f15;
  border-color: rgba(216, 182, 107, 0.6);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
}

.status-pill.draft {
  color: var(--muted);
}

.status-pill.review {
  color: var(--gold-soft);
  border-color: rgba(216, 182, 107, 0.44);
}

.status-pill.archived {
  color: rgba(238, 243, 255, 0.5);
}

.article-card h3 {
  margin-bottom: 10px;
}

.article-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: rgba(238, 243, 255, 0.72);
  line-height: 1.6;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.split-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid rgba(198, 168, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(9, 8, 17, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.site-content-card {
  display: grid;
  gap: 16px;
  align-content: start;
  background:
    linear-gradient(135deg, rgba(216, 182, 107, 0.07), transparent 38%),
    linear-gradient(180deg, rgba(9, 8, 17, 0.84), rgba(7, 6, 13, 0.72));
}

.site-markdown {
  display: grid;
  gap: 14px;
  color: rgba(238, 243, 255, 0.82);
  font-size: 0.96rem;
  line-height: 1.75;
}

.site-markdown-hero {
  max-width: 820px;
  margin-top: 18px;
  font-size: 1.02rem;
}

.site-markdown p,
.site-markdown ul,
.site-markdown ol,
.site-markdown h2,
.site-markdown h3 {
  margin: 0;
}

.site-markdown h2,
.site-markdown h3 {
  color: var(--gold-soft);
  font-family: "Cinzel", Georgia, serif;
  letter-spacing: 0;
  line-height: 1.16;
}

.site-markdown h2 {
  margin-top: 4px;
  font-size: 1.36rem;
}

.site-markdown h3 {
  margin-top: 2px;
  font-size: 1.08rem;
}

.site-markdown p {
  max-width: 78ch;
  color: rgba(238, 243, 255, 0.78);
}

.site-markdown strong {
  color: var(--ice);
  font-weight: 900;
}

.site-markdown ul,
.site-markdown ol {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.site-markdown li {
  position: relative;
  padding-left: 22px;
  color: rgba(238, 243, 255, 0.78);
}

.site-markdown li::before {
  position: absolute;
  top: 0.78em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(216, 182, 107, 0.5);
  content: "";
}

.site-markdown a {
  color: var(--gold-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bots-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.bot-terms-card {
  gap: 18px;
}

.bot-terms-card.is-accepted {
  border-color: rgba(142, 240, 194, 0.34);
}

.bot-card-header {
  display: grid;
  gap: 10px;
}

.bot-identity {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.bot-image {
  display: grid;
  width: 84px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(216, 182, 107, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(216, 182, 107, 0.16), rgba(111, 55, 191, 0.22)),
    rgba(3, 3, 7, 0.64);
  color: var(--gold-soft);
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.08rem;
  font-weight: 900;
}

.bot-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bot-image-placeholder {
  text-align: center;
}

.bot-card-header p:not(.eyebrow) {
  margin: 0;
  color: rgba(238, 243, 255, 0.74);
  line-height: 1.65;
}

.bot-doc-grid {
  display: grid;
  gap: 12px;
}

.bot-doc,
.bot-accept-box,
.bot-settings-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(198, 168, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(3, 3, 7, 0.34);
}

.bot-doc {
  display: grid;
  gap: 12px;
}

.bot-accept-box {
  display: grid;
  gap: 12px;
}

.bot-accept-label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: rgba(238, 243, 255, 0.8);
  line-height: 1.55;
}

.bot-accept-label input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--gold);
}

.bot-accepted {
  color: var(--success);
}

.pill.published {
  color: #07120d;
  border-color: rgba(142, 240, 194, 0.62);
  background: linear-gradient(135deg, var(--success), #c9ffe7);
}

.feature-list,
.event-list {
  display: grid;
  gap: 12px;
}

.event-card,
.feature-item {
  display: grid;
  gap: 8px;
  padding: 15px;
  border: 1px solid rgba(238, 243, 255, 0.09);
  background: rgba(255, 255, 255, 0.035);
}

.event-card time,
.feature-item span {
  color: var(--gold-soft);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.event-card strong,
.feature-item strong {
  font-size: 1rem;
}

.event-card p,
.feature-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 52px 0 86px;
}

.page-hero {
  min-height: 36vh;
  display: grid;
  align-items: end;
  padding: 68px 0 32px;
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  color: rgba(238, 243, 255, 0.72);
  font-size: 1.05rem;
  line-height: 1.7;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.stat-card {
  min-height: 128px;
  padding: 18px;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 12px;
  color: var(--ice);
  font-family: "Cinzel", Georgia, serif;
  font-size: 2rem;
}

.stat-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.wiki-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.wiki-sidebar,
.admin-sidebar {
  position: sticky;
  top: calc(var(--header) + 18px);
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(198, 168, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(7, 6, 13, 0.7);
  backdrop-filter: blur(20px);
}

.filter-group {
  display: grid;
  gap: 8px;
}

.filter-group label,
.field label {
  color: var(--gold-soft);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field input,
.field select,
.field textarea,
.search-box input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 42px;
  display: block;
  color: var(--ice);
  border: 1px solid rgba(198, 168, 255, 0.22);
  border-radius: 6px;
  outline: none;
  background: rgba(3, 3, 7, 0.56);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.field input,
.field select,
.search-box input {
  padding: 0 12px;
}

.field textarea {
  min-height: 130px;
  padding: 12px;
  resize: vertical;
}

.form-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-box input:focus {
  border-color: rgba(216, 182, 107, 0.7);
  box-shadow: 0 0 0 3px rgba(216, 182, 107, 0.12);
}

.filter-chips,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 32px;
  padding: 0 10px;
  color: rgba(238, 243, 255, 0.75);
  border: 1px solid rgba(198, 168, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chip.active,
.chip:hover {
  color: #120d16;
  border-color: rgba(216, 182, 107, 0.68);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
}

.wiki-main {
  display: grid;
  gap: 16px;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(198, 168, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(7, 6, 13, 0.62);
  backdrop-filter: blur(18px);
}

.empty-state {
  padding: 36px;
  color: var(--muted);
  border: 1px solid rgba(198, 168, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(7, 6, 13, 0.58);
  text-align: center;
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  gap: 18px;
  align-items: start;
}

.auth-card,
.profile-card,
.editor-card,
.admin-card {
  min-width: 0;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(198, 168, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(9, 8, 17, 0.7);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.tab-row {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.tab-row button {
  flex: 1;
}

.auth-form {
  display: none;
  gap: 14px;
}

.auth-form.active {
  display: grid;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.help-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.profile-summary {
  display: grid;
  gap: 14px;
}

.guardian-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(216, 182, 107, 0.25);
  background: rgba(216, 182, 107, 0.07);
}

.guardian-emblem {
  display: grid;
  width: 74px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(198, 168, 255, 0.34);
  background: linear-gradient(135deg, rgba(111, 55, 191, 0.42), rgba(216, 182, 107, 0.18));
  font-family: "Cinzel", Georgia, serif;
  font-weight: 900;
}

.guardian-emblem.image {
  overflow: hidden;
  background: rgba(3, 3, 7, 0.76);
}

.guardian-emblem.image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guardian-roster {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guardian-roster span,
.role-matrix span {
  padding: 8px 10px;
  border: 1px solid rgba(198, 168, 255, 0.16);
  border-radius: 6px;
  color: rgba(238, 243, 255, 0.76);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.78rem;
}

.guardian-profile {
  position: relative;
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(216, 182, 107, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(216, 182, 107, 0.09), transparent 48%),
    rgba(6, 5, 12, 0.68);
}

.guardian-profile::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(3, 3, 7, 0.9), rgba(3, 3, 7, 0.42)),
    var(--guardian-cover, linear-gradient(135deg, rgba(111, 55, 191, 0.35), rgba(216, 182, 107, 0.14)));
  background-position: center;
  background-size: cover;
  opacity: 0.72;
}

.guardian-profile > * {
  position: relative;
  z-index: 1;
}

.guardian-profile-main {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.guardian-profile-copy {
  min-width: 0;
}

.guardian-profile-copy .eyebrow {
  margin-bottom: 6px;
}

.guardian-profile-copy strong {
  display: block;
  color: var(--ice);
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.25rem;
  overflow-wrap: anywhere;
}

.guardian-profile-copy span {
  display: block;
  margin-top: 5px;
  color: rgba(238, 243, 255, 0.78);
  font-size: 0.86rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.guardian-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.guardian-stat {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(238, 243, 255, 0.1);
  border-radius: 6px;
  background: rgba(3, 3, 7, 0.5);
}

.guardian-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.guardian-stat strong {
  display: block;
  margin-top: 6px;
  color: var(--gold-soft);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.guardian-character-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.guardian-character {
  position: relative;
  min-height: 86px;
  display: grid;
  align-content: end;
  gap: 3px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(198, 168, 255, 0.16);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(3, 3, 7, 0.06), rgba(3, 3, 7, 0.82)),
    var(--character-cover, rgba(255, 255, 255, 0.04));
  background-position: center;
  background-size: cover;
}

.guardian-character img {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(238, 243, 255, 0.22);
  object-fit: cover;
}

.guardian-character span,
.guardian-character strong {
  position: relative;
  z-index: 1;
}

.guardian-character span {
  color: var(--ice);
  font-size: 0.86rem;
  font-weight: 900;
}

.guardian-character strong {
  color: var(--gold-soft);
  font-size: 0.74rem;
}

.guardian-profile.compact {
  gap: 12px;
  padding: 12px;
}

.guardian-profile.compact .guardian-profile-stats,
.guardian-profile.compact .guardian-character-grid {
  grid-template-columns: 1fr;
}

.editor-author-panel {
  margin: 0 0 18px;
}

.article-card-author,
.row-bungie-mini {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.article-card-author {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(238, 243, 255, 0.12);
}

.article-card-author .guardian-emblem,
.row-bungie-mini .guardian-emblem {
  width: 34px;
}

.article-card-author span,
.article-card-author strong,
.row-bungie-mini span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-card-author span {
  color: var(--ice);
  font-size: 0.82rem;
  font-weight: 900;
}

.article-card-author strong,
.row-bungie-mini span {
  color: var(--muted);
  font-size: 0.72rem;
}

.row-bungie-mini {
  max-width: 520px;
  margin-top: 4px;
}

.preview-author {
  padding: 12px;
  border: 1px solid rgba(238, 243, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 18px;
  align-items: start;
  overflow: hidden;
}

.editor-card form {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.editor-permission-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.permission-chip {
  padding: 12px;
  border: 1px solid rgba(198, 168, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.permission-chip span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.permission-chip strong {
  display: block;
  margin-top: 6px;
  color: var(--gold-soft);
  overflow-wrap: anywhere;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(238, 243, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.editor-toolbar {
  display: grid;
  grid-template-columns: repeat(9, minmax(76px, 1fr));
}

.tool-btn {
  display: grid;
  min-height: 62px;
  place-items: center;
  gap: 4px;
  padding: 8px;
  color: var(--ice);
  border: 1px solid rgba(198, 168, 255, 0.18);
  border-radius: 6px;
  background: rgba(3, 3, 7, 0.42);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.tool-btn span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(216, 182, 107, 0.3);
  border-radius: 6px;
  color: var(--gold-soft);
  font-weight: 900;
}

.tool-btn small {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(216, 182, 107, 0.54);
  background: rgba(111, 55, 191, 0.18);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.tool-btn.featured {
  background:
    linear-gradient(135deg, rgba(216, 182, 107, 0.1), transparent 46%),
    rgba(111, 55, 191, 0.14);
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.upload-dropzone {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
  min-height: 220px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(198, 168, 255, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(216, 182, 107, 0.08), transparent 42%),
    rgba(3, 3, 7, 0.54);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.upload-dropzone:hover {
  transform: translateY(-2px);
  border-color: rgba(216, 182, 107, 0.52);
  background:
    linear-gradient(135deg, rgba(216, 182, 107, 0.12), transparent 42%),
    rgba(111, 55, 191, 0.13);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
}

.upload-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-kicker {
  color: var(--gold-soft);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.upload-dropzone strong {
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.1rem;
}

.upload-dropzone small {
  color: var(--muted);
  line-height: 1.45;
}

.media-remove-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.build-editor-block {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 16px;
  border: 1px solid rgba(216, 182, 107, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(216, 182, 107, 0.07), transparent 36%),
    rgba(255, 255, 255, 0.03);
}

.build-editor-block.is-hidden {
  display: none;
}

.category-detail-block {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  padding: 16px;
  border: 1px solid rgba(198, 168, 255, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(111, 55, 191, 0.12), transparent 42%),
    rgba(255, 255, 255, 0.028);
}

.category-fields {
  display: grid;
  gap: 12px;
}

.category-fields.is-hidden {
  display: none;
}

.field.is-hidden {
  display: none;
}

.article-only-field.is-hidden {
  display: none;
}

.editor-flow-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(216, 182, 107, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(216, 182, 107, 0.07), transparent 42%),
    rgba(255, 255, 255, 0.03);
}

.editor-flow-card span {
  color: var(--gold-soft);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.editor-flow-card strong {
  font-family: "Cinzel", Georgia, serif;
}

.save-state {
  min-height: 20px;
  margin: 0;
  color: var(--gold-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.inline-preview {
  display: grid;
  min-height: 108px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(238, 243, 255, 0.1);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(3, 3, 7, 0.48);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.inline-preview img,
.inline-preview video {
  width: 100%;
  height: 130px;
  object-fit: cover;
}

button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none !important;
}

.preview-pane {
  min-height: 510px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.preview-output {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(238, 243, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.preview-output h1,
.preview-output h2,
.preview-output h3 {
  margin: 16px 0 8px;
}

.preview-output p {
  color: rgba(238, 243, 255, 0.74);
  line-height: 1.72;
}

.preview-output ul,
.preview-output ol {
  color: rgba(238, 243, 255, 0.74);
  line-height: 1.7;
}

.editor-preview-article {
  display: grid;
  gap: 16px;
}

.editor-preview-cover {
  min-height: 250px;
  display: grid;
  align-content: end;
  gap: 10px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(198, 168, 255, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(3, 3, 7, 0.08), rgba(3, 3, 7, 0.88)),
    var(--cover, linear-gradient(135deg, rgba(111, 55, 191, 0.28), rgba(216, 182, 107, 0.12)));
  background-size: cover;
  background-position: center;
}

.editor-preview-cover h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  overflow-wrap: anywhere;
}

.editor-preview-cover p {
  margin: 0;
  color: rgba(238, 243, 255, 0.76);
  line-height: 1.6;
}

.compact-preview {
  padding: 0;
}

.admin-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-sidebar button {
  justify-content: flex-start;
  width: 100%;
}

.admin-stack {
  display: grid;
  gap: 16px;
}

.site-save-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.compact-date-field {
  min-width: min(220px, 100%);
}

.season-settings-card {
  display: grid;
  gap: 14px;
  background:
    linear-gradient(135deg, rgba(216, 182, 107, 0.08), transparent 44%),
    rgba(9, 8, 17, 0.72);
}

.season-archive-hint {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 12px;
  border: 1px solid rgba(216, 182, 107, 0.18);
  border-radius: 6px;
  background: rgba(216, 182, 107, 0.055);
}

.season-archive-hint span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.season-archive-hint strong {
  color: var(--gold-soft);
  overflow-wrap: anywhere;
}

.bots-settings-card {
  display: grid;
  gap: 14px;
}

.bots-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.bot-settings-panel {
  display: grid;
  gap: 12px;
  background:
    linear-gradient(135deg, rgba(111, 55, 191, 0.1), transparent 42%),
    rgba(255, 255, 255, 0.028);
}

.bot-settings-panel textarea[name$="Terms"],
.bot-settings-panel textarea[name$="Privacy"] {
  min-height: 210px;
}

.bot-image-dropzone {
  min-height: 190px;
}

.bot-image-dropzone .inline-preview img {
  height: 120px;
}

.dashboard-grid,
.clan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.clan-manifesto {
  min-height: 260px;
  align-content: end;
  background:
    linear-gradient(135deg, rgba(111, 55, 191, 0.18), transparent 45%),
    linear-gradient(180deg, rgba(9, 8, 17, 0.9), rgba(7, 6, 13, 0.74));
}

.clan-admin-summary {
  display: grid;
  gap: 12px;
}

.contact-actions {
  margin-top: 16px;
}

.small-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.role-matrix {
  display: grid;
  gap: 8px;
}

.mini-list {
  display: grid;
  gap: 10px;
}

.mini-item {
  display: grid;
  width: 100%;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(238, 243, 255, 0.09);
  border-radius: 6px;
  color: inherit;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.mini-item:hover {
  border-color: rgba(216, 182, 107, 0.44);
  background: rgba(216, 182, 107, 0.07);
  transform: translateY(-1px);
}

.mini-item span {
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-card h3,
.auth-card h3,
.profile-card h3,
.editor-card h3 {
  margin-bottom: 14px;
}

.user-list,
.comment-list,
.managed-list {
  display: grid;
  gap: 10px;
}

.user-row,
.comment-row,
.managed-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(238, 243, 255, 0.09);
  background: rgba(255, 255, 255, 0.035);
}

.managed-row {
  border-radius: var(--radius);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.row-title {
  display: grid;
  gap: 6px;
}

.row-title strong {
  color: var(--ice);
}

.row-title span,
.row-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: center;
  padding: 22px;
}

.modal-shell.open {
  display: grid;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 2, 6, 0.78);
  backdrop-filter: blur(10px);
}

.article-modal {
  position: relative;
  z-index: 1;
  width: min(100%, 1120px);
  max-height: min(92vh, 940px);
  overflow: auto;
  border: 1px solid rgba(198, 168, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(7, 6, 13, 0.96);
  box-shadow: var(--shadow);
  overscroll-behavior: contain;
  scroll-behavior: auto;
}

.close-btn {
  position: sticky;
  top: 14px;
  z-index: 2;
  float: right;
  width: 40px;
  height: 40px;
  margin: 14px 14px 0 0;
  color: var(--ice);
  border: 1px solid rgba(198, 168, 255, 0.28);
  border-radius: 6px;
  background: rgba(3, 3, 7, 0.72);
  cursor: pointer;
  font-size: 1.5rem;
}

.modal-cover {
  position: relative;
  min-height: 320px;
  padding: 34px;
  display: grid;
  align-items: end;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(3, 3, 7, 0.1), rgba(3, 3, 7, 0.9)),
    var(--cover);
  background-size: cover;
  background-position: center;
}

.modal-cover.has-image {
  min-height: 390px;
}

.modal-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(3, 3, 7, 0.05), rgba(3, 3, 7, 0.86)),
    linear-gradient(90deg, rgba(3, 3, 7, 0.76), rgba(3, 3, 7, 0.16) 52%, rgba(3, 3, 7, 0.72));
}

.modal-cover-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.08) brightness(0.9);
}

.modal-cover-copy {
  position: relative;
  z-index: 1;
}

.modal-cover h2 {
  max-width: 760px;
}

.modal-cover p {
  max-width: 720px;
  margin: 12px 0 0;
  color: rgba(238, 243, 255, 0.74);
  line-height: 1.65;
}

.article-content {
  min-width: 0;
  padding: 32px 40px 42px;
}

.article-detail-grid {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  gap: 0;
}

.article-toc {
  position: sticky;
  top: 0;
  align-self: start;
  display: grid;
  gap: 16px;
  padding: 32px 18px;
  overflow: visible;
  border-right: 1px solid rgba(198, 168, 255, 0.14);
  background: rgba(3, 3, 7, 0.44);
}

.article-author-band {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 1.4fr);
  gap: 16px;
  align-items: center;
  padding: 18px 22px;
  border-top: 1px solid rgba(198, 168, 255, 0.14);
  border-bottom: 1px solid rgba(198, 168, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(216, 182, 107, 0.08), transparent 48%),
    rgba(255, 255, 255, 0.032);
}

.article-author-identity {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.article-author-identity .guardian-emblem {
  width: 58px;
}

.article-author-identity strong,
.article-author-identity span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.article-author-identity strong {
  color: var(--ice);
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.15rem;
}

.article-author-identity span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.article-author-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.article-author-characters {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-author-characters span {
  padding: 7px 10px;
  border: 1px solid rgba(198, 168, 255, 0.16);
  border-radius: 999px;
  color: rgba(238, 243, 255, 0.78);
  background: rgba(3, 3, 7, 0.46);
  font-size: 0.78rem;
  font-weight: 800;
}

.article-meta.vertical {
  display: grid;
  align-items: start;
}

.article-toc nav {
  display: grid;
  gap: 8px;
}

.article-toc nav strong {
  color: var(--gold-soft);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-toc nav button {
  min-height: 32px;
  padding: 0;
  color: rgba(238, 243, 255, 0.72);
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.article-toc nav button:hover {
  color: var(--gold-soft);
}

.guardian-mini {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(216, 182, 107, 0.18);
  border-radius: 6px;
  background: rgba(216, 182, 107, 0.06);
}

.guardian-mini .guardian-emblem {
  width: 42px;
}

.guardian-mini span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.article-score {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.article-score div {
  padding: 12px;
  border: 1px solid rgba(198, 168, 255, 0.15);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.article-score span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.article-score strong {
  display: block;
  margin-top: 6px;
  color: var(--gold-soft);
  overflow-wrap: anywhere;
}

.build-detail-panel {
  margin: 18px 0 26px;
  padding: 18px;
  border: 1px solid rgba(216, 182, 107, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(216, 182, 107, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.03);
}

.article-detail-panel {
  display: grid;
  gap: 16px;
  margin: 18px 0 26px;
  padding: 18px;
  border: 1px solid rgba(198, 168, 255, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(111, 55, 191, 0.11), transparent 44%),
    rgba(255, 255, 255, 0.03);
}

.article-detail-panel h3 {
  margin: 6px 0 0;
}

.detail-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-list span {
  padding: 8px 10px;
  border: 1px solid rgba(216, 182, 107, 0.2);
  border-radius: 6px;
  color: rgba(238, 243, 255, 0.82);
  background: rgba(216, 182, 107, 0.065);
  font-size: 0.86rem;
  font-weight: 800;
}

.god-roll-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.related-grid .article-card {
  min-height: 250px;
}

mark {
  color: #120d16;
  border-radius: 4px;
  background: var(--gold-soft);
  box-shadow: 0 0 16px rgba(216, 182, 107, 0.28);
}

.article-content p,
.article-content li,
.article-content td,
.article-content th {
  color: rgba(238, 243, 255, 0.76);
  line-height: 1.78;
}

.article-content h2,
.article-content h3 {
  margin: 28px 0 14px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.article-content h2:first-child,
.article-content h3:first-child {
  margin-top: 0;
}

.article-content a {
  color: var(--gold-soft);
  text-decoration: underline;
}

.article-content table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
}

.video-frame {
  margin: 22px 0;
  overflow: hidden;
  border: 1px solid rgba(198, 168, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(3, 3, 7, 0.54);
  aspect-ratio: 16 / 9;
}

.video-frame iframe,
.video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-frame video {
  object-fit: contain;
}

.article-content th,
.article-content td {
  padding: 12px;
  border: 1px solid rgba(238, 243, 255, 0.12);
}

.article-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}

.build-actions {
  margin-top: 6px;
}

.build-dim-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #100b14;
  text-decoration: none;
}

.article-content .build-dim-link,
.article-content .build-dim-link:hover {
  color: #100b14;
  text-decoration: none;
}

.step-list {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.step-list li {
  position: relative;
  padding: 14px 14px 14px 52px;
  border: 1px solid rgba(198, 168, 255, 0.16);
  background: rgba(255, 255, 255, 0.035);
  counter-increment: steps;
}

.step-list li::before {
  position: absolute;
  top: 14px;
  left: 14px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #120d16;
  background: var(--gold);
  border-radius: 50%;
  content: counter(steps);
  font-size: 0.76rem;
  font-weight: 900;
}

.build-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.build-card {
  padding: 14px;
}

.build-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.build-card strong {
  display: block;
  margin-top: 8px;
  color: var(--gold-soft);
  font-size: 1.3rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.build-stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.build-rotation {
  padding: 14px;
  border: 1px solid rgba(198, 168, 255, 0.16);
  background: rgba(255, 255, 255, 0.035);
  white-space: pre-wrap;
}

.comments-box {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.comments-box textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  color: var(--ice);
  border: 1px solid rgba(198, 168, 255, 0.22);
  border-radius: 6px;
  background: rgba(3, 3, 7, 0.56);
  resize: vertical;
}

.toast-zone {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 180;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
}

.toast {
  padding: 14px 16px;
  border: 1px solid rgba(216, 182, 107, 0.34);
  border-radius: var(--radius);
  color: var(--ice);
  background: rgba(7, 6, 13, 0.9);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  animation: toastIn 260ms ease both;
}

.reveal {
  opacity: 1;
  transform: translateY(0);
}

.hero .reveal {
  opacity: 1;
  transform: none;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 680ms ease, transform 680ms ease;
}

@keyframes heroDrift {
  0% {
    transform: scale(1.02) translate3d(0, 0, 0);
  }
  100% {
    transform: scale(1.07) translate3d(-1.4%, 0.8%, 0);
  }
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sigilPulse {
  0%,
  100% {
    filter: drop-shadow(0 0 10px rgba(111, 55, 191, 0.42));
    transform: scale(0.98);
  }
  50% {
    filter: drop-shadow(0 0 26px rgba(216, 182, 107, 0.45));
    transform: scale(1.04);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .site-header {
    grid-template-columns: auto auto auto;
    justify-content: space-between;
  }

  .nav-toggle {
    display: inline-grid;
  }

  .main-nav {
    position: fixed;
    top: var(--header);
    left: 16px;
    right: 16px;
    display: none;
    max-height: calc(100vh - var(--header) - 28px);
    padding: 12px;
    overflow: auto;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid rgba(198, 168, 255, 0.22);
    border-radius: var(--radius);
    background: rgba(7, 6, 13, 0.94);
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav .mobile-only {
    display: inline-grid !important;
  }

  .main-nav a {
    justify-content: flex-start;
  }

  .hero,
  .auth-grid,
  .editor-grid,
  .admin-layout,
  .wiki-layout,
  .article-detail-grid,
  .article-author-band {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 980px;
    align-items: center;
  }

  .wiki-sidebar,
  .admin-sidebar,
  .article-toc {
    position: static;
  }

  .article-toc {
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid rgba(198, 168, 255, 0.14);
  }

  .article-author-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-grid,
  .article-strip,
  .category-grid,
  .bots-grid,
  .stats-grid,
  .build-grid,
  .god-roll-grid,
  .article-score,
  .dashboard-grid,
  .clan-grid,
  .guardian-profile-stats,
  .guardian-character-grid,
  .editor-permission-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editor-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  :root {
    --header: 70px;
  }

  .site-header {
    grid-template-columns: auto auto;
    justify-content: start;
    padding: 10px 14px;
    gap: 18px;
  }

  .header-actions {
    display: none;
  }

  .brand {
    min-width: 0;
  }

  .brand strong {
    max-width: 128px;
    overflow: hidden;
    font-size: 0.86rem;
    text-overflow: ellipsis;
  }

  .brand small,
  #soundToggle {
    display: none;
  }

  .ghost-btn {
    max-width: 74px;
    min-height: 36px;
    padding: 0 10px;
    overflow: hidden;
    font-size: 0.72rem;
    text-overflow: ellipsis;
  }

  .hero {
    min-height: 840px;
    padding: calc(var(--header) + 22px) 20px 48px;
    overflow-x: hidden;
  }

  .hero-content,
  .hero-console {
    width: 100%;
    max-width: min(350px, 100%);
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-copy strong {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .console-line strong {
    font-size: 1rem;
  }

  h1 {
    font-size: clamp(3rem, 17vw, 5.2rem);
  }

  .content-band,
  .page-shell {
    width: min(100% - 28px, 1180px);
  }

  .section-heading,
  .split-band {
    display: grid;
    grid-template-columns: 1fr;
  }

  .article-grid,
  .article-strip,
  .category-grid,
  .bots-grid,
  .stats-grid,
  .build-grid,
  .god-roll-grid,
  .article-score,
  .dashboard-grid,
  .clan-grid,
  .bots-settings-grid,
  .guardian-profile-stats,
  .guardian-character-grid,
  .form-grid.two,
  .upload-grid,
  .editor-permission-strip {
    grid-template-columns: 1fr;
  }

  .editor-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-box,
  .user-row,
  .comment-row,
  .managed-row {
    grid-template-columns: 1fr;
  }

  .row-actions {
    justify-content: flex-start;
  }

  .modal-shell {
    padding: 10px;
  }

  .modal-cover,
  .article-content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .modal-cover.has-image {
    min-height: 330px;
  }

  .article-author-band,
  .article-author-stats {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
