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

:root {
  --ink: #08060d;
  --ink-soft: #100b19;
  --ash: #c5bbce;
  --bone: #eee9f4;
  --ember: #8f5cff;
  --ember-hot: #c5a6ff;
  --blood: #43205f;
  --gold: #ad956e;
  --line: rgba(190, 164, 224, 0.22);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Manrope", Arial, sans-serif;
  --lore: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--bone);
  background:
    radial-gradient(circle at 50% 12%, rgba(95, 49, 145, 0.25), transparent 32rem),
    linear-gradient(180deg, #09070e, #100b19 48%, #08060d);
  font-family: var(--body);
  font-size: 1.1rem;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  z-index: 20;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 160px 30px #000;
}

.wrap {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

a {
  color: inherit;
}

p {
  margin: 0 0 1rem;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  line-height: 0.98;
}

.eyebrow,
.card-kicker {
  margin: 0 0 14px;
  color: var(--ember-hot);
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.threshold {
  --scroll-bg: 0px;
  --scroll-copy: 0px;
  --scroll-portal: 0px;
  position: relative;
  min-height: 100svh;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.2) 68%, #09070e 100%),
    radial-gradient(ellipse at 50% 54%, rgba(109, 55, 166, 0.3), transparent 35%),
    #08060d;
}

.threshold::before,
.threshold::after {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  pointer-events: none;
}

.threshold::before {
  opacity: 0.34;
  background:
    linear-gradient(112deg, transparent 45%, rgba(174, 123, 255, 0.17) 45.2%, transparent 45.5%),
    linear-gradient(73deg, transparent 63%, rgba(174, 123, 255, 0.13) 63.15%, transparent 63.4%),
    linear-gradient(164deg, transparent 24%, rgba(174, 123, 255, 0.1) 24.15%, transparent 24.4%);
  transform: translate3d(
    0,
    var(--scroll-bg),
    0
  ) scale(1.08);
  transition: transform 300ms ease-out;
}

.threshold::after {
  background: linear-gradient(90deg, #08060d 0%, transparent 26%, transparent 74%, #08060d 100%);
}

.realm-nav {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 24px;
  border-bottom: 1px solid rgba(190, 164, 224, 0.16);
}

.realm-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
}

.realm-mark span {
  display: grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  border: 1px solid var(--gold);
  rotate: 45deg;
  color: var(--ember-hot);
  font-size: 0.6rem;
}

.realm-mark span::first-line {
  rotate: -45deg;
}

.nav-paths {
  display: flex;
  gap: clamp(14px, 3vw, 38px);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-paths a {
  position: relative;
  color: var(--ash);
  font-family: var(--display);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-paths a::after {
  content: "";
  position: absolute;
  right: 50%;
  bottom: -8px;
  left: 50%;
  height: 1px;
  background: var(--ember-hot);
  transition: left 180ms ease, right 180ms ease;
}

.nav-paths a:hover::after,
.nav-paths a:focus-visible::after {
  right: 0;
  left: 0;
}

.threshold-copy {
  position: relative;
  z-index: 3;
  width: min(950px, calc(100% - 36px));
  margin: clamp(70px, 11vh, 120px) auto 0;
  text-align: center;
  transform: translate3d(
    0,
    var(--scroll-copy),
    0
  );
  transition: transform 220ms ease-out;
}

h1 {
  font-size: clamp(4.5rem, 13vw, 10.8rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  text-shadow: 0 8px 35px #000;
}

h1 span {
  display: block;
  color: transparent;
  font-size: 0.38em;
  letter-spacing: 0.3em;
  line-height: 1.5;
  -webkit-text-stroke: 1px rgba(238, 228, 210, 0.64);
  text-transform: uppercase;
}

.threshold-lead {
  margin: 22px 0 30px;
  color: var(--ash);
  font-family: var(--lore);
  font-size: clamp(1.1rem, 2.5vw, 1.55rem);
  font-style: italic;
}

.enter-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--bone);
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-decoration: none;
  text-transform: uppercase;
}

.enter-glyph {
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  border: 1px solid var(--ember);
  border-radius: 50%;
  color: var(--ember-hot);
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.enter-link:hover .enter-glyph,
.enter-link:focus-visible .enter-glyph {
  color: #10091b;
  background: var(--ember-hot);
  transform: translateY(3px);
}

.worldwound {
  position: absolute;
  z-index: -1;
  top: 47%;
  left: 50%;
  width: min(72vw, 860px);
  aspect-ratio: 1;
  transform: translate3d(
    -50%,
    calc(-50% + var(--scroll-portal)),
    0
  );
  transition: transform 320ms ease-out;
}

.worldwound::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 13%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(184, 132, 255, 0.24) 0 8%, rgba(84, 38, 132, 0.26) 31%, transparent 67%);
  filter: blur(18px);
  animation: pulse 5s ease-in-out infinite;
}

.wound-halo,
.wound-rift {
  position: absolute;
  inset: 50%;
  border-radius: 50%;
  translate: -50% -50%;
}

.wound-halo {
  border: 1px solid rgba(174, 123, 255, 0.3);
  box-shadow: 0 0 45px rgba(143, 92, 255, 0.12), inset 0 0 45px rgba(143, 92, 255, 0.1);
}

.halo-outer {
  width: 100%;
  height: 100%;
  border-style: dashed;
  translate: -50% -50%;
  animation: rotate 80s linear infinite;
}

.halo-middle {
  width: 77%;
  height: 77%;
  border-width: 2px;
  border-color: rgba(174, 123, 255, 0.5);
  translate: -50% -50%;
  animation: rotate-reverse 55s linear infinite;
}

.halo-inner {
  width: 57%;
  height: 57%;
  border-color: rgba(205, 174, 255, 0.62);
  box-shadow: 0 0 110px 30px rgba(143, 92, 255, 0.28), inset 0 0 100px rgba(143, 92, 255, 0.34);
  translate: -50% -50%;
  animation: pulse 5s ease-in-out infinite;
}

.wound-rift {
  width: 37%;
  height: 56%;
  background:
    linear-gradient(105deg, transparent 0 40%, rgba(231, 213, 255, 0.96) 47%, #aa78ff 50%, rgba(67, 32, 95, 0.92) 56%, transparent 61%),
    radial-gradient(ellipse, rgba(143, 92, 255, 0.78), transparent 65%);
  filter: blur(1px) drop-shadow(0 0 38px #8f5cff);
  clip-path: polygon(48% 0, 60% 17%, 53% 29%, 66% 43%, 54% 61%, 61% 76%, 46% 100%, 43% 77%, 34% 64%, 44% 45%, 36% 29%);
  translate: -50% -50%;
  animation: rift 4s ease-in-out infinite;
}

.wound-sigil {
  position: absolute;
  color: rgba(190, 164, 224, 0.64);
  font-family: var(--display);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
}

.sigil-one { top: 3%; left: 49%; }
.sigil-two { top: 50%; right: -1%; }
.sigil-three { bottom: 4%; left: 48%; }
.sigil-four { top: 50%; left: -1%; }

.threshold-note {
  position: absolute;
  right: 4vw;
  bottom: 7vh;
  margin: 0;
  color: rgba(197, 187, 206, 0.54);
  font-family: var(--lore);
  font-size: 0.85rem;
  font-style: italic;
  text-align: right;
}

.opening-record {
  position: relative;
  display: grid;
  grid-template-columns: 100px 1fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  padding-block: clamp(100px, 15vw, 190px);
  border-bottom: 1px solid var(--line);
}

.record-number {
  color: rgba(143, 92, 255, 0.36);
  font-family: var(--display);
  font-size: 5rem;
  line-height: 0.8;
}

h2 {
  font-size: clamp(2.7rem, 6vw, 5.8rem);
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.opening-text,
.section-intro {
  color: var(--ash);
  font-size: 1.2rem;
}

.scribe-note {
  margin-top: 28px;
  padding: 18px 0 0 22px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  color: var(--gold);
  font-family: var(--lore);
  font-style: italic;
}

.passage-section {
  position: relative;
  isolation: isolate;
  padding-block: clamp(100px, 14vw, 180px);
}

.section-atmosphere {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
}

.regions-atmosphere {
  background:
    radial-gradient(circle at 85% 12%, rgba(83, 43, 126, 0.32), transparent 28rem),
    linear-gradient(180deg, transparent, rgba(13, 8, 20, 0.86));
}

.regions-atmosphere::before {
  content: "";
  position: absolute;
  top: 8%;
  right: -8%;
  width: min(60vw, 750px);
  aspect-ratio: 1;
  border: 1px solid rgba(143, 92, 255, 0.18);
  border-radius: 50%;
  box-shadow: inset 0 0 100px rgba(83, 43, 126, 0.2);
}

.lore-heading {
  max-width: 640px;
  margin-bottom: 54px;
}

.lore-heading > p:last-child {
  max-width: 550px;
  margin-top: 24px;
  color: var(--ash);
}

.lore-heading-centred {
  margin-inline: auto;
  text-align: center;
}

.lore-heading-centred > p:last-child {
  margin-inline: auto;
}

.fragment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

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

.card {
  position: relative;
  min-height: 290px;
  padding: 32px 28px;
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(25, 17, 35, 0.97), rgba(9, 7, 13, 0.98)),
    var(--ink);
  transition: background 250ms ease;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 26px;
  width: 24px;
  height: 1px;
  background: var(--ember-hot);
  box-shadow: 0 0 12px var(--ember);
  transition: width 250ms ease;
}

.card-artwork {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: 62%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  opacity: 0.24;
  filter: saturate(0.7) contrast(1.08);
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.74) 44%, #000 100%);
  transition: opacity 220ms ease, transform 300ms ease;
}

.card-has-artwork::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 7, 14, 0.98) 0%, rgba(10, 7, 14, 0.86) 52%, transparent 100%);
  pointer-events: none;
}

