:root {
  color-scheme: dark;
  --bg: #04070d;
  --bg-deep: #010309;
  --surface: rgba(8, 13, 22, 0.72);
  --surface-heavy: rgba(3, 6, 12, 0.88);
  --surface-soft: rgba(18, 28, 42, 0.48);
  --glass: rgba(11, 18, 29, 0.58);
  --glass-bright: rgba(45, 65, 85, 0.34);
  --frost-glass: rgba(11, 28, 45, 0.46);
  --frost-glass-deep: rgba(2, 9, 18, 0.72);
  --frost-line: rgba(185, 220, 248, 0.36);
  --frost-sheen: rgba(218, 242, 255, 0.12);
  --text: #f1eee7;
  --muted: #b6bec8;
  --faint: #778391;
  --gold: #ddb963;
  --gold-bright: #f3d891;
  --gold-dim: rgba(221, 185, 99, 0.18);
  --ice: #b9dcf8;
  --ice-bright: #74b7e7;
  --ice-dim: rgba(185, 220, 248, 0.16);
  --ember: #8e312f;
  --line: rgba(221, 185, 99, 0.28);
  --line-cool: rgba(185, 220, 248, 0.22);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.58);
  --shadow-tight: 0 14px 38px rgba(0, 0, 0, 0.42);
  --font-body: Georgia, "Times New Roman", serif;
  --font-display: "Cinzel Decorative", "Cinzel", "Trajan Pro", "Luminari", "Palatino Linotype", Georgia, serif;
  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 8px;
  --sidebar: 284px;
  --rail: 232px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.66;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(1, 3, 9, 0.66);
}

::-webkit-scrollbar-thumb {
  border: 3px solid rgba(1, 3, 9, 0.72);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(221, 185, 99, 0.78), rgba(116, 183, 231, 0.42));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(1, 3, 9, 0.98), rgba(7, 12, 20, 0.74) 50%, rgba(1, 3, 9, 0.97)),
    radial-gradient(ellipse at 50% -20%, rgba(116, 183, 231, 0.34), transparent 48%),
    radial-gradient(ellipse at 7% 18%, rgba(221, 185, 99, 0.13), transparent 31%),
    radial-gradient(ellipse at 92% 82%, rgba(142, 49, 47, 0.2), transparent 34%),
    linear-gradient(132deg, transparent 17%, rgba(185, 220, 248, 0.05) 34%, transparent 55%, rgba(221, 185, 99, 0.045) 75%, transparent),
    url("assets/stone-texture.webp") center / cover no-repeat;
  filter: contrast(1.12) saturate(0.85);
  z-index: -4;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.024) 0 1px, transparent 1px 74px),
    repeating-linear-gradient(0deg, rgba(185, 220, 248, 0.018) 0 1px, transparent 1px 68px),
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.42));
  opacity: 0.5;
  z-index: -3;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(118deg, transparent 17%, rgba(185, 220, 248, 0.11), transparent 38%),
    linear-gradient(164deg, transparent 34%, rgba(221, 185, 99, 0.06), transparent 62%);
  mix-blend-mode: screen;
  opacity: 0.72;
  z-index: -2;
  animation: auroraDrift 18s ease-in-out infinite alternate;
}

a {
  color: var(--ice);
  text-decoration: none;
}

a:hover {
  color: var(--gold-bright);
}

button,
input {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--rail);
  min-height: 100vh;
  min-height: 100dvh;
}

.sidebar,
.context-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(12, 20, 31, 0.88), rgba(3, 6, 12, 0.82)),
    linear-gradient(115deg, rgba(185, 220, 248, 0.09), transparent 34%),
    var(--surface-heavy);
  backdrop-filter: blur(30px) saturate(1.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 0 70px rgba(116, 183, 231, 0.055);
}

.sidebar::before,
.context-rail::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(221, 185, 99, 0.18), transparent 18%, transparent 82%, rgba(116, 183, 231, 0.09)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 18px);
  opacity: 0.42;
}

.sidebar {
  border-right: 1px solid var(--line);
  padding: 18px 14px 8px;
  box-shadow: 20px 0 78px rgba(0, 0, 0, 0.34), inset -1px 0 0 rgba(185, 220, 248, 0.08);
}

.context-rail {
  border-left: 1px solid var(--line);
  padding: 22px 10px;
  box-shadow: -20px 0 78px rgba(0, 0, 0, 0.34), inset 1px 0 0 rgba(185, 220, 248, 0.08);
}

.brand {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(221, 185, 99, 0.72);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 18%, rgba(243, 216, 145, 0.48), transparent 34%),
    conic-gradient(from 18deg, rgba(221, 185, 99, 0.16), transparent 16%, rgba(185, 220, 248, 0.25), transparent 52%, rgba(221, 185, 99, 0.18)),
    rgba(5, 8, 14, 0.92);
  color: var(--gold-bright);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  box-shadow: 0 0 0 5px rgba(221, 185, 99, 0.045), 0 0 38px rgba(221, 185, 99, 0.24);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(221, 185, 99, 0.22);
  transform: rotate(45deg);
}

.brand-mark::after {
  inset: 15px;
  border-color: rgba(185, 220, 248, 0.2);
}

.brand-title {
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.15;
}

.brand-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.66rem;
  line-height: 1.25;
}

.search-wrap {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 10px;
  height: 40px;
  margin-bottom: 14px;
  padding: 0 12px;
  border: 1px solid rgba(185, 220, 248, 0.26);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(17, 26, 39, 0.72), rgba(3, 6, 12, 0.62)),
    rgba(3, 5, 9, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 0 30px rgba(185, 220, 248, 0.075), var(--shadow-tight);
}

.search-wrap:focus-within {
  border-color: rgba(221, 185, 99, 0.68);
  box-shadow: 0 0 0 3px rgba(221, 185, 99, 0.09), inset 0 0 30px rgba(185, 220, 248, 0.12);
}

.search-wrap svg,
.icon-button svg,
.nav-icon svg,
.section-glyph svg,
.related-rune svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.85;
}

.search-wrap input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.78rem;
}

.search-wrap input::placeholder {
  color: var(--faint);
}

.category-nav {
  display: grid;
  gap: 6px;
  margin-bottom: 0;
}

.nav-group {
  position: relative;
  display: grid;
  gap: 4px;
}

.nav-group::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 36px;
  bottom: 2px;
  width: 1px;
  background: linear-gradient(180deg, rgba(221, 185, 99, 0.26), rgba(185, 220, 248, 0.09), transparent);
  opacity: 0;
}

.nav-group.is-expanded::before {
  opacity: 1;
}

