@font-face {
  font-family: "Workbench";
  src: url("fonts/Workbench.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Silkscreen";
  src: url("fonts/Silkscreen-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Silkscreen";
  src: url("fonts/Silkscreen-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --void: #020817;
  --night: #061128;
  --ibm: #0a2a5e;
  --ibm-lit: #174b8d;
  --terminal: #04101f;
  --silver: #c6d0cc;
  --silver-dim: #8d9b9d;
  --paper: #d4d9cf;
  --paper-deep: #aeb8b2;
  --ink: #091a36;
  --ink-soft: #26384b;
  --arcane: #9d7ae6;
  --arcane-dark: #4e327f;
  --amber: #ffc04a;
  --amber-deep: #c66d21;
  --danger: #ff746b;
  --good: #78e0b0;
  --line: rgba(198, 208, 204, 0.22);
  --body-font: "Silkscreen", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", monospace;
  --display-font: "Workbench", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", monospace;
  --page-width: 1380px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--silver);
  background:
    radial-gradient(circle at 78% 6%, rgba(78, 50, 127, 0.34) 0, rgba(78, 50, 127, 0) 28rem),
    radial-gradient(circle at 12% 22%, rgba(23, 75, 141, 0.3) 0, rgba(23, 75, 141, 0) 34rem),
    repeating-linear-gradient(0deg, rgba(157, 122, 230, 0.035) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(90deg, rgba(198, 208, 204, 0.035) 0 1px, transparent 1px 8px),
    var(--void);
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.015em;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: var(--amber);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

a:hover {
  color: #ffe094;
}

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 4px;
}

::selection {
  color: var(--void);
  background: var(--amber);
}

.tower-static {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.34;
  background:
    linear-gradient(90deg, transparent 0 49.85%, rgba(255, 255, 255, 0.024) 49.85% 50.15%, transparent 50.15%),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, 0.16) 3px 4px);
  mix-blend-mode: soft-light;
}

.skip-rune {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 2000;
  padding: 10px 14px;
  color: var(--void);
  background: var(--amber);
  transform: translateY(-180%);
}

.skip-rune:focus {
  transform: translateY(0);
}

.signal-bar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 78px;
  padding: 12px clamp(16px, 4vw, 54px);
  background:
    linear-gradient(90deg, rgba(10, 42, 94, 0.95), rgba(4, 16, 31, 0.98) 48%, rgba(10, 42, 94, 0.94)),
    var(--terminal);
  border-bottom: 1px solid rgba(255, 192, 74, 0.46);
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.24), 0 10px 32px rgba(0, 0, 0, 0.45);
}

.signal-bar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 6px;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, var(--void) 0 7px, transparent 7px 17px),
    var(--amber-deep);
  opacity: 0.75;
}

.tower-sigil {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  color: var(--silver);
  text-decoration: none;
}

.tower-sigil:hover {
  color: #fff;
}

.sigil-mark {
  position: relative;
  display: grid;
  width: 45px;
  height: 45px;
  flex: 0 0 45px;
  place-items: center;
  border: 2px solid var(--amber);
  background: var(--ibm);
  box-shadow: 4px 4px 0 #000;
}

.sigil-mark::before,
.sigil-mark::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 3px solid var(--silver);
  border-radius: 50%;
  background: var(--terminal);
  box-shadow: inset 0 0 0 2px var(--arcane);
}

.sigil-mark::before {
  left: 7px;
  top: 9px;
}

.sigil-mark::after {
  right: 7px;
  bottom: 7px;
}

.sigil-mark i {
  position: absolute;
  width: 10px;
  height: 3px;
  background: var(--amber);
}

.sigil-mark i:nth-child(1) {
  top: 17px;
  left: 20px;
  transform: rotate(35deg);
}

.sigil-mark i:nth-child(2) {
  top: 24px;
  left: 20px;
  transform: rotate(-35deg);
}

.sigil-mark i:nth-child(3) {
  right: 3px;
  bottom: 3px;
  width: 5px;
  height: 5px;
}

.sigil-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.1;
}

.sigil-copy strong {
  color: #fff;
  font-family: var(--display-font);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.025em;
  white-space: nowrap;
}

.sigil-copy small {
  margin-top: 7px;
  color: var(--amber);
  font-size: 9px;
  letter-spacing: 0.09em;
  white-space: nowrap;
}

.signal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(8px, 1.6vw, 18px);
}

.tongue-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--silver-dim);
  font-size: 11px;
}

.tongue {
  min-width: 36px;
  padding: 6px 3px;
  color: var(--silver-dim);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.tongue[aria-pressed="true"] {
  color: var(--amber);
  text-shadow: 0 0 10px rgba(255, 192, 74, 0.45);
}

.wallet-keystone,
.index-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 2px solid var(--silver-dim);
  background: var(--terminal);
  box-shadow: 4px 4px 0 #000;
  cursor: pointer;
  font-size: 11px;
  text-transform: uppercase;
  transition: transform 120ms steps(2), box-shadow 120ms steps(2), border-color 120ms;
}

.wallet-keystone {
  gap: 9px;
  min-width: 154px;
  padding: 9px 14px;
}

.wallet-keystone:hover,
.index-trigger:hover {
  color: #fff;
  border-color: var(--amber);
}

.wallet-keystone:active,
.index-trigger:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 #000;
}

.wallet-keystone.is-connected {
  color: var(--good);
  border-color: rgba(120, 224, 176, 0.62);
}

.wallet-led {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  background: var(--danger);
  box-shadow: 0 0 0 2px rgba(255, 116, 107, 0.15), 0 0 9px rgba(255, 116, 107, 0.65);
}

.wallet-keystone.is-connected .wallet-led {
  background: var(--good);
  box-shadow: 0 0 0 2px rgba(120, 224, 176, 0.15), 0 0 10px rgba(120, 224, 176, 0.75);
}

.index-trigger {
  gap: 13px;
  padding: 9px 15px;
  color: var(--void);
  border-color: var(--amber);
  background: var(--amber);
}

.index-trigger:hover {
  color: var(--void);
  background: #ffd272;
}

.index-glyph {
  display: grid;
  width: 18px;
  gap: 3px;
}

.index-glyph i {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
}

.index-veil {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  padding: clamp(14px, 4vw, 50px);
  place-items: stretch;
  background: rgba(2, 8, 23, 0.9);
  backdrop-filter: blur(8px);
}

.index-veil[hidden] {
  display: none;
}