.card-has-artwork:hover .card-artwork {
  opacity: 0.36;
  transform: scale(1.025);
}

.card-sigil {
  position: absolute;
  z-index: 1;
  right: 17px;
  bottom: 14px;
  width: 78px;
  height: 78px;
  color: rgba(210, 184, 255, 0.4);
  pointer-events: none;
  transition: color 220ms ease, filter 220ms ease, transform 220ms ease;
}

.card-sigil svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sigil-frame,
.sigil-mark,
.sigil-mark-shadow,
.sigil-orbit,
.sigil-ornament {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sigil-field {
  fill: rgba(84, 46, 121, 0.2);
  stroke: none;
}

.sigil-frame {
  stroke-width: 1.25;
  stroke-dasharray: 2 3;
  opacity: 0.85;
}

.sigil-orbit {
  stroke-width: 0.7;
  stroke-dasharray: 1 4;
  opacity: 0.34;
}

.sigil-orbit-inner {
  stroke-dasharray: 5 3;
  opacity: 0.22;
}

.sigil-ornament {
  stroke-width: 1.1;
  opacity: 0.72;
}

.sigil-node {
  fill: currentColor;
  opacity: 0.8;
}

.sigil-mark-shadow {
  stroke: rgba(15, 8, 25, 0.88);
  stroke-width: 5;
  opacity: 0.9;
}

.sigil-mark {
  stroke-width: 2.2;
  filter: drop-shadow(0 0 3px rgba(176, 126, 255, 0.45));
}

.sigil-frame-loose-banner,
.sigil-frame-clan-banner {
  width: 86px;
  height: 86px;
  color: rgba(197, 166, 255, 0.34);
}

.sigil-frame-loose-banner .sigil-frame {
  stroke-dasharray: 5 4;
}

.sigil-frame-clan-banner .sigil-frame,
.sigil-frame-house-shield .sigil-frame,
.sigil-frame-civic-seal .sigil-frame {
  stroke-dasharray: none;
}

.sigil-frame-house-shield {
  color: rgba(201, 173, 123, 0.34);
}

.sigil-frame-veiled-diamond,
.sigil-frame-occult-seal {
  color: rgba(170, 125, 224, 0.3);
}

.card:hover .card-sigil {
  color: rgba(225, 205, 255, 0.86);
  filter: drop-shadow(0 0 8px rgba(143, 92, 255, 0.45));
  transform: translateY(-2px);
}

.card:hover {
  background:
    radial-gradient(circle at 100% 100%, rgba(83, 43, 126, 0.32), transparent 12rem),
    linear-gradient(155deg, rgba(33, 20, 47, 0.98), rgba(9, 7, 13, 0.98));
}

.card:hover::before {
  width: 90px;
}

.card-link {
  position: static;
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-link::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
}

.card-link:focus-visible::after {
  outline: 1px solid var(--ember-hot);
  outline-offset: -5px;
}

.card h3 {
  position: relative;
  z-index: 1;
  margin: 12px 0 18px;
  font-size: 1.45rem;
  line-height: 1.12;
}

.card p {
  position: relative;
  z-index: 1;
  color: var(--ash);
  font-size: 1rem;
  line-height: 1.55;
}

.record-details {
  position: relative;
  z-index: 2;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.record-details summary {
  padding: 14px 0;
  color: var(--ember-hot);
  cursor: pointer;
  font-family: var(--display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.record-detail-section {
  padding: 14px 0;
  border-top: 1px solid rgba(190, 164, 224, 0.12);
}

.record-detail-section h4 {
  margin: 0 0 8px;
  color: var(--gold);
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.record-detail-section ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ash);
  font-size: 0.82rem;
}

.record-detail-section li {
  margin-bottom: 5px;
}

.meta-row {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.status,
.pill {
  display: inline-block;
  padding: 3px 7px;
  border: 1px solid rgba(173, 149, 110, 0.26);
  color: var(--gold);
  font-family: var(--display);
  font-size: 0.54rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status {
  color: var(--ember-hot);
  border-color: rgba(143, 92, 255, 0.42);
}

.omen {
  position: relative;
  isolation: isolate;
  max-width: 850px;
  padding-block: clamp(90px, 12vw, 150px);
  text-align: center;
}

.omen::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 12% -20%;
  opacity: 0.27;
  background:
    linear-gradient(180deg, var(--ink) 0%, transparent 28%, transparent 68%, var(--ink) 100%),
    linear-gradient(90deg, var(--ink) 0%, transparent 25%, transparent 75%, var(--ink) 100%),
    url("../img/inspiration/adventurers_around_a_mystical_rift.png") center 83% / cover no-repeat;
  filter: saturate(0.75) hue-rotate(20deg);
}

.omen::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 15% 0;
  background: radial-gradient(circle, rgba(111, 58, 177, 0.18), transparent 65%);
}

.omen-mark {
  color: var(--ember);
  font-size: 1.7rem;
}

.omen blockquote {
  margin: 24px 0;
  font-family: var(--lore);
  font-size: clamp(1.7rem, 4vw, 3rem);
  font-style: italic;
  line-height: 1.2;
}

.omen-source {
  color: var(--gold);
  font-family: var(--display);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.peoples-section {
  border-block: 1px solid var(--line);
  background:
    radial-gradient(circle at 12% 25%, rgba(75, 49, 110, 0.24), transparent 28rem),
    #0b0811;
}

.split-heading {
  display: grid;
  grid-template-columns: 1fr 0.75fr;
  gap: 60px;
  align-items: end;
}

.split-heading .section-intro {
  max-width: 500px;
  margin-bottom: 54px;
  padding-left: 28px;
  border-left: 1px solid var(--gold);
}

.factions-atmosphere {
  opacity: 0.52;
  background:
    linear-gradient(135deg, transparent 49.8%, rgba(143, 92, 255, 0.18) 50%, transparent 50.2%),
    linear-gradient(45deg, transparent 49.8%, rgba(173, 149, 110, 0.09) 50%, transparent 50.2%);
  background-size: 180px 180px;
  mask-image: radial-gradient(circle, #000, transparent 68%);
}

.codex-ledger-section {
  border-top: 1px solid var(--line);
  background:
    radial-gradient(circle at 80% 18%, rgba(83, 43, 126, 0.2), transparent 30rem),
    linear-gradient(180deg, rgba(13, 9, 20, 0.6), rgba(8, 6, 13, 0.88));
}

.sub-record-heading {
  margin: clamp(70px, 9vw, 110px) 0 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.sub-record-heading h3,
.reference-record h3 {
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  text-transform: uppercase;
}

.reference-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.reference-record {
  min-height: 100%;
  padding: 30px;
  background: rgba(9, 7, 13, 0.96);
}

.reference-list {
  display: grid;
  margin-top: 24px;
}

.reference-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ash);
  font-size: 0.84rem;
}

.reference-row strong {
  color: var(--bone);
}

.reference-row span:last-child:not(:first-child) {
  color: var(--ember-hot);
  text-align: right;
}

.closing-gate {
  position: relative;
  display: grid;
  min-height: 82vh;
  place-items: center;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: #07050b;
}

.closing-ring {
  position: absolute;
  left: 50%;
  bottom: -60vw;
  width: min(110vw, 1200px);
  aspect-ratio: 1;
  translate: -50% 0;
  border: 1px solid rgba(143, 92, 255, 0.32);
  border-radius: 50%;
  box-shadow:
    0 0 100px rgba(83, 43, 126, 0.4),
    inset 0 0 100px rgba(83, 43, 126, 0.26);
}

.closing-ring::before,
.closing-ring::after {
  content: "";
  position: absolute;
  inset: 10%;
  border: 1px dashed rgba(173, 149, 110, 0.2);
  border-radius: 50%;
  animation: rotate 80s linear infinite;
}

.closing-ring::after {
  inset: 25%;
  border-style: solid;
  animation-direction: reverse;
}

.closing-copy {
  position: relative;
  z-index: 1;
  max-width: 850px;
  text-align: center;
}

.closing-copy p:not(.eyebrow) {
  max-width: 630px;
  margin: 28px auto;
  color: var(--ash);
}

.site-footer {
  padding: 24px;
  border-top: 1px solid var(--line);
  color: rgba(197, 187, 206, 0.55);
  background: #07050b;
  font-family: var(--display);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}

.entry-body {
  --entry-accent: var(--ember);
  --entry-hot: var(--ember-hot);
  --entry-glow-rgb: 111, 58, 177;
  --entry-field-rgb: 92, 47, 139;
  --entry-art-hue: 0deg;
  min-height: 100vh;
  background:
    radial-gradient(circle at 76% 8%, rgba(var(--entry-glow-rgb), 0.26), transparent 32rem),
    linear-gradient(180deg, #09070e, #0d0914 70%, #07050b);
}

.entry-header {
  background: rgba(7, 5, 11, 0.88);
  border-bottom: 1px solid var(--line);
}

.record-tabs {
  position: sticky;
  z-index: 12;
  top: 0;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 7px max(10px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(8, 6, 13, 0.96);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  scrollbar-width: thin;
}

.record-switch {
  flex: 0 0 auto;
  padding: 12px 17px 11px;
  border: 1px solid transparent;
  color: rgba(197, 187, 206, 0.68);
  background: rgba(255, 255, 255, 0.015);
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.record-switch:hover,
.record-switch:focus-visible,
.record-switch.is-active {
  color: var(--bone);
  border-color: rgba(var(--entry-glow-rgb), 0.28);
  background: rgba(var(--entry-glow-rgb), 0.18);
  outline: none;
}

.record-switch.is-active {
  box-shadow: inset 0 -2px 0 var(--entry-accent), 0 0 20px rgba(var(--entry-glow-rgb), 0.12);
}

.entry-intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(250px, 0.7fr) 1.3fr;
  gap: clamp(40px, 8vw, 120px);
  align-items: center;
  width: 100%;
  height: clamp(480px, 57vh, 650px);
  min-height: 0;
  padding: clamp(38px, 6vw, 72px) max(18px, calc((100vw - 1180px) / 2));
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.entry-sigil-stage {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  isolation: isolate;
}

.entry-sigil-stage::before,
.entry-sigil-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8%;
  border: 1px solid rgba(var(--entry-glow-rgb), 0.3);
  border-radius: 50%;
  box-shadow: 0 0 80px rgba(var(--entry-glow-rgb), 0.26), inset 0 0 70px rgba(var(--entry-glow-rgb), 0.16);
}

.entry-sigil-stage::after {
  inset: 19%;
  border-style: dashed;
  animation: rotate 70s linear infinite;
}

.entry-sigil {
  position: relative;
  right: auto;
  bottom: auto;
  width: min(300px, 74%);
  height: auto;
  color: var(--entry-hot);
  filter: drop-shadow(0 0 18px rgba(var(--entry-glow-rgb), 0.5));
}

.entry-sigil .sigil-field {
  fill: rgba(var(--entry-field-rgb), 0.4);
}

.entry-sigil .sigil-frame {
  stroke-width: 1.4;
}

.entry-sigil .sigil-mark {
  stroke-width: 2.6;
}

.entry-heading h1 {
  max-width: 800px;
  font-size: clamp(4.2rem, 9vw, 9rem);
  line-height: 0.86;
}

.entry-heading .eyebrow {
  color: var(--entry-hot);
}

.entry-heading {
  position: relative;
  z-index: 3;
}

.entry-artwork {
  position: absolute;
  z-index: 1;
  top: 4%;
  right: clamp(28px, 5vw, 88px);
  bottom: 4%;
  width: min(50vw, 720px);
  margin: 0;
  opacity: 0.42;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 72% 70% at 55% 48%, #000 24%, rgba(0, 0, 0, 0.82) 52%, transparent 100%);
}

.entry-artwork[hidden] {
  display: none;
}

.entry-artwork::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 6, 13, 0.9) 0%, transparent 23%, transparent 72%, rgba(8, 6, 13, 0.88) 100%),
    linear-gradient(90deg, rgba(8, 6, 13, 0.95) 0%, transparent 48%, transparent 100%);
}

.entry-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 38% 20%;
  transform: none;
  filter: saturate(0.72) contrast(1.08) hue-rotate(var(--entry-art-hue));
}

.entry-artwork figcaption {
  position: absolute;
  z-index: 2;
  right: 3%;
  bottom: 8%;
  max-width: 230px;
  color: rgba(238, 233, 244, 0.66);
  font-family: var(--lore);
  font-size: 0.75rem;
  font-style: italic;
  text-align: right;
}

.entry-lead {
  max-width: 720px;
  margin-top: 28px;
  color: var(--ash);
  font-size: clamp(1rem, 1.8vw, 1.3rem);
}

.entry-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 26px;
}

.entry-meta .status {
  color: var(--entry-hot);
  border-color: var(--entry-accent);
}

.entry-type {
  color: var(--entry-hot);
  font-family: var(--display);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.entry-record {
  padding-block: clamp(60px, 9vw, 120px);
}

.subject-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding: 6px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(var(--entry-glow-rgb), 0.18);
  background: rgba(8, 6, 13, 0.66);
}

.subject-tab {
  padding: 10px 14px;
  border: 1px solid transparent;
  color: rgba(197, 187, 206, 0.72);
  background: transparent;
  cursor: pointer;
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.subject-tab:hover,
.subject-tab:focus-visible,
.subject-tab.is-active {
  color: var(--bone);
  border-color: var(--entry-accent);
  background: rgba(var(--entry-glow-rgb), 0.24);
  box-shadow: inset 0 -2px 0 var(--entry-accent);
  outline: none;
}

.entry-panels {
  border: 1px solid var(--line);
  background: rgba(9, 7, 13, 0.74);
}

.entry-panel {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.entry-panel.is-active {
  display: grid;
}

.entry-field {
  min-height: 180px;
  padding: clamp(24px, 4vw, 44px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.entry-field h3 {
  margin-bottom: 18px;
  color: var(--entry-hot);
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.entry-field p,
.entry-field li {
  color: var(--ash);
  font-size: 0.96rem;
}

.entry-field ul {
  margin: 0;
  padding-left: 1.2rem;
}

body[data-entry-type="regions"] .entry-sigil-stage::before {
  border-radius: 14%;
  rotate: 45deg;
}

body[data-entry-type="factions"] .entry-intro {
  background: linear-gradient(90deg, transparent, rgba(var(--entry-glow-rgb), 0.16), transparent);
}

body[data-entry-type="peoples"] .entry-sigil-stage::before {
  box-shadow: 0 0 100px rgba(var(--entry-glow-rgb), 0.34), inset 0 0 90px rgba(var(--entry-glow-rgb), 0.14);
}

body[data-entry-type="magicPhenomena"] .entry-sigil-stage::before,
body[data-entry-type="magicPhenomena"] .entry-sigil-stage::after {
  border-color: rgba(197, 166, 255, 0.38);
  box-shadow: 0 0 110px rgba(143, 92, 255, 0.34), inset 0 0 100px rgba(143, 92, 255, 0.22);
}

.empty-note {
  color: var(--ash);
  font-style: italic;
}

@keyframes rotate {
  to { rotate: 360deg; }
}

@keyframes rotate-reverse {
  to { rotate: -360deg; }
}

@keyframes pulse {
  50% { scale: 1.04; opacity: 0.72; }
}

@keyframes rift {
  50% { scale: 1.05 0.97; filter: blur(3px) drop-shadow(0 0 44px #a978ff); }
}

@media (max-width: 1050px) {
  .fragment-grid-wide,
  .fragment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .worldwound {
    top: 52%;
    width: min(88vw, 820px);
  }

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

@media (max-width: 760px) {
  body::before {
    box-shadow: inset 0 0 70px 8px #000;
  }

  .realm-nav {
    align-items: flex-start;
  }

  .realm-mark strong {
    display: none;
  }

  .nav-paths {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    width: 210px;
    text-align: right;
  }

  .nav-paths a {
    font-size: 0.54rem;
    white-space: nowrap;
  }

  .threshold-copy {
    margin-top: 15vh;
  }

  .threshold-copy .eyebrow {
    max-width: 290px;
    margin-inline: auto;
    font-size: 0.58rem;
    line-height: 1.7;
  }

  h1 {
    font-size: clamp(4rem, 20vw, 7rem);
  }

  .threshold-lead {
    max-width: 310px;
    margin-inline: auto;
    line-height: 1.4;
  }

  .worldwound {
    top: 55%;
    width: 128vw;
    opacity: 0.88;
  }

  .threshold-note {
    display: none;
  }

  .opening-record,
  .split-heading {
    grid-template-columns: 1fr;
  }

  .opening-record {
    gap: 24px;
  }

  .record-number {
    font-size: 3rem;
  }

  .split-heading {
    gap: 0;
  }

  .split-heading .section-intro {
    margin-bottom: 40px;
  }

  .entry-intro {
    grid-template-columns: 1fr;
    height: auto;
    min-height: auto;
    padding-block: 50px;
    text-align: center;
  }

  .entry-artwork {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    grid-column: 1;
    width: min(430px, 100%);
    height: 420px;
    margin: 20px auto 0;
    opacity: 0.58;
    mask-image: linear-gradient(to bottom, #000 60%, transparent);
  }

  .entry-sigil-stage {
    width: min(330px, 82vw);
    margin-inline: auto;
  }

  .entry-meta,
  .subject-tabs {
    justify-content: center;
  }

  .entry-panel,
  .entry-panel.is-active {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .fragment-grid,
  .fragment-grid-wide {
    grid-template-columns: 1fr;
  }

  .card {
    min-height: 250px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