.category-button,
.page-link,
.related-link,
.feature-link {
  border-radius: var(--radius);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.category-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid transparent;
  background: linear-gradient(90deg, rgba(185, 220, 248, 0.035), transparent 64%);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.76rem;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.category-label {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.category-caret {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: 0.78;
  transform: rotate(-45deg);
  transition: transform 0.18s ease;
}

.nav-group.is-expanded .category-caret {
  transform: rotate(45deg);
}

.nav-icon {
  display: grid;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--gold);
}

.category-button:hover,
.category-button.is-active {
  border-color: rgba(221, 185, 99, 0.44);
  background:
    linear-gradient(90deg, rgba(221, 185, 99, 0.14), rgba(185, 220, 248, 0.065) 72%, transparent),
    rgba(255, 255, 255, 0.025);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.nested-pages {
  display: grid;
  gap: 4px;
  margin-left: 14px;
  padding: 2px 0 8px 10px;
}

.nested-pages:empty {
  display: none;
  margin: 0;
  padding: 0;
}

.page-list {
  display: grid;
  gap: 18px;
  padding-bottom: 34px;
}

.page-list:empty {
  display: none;
  padding-bottom: 0;
}

.page-group h2,
.rail-block h2 {
  margin: 0 0 8px;
  color: var(--gold-bright);
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.page-link {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  padding: 8px;
  border: 1px solid transparent;
  color: var(--text);
}

.nav-home {
  grid-template-columns: 22px minmax(0, 1fr);
  margin-bottom: 6px;
  border-color: rgba(221, 185, 99, 0.18);
  background:
    linear-gradient(135deg, rgba(221, 185, 99, 0.08), rgba(185, 220, 248, 0.035)),
    rgba(255, 255, 255, 0.018);
}

.page-link:hover,
.page-link.is-active {
  border-color: rgba(185, 220, 248, 0.36);
  background:
    linear-gradient(90deg, rgba(116, 183, 231, 0.17), rgba(221, 185, 99, 0.06) 62%, transparent),
    rgba(255, 255, 255, 0.028);
  box-shadow: inset 3px 0 0 rgba(116, 183, 231, 0.86), inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.page-marker {
  width: 13px;
  height: 13px;
  justify-self: center;
  border: 0;
  background: url("assets/ui/norse_dragon_bullet_01_crystal_knotwork.webp?v=ornament-fix-2") center / contain no-repeat;
  filter: drop-shadow(0 0 5px rgba(185, 220, 248, 0.2)) drop-shadow(0 0 4px rgba(221, 185, 99, 0.18));
  opacity: 0.76;
}

.page-link.is-active .page-marker,
.page-link:hover .page-marker {
  background-image: url("assets/ui/norse_dragon_bullet_02_dragon_spear.webp?v=ornament-fix-2");
  opacity: 0.95;
}

.page-link-copy,
.related-copy {
  display: grid;
  min-width: 0;
}

.page-link-title {
  overflow: hidden;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-link-meta {
  overflow: hidden;
  color: var(--faint);
  font-family: var(--font-ui);
  font-size: 0.66rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px 44px;
  align-items: center;
  min-height: 64px;
  padding: 9px 28px;
  border-bottom: 1px solid rgba(221, 185, 99, 0.24);
  background:
    linear-gradient(90deg, rgba(4, 8, 14, 0.93), rgba(13, 21, 31, 0.72), rgba(4, 8, 14, 0.9)),
    rgba(5, 7, 11, 0.82);
  backdrop-filter: blur(26px) saturate(1.22);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.3), inset 0 -1px 0 rgba(185, 220, 248, 0.08);
}

.topbar-current {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 750;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-current strong {
  overflow: hidden;
  max-width: 28ch;
  color: var(--text);
  text-overflow: ellipsis;
}

.topbar-crumb {
  overflow: hidden;
  max-width: 18ch;
  color: var(--faint);
  text-overflow: ellipsis;
}

.topbar-separator {
  width: 5px;
  height: 5px;
  border-top: 1px solid rgba(221, 185, 99, 0.8);
  border-right: 1px solid rgba(221, 185, 99, 0.8);
  transform: rotate(45deg);
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(221, 185, 99, 0.34);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20, 30, 43, 0.78), rgba(5, 8, 14, 0.76));
  color: var(--muted);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.icon-button[hidden] {
  display: none;
}

.edit-page-button {
  text-decoration: none;
}

.topbar .icon-button:first-child {
  visibility: hidden;
}

.rail-toggle {
  display: none !important;
  visibility: hidden;
}

.icon-button:hover,
.icon-button.is-active {
  border-color: var(--gold);
  color: var(--gold-bright);
  background: linear-gradient(180deg, rgba(221, 185, 99, 0.15), rgba(116, 183, 231, 0.08));
  box-shadow: 0 0 24px rgba(221, 185, 99, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.drawer-close,
.drawer-backdrop {
  display: none;
}

.drawer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(221, 185, 99, 0.36);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(20, 30, 43, 0.86), rgba(5, 8, 14, 0.82)),
    rgba(2, 5, 10, 0.7);
  color: var(--gold-bright);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 22px rgba(0, 0, 0, 0.24);
}

.drawer-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.drawer-close:hover {
  border-color: rgba(185, 220, 248, 0.5);
  color: #d8efff;
}

body.modal-open {
  overflow: hidden;
}

.notice-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.notice-modal.is-visible {
  display: flex;
}

.notice-modal__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(116, 183, 231, 0.2), transparent 44%),
    rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px) saturate(1.1);
}

.notice-modal__panel {
  position: relative;
  isolation: isolate;
  width: min(100%, 520px);
  padding: 30px;
  border: 1px solid rgba(221, 185, 99, 0.42);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(218, 242, 255, 0.16), rgba(116, 183, 231, 0.055) 38%, transparent 72%),
    radial-gradient(ellipse at 20% 0%, rgba(185, 220, 248, 0.18), transparent 54%),
    linear-gradient(180deg, rgba(10, 24, 39, 0.94), rgba(2, 6, 13, 0.96));
  box-shadow:
    0 34px 110px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(185, 220, 248, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 70px rgba(116, 183, 231, 0.08);
  overflow: hidden;
}

.notice-modal__panel::before {
  content: "";
  position: absolute;
  inset: -21% -16%;
  z-index: -1;
  background: url("assets/ui/rb_text_border.webp?v=ornament-fix-2") center / 100% 100% no-repeat;
  filter: drop-shadow(0 0 18px rgba(221, 185, 99, 0.2)) drop-shadow(0 0 18px rgba(116, 183, 231, 0.14));
  opacity: 0.62;
  pointer-events: none;
}

.notice-modal__panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.12), transparent 18%, transparent 66%, rgba(185, 220, 248, 0.11)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.032) 0 1px, transparent 1px 18px);
  opacity: 0.62;
  pointer-events: none;
}

.notice-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(221, 185, 99, 0.36);
  border-radius: var(--radius);
  background: rgba(4, 8, 15, 0.72);
  color: var(--muted);
  cursor: pointer;
}

.notice-modal__close:hover {
  border-color: rgba(185, 220, 248, 0.52);
  color: var(--ice);
}

.notice-modal__close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.notice-modal__sigil {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  place-items: center;
  border: 1px solid rgba(221, 185, 99, 0.58);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 18%, rgba(243, 216, 145, 0.42), transparent 34%),
    conic-gradient(from 18deg, rgba(221, 185, 99, 0.18), transparent 18%, rgba(185, 220, 248, 0.26), transparent 58%, rgba(221, 185, 99, 0.2)),
    rgba(3, 6, 12, 0.82);
  color: var(--gold-bright);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  box-shadow: 0 0 30px rgba(221, 185, 99, 0.18);
}