.index-archive {
  display: flex;
  width: min(1180px, 100%);
  max-height: calc(100vh - clamp(28px, 8vw, 100px));
  margin: auto;
  padding: clamp(24px, 5vw, 68px);
  flex-direction: column;
  overflow-y: auto;
  border: 3px solid var(--amber);
  background:
    linear-gradient(90deg, transparent 0 31px, rgba(255, 192, 74, 0.18) 31px 33px, transparent 33px),
    repeating-linear-gradient(0deg, rgba(198, 208, 204, 0.03) 0 1px, transparent 1px 8px),
    var(--ibm);
  box-shadow:
    12px 12px 0 #000,
    inset 0 0 0 7px var(--terminal),
    inset 0 0 0 9px rgba(198, 208, 204, 0.22);
  opacity: 0;
  transform: translateY(18px) scale(0.985);
}

.index-veil.is-open .index-archive {
  animation: index-in 260ms steps(5) forwards;
}

.index-imprint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.stamp-code {
  color: var(--amber);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.index-close {
  width: 50px;
  height: 50px;
  color: var(--amber);
  border: 2px solid var(--amber);
  background: var(--terminal);
  box-shadow: 4px 4px 0 #000;
  cursor: pointer;
  font-family: var(--display-font);
  font-size: 34px;
  line-height: 1;
}

.index-close:hover {
  color: var(--void);
  background: var(--amber);
}

.index-archive h2 {
  margin: 20px 0 12px;
  color: #fff;
  font-family: var(--display-font);
  font-size: clamp(32px, 5vw, 66px);
  font-weight: 400;
  line-height: 1.15;
  text-transform: uppercase;
}

.index-links {
  display: grid;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.index-links a {
  display: grid;
  grid-template-columns: 50px 1fr;
  align-items: center;
  gap: 18px;
  min-height: 68px;
  padding: 8px 4px;
  color: var(--silver);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: color 120ms, padding-left 160ms steps(4), background 120ms;
}

.index-links a:hover,
.index-links a:focus-visible {
  padding-left: 16px;
  color: var(--amber);
  background: rgba(255, 192, 74, 0.08);
}

.index-links a span {
  color: var(--arcane);
  font-size: 11px;
}

.index-links a strong {
  font-family: var(--display-font);
  font-size: clamp(18px, 3vw, 34px);
  font-weight: 400;
  line-height: 1.2;
  text-transform: uppercase;
}

.index-coda {
  margin: 25px 0 0;
  color: var(--silver-dim);
  font-size: 11px;
  text-align: right;
}

.opening-rite {
  position: relative;
  width: min(var(--page-width), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(64px, 10vw, 132px) 0 clamp(70px, 9vw, 120px);
}

.opening-copy {
  position: relative;
}

.era-flag {
  display: flex;
  align-items: center;
  gap: 13px;
  width: fit-content;
  margin-bottom: clamp(24px, 4vw, 42px);
  color: var(--amber);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.era-flag i {
  display: block;
  width: clamp(30px, 5vw, 80px);
  height: 4px;
  background:
    repeating-linear-gradient(90deg, var(--amber) 0 5px, transparent 5px 9px);
}

.opening-copy h1 {
  position: relative;
  width: fit-content;
  margin: 0 0 clamp(25px, 4vw, 45px);
  color: #f5f7ed;
  font-family: var(--display-font);
  font-size: clamp(62px, 13.2vw, 190px);
  font-weight: 400;
  line-height: 0.72;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  text-shadow: 5px 5px 0 var(--ibm-lit);
}

.title-word {
  display: block;
  opacity: 0;
  transform: translateY(25px);
  animation: type-rise 620ms steps(8) 120ms forwards;
}

.title-mages {
  padding-left: 0.28em;
  color: var(--amber);
  text-shadow: 5px 5px 0 var(--arcane-dark);
  animation-delay: 260ms;
}

.title-shadow {
  position: absolute;
  top: 0.07em;
  left: 0.045em;
  z-index: -1;
  color: var(--arcane-dark);
  opacity: 0.6;
}

.opening-deck {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: clamp(24px, 5vw, 70px);
  max-width: 980px;
  padding-left: clamp(0px, 2vw, 28px);
  border-left: 5px solid var(--amber);
}

.opening-deck p {
  margin: 0;
  color: #dbe3de;
  font-size: clamp(16px, 1.65vw, 21px);
  line-height: 1.75;
}

.opening-deck .opening-synopsis {
  color: var(--silver-dim);
  font-size: 16px;
  line-height: 1.9;
}

.opening-laws {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 980px;
  margin: clamp(34px, 5vw, 55px) 0 0 clamp(0px, 2vw, 28px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.opening-laws div {
  display: flex;
  min-height: 102px;
  padding: 18px 20px;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--line);
}

.opening-laws div:last-child {
  border-right: 0;
}

.opening-laws b {
  color: var(--amber);
  font-family: var(--display-font);
  font-size: clamp(26px, 3.3vw, 45px);
  font-weight: 400;
  line-height: 1;
}

.opening-laws span {
  margin-top: 10px;
  color: var(--silver-dim);
  font-size: 10px;
  line-height: 1.5;
}

.tape-window {
  position: relative;
  margin: clamp(48px, 7vw, 86px) 0 0;
}

.tape-frame {
  position: relative;
  padding: clamp(9px, 1.2vw, 16px);
  overflow: hidden;
  border: 3px solid var(--silver-dim);
  background:
    repeating-linear-gradient(90deg, rgba(198, 208, 204, 0.08) 0 2px, transparent 2px 9px),
    #061a31;
  box-shadow:
    0 0 0 5px var(--void),
    0 0 0 7px var(--arcane-dark),
    13px 15px 0 rgba(0, 0, 0, 0.54);
}

.tape-frame::before,
.tape-frame::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: clamp(55px, 8vw, 110px);
  height: clamp(55px, 8vw, 110px);
  border: 8px solid rgba(198, 208, 204, 0.42);
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--terminal) 0 12%, var(--silver-dim) 13% 16%, transparent 17% 35%, rgba(198, 208, 204, 0.35) 36% 42%, transparent 43%);
  box-shadow: inset 0 0 0 1px var(--void), 0 0 0 2px var(--void);
  pointer-events: none;
  opacity: 0.9;
}

.tape-frame::before {
  top: 9%;
  left: 3.2%;
}

.tape-frame::after {
  right: 3.2%;
  bottom: 11%;
}

.tape-frame img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.22);
  filter: saturate(0.88) contrast(1.06);
}

.tape-screw {
  position: absolute;
  z-index: 3;
  width: 8px;
  height: 8px;
  background: var(--amber);
  box-shadow: inset 0 0 0 2px var(--terminal);
}

.screw-one {
  top: 8px;
  left: 8px;
}

.screw-two {
  top: 8px;
  right: 8px;
}

.screw-three {
  bottom: 8px;
  left: 8px;
}

.screw-four {
  right: 8px;
  bottom: 8px;
}

.tape-label {
  position: absolute;
  right: 5%;
  bottom: clamp(21px, 3vw, 38px);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100% - 10%);
  padding: 8px 12px;
  color: var(--void);
  background: var(--amber);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.42);
  font-size: clamp(7px, 0.8vw, 10px);
  letter-spacing: 0.07em;
}

.tape-label i {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  background: var(--danger);
}

.tape-window figcaption {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 19px;
  color: var(--silver-dim);
  font-size: 9px;
  letter-spacing: 0.045em;
}

.rite-section {
  position: relative;
  width: min(var(--page-width), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(70px, 8vw, 112px) 0;
}

.rite-section + .rite-section {
  border-top: 1px solid var(--line);
}

.rite-section::before {
  content: "";
  position: absolute;
  top: 38px;
  right: 0;
  width: 82px;
  height: 11px;
  background:
    repeating-linear-gradient(90deg, var(--amber) 0 8px, transparent 8px 15px);
  opacity: 0.6;
}

.rite-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(190px, 0.45fr);
  align-items: end;
  gap: clamp(16px, 3vw, 34px);
  margin-bottom: clamp(35px, 5vw, 62px);
}

.rite-number {
  display: grid;
  width: clamp(55px, 7vw, 86px);
  height: clamp(55px, 7vw, 86px);
  place-items: center;
  color: var(--amber);
  border: 2px solid var(--amber);
  background: rgba(10, 42, 94, 0.48);
  box-shadow: 6px 6px 0 #000;
  font-family: var(--display-font);
  font-size: clamp(23px, 3vw, 38px);
  line-height: 1;
}

.rite-kicker {
  margin: 0 0 7px;
  color: var(--arcane);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.rite-heading h2 {
  margin: 0;
  color: #f2f4eb;
  font-family: var(--display-font);
  font-size: clamp(34px, 6vw, 76px);
  font-weight: 400;
  line-height: 1.08;
  text-transform: uppercase;
}

.rite-aside {
  margin: 0 0 5px;
  padding-left: 18px;
  color: var(--silver-dim);
  border-left: 3px solid var(--arcane);
  font-size: 11px;
  line-height: 1.75;
}

.spellfolio {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--paper-deep);
  filter: drop-shadow(14px 18px 0 rgba(0, 0, 0, 0.46));
}

.spellfolio::before,
.spellfolio::after {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  z-index: 4;
  width: 10px;
  pointer-events: none;
  background:
    radial-gradient(circle, var(--void) 0 3px, transparent 3.4px) 0 0 / 10px 31px repeat-y;
}

.spellfolio::before {
  left: -10px;
}

.spellfolio::after {
  right: -10px;
}

.folio-page {
  position: relative;
  min-width: 0;
  padding: clamp(32px, 5vw, 67px);
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent 0 97%, rgba(9, 26, 54, 0.08) 97%),
    repeating-linear-gradient(0deg, rgba(9, 26, 54, 0.035) 0 1px, transparent 1px 7px),
    var(--paper);
}

.folio-page::before {
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
  border: 1px solid rgba(9, 26, 54, 0.17);
}

.folio-page::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 7%;
  pointer-events: none;
  opacity: 0.2;
  background: repeating-linear-gradient(0deg, var(--ink) 0 1px, transparent 1px 5px);
}

.folio-verso {
  border-right: 2px solid rgba(9, 26, 54, 0.28);
  box-shadow:
    inset -18px 0 0 rgba(9, 26, 54, 0.06),
    inset -26px 0 0 rgba(255, 255, 255, 0.18);
}

.folio-recto {
  background:
    linear-gradient(90deg, rgba(9, 26, 54, 0.07) 0 2%, transparent 2% 97%, rgba(9, 26, 54, 0.08) 97%),
    repeating-linear-gradient(0deg, rgba(9, 26, 54, 0.035) 0 1px, transparent 1px 7px),
    var(--paper);
  box-shadow:
    inset 18px 0 0 rgba(9, 26, 54, 0.06),
    inset 26px 0 0 rgba(255, 255, 255, 0.18);
}

.folio-recto::after {
  right: auto;
  left: 0;
}

.folio-corner {
  position: absolute;
  top: 24px;
  right: 26px;
  z-index: 2;
  color: rgba(9, 26, 54, 0.38);
  font-family: var(--display-font);
  font-size: 22px;
}

.folio-rubric {
  margin: 0 0 13px;
  color: var(--arcane-dark);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.folio-page h3 {
  margin: 0 0 22px;
  color: var(--ink);
  font-family: var(--display-font);
  font-size: clamp(27px, 3.3vw, 43px);
  font-weight: 400;
  line-height: 1.15;
  text-transform: uppercase;
}

.folio-page p {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.8;
}

.folio-page strong {
  color: var(--ink);
}

.folio-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.network-pill {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 3px 9px;
  color: #fff;
  background: var(--ibm);
  box-shadow: 3px 3px 0 rgba(9, 26, 54, 0.22);
  font-size: 9px;
  white-space: nowrap;
}

.agent-terminal {
  margin: 28px 0;
  padding: 18px;
  color: var(--silver);
  border: 2px solid var(--ibm);
  background:
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(198, 208, 204, 0.035) 2px 3px),
    var(--terminal);
  box-shadow: 6px 6px 0 rgba(9, 26, 54, 0.2);
}

.agent-terminal .terminal-row {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.terminal-light {
  display: block;
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  margin-top: 10px;
  background: var(--silver-dim);
  box-shadow: 0 0 0 2px rgba(198, 208, 204, 0.12);
}

.terminal-light.is-good {
  background: var(--good);
  box-shadow: 0 0 0 2px rgba(120, 224, 176, 0.14), 0 0 9px rgba(120, 224, 176, 0.7);
}

.terminal-light.is-bad {
  background: var(--danger);
  box-shadow: 0 0 0 2px rgba(255, 116, 107, 0.14), 0 0 9px rgba(255, 116, 107, 0.6);
}

.terminal-light.is-waiting {
  background: var(--amber);
  animation: terminal-pulse 1.4s steps(2) infinite;
}

.agent-terminal small {
  display: block;
  margin-bottom: 6px;
  color: var(--arcane);
  font-size: 8px;
  letter-spacing: 0.07em;
}

.agent-terminal strong {
  color: var(--silver);
  font-size: 12px;
  line-height: 1.7;
}

.contract-link {
  display: inline-block;
  margin: 15px 0 0 22px;
  color: var(--amber);
  font-size: 10px;
}

.live-ledger {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 30px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid rgba(9, 26, 54, 0.35);
}

.live-ledger div {
  min-width: 0;
  padding: 15px 8px 12px;
  border-right: 1px solid rgba(9, 26, 54, 0.23);
}

.live-ledger div:last-child {
  border-right: 0;
}

.live-ledger dt {
  min-height: 30px;
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.5;
}

.live-ledger dd {
  display: flex;
  margin: 6px 0 0;
  align-items: baseline;
  gap: 3px;
}

.live-ledger b {
  color: var(--ink);
  font-family: var(--display-font);
  font-size: clamp(18px, 2.2vw, 27px);
  font-weight: 400;
  line-height: 1;
}

.live-ledger span {
  color: var(--ink-soft);
  font-size: 8px;
}

.rite-steps {
  display: grid;
  margin: 30px 0 0;
  padding: 0;
  gap: 6px;
  list-style: none;
}

.rite-steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: start;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid rgba(9, 26, 54, 0.18);
}