.notice-modal__eyebrow {
  margin: 0 0 8px;
  color: var(--gold-bright);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.notice-modal h2 {
  margin: 0;
  color: #f6f0e4;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  line-height: 1;
}

.notice-modal p {
  margin: 16px 0 0;
  color: #d8e7f2;
  font-size: 1rem;
  line-height: 1.65;
}

.notice-modal__url {
  display: block;
  overflow: hidden;
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(185, 220, 248, 0.23);
  border-radius: var(--radius);
  background: rgba(2, 6, 12, 0.48);
  color: var(--ice);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}

.notice-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(185, 220, 248, 0.26);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.notice-button:hover {
  transform: translateY(-1px);
}

.notice-button--ghost {
  background: rgba(4, 8, 15, 0.42);
  color: var(--muted);
}

.notice-button--ghost:hover {
  border-color: rgba(185, 220, 248, 0.48);
  color: var(--ice);
}

.notice-button--primary {
  border-color: rgba(221, 185, 99, 0.58);
  background:
    linear-gradient(180deg, rgba(221, 185, 99, 0.28), rgba(116, 183, 231, 0.11)),
    rgba(7, 12, 20, 0.74);
  color: var(--gold-bright);
  box-shadow: 0 0 28px rgba(221, 185, 99, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.notice-button--primary:hover {
  border-color: rgba(243, 216, 145, 0.8);
  color: #fff6dc;
}

.is-hidden {
  display: none !important;
}

.access-page.is-access-checking .app-shell,
.access-page.is-access-checking .editor-shell {
  visibility: hidden;
}

.coming-soon-page .app-shell {
  display: block;
}

.coming-soon-page {
  overflow-x: clip;
}

.coming-soon-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100vh;
  padding: clamp(14px, 2vw, 22px);
}

.coming-soon-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 1160px);
  margin: 0 auto;
  gap: 18px;
}

.coming-soon-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.coming-soon-brand .brand-mark {
  width: 46px;
  height: 46px;
}

.coming-soon-brand strong {
  display: block;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 0.96rem;
  letter-spacing: 0.06em;
}

.coming-soon-brand span:last-child {
  display: block;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  line-height: 1.2;
}

.coming-soon-contributor {
  min-height: 40px;
}

.coming-soon-main {
  position: relative;
  display: grid;
  width: min(100%, 1160px);
  min-height: 0;
  margin: 0 auto;
  padding: clamp(44px, 8vh, 96px) 0 clamp(34px, 6vh, 70px);
  align-items: center;
  justify-items: center;
}

.coming-soon-hero {
  position: relative;
  isolation: isolate;
  width: min(100%, 900px);
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 58px);
  border: 1px solid rgba(221, 185, 99, 0.34);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(3, 6, 12, 0.92), rgba(12, 24, 38, 0.72)),
    radial-gradient(ellipse at 50% -8%, rgba(116, 183, 231, 0.3), transparent 46%),
    radial-gradient(ellipse at 18% 0%, rgba(116, 183, 231, 0.3), transparent 46%),
    rgba(3, 6, 12, 0.56);
  text-align: center;
  box-shadow:
    0 42px 130px rgba(0, 0, 0, 0.66),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 90px rgba(116, 183, 231, 0.08);
}

.coming-soon-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("assets/ui/rb_border.webp?v=ornament-fix-2") center / 100% 100% no-repeat;
  opacity: 0.58;
  filter: drop-shadow(0 0 22px rgba(221, 185, 99, 0.24));
  pointer-events: none;
}

.coming-soon-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 -92px;
  z-index: -2;
  height: 300px;
  background:
    radial-gradient(ellipse at center, rgba(116, 183, 231, 0.2), transparent 62%),
    url("assets/ui/rb_shield_crest.webp") center / contain no-repeat;
  opacity: 0.24;
  filter: saturate(1.1) contrast(1.12);
  pointer-events: none;
}

.coming-soon-hero h1 {
  max-width: 15ch;
  margin: 0;
  margin-inline: auto;
  color: #f6f0e4;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.4vw, 4.9rem);
  font-weight: 700;
  line-height: 1.02;
  text-wrap: balance;
  text-shadow: 0 0 36px rgba(185, 220, 248, 0.26);
}

.coming-soon-hero p {
  max-width: 62ch;
  margin: 22px 0 0;
  color: #d8e7f2;
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.7;
}

.coming-soon-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(24px, 4vw, 38px);
}

.contributor-unlocked {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 680px;
  margin: 22px auto 0;
  padding: 12px;
  border: 1px solid rgba(116, 183, 231, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(20, 43, 63, 0.46), rgba(4, 9, 16, 0.54)),
    rgba(7, 12, 20, 0.62);
  color: var(--ice);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 44px rgba(0, 0, 0, 0.2);
}

.contributor-unlocked span {
  flex: 1 1 220px;
}

.coming-soon-footer {
  width: min(100%, 1160px);
  margin: 0 auto;
  color: var(--faint);
  font-family: var(--font-ui);
  font-size: 0.74rem;
  text-align: center;
}

.coming-soon-footer a {
  color: var(--ice);
}

.contributor-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.contributor-form label {
  display: grid;
  gap: 7px;
  color: var(--gold-bright);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.contributor-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(185, 220, 248, 0.3);
  border-radius: var(--radius);
  outline: 0;
  padding: 0 12px;
  background:
    linear-gradient(180deg, rgba(17, 26, 39, 0.72), rgba(3, 6, 12, 0.62)),
    rgba(3, 5, 9, 0.68);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

.contributor-form input:focus {
  border-color: rgba(221, 185, 99, 0.68);
  box-shadow: 0 0 0 3px rgba(221, 185, 99, 0.1);
}

.contributor-note {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  line-height: 1.45;
}

.legal-shell {
  min-height: 100vh;
  padding: clamp(14px, 2vw, 22px);
}

.legal-document {
  position: relative;
  width: min(100%, 900px);
  margin: clamp(34px, 7vh, 74px) auto;
  padding: clamp(26px, 5vw, 54px);
  border: 1px solid rgba(221, 185, 99, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(12, 24, 38, 0.82), rgba(4, 8, 15, 0.76)),
    rgba(4, 9, 16, 0.78);
  color: var(--text);
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.54),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.legal-document h1,
.legal-document h2 {
  color: var(--gold-bright);
  font-family: var(--font-display);
}

.legal-document h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
}

.legal-document h2 {
  margin: 32px 0 10px;
  font-size: clamp(1.18rem, 2vw, 1.42rem);
}

.legal-document p {
  margin: 0 0 14px;
  color: #d8e7f2;
  line-height: 1.72;
}

.editor-page {
  font-family: var(--font-ui);
}

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

.editor-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(230px, 0.7fr) minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 76px;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(221, 185, 99, 0.24);
  background:
    linear-gradient(90deg, rgba(4, 8, 14, 0.95), rgba(13, 21, 31, 0.78), rgba(4, 8, 14, 0.92)),
    rgba(5, 7, 11, 0.84);
  backdrop-filter: blur(26px) saturate(1.22);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.32), inset 0 -1px 0 rgba(185, 220, 248, 0.08);
}

.editor-status {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(185, 220, 248, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(17, 31, 48, 0.56), rgba(3, 6, 12, 0.58)),
    rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.editor-actions,
.editor-section-actions,
.editor-mini-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-library {
  position: sticky;
  top: 76px;
  height: calc(100vh - 76px);
  height: calc(100dvh - 76px);
  min-height: calc(100vh - 76px);
  min-height: calc(100dvh - 76px);
  overflow: auto;
  padding: 16px;
  border-right: 1px solid rgba(221, 185, 99, 0.26);
  background:
    linear-gradient(180deg, rgba(12, 20, 31, 0.88), rgba(3, 6, 12, 0.82)),
    linear-gradient(115deg, rgba(185, 220, 248, 0.09), transparent 34%),
    var(--surface-heavy);
  box-shadow: 20px 0 78px rgba(0, 0, 0, 0.32), inset -1px 0 0 rgba(185, 220, 248, 0.08);
}

.editor-workspace {
  min-width: 0;
  padding: 20px;
}

.editor-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--frost-line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(218, 242, 255, 0.15), rgba(116, 183, 231, 0.05) 34%, transparent 68%),
    linear-gradient(180deg, var(--frost-glass), var(--frost-glass-deep)),
    rgba(3, 7, 14, 0.56);
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(116, 183, 231, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 0 -1px 0 rgba(116, 183, 231, 0.12);
  backdrop-filter: blur(26px) saturate(1.28);
}