.rite-steps span {
  color: var(--arcane-dark);
  font-size: 9px;
}

.rite-steps p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}

.wallet-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 27px 0 18px;
  padding: 11px 14px;
  color: var(--silver-dim);
  border-left: 4px solid var(--ibm);
  background: rgba(9, 26, 54, 0.08);
  font-size: 9px;
}

.wallet-readout strong {
  overflow: hidden;
  max-width: 58%;
  color: var(--ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mint-gate {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  margin-bottom: 22px;
  padding: 10px 13px;
  color: var(--silver);
  border: 1px solid var(--ibm);
  background: var(--ibm);
  font-size: 10px;
}

.mint-gate.is-open {
  color: var(--void);
  border-color: #4b855f;
  background: #99d6b4;
}

.mint-gate.is-closed {
  color: #fff;
  border-color: #a53c3e;
  background: #832f35;
}

.mint-gate-light {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  background: var(--amber);
}

.mint-gate.is-open .mint-gate-light {
  background: #115c36;
}

.mint-gate.is-closed .mint-gate-light {
  background: #ffb5a9;
}

.quantity-ritual {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 18px;
  padding: 20px;
  border: 2px solid var(--ink);
  background: rgba(255, 255, 255, 0.18);
}

.field-caption {
  display: block;
  color: var(--ink-soft);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.quantity-number {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-family: var(--display-font);
  font-size: 57px;
  font-weight: 400;
  line-height: 1;
}

.stepper {
  display: grid;
  grid-template-columns: 48px 48px;
  gap: 6px;
}

.stepper button,
.mini-stepper button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--silver);
  border: 2px solid var(--ink);
  background: var(--ibm);
  box-shadow: 3px 3px 0 rgba(9, 26, 54, 0.2);
  cursor: pointer;
  font-family: var(--display-font);
  font-size: 24px;
}

.stepper button:hover,
.mini-stepper button:hover {
  color: var(--void);
  background: var(--amber);
}

.stepper button:disabled,
.mini-stepper button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.quantity-ritual > p {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
}

.quantity-ritual > p b {
  color: var(--ink);
}

.quote-table {
  display: grid;
  margin-top: 18px;
  border-top: 2px solid var(--ink);
}

.quote-table div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 2px;
  border-bottom: 1px solid rgba(9, 26, 54, 0.28);
}

.quote-table span {
  color: var(--ink-soft);
  font-size: 10px;
}

.quote-table strong {
  text-align: right;
  font-size: 11px;
}

.primary-incantation,
.secondary-incantation {
  border: 2px solid var(--ink);
  cursor: pointer;
  transition: transform 120ms steps(2), box-shadow 120ms steps(2), background 120ms;
}

.primary-incantation {
  display: flex;
  width: 100%;
  min-height: 60px;
  margin-top: 22px;
  padding: 13px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--void);
  background: var(--amber);
  box-shadow: 6px 6px 0 var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.primary-incantation i {
  font-family: var(--display-font);
  font-size: 27px;
  font-style: normal;
  line-height: 1;
}

.primary-incantation:hover:not(:disabled),
.secondary-incantation:hover:not(:disabled) {
  background: #ffda84;
}

.primary-incantation:active:not(:disabled),
.secondary-incantation:active:not(:disabled) {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 var(--ink);
}

.primary-incantation:disabled,
.secondary-incantation:disabled {
  cursor: not-allowed;
  filter: grayscale(0.55);
  opacity: 0.58;
}

.action-note {
  margin: 16px 0 0;
  color: var(--ink-soft) !important;
  font-size: 9px !important;
  line-height: 1.6 !important;
}

.rite-message {
  min-height: 24px;
  margin: 16px 0 0 !important;
  color: var(--arcane-dark) !important;
  font-size: 10px !important;
  line-height: 1.6 !important;
}

.rite-message.is-error {
  color: #8b2028 !important;
}

.rite-message.is-good {
  color: #14613e !important;
}

.x-oracle {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(26px, 4vw, 62px);
  margin-top: clamp(42px, 6vw, 76px);
  padding: clamp(26px, 4vw, 50px);
  border: 2px solid var(--arcane);
  background:
    linear-gradient(90deg, rgba(157, 122, 230, 0.16), transparent 42%),
    repeating-linear-gradient(0deg, rgba(198, 208, 204, 0.035) 0 1px, transparent 1px 8px),
    var(--night);
  box-shadow: 9px 9px 0 #000;
}

.x-oracle-copy {
  display: flex;
  gap: 23px;
  align-items: flex-start;
}

.oracle-mark {
  display: grid;
  width: 65px;
  height: 65px;
  flex: 0 0 65px;
  place-items: center;
  color: var(--void);
  border: 3px solid var(--silver);
  background: var(--silver);
  box-shadow: 5px 5px 0 var(--arcane-dark);
  font-family: var(--display-font);
  font-size: 36px;
  line-height: 1;
}

.x-oracle .folio-rubric {
  color: var(--amber);
}

.x-oracle h3 {
  margin: 0 0 14px;
  color: #fff;
  font-family: var(--display-font);
  font-size: clamp(20px, 2.5vw, 34px);
  font-weight: 400;
  line-height: 1.2;
}

.x-oracle-copy p:last-child {
  margin: 0;
  color: var(--silver);
  font-size: 16px;
  line-height: 1.8;
}

.claim-availability {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  color: var(--silver);
  font-size: 10px;
}

.x-oracle-console .secondary-incantation {
  min-height: 46px;
  padding: 9px 18px;
  color: var(--void);
  background: var(--silver);
  box-shadow: 4px 4px 0 #000;
  font-size: 10px;
}

.x-oracle-console label {
  display: block;
  margin: 19px 0 7px;
  color: var(--silver-dim);
  font-size: 9px;
}

.claim-url-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
}

.claim-url-row input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 9px 12px;
  color: #fff;
  border: 1px solid var(--silver-dim);
  border-radius: 0;
  background: var(--terminal);
  font-size: 11px;
}

.claim-url-row input::placeholder {
  color: #68797d;
}

.claim-url-row button {
  min-height: 44px;
  padding: 8px 16px;
  color: var(--void);
  border: 1px solid var(--amber);
  background: var(--amber);
  cursor: pointer;
  font-size: 9px;
}

.claim-url-row button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.claim-rules {
  margin: 12px 0 0;
  color: var(--silver-dim);
  font-size: 8px;
}

.x-oracle .rite-message {
  color: var(--amber) !important;
}

.x-oracle .rite-message.is-error {
  color: #ffaaa4 !important;
}

.x-oracle .rite-message.is-good {
  color: var(--good) !important;
}

.ladder-wrap {
  position: relative;
  margin-top: 28px;
  overflow-x: auto;
}

.ladder-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.ladder-table th {
  padding: 9px 8px;
  color: var(--paper);
  background: var(--ibm);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-align: left;
}

.ladder-table th:not(:first-child),
.ladder-table td:not(:first-child) {
  text-align: right;
}

.ladder-table td {
  padding: 15px 8px;
  border-bottom: 1px solid rgba(9, 26, 54, 0.25);
}

.ladder-table td:first-child {
  font-weight: 700;
}

.ladder-table td small {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 5px;
  color: var(--paper);
  background: var(--arcane-dark);
  font-size: 7px;
}

.margin-note {
  margin: 21px 0 0;
  padding-left: 16px;
  border-left: 3px solid var(--arcane);
  font-size: 10px !important;
}

.supply-seal {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 20px;
  margin-top: 30px;
  padding: 17px 20px;
  color: var(--paper);
  border: 2px solid var(--ink);
  background: var(--ibm);
  box-shadow: 5px 5px 0 rgba(9, 26, 54, 0.2);
}

.supply-seal span {
  color: var(--amber);
  font-size: 8px;
}

.supply-seal strong {
  grid-row: 1 / 3;
  grid-column: 2;
  color: var(--amber);
  font-family: var(--display-font);
  font-size: 38px;
  font-weight: 400;
  line-height: 1;
}

.supply-seal small {
  color: var(--silver);
  font-size: 8px;
}

.law-list {
  margin: 26px 0 0;
}

.law-list > div {
  padding: 17px 0;
  border-top: 1px solid rgba(9, 26, 54, 0.25);
}

.law-list > div:last-child {
  border-bottom: 1px solid rgba(9, 26, 54, 0.25);
}

.law-list dt {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.law-code {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  place-items: center;
  color: var(--paper);
  background: var(--arcane-dark);
  font-size: 8px;
}

.law-list dd {
  margin: 7px 0 0 34px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.7;
}

.iron-clauses {
  margin-top: 28px;
  padding: 18px;
  border: 2px dashed rgba(9, 26, 54, 0.35);
}

.iron-clauses ul {
  display: grid;
  margin: 12px 0 0;
  padding: 0;
  gap: 9px;
  list-style: none;
}

.iron-clauses li {
  display: grid;
  grid-template-columns: 45px 1fr;
  align-items: center;
  gap: 10px;
}

.iron-clauses li span {
  color: var(--arcane-dark);
  font-family: var(--display-font);
  font-size: 21px;
}

.iron-clauses li p {
  margin: 0;
  font-size: 9px;
  line-height: 1.5;
}

.spellfolio-vault {
  grid-template-columns: minmax(330px, 0.72fr) minmax(0, 1.28fr);
}

.vault-controls {
  padding-right: clamp(28px, 4vw, 52px);
}

.vault-identity {
  margin: 25px 0 13px;
  padding: 11px 13px;
  border-left: 4px solid var(--ibm);
  background: rgba(9, 26, 54, 0.08);
}

.vault-identity span {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-size: 8px;
}

.vault-identity strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vault-balances {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 13px;
  border: 1px solid rgba(9, 26, 54, 0.3);
}

.vault-balances div {
  min-width: 0;
  padding: 11px 8px;
  border-right: 1px solid rgba(9, 26, 54, 0.24);
}

.vault-balances div:last-child {
  border-right: 0;
}

.vault-balances span {
  display: block;
  color: var(--ink-soft);
  font-size: 7px;
}

.vault-balances strong {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  font-family: var(--display-font);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.2;
  text-overflow: ellipsis;
}

.vault-advice {
  min-height: 36px;
  margin: 9px 0 0 !important;
  color: var(--ink-soft) !important;
  font-size: 9px !important;
  line-height: 1.55 !important;
}

.selection-ledger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 22px;
  padding: 13px;
  border: 2px solid var(--ink);
}

.selection-ledger strong {
  display: block;
  margin-top: 3px;
  font-size: 10px;
}

.selection-ledger button {
  padding: 5px 8px;
  color: var(--ink);
  border: 1px solid var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 8px;
}

.alter-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.alter-actions button {
  display: flex;
  min-width: 0;
  min-height: 62px;
  padding: 9px 6px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--paper);
  border: 1px solid var(--ink);
  background: var(--ibm);
  cursor: pointer;
  font-size: 8px;
  line-height: 1.3;
}

.alter-actions button:hover:not(:disabled) {
  color: var(--void);
  background: var(--amber);
}

.alter-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.44;
}

.alter-actions button small {
  color: inherit;
  font-size: 6px;
  opacity: 0.78;
}

.mana-forge {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid var(--ink);
}

.mana-forge > p:not(.folio-rubric) {
  margin: 0 0 13px;
  font-size: 9px;
  line-height: 1.6;
}

.mana-forge-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
}

.mini-stepper {
  display: grid;
  grid-template-columns: 36px 38px 36px;
  align-items: stretch;
  border: 1px solid var(--ink);
}

.mini-stepper button {
  width: 36px;
  height: auto;
  min-height: 45px;
  border: 0;
  box-shadow: none;
  font-size: 18px;
}

.mini-stepper strong {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
  font-family: var(--display-font);
  font-size: 20px;
  font-weight: 400;
}

.mana-forge .secondary-incantation {
  display: flex;
  min-height: 45px;
  padding: 8px 10px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--void);
  background: var(--amber);
  box-shadow: none;
  font-size: 8px;
}