.editor-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.11), transparent 18%, transparent 66%, rgba(185, 220, 248, 0.1)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.026) 0 1px, transparent 1px 18px);
  opacity: 0.68;
}

.editor-panel--compact {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
}

.editor-panel--pages {
  padding: 14px;
}

.editor-panel h2,
.editor-section-head h2 {
  margin: 0;
  color: var(--gold-bright);
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.editor-search {
  margin: 0;
}

.editor-wide-action {
  width: 100%;
}

.editor-category-list,
.editor-page-list {
  display: grid;
  gap: 8px;
}

.editor-category-group {
  display: grid;
  gap: 7px;
}

.editor-category-pages {
  display: grid;
  gap: 7px;
  padding-left: 10px;
}

.editor-category-chip,
.editor-page-row {
  width: 100%;
  border: 1px solid rgba(185, 220, 248, 0.14);
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(185, 220, 248, 0.05), transparent 70%);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.editor-category-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 7px 9px;
  font-size: 0.78rem;
  font-weight: 800;
}

.editor-category-chip small {
  color: var(--faint);
}

.editor-page-row {
  display: grid;
  gap: 3px;
  padding: 10px;
  text-align: left;
}

.editor-page-row--nested {
  padding: 8px 10px;
  background: linear-gradient(90deg, rgba(116, 183, 231, 0.07), transparent 74%);
}

.editor-page-row span {
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-page-row small {
  overflow: hidden;
  color: var(--faint);
  font-size: 0.66rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-category-chip:hover,
.editor-category-chip.is-active,
.editor-page-row:hover,
.editor-page-row.is-active {
  border-color: rgba(221, 185, 99, 0.46);
  background:
    linear-gradient(90deg, rgba(221, 185, 99, 0.15), rgba(116, 183, 231, 0.08) 72%, transparent),
    rgba(255, 255, 255, 0.026);
  transform: translateY(-1px);
}

.editor-add-category {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.editor-add-category label,
.editor-template-select,
.editor-form label,
.editor-section-card label {
  display: grid;
  gap: 7px;
  color: var(--gold-bright);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.editor-add-category > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.editor-add-category input,
.editor-template-select select,
.editor-form input,
.editor-form select,
.editor-section-card input,
.editor-section-card textarea,
.editor-markdown-panel textarea {
  width: 100%;
  border: 1px solid rgba(185, 220, 248, 0.26);
  border-radius: var(--radius);
  outline: 0;
  background:
    linear-gradient(180deg, rgba(17, 26, 39, 0.72), rgba(3, 6, 12, 0.62)),
    rgba(3, 5, 9, 0.68);
  color: var(--text);
  font-family: var(--font-ui);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.editor-add-category input,
.editor-form input,
.editor-form select,
.editor-section-card input {
  min-height: 42px;
  padding: 0 11px;
  font-size: 0.82rem;
}

.editor-section-card textarea,
.editor-markdown-panel textarea {
  min-height: 210px;
  resize: vertical;
  padding: 13px;
  font-size: 0.88rem;
  line-height: 1.58;
}

.editor-add-category input:focus,
.editor-template-select select:focus,
.editor-form input:focus,
.editor-form select:focus,
.editor-section-card input:focus,
.editor-section-card textarea:focus,
.editor-markdown-panel textarea:focus {
  border-color: rgba(221, 185, 99, 0.64);
  box-shadow: 0 0 0 3px rgba(221, 185, 99, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.editor-hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 24px;
}

.editor-hero-panel h1 {
  margin: 0;
  color: #f6f0e4;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 4.2rem);
  line-height: 0.95;
}

.editor-hero-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.editor-save-card {
  display: grid;
  gap: 9px;
  min-width: min(100%, 230px);
  padding: 14px;
  border: 1px solid rgba(221, 185, 99, 0.24);
  border-radius: var(--radius);
  background: rgba(2, 6, 12, 0.4);
}

.editor-save-card strong {
  color: var(--gold-bright);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.editor-save-card span {
  color: var(--muted);
  font-size: 0.78rem;
}

.editor-save-card .editor-session-code-note {
  color: var(--ice);
}

.editor-save-card label {
  display: grid;
  gap: 6px;
  color: var(--gold-bright);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.editor-save-card input {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(185, 220, 248, 0.24);
  border-radius: var(--radius);
  outline: 0;
  background:
    linear-gradient(180deg, rgba(17, 26, 39, 0.72), rgba(3, 6, 12, 0.62)),
    rgba(3, 5, 9, 0.68);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.78rem;
}

.editor-save-card input:focus {
  border-color: rgba(221, 185, 99, 0.64);
  box-shadow: 0 0 0 3px rgba(221, 185, 99, 0.1);
}

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.94fr);
  gap: 18px;
  margin-bottom: 18px;
}

.editor-form,
.editor-preview-card,
.editor-image-panel,
.editor-sections-panel,
.editor-markdown-panel {
  padding: 18px;
}

.editor-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.editor-section-head > span {
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.editor-markdown-guide {
  margin: -2px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(116, 183, 231, 0.24);
  border-radius: var(--radius);
  background: rgba(6, 17, 30, 0.48);
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.55;
}

.editor-markdown-guide code {
  color: var(--ice);
}

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

.editor-preview {
  max-height: 480px;
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(185, 220, 248, 0.18);
  border-radius: var(--radius);
  background: rgba(2, 6, 12, 0.42);
  font-family: var(--font-body);
}

.editor-preview header {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(221, 185, 99, 0.2);
}

.editor-preview header span {
  color: var(--gold-bright);
  font-family: var(--font-ui);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.editor-preview h2,
.editor-preview h3,
.editor-preview h4 {
  color: #f6f0e4;
}

.editor-preview h2 {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
}

.editor-preview h3 {
  margin: 22px 0 8px;
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.editor-preview p,
.editor-preview li {
  color: #dbe9f3;
  line-height: 1.65;
}

.editor-preview figure {
  margin: 14px 0;
  overflow: hidden;
  border: 1px solid rgba(221, 185, 99, 0.24);
  border-radius: var(--radius);
  background: rgba(3, 6, 12, 0.6);
}

.editor-preview img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
}

.editor-preview figcaption {
  padding: 9px 11px;
  color: var(--muted);
  font-size: 0.76rem;
}

.editor-image-panel {
  margin-bottom: 18px;
}

.editor-image-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.45fr);
  gap: 16px;
  align-items: stretch;
}

.editor-image-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.editor-image-controls label {
  display: grid;
  gap: 7px;
  color: var(--gold-bright);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.editor-image-controls input,
.editor-image-controls select {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(185, 220, 248, 0.26);
  border-radius: var(--radius);
  outline: 0;
  background:
    linear-gradient(180deg, rgba(17, 26, 39, 0.72), rgba(3, 6, 12, 0.62)),
    rgba(3, 5, 9, 0.68);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.editor-image-controls input:focus,
.editor-image-controls select:focus {
  border-color: rgba(221, 185, 99, 0.64);
  box-shadow: 0 0 0 3px rgba(221, 185, 99, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.editor-image-actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.editor-image-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.editor-image-preview {
  display: grid;
  grid-template-rows: minmax(180px, 1fr) auto;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(221, 185, 99, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(185, 220, 248, 0.08), transparent 54%),
    rgba(2, 6, 12, 0.52);
}

.editor-image-preview > div {
  display: grid;
  min-height: 180px;
  place-items: center;
  padding: 18px;
  color: var(--faint);
  font-size: 0.78rem;
  text-align: center;
}

.editor-image-preview img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 280px;
  object-fit: contain;
  background: rgba(2, 5, 10, 0.72);
}

.editor-image-preview figcaption {
  padding: 11px 13px;
  border-top: 1px solid rgba(185, 220, 248, 0.14);
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

.editor-sections {
  display: grid;
  gap: 14px;
}

.editor-section-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(185, 220, 248, 0.2);
  border-radius: var(--radius);
  background: rgba(2, 6, 12, 0.36);
}

.editor-section-card.is-active {
  border-color: rgba(221, 185, 99, 0.48);
  box-shadow: 0 0 0 1px rgba(221, 185, 99, 0.08), inset 0 0 34px rgba(116, 183, 231, 0.08);
}

.editor-section-card.is-dragging {
  opacity: 0.54;
}

.editor-section-card.is-drop-target {
  border-color: rgba(116, 183, 231, 0.76);
  background: rgba(22, 54, 82, 0.36);
}

.editor-section-card__top {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.editor-drag-handle {
  display: grid;
  align-self: end;
  width: 34px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(185, 220, 248, 0.2);
  border-radius: var(--radius);
  background: rgba(4, 8, 15, 0.48);
  cursor: grab;
}

.editor-drag-handle span {
  display: block;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: rgba(221, 185, 99, 0.68);
}

.editor-mini-actions button {
  display: grid;
  min-width: 38px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(185, 220, 248, 0.22);
  border-radius: var(--radius);
  background: rgba(4, 8, 15, 0.56);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.64rem;
  font-weight: 850;
}

.editor-mini-actions button:hover {
  border-color: rgba(221, 185, 99, 0.5);
  color: var(--gold-bright);
}

.editor-actions button:disabled,
.editor-save-card button:disabled {
  cursor: wait;
  opacity: 0.56;
}

.editor-markdown-panel {
  margin-top: 18px;
}

.editor-markdown-panel textarea {
  min-height: 360px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
}

.article {
  width: min(100%, 1100px);
  margin: 0 auto;
  padding: 24px 28px 96px;
}

.article-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(292px, 42%);
  gap: 20px;
  min-height: 462px;
  align-items: center;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 30px;
  border: 1px solid rgba(221, 185, 99, 0.42);
  border-radius: var(--radius);
  background:
    linear-gradient(115deg, rgba(185, 220, 248, 0.14), transparent 36%),
    radial-gradient(ellipse at 18% 0%, rgba(116, 183, 231, 0.38), transparent 42%),
    radial-gradient(ellipse at 86% 88%, rgba(221, 185, 99, 0.16), transparent 36%),
    linear-gradient(135deg, rgba(6, 10, 18, 0.98), rgba(18, 27, 40, 0.84));
  outline: 1px solid rgba(255, 255, 255, 0.055);
  outline-offset: -7px;
  box-shadow:
    0 36px 115px rgba(0, 0, 0, 0.68),
    0 0 0 1px rgba(185, 220, 248, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 0 112px rgba(221, 185, 99, 0.1);
  isolation: isolate;
}

.article-hero.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 6, 12, 0.96), rgba(3, 6, 12, 0.84) 43%, rgba(3, 6, 12, 0.58)),
    linear-gradient(180deg, rgba(3, 6, 12, 0.08), rgba(3, 6, 12, 0.72)),
    var(--hero-image) center / cover no-repeat;
  filter: saturate(0.72) contrast(1.12) brightness(0.74);
  opacity: 0.72;
}

.article-hero::after {
  content: "";
  position: absolute;
  inset: auto 30px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), rgba(185, 220, 248, 0.7), transparent);
  box-shadow: 0 0 18px rgba(185, 220, 248, 0.32);
}

.hero-border {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  border: 0;
  border-radius: calc(var(--radius) - 1px);
  background: none;
  filter: drop-shadow(0 0 18px rgba(221, 185, 99, 0.24)) drop-shadow(0 0 16px rgba(116, 183, 231, 0.16));
  mix-blend-mode: screen;
  opacity: 0.86;
  pointer-events: none;
}

.hero-border::before {
  content: "";
  position: absolute;
  inset: -24% -18%;
  background: url("assets/ui/rb_border.webp?v=ornament-fix-2") center / 100% 100% no-repeat;
}

.hero-border::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(221, 185, 99, 0.46);
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(185, 220, 248, 0.16),
    inset 0 0 42px rgba(116, 183, 231, 0.08);
}

.hero-copy {
  position: relative;
  z-index: 2;
  grid-column: 1;
  display: grid;
  align-content: center;
  min-width: 0;
  align-self: center;
  max-width: 100%;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: -22px -24px -20px -24px;
  z-index: -1;
  border: 1px solid rgba(185, 220, 248, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(2, 4, 9, 0.82), rgba(8, 14, 23, 0.56) 72%, transparent),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 32%),
    rgba(255, 255, 255, 0.024);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 22px 60px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-mask: linear-gradient(90deg, #000 0 76%, transparent);
  mask: linear-gradient(90deg, #000 0 76%, transparent);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--gold-bright);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-kicker-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
}

.hero-kicker-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.hero-title-row {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.hero-title-row > div {
  min-width: 0;
}

.hero-crest {
  display: grid;
  width: 86px;
  height: 86px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(221, 185, 99, 0.68);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 18%, rgba(243, 216, 145, 0.34), transparent 32%),
    conic-gradient(from 18deg, rgba(221, 185, 99, 0.36), transparent 20%, rgba(116, 183, 231, 0.28), transparent 62%, rgba(221, 185, 99, 0.24)),
    rgba(3, 6, 12, 0.82);
  color: var(--gold-bright);
  box-shadow: 0 0 0 5px rgba(221, 185, 99, 0.06), 0 0 46px rgba(185, 220, 248, 0.24), inset 0 0 24px rgba(0, 0, 0, 0.36);
}

.hero-crest--dragon {
  width: 112px;
  height: 78px;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at 50% 45%, rgba(116, 183, 231, 0.2), transparent 58%),
    linear-gradient(135deg, rgba(185, 220, 248, 0.18), rgba(221, 185, 99, 0.08)),
    rgba(3, 6, 12, 0.82);
  box-shadow:
    0 0 0 4px rgba(221, 185, 99, 0.055),
    0 0 40px rgba(116, 183, 231, 0.22),
    inset 0 0 24px rgba(0, 0, 0, 0.5);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}

.hero-crest--dragon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: saturate(1.14) contrast(1.16) brightness(1.1);
}

.hero-crest svg {
  width: 35px;
  height: 35px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.hero-art-card {
  position: relative;
  z-index: 2;
  grid-column: 2;
  display: grid;
  height: min(100%, 354px);
  min-height: 338px;
  padding: 12px;
  align-self: center;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(221, 185, 99, 0.48);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(185, 220, 248, 0.08), rgba(3, 6, 12, 0.54)),
    rgba(3, 6, 12, 0.78);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.52),
    0 0 0 6px rgba(3, 6, 12, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.11);
  contain: paint;
  isolation: isolate;
}

.hero-art-card::before {
  content: "";
  position: absolute;
  inset: 18px;
  z-index: 2;
  border: 1px solid rgba(221, 185, 99, 0.24);
  pointer-events: none;
}

.hero-art-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, transparent 44%, rgba(2, 4, 9, 0.86)),
    linear-gradient(90deg, rgba(221, 185, 99, 0.1), transparent 28%, transparent 72%, rgba(185, 220, 248, 0.1));
  pointer-events: none;
}

.hero-art-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: calc(var(--radius) - 2px);
  object-fit: cover;
  object-position: 62% center;
  filter: saturate(0.94) contrast(1.08) brightness(0.88);
}