.mana-forge .secondary-incantation small {
  font-size: 6px;
}

.familiar-page {
  min-height: 740px;
}

.familiar-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.familiar-toolbar h3 {
  margin-bottom: 12px;
}

.familiar-toolbar button {
  flex: 0 0 auto;
  padding: 7px 9px;
  color: var(--ink);
  border: 1px solid var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 7px;
}

.familiar-toolbar button:hover {
  color: var(--paper);
  background: var(--ibm);
}

.vault-progress {
  min-height: 25px;
  margin: 0 0 15px !important;
  padding-bottom: 9px;
  color: var(--ink-soft) !important;
  border-bottom: 1px solid rgba(9, 26, 54, 0.25);
  font-size: 8px !important;
}

.familiar-rack {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 12px;
}

.familiar-card {
  position: relative;
  min-width: 0;
  padding: 0;
  border: 2px solid var(--ink);
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
  text-align: left;
}

.familiar-card:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 rgba(9, 26, 54, 0.28);
}

.familiar-card.is-selected {
  border-color: var(--arcane-dark);
  box-shadow: 0 0 0 3px var(--amber), 5px 5px 0 rgba(9, 26, 54, 0.3);
}

.familiar-card.is-unburnable {
  cursor: default;
}

.familiar-portrait {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-bottom: 2px solid var(--ink);
  background:
    repeating-linear-gradient(45deg, rgba(9, 26, 54, 0.08) 0 4px, transparent 4px 9px),
    var(--paper-deep);
}

.familiar-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.familiar-portrait.is-broken::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 2px dashed rgba(9, 26, 54, 0.42);
  background:
    radial-gradient(circle at center, var(--arcane-dark) 0 6px, transparent 7px),
    rgba(9, 26, 54, 0.06);
}

.familiar-card.is-selected .familiar-portrait::before {
  content: "×";
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--void);
  background: var(--amber);
  box-shadow: 2px 2px 0 var(--ink);
  font-family: var(--display-font);
  font-size: 17px;
}

.familiar-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 7px;
  padding: 8px;
}

.familiar-meta strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rarity-chip {
  padding: 2px 4px;
  color: var(--paper);
  background: var(--ibm);
  font-size: 6px;
  text-transform: uppercase;
}

.rarity-chip.rarity-1 {
  background: #225f86;
}

.rarity-chip.rarity-2 {
  color: var(--void);
  background: var(--arcane);
}

.rarity-chip.rarity-3 {
  color: var(--void);
  background: var(--amber);
}

.rarity-chip.rarity-4 {
  color: var(--void);
  background: #f4f0cd;
}

.familiar-meta small {
  grid-column: 1 / -1;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-familiars {
  display: grid;
  min-height: 380px;
  place-items: center;
  align-content: center;
  gap: 16px;
  text-align: center;
}

.empty-familiars[hidden] {
  display: none;
}

.empty-familiars img {
  width: min(150px, 45%);
  border: 3px solid var(--ink);
  box-shadow: 7px 7px 0 rgba(9, 26, 54, 0.2);
  filter: grayscale(0.15);
}

.empty-familiars p {
  margin: 0;
  font-size: 11px;
}

.bestiary-ledger {
  border: 2px solid var(--silver-dim);
  box-shadow: 12px 14px 0 rgba(0, 0, 0, 0.45);
}

.beast-tier {
  position: relative;
  padding: clamp(24px, 3.5vw, 44px);
  background:
    repeating-linear-gradient(90deg, rgba(198, 208, 204, 0.035) 0 1px, transparent 1px 9px),
    var(--night);
  border-bottom: 1px solid var(--line);
}

.beast-tier:last-child {
  border-bottom: 0;
}

.beast-tier::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 7px;
  background: var(--silver-dim);
}

.tier-rare::before {
  background: #61a9c8;
}

.tier-epic::before {
  background: var(--arcane);
}

.tier-legendary::before {
  background: var(--amber);
}

.tier-divine::before {
  background: #f6f0c8;
}

.beast-tier header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.beast-tier header > div {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tier-glyph {
  color: var(--amber);
  font-size: 22px;
}

.beast-tier h3 {
  margin: 0;
  color: #fff;
  font-family: var(--display-font);
  font-size: clamp(25px, 3.2vw, 40px);
  font-weight: 400;
  text-transform: uppercase;
}

.beast-tier header p {
  margin: 0 0 4px;
  color: var(--silver-dim);
  font-size: 9px;
  text-align: right;
}

.beast-tier header p strong {
  color: var(--amber);
  font-family: var(--display-font);
  font-size: 23px;
  font-weight: 400;
}

.variant-note {
  max-width: 850px;
  margin: -8px 0 23px !important;
  color: var(--silver-dim) !important;
  font-size: 10px !important;
  line-height: 1.7 !important;
}

.tier-blurb {
  max-width: 920px;
  margin: -5px 0 24px;
  color: var(--silver-dim);
  font-size: 16px;
  line-height: 1.75;
}

.portrait-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(8px, 1.4vw, 17px);
}

.portrait-rail-divine {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.portrait-rail figure {
  min-width: 0;
  margin: 0;
}

.portrait-frame {
  display: block;
  padding: 5px;
  border: 1px solid rgba(198, 208, 204, 0.42);
  background: var(--terminal);
  box-shadow: 4px 4px 0 #000;
}

.tier-rare .portrait-frame {
  border-color: #61a9c8;
}

.tier-epic .portrait-frame {
  border-color: var(--arcane);
  box-shadow: 4px 4px 0 var(--arcane-dark);
}

.tier-legendary .portrait-frame {
  border-color: var(--amber);
  box-shadow: 4px 4px 0 var(--amber-deep);
}

.tier-divine .portrait-frame {
  border: 2px solid #fff6cb;
  box-shadow: 4px 4px 0 var(--arcane);
}

.portrait-frame img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: filter 140ms;
}

.portrait-rail figure:hover img {
  filter: brightness(1.09) contrast(1.05);
}

.portrait-rail figcaption {
  padding: 9px 2px 0;
}

.portrait-rail figcaption b {
  display: block;
  overflow: hidden;
  color: var(--silver);
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 400;
  line-height: 1.45;
  text-overflow: ellipsis;
}

.portrait-rail figcaption small {
  display: block;
  margin-top: 3px;
  color: var(--silver-dim);
  font-size: 8px;
}

.portrait-rail figcaption .design-bio {
  display: block;
  margin-top: 8px;
  color: var(--silver-dim);
  font-size: clamp(11px, 0.95vw, 13px);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.chronicle-prose p {
  font-size: 16px;
}

.chronicle-prose p:first-of-type::first-letter {
  float: left;
  margin: 0 8px 0 0;
  color: var(--arcane-dark);
  font-family: var(--display-font);
  font-size: 58px;
  line-height: 0.9;
}

.chronicle-prose blockquote {
  margin: 28px 0;
  padding: 18px 20px;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.chronicle-prose blockquote p {
  margin: 0;
  color: var(--ink);
  font-family: var(--display-font);
  font-size: clamp(18px, 2.2vw, 27px);
  line-height: 1.45;
}

.chronicle-prose cite {
  display: block;
  margin-top: 11px;
  color: var(--ink-soft);
  font-size: 8px;
  font-style: normal;
  text-align: right;
}

.chronicle-timeline ol {
  margin: 23px 0 0;
  padding: 0;
  list-style: none;
}

.chronicle-timeline li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  padding: 0 0 23px;
  border-left: 2px solid rgba(9, 26, 54, 0.25);
}

.chronicle-timeline time {
  position: relative;
  left: -1px;
  align-self: start;
  margin-left: -35px;
  padding: 4px 0;
  color: var(--paper);
  background: var(--ibm);
  font-size: 8px;
  text-align: center;
}

.chronicle-timeline time::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -5px;
  width: 8px;
  height: 8px;
  background: var(--amber);
  transform: translateY(-50%);
}

.chronicle-timeline li > div {
  padding-left: 8px;
}

.chronicle-timeline h4 {
  margin: 0 0 4px;
  color: var(--ink);
  font-family: var(--display-font);
  font-size: 17px;
  font-weight: 400;
}

.chronicle-timeline p {
  margin: 0;
  font-size: 10px;
  line-height: 1.7;
}

.timeline-now time {
  color: var(--void);
  background: var(--amber);
}

.reel-seal {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
  padding: 13px;
  color: var(--paper);
  border: 2px solid var(--ink);
  background: var(--ibm);
}

.reel-seal img {
  width: 72px;
  border: 1px solid var(--silver);
}

.reel-seal span {
  display: block;
  color: var(--amber);
  font-size: 7px;
}

.reel-seal strong {
  display: block;
  margin-top: 5px;
  color: var(--paper);
  font-family: var(--display-font);
  font-size: 17px;
  font-weight: 400;
}

.appendix-leaves {
  max-width: 1020px;
  margin: 0 auto;
  border-top: 2px solid var(--silver-dim);
}

.appendix-leaves details {
  border-bottom: 1px solid var(--line);
}

.appendix-leaves summary {
  display: grid;
  grid-template-columns: 44px 1fr 24px;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 12px 4px;
  color: #eef1e9;
  cursor: pointer;
  list-style: none;
}

.appendix-leaves summary::-webkit-details-marker {
  display: none;
}

.appendix-leaves summary:hover strong {
  color: var(--amber);
}

.appendix-leaves summary span {
  color: var(--arcane);
  font-size: 10px;
}

.appendix-leaves summary strong {
  font-family: var(--display-font);
  font-size: clamp(17px, 2.3vw, 27px);
  font-weight: 400;
  line-height: 1.3;
}

.appendix-leaves summary i {
  color: var(--amber);
  font-family: var(--display-font);
  font-size: 23px;
  font-style: normal;
  text-align: center;
  transition: transform 150ms steps(2);
}

.appendix-leaves details[open] summary i {
  transform: rotate(45deg);
}

.appendix-leaves details > p {
  max-width: 800px;
  margin: -2px 0 0 58px;
  padding: 0 24px 25px 0;
  color: var(--silver-dim);
  font-size: 16px;
  line-height: 1.85;
}

.tower-footer {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(230px, 0.6fr);
  gap: clamp(22px, 4vw, 52px);
  align-items: center;
  width: min(var(--page-width), calc(100% - 40px));
  margin: 40px auto 0;
  padding: 46px 0 36px;
  border-top: 1px solid var(--line);
}

.footer-reel img {
  width: 94px;
  border: 2px solid var(--silver-dim);
  box-shadow: 5px 5px 0 #000;
  filter: grayscale(0.2);
}

.footer-copy > strong {
  color: #fff;
  font-family: var(--display-font);
  font-size: 23px;
  font-weight: 400;
}

.footer-copy p {
  max-width: 600px;
  margin: 9px 0 0;
  color: var(--silver-dim);
  font-size: 10px;
  line-height: 1.65;
}

.footer-copy .footer-disclaimer {
  color: var(--amber);
  font-size: 9px;
}

.footer-contracts {
  display: grid;
  gap: 7px;
}

.footer-contracts a {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 10px;
  color: var(--silver);
  border: 1px solid var(--line);
  font-size: 8px;
  text-decoration: none;
}

.footer-contracts a:hover {
  color: var(--amber);
  border-color: var(--amber);
}

.footer-contracts a[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.5;
}

.footer-contracts small {
  overflow: hidden;
  max-width: 130px;
  color: var(--silver-dim);
  text-overflow: ellipsis;
}

.footer-stamp {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  padding-top: 15px;
  color: #5f7075;
  border-top: 1px solid rgba(198, 208, 204, 0.09);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-align: right;
}

@keyframes type-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes index-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes terminal-pulse {
  50% {
    opacity: 0.32;
  }
}