.hero-art-card figcaption {
  position: absolute;
  right: 26px;
  bottom: 26px;
  left: 26px;
  z-index: 3;
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid rgba(185, 220, 248, 0.18);
  border-radius: var(--radius);
  background: rgba(3, 6, 12, 0.66);
  backdrop-filter: blur(14px) saturate(1.2);
}

.hero-art-card figcaption span {
  color: var(--gold-bright);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-art-card figcaption strong {
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  line-height: 1.15;
}

.article h1 {
  margin: 0;
  max-width: 100%;
  color: #f6f0e4;
  font-family: var(--font-display);
  font-size: clamp(3rem, 5.2vw, 5rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: 0.01em;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.36), 0 0 30px rgba(185, 220, 248, 0.32);
}

.article-hero.is-long-title h1 {
  font-size: clamp(2.08rem, 2.85vw, 2.76rem);
  line-height: 1;
  overflow-wrap: normal;
  word-break: normal;
}

.article-hero p {
  max-width: 58ch;
  margin: 14px 0 0;
  color: #cbd0d5;
  font-size: 1.08rem;
}

.hero-sigil {
  position: absolute;
  right: 22px;
  top: 22px;
  z-index: 2;
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 1px solid rgba(221, 185, 99, 0.28);
  border-radius: 50%;
  color: rgba(221, 185, 99, 0.44);
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: radial-gradient(circle, rgba(221, 185, 99, 0.08), transparent 66%);
}

.hero-sigil::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(185, 220, 248, 0.16);
  transform: rotate(45deg);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 520px;
  margin: 24px 0 0;
}

.stat-grid div {
  min-height: 70px;
  padding: 12px 14px;
  border: 1px solid rgba(185, 220, 248, 0.34);
  border-radius: var(--radius);
  background:
    linear-gradient(150deg, rgba(218, 242, 255, 0.16), rgba(116, 183, 231, 0.055) 34%, transparent 66%),
    linear-gradient(180deg, rgba(14, 38, 60, 0.58), rgba(2, 8, 17, 0.66)),
    rgba(6, 16, 29, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(116, 183, 231, 0.11),
    0 14px 32px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(22px) saturate(1.34);
  -webkit-backdrop-filter: blur(22px) saturate(1.34);
}

.stat-grid dt {
  color: var(--faint);
  font-family: var(--font-ui);
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stat-grid dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: #d2eafd;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 900;
}

.record-board {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, 0.97fr);
  gap: 38px;
  margin-top: 30px;
  margin-bottom: 32px;
}

.record-card {
  position: relative;
  isolation: isolate;
  overflow: visible;
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--frost-line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(218, 242, 255, 0.17), rgba(116, 183, 231, 0.05) 34%, transparent 68%),
    radial-gradient(ellipse at 20% 0%, rgba(185, 220, 248, 0.16), transparent 54%),
    linear-gradient(180deg, var(--frost-glass), var(--frost-glass-deep)),
    rgba(3, 7, 14, 0.52);
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(116, 183, 231, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(116, 183, 231, 0.13),
    inset 0 0 54px rgba(185, 220, 248, 0.05);
  backdrop-filter: blur(28px) saturate(1.36);
  -webkit-backdrop-filter: blur(28px) saturate(1.36);
}

.record-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.14), transparent 18%, transparent 66%, rgba(185, 220, 248, 0.12)),
    linear-gradient(90deg, rgba(221, 185, 99, 0.18), transparent 28%, transparent 72%, rgba(185, 220, 248, 0.18)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.032) 0 1px, transparent 1px 18px);
  mix-blend-mode: screen;
  opacity: 0.7;
}

.record-card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--gold-bright);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.record-card dl {
  display: grid;
  margin: 0;
  border-top: 1px solid rgba(185, 220, 248, 0.2);
}

.record-card dl div {
  display: grid;
  grid-template-columns: minmax(96px, 0.72fr) minmax(0, 1fr);
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(185, 220, 248, 0.16);
}

.record-card dt,
.record-card dd {
  margin: 0;
  min-width: 0;
}

.record-card dt {
  color: var(--gold-bright);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 800;
}

.record-card dd {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.record-card--excerpt p {
  margin: 0;
  color: #eef8ff;
  font-size: 1.02rem;
  line-height: 1.7;
  text-shadow: 0 1px 18px rgba(185, 220, 248, 0.1);
}

.tome-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.feature-link {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 98px;
  padding: 12px;
  border: 1px solid rgba(221, 185, 99, 0.27);
  background:
    linear-gradient(135deg, rgba(185, 220, 248, 0.085), transparent 52%),
    rgba(10, 16, 25, 0.68);
  color: var(--text);
  box-shadow: var(--shadow-tight);
  contain: paint;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.feature-link:hover {
  transform: translateY(-2px);
  border-color: rgba(185, 220, 248, 0.38);
  background: linear-gradient(135deg, rgba(116, 183, 231, 0.17), rgba(221, 185, 99, 0.065));
}

.feature-link img,
.feature-rune {
  width: 72px;
  height: 72px;
  min-width: 72px;
  overflow: hidden;
  border: 1px solid rgba(221, 185, 99, 0.22);
  border-radius: var(--radius);
}

.feature-link img {
  display: block;
  object-fit: cover;
}

.feature-rune {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--gold-bright);
  font-family: var(--font-ui);
  font-weight: 900;
}

.feature-link strong,
.feature-link small {
  display: block;
}

.feature-link strong {
  font-family: var(--font-ui);
  line-height: 1.2;
}

.feature-link small {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 5px;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.76rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.article-body {
  display: grid;
  gap: 46px;
}

.content-section {
  scroll-margin-top: 84px;
}

.section-divider {
  height: 38px;
  margin: 0 0 18px;
  background: url("assets/ui/norse_dragon_divider_03_thin_knot_spear.webp?v=ornament-fix-2") center / min(100%, 820px) 100% no-repeat;
  filter: drop-shadow(0 0 12px rgba(185, 220, 248, 0.2)) drop-shadow(0 0 9px rgba(221, 185, 99, 0.14));
  opacity: 0.86;
}

.content-section > h2 {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  line-height: 1.2;
  text-shadow: 0 0 18px rgba(221, 185, 99, 0.16);
}

.content-section > h2::after {
  content: none;
}

.section-glyph {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--gold-bright);
}

.content-section > h2 .section-glyph {
  width: 22px;
  height: 22px;
  background: url("assets/ui/norse_dragon_bullet_01_crystal_knotwork.webp?v=ornament-fix-2") center / contain no-repeat;
  filter: drop-shadow(0 0 7px rgba(221, 185, 99, 0.22)) drop-shadow(0 0 6px rgba(185, 220, 248, 0.22));
}

.content-section > h2 .section-glyph svg {
  display: none;
}

.footnote-ref {
  margin-left: 0.16em;
  font-family: var(--font-ui);
  font-size: 0.72em;
  line-height: 0;
  vertical-align: super;
}

.footnote-ref a,
.reference-item span {
  color: var(--gold-bright);
  text-decoration: none;
}

.reference-item {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  line-height: 1.65;
}

.content-panel {
  position: relative;
  isolation: isolate;
  overflow: visible;
  padding: 28px;
  border: 1px solid var(--frost-line);
  border-radius: var(--radius);
  background:
    linear-gradient(140deg, rgba(218, 242, 255, 0.18), rgba(116, 183, 231, 0.05) 32%, transparent 66%),
    radial-gradient(ellipse at 18% 0%, rgba(185, 220, 248, 0.16), transparent 48%),
    radial-gradient(ellipse at 92% 100%, rgba(116, 183, 231, 0.1), transparent 46%),
    linear-gradient(180deg, rgba(12, 31, 50, 0.62), rgba(2, 8, 18, 0.74)),
    rgba(3, 8, 16, 0.48);
  box-shadow:
    0 20px 62px rgba(0, 0, 0, 0.44),
    0 0 0 1px rgba(116, 183, 231, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(116, 183, 231, 0.14),
    inset 0 0 60px rgba(185, 220, 248, 0.055);
  backdrop-filter: blur(30px) saturate(1.38);
  -webkit-backdrop-filter: blur(30px) saturate(1.38);
}

.content-panel::before,
.gallery figure::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.15), transparent 18%, transparent 68%, rgba(185, 220, 248, 0.1)),
    linear-gradient(90deg, rgba(221, 185, 99, 0.18), transparent 20%, transparent 78%, rgba(185, 220, 248, 0.22)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 20px);
  opacity: 0.68;
  mix-blend-mode: screen;
}

.content-panel::after,
.record-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  border: 34px solid transparent;
  border-image-source: url("assets/ui/rb_text_border.webp?v=ornament-fix-2");
  border-image-slice: 118 168;
  border-image-width: 34px;
  border-image-outset: 18px;
  border-image-repeat: stretch;
  background: none;
  filter: drop-shadow(0 0 12px rgba(185, 220, 248, 0.18));
  mix-blend-mode: screen;
  opacity: 0.72;
}

.content-panel > *,
.record-card > * {
  position: relative;
  z-index: 2;
}

.content-panel h2,
.content-panel h3,
.content-panel h4 {
  margin: 1.45em 0 0.38em;
  color: #cce8fc;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.content-panel h2:first-child,
.content-panel h3:first-child,
.content-panel h4:first-child,
.content-panel p:first-child,
.content-panel ul:first-child {
  margin-top: 0;
}

.content-panel p {
  margin: 0.9em 0;
  color: #edf7ff;
  text-shadow: 0 1px 18px rgba(185, 220, 248, 0.08);
}

.content-panel ul {
  display: grid;
  gap: 9px;
  margin: 1em 0;
  padding: 0;
  list-style: none;
}

.content-panel li {
  position: relative;
  padding-left: 24px;
}

.content-panel li::before {
  content: "";
  position: absolute;
  top: 0.28em;
  left: 0;
  width: 15px;
  height: 15px;
  background: url("assets/ui/norse_dragon_bullet_02_dragon_spear.webp?v=ornament-fix-2") center / contain no-repeat;
  filter: drop-shadow(0 0 7px rgba(185, 220, 248, 0.34)) drop-shadow(0 0 5px rgba(221, 185, 99, 0.2));
  opacity: 0.95;
}

.content-panel li:nth-child(even)::before {
  background-image: url("assets/ui/norse_dragon_bullet_01_crystal_knotwork.webp?v=ornament-fix-2");
}

.content-panel a {
  color: #d1eaff;
  border-bottom: 1px solid rgba(185, 220, 248, 0.24);
}

.rune-divider {
  display: none;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.gallery figure {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(185, 220, 248, 0.32);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(13, 34, 54, 0.64), rgba(2, 8, 18, 0.78)),
    rgba(3, 7, 14, 0.64);
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px) saturate(1.24);
  -webkit-backdrop-filter: blur(22px) saturate(1.24);
  contain: paint;
  isolation: isolate;
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 13px 100%, 0 calc(100% - 13px));
}

.gallery img {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: saturate(0.88) contrast(1.06);
}

.gallery figure.is-map img {
  object-fit: contain;
  background:
    radial-gradient(ellipse at center, rgba(185, 220, 248, 0.08), transparent 62%),
    rgba(2, 4, 9, 0.82);
}

.gallery figcaption {
  position: relative;
  z-index: 2;
  padding: 11px 13px;
  border-top: 1px solid rgba(185, 220, 248, 0.14);
  background: rgba(5, 16, 30, 0.5);
  color: #c7d8e8;
  font-family: var(--font-ui);
  font-size: 0.73rem;
  line-height: 1.35;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

.generated-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.generated-link-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 10px;
  border: 1px solid rgba(201, 167, 94, 0.22);
  background: rgba(17, 14, 11, 0.52);
  color: inherit;
  text-decoration: none;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.generated-link-card:hover {
  border-color: rgba(236, 202, 126, 0.5);
  background: rgba(47, 35, 21, 0.68);
  transform: translateY(-1px);
}

.generated-link-card img,
.generated-link-rune {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(236, 202, 126, 0.32);
  background: rgba(0, 0, 0, 0.28);
}

.generated-link-rune {
  display: grid;
  place-items: center;
  color: var(--gold);
}

.generated-link-rune svg {
  width: 24px;
  height: 24px;
}

.generated-link-card strong,
.generated-link-card small {
  display: block;
  min-width: 0;
}

.generated-link-card strong {
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 0.96rem;
}

.generated-link-card small {
  margin-top: 4px;
  color: rgba(247, 228, 187, 0.65);
  font-size: 0.78rem;
  line-height: 1.35;
}

.rail-block {
  position: relative;
  margin-bottom: 22px;
}

.rail-block + .rail-block {
  padding-top: 16px;
  border-top: 1px solid rgba(221, 185, 99, 0.14);
}

#tocNav,
#relatedList {
  display: grid;
  gap: 5px;
}

#tocNav button,
.related-link {
  width: 100%;
  border: 1px solid transparent;
  background:
    linear-gradient(90deg, rgba(185, 220, 248, 0.035), transparent 74%),
    rgba(255, 255, 255, 0.012);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

#tocNav button {
  position: relative;
  display: block;
  padding: 7px 8px;
  padding-left: 24px;
  border-radius: var(--radius);
}

#tocNav button::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 50%;
  width: 11px;
  height: 11px;
  background: url("assets/ui/norse_dragon_bullet_01_crystal_knotwork.webp?v=ornament-fix-2") center / contain no-repeat;
  filter: drop-shadow(0 0 5px rgba(185, 220, 248, 0.18));
  opacity: 0.78;
  transform: translateY(-50%);
}

#tocNav .toc-link--h3 {
  padding-left: 34px;
  color: var(--faint);
  font-size: 0.65rem;
}

#tocNav .toc-link--h3::before {
  left: 18px;
  background-image: url("assets/ui/norse_dragon_bullet_02_dragon_spear.webp?v=ornament-fix-2");
}

#tocNav .toc-link--h4 {
  padding-left: 42px;
  color: var(--faint);
  font-size: 0.62rem;
}

#tocNav .toc-link--h4::before {
  left: 26px;
  opacity: 0.62;
}

#tocNav button:hover,
.related-link:hover {
  border-color: rgba(185, 220, 248, 0.34);
  background:
    linear-gradient(90deg, rgba(116, 183, 231, 0.17), rgba(221, 185, 99, 0.05) 70%, transparent),
    rgba(255, 255, 255, 0.025);
  color: var(--text);
  box-shadow: inset 3px 0 0 rgba(116, 183, 231, 0.84);
}

.related-link {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 54px;
  padding: 6px;
  overflow: hidden;
  contain: paint;
}

.related-link img,
.related-rune {
  width: 42px;
  height: 42px;
  min-width: 42px;
  overflow: hidden;
  border: 1px solid rgba(221, 185, 99, 0.22);
  border-radius: var(--radius);
  background: rgba(3, 6, 12, 0.62);
}

.related-link img {
  display: block;
  object-fit: cover;
}

.related-rune {
  display: grid;
  place-items: center;
  color: var(--gold);
}