@media (max-width: 1100px) {
  .spellfolio-vault {
    grid-template-columns: minmax(310px, 0.8fr) minmax(0, 1.2fr);
  }

  .folio-page {
    padding: 44px 36px;
  }

  .live-ledger {
    grid-template-columns: repeat(3, 1fr);
  }

  .live-ledger div:nth-child(3) {
    border-right: 0;
  }

  .live-ledger div:nth-child(n + 4) {
    border-top: 1px solid rgba(9, 26, 54, 0.22);
  }

  .portrait-rail-divine {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  html {
    scroll-padding-top: 75px;
  }

  .signal-bar {
    min-height: 68px;
  }

  .sigil-mark {
    width: 39px;
    height: 39px;
    flex-basis: 39px;
  }

  .sigil-copy strong {
    font-size: 15px;
  }

  .opening-rite,
  .rite-section,
  .tower-footer {
    width: min(100% - 28px, var(--page-width));
  }

  .rite-heading {
    grid-template-columns: auto 1fr;
  }

  .rite-aside {
    grid-column: 2;
    max-width: 520px;
    margin-top: 3px;
  }

  .spellfolio,
  .spellfolio-vault,
  .spellfolio-chronicle {
    grid-template-columns: 1fr;
  }

  .folio-page {
    padding: 45px clamp(24px, 7vw, 54px);
  }

  .folio-verso {
    border-right: 0;
    border-bottom: 3px double rgba(9, 26, 54, 0.4);
    box-shadow: inset 0 -20px 0 rgba(9, 26, 54, 0.055);
  }

  .folio-recto {
    box-shadow: inset 0 20px 0 rgba(9, 26, 54, 0.055);
  }

  .folio-recto::after {
    right: 0;
    left: auto;
  }

  .spellfolio::before,
  .spellfolio::after {
    display: none;
  }

  .x-oracle {
    grid-template-columns: 1fr;
  }

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

  .portrait-rail-divine {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tower-footer {
    grid-template-columns: auto 1fr;
  }

  .footer-contracts {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .signal-bar {
    gap: 10px;
    padding: 10px 12px;
  }

  .signal-actions {
    gap: 8px;
  }

  .sigil-copy small {
    display: none;
  }

  .sigil-copy strong {
    font-size: 12px;
  }

  .wallet-keystone {
    min-width: 0;
    max-width: 130px;
    padding: 8px 10px;
  }

  #wallet-keystone-label {
    overflow: hidden;
    max-width: 88px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .index-trigger {
    width: 43px;
    padding: 8px;
  }

  .index-trigger > span:first-child {
    display: none;
  }

  .opening-rite {
    padding-top: 65px;
  }

  .era-flag {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .era-flag i {
    display: none;
  }

  .opening-copy h1 {
    font-size: clamp(44px, 12.4vw, 80px);
    line-height: 0.78;
  }

  .opening-deck {
    grid-template-columns: 1fr;
    gap: 15px;
    border-left-width: 3px;
  }

  .opening-laws {
    margin-left: 0;
  }

  .opening-laws div {
    min-height: 92px;
    padding: 14px 9px;
  }

  .opening-laws span {
    font-size: 8px;
  }

  .tape-frame::before,
  .tape-frame::after {
    width: 48px;
    height: 48px;
    border-width: 5px;
  }

  .tape-label {
    right: 15px;
    bottom: 16px;
    left: 15px;
    padding: 7px 8px;
    font-size: 6px;
  }

  .tape-window figcaption {
    flex-direction: column;
    gap: 5px;
    font-size: 7px;
  }

  .rite-section {
    padding: 68px 0;
  }

  .rite-heading {
    grid-template-columns: auto 1fr;
    align-items: start;
  }

  .rite-number {
    width: 49px;
    height: 49px;
    font-size: 22px;
  }

  .rite-heading h2 {
    font-size: clamp(30px, 9.7vw, 48px);
  }

  .rite-aside {
    grid-column: 1 / -1;
    margin: 3px 0 0;
    padding-left: 12px;
    font-size: 9px;
  }

  .folio-page {
    padding: 40px 22px;
  }

  .live-ledger {
    grid-template-columns: repeat(2, 1fr);
  }

  .live-ledger div,
  .live-ledger div:nth-child(3) {
    border-right: 1px solid rgba(9, 26, 54, 0.22);
    border-top: 1px solid rgba(9, 26, 54, 0.22);
  }

  .live-ledger div:nth-child(odd) {
    border-left: 0;
  }

  .live-ledger div:nth-child(even) {
    border-right: 0;
  }

  .live-ledger div:last-child {
    grid-column: 1 / -1;
    border-right: 0;
  }

  .quantity-ritual {
    padding: 16px;
  }

  .quantity-number {
    font-size: 49px;
  }

  .x-oracle {
    padding: 24px 20px;
  }

  .x-oracle-copy {
    flex-direction: column;
    gap: 16px;
  }

  .oracle-mark {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
    font-size: 28px;
  }

  .claim-url-row {
    grid-template-columns: 1fr;
  }

  .claim-url-row button {
    min-height: 42px;
  }

  .ladder-table th,
  .ladder-table td {
    padding-right: 5px;
    padding-left: 5px;
    font-size: 10px;
  }

  .ladder-table td small {
    display: block;
    width: fit-content;
    margin: 3px 0 0;
  }

  .alter-actions {
    grid-template-columns: 1fr;
  }

  .alter-actions button {
    min-height: 44px;
    flex-direction: row;
    justify-content: space-between;
  }

  .mana-forge-row {
    grid-template-columns: 1fr;
  }

  .familiar-page {
    min-height: 0;
  }

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

  .beast-tier {
    padding: 24px 16px 24px 22px;
  }

  .beast-tier header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .beast-tier header p {
    text-align: left;
  }

  .portrait-rail,
  .portrait-rail-divine {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portrait-rail figure:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: calc(50% - 5px);
  }

  .chronicle-prose p {
    font-size: 16px;
  }

  .chronicle-timeline li {
    grid-template-columns: 64px 1fr;
    gap: 12px;
  }

  .appendix-leaves summary {
    grid-template-columns: 28px 1fr 20px;
    gap: 9px;
  }

  .appendix-leaves details > p {
    margin-left: 37px;
    padding-right: 4px;
    font-size: 16px;
  }

  .tower-footer {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .footer-reel img {
    width: 74px;
  }

  .footer-contracts {
    grid-column: auto;
  }

  .footer-stamp {
    text-align: left;
  }
}

@media (max-width: 430px) {
  .tower-sigil {
    gap: 0;
  }

  .sigil-copy {
    display: none;
  }

  .tongue-switch {
    gap: 0;
  }

  .tongue {
    min-width: 29px;
    padding-right: 1px;
    padding-left: 1px;
    font-size: 10px;
  }

  .wallet-keystone {
    max-width: 110px;
  }

  #wallet-keystone-label {
    max-width: 69px;
    font-size: 9px;
  }

  .opening-copy h1 {
    font-size: 12.4vw;
  }

  .opening-laws b {
    font-size: 24px;
  }

  .folio-page {
    padding-right: 18px;
    padding-left: 18px;
  }

  .stepper {
    grid-template-columns: 42px 42px;
  }

  .stepper button {
    width: 42px;
    height: 42px;
  }

  .claim-url-row input {
    font-size: 9px;
  }

  .vault-balances {
    grid-template-columns: 1fr;
  }

  .vault-balances div,
  .vault-balances div:last-child {
    border-right: 0;
    border-bottom: 1px solid rgba(9, 26, 54, 0.24);
  }

  .vault-balances div:last-child {
    border-bottom: 0;
  }

  .familiar-rack {
    gap: 8px;
  }

  .portrait-rail figcaption b {
    font-size: 12px;
  }

  .portrait-rail figcaption .design-bio {
    font-size: 12px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .title-word {
    opacity: 1;
    transform: none;
  }

  .index-archive {
    opacity: 1;
    transform: none;
  }
}