.related-copy > span {
  overflow: hidden;
  color: var(--text);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-link small {
  overflow: hidden;
  margin-top: 3px;
  font-size: 0.62rem;
  color: var(--faint);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  padding: 12px;
  border: 1px solid rgba(185, 220, 248, 0.18);
  border-radius: var(--radius);
  color: var(--faint);
  font-family: var(--font-ui);
  font-size: 0.78rem;
}

@keyframes auroraDrift {
  from {
    transform: translate3d(-1.5%, -1%, 0) scale(1.02);
  }

  to {
    transform: translate3d(1.5%, 1%, 0) scale(1.04);
  }
}

@media (max-width: 1280px) {
  :root {
    --sidebar: 260px;
    --rail: 220px;
  }

  .article {
    padding-inline: 24px;
  }

  .article-hero {
    min-height: 420px;
  }
}

@media (max-width: 1320px) and (min-width: 821px) {
  .article-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-copy,
  .hero-art-card {
    grid-column: 1;
  }

  .hero-copy {
    align-self: center;
    max-width: 720px;
    min-height: 300px;
  }

  .hero-copy::before {
    -webkit-mask: linear-gradient(90deg, #000 0 88%, transparent);
    mask: linear-gradient(90deg, #000 0 88%, transparent);
  }

  .article-hero.is-long-title h1 {
    font-size: clamp(2.7rem, 4.6vw, 3.8rem);
  }

  .hero-art-card {
    height: clamp(300px, 34vw, 360px);
    min-height: 286px;
  }

  .hero-art-card img {
    object-position: center 38%;
  }
}

@media (max-width: 1180px) {
  .editor-shell {
    grid-template-columns: 1fr;
  }

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

  .editor-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .editor-library {
    position: relative;
    top: auto;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(221, 185, 99, 0.24);
  }

  .editor-panel--pages {
    max-height: 360px;
    overflow: auto;
  }

  .editor-grid {
    grid-template-columns: 1fr;
  }

  .editor-image-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
  }

  .context-rail {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 55;
    display: block;
    width: min(78vw, 260px);
    padding-top: 60px;
    transform: translateX(104%);
    transition: transform 0.22s ease;
    box-shadow: -28px 0 90px rgba(0, 0, 0, 0.62), inset 1px 0 0 rgba(185, 220, 248, 0.1);
  }

  .context-rail.context-rail--open {
    transform: translateX(0);
  }

  .context-rail .drawer-close {
    display: grid;
  }

  .rail-toggle {
    display: grid !important;
    visibility: visible;
  }

  .drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: block;
    background: rgba(0, 0, 0, 0.46);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    backdrop-filter: blur(2px);
  }

  .drawer-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  .article {
    width: min(100%, 980px);
  }
}

@media (max-width: 820px) {
  .coming-soon-shell {
    min-height: 100svh;
  }

  .coming-soon-nav {
    align-items: flex-start;
  }

  .coming-soon-brand {
    min-width: 0;
  }

  .coming-soon-brand strong,
  .coming-soon-brand span:last-child {
    overflow-wrap: anywhere;
  }

  .coming-soon-main {
    padding: 40px 0 34px;
  }

  .coming-soon-hero {
    padding: 28px 18px;
  }

  .coming-soon-hero::before {
    inset: 0;
  }

  .coming-soon-hero::after {
    bottom: -72px;
    height: 220px;
  }

  .coming-soon-hero h1 {
    max-width: 16ch;
    font-size: clamp(2rem, 12vw, 3.35rem);
  }

  .coming-soon-actions .notice-button {
    width: 100%;
  }

  .contributor-unlocked {
    display: grid;
    justify-items: stretch;
  }

  .editor-topbar,
  .editor-workspace,
  .editor-library {
    padding: 14px;
  }

  .editor-hero-panel {
    display: grid;
  }

  .editor-field-grid {
    grid-template-columns: 1fr;
  }

  .editor-image-controls {
    grid-template-columns: 1fr;
  }

  .editor-section-head,
  .editor-section-card__top {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .editor-section-head {
    display: grid;
  }

  .editor-section-actions,
  .editor-mini-actions {
    flex-wrap: wrap;
  }

  .editor-mini-actions button {
    width: auto;
    min-width: 44px;
    padding: 0 8px;
  }

  .editor-preview {
    max-height: none;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: min(82vw, 286px);
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: 62px;
    transform: translateX(-104%);
    transition: transform 0.22s ease;
  }

  .sidebar.sidebar--open {
    transform: translateX(0);
    box-shadow: 28px 0 90px rgba(0, 0, 0, 0.68);
  }

  .sidebar .drawer-close {
    display: grid;
  }

  .topbar {
    grid-template-columns: 40px minmax(0, 1fr) 40px 40px;
    min-height: 58px;
    padding: 8px 14px;
  }

  .topbar .icon-button:first-child {
    visibility: visible;
  }

  .icon-button {
    width: 38px;
    height: 38px;
  }

  .topbar-crumb,
  .topbar-separator {
    display: none;
  }

  .topbar-current strong {
    max-width: 20ch;
  }

  .article {
    padding: 18px 14px 72px;
  }

  .article-hero {
    grid-template-columns: 1fr;
    gap: 22px;
    min-height: 0;
    padding: 30px 20px;
  }

  .hero-copy,
  .hero-art-card {
    grid-column: 1;
  }

  .hero-copy {
    align-self: center;
    width: 100%;
    min-height: 360px;
  }

  .article-hero.has-image::before {
    background:
      linear-gradient(180deg, rgba(3, 6, 12, 0.9), rgba(3, 6, 12, 0.62)),
      var(--hero-image) center top / cover no-repeat;
  }

  .hero-border {
    inset: 0;
  }

  .hero-copy::before {
    inset: -18px -12px -18px -12px;
    -webkit-mask: none;
    mask: none;
  }

  .hero-kicker {
    margin-bottom: 12px;
    font-size: 0.61rem;
  }

  .hero-title-row {
    align-items: center;
    gap: 12px;
  }

  .hero-art-card {
    min-height: 190px;
    padding: 10px;
  }

  .hero-art-card figcaption {
    right: 20px;
    bottom: 20px;
    left: 20px;
    padding: 10px 12px;
  }

  .hero-crest {
    width: 70px;
    height: 70px;
  }

  .hero-crest--dragon {
    width: 92px;
    height: 64px;
  }

  .article h1 {
    max-width: 100%;
    font-size: 2.65rem;
  }

  .article-hero p {
    font-size: 0.96rem;
  }

  .hero-sigil {
    display: none;
  }

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

  .stat-grid div {
    min-width: 0;
    min-height: 62px;
    padding: 10px 12px;
  }

  .stat-grid dd {
    font-size: 0.82rem;
  }

  .stat-grid div:last-child:nth-child(odd) {
    grid-column: span 2;
  }

  .record-board {
    grid-template-columns: 1fr;
    gap: 34px;
    margin-top: 26px;
  }

  .record-card {
    padding: 18px;
  }

  .record-card dl div {
    grid-template-columns: minmax(82px, 0.62fr) minmax(0, 1fr);
  }

  .record-card--excerpt p {
    font-size: 0.98rem;
  }

  .tome-overview {
    grid-template-columns: 1fr;
  }

  .content-section > h2 {
    font-size: 1.36rem;
    margin-bottom: 22px;
  }

  .section-divider {
    height: 30px;
    margin-bottom: 14px;
  }

  .content-panel {
    padding: 18px;
  }
}

@media (max-width: 430px) {
  .hero-art-card {
    min-height: 160px;
  }

  .article h1 {
    font-size: 2.25rem;
  }

  .hero-title-row {
    align-items: flex-start;
  }
}

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